summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2020-08-31 21:23:42 +0000
committerKarl Berry <karl@freefriends.org>2020-08-31 21:23:42 +0000
commit559a5f5789eaa2d6b0c848ebcdbb10d9e4997794 (patch)
tree9bff60e8286b9ddb26d4ffa06cc3e275716821da /Master/texmf-dist/tex
parent0a15ec8dcd6ba524dfb1f80663dd69d0cc2dd899 (diff)
latex-dev (31aug20)
git-svn-id: svn://tug.org/texlive/trunk@56225 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty30
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ansinew.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/applemac.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ascii.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty76
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty68
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp1250.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp1252.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp1257.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp437.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp437de.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp850.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp852.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp858.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/cp865.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/decmulti.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/everyshi-ltx.sty68
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/filehook-ltx.sty46
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/fontenc.sty2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/fontmath.cfg2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/fontmath.ltx2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/fonttext.cfg2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/fonttext.ltx6
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/inputenc.sty4
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latex.ltx3911
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latex209.def8
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latexrelease.sty3727
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin1.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin10.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin2.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin3.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin4.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin5.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/latin9.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltexpl.ltx121
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltfilehook.ltx343
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/lthooks.ltx1091
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/lthooks.sty67
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltluatex.lua2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltluatex.tex22
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltshipout.ltx424
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ltxdoc.cls6
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/macce.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/next.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/omlenc.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/omsenc.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ot1enc.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/ot4enc.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/preload.cfg2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/source2edoc.cls228
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/srclfile-ltx.sty46
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/structuredlog.sty88
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/t1enc.def2
-rw-r--r--Master/texmf-dist/tex/latex-dev/base/tuenc.def3
-rw-r--r--Master/texmf-dist/tex/latex-dev/tools/varioref.sty146
-rw-r--r--Master/texmf-dist/tex/latex-dev/tools/xr.sty2
56 files changed, 6964 insertions, 3633 deletions
diff --git a/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty b/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
index 331d9225b72..21af2b78d36 100644
--- a/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
+++ b/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
@@ -27,7 +27,7 @@
\providecommand\DeclareCurrentRelease[2]{}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
\DeclareCurrentRelease{}{2019-04-01}
-\ProvidesPackage{amsmath}[2020/03/17 v2.17g AMS math features]
+\ProvidesPackage{amsmath}[2020/08/24 v2.17h AMS math features]
\edef\@temp{\catcode 96=\number\catcode 96 }
\catcode\string `\`=12
\def\do#1{\catcode\number`#1=\number\catcode`#1}
@@ -937,12 +937,28 @@ Foreign command \@backslashchar#1;\MessageBreak
\fi
}
\fi
-\mathchardef\std@minus\mathcode`\-\relax
-\mathchardef\std@equal\mathcode`\=\relax
-\AtBeginDocument{%
- \mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax
-}
+\@ifundefined{Umathcode}
+ {%
+ \mathchardef\std@minus\mathcode`\-\relax
+ \mathchardef\std@equal\mathcode`\=\relax
+ }
+ {%
+ \Umathcharnumdef\std@minus\Umathcodenum`\-\relax
+ \Umathcharnumdef\std@equal\Umathcodenum`\=\relax
+ }
+\@ifundefined{Umathcode}
+ {%
+ \AtBeginDocument{%
+ \mathchardef\std@minus\mathcode`\-\relax
+ \mathchardef\std@equal\mathcode`\=\relax
+ }%
+ }
+ {%
+ \AtBeginDocument{%
+ \Umathcharnumdef\std@minus\Umathcodenum`\-\relax
+ \Umathcharnumdef\std@equal\Umathcodenum`\=\relax
+ }%
+ }
\ams@def\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}}
\ams@def\Relbar{\mathrel\std@equal}
\def\arrowfill@#1#2#3#4{%
diff --git a/Master/texmf-dist/tex/latex-dev/base/ansinew.def b/Master/texmf-dist/tex/latex-dev/base/ansinew.def
index 6566937cbf5..33d64d13c22 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ansinew.def
+++ b/Master/texmf-dist/tex/latex-dev/base/ansinew.def
@@ -44,7 +44,7 @@
\ProvidesFile{ansinew.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/applemac.def b/Master/texmf-dist/tex/latex-dev/base/applemac.def
index ec766878912..2e5ffe44afb 100644
--- a/Master/texmf-dist/tex/latex-dev/base/applemac.def
+++ b/Master/texmf-dist/tex/latex-dev/base/applemac.def
@@ -44,7 +44,7 @@
\ProvidesFile{applemac.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textflorin}{\textit{f}}
\ProvideTextCommandDefault{\textcent}
diff --git a/Master/texmf-dist/tex/latex-dev/base/ascii.def b/Master/texmf-dist/tex/latex-dev/base/ascii.def
index 36a8db17b8f..ad9dabcaf17 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ascii.def
+++ b/Master/texmf-dist/tex/latex-dev/base/ascii.def
@@ -44,7 +44,7 @@
\ProvidesFile{ascii.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\@inpenc@test
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty
new file mode 100644
index 00000000000..2ffbc66bfc1
--- /dev/null
+++ b/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty
@@ -0,0 +1,76 @@
+%%
+%% This is file `atbegshi-ltx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltshipout.dtx (with options: `atbegshi-ltx')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%%
+%%% From File: ltshipout.dtx
+\providecommand\ltshipoutversion{v1.0a}
+\providecommand\ltshipoutdate{2020/08/31}
+\ProvidesPackage{atbegshi}
+ [2020/08/17 v1.0a
+ Emulation of the original atbegshi package^^Jwith kernel methods]
+\let \AtBeginShipoutBox \ShipoutBox
+\let \AtBeginShipoutInit \@empty
+\def \AtBeginShipout {\AddToHook{shipout/before}}
+\def \AtBeginShipoutNext {\AddToHookNext{shipout/before}}
+\def \AtBeginShipoutFirst
+ {\@expl@@@shipout@add@firstpage@material@@Nn \AtBeginShipoutFirst}
+\let \AtBeginShipoutDiscard \DiscardShipoutBox
+\let \AtBeginShipoutAddToBox
+ \@expl@@@shipout@add@background@box@@n
+\let \AtBeginShipoutAddToBoxForeground
+ \@expl@@@shipout@add@foreground@box@@n
+\let \AtBeginShipoutUpperLeft
+ \@expl@@@shipout@add@background@picture@@n
+\let \AtBeginShipoutUpperLeftForeground
+ \@expl@@@shipout@add@foreground@picture@@n
+\ExplSyntaxOn
+\cs_new:Npn \ShipoutBoxHeight { \dim_use:N \l_shipout_box_ht_dim }
+\cs_new:Npn \ShipoutBoxDepth { \dim_use:N \l_shipout_box_dp_dim }
+\cs_new:Npn \ShipoutBoxWidth { \dim_use:N \l_shipout_box_wd_dim }
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%
+%% End of file `atbegshi-ltx.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty
new file mode 100644
index 00000000000..05678138e89
--- /dev/null
+++ b/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty
@@ -0,0 +1,68 @@
+%%
+%% This is file `atveryend-ltx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltfilehook.dtx (with options: `atveryend-ltx')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
+\ProvidesPackage{atveryend}
+ [2020/08/19 v1.0a
+ Emulation of the original atvery package^^Jwith kernel methods]
+\newcommand\AfterLastShipout {\AddToHook{enddocument/afterlastpage}}
+\newcommand\AtVeryEndDocument {\AddToHook{enddocument/afteraux}}
+\newcommand\AtEndAfterFileList{\AddToHook{enddocument/info}}
+\newcommand\AtVeryVeryEnd {\AddToHook{enddocument/end}}
+\ExplSyntaxOn
+\newcommand\BeforeClearDocument[1]
+ { \AtEndDocument{#1}
+ \atveryend@DEPRECATED{BeforeClearDocument \tl_to_str:n{#1}}
+ }
+\cs_new:Npn\atveryend@DEPRECATED #1
+ {\iow_term:x{======~DEPRECATED~USAGE~#1~==========}}
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%
+%% End of file `atveryend-ltx.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp1250.def b/Master/texmf-dist/tex/latex-dev/base/cp1250.def
index 8a5af690ee1..5abb61b3474 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp1250.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp1250.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp1250.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textcurrency}
{\TextSymbolUnavailable\textcurrency}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp1252.def b/Master/texmf-dist/tex/latex-dev/base/cp1252.def
index 25fd56921d8..030e195b356 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp1252.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp1252.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp1252.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp1257.def b/Master/texmf-dist/tex/latex-dev/base/cp1257.def
index 3163db13e96..c43fdccd075 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp1257.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp1257.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp1257.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp437.def b/Master/texmf-dist/tex/latex-dev/base/cp437.def
index 9d77a80416d..27acacdec92 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp437.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp437.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp437.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textflorin}{\textit{f}}
\ProvideTextCommandDefault{\textpeseta}{Pt}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp437de.def b/Master/texmf-dist/tex/latex-dev/base/cp437de.def
index fbedd5f6e36..ae78fc6d6ce 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp437de.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp437de.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp437de.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textflorin}{\textit{f}}
\ProvideTextCommandDefault{\textpeseta}{Pt}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp850.def b/Master/texmf-dist/tex/latex-dev/base/cp850.def
index 51a1c051a8e..d138dd3790a 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp850.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp850.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp850.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
%%
%% If you need a Euro symbol, try cp858 instead.
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp852.def b/Master/texmf-dist/tex/latex-dev/base/cp852.def
index 7c348373ab8..2878f5b1a2e 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp852.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp852.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp852.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp858.def b/Master/texmf-dist/tex/latex-dev/base/cp858.def
index f06cbdc6706..d159c74c35d 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp858.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp858.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp858.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/cp865.def b/Master/texmf-dist/tex/latex-dev/base/cp865.def
index b5bd9b0e135..a4cb3dda881 100644
--- a/Master/texmf-dist/tex/latex-dev/base/cp865.def
+++ b/Master/texmf-dist/tex/latex-dev/base/cp865.def
@@ -44,7 +44,7 @@
\ProvidesFile{cp865.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textflorin}{\textit{f}}
\ProvideTextCommandDefault{\textpeseta}{Pt}
diff --git a/Master/texmf-dist/tex/latex-dev/base/decmulti.def b/Master/texmf-dist/tex/latex-dev/base/decmulti.def
index 6513defd020..65c867a1773 100644
--- a/Master/texmf-dist/tex/latex-dev/base/decmulti.def
+++ b/Master/texmf-dist/tex/latex-dev/base/decmulti.def
@@ -44,7 +44,7 @@
\ProvidesFile{decmulti.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/everyshi-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/everyshi-ltx.sty
new file mode 100644
index 00000000000..5eadf0fc814
--- /dev/null
+++ b/Master/texmf-dist/tex/latex-dev/base/everyshi-ltx.sty
@@ -0,0 +1,68 @@
+%%
+%% This is file `everyshi-ltx.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% ltshipout.dtx (with options: `everyshi-ltx')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This file has the LPPL maintenance status "maintained".
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
+%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
+%%
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%%
+%%% From File: ltshipout.dtx
+\providecommand\ltshipoutversion{v1.0a}
+\providecommand\ltshipoutdate{2020/08/31}
+\ProvidesPackage{everyshi}
+ [2020/08/17 v1.0a
+ Emulation of the original everyshi package^^Jwith kernel methods]
+\def \EveryShipout {\AddToHook{shipout/before}}
+\def \AtNextShipout {\AddToHookNext{shipout/before}}
+%%
+%% In normal circumstances the above emulation is sufficient and in
+%% all known packages (we know of) that use everyshi it either works or
+%% the packages have been adjusted.
+%%
+%% Code that directly manipulates box 255, however, might fail.
+%% If that is the case look at the shipout hooks offered now as
+%% they are normally sufficienct to avoid such minpulations (or
+%% replace box 255 with \ShipoutBox in the code.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%
+%% End of file `everyshi-ltx.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/filehook-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/filehook-ltx.sty
index 5ee890ae506..b652ce8de84 100644
--- a/Master/texmf-dist/tex/latex-dev/base/filehook-ltx.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/filehook-ltx.sty
@@ -8,33 +8,45 @@
%%
%% This is a generated file.
%%
-%% Copyright 2020 Frank Mittelbach
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
+%% version 2008 or later.
%%
-%% The newest sources can be found below
+%% This file has the LPPL maintenance status "maintained".
%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
%%
-%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\ltfilehookversion{v0.9a}
-\providecommand\ltfilehookdate{2020/07/19}
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
\newcommand\AtBeginOfEveryFile [1]
{\AddToHook{file/before}{#1}}
\newcommand\AtEndOfEveryFile [1]
@@ -93,8 +105,6 @@
{\AddToHook{include/after/#1}{#2}}
\expandafter\let\csname ver@filehook.sty\endcsname\fmtversion
\@namedef {ver@filehook.sty}{2020/10/01}
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/fontenc.sty b/Master/texmf-dist/tex/latex-dev/base/fontenc.sty
index edba0ae7b5e..e59f6c80f54 100644
--- a/Master/texmf-dist/tex/latex-dev/base/fontenc.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/fontenc.sty
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesPackage{fontenc}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX package]
\def\update@uclc@with@cyrillic{%
\expandafter\def\expandafter\@uclclist\expandafter
diff --git a/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg b/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
index f3a35d15ebc..533c95e3b97 100644
--- a/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
+++ b/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.cfg}
- [2020/04/24 v3.0h LaTeX Kernel
+ [2020/08/01 v3.0i LaTeX Kernel
(Uncustomised math
font setup)]
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx b/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
index ecf8ec365b5..003df16621e 100644
--- a/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
+++ b/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.ltx}
- [2020/04/24 v3.0h LaTeX Kernel
+ [2020/08/01 v3.0i LaTeX Kernel
(Math
font setup)]
\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
diff --git a/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg b/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
index 9c985ee193f..e404b80e993 100644
--- a/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
+++ b/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.cfg}
- [2020/04/24 v3.0h LaTeX Kernel
+ [2020/08/01 v3.0i LaTeX Kernel
(Uncustomised text
font setup)]
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx b/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
index 6b5127e8361..24d26fe9492 100644
--- a/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
+++ b/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.ltx}
- [2020/04/24 v3.0h LaTeX Kernel
+ [2020/08/01 v3.0i LaTeX Kernel
(Text
font setup)]
\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
@@ -46,7 +46,7 @@
\input {ot1enc.def}
\input {t1enc.def}
\input{ts1enc.def}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
\fontencoding{OT1}
\def\@fontenc@load@list{\@elt{T1,OT1}}
\def\rmsubstdefault{cmr}
@@ -81,7 +81,7 @@
\input {ot1cmtt.fd}
\endgroup
\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
\newcommand\encodingdefault{OT1}
\newcommand\rmdefault{cmr}
\newcommand\sfdefault{cmss}
diff --git a/Master/texmf-dist/tex/latex-dev/base/inputenc.sty b/Master/texmf-dist/tex/latex-dev/base/inputenc.sty
index 3d914c8a882..a8c8ab69b1c 100644
--- a/Master/texmf-dist/tex/latex-dev/base/inputenc.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/inputenc.sty
@@ -45,7 +45,7 @@
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{inputenc}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\def\DeclareInputMath#1{%
\@inpenc@test
\bgroup
@@ -71,7 +71,7 @@
\noexpand\IeC
\fi
}
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
\def\inputencoding#1{%
\edef\reserved@a{#1}%
\ifx\reserved@a\inputencodingname
diff --git a/Master/texmf-dist/tex/latex-dev/base/latex.ltx b/Master/texmf-dist/tex/latex-dev/base/latex.ltx
index 67fea591af3..50794044fc7 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latex.ltx
+++ b/Master/texmf-dist/tex/latex-dev/base/latex.ltx
@@ -8,7 +8,9 @@
%% ltplain.dtx (with options: `2ekernel')
%% ltvers.dtx (with options: `2ekernel')
%% ltluatex.dtx (with options: `2ekernel')
+%% ltexpl.dtx (with options: `2ekernel')
%% ltdefns.dtx (with options: `2ekernel')
+%% lthooks.dtx (with options: `2ekernel')
%% ltalloc.dtx (with options: `2ekernel')
%% ltcntrl.dtx (with options: `2ekernel')
%% lterror.dtx (with options: `2ekernel')
@@ -40,8 +42,10 @@
%% ltidxglo.dtx (with options: `2ekernel')
%% ltbibl.dtx (with options: `2ekernel')
%% ltpage.dtx (with options: `2ekernel')
-%% ltoutput.dtx (with options: `2ekernel')
%% ltclass.dtx (with options: `2ekernel,tracerollback')
+%% ltfilehook.dtx (with options: `2ekernel')
+%% ltshipout.dtx (with options: `2ekernel')
+%% ltoutput.dtx (with options: `2ekernel')
%% ltfinal.dtx (with options: `2ekernel')
%%
%% This is a generated file.
@@ -432,11 +436,7 @@
\extrafloats\expandafter{\numexpr#1-1\relax}%
\fi}%
\fi
-\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
- \ch@ck#1#4#2%
- \allocationnumber\count1#1%
- \global#3#5\allocationnumber
- \wlog{\string#5=\string#2\the\allocationnumber}}
+\def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count}
\ifx\numexpr\@undefined
\def\newinsert#1{\global\advance\insc@unt \m@ne
\ch@ck0\insc@unt\count
@@ -710,7 +710,7 @@
\def\fmtname{LaTeX2e}
\edef\fmtversion
{2020-10-01}
-\def\patch@level{-7}
+\def\patch@level{-8}
\edef\development@branch@name{develop \the\year-\the\month-\the\day}
\iffalse
\def\reserved@a#1/#2/#3\@nil{%
@@ -820,23 +820,23 @@
\long\def\@firstofone#1{#1}
\ifx\e@alloc@attribute@count\@undefined
\countdef\e@alloc@attribute@count=258
+ \e@alloc@attribute@count=\z@
\fi
\def\newattribute#1{%
\e@alloc\attribute\attributedef
\e@alloc@attribute@count\m@ne\e@alloc@top#1%
}
-\e@alloc@attribute@count=\z@
\def\setattribute#1#2{#1=\numexpr#2\relax}
\def\unsetattribute#1{#1=-"7FFFFFFF\relax}
\ifx\e@alloc@ccodetable@count\@undefined
\countdef\e@alloc@ccodetable@count=259
+ \e@alloc@ccodetable@count=\z@
\fi
\def\newcatcodetable#1{%
\e@alloc\catcodetable\chardef
\e@alloc@ccodetable@count\m@ne{"8000}#1%
\initcatcodetable\allocationnumber
}
-\e@alloc@ccodetable@count=\z@
\newcatcodetable\catcodetable@initex
\newcatcodetable\catcodetable@string
\begingroup
@@ -919,31 +919,32 @@
\endgroup
\ifx\e@alloc@luafunction@count\@undefined
\countdef\e@alloc@luafunction@count=260
+ \e@alloc@luafunction@count=\z@
\fi
\def\newluafunction{%
\e@alloc\luafunction\e@alloc@chardef
\e@alloc@luafunction@count\m@ne\e@alloc@top
}
-\e@alloc@luafunction@count=\z@
\ifx\e@alloc@whatsit@count\@undefined
\countdef\e@alloc@whatsit@count=261
+ \e@alloc@whatsit@count=\z@
\fi
\def\newwhatsit#1{%
\e@alloc\whatsit\e@alloc@chardef
\e@alloc@whatsit@count\m@ne\e@alloc@top#1%
}
-\e@alloc@whatsit@count=\z@
\ifx\e@alloc@bytecode@count\@undefined
\countdef\e@alloc@bytecode@count=262
+ \e@alloc@bytecode@count=\z@
\fi
\def\newluabytecode#1{%
\e@alloc\luabytecode\e@alloc@chardef
\e@alloc@bytecode@count\m@ne\e@alloc@top#1%
}
-\e@alloc@bytecode@count=\z@
\ifx\e@alloc@luachunk@count\@undefined
\countdef\e@alloc@luachunk@count=263
+ \e@alloc@luachunk@count=\z@
\fi
\def\newluachunkname#1{%
\e@alloc\luachunk\e@alloc@chardef
@@ -951,9 +952,13 @@
{\escapechar\m@ne
\directlua{lua.name[\the\allocationnumber]="\string#1"}}%
}
-\e@alloc@luachunk@count=\z@
-\everyjob\expandafter{%
- \the\everyjob
+\def\now@and@everyjob#1{%
+ \everyjob\expandafter{\the\everyjob
+ #1%
+ }%
+ #1%
+}
+\now@and@everyjob{%
\begingroup
\attributedef\attributezero=0 %
\chardef \charzero =0 %
@@ -982,8 +987,86 @@
\expandafter\let\csname ver@luaotfload.sty\endcsname\fmtversion
}
\fi
+%%% From File: ltexpl.dtx
+\def\@expl@sys@load@backend@@{}
+\def\@expl@push@filename@@{}
+\def\@expl@push@filename@aux@@{}
+\def\@expl@pop@filename@@{}
+\def\@expl@finalise@setup@@{}
+\long\def\@gobble#1{}
+\long\def\@firstofone#1{#1}
+\long\def\@firstoftwo#1#2{#1}
+\long\def\@secondoftwo#1#2{#2}
+\long\def\IfFileExists#1{%
+ \openin\@inputcheck"#1" %
+ \ifeof\@inputcheck
+ \expandafter\@secondoftwo
+ \else
+ \closein\@inputcheck
+ \expandafter\@firstoftwo
+ \fi}
+\long\def\@ifnextchar#1#2#3{%
+ \let\reserved@d=#1%
+ \def\reserved@a{#2}%
+ \def\reserved@b{#3}%
+ \futurelet\@let@token\@ifnch}
+\def\@ifnch{%
+ \ifx\@let@token\reserved@d
+ \expandafter\reserved@a
+ \else
+ \expandafter\reserved@b
+ \fi}
+\expandafter\ifx\csname tex\string _let:D\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \GenericInfo{}{Skipping: expl3 code already part of the format}%
+ \expandafter\endinput
+\fi
+ {%
+ \IfFileExists{expl3.ltx}
+ {%
+ \ifnum0%
+ \ifdefined\pdffilesize 1\fi
+ \ifdefined\filesize 1\fi
+ \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+ \ifdefined\kanjiskip 1\fi
+ >0 %
+ \expandafter\@firstofone
+ \else
+ \def~{ }\def\MessageBreak{^^J~~~~~~~~~~~~~~~}%
+ \errmessage{LaTeX Error:
+ LaTeX requires the e-TeX primitives and additional\MessageBreak
+ functionality available in the engines:\MessageBreak
+ - pdfTeX v1.40\MessageBreak
+ - XeTeX v0.99992\MessageBreak
+ - LuaTeX v0.95\MessageBreak
+ - e-(u)pTeX mid-2012\MessageBreak
+ or later%
+ }\batchmode \read -1 to \reserved@a
+ \fi
+ }
+ {%
+ \errmessage{LaTeX requires expl3}%
+ \batchmode \read -1 to \reserved@a
+ }%
+ {%
+ \input expl3.ltx
+ \ifdefined\NewDocumentCommand
+ \else
+ \IfFileExists{xparse.ltx}
+ {\input xparse.ltx }
+ {}%
+ \fi
+ }%
+ }
+\ExplSyntaxOn
+\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N
+\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF
+\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N
+\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N
+\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N
+\ExplSyntaxOff
%%% From File: ltdefns.dtx
-\input ltexpl.ltx
\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
\protected\long\def\typeout#1{\begingroup
\set@display@protect
@@ -1022,7 +1105,7 @@
\def\@cons#1#2{\begingroup\let\@elt\relax\xdef#1{#1\@elt #2}\endgroup}
\def\@car#1#2\@nil{#1}
\def\@cdr#1#2\@nil{#2}
-\def\@carcube#1#2#3#4\@nil{#1#2#3}
+\long\def\@carcube#1#2#3#4\@nil{#1#2#3}
\def\@preamblecmds{}
\def\@onlypreamble#1{%
\expandafter\gdef\expandafter\@preamblecmds\expandafter{%
@@ -1230,6 +1313,8 @@
\def\restore@protect{\let\protect\@@protect}
\set@typeset@protect
\def\MakeRobust#1{%
+ \count@=\escapechar
+ \escapechar=`\\
\@ifundefined{\expandafter\@gobble\string#1}{%
\@latex@error{The control sequence `\string#1' is undefined!%
\MessageBreak There is nothing here to make robust}%
@@ -1238,8 +1323,9 @@
{%
\@ifundefined{\expandafter\@gobble\string#1\space}%
{%
- \global\expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ #1%
\edef\reserved@a{\string#1}%
\def\reserved@b{#1}%
\edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
@@ -1251,19 +1337,183 @@
\csname\expandafter\@gobble\string#1\space\endcsname}%
}%
{\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
+ }%
+ \escapechar=\count@
}%
-
+\def\@kernel@rename@newcommand#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\afterassignment\global
+ \global\@copy@newcommand#1#2%
+ \global\let#2\@undefined
+ \global\expandafter\let\csname\string#2\endcsname\@undefined}%
+ {\global\let#1=#2}}%
+ {\global\let#1=#2}}
\def\kernel@make@fragile#1{%
\@ifundefined{\expandafter\@gobble\string#1\space}%
{}%
{%
\global\expandafter\let\expandafter #1\csname
- \expandafter\@gobble\string#1\space\endcsname
+ \expandafter\@gobble\string#1\space\endcsname
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\expandafter\endcsname
+ \csname\expandafter\@gobble\string#1\space\endcsname
\global\expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname\@undefined
+ \expandafter\@gobble\string#1\space\endcsname\@undefined
}%
}
+\long\def\robust@command@act#1#2#3#4{%
+ \robust@command@chk@safe#2%
+ {\expandafter\robust@command@act@loop
+ \expandafter#2%
+ #1{\@nnil\@nnil}%
+ \robust@command@act@end}%
+ {\robust@command@act@end}%
+ {#3}{#4}}%
+\long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2}
+\long\def\robust@command@act@loop@aux#1#2#3{%
+ \ifx\@nnil#2%
+ \else
+ #2{#1}%
+ {\robust@command@act@do{#3}}%
+ {\expandafter\robust@command@act@loop\expandafter#1}%
+ \fi}
+\long\def\robust@command@act@do#1%
+ \fi#2%
+ \robust@command@act@end#3#4{%
+ \fi
+ #1#4}
+\long\def\robust@command@act@end#1#2{#1#2}
+\long\def\robust@command@chk@safe#1{%
+ \begingroup
+ \escapechar=`\\
+ \expandafter\endgroup\expandafter
+ \robust@command@act@chk@args\meaning#1:->\@nil}
+\def\robust@command@act@chk@args#1:->#2\@nil{%
+ \@expl@str@if@eq@@nnTF{#1}{macro}%
+ {\@firstoftwo}%
+ {\@expl@str@if@eq@@nnTF{#1}{\protected macro}%
+ {\@firstoftwo}%
+ {\@secondoftwo}}}
+\def\NewCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstoftwo\@notdefinable}}
+\def\RenewCommandCopy{%
+ \declare@commandcopy
+ {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc
+ \@firstofone}%
+ {\@firstofone}}
+\def\DeclareCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstofone}}
+\long\def\declare@commandcopy#1#2#3#4{%
+ \edef\reserved@a{\@expl@cs@to@str@@N#3}%
+ \@ifundefined\reserved@a{#1}{#2}%
+ {\robust@command@act
+ \@declarecommandcopylisthook#4%
+ \declare@commandcopy@let{#3#4}}}
+\def\@declarecommandcopylisthook{%
+ {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}%
+ {\@if@newcommand \@copy@newcommand}}
+\long\def\declare@commandcopy@let#1#2{\let#1=#2\relax}
+\long\def\ShowCommand#1{%
+ \robust@command@act
+ \@showcommandlisthook#1%
+ \show#1}
+\def\@showcommandlisthook{%
+ {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}%
+ {\@if@newcommand \@show@newcommand}}
+\long\def\@if@DeclareRobustCommand#1{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \xdef\@gtempa{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \endgroup
+ \ifx\@gtempa#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\long\def\@copy@DeclareRobustCommand#1#2{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \edef\reserved@a{%
+ \endgroup
+ \def\noexpand#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \noexpand\copy@kernel@robust@command
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}%
+ \reserved@a}
+\long\def\copy@kernel@robust@command#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\@copy@newcommand}%
+ {\declare@commandcopy@let}}
+ {\declare@commandcopy@let}%
+ #1#2}
+\long\def\@show@DeclareRobustCommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\show@kernel@robust@command
+ \csname\@expl@cs@to@str@@N#1 \endcsname}
+\long\def\show@kernel@robust@command#1{%
+ \robust@command@chk@safe#1%
+ {\@if@newcommand#1%
+ {\@show@newcommand}%
+ {\show}}%
+ {\show}%
+ #1}
+\long\def\@if@newcommand#1{%
+ \edef\reserved@a{%
+ \noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}%
+ \edef\reserved@b{%
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@carcube#1{}{}{}\@nil}}%
+ \ifx\reserved@a\reserved@b
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\long\def\@copy@newcommand#1#2{%
+ \edef#1{\noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@gobblethree#2}}%
+ \expandafter
+ \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname}
+\long\def\@show@newcommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\@show@newcommand@aux
+ \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \expandafter{#1}}
+\long\def\@show@newcommand@aux#1#2{%
+ \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}%
+ \edef\reserved@a{%
+ default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
+ \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}%
+ \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}}
\def\@ifundefined#1{%
\ifcsname#1\endcsname\@ifundefin@d@i\else\@ifundefin@d@ii\fi{#1}}
\long\def\@ifundefin@d@i#1\fi#2{\fi
@@ -1355,6 +1605,899 @@
\MakeRobust\smallbreak
\MakeRobust\strut
\MakeRobust\underbar
+\long\def\g@addto@macro#1#2{%
+ \begingroup
+ \toks@\expandafter{#1#2}%
+ \xdef#1{\the\toks@}%
+ \endgroup}
+%%
+%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: lthooks.dtx
+\def\lthooksversion{v1.0a}
+\def\lthooksdate{2020/08/31}
+\ExplSyntaxOn
+\bool_new:N \g__hook_debug_bool
+\cs_new_eq:NN \__hook_debug:n \use_none:n
+\cs_new_protected:Npn \hook_debug_on:
+ {
+ \bool_gset_true:N \g__hook_debug_bool
+ \__hook_debug_gset:
+ }
+\cs_new_protected:Npn \hook_debug_off:
+ {
+ \bool_gset_false:N \g__hook_debug_bool
+ \__hook_debug_gset:
+ }
+\cs_new_protected:Npn \__hook_debug_gset:
+ {
+ \cs_gset_protected:Npx \__hook_debug:n ##1
+ { \bool_if:NT \g__hook_debug_bool {##1} }
+ }
+\cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn
+\bool_new:N \l__hook_tmpa_bool
+\tl_new:N \l__hook_return_tl
+\tl_new:N \l__hook_tmpa_tl
+\tl_new:N \l__hook_tmpb_tl
+\seq_new:N \g__hook_all_seq
+\tl_new:N \g__hook_removal_list_tl
+\tl_new:N \l__hook_cur_hook_tl
+\prop_new:N \l__hook_work_prop
+\tl_new:N \g__hook_hook_curr_name_tl
+\seq_new:N \g__hook_name_stack_seq
+\cs_new_eq:NN \__hook_tmp:w ?
+\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx }
+\scan_new:N \s__hook_mark
+\cs_new_protected:Npn \hook_new:n #1
+ {
+ \exp_args:Nx \__hook_new:n
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_new:n #1 {
+ \hook_if_exist:nTF {#1}
+ { \msg_error:nnn { hooks } { exists } {#1} }
+ { \seq_gput_right:Nn \g__hook_all_seq {#1}
+ \tl_new:c { g__hook_#1_code_tl }
+ \__hook_declare:n {#1}
+ \clist_new:c {g__hook_#1_labels_clist}
+ \tl_new:c { g__hook_#1_reversed_tl }
+ \__hook_include_legacy_code_chunk:n {#1}
+ }
+}
+\cs_new_protected:Npn \__hook_declare:n #1
+ {
+ \__hook_if_exist:nF {#1}
+ {
+ \prop_new:c { g__hook_#1_code_prop }
+ \tl_new:c { g__hook_#1_code_next_tl }
+ }
+ }
+\cs_new_protected:Npn \hook_new_reversed:n #1 {
+ \hook_new:n {#1}
+ \tl_gset:cn { g__hook_#1_reversed_tl } { - }
+}
+\cs_new_protected:Npn \hook_new_pair:nn #1#2 {
+ \hook_new:n {#1} \hook_new_reversed:n {#2}
+}
+\cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1
+ {
+ \debug_suspend:
+ \tl_if_exist:cT { @#1hook }
+ {
+ \tl_if_empty:cF { @#1hook }
+ {
+ \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1}
+ { legacy } { @#1hook }
+ \tl_gclear:c { @#1hook }
+ }
+ }
+ \debug_resume:
+ }
+\cs_new:Npn \__hook_parse_label_default:nn #1 #2
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__hook_currname_or_default:n {#2} }
+ { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nn {#2} }
+ }
+\cs_generate_variant:Nn \__hook_parse_label_default:nn { V }
+\cs_new:Npn \__hook_parse_dot_label:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \msg_expandable_error:nnn { hooks } { empty-label } {#2}
+ #2
+ }
+ {
+ \str_if_eq:nnTF {#1} { . }
+ { \__hook_currname_or_default:n {#1} }
+ { \__hook_parse_dot_label:nw {#2} #1 ./ \s__hook_mark }
+ }
+ }
+\cs_new:Npn \__hook_parse_dot_label:nw #1 #2 ./ #3 \s__hook_mark
+ {
+ \tl_if_empty:nTF {#2}
+ { \__hook_parse_dot_label_aux:nw {#1} #3 \s__hook_mark }
+ {
+ \tl_if_empty:nTF {#3}
+ {#2}
+ { \__hook_parse_dot_label_cleanup:w #2 ./ #3 \s__hook_mark }
+ }
+ }
+\cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1}
+\cs_new:Npn \__hook_parse_dot_label_aux:nw #1 #2 ./ \s__hook_mark
+ { \__hook_currname_or_default:n {#1} / #2 }
+\cs_new:Npn \__hook_currname_or_default:n #1
+ {
+ \tl_if_empty:NTF \g__hook_hook_curr_name_tl
+ {
+ \tl_if_empty:NTF \@currname
+ {#1}
+ { \@currname }
+ }
+ { \g__hook_hook_curr_name_tl }
+ }
+\cs_new_protected:Npn \hook_gput_code:nnn #1 #2
+ {
+ \exp_args:Nxx \__hook_gput_code:nnn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3
+ {
+ \__hook_if_marked_removal:nnTF {#1} {#2}
+ { \__hook_unmark_removal:nn {#1} {#2} }
+ {
+ \hook_if_exist:nTF {#1}
+ {
+ \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
+ \__hook_update_hook_code:n {#1}
+ }
+ { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} }
+ }
+ }
+\cs_generate_variant:Nn \__hook_gput_code:nnn { nxv }
+\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3
+ {
+ \__hook_debug:n{\iow_term:x{****~ Add~ to~
+ \hook_if_exist:nF {#1} { undeclared~ }
+ hook~ #1~ (#2)
+ \on@line\space <-~ \tl_to_str:n{#3}} }
+ \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
+ {
+ \prop_gput:cno { g__hook_#1_code_prop } {#2}
+ { \l__hook_return_tl #3 }
+ }
+ { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} }
+ }
+\cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3
+ {
+ \__hook_declare:n {#1}
+ \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1
+ {
+ \__hook_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1
+ {
+ \__hook_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_next_code:nn \__hook_gput_next_do:nn
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1
+ {
+ \__hook_if_file_hook:wTF #1 / / \s__hook_mark
+ {
+ \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn
+ { \exp_args:Ne \__hook_file_hook_normalize:n {#1} }
+ }
+ { \__hook_try_declaring_generic_hook_split:nNNnn {#1} }
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3
+ {
+ \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1}
+ { #2 }
+ { #3 } {#1}
+ }
+\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn
+ #1 / #2 / #3 / #4 \scan_stop: #5 { TF }
+ {
+ \tl_if_empty:nTF {#2}
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c__hook_generics_prop {#1}
+ {
+ \hook_if_exist:nF {#5} { \hook_new:n {#5} }
+ \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2}
+ { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
+ {
+ \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3}
+ { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
+ }
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+ }
+\prg_new_conditional:Npnn \__hook_if_file_hook:w
+ #1 / #2 / #3 \s__hook_mark { TF }
+ {
+ \str_if_eq:nnTF {#1} { file }
+ {
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:n {#3} }
+ { \str_if_eq_p:nn {#3} { / } }
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c__hook_generics_file_prop {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_false: }
+ }
+\cs_new:Npn \__hook_file_hook_normalize:n #1
+ { \__hook_strip_double_slash:n {#1} }
+\cs_new:Npn \__hook_strip_double_slash:n #1
+ { \__hook_strip_double_slash:w #1 // \s__hook_mark }
+\cs_new:Npn \__hook_strip_double_slash:w #1 // #2 \s__hook_mark
+ {
+ \tl_if_empty:nTF {#2}
+ {#1}
+ { \__hook_strip_double_slash:w #1 / #2 \s__hook_mark }
+ }
+\prop_const_from_keyval:Nn \c__hook_generics_prop
+ {env=,file=,package=,class=,include=}
+\prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=}
+\prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=}
+\prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=}
+\cs_new_protected:Npn \hook_gremove_code:nn #1 #2
+ {
+ \exp_args:Nxx \__hook_gremove_code:nn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2
+ {
+ \__hook_if_exist:nTF {#1}
+ {
+ \str_if_eq:nnTF {#2} {*}
+ { \prop_gclear:c { g__hook_#1_code_prop } }
+ {
+ \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
+ { \__hook_gremove_code_do:nn }
+ { \__hook_mark_removal:nn }
+ {#1} {#2}
+ }
+ \hook_if_exist:nT {#1}
+ { \__hook_update_hook_code:n {#1} }
+ }
+ { \__hook_mark_removal:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_gremove_code_do:nn #1 #2
+ { \prop_gremove:cn { g__hook_#1_code_prop } {#2} }
+\cs_new_protected:Npn \__hook_mark_removal:nn #1 #2
+ {
+ \tl_gput_right:Nx \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_unmark_removal:nn #1 #2
+ {
+ \tl_gremove_once:Nx \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ }
+\prg_new_protected_conditional:Npnn \__hook_if_marked_removal:nn #1 #2 { TF }
+ {
+ \exp_args:NNx \tl_if_in:NnTF \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ { \prg_return_true: } { \prg_return_false: }
+ }
+\cs_new:Npn \__hook_removal_tl:nn #1 #2
+ { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ }
+\prop_new:c {g__hook_??_code_prop}
+\prop_new:c {g__hook_??_code_tl}
+\tl_new:c {g__hook_??_reversed_tl}
+\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4
+ {
+ \use:x
+ {
+ \__hook_gset_rule:nnnn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ {#3}
+ { \__hook_parse_label_default:nn {#4} { top-level } }
+ }
+ }
+\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4
+ {
+ \__hook_declare:n {#1}
+ \__hook_rule_gclear:nnn {#1} {#2} {#4}
+ \debug_suspend:
+ \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn }
+ {
+ {#1} {#2} {#4}
+ \__hook_update_hook_code:n {#1}
+ }
+ { \msg_error:nnnnnn { hooks } { unknown-rule }
+ {#1} {#2} {#3} {#4} }
+ \debug_resume:
+ }
+\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } }
+ }
+\cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn
+\cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl }
+ { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } }
+ }
+\cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn
+\cs_new_protected:Npn \__hook_rule_voids_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } }
+ }
+\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3
+ { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } }
+\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3
+ { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } }
+\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { }
+\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3
+ { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } }
+\cs_new:Npn \__hook_label_pair:nn #1#2
+ {
+ \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f:
+ #1 | #1 % 0
+ \or: #1 | #2 % +1
+ \else: #2 | #1 % -1
+ \fi:
+ }
+\prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF }
+ {
+ \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f:
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi:
+ }
+\cs_new:Npn \__hook_if_label_case:nnnnn #1#2
+ {
+ \cs:w use_
+ \if_case:w \__hook_str_compare:nn {#1} {#2}
+ i \or: ii \else: iii \fi: :nnn
+ \cs_end:
+ }
+\cs_new_eq:NN \__hook_update_hook_code:n \use_none:n
+\cs_new_protected:Npn \__hook_initialize_all: {
+ \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n
+ \__hook_debug:n { \prop_gclear:N \g__hook_used_prop }
+ \seq_map_inline:Nn \g__hook_all_seq
+ {
+ \__hook_update_hook_code:n {##1}
+ }
+ \__hook_debug:n
+ { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:}
+ \prop_map_inline:Nn \g__hook_used_prop
+ { \iow_term:x{^^J~ ##1~ ->~
+ \exp_not:v {g__hook_##1_code_tl}~ }
+ }
+ }
+ \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n
+ \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n
+}
+\cs_new_protected:Npn \__hook_initialize_hook_code:n #1 {
+ \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
+ '#1' \on@line :^^J} }
+ \__hook_include_legacy_code_chunk:n {#1}
+ \hook_if_exist:nT {#1}
+ {
+ \prop_if_empty:cTF {g__hook_#1_code_prop}
+ { \tl_gset:co {g__hook_#1_code_tl}
+ {\cs:w g__hook_#1_code_next_tl \cs_end: } }
+ {
+ \__hook_if_reversed:nTF {#1}
+ { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_left:NV
+ \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV }
+ { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_right:NV
+ \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV }
+ \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop }
+ \__hook_initialize_single:cccn
+ { g__hook_#1_code_tl } { g__hook_#1_code_next_tl }
+ { g__hook_#1_labels_clist } {#1}
+ \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn
+ \g__hook_used_prop {#1}{} }
+ }
+ }
+}
+\prop_new:N\g__hook_used_prop
+\cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl }
+\cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq }
+\seq_new:N \l__hook_labels_seq
+\int_new:N \l__hook_labels_int
+\tl_new:N \l__hook_front_tl
+\tl_new:N \l__hook_rear_tl
+\tl_new:c { \__hook_tl_csname:n { 0 } }
+\cs_new_protected:Npn \__hook_initialize_single:NNNn #1#2#3#4 {
+ \debug_suspend:
+ \seq_clear:N \l__hook_labels_seq
+ \int_zero:N \l__hook_labels_int
+ \tl_set:Nn \l__hook_cur_hook_tl {#4}
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \int_incr:N \l__hook_labels_int
+ \seq_put_right:Nn \l__hook_labels_seq {##1}
+ \tl_set:cn { \__hook_tl_csname:n {##1} }{0}
+ \seq_clear_new:c { \__hook_seq_csname:n {##1} }
+ }
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_apply_label_pair:nnn {##1} {####1} }
+ { \__hook_apply_label_pair:nnn {####1} {##1} }
+ {#4}
+ }
+ }
+ \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop }
+ \tl_set:Nn \l__hook_rear_tl { 0 }
+ \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 }
+ \seq_map_inline:Nn \l__hook_labels_seq
+ {
+ \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1}
+ \tl_set:Nn \l__hook_rear_tl {##1}
+ }
+ }
+ \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } }
+ \tl_gclear:N #1
+ \clist_gclear:N #3
+ \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } }
+ {
+ \int_decr:N \l__hook_labels_int
+ \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl
+ \__hook_tl_gput:NV #1 \l__hook_return_tl
+ \__hook_clist_gput:NV #3 \l__hook_front_tl
+ \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} }
+ \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } }
+ {
+ \tl_set:cx { \__hook_tl_csname:n {##1} }
+ { \int_eval:n
+ { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 }
+ }
+ \int_compare:nNnT
+ { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1}
+ \tl_set:Nn \l__hook_rear_tl {##1}
+ }
+ }
+ \tl_set_eq:Nc \l__hook_front_tl
+ { \__hook_tl_csname:n { \l__hook_front_tl } }
+ }
+ \int_compare:nNnF \l__hook_labels_int = 0
+ {
+ \iow_term:x{====================}
+ \iow_term:x{Error:~ label~ rules~ are~ incompatible:}
+ \__hook_debug_label_data:N \l__hook_work_prop
+ \iow_term:x{====================}
+ }
+ \tl_gput_right:Nn #1 {#2}
+ \debug_resume:
+}
+\cs_generate_variant:Nn \__hook_initialize_single:NNNn {ccc}
+\cs_new:Npn \__hook_tl_gput:NV {\ERROR}
+\cs_new:Npn \__hook_clist_gput:NV {\ERROR}
+\cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3
+ {
+ \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3}
+ {
+ \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { }
+ }
+ }
+\cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3
+ {
+ \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end:
+ \__hook_apply_rule:nnn {#1} {#2} {#3}
+ \exp_after:wN \use_none:n
+ \else:
+ \use:nn
+ \fi:
+ }
+\cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3
+ {
+ \cs:w __hook_apply_
+ \cs:w g__hook_#3_reversed_tl \cs_end: rule_
+ \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end:
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \__hook_tl_csname:n {#2} }
+ { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } }
+ \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \__hook_tl_csname:n {#1} }
+ { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } }
+ \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_error:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 1 }
+ \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3}
+ \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_warning:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 0 }
+ }
+\cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3
+ {
+ \__hook_debug:n
+ {
+ \__hook_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#2'~ code~ from~
+ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~
+ because~ of~ '#1' }
+ }
+ \prop_put:Nnn \l__hook_work_prop {#2} { }
+ }
+\cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3
+ {
+ \__hook_debug:n
+ {
+ \__hook_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#1'~ code~ from~
+ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~
+ because~ of~ '#2' }
+ }
+ \prop_put:Nnn \l__hook_work_prop {#1} { }
+ }
+\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
+\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
+ {
+ \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
+ rule~ \__hook_label_pair:nn {#1} {#2}:~
+ \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~
+ found}
+ }
+\cs_new_protected:Npn \__hook_debug_label_data:N #1 {
+ \iow_term:x{Code~ labels~ for~ sorting:}
+ \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} }
+ \iow_term:x{^^J Data~ structure~ for~ label~ rules:}
+ \prop_map_inline:Nn #1
+ {
+ \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~
+ \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~}
+ }
+ }
+ \iow_term:x{}
+}
+\cs_new_protected:Npn \hook_log:n #1
+ {
+ \exp_args:Nx \__hook_log:n
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_log:n #1
+ {
+ \__hook_preamble_hook:n {#1}
+ \iow_term:x{^^JThe~ hook~ '#1':}
+ \hook_if_exist:nF {#1}
+ { \iow_term:x {~Hook~ is~ not~ declared!} }
+ \__hook_if_exist:nTF {#1}
+ {
+ \iow_term:x{~Code~ chunks:}
+ \prop_if_empty:cTF {g__hook_#1_code_prop}
+ { \iow_term:x{\@spaces ---} }
+ {
+ \prop_map_inline:cn {g__hook_#1_code_prop}
+ { \iow_term:x{\@spaces ##1~ ->~ \tl_to_str:n{##2} } }
+ }
+ \iow_term:x{~Extra~ code~ next~ invocation:}
+ \iow_term:x{\@spaces
+ \tl_if_empty:cTF { g__hook_#1_code_next_tl }
+ {---}
+ {->~ \exp_args:Nv
+ \__hook_log_next_code:n {g__hook_#1_code_next_tl} } }
+ \iow_term:x { ~Rules: }
+ \bool_set_true:N \l__hook_tmpa_bool
+ \__hook_list_rules:nn {#1}
+ {
+ \bool_set_false:N \l__hook_tmpa_bool
+ \iow_term:x
+ {
+ \@spaces ##2~ with~
+ \str_if_eq:nnT {##3} {??} { default~ }
+ relation~ ##1 }
+ }
+ \bool_if:NT \l__hook_tmpa_bool
+ { \iow_term:x { \@spaces --- } }
+ \bool_lazy_and:nnT
+ { \hook_if_exist_p:n {#1} }
+ { ! \hook_if_empty_p:n {#1} }
+ { \iow_term:x { ~Execution~ order
+ \bool_if:NTF \l__hook_tmpa_bool
+ { \__hook_if_reversed:nT {#1}
+ { ~ (after~ reversal) }
+ }
+ { ~ (after~
+ \__hook_if_reversed:nT {#1} {reversal~ and~}
+ applying~ rules)
+ }
+ :
+ }
+ \iow_term:x
+ { \@spaces \clist_use:cn {g__hook_#1_labels_clist} { ,~ } }
+ }
+ }
+ { \iow_term:n { ~The~hook~is~empty. } }
+ \iow_term:n { }
+ }
+\cs_new:Npn \__hook_log_next_code:n #1 {
+ \exp_args:No \tl_to_str:n {\use_none:nn #1}
+}
+\cs_new_protected:Npn \__hook_list_rules:nn #1 #2
+ {
+ \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_list_one_rule:nnn {##1} {####1} }
+ { \__hook_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
+ }
+ }
+\cs_new_protected:Npn \__hook_list_one_rule:nnn #1#2#3
+ {
+ \__hook_list_if_rule_exists:nnnF {#1} {#2} {#3} { }
+ { \__hook_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } }
+ }
+\cs_new_protected:Npn \__hook_list_if_rule_exists:nnnF #1#2#3
+ {
+ \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end:
+ \exp_args:Nv \__hook_tmp:w
+ { g__hook_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3}
+ \fi:
+ }
+\cs_new_protected:Npn \__hook_debug_print_rules:n #1
+ {
+ \iow_term:n { The~hook~#1~contains~the~rules: }
+ \cs_set_protected:Npn \__hook_tmp:w ##1
+ {
+ \__hook_list_rules:nn {#1}
+ {
+ \iow_term:x
+ {
+ > ##1 {####2} ##1 => ##1 {####1}
+ \str_if_eq:nnT {####3} {??} { ~(default) }
+ }
+ }
+ }
+ \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } }
+ }
+\cs_new_protected:Npn \hook_gput_next_code:nn #1
+ {
+ \exp_args:Nx \__hook_gput_next_code:nn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2
+ {
+ \__hook_declare:n {#1}
+ \hook_if_exist:nTF {#1}
+ { \__hook_gput_next_do:nn {#1} {#2} }
+ { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_gput_next_do:nn #1
+ {
+ \exp_args:Nc \__hook_gput_next_do:Nnn
+ { g__hook_#1_code_next_tl } {#1}
+ }
+\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2
+ {
+ \tl_if_empty:cT { g__hook_#2_code_tl }
+ { \__hook_update_hook_code:n {#2} }
+ \tl_if_empty:NT #1
+ { \tl_gset:Nn #1 { \tl_gclear:c { g__hook_#2_code_next_tl } } }
+ \tl_gput_right:Nn #1
+ }
+\cs_new_protected:Npn \hook_use:n #1
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ {
+ \__hook_preamble_hook:n {#1}
+ \cs:w g__hook_#1_code_tl \cs_end:
+ }
+ { \__hook_use:wn #1 / \s__hook_mark {#1} }
+ }
+\cs_new:Npn \__hook_use_initialized:n #1
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ { \cs:w g__hook_#1_code_tl \cs_end: }
+ { \__hook_use:wn #1 / \s__hook_mark {#1} }
+ }
+\cs_new_protected:Npn \__hook_preamble_hook:n #1
+ { \__hook_initialize_hook_code:n {#1} }
+\cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3
+ {
+ \str_if_eq:nnTF {#1} { file }
+ { \__hook_try_file_hook:n {#3} }
+ { } % Hook doesn't exist
+ }
+\cs_new_protected:Npn \__hook_try_file_hook:n #1
+ {
+ \__hook_if_file_hook:wTF #1 / / \s__hook_mark
+ {
+ \exp_args:Ne \__hook_if_exist_use:n
+ { \exp_args:Ne \__hook_file_hook_normalize:n {#1} }
+ }
+ { \__hook_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before)
+ }
+\cs_new_protected:Npn \__hook_if_exist_use:n #1
+ {
+ \tl_if_exist:cT { g__hook_#1_code_tl }
+ {
+ \__hook_preamble_hook:n {#1}
+ \cs:w g__hook_#1_code_tl \cs_end:
+ }
+ }
+\cs_new_protected:Npn \hook_use_once:n #1
+ {
+ \tl_if_exist:cT { g__hook_#1_code_tl }
+ {
+ \clist_gput_left:Nn \g__hook_execute_immediately_clist {#1}
+ \hook_use:n {#1}
+ }
+ }
+\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF }
+ {
+ \__hook_if_exist:nTF {#1}
+ {
+ \bool_lazy_and:nnTF
+ { \prop_if_empty_p:c { g__hook_#1_code_prop } }
+ { \tl_if_empty_p:c { g__hook_#1_code_next_tl } }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ { \prg_return_true: }
+ }
+\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF }
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\prg_new_conditional:Npnn \__hook_if_exist:n #1 { p , T , F , TF }
+ {
+ \prop_if_exist:cTF { g__hook_#1_code_prop }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF }
+ {
+ \if_int_compare:w \cs:w g__hook_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\clist_new:N \g__hook_execute_immediately_clist
+\msg_new:nnnn { hooks } { labels-incompatible }
+ {
+ Labels~`#1'~and~`#2'~are~incompatible
+ \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~
+ \int_compare:nNnTF {#4} = { 1 }
+ { The~ code~ for~ both~ labels~ will~ be~ dropped. }
+ { You~ may~ see~ errors~ later. }
+ }
+ { LaTeX~found~two~incompatible~labels~in~the~same~hook.~
+ This~indicates~an~incompatibility~between~packages. }
+\msg_new:nnnn { hooks } { exists }
+ { Hook~`#1'~ has~ already~ been~ declared. }
+ { There~ already~ exists~ a~ hook~ declaration~ with~ this~
+ name.\\
+ Please~ use~ a~ different~ name~ for~ your~ hook.}
+\msg_new:nnn { hooks } { empty-label }
+ { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. }
+\msg_new:nnnn { hooks } { unknown-rule }
+ { Unknown~ relationship~ `#3'~
+ between~ labels~ `#2'~ and~ `#4'~
+ \str_if_eq:nnF {#1} {??} { ~in~hook~`#1' }. ~
+ Perhaps~ a~ missspelling?
+ }
+ {
+ The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~
+ `before'~ or~ `<',~
+ `after'~ or~ `>',~
+ `incompatible-warning',~
+ `incompatible-error',~
+ `voids'~ or~
+ `unrelated'.
+ }
+\msg_new:nnn { hooks } { should-not-happen }
+ {
+ ERROR!~This~should~not~happen.~#1 \\
+ Please~report~at~https://github.com/latex3/latex2e.
+ }
+\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} }
+\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} }
+\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} }
+\NewDocumentCommand \AddToHook { m o +m }
+ {
+ \clist_if_in:NnTF \g__hook_execute_immediately_clist {#1}
+ {#3}
+ { \hook_gput_code:nnn {#1} {#2} {#3} }
+ }
+\NewDocumentCommand \AddToHookNext { m +m }
+ { \hook_gput_next_code:nn {#1} {#2} }
+\NewDocumentCommand \RemoveFromHook { m o }
+ { \hook_gremove_code:nn {#1} {#2} }
+\seq_gpush:Nn \g__hook_name_stack_seq { }
+\cs_new_protected:Npn \__hook_curr_name_push:n #1
+ {
+ \seq_gpush:Nn \g__hook_name_stack_seq {#1}
+ \tl_gset:Nn \g__hook_hook_curr_name_tl {#1}
+ }
+\cs_new_protected:Npn \__hook_curr_name_pop:
+ {
+ \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
+ \seq_get:NNTF \g__hook_name_stack_seq \l__hook_return_tl
+ { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~default~label~stack. }
+ }
+ }
+\NewDocumentCommand \DeclareDefaultHookLabel { m }
+ {
+ \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
+ \__hook_curr_name_push:n {#1}
+ }
+\newcommand \UseHook { \hook_use:n }
+\newcommand \UseOneTimeHook { \hook_use_once:n }
+\cs_new_protected:Npn \ShowHook { \hook_log:n }
+\cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: }
+\cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: }
+\NewDocumentCommand \DeclareHookRule { m m m m }
+ { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} }
+\NewDocumentCommand \DeclareDefaultHookRule { m m m }
+ { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} }
+\@onlypreamble\DeclareDefaultHookRule
+\NewDocumentCommand \ClearHookRule { m m m }
+{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
+\NewExpandableDocumentCommand \IfHookExistsTF { m }
+ { \hook_if_exist:nTF {#1} }
+\NewExpandableDocumentCommand \IfHookEmptyTF { m }
+ { \hook_if_empty:nTF {#1} }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
+\cs_new_eq:NN \@expl@@@initialize@all@@
+ \__hook_initialize_all:
+\cs_new_eq:NN \@expl@@@hook@curr@name@push@@n
+ \__hook_curr_name_push:n
+\cs_new_eq:NN \@expl@@@hook@curr@name@pop@@
+ \__hook_curr_name_pop:
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltalloc.dtx
\chardef\@xxxii=32
\mathchardef\@Mi=10001
@@ -1900,7 +3043,9 @@ Type H <return> for immediate help.}%
\newif\if@partsw \@partswfalse
\newcount\@clubpenalty
\@clubpenalty \clubpenalty
-\def\document{\endgroup
+\def\document{%
+ \UseOneTimeHook{begindocument/before}%
+ \@kernel@after@begindocument@before
\@expl@sys@load@backend@@
\ifx\@unusedoptionlist\@empty\else
\@latex@warning@no@line{Unused global option(s):^^J%
@@ -1940,8 +3085,9 @@ Type H <return> for immediate help.}%
\fi
\@noskipsecfalse
\let \@refundefined \relax
- \let\AtBeginDocument\@firstofone
- \@begindocumenthook
+ \@kernel@before@begindocument
+ \UseOneTimeHook{begindocument}%
+ \@kernel@after@begindocument
\ifdim\topskip<1sp\global\topskip 1sp\relax\fi
\global\@maxdepth\maxdepth
\global\let\@begindocumenthook\@undefined
@@ -1953,7 +3099,19 @@ Type H <return> for immediate help.}%
\@preamblecmds
\global\let \@nodocument \relax
\global\let\do\noexpand
+ \UseOneTimeHook{begindocument/end}%
\ignorespaces}
+\NewHook{begindocument}
+\NewHook{begindocument/before}
+\NewHook{begindocument/end}
+
+\edef \@kernel@after@begindocument@before {%
+ \let\expandafter\noexpand\csname
+ g__hook_env/document/begin_code_tl\endcsname
+ \noexpand\@empty}
+\let \@kernel@before@begindocument \@empty
+\let \@kernel@after@begindocument \@empty
+
\@onlypreamble\document
\let\normalsfcodes\@empty
\def\nofiles{%
@@ -1975,30 +3133,39 @@ Type H <return> for immediate help.}%
\if@nobreak\ifvmode\nobreak\fi\fi
}
\let\@auxout=\@mainaux
+\def\include#1{\relax
+ \ifnum\@auxout=\@partaux
+ \@latex@error{\string\include\space cannot be nested}\@eha
+ \else
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
+ \expandafter\@include\expandafter{\@curr@file} % deliberate space
+ \fi}
\def\includeonly#1{%
\@partswtrue
\let\@partlist\@empty
\@for\reserved@a:=#1 \do
- {
- \expandafter\set@curr@file@trim@spaces\expandafter{\reserved@a}%
+ {%
+ \expandafter\set@curr@file\expandafter{\reserved@a}%
\ifx\@partlist\@empty
- \edef\@partlist{\@curr@file}%
+ \edef\@partlist{\@strip@tex@ext\@curr@file}%
\else
- \edef\@partlist{\@partlist,\@curr@file}%
+ \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}%
\fi
}%
}
\@onlypreamble\includeonly
-\def\include#1{\relax
- \ifnum\@auxout=\@partaux
- \@latex@error{\string\include\space cannot be nested}\@eha
- \else
- \set@curr@file@trim@spaces{#1}%
- \expandafter\@include\expandafter{\@curr@file} % deliberate space
- \fi}
-\def\set@curr@file@trim@spaces#1{%
- \@expl@tl@trim@spaces@apply@@nN {#1} \set@curr@file }
-
+\def\reserved@a#1{%
+\def\@strip@tex@ext##1{%
+ \expandafter\@strip@tex@ext@aux
+ ##1\@nil\@nil
+ #1\@nil\relax\@nnil}
+\def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{%
+ \ifx\relax##2\@empty
+ \expandafter\@cdr\expandafter\@empty\@cdr{}##1%
+ \else##1\fi}}%
+\expandafter\reserved@a
+\expandafter{\detokenize{.tex}}
\def\@include#1 {%
\clearpage
\if@filesw
@@ -2017,7 +3184,15 @@ Type H <return> for immediate help.}%
\immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}%
\fi
+ \@filehook@set@CurrentFile
+ \UseHook{include/before}%
+ \UseHook{include/before/#1}%
\@input@{#1.tex}%
+ \UseHook{include/end/#1}%
+ \UseHook{include/end}%
+ \clearpage
+ \UseHook{include/after/#1}%
+ \UseHook{include/after}%
\clearpage
\@writeckpt{#1}%
\if@filesw
@@ -2043,7 +3218,6 @@ Type H <return> for immediate help.}%
\gdef\@charlb[{]
\gdef\@charrb[}]
]% }brace matching
-
\def\set@curr@file#1{%
\begingroup
\escapechar\m@ne
@@ -2099,6 +3273,9 @@ Type H <return> for immediate help.}%
\edef\reserved@a{\noexpand\@missingfileerror
{\filename@area\filename@base}%
{\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+ \reserved@a
+ \edef\reserved@a{\noexpand\@iinput{%
+ \@missingfile@area\@missingfile@base.\@missingfile@ext}}%
\reserved@a}}
\def\@input#1{%
@@ -2112,20 +3289,27 @@ Type H <return> for immediate help.}%
{\endlinechar\m@ne
\global\read\m@ne to\@gtempa}%
\ifx\@gtempa\@empty
+ \let\@missingfile@area\@empty
+ \let\@missingfile@base\@empty
+ \def\@missingfile@ext{tex}%
\else
- \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
- \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+ \def\reserved@b{\batchmode\read-1 to \reserved@a}%
+ \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi
+ \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi
\filename@parse\@gtempa
\edef\filename@ext{%
\ifx\filename@ext\relax#2\else\filename@ext\fi}%
\edef\reserved@a{%
- \noexpand\InputIfFileExists
+ \noexpand\IfFileExists
{\filename@area\filename@base.\filename@ext}%
- {}%
+ {\def\noexpand\@missingfile@area{\filename@area}%
+ \def\noexpand\@missingfile@base{\filename@base}%
+ \def\noexpand\@missingfile@ext {\filename@ext}}%
{\noexpand\@missingfileerror
{\filename@area\filename@base}{\filename@ext}}}%
\reserved@a
- \fi}
+ \fi
+}
\def\@obsoletefile#1#2{%
\@latex@warning@no@line{inputting `#1' instead of obsolete `#2'}}
\@onlypreamble\@obsoletefile
@@ -2272,7 +3456,7 @@ Type H <return> for immediate help.}%
\reserved@a ^^@}}
\catcode\z@=15\relax
\@onlypreamble\DeclareTextComposite
-\DeclareRobustCommand\UseTextAccent[3]{%
+\DeclareRobustCommand*\UseTextAccent[3]{%
\hmode@start@before@group
{%
\let\hmode@start@before@group\@firstofone
@@ -2280,7 +3464,7 @@ Type H <return> for immediate help.}%
\@use@text@encoding{#1}%
#2{\@use@text@encoding\@curr@enc#3}%
}}
-\DeclareRobustCommand\UseTextSymbol[2]{%
+\DeclareRobustCommand*\UseTextSymbol[2]{%
\hmode@start@before@group
{%
\def\@wrong@font@char{\MessageBreak
@@ -3629,6 +4813,8 @@ Type H <return> for immediate help.}%
{\not@math@alphabet\sscshape\relax
\fontshape\sscdefault\selectfont}%
}
+\g@addto@macro\@kernel@after@begindocument@before
+ {\reinstall@nfss@defs\init@series@setup}
%%% From File: ltfsstrc.dtx
%% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf.
%% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved.
@@ -4844,75 +6030,6 @@ Type H <return> for immediate help.}%
\def\mdseries@sf{m}
\def\mdseries@tt{m}
-\def\expand@font@defaults{%
- \edef\rmdef@ult{\rmdefault}%
- \edef\sfdef@ult{\sfdefault}%
- \edef\ttdef@ult{\ttdefault}%
- \series@maybe@drop@one@m\bfdefault\bfdef@ult
- \series@maybe@drop@one@m\mddefault\mddef@ult
- \@expandfontdefaultshook
-}
-
-\DeclareRobustCommand\bfseries{%
- \not@math@alphabet\bfseries\mathbf
- \expand@font@defaults
- \ifx\bfdefault\bfdefault@previous\else
- \expandafter\def\expandafter\bfdefault
- \expandafter{\bfdefault\@empty}%
- \let\bfseries@previous\bfdefault
- \let\bfseries@rm\bfdef@ult
- \let\bfseries@sf\bfdef@ult
- \let\bfseries@tt\bfdef@ult
- \@setbfseriesdefaultshook
- \fi
- \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
- \else \fontseries\bfdefault
- \fi\fi\fi
- \selectfont
-}
-
-\DeclareRobustCommand\mdseries{%
- \not@math@alphabet\mdseries\relax
- \expand@font@defaults
- \ifx\mddefault\mddefault@previous\else
- \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
- \let\mdseries@previous\mddefault
- \let\mdseries@rm\mddef@ult
- \let\mdseries@sf\mddef@ult
- \let\mdseries@tt\mddef@ult
- \@setmdseriesdefaultshook
- \fi
- \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
- \else \fontseries\mddefault
- \fi\fi\fi
- \selectfont
-}
-
-\DeclareRobustCommand\rmfamily{%
- \not@math@alphabet\rmfamily\mathrm
- \prepare@family@series@update{rm}\rmdefault
- \@rmfamilyhook
- \selectfont}
-\DeclareRobustCommand\sffamily{%
- \not@math@alphabet\sffamily\mathsf
- \prepare@family@series@update{sf}\sfdefault
- \@sffamilyhook
- \selectfont}
-\DeclareRobustCommand\ttfamily{%
- \not@math@alphabet\ttfamily\mathtt
- \prepare@family@series@update{tt}\ttdefault
- \@ttfamilyhook
- \selectfont}
-\let\@expandfontdefaultshook\@empty
-\let\@setbfseriesdefaultshook\@empty
-\let\@setmdseriesdefaultshook\@empty
-\let\@rmfamilyhook\@empty
-\let\@sffamilyhook\@empty
-\let\@ttfamilyhook\@empty
\def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}}
\def\prepare@family@series@update#1#2{%
\if@forced@series
@@ -4964,13 +6081,16 @@ Type H <return> for immediate help.}%
}
\def\init@series@setup{%
\ifx\bfseries@rm@kernel\bfseries@rm
- \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\rmdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@rm{b}\fi\fi
\ifx\bfseries@sf@kernel\bfseries@sf
- \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\sfdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@sf{b}\fi\fi
\ifx\bfseries@tt@kernel\bfseries@tt
- \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\ttdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@tt{b}\fi\fi
\reset@font
\ifx\seriesdefault\seriesdefault@kernel
@@ -4979,6 +6099,85 @@ Type H <return> for immediate help.}%
\fi
}%
\expandafter\let\csname ver@mweights.sty\endcsname\fmtversion
+
+\def\expand@font@defaults{%
+ \edef\rmdef@ult{\rmdefault}%
+ \edef\sfdef@ult{\sfdefault}%
+ \edef\ttdef@ult{\ttdefault}%
+ \series@maybe@drop@one@m\bfdefault\bfdef@ult
+ \series@maybe@drop@one@m\mddefault\mddef@ult
+ \UseHook{expand@font@defaults}%
+}
+
+\DeclareRobustCommand\bfseries{%
+ \not@math@alphabet\bfseries\mathbf
+ \expand@font@defaults
+ \ifx\bfdefault\bfdefault@previous\else
+ \expandafter\def\expandafter\bfdefault
+ \expandafter{\bfdefault\@empty}%
+ \let\bfseries@previous\bfdefault
+ \let\bfseries@rm\bfdef@ult
+ \let\bfseries@sf\bfdef@ult
+ \let\bfseries@tt\bfdef@ult
+ \UseHook{bfseries/defaults}%
+ \fi
+ \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
+ \else \fontseries\bfdefault
+ \fi\fi\fi
+ \UseHook{bfseries}%
+ \selectfont
+}
+
+\DeclareRobustCommand\mdseries{%
+ \not@math@alphabet\mdseries\relax
+ \expand@font@defaults
+ \ifx\mddefault\mddefault@previous\else
+ \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
+ \let\mdseries@previous\mddefault
+ \let\mdseries@rm\mddef@ult
+ \let\mdseries@sf\mddef@ult
+ \let\mdseries@tt\mddef@ult
+ \UseHook{mdseries/defaults}%
+ \fi
+ \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
+ \else \fontseries\mddefault
+ \fi\fi\fi
+ \UseHook{mdseries}%
+ \selectfont
+}
+
+\DeclareRobustCommand\rmfamily{%
+ \not@math@alphabet\rmfamily\mathrm
+ \prepare@family@series@update{rm}\rmdefault
+ \UseHook{rmfamily}%
+ \selectfont}
+\DeclareRobustCommand\sffamily{%
+ \not@math@alphabet\sffamily\mathsf
+ \prepare@family@series@update{sf}\sfdefault
+ \UseHook{sffamily}%
+ \selectfont}
+\DeclareRobustCommand\ttfamily{%
+ \not@math@alphabet\ttfamily\mathtt
+ \prepare@family@series@update{tt}\ttdefault
+ \UseHook{ttfamily}%
+ \selectfont}
+\NewHook{rmfamily}
+\NewHook{sffamily}
+\NewHook{ttfamily}
+\NewHook{normalfont}
+\NewHook{expand@font@defaults}
+\NewHook{bfseries}
+\NewHook{bfseries/defaults}
+\NewHook{mdseries}
+\NewHook{mdseries/defaults}
+\let\@rmfamilyhook\@empty
+\let\@sffamilyhook\@empty
+\let\@ttfamilyhook\@empty
+\let\@defaulfamilyhook\@empty
\DeclareRobustCommand\IfFontSeriesContextTF[1]{%
\expand@font@defaults
\@font@series@contextfalse
@@ -5088,10 +6287,11 @@ Type H <return> for immediate help.}%
\edef\f@family{\familydefault}%
\edef\f@series{\seriesdefault}%
\edef\f@shape{\shapedefault}%
- \@defaultfamilyhook
+ \UseHook{normalfont}%
+ \@defaultfamilyhook % hookname from 2020/02 will vanish
\selectfont}
\let\reset@font\normalfont
-\let\@defaultfamilyhook\@empty
+\let\@defaultfamilyhook\@empty %FMi sort out
\def\not@base#1{\@latex@error
{Command \noexpand#1not provided in base LaTeX2e}%
{Load the latexsym or the amsfonts package to
@@ -5830,6 +7030,7 @@ Type H <return> for immediate help.}%
\protected@write\@auxout{}%
{\string\newlabel{#1}{{\@currentlabel}{\thepage}}}%
\@esphack}
+\def\@currentcounter{}
\def\refstepcounter#1{\stepcounter{#1}%
\edef\@currentcounter{#1}%
\protected@edef\@currentlabel
@@ -5847,10 +7048,12 @@ Type H <return> for immediate help.}%
\@ignorefalse
\let\ignorespacesafterend\@ignoretrue
\def\enddocument{%
- \let\AtEndDocument\@firstofone
- \@enddocumenthook
+ \UseOneTimeHook{enddocument}%
+ \@kernel@after@enddocument
\@checkend{document}%
\clearpage
+ \UseOneTimeHook{enddocument/afterlastpage}%
+ \@kernel@after@enddocument@afterlastpage
\begingroup
\if@filesw
\immediate\closeout\@mainaux
@@ -5859,25 +7062,43 @@ Type H <return> for immediate help.}%
\@tempswafalse
\makeatletter \@@input\jobname.aux
\fi
- \@dofilelist
- \ifdim \font@submax >\fontsubfuzz\relax
- \@font@warning{Size substitutions with differences\MessageBreak
- up to \font@submax\space have occurred.\@gobbletwo}%
- \fi
- \@defaultsubs
- \@refundefined
- \if@filesw
- \ifx \@multiplelabels \relax
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \fi
- \else
- \@multiplelabels
- \fi
- \fi
+ \UseHook{enddocument/afteraux}%
+ \UseOneTimeHook{enddocument/info}%
\endgroup
+ \UseOneTimeHook{enddocument/end}%
\deadcycles\z@\@@end}
+\NewHook{enddocument}
+\NewHook{enddocument/afterlastpage}
+\NewHook{enddocument/afteraux}
+\NewHook{enddocument/info}
+\NewHook{enddocument/end}
+\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
+\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
+\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
+\let\@kernel@after@enddocument\@empty
+\let\@kernel@after@enddocument@afterlastpage\@empty
+\def\@enddocument@kernel@warnings{%
+ \ifdim \font@submax >\fontsubfuzz\relax
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+ \@defaultsubs
+ \@refundefined
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \ifx \@extra@page@added \relax
+ \@latex@warning@no@line{Temporary extra page added at the end.
+ Rerun to get it removed}%
+ \fi
+ \fi
+}
\def\@testdef #1#2#3{%
\def\reserved@a{#3}\expandafter \ifx \csname #1@#2\endcsname
\reserved@a \else \@tempswatrue \fi}
@@ -5908,14 +7129,24 @@ Type H <return> for immediate help.}%
\def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end}
\everypar{\@nodocument} %% To get an error if text appears before the
\nullfont %% \begin{document}
-\DeclareRobustCommand\begin[1]{%
+\DeclareRobustCommand*\begin[1]{%
+ \UseHook{env/#1/before}%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
{\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
+ \edef\@currenvline{\on@line}%
+ \@execute@begin@hook{#1}%
+ \csname #1\endcsname}}%
\@ignorefalse
\begingroup\@endpefalse\reserved@a}
+\def\@execute@begin@hook #1{%
+ \expandafter\ifx\csname #1\endcsname\document
+ \endgroup
+ \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}%
+ \@expl@@@initialize@all@@
+ \fi
+ \UseHook{env/#1/begin}%
+}
\edef\end
{\unexpanded{%
\romannumeral
@@ -5935,12 +7166,22 @@ Type H <return> for immediate help.}%
\expandafter\noexpand\csname end \endcsname
}
\@namedef{end }#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \if@ignore\@ignorefalse\ignorespaces\fi}
+ \romannumeral
+ \IfHookEmptyTF{env/#1/end}%
+ {\expandafter\z@}%
+ {\z@\UseHook{env/#1/end}}%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \UseHook{env/#1/after}%
+ \if@ignore\@ignorefalse\ignorespaces\fi
+}
\def\@checkend#1{\def\reserved@a{#1}\ifx
\reserved@a\@currenvir \else\@badend{#1}\fi}
\let\@currenvline\@empty
+\newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]}
+\newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]}
+\newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]}
+\newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]}
\message{center,}
\protected\def\@centercr{\ifhmode \unskip\else \@nolnerr\fi
\par\@ifstar{\nobreak\@xcentercr}\@xcentercr}
@@ -6164,13 +7405,13 @@ Type H <return> for immediate help.}%
\setbox\z@\hbox{$\m@th#1{#2}$}\finsm@sh}
\def\finsm@sh{\ht\z@\z@ \dp\z@\z@ \leavevmode@ifvmode\box\z@}
\def\buildrel#1\over#2{\mathrel{\mathop{\kern\z@#2}\limits^{#1}}}
-\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
-\DeclareRobustCommand\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
\ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
\mathstrut\crcr\noalign{\kern-\baselineskip}
#1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
-\DeclareRobustCommand\pmatrix[1]{\left(\matrix{#1}\right)}
+\DeclareRobustCommand*\pmatrix[1]{\left(\matrix{#1}\right)}
\def\bordermatrix#1{\begingroup \m@th
\@tempdima 8.75\p@
\setbox\z@\vbox{%
@@ -6610,7 +7851,8 @@ Type H <return> for immediate help.}%
\def\@makepicbox(#1,#2){%
\@ifnextchar[{\@imakepicbox(#1,#2)}{\@imakepicbox(#1,#2)[]}}
\long\def\@imakepicbox(#1,#2)[#3]#4{%
- \vbox to#2\unitlength
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \vbox to\@tempdimc
{\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
\let\mb@t\vss
\@tfor\reserved@a :=#3\do{%
@@ -6620,7 +7862,8 @@ Type H <return> for immediate help.}%
\expandafter\let\csname mb@\reserved@a\endcsname\relax
\fi}%
\mb@t
- \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \hb@xt@\@tempdimc{\mb@l #4\mb@r}%
\mb@b
\kern\z@}}
\let\set@color\relax
@@ -7231,33 +8474,44 @@ Type H <return> for immediate help.}%
\newdimen\unitlength \unitlength =1pt
\newbox\@picbox
\newdimen\@picht
+\def\@defaultunitsset#1#2#3{%
+ \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
\long\def\picture#1{\pictur@#1}
\def\pictur@(#1){%
\@ifnextchar({\@picture(#1)}{\@picture(#1)(0,0)}}
\def\@picture(#1,#2)(#3,#4){%
- \@picht#2\unitlength
- \setbox\@picbox\hb@xt@#1\unitlength\bgroup
- \hskip -#3\unitlength
- \lower #4\unitlength\hbox\bgroup
+ \@defaultunitsset\@picht{#2}\unitlength
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \setbox\@picbox\hb@xt@\@tempdimc\bgroup
+ \@defaultunitsset\@tempdimc{#3}\unitlength
+ \hskip -\@tempdimc
+ \@defaultunitsset\@tempdimc{#4}\unitlength
+ \lower\@tempdimc\hbox\bgroup
\ignorespaces}
\def\endpicture{%
\egroup\hss\egroup
\ht\@picbox\@picht\dp\@picbox\z@
\mbox{\box\@picbox}}
\long\def\put(#1,#2)#3{%
- \@killglue\raise#2\unitlength
- \hb@xt@\z@{\kern#1\unitlength #3\hss}%
+ \@killglue
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \raise\@tempdimc
+ \hb@xt@\z@{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \kern\@tempdimc
+ #3\hss}%
\ignorespaces}
\def\multiput(#1,#2)#3{%
- \@xdim #1\unitlength
- \@ydim #2\unitlength
+ \@defaultunitsset\@xdim{#1}\unitlength
+ \@defaultunitsset\@ydim{#2}\unitlength
\@multiput(}
\long\def\@multiput(#1,#2)#3#4{%
\@killglue\@multicnt #3\relax
\@whilenum \@multicnt >\z@\do
{\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
\advance\@multicnt\m@ne
- \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
+ \@defaultunitsset{\advance\@xdim}{#1}\unitlength
+ \@defaultunitsset{\advance\@ydim}{#2}\unitlength}%
\ignorespaces}
\def\@killglue{\unskip\@whiledim \lastskip >\z@\do{\unskip}}
\DeclareRobustCommand\thinlines{\let\@linefnt\tenln
@@ -7266,7 +8520,7 @@ Type H <return> for immediate help.}%
\DeclareRobustCommand\thicklines{\let\@linefnt\tenlnw
\let\@circlefnt\tencircw
\@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth}
-\DeclareRobustCommand\linethickness[1]
+\DeclareRobustCommand*\linethickness[1]
{\@wholewidth #1\relax \@halfwidth .5\@wholewidth \ignorespaces}
\def\shortstack{\@ifnextchar[\@shortstack{\@shortstack[c]}}
\def\@shortstack[#1]{%
@@ -7283,7 +8537,7 @@ Type H <return> for immediate help.}%
\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces}
\newif\if@negarg
\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
- \@linelen #3\unitlength
+ \@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@\@badlinearg\else
\ifnum\@xarg =\z@ \@vline
\else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
@@ -7341,7 +8595,7 @@ Type H <return> for immediate help.}%
\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
\@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
\ifnum\@tempcnta<5\relax
- \@linelen #3\unitlength
+ \@defaultunitsset\@linelen{#3}\unitlength
\ifdim\@linelen<\z@\@badlinearg\else
\ifnum\@xarg =\z@ \@vvector
\else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
@@ -7394,9 +8648,10 @@ Type H <return> for immediate help.}%
\hss}}
\def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
\lineskip \z@skip
-\@dashdim #2\unitlength
+\@defaultunitsset\@dashdim{#2}\unitlength
\@dashcnt \@dashdim \advance\@dashcnt 200
-\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
\ifodd\@dashcnt\@dashdim \z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
@@ -7408,15 +8663,19 @@ Type H <return> for immediate help.}%
\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
\multiply\@dashdim \thr@@
\fi
-\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
-\@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+\setbox\@dashbox \hbox{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc
+ \hskip\@tempdimc}%
+\@tempcnta\z@
\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
-\@dashdim #3\unitlength
+\@defaultunitsset\@dashdim{#3}\unitlength
\@dashcnt \@dashdim \advance\@dashcnt 200
-\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
\ifodd\@dashcnt \@dashdim \z@
\advance\@dashcnt \@ne \divide\@dashcnt \tw@
\else
@@ -7430,13 +8689,15 @@ Type H <return> for immediate help.}%
\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
\multiply\@dashdim \thr@@
\fi
-\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
-\@height #1\unitlength}\@tempcnta\z@
+\@defaultunitsset\@tempdimb{#1}\unitlength
+\setbox\@dashbox\hbox{%
+ \vrule \@width \@wholewidth \@height\@tempdimb}%
+\@tempcnta\z@
\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
-\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}\@tempcnta\z@
\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
-\do{\vskip #1\unitlength\copy\@dashbox\advance\@tempcnta \@ne }%
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
\vskip\@dashdim}}}\@makepicbox(#2,#3)}
\newif\if@ovt
\newif\if@ovb
@@ -7470,9 +8731,10 @@ Type H <return> for immediate help.}%
\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
\@ovvlinefalse \@ovhlinefalse
- \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
- \@ovxx #1\unitlength
- \@ovyy #2\unitlength
+ \@tfor\reserved@a :=#3\do{%
+ \csname @ov\reserved@a false\endcsname}%
+ \@defaultunitsset\@ovxx{#1}\unitlength
+ \@defaultunitsset\@ovyy{#2}\unitlength
\@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
\else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi
\advance \@tempdimb -2\p@
@@ -7507,7 +8769,8 @@ Type H <return> for immediate help.}%
\kern \@ovri}}
\def\circle{\@inmatherr\circle\@ifstar\@dot\@circle}
\def\@circle#1{%
- \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
+ \begingroup \boxmaxdepth \maxdimen
+ \@defaultunitsset\@tempdimb{#1}\unitlength
\ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
\@ovro\ht\@tempboxa
\setbox\@tempboxa\hbox{\@circlefnt
@@ -7518,7 +8781,9 @@ Type H <return> for immediate help.}%
\box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
\@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
\else \@circ\@tempdimb{96}\fi\endgroup}
-\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
+\def\@dot#1{%
+ \@defaultunitsset\@tempdimb{#1}\unitlength
+ \@circ\@tempdimb{112}}
\def\@circ#1#2{\@tempdima #1\relax \advance\@tempdima .5\p@
\@tempcnta\@tempdima \@tempdima \p@
\divide\@tempcnta\@tempdima
@@ -7548,33 +8813,39 @@ Type H <return> for immediate help.}%
\def\bezier#1)#2(#3)#4({\@bezier#1)(#3)(}
\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
\ifnum #1=\z@
- \@ovxx #4\unitlength
- \advance\@ovxx -#2\unitlength
+ \@defaultunitsset\@ovxx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
\ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
- \@ovdx #6\unitlength
- \advance\@ovdx -#4\unitlength
+ \@defaultunitsset\@ovdx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength
\ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
\ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
- \@ovyy #5\unitlength
- \advance\@ovyy -#3\unitlength
+ \@defaultunitsset\@ovyy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
\ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
- \@ovdy #7\unitlength
- \advance\@ovdy -#5\unitlength
+ \@defaultunitsset\@ovdy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength
\ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
\ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
\@multicnt
\ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
\@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
- \ifnum \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax \fi
+ \ifnum \qbeziermax<\@multicnt
+ \@multicnt\qbeziermax\relax
+ \fi
\else \@multicnt#1\relax \fi
\@tempcnta\@multicnt \advance\@tempcnta\@ne
- \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
+ \@defaultunitsset\@ovdx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength
\multiply\@ovdx \tw@
- \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
+ \@defaultunitsset\@ovxx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
\advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
- \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
+ \@defaultunitsset\@ovdy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength
\multiply\@ovdy \tw@
- \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
+ \@defaultunitsset\@ovyy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
\advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
\setbox\@tempboxa\hbox{%
\hskip -\@halfwidth
@@ -7650,8 +8921,8 @@ Type H <return> for immediate help.}%
%%% From File: ltsect.dtx
\message{title,}
\DeclareRobustCommand\title[1]{\gdef\@title{#1}}
-\DeclareRobustCommand\author[1]{\gdef\@author{#1}}
-\DeclareRobustCommand\date[1]{\gdef\@date{#1}}
+\DeclareRobustCommand*\author[1]{\gdef\@author{#1}}
+\DeclareRobustCommand*\date[1]{\gdef\@date{#1}}
\DeclareRobustCommand\thanks[1]{\footnotemark
\protected@xdef\@thanks{\@thanks
\protect\footnotetext[\the\c@footnote]{#1}}%
@@ -7789,7 +9060,7 @@ Type H <return> for immediate help.}%
\@nobreakfalse
\endgroup}
\def\addcontentsline#1#2#3{%
- \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}%
\protected@file@percent}}
\long\def\addtocontents#1#2{%
\protected@write\@auxout
@@ -8235,7 +9506,7 @@ Type H <return> for immediate help.}%
\hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
\let\@leftmark\@firstoftwo
\let\@rightmark\@secondoftwo
-\DeclareRobustCommand\markboth[2]{%
+\DeclareRobustCommand*\markboth[2]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\unrestored@protected@xdef\@themark {{#1}{#2}}%
@@ -8243,7 +9514,7 @@ Type H <return> for immediate help.}%
\mark{\the\@temptokena}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
-\DeclareRobustCommand\markright[1]{%
+\DeclareRobustCommand*\markright[1]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\expandafter\@markright\@themark {#1}%
@@ -8273,6 +9544,1445 @@ Type H <return> for immediate help.}%
\hfuzz .1\p@
\vfuzz\hfuzz}
\overfullrule 0pt
+%%% From File: ltclass.dtx
+\newif\if@compatibility
+\def\@documentclasshook{%
+ \ifx\@normalsize\@undefined
+ \let\@normalsize\normalsize
+ \fi
+}
+\let\@declaredoptions\@empty
+\let\@classoptionslist\relax
+\@onlypreamble\@classoptionslist
+\let\@unusedoptionlist\@empty
+\@onlypreamble\@unusedoptionlist
+\let\CurrentOption\@empty
+\let\@currname\@empty
+\global\let\@currext=\@empty
+\def\@clsextension{cls}
+\def\@pkgextension{sty}
+\@onlypreamble\@clsextension
+\@onlypreamble\@pkgextension
+\def\@pushfilename{%
+ \@expl@@@hook@curr@name@push@@n{}%
+ \@expl@push@filename@@
+ \xdef\@currnamestack{%
+ {\@currname}%
+ {\@currext}%
+ {\the\catcode`\@}%
+ \@currnamestack}%
+ \@expl@push@filename@aux@@}
+\@onlypreamble\@pushfilename
+\def\@popfilename{\@expl@@@hook@curr@name@pop@@
+ \expandafter\@p@pfilename\@currnamestack\@nil
+ \@expl@pop@filename@@}
+\@onlypreamble\@popfilename
+\def\@p@pfilename#1#2#3#4\@nil{%
+ \gdef\@currname{#1}%
+ \gdef\@currext{#2}%
+ \catcode`\@#3\relax
+ \gdef\@currnamestack{#4}}
+\@onlypreamble\@p@pfilename
+\gdef\@currnamestack{}
+\@onlypreamble\@currnamestack
+\def\@ptionlist#1{%
+ \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}}
+\@onlypreamble\@ptionlist
+\def\@ifpackageloaded{\@ifl@aded\@pkgextension}
+\def\@ifclassloaded{\@ifl@aded\@clsextension}
+\@onlypreamble\@ifpackageloaded
+\@onlypreamble\@ifclassloaded
+\def\@ifl@aded#1#2{%
+ \expandafter\ifx\csname ver@#2.#1\endcsname\relax
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\@onlypreamble\@ifl@aded
+\def\@ifpackagelater{\@ifl@ter\@pkgextension}
+\def\@ifclasslater{\@ifl@ter\@clsextension}
+\@onlypreamble\@ifpackagelater
+\@onlypreamble\@ifclasslater
+\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
+\let\IfPackageAtLeastTF\@ifpackagelater
+\let\IfClassAtLeastTF\@ifclasslater
+\@onlypreamble\IfFormatAtLeastTF
+\@onlypreamble\IfPackageAtLeastTF
+\@onlypreamble\IfClassAtLeastTF
+\def\@ifl@ter#1#2{%
+ \expandafter\@ifl@t@r
+ \csname ver@#2.#1\endcsname}
+\@onlypreamble\@ifl@ter
+\def\@ifl@t@r#1#2{%
+ \ifnum\expandafter\@parse@version@#1//00\@nil<%
+ \expandafter\@parse@version@#2//00\@nil
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi}
+\def\@parse@version@#1{\@parse@version0#1}
+\@onlypreamble\@ifl@t@r
+\def\@parse@version#1/#2/#3#4#5\@nil{%
+\@parse@version@dash#1-#2-#3#4\@nil
+}
+\def\@parse@version@dash#1-#2-#3#4#5\@nil{%
+ \if\relax#2\relax\else#1\fi#2#3#4 }
+\def\@ifpackagewith{\@if@ptions\@pkgextension}
+\def\@ifclasswith{\@if@ptions\@clsextension}
+\@onlypreamble\@ifpackagewith
+\@onlypreamble\@ifclasswith
+\def\@if@ptions#1#2{%
+ \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}}
+\@onlypreamble\@if@ptions
+\def\@if@pti@ns#1#2{%
+ \let\reserved@a\@firstoftwo
+ \edef\reserved@b{\zap@space#2 \@empty}%
+ \@for\reserved@b:=\reserved@b\do{%
+ \ifx\reserved@b\@empty
+ \else
+ \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}%
+ \ifin@
+ \else
+ \let\reserved@a\@secondoftwo
+ \fi
+ \fi
+ }%
+ \reserved@a}
+\@onlypreamble\@if@pti@ns
+\def\ProvidesPackage#1{%
+ \xdef\@gtempa{#1}%
+ \ifx\@gtempa\@currname\else
+ \@latex@warning@no@line{You have requested
+ \@cls@pkg\space`\@currname',\MessageBreak
+ but the \@cls@pkg\space provides `#1'}%
+ \fi
+ \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%]
+\@onlypreamble\ProvidesPackage
+\def\@pr@videpackage[#1]{%
+ \expandafter\protected@xdef % <-- protected...
+ \csname ver@\@currname.\@currext\endcsname{#1}%
+ \ifx\@currext\@clsextension
+ \typeout{Document Class: \@gtempa\space#1}%
+ \else
+ \protected@wlog{Package: \@gtempa\space#1}% <--- protected
+ \fi}
+\long\def\protected@wlog#1{\begingroup
+ \set@display@protect
+ \immediate \write \m@ne {#1}\endgroup }
+\@onlypreamble\@pr@videpackage
+\let\ProvidesClass\ProvidesPackage
+\@onlypreamble\ProvidesClass
+\def\ProvidesFile#1{%
+ \begingroup
+ \catcode`\ 10 %
+ \ifnum \endlinechar<256 %
+ \ifnum \endlinechar>\m@ne
+ \catcode\endlinechar 10 %
+ \fi
+ \fi
+ \@makeother\/%
+ \@makeother\&%
+ \kernel@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
+\def\@pass@ptions#1#2#3{%
+ \expandafter\xdef\csname opt@#3.#1\endcsname{%
+ \@ifundefined{opt@#3.#1}\@empty
+ {\csname opt@#3.#1\endcsname,}%
+ \zap@space#2 \@empty}}
+\@onlypreamble\@pass@ptions
+\def\PassOptionsToPackage{\@pass@ptions\@pkgextension}
+\def\PassOptionsToClass{\@pass@ptions\@clsextension}
+\@onlypreamble\PassOptionsToPackage
+\@onlypreamble\PassOptionsToClass
+\def\DeclareOption{%
+ \let\@fileswith@pti@ns\@badrequireerror
+ \@ifstar\@defdefault@ds\@declareoption}
+\long\def\@declareoption#1#2{%
+ \xdef\@declaredoptions{\@declaredoptions,#1}%
+ \toks@{#2}%
+ \expandafter\edef\csname ds@#1\endcsname{\the\toks@}}
+\long\def\@defdefault@ds#1{%
+ \toks@{#1}%
+ \edef\default@ds{\the\toks@}}
+\@onlypreamble\DeclareOption
+\@onlypreamble\@declareoption
+\@onlypreamble\@defdefault@ds
+\def\OptionNotUsed{%
+ \ifx\@currext\@clsextension
+ \xdef\@unusedoptionlist{%
+ \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
+ \CurrentOption}%
+ \fi}
+\@onlypreamble\OptionNotUsed
+\def\ProcessOptions{%
+ \let\ds@\@empty
+ \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
+ \@ifstar\@xprocess@ptions\@process@ptions}
+\@onlypreamble\ProcessOptions
+\def\@process@ptions{%
+ \@for\CurrentOption:=\@declaredoptions\do{%
+ \ifx\CurrentOption\@empty\else
+ \@expandtwoargs\in@{,\CurrentOption,}{%
+ ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi
+ \@curroptions,}%
+ \ifin@
+ \@use@ption
+ \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
+ \fi
+ \fi}%
+ \@process@pti@ns}
+\@onlypreamble\@process@ptions
+\def\@xprocess@ptions{%
+ \ifx\@currext\@clsextension\else
+ \@for\CurrentOption:=\@classoptionslist\do{%
+ \ifx\CurrentOption\@empty\else
+ \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
+ \ifin@
+ \@use@ption
+ \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
+ \fi
+ \fi}%
+ \fi
+ \@process@pti@ns}
+\@onlypreamble\@xprocess@ptions
+\def\@process@pti@ns{%
+ \@for\CurrentOption:=\@curroptions\do{%
+ \@ifundefined{ds@\CurrentOption}%
+ {\@use@ption
+ \default@ds}%
+ \@use@ption}%
+ \@for\CurrentOption:=\@declaredoptions\do{%
+ \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
+ \let\CurrentOption\@empty
+ \let\@fileswith@pti@ns\@@fileswith@pti@ns
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}}
+\@onlypreamble\@process@pti@ns
+\def\@options{\ProcessOptions*}
+\@onlypreamble\@options
+\def\@use@ption{%
+ \@expandtwoargs\@removeelement\CurrentOption
+ \@unusedoptionlist\@unusedoptionlist
+ \csname ds@\CurrentOption\endcsname}
+\@onlypreamble\@use@ption
+\def\ExecuteOptions#1{%
+ \edef\@fortmp{\zap@space#1 \@empty}%
+ \def\reserved@a##1\@nil{%
+ \@for\CurrentOption:=\@fortmp\do
+ {\csname ds@\CurrentOption\endcsname}%
+ \edef\CurrentOption{##1}}%
+ \expandafter\reserved@a\CurrentOption\@nil}
+\@onlypreamble\ExecuteOptions
+\def\documentclass{%
+ \let\documentclass\@twoclasseserror
+ \if@compatibility\else\let\usepackage\RequirePackage\fi
+ \@fileswithoptions\@clsextension}
+\@onlypreamble\documentclass
+\def\documentstyle{%
+ \makeatletter\input{latex209.def}\makeatother
+ \documentclass}
+\@onlypreamble\documentstyle
+\def\RequirePackage{%
+ \@fileswithoptions\@pkgextension}
+\@onlypreamble\RequirePackage
+\def\LoadClass{%
+ \ifx\@currext\@pkgextension
+ \@latex@error
+ {\noexpand\LoadClass in package file}%
+ {You may only use \noexpand\LoadClass in a class file.}%
+ \fi
+ \@fileswithoptions\@clsextension}
+\@onlypreamble\LoadClass
+\def\@loadwithoptions#1#2#3{%
+ \expandafter\let\csname opt@#3.#1\expandafter\endcsname
+ \csname opt@\@currname.\@currext\endcsname
+ #2{#3}}
+\@onlypreamble\@loadwithoptions
+\def\LoadClassWithOptions{%
+ \@loadwithoptions\@clsextension\LoadClass}
+\@onlypreamble\LoadClassWithOptions
+\def\RequirePackageWithOptions{%
+ \AtEndOfPackage{\expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \relax}%
+ \@loadwithoptions\@pkgextension\RequirePackage}
+\@onlypreamble\RequirePackageWithOptions
+
+\def\usepackage#1#{%
+ \@latex@error
+ {\noexpand \usepackage before \string\documentclass}%
+ {\noexpand \usepackage may only appear in the document
+ preamble, i.e.,\MessageBreak
+ between \noexpand\documentclass and
+ \string\begin{document}.}%
+ \@gobble}
+\@onlypreamble\usepackage
+\def\NeedsTeXFormat#1{%
+ \def\reserved@a{#1}%
+ \ifx\reserved@a\fmtname
+ \expandafter\@needsformat
+ \else
+ \@latex@error{This file needs format `\reserved@a'%
+ \MessageBreak but this is `\fmtname'}{%
+ The current input file will not be processed
+ further,\MessageBreak
+ because it was written for some other flavor of
+ TeX.\MessageBreak\@ehd}%
+ \endinput \fi}
+\@onlypreamble\NeedsTeXFormat
+\def\@needsformat{%
+ \@ifnextchar[%]
+ \@needsf@rmat
+ {}}
+\@onlypreamble\@needsformat
+\def\@needsf@rmat[#1]{%
+ \@ifl@t@r\fmtversion{#1}{}%
+ {\@latex@warning@no@line
+ {You have requested release `#1' of LaTeX,\MessageBreak
+ but only release `\fmtversion' is available}}}
+\@onlypreamble\@needsf@rmat
+\def\zap@space#1 #2{%
+ #1%
+ \ifx#2\@empty\else\expandafter\zap@space\fi
+ #2}
+\def\@fileswithoptions#1{%
+ \@ifnextchar[%]
+ {\@fileswith@ptions#1}%
+ {\@fileswith@ptions#1[]}}
+\@onlypreamble\@fileswithoptions
+\def\@fileswith@ptions#1[#2]#3{%
+ \@ifnextchar[%]
+ {\@fileswith@pti@ns#1[{#2}]#3}%
+ {\@fileswith@pti@ns#1[{#2}]#3[]}}
+\@onlypreamble\@fileswith@ptions
+\def\@fileswith@pti@ns#1[#2]#3[#4]{%
+ \ifx#1\@clsextension
+ \ifx\@classoptionslist\relax
+ \xdef\@classoptionslist{\zap@space#2 \@empty}%
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1%
+ \@documentclasshook}%
+ \else
+ \def\reserved@a{%
+ \@onefilewithoptions#3[{#2}][{#4}]#1}%
+ \fi
+ \else
+ \def\reserved@b##1,{%
+ \ifx\@nnil##1\relax\else
+ \ifx\@nnil##1\@nnil\else
+ \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
+ \noexpand\@pkgextension
+ \fi
+ \expandafter\reserved@b
+ \fi}%
+ \edef\reserved@a{\zap@space#3 \@empty}%
+ \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}%
+ \fi
+ \reserved@a}
+\@onlypreamble\@fileswith@pti@ns
+
+\def\@onefilewithoptions#1[#2][#3]#4{%
+ \@pushfilename
+ \xdef\@currname{#1}%
+ \global\let\@currext#4%
+ \@ifl@aded\@currext\@currname
+ {\@if@ptions\@currext{\@currname}{#2}{}%
+ {\@latex@error
+ {Option clash for \@cls@pkg\space \@currname}%
+ {The package \@currname\space has already been loaded
+ with options:\MessageBreak
+ \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak
+ There has now been an attempt to load it
+ with options\MessageBreak
+ \space\space[#2]\MessageBreak
+ Adding the global options:\MessageBreak
+ \space\space
+ \@ptionlist{\@currname.\@currext},#2\MessageBreak
+ to your \noexpand\documentclass declaration may fix this.%
+ \MessageBreak
+ Try typing \space <return> \space to proceed.}}%
+ \@firstofone}%
+ {\makeatletter
+ \@reset@ptions
+ \IfFileExists{\@currname.\@currext}{}%
+ {\@missing@onefilewithoptions{#2}}%
+ \ifx\@currname\@empty
+ \expandafter\@gobble
+ \else
+ \@disable@packageload@do{\@currname.\@currext}%
+ {\@expl@@@filehook@file@push@@
+ \set@curr@file{\@currname.\@currext}%
+ \@filehook@set@CurrentFile
+ \load@onefile@withoptions{#2}%
+ \@expl@@@filehook@file@pop@@}%
+ \expandafter\@firstofone
+ \fi}%
+ {\@ifl@ter\@currext{\@currname}{#3}{}%
+ {\@latex@warning@no@line
+ {You have requested,\on@line,
+ version\MessageBreak
+ `#3' of \@cls@pkg\space \@currname,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@\@currname.\@currext\endcsname'\MessageBreak
+ is available}}%
+ \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}%
+ \@popfilename
+ \@reset@ptions}
+\@onlypreamble\@onefilewithoptions
+\let\@unprocessedoptions\@undefined
+
+\def\@missing@onefilewithoptions#1{%
+ \@missingfileerror\@currname\@currext
+ \xdef\@currname{\@missingfile@area\@missingfile@base}%
+ \global\let\@currext\@missingfile@ext}
+\def\load@onefile@withoptions#1{%
+ \let\CurrentOption\@empty
+ \@reset@ptions
+ \def\reserved@a{%
+ \@pass@ptions\@currext{#1}{\@currname}%
+ \global\expandafter
+ \let\csname ver@\@currname.\@currext\endcsname\@empty
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+ \ifx\@currext\@pkgextension
+ \UseHook{package/before}%
+ \UseHook{package/before/\@currname}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/before}%
+ \UseHook{class/before/\@currname}%
+ \fi
+ \fi
+ \InputIfFileExists{\@currname.\@currext}{}{}%
+ \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@@unprocessedoptions
+ \csname\@currname.\@currext-h@@k\endcsname
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
+ \@undefined
+ \ifx\@unprocessedoptions\relax
+ \let\@unprocessedoptions\@undefined
+ \else
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \fi
+ \expandafter\let
+ \csname unprocessedoptions-\@currname.\@currext\endcsname
+ \@undefined
+ \ifx\@currext\@pkgextension
+ \UseHook{package/after/\@currname}%
+ \UseHook{package/after}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/after/\@currname}%
+ \UseHook{class/after}%
+ \fi
+ \fi}%
+ \reserved@a}
+\let\@@fileswith@pti@ns\@fileswith@pti@ns
+\@onlypreamble\@@fileswith@pti@ns
+\def\@reset@ptions{%
+ \global\ifx\@currext\@clsextension
+ \let\default@ds\OptionNotUsed
+ \else
+ \let\default@ds\@unknownoptionerror
+ \fi
+ \global\let\ds@\@empty
+ \global\let\@declaredoptions\@empty}
+\@onlypreamble\@reset@ptions
+\ifx\@begindocumenthook\@undefined
+ \let\@begindocumenthook\@empty
+\fi
+\let\@enddocumenthook\@empty
+\def\AtEndOfPackage{%
+ \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname}
+\let\AtEndOfClass\AtEndOfPackage
+\@onlypreamble\AtEndOfPackage
+\@onlypreamble\AtEndOfClass
+\DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}}
+\DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}}
+\@onlypreamble\AtBeginDocument
+\def\@cls@pkg{%
+ \ifx\@currext\@clsextension
+ document class%
+ \else
+ package%
+ \fi}
+\@onlypreamble\@cls@pkg
+\def\@unknownoptionerror{%
+ \@latex@error
+ {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}%
+ {The option `\CurrentOption' was not declared in
+ \@cls@pkg\space`\@currname', perhaps you\MessageBreak
+ misspelled its name.
+ Try typing \space <return>
+ \space to proceed.}}
+\@onlypreamble\@unknownoptionerror
+\def\@@unprocessedoptions{%
+ \ifx\@currext\@pkgextension
+ \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
+ \@for\CurrentOption:=\@curroptions\do{%
+ \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}%
+ \fi}
+\@onlypreamble\@unprocessedoptions
+\@onlypreamble\@@unprocessedoptions
+\def\@badrequireerror#1[#2]#3[#4]{%
+ \@latex@error
+ {\noexpand\RequirePackage or \noexpand\LoadClass
+ in Options Section}%
+ {The \@cls@pkg\space `\@currname' is defective.\MessageBreak
+ It attempts to load `#3' in the options section, i.e.,\MessageBreak
+ between \noexpand\DeclareOption and \string\ProcessOptions.}}
+\@onlypreamble\@badrequireerror
+\def\@twoloadclasserror{%
+ \@latex@error
+ {Two \noexpand\LoadClass commands}%
+ {You may only use one \noexpand\LoadClass in a class file}}
+\@onlypreamble\@twoloadclasserror
+\def\@twoclasseserror#1#{%
+ \@latex@error
+ {Two \noexpand\documentclass or \noexpand\documentstyle commands}%
+ {The document may only declare one class.}\@gobble}
+\@onlypreamble\@twoclasseserror
+\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
+\def\filecontents{\@tempswatrue\@fileswtrue
+ \@ifnextchar[\filec@ntents@opt\filec@ntents
+}
+\@namedef{filecontents*}{\@tempswafalse\@fileswtrue
+ \@ifnextchar[\filec@ntents@opt\filec@ntents
+}
+\def\filec@ntents@opt[#1]{%
+ \edef\@fortmp{\zap@space#1 \@empty}%
+ \@for\reserved@a:=\@fortmp\do{%
+ \ifcsname filec@ntents@\reserved@a\endcsname
+ \csname filec@ntents@\reserved@a\endcsname
+ \else
+ \@latex@error{Unknown filecontents option \reserved@a}%
+ {Valid options are force (or overwrite), nosearch, noheader}%
+ \fi}%
+ \filec@ntents
+}
+\let\filec@ntents@force\@fileswfalse
+\let\filec@ntents@overwrite\@fileswfalse % alternative name
+\let\filec@ntents@noheader\@tempswafalse
+\def\filec@ntents@nosearch{%
+ \let\filec@ntents@checkdir\@currdir
+ \def\filec@ntents@where{in current directory}}
+\let\filec@ntents@checkdir\@empty
+\def\filec@ntents@where{exists on the system}
+\begingroup%
+\@tempcnta=1
+\loop
+ \catcode\@tempcnta=12 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode`\*=11 %
+\catcode`\^^M\active%
+\catcode`\^^L\active\let^^L\relax%
+\catcode`\^^I\active%
+\gdef\filec@ntents#1{%
+ \set@curr@file{\filec@ntents@checkdir#1}%
+ \edef\q@curr@file{"\@curr@file"}%
+ \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi%
+ \openin\@inputcheck\q@curr@file \space %
+ \ifeof\@inputcheck%
+ \@latex@warning@no@line%
+ {Writing file `\@currdir\@curr@file'}%
+ \ch@ck7\reserved@c\write\relax%
+ \immediate\openout\reserved@c\q@curr@file\relax%
+ \else%
+ \if@filesw%
+ \@latex@warning@no@line%
+ {File `\@curr@file' already \filec@ntents@where.\MessageBreak%
+ Not generating it from this source}%
+ \let\write\@gobbletwo%
+ \let\closeout\@gobble%
+ \else%
+ \edef\reserved@a{#1}%
+ \edef\reserved@a{\detokenize\expandafter{\reserved@a}}%
+ \edef\reserved@b{\detokenize\expandafter{\jobname}}%
+ \ifx\reserved@a\reserved@b%
+ \@fileswtrue%
+ \else%
+ \edef\reserved@b{\reserved@b\detokenize{.tex}}%
+ \ifx\reserved@a\reserved@b
+ \@fileswtrue%
+ \fi%
+ \fi%
+ \ch@ck7\reserved@c\write\relax%
+ \if@filesw% % Foul ... trying to overwrite \jobname!
+ \@latex@error{Trying to overwrite `\jobname.tex'}{You can't %
+ write to the file you are reading from!\MessageBreak%
+ Data is written to screen instead.}%
+ \else%
+ \@latex@warning@no@line%
+ {Writing or overwriting file `\@currdir\@curr@file'}%
+ \immediate\openout\reserved@c\q@curr@file\relax%
+ \fi%
+ \fi%
+ \fi%
+ \closein\@inputcheck%
+ \if@tempswa%
+ \immediate\write\reserved@c{%
+ \@percentchar\@percentchar\space%
+ \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J%
+ \@percentchar\@percentchar\space generated by the %
+ `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+ \@percentchar\@percentchar\space from source `\jobname' on %
+ \number\year/\two@digits\month/\two@digits\day.^^J%
+ \@percentchar\@percentchar}%
+ \fi%
+ \let\do\@makeother\dospecials%
+ \count@ 128\relax%
+ \loop%
+ \catcode\count@ 11\relax%
+ \advance\count@ \@ne%
+ \ifnum\count@<\@cclvi%
+ \repeat%
+ \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+ \edef\reserved@b{%
+ \def\noexpand\reserved@b%
+ ####1\E####2\E####3\relax}%
+ \reserved@b{%
+ \ifx\relax##3\relax%
+ \immediate\write\reserved@c{##1}%
+ \else%
+ \edef^^M{\noexpand\end{\@currenvir}}%
+ \ifx\relax##1\relax%
+ \else%
+ \@latex@warning{Writing text `##1' before %
+ \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
+ \immediate\write\reserved@c{##1}%
+ \fi%
+ \ifx\relax##2\relax%
+ \else%
+ \@latex@warning{%
+ Ignoring text `##2' after \string\end{\@currenvir}}%
+ \fi%
+ \fi%
+ ^^M}%
+ \catcode`\^^L\active%
+ \let\L\@undefined%
+ \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
+ \catcode`\^^I\active%
+ \let\I\@undefined%
+ \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
+ \catcode`\^^M\active%
+ \edef^^M##1^^M{%
+ \noexpand\reserved@b##1\E\E\relax}}%
+\endgroup%
+\begingroup
+\catcode`|=\catcode`\%
+\catcode`\%=12
+\catcode`\*=11
+\gdef\@percentchar{%}
+\gdef\endfilecontents{|
+ \immediate\closeout\reserved@c
+ \def\T##1##2##3{|
+ \ifx##1\@undefined\else
+ \@latex@warning@no@line{##2 has been converted to Blank ##3e}|
+ \fi}|
+ \T\L{Form Feed}{Lin}|
+ \T\I{Tab}{Spac}|
+ \immediate\write\@unused{}}
+\global\let\endfilecontents*\endfilecontents
+\endgroup
+\let\pkgcls@debug\@gobble
+\def\requestedLaTeXdate{0}
+\ifx\pkgcls@targetdate\@undefined
+ \newcount\pkgcls@targetdate
+\fi
+\let\pkgcls@targetlabel\@empty
+\def\pkgcls@innerdate{\maxdimen}
+\let\pkgcls@candidate\@empty
+\let\pkgcls@releasedate\@empty
+\ifx\load@onefilewithoptions\@undefined
+ \let\load@onefilewithoptions\@onefilewithoptions
+ \def\@onefilewithoptions#1[#2][#3]#4{%
+ \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}%
+ \pkgcls@debug{\@spaces 1: #1}%
+ \pkgcls@debug{\@spaces 2: #2}%
+ \pkgcls@debug{\@spaces 3: #3}%
+ \pkgcls@debug{\@spaces 4: #4}%
+ \def\pkgcls@name{#1}% % for info message
+ \def\pkgcls@arg {#3}% % for info message
+ \pkgcls@parse@date@arg{#3}%
+ \let\pkgcls@candidate\@empty
+ \begingroup
+ \edef\reserved@a{%
+ \endgroup
+ \unexpanded{\load@onefilewithoptions#1[#2]}%
+ [\pkgcls@mindate]%
+ \unexpanded{#4}}%
+ \reserved@a
+ }
+\fi
+\def\pkgcls@parse@date@arg #1{%
+ \ifx\@nil#1\@nil
+ \pkgcls@targetdate\requestedLaTeXdate\relax
+ \let\pkgcls@targetlabel\@empty
+ \let\pkgcls@mindate\@empty
+ \else
+ \pkgcls@parse@date@arg@#1=\@nil\relax
+ \fi
+ }
+\def\pkgcls@parse@date@arg@#1=#2\@nil{%
+ \pkgcls@targetdate
+ \ifx\@nil#1\@nil
+ \@parse@version0#2//00\@nil\relax
+ \ifnum \pkgcls@targetdate=\z@
+ \pkgcls@targetdate\@ne
+ \def\pkgcls@innerdate{\maxdimen}%
+ \pkgcls@parse@date@arg@version#2%
+ \else
+ \edef\pkgcls@innerdate{\the\pkgcls@targetdate}%
+ \fi
+ \let\pkgcls@mindate\@empty
+ \else
+ \requestedLaTeXdate\relax
+ \let\pkgcls@targetlabel\@empty
+ \def\pkgcls@innerdate{\maxdimen}%
+ \def\pkgcls@mindate{#1}%
+ \ifnum \pkgcls@targetdate > \z@
+ \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate
+ \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
+ A minimal date of #1 has been specified for
+ \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
+ But this is in conflict
+ with a rollback request to \requestedpatchdate}
+ \fi
+ \fi
+ \fi
+}
+\def\pkgcls@parse@date@arg@version#1={%
+ \def\pkgcls@targetlabel{#1}}
+\def\DeclareRelease#1#2#3{%
+ \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
+ \pkgcls@debug{---\string\DeclareRelease:}%
+ \pkgcls@debug{\@spaces 1: #1}%
+ \pkgcls@debug{\@spaces 2: #2}%
+ \pkgcls@debug{\@spaces 3: #3}%
+ \ifx\@nil#2\@nil
+ \ifnum\pkgcls@targetdate=\@ne % named request
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@use@this@release{#3}{}%
+ \else
+ \pkgcls@debug{Label doesn't match}%
+ \fi
+ \else
+ \pkgcls@debug{Date request: ignored}%
+ \fi
+ \else
+ \ifnum\pkgcls@targetdate>\@ne % a real request
+ \ifnum\@parse@version#2//00\@nil
+ >\pkgcls@targetdate
+ \ifx\pkgcls@candidate\@empty
+ \pkgcls@rollbackdate@error{#2}%
+ \pkgcls@use@this@release{#3}{#2}%
+ \else
+ \pkgcls@use@this@release\pkgcls@candidate
+ \pkgcls@releasedate
+ \fi
+ \else
+ \def\pkgcls@candidate{#3}%
+ \def\pkgcls@releasedate{#2}%
+ \pkgcls@debug{New candidate: #3}%
+ \fi
+ \else
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@use@this@release{#3}{#2}%
+ \else
+ \pkgcls@debug{Label doesn't match}%
+ \fi
+ \fi
+ \fi
+ \fi
+}
+\def\pkgcls@use@this@release#1#2{%
+ \pkgcls@show@selection{#1}{#2}%
+ \pkgcls@targetdate\z@
+ \@@input #1\relax
+ \endinput
+}
+\def\pkgcls@show@selection#1#2{%
+ \pkgcls@debug{Result: use #1}%
+ \GenericInfo
+ {\@spaces\@spaces\space}{Rollback for
+ \@cls@pkg\space'\@currname' requested ->
+ \ifnum\pkgcls@targetdate>\@ne
+ date
+ \ifnum\requestedLaTeXdate=\pkgcls@targetdate
+ \requestedpatchdate
+ \else
+ \expandafter\@gobble\pkgcls@arg
+ \fi.\MessageBreak
+ Best approximation is
+ \else
+ version '\pkgcls@targetlabel'.\MessageBreak
+ This corresponds to
+ \fi
+ \ifx\@nil#2\@nil
+ a special release%
+ \else
+ the release introduced on #2%
+ \fi
+ \@gobble}%
+}
+\def\pkgcls@rollbackdate@error#1{%
+ \@latex@error{Suspicious rollback date given}%
+ {The \@cls@pkg\space'\@currname' claims that it
+ came into existence on #1 which\MessageBreak
+ is after your requested rollback date --- so
+ something is wrong here.\MessageBreak
+ Continue and we use the earliest known release.}}
+\def\DeclareCurrentRelease#1#2{%
+ \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
+ \pkgcls@debug{---DeclareCurrentRelease}%
+ \pkgcls@debug{ 1: #1}%
+ \pkgcls@debug{ 2: #2}%
+ \ifnum\pkgcls@targetdate>\@ne % a date request
+ \ifnum\@parse@version#2//00\@nil
+ >\pkgcls@targetdate
+ \ifx\pkgcls@candidate\@empty
+ \pkgcls@rollbackdate@error{#2}%
+ \else
+ \pkgcls@use@this@release\pkgcls@candidate
+ \pkgcls@releasedate
+ \fi
+ \else
+ \pkgcls@show@selection{current version}{#2}%
+ \fi
+ \else % a label request
+ \def\reserved@a{#1}%
+ \ifx\pkgcls@targetlabel\reserved@a
+ \pkgcls@show@selection{current version}{#2}%
+ \else
+ \@latex@error{Requested version '\pkgcls@targetlabel' for
+ \@cls@pkg\space'\@currname' is unknown}\@ehc
+ \fi
+ \fi
+ \fi
+}
+\DeclareRobustCommand\IfTargetDateBefore[1]{%
+ \ifnum\pkgcls@innerdate <%
+ \expandafter\@parse@version\expandafter0#1//00\@nil
+ \typeout{Exclude code introduced on #1}%
+ \expandafter\@firstoftwo
+ \else
+ \typeout{Include code introduced on #1}%
+ \expandafter\@secondoftwo
+ \fi
+}
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
+\ExplSyntaxOn
+\tl_new:N \CurrentFile
+\tl_new:N \CurrentFilePath
+\tl_new:N \CurrentFileUsed
+\tl_new:N \CurrentFilePathUsed
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_file_parse_full_name:nN #1
+ {
+ \exp_args:Nf \file_parse_full_name_apply:nN
+ {
+ \exp_args:Nf \__filehook_full_name:nn
+ { \file_full_name:n {#1} } {#1}
+ }
+ }
+\cs_new:Npn \__filehook_full_name:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ { \tl_trim_spaces:n {#2} }
+ { \tl_trim_spaces:n {#1} }
+ }
+\cs_new:Npn \__filehook_if_no_extension:nTF #1
+ {
+ \exp_args:Ne \tl_if_empty:nTF
+ { \file_parse_full_name_apply:nN {#1} \use_iii:nnn }
+ }
+\cs_new_protected:Npn \__filehook_drop_extension:N #1
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_args:NV \__filehook_file_parse_full_name:nN #1
+ \__filehook_drop_extension_aux:nnn
+ }
+ }
+\cs_new:Npn \__filehook_drop_extension_aux:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2 }
+\tl_new:N \l__filehook_internal_tl
+\seq_new:N \g__filehook_input_file_seq
+\cs_new_protected:Npn \__filehook_file_push:
+ {
+ \seq_gpush:Nx \g__filehook_input_file_seq
+ {
+ { \CurrentFilePathUsed } { \CurrentFileUsed }
+ { \CurrentFilePath } { \CurrentFile }
+ }
+ }
+\cs_new_protected:Npn \__filehook_file_pop:
+ {
+ \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl
+ { \exp_after:wN \__filehook_file_pop_assign:nnnn \l__filehook_internal_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~file~name~stack. }
+ }
+ }
+\cs_new_protected:Npn \__filehook_file_pop_assign:nnnn #1 #2 #3 #4
+ {
+ \tl_set:Nn \CurrentFilePathUsed {#1}
+ \tl_set:Nn \CurrentFileUsed {#2}
+ \tl_set:Nn \CurrentFilePath {#3}
+ \tl_set:Nn \CurrentFile {#4}
+ }
+\ExplSyntaxOff
+\let\InputIfFileExists\@undefined
+\DeclareRobustCommand \InputIfFileExists[2]{%
+ \IfFileExists{#1}%
+ {%
+ \@expl@@@filehook@file@push@@
+ \@filehook@set@CurrentFile
+ \edef\reserved@a{\@filef@und
+ \@expl@@@filehook@file@pop@assign@@nnnn
+ {\CurrentFilePathUsed}%
+ {\CurrentFileUsed}%
+ {\CurrentFilePath}%
+ {\CurrentFile}}%
+ \expandafter\@swaptwoargs\expandafter
+ {\reserved@a}%
+ {%
+ #2%
+ \@addtofilelist{#1}%
+ \UseHook{file/before}%
+ \UseHook{file/before/\CurrentFile}%
+ \@@input
+ }%
+ \UseHook{file/after/\CurrentFile}%
+ \UseHook{file/after}%
+ \@expl@@@filehook@file@pop@@
+ }%
+}
+\ExplSyntaxOn
+\cs_new_protected:Npn \__filehook_subst_add:nn #1 #2
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_gset:cpx { @file-subst@ \__filehook_subst_file_normalize:n {#1} }
+ { \__filehook_subst_file_normalize:n {#2} }
+ \group_end:
+ }
+\cs_new_protected:Npn \__filehook_subst_remove:n #1
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_undefine:c { @file-subst@ \__filehook_subst_file_normalize:n {#1} }
+ \group_end:
+ }
+\cs_new:Npn \__filehook_subst_file_normalize:n #1
+ {
+ \exp_after:wN \__filehook_subst_empty_name_chk:NN
+ \cs:w \exp_after:wN \cs_end:
+ \cs:w \__filehook_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end:
+ }
+\cs_new:Npn \__filehook_subst_empty_name_chk:NN #1 #2
+ { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: }
+\cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3}
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new_eq:NN \declare@file@substitution \__filehook_subst_add:nn
+\cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n
+\ExplSyntaxOff
+\ExplSyntaxOff
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
+ \expandafter\def\csname\expandafter\endcsname
+ \expandafter{\csname\endcsname}%
+ \@expl@@@filehook@if@no@extension@@nTF{#1}%
+ {\@tempswatrue}{\@tempswafalse}%
+ \@kernel@make@file@csname\@curr@file
+ \@expl@@@filehook@resolve@file@subst@@w {#1}%
+ \@expl@@@filehook@if@file@replaced@@TF
+ {\@kernel@make@file@csname\@curr@file@reqd
+ \@expl@@@filehook@normalize@file@name@@w{#1}%
+ \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}%
+ {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi
+ \global\let\@curr@file@reqd\@curr@file}%
+ \endgroup}
+\def\@kernel@make@file@csname#1#2#3{%
+ \xdef#1{\expandafter\@set@curr@file@aux
+ \csname\expandafter#2\@firstofone#3\@nil\endcsname}}
+\def\@set@curr@file@aux#1{%
+ \expandafter\ifx\csname\endcsname#1%
+ .tex\else\string#1\fi}
+\def\@filehook@set@CurrentFile{%
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file}%
+ \CurrentFileUsed\CurrentFilePathUsed
+ \ifx\@curr@file@reqd\@curr@file
+ \let\CurrentFile\CurrentFileUsed
+ \let\CurrentFilePath\CurrentFilePathUsed
+ \else
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file@reqd}%
+ \CurrentFile\CurrentFilePath
+ \fi}
+\ExplSyntaxOn
+\cs_new_protected:Npn \__filehook_set_curr_file:N #1
+ { \exp_args:NV \__filehook_set_curr_file:nNN #1 }
+\cs_new_protected:Npn \__filehook_set_curr_file:nNN #1
+ {
+ \__filehook_file_parse_full_name:nN {#1}
+ \__filehook_set_curr_file_assign:nnnNN
+ }
+\cs_new_protected:Npn \__filehook_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5
+ {
+ \str_set:Nn #5 {#1}
+ \str_set:Nn #4 {#2#3}
+ }
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil
+ { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn }
+\cs_new:Npn \__filehook_normalize_file_name:w #1 \@nil
+ { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_name_compose:nnn }
+\cs_new:Npn \__filehook_file_name_compose:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2#3 }
+\flag_new:n { __filehook_file_replaced }
+\cs_new:Npn \__filehook_if_file_replaced:TF #1 #2
+ { \flag_if_raised:nTF { __filehook_file_replaced } {#1} {#2} }
+\cs_new:Npn \__filehook_file_subst_begin:nnn #1 #2 #3
+ {
+ \__filehook_file_subst_tortoise_hare:nn { #2#3 } { #2#3 }
+ { \__filehook_file_name_compose:nnn {#1} {#2} {#3} }
+ }
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3
+ {
+ \cs_if_exist:cTF { @file-subst@ #2 }
+ {
+ \flag_if_raised:nF { __filehook_file_replaced }
+ { \flag_raise:n { __filehook_file_replaced } }
+ \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } }
+ {
+ \__filehook_file_subst_loop:cc
+ { @file-subst@ #1 }
+ { @file-subst@ \use:c { @file-subst@ #2 } }
+ }
+ { \use:c { @file-subst@ #2 } }
+ }
+ { #3 }
+ }
+\cs_new:Npn \__filehook_file_subst_loop:NN #1 #2
+ {
+ \token_if_eq_meaning:NNTF #1 #2
+ {
+ .tex
+ \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #1
+ }
+ { \__filehook_file_subst_tortoise_hare:nn {#1} {#2} {#2} }
+ }
+\cs_generate_variant:Nn \__filehook_file_subst_loop:NN { cc }
+\cs_new:Npn \__filehook_file_subst_cycle_error:NN #1 #2
+ {
+ \__kernel_msg_expandable_error:nnff { kernel } { file-cycle }
+ {#1} { \use:c { @file-subst@ #1 } }
+ \token_if_eq_meaning:NNF #1 #2
+ { \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #2 }
+ }
+\cs_generate_variant:Nn \__filehook_file_subst_cycle_error:NN { c }
+\__kernel_msg_new:nnn { kernel } { file-cycle }
+ { File~loop!~#1~replaced~by~#2... }
+\ExplSyntaxOff
+\def\disable@package@load#1#2{%
+ \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}}
+\def\@disable@packageload@do#1#2{%
+ \@ifundefined{@pkg-disable@#1}{#2}%
+ {\@nameuse{@pkg-disable@#1}}}
+\def\reenable@package@load#1{%
+ \global\expandafter\let
+ \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined}
+\ExplSyntaxOn
+\cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF
+ \__filehook_if_no_extension:nTF
+\cs_new_eq:NN \@expl@@@filehook@set@curr@file@@N
+ \__filehook_set_curr_file:N
+\cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w
+ \__filehook_resolve_file_subst:w
+\cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w
+ \__filehook_normalize_file_name:w
+\cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF
+ \__filehook_if_file_replaced:TF
+
+\cs_new_eq:NN \@expl@@@filehook@drop@extension@@N
+ \__filehook_drop_extension:N
+\cs_new_eq:NN \@expl@@@filehook@file@push@@
+ \__filehook_file_push:
+\cs_new_eq:NN \@expl@@@filehook@file@pop@@
+ \__filehook_file_pop:
+\cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn
+ \__filehook_file_pop_assign:nnnn
+\ExplSyntaxOff
+\declare@file@substitution{atveryend.sty}{atveryend-ltx.sty}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%%
+%%% From File: ltshipout.dtx
+\providecommand\ltshipoutversion{v1.0a}
+\providecommand\ltshipoutdate{2020/08/31}
+\ExplSyntaxOn
+\bool_new:N \g__shipout_debug_bool
+\cs_new_eq:NN \__shipout_debug:n \use_none:n
+\cs_new_protected:Npn \shipout_debug_on:
+ {
+ \bool_gset_true:N \g__shipout_debug_bool
+ \__shipout_debug_gset:
+ }
+\cs_new_protected:Npn \shipout_debug_off:
+ {
+ \bool_gset_false:N \g__shipout_debug_bool
+ \__shipout_debug_gset:
+ }
+\cs_new_protected:Npn \__shipout_debug_gset:
+ {
+ \cs_gset_protected:Npx \__shipout_debug:n ##1
+ { \bool_if:NT \g__shipout_debug_bool {##1} }
+ }
+\box_new:N \l_shipout_box
+\cs_set_eq:NN \ShipoutBox \l_shipout_box
+\cs_set:Npn\__shipout_execute: {
+ \tl_set:Nx \l__shipout_group_level_tl
+ { \int_value:w \tex_currentgrouplevel:D }
+ \tex_afterassignment:D \__shipout_execute_test_level:
+ \tex_setbox:D \l_shipout_box
+}
+\cs_gset_eq:NN \shipout \__shipout_execute:
+\tl_new:N \l__shipout_group_level_tl
+
+\cs_new:Npn \__shipout_execute_test_level: {
+ \int_compare:nNnT
+ \l__shipout_group_level_tl < \tex_currentgrouplevel:D
+ \tex_aftergroup:D
+ \__shipout_execute_cont:
+}
+\cs_new:Npn \__shipout_execute_cont: {
+ \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} }
+ {
+ \bool_gset_false:N \g__shipout_discard_bool
+ \cs_set_eq:NN \__shipout_saved_protect: \protect
+ \set@typeset@protect
+ \__shipout_get_box_size:N \l_shipout_box
+ \hook_use:n {shipout/before}
+ \int_gincr:N \g_shipout_totalpages_int
+ \bool_if:NTF \g__shipout_discard_bool
+ { \PackageInfo{ltshipout}{Completed~ page~ discarded}
+ \bool_gset_false:N \g__shipout_discard_bool
+ \tex_deadcycles:D \c_zero_int
+ }
+ { \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{
+ Shipout~ box~ was~ voided~ by~ hook,\MessageBreak
+ ignoring~ shipout~ box }
+ }
+ {
+ \int_gincr:N \g_shipout_readonly_int
+ \__shipout_debug:n {
+ \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int
+ \space (target:~ \@abspage@last)}
+ }
+ \__shipout_get_box_size:N \l_shipout_box
+ \hook_if_empty:nF {shipout/foreground}
+ { \__shipout_add_foreground_picture:n
+ { \hook_use:n {shipout/foreground} } }
+ \hook_if_empty:nF {shipout/background}
+ { \__shipout_add_background_picture:n
+ { \@kernel@before@shipout@background
+ \hook_use:n {shipout/background} } }
+ \__shipout_execute_firstpage_hook:
+ \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int
+ { \hook_if_empty:nF {shipout/lastpage}
+ { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~
+ on~ page~ \int_use:N \g_shipout_readonly_int } }
+ \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+ }
+ \bool_gset_true:N \g__shipout_lastpage_handled_bool
+ }
+ \cs_set_eq:NN \protect \exp_not:N
+ \tex_shipout:D \box_use:N \l_shipout_box
+ }
+ }
+ \cs_set_eq:NN \protect \__shipout_saved_protect:
+ }
+}
+\cs_new_eq:NN \__shipout_saved_protect: \protect
+\hook_new:n{shipout/before}
+\hook_new:n{shipout/foreground}
+\hook_new:n{shipout/background}
+\hook_new:n{shipout/firstpage}
+\hook_new:n{shipout/lastpage}
+\let\@kernel@after@shipout@lastpage\@empty
+\let\@kernel@before@shipout@background\@empty
+\cs_new:Npn \__shipout_execute_firstpage_hook: {
+ \hook_if_empty:nF {shipout/firstpage}
+ { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } }
+ \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing:
+ \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 {
+ \@latex@warning{
+ First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak
+ \string##1 }
+ }
+}
+\bool_new:N \g__shipout_lastpage_handled_bool
+\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 {
+ \AddToHook{shipout/firstpage}{#2}
+}
+\cs_new:Npn \__shipout_get_box_size:N #1 {
+ \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 }
+ \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 }
+ \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 }
+ \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim +
+ \l_shipout_box_dp_dim }
+}
+\dim_new:N \l_shipout_box_ht_dim
+\dim_new:N \l_shipout_box_dp_dim
+\dim_new:N \l_shipout_box_wd_dim
+\dim_new:N \l_shipout_box_ht_plus_dp_dim
+\bool_new:N \g__shipout_discard_bool
+\box_new:N \l__shipout_tmp_box
+\tl_new:N \l__shipout_saved_badness_tl
+\cs_new:Npn \__shipout_add_background_box:n #1
+{ \__shipout_get_box_size:N \l_shipout_box
+ \box_if_vertical:NTF \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \box_use:N \l__shipout_tmp_box
+ \vbox_unpack:N \l_shipout_box
+ \kern \c_zero_dim
+ }
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+ \l__shipout_saved_badness_tl
+ }
+ {
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_move_up:nn
+ \l_shipout_box_ht_dim
+ { \box_use:N \l__shipout_tmp_box }
+ \hbox_unpack:N \l_shipout_box
+ }
+ \l__shipout_saved_badness_tl
+ }
+ }
+}
+\cs_new:Npn \__shipout_add_foreground_box:n #1
+{
+ \box_if_vertical:NTF \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \vbox_unpack:N \l_shipout_box
+ \kern -\l_shipout_box_ht_plus_dp_dim
+ \box_use:N \l__shipout_tmp_box
+ \kern \l_shipout_box_ht_plus_dp_dim
+ }
+ \l__shipout_saved_badness_tl
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+ }
+ {
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_unpack:N \l_shipout_box
+ \kern -\box_wd:N \l_shipout_box
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_move_up:nn { \box_ht:N \l_shipout_box }
+ { \box_use:N \l__shipout_tmp_box }
+ \kern \box_wd:N \l_shipout_box
+ }%
+ \l__shipout_saved_badness_tl
+ }
+ }
+}
+\cs_new:Npn \__shipout_init_page_origins: {
+ \tl_const:Nx \c__shipout_horigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { horigin }
+ { \cs_if_exist_use:NF \pdfhorigin { 1in } }
+ }
+ \tl_const:Nx \c__shipout_vorigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { vorigin }
+ { \cs_if_exist_use:NF \pdfvorigin { 1in } }
+ }
+ \cs_gset_eq:NN \__shipout_init_page_origins: \prg_do_nothing:
+}
+\cs_new:Npn \__shipout_picture_overlay:n #1 {
+ \__shipout_init_page_origins:
+ \kern -\c__shipout_horigin_tl \scan_stop:
+ \vbox_to_zero:n {
+ \kern -\c__shipout_vorigin_tl \scan_stop:
+ \unitlength 1pt \scan_stop:
+ \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim { \ignorespaces #1 }
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_use:N \l__shipout_tmp_box
+ \tex_vss:D
+ }
+}
+\cs_new:Npn \__shipout_add_background_picture:n #1 {
+ \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} }
+}
+\cs_new:Npn \__shipout_add_foreground_picture:n #1 {
+ \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} }
+}
+\cs_new:Npn \shipout_discard: {
+ \bool_gset_true:N \g__shipout_discard_bool
+}
+\int_new:N \g_shipout_readonly_int
+\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int
+\int_new:N \g_shipout_totalpages_int
+\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int
+\cs_new:Npn \thetotalpages { \arabic{totalpages} }
+\xdef\@abspage@last{\number\maxdimen}
+\g@addto@macro \@kernel@after@enddocument {
+ \int_compare:nNnT \@abspage@last = \maxdimen
+ {
+ \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} }
+ }
+}
+\g@addto@macro \@kernel@after@enddocument@afterlastpage {
+ \int_compare:nNnF \g_shipout_readonly_int = 0
+ {
+ \if@filesw
+ \iow_now:Nx \@auxout {
+ \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}}
+ \fi
+ \bool_if:NF \g__shipout_lastpage_handled_bool
+ {
+ \bool_lazy_and:nnF
+ { \hook_if_empty_p:n {shipout/lastpage} }
+ { \tl_if_empty_p:N \@kernel@after@shipout@lastpage }
+ {
+ \tex_shipout:D\vbox to\textheight
+ {
+ \hbox:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+ \__shipout_excuse_extra_page:
+ \null
+ }
+ \cs_gset_eq:NN \@extra@page@added \relax
+ }
+ }
+ }
+}
+\cs_new:Npn \__shipout_excuse_extra_page: {
+ \vfil
+ \begin{center}
+ \bfseries Temporary~ page!
+ \end{center}
+ \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~
+ correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~
+ should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~
+ page~ has~ been~ added~ to~ receive~ it.
+ \par
+ If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~
+ surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~
+ how~ many~ pages~ to~ expect~ for~ this~ document.
+ \vfil
+}
+\def\PreviousTotalPages{0}
+\g@addto@macro\@kernel@before@begindocument
+ {\ifnum\@abspage@last<\maxdimen
+ \xdef\PreviousTotalPages{\@abspage@last}\fi}
+\cs_new_eq:NN \DiscardShipoutBox \shipout_discard:
+\DeclareRobustCommand \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi}
+\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on:
+\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off:
+\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn
+ \__shipout_add_firstpage_material:Nn
+\cs_set_eq:NN \@expl@@@shipout@add@background@box@@n
+ \__shipout_add_background_box:n
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n
+ \__shipout_add_foreground_box:n
+\cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n
+ \__shipout_add_background_picture:n
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n
+ \__shipout_add_foreground_picture:n
+\ExplSyntaxOff
+\ExplSyntaxOn
+\cs_new:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
+\ExplSyntaxOff
+\disable@package@load{atenddvi}
+ {\PackageWarning{atenddvi}
+ {Functionality of this package is already\MessageBreak
+ provided by LaTeX.\MessageBreak\MessageBreak
+ It is there no longer necessary to load it\MessageBreak
+ and you can safely remove it.\MessageBreak
+ Found on}}
+\declare@file@substitution{atbegshi.sty}{atbegshi-ltx.sty}
+\declare@file@substitution{everyshi.sty}{everyshi-ltx.sty}
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltoutput.dtx
\expandafter\let\csname ver@autoout1.sty\endcsname\fmtversion
\message{output,}
@@ -8338,10 +11048,6 @@ Type H <return> for immediate help.}%
\newdimen\marginparsep
\newdimen\marginparpush
\newbox\@begindvibox
-\DeclareRobustCommand \AtBeginDvi [1]{%
- \global \setbox \@begindvibox
- \vbox{\unvbox \@begindvibox #1}%
-}
\newdimen\@maxdepth
\@maxdepth = \maxdepth
\newdimen\paperheight
@@ -9339,801 +12045,6 @@ Type H <return> for immediate help.}%
\let\topfigrule=\relax
\let\botfigrule=\relax
\let\dblfigrule=\relax
-%%% From File: ltclass.dtx
-\newif\if@compatibility
-\def\@documentclasshook{%
- \ifx\@normalsize\@undefined
- \let\@normalsize\normalsize
- \fi
-}
-\let\@declaredoptions\@empty
-\let\@classoptionslist\relax
-\@onlypreamble\@classoptionslist
-\let\@unusedoptionlist\@empty
-\@onlypreamble\@unusedoptionlist
-\let\CurrentOption\@empty
-\let\@currname\@empty
-\global\let\@currext=\@empty
-\def\@clsextension{cls}
-\def\@pkgextension{sty}
-\@onlypreamble\@clsextension
-\@onlypreamble\@pkgextension
-\def\@pushfilename{%
- \@expl@push@filename@@
- \xdef\@currnamestack{%
- {\@currname}%
- {\@currext}%
- {\the\catcode`\@}%
- \@currnamestack}%
- \@expl@push@filename@aux@@}
-\@onlypreamble\@pushfilename
-\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil
- \@expl@pop@filename@@}
-\@onlypreamble\@popfilename
-\def\@p@pfilename#1#2#3#4\@nil{%
- \gdef\@currname{#1}%
- \gdef\@currext{#2}%
- \catcode`\@#3\relax
- \gdef\@currnamestack{#4}}
-\@onlypreamble\@p@pfilename
-\gdef\@currnamestack{}
-\@onlypreamble\@currnamestack
-\def\@ptionlist#1{%
- \@ifundefined{opt@#1}\@empty{\csname opt@#1\endcsname}}
-\@onlypreamble\@ptionlist
-\def\@ifpackageloaded{\@ifl@aded\@pkgextension}
-\def\@ifclassloaded{\@ifl@aded\@clsextension}
-\@onlypreamble\@ifpackageloaded
-\@onlypreamble\@ifclassloaded
-\def\@ifl@aded#1#2{%
- \expandafter\ifx\csname ver@#2.#1\endcsname\relax
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi}
-\@onlypreamble\@ifl@aded
-\def\@ifpackagelater{\@ifl@ter\@pkgextension}
-\def\@ifclasslater{\@ifl@ter\@clsextension}
-\@onlypreamble\@ifpackagelater
-\@onlypreamble\@ifclasslater
-\def\IfFormatAtLeastTF{\@ifl@t@r\fmtversion}
-\let\IfPackageAtLeastTF\@ifpackagelater
-\let\IfClassAtLeastTF\@ifclasslater
-\@onlypreamble\IfFormatAtLeastTF
-\@onlypreamble\IfPackageAtLeastTF
-\@onlypreamble\IfClassAtLeastTF
-\def\@ifl@ter#1#2{%
- \expandafter\@ifl@t@r
- \csname ver@#2.#1\endcsname}
-\@onlypreamble\@ifl@ter
-\def\@ifl@t@r#1#2{%
- \ifnum\expandafter\@parse@version@#1//00\@nil<%
- \expandafter\@parse@version@#2//00\@nil
- \expandafter\@secondoftwo
- \else
- \expandafter\@firstoftwo
- \fi}
-\def\@parse@version@#1{\@parse@version0#1}
-\@onlypreamble\@ifl@t@r
-\def\@parse@version#1/#2/#3#4#5\@nil{%
-\@parse@version@dash#1-#2-#3#4\@nil
-}
-\def\@parse@version@dash#1-#2-#3#4#5\@nil{%
- \if\relax#2\relax\else#1\fi#2#3#4 }
-\def\@ifpackagewith{\@if@ptions\@pkgextension}
-\def\@ifclasswith{\@if@ptions\@clsextension}
-\@onlypreamble\@ifpackagewith
-\@onlypreamble\@ifclasswith
-\def\@if@ptions#1#2{%
- \@expandtwoargs\@if@pti@ns{\@ptionlist{#2.#1}}}
-\@onlypreamble\@if@ptions
-\def\@if@pti@ns#1#2{%
- \let\reserved@a\@firstoftwo
- \edef\reserved@b{\zap@space#2 \@empty}%
- \@for\reserved@b:=\reserved@b\do{%
- \ifx\reserved@b\@empty
- \else
- \expandafter\in@\expandafter{\expandafter,\reserved@b,}{,#1,}%
- \ifin@
- \else
- \let\reserved@a\@secondoftwo
- \fi
- \fi
- }%
- \reserved@a}
-\@onlypreamble\@if@pti@ns
-\def\ProvidesPackage#1{%
- \xdef\@gtempa{#1}%
- \ifx\@gtempa\@currname\else
- \@latex@warning@no@line{You have requested
- \@cls@pkg\space`\@currname',\MessageBreak
- but the \@cls@pkg\space provides `#1'}%
- \fi
- \@ifnextchar[\@pr@videpackage{\@pr@videpackage[]}}%]
-\@onlypreamble\ProvidesPackage
-\def\@pr@videpackage[#1]{%
- \expandafter\protected@xdef % <-- protected...
- \csname ver@\@currname.\@currext\endcsname{#1}%
- \ifx\@currext\@clsextension
- \typeout{Document Class: \@gtempa\space#1}%
- \else
- \protected@wlog{Package: \@gtempa\space#1}% <--- protected
- \fi}
-\long\def\protected@wlog#1{\begingroup
- \set@display@protect
- \immediate \write \m@ne {#1}\endgroup }
-\@onlypreamble\@pr@videpackage
-\let\ProvidesClass\ProvidesPackage
-\@onlypreamble\ProvidesClass
-\def\ProvidesFile#1{%
- \begingroup
- \catcode`\ 10 %
- \ifnum \endlinechar<256 %
- \ifnum \endlinechar>\m@ne
- \catcode\endlinechar 10 %
- \fi
- \fi
- \@makeother\/%
- \@makeother\&%
- \kernel@ifnextchar[{\@providesfile{#1}}{\@providesfile{#1}[]}}
-\def\@pass@ptions#1#2#3{%
- \expandafter\xdef\csname opt@#3.#1\endcsname{%
- \@ifundefined{opt@#3.#1}\@empty
- {\csname opt@#3.#1\endcsname,}%
- \zap@space#2 \@empty}}
-\@onlypreamble\@pass@ptions
-\def\PassOptionsToPackage{\@pass@ptions\@pkgextension}
-\def\PassOptionsToClass{\@pass@ptions\@clsextension}
-\@onlypreamble\PassOptionsToPackage
-\@onlypreamble\PassOptionsToClass
-\def\DeclareOption{%
- \let\@fileswith@pti@ns\@badrequireerror
- \@ifstar\@defdefault@ds\@declareoption}
-\long\def\@declareoption#1#2{%
- \xdef\@declaredoptions{\@declaredoptions,#1}%
- \toks@{#2}%
- \expandafter\edef\csname ds@#1\endcsname{\the\toks@}}
-\long\def\@defdefault@ds#1{%
- \toks@{#1}%
- \edef\default@ds{\the\toks@}}
-\@onlypreamble\DeclareOption
-\@onlypreamble\@declareoption
-\@onlypreamble\@defdefault@ds
-\def\OptionNotUsed{%
- \ifx\@currext\@clsextension
- \xdef\@unusedoptionlist{%
- \ifx\@unusedoptionlist\@empty\else\@unusedoptionlist,\fi
- \CurrentOption}%
- \fi}
-\@onlypreamble\OptionNotUsed
-\def\ProcessOptions{%
- \let\ds@\@empty
- \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
- \@ifstar\@xprocess@ptions\@process@ptions}
-\@onlypreamble\ProcessOptions
-\def\@process@ptions{%
- \@for\CurrentOption:=\@declaredoptions\do{%
- \ifx\CurrentOption\@empty\else
- \@expandtwoargs\in@{,\CurrentOption,}{%
- ,\ifx\@currext\@clsextension\else\@classoptionslist,\fi
- \@curroptions,}%
- \ifin@
- \@use@ption
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- \fi
- \fi}%
- \@process@pti@ns}
-\@onlypreamble\@process@ptions
-\def\@xprocess@ptions{%
- \ifx\@currext\@clsextension\else
- \@for\CurrentOption:=\@classoptionslist\do{%
- \ifx\CurrentOption\@empty\else
- \@expandtwoargs\in@{,\CurrentOption,}{,\@declaredoptions,}%
- \ifin@
- \@use@ption
- \expandafter\let\csname ds@\CurrentOption\endcsname\@empty
- \fi
- \fi}%
- \fi
- \@process@pti@ns}
-\@onlypreamble\@xprocess@ptions
-\def\@process@pti@ns{%
- \@for\CurrentOption:=\@curroptions\do{%
- \@ifundefined{ds@\CurrentOption}%
- {\@use@ption
- \default@ds}%
- \@use@ption}%
- \@for\CurrentOption:=\@declaredoptions\do{%
- \expandafter\let\csname ds@\CurrentOption\endcsname\relax}%
- \let\CurrentOption\@empty
- \let\@fileswith@pti@ns\@@fileswith@pti@ns
- \AtEndOfPackage{\expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \relax}}
-\@onlypreamble\@process@pti@ns
-\def\@options{\ProcessOptions*}
-\@onlypreamble\@options
-\def\@use@ption{%
- \@expandtwoargs\@removeelement\CurrentOption
- \@unusedoptionlist\@unusedoptionlist
- \csname ds@\CurrentOption\endcsname}
-\@onlypreamble\@use@ption
-\def\ExecuteOptions#1{%
- \edef\@fortmp{\zap@space#1 \@empty}%
- \def\reserved@a##1\@nil{%
- \@for\CurrentOption:=\@fortmp\do
- {\csname ds@\CurrentOption\endcsname}%
- \edef\CurrentOption{##1}}%
- \expandafter\reserved@a\CurrentOption\@nil}
-\@onlypreamble\ExecuteOptions
-\def\documentclass{%
- \let\documentclass\@twoclasseserror
- \if@compatibility\else\let\usepackage\RequirePackage\fi
- \@fileswithoptions\@clsextension}
-\@onlypreamble\documentclass
-\def\documentstyle{%
- \makeatletter\input{latex209.def}\makeatother
- \documentclass}
-\@onlypreamble\documentstyle
-\def\RequirePackage{%
- \@fileswithoptions\@pkgextension}
-\@onlypreamble\RequirePackage
-\def\LoadClass{%
- \ifx\@currext\@pkgextension
- \@latex@error
- {\noexpand\LoadClass in package file}%
- {You may only use \noexpand\LoadClass in a class file.}%
- \fi
- \@fileswithoptions\@clsextension}
-\@onlypreamble\LoadClass
-\def\@loadwithoptions#1#2#3{%
- \expandafter\let\csname opt@#3.#1\expandafter\endcsname
- \csname opt@\@currname.\@currext\endcsname
- #2{#3}}
-\@onlypreamble\@loadwithoptions
-\def\LoadClassWithOptions{%
- \@loadwithoptions\@clsextension\LoadClass}
-\@onlypreamble\LoadClassWithOptions
-\def\RequirePackageWithOptions{%
- \AtEndOfPackage{\expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \relax}%
- \@loadwithoptions\@pkgextension\RequirePackage}
-\@onlypreamble\RequirePackageWithOptions
-
-\def\usepackage#1#{%
- \@latex@error
- {\noexpand \usepackage before \string\documentclass}%
- {\noexpand \usepackage may only appear in the document
- preamble, i.e.,\MessageBreak
- between \noexpand\documentclass and
- \string\begin{document}.}%
- \@gobble}
-\@onlypreamble\usepackage
-\def\NeedsTeXFormat#1{%
- \def\reserved@a{#1}%
- \ifx\reserved@a\fmtname
- \expandafter\@needsformat
- \else
- \@latex@error{This file needs format `\reserved@a'%
- \MessageBreak but this is `\fmtname'}{%
- The current input file will not be processed
- further,\MessageBreak
- because it was written for some other flavor of
- TeX.\MessageBreak\@ehd}%
- \endinput \fi}
-\@onlypreamble\NeedsTeXFormat
-\def\@needsformat{%
- \@ifnextchar[%]
- \@needsf@rmat
- {}}
-\@onlypreamble\@needsformat
-\def\@needsf@rmat[#1]{%
- \@ifl@t@r\fmtversion{#1}{}%
- {\@latex@warning@no@line
- {You have requested release `#1' of LaTeX,\MessageBreak
- but only release `\fmtversion' is available}}}
-\@onlypreamble\@needsf@rmat
-\def\zap@space#1 #2{%
- #1%
- \ifx#2\@empty\else\expandafter\zap@space\fi
- #2}
-\def\@fileswithoptions#1{%
- \@ifnextchar[%]
- {\@fileswith@ptions#1}%
- {\@fileswith@ptions#1[]}}
-\@onlypreamble\@fileswithoptions
-\def\@fileswith@ptions#1[#2]#3{%
- \@ifnextchar[%]
- {\@fileswith@pti@ns#1[{#2}]#3}%
- {\@fileswith@pti@ns#1[{#2}]#3[]}}
-\@onlypreamble\@fileswith@ptions
-\def\@fileswith@pti@ns#1[#2]#3[#4]{%
- \ifx#1\@clsextension
- \ifx\@classoptionslist\relax
- \xdef\@classoptionslist{\zap@space#2 \@empty}%
- \def\reserved@a{%
- \@onefilewithoptions#3[{#2}][{#4}]#1%
- \@documentclasshook}%
- \else
- \def\reserved@a{%
- \@onefilewithoptions#3[{#2}][{#4}]#1}%
- \fi
- \else
- \def\reserved@b##1,{%
- \ifx\@nnil##1\relax\else
- \ifx\@nnil##1\@nnil\else
- \noexpand\@onefilewithoptions##1[{#2}][{#4}]%
- \noexpand\@pkgextension
- \fi
- \expandafter\reserved@b
- \fi}%
- \edef\reserved@a{\zap@space#3 \@empty}%
- \edef\reserved@a{\expandafter\reserved@b\reserved@a,\@nnil,}%
- \fi
- \reserved@a}
-\@onlypreamble\@fileswith@pti@ns
-\def\@onefilewithoptions#1[#2][#3]#4{%
- \@pushfilename
- \xdef\@currname{#1}%
- \global\let\@currext#4%
- \let\CurrentOption\@empty
- \@reset@ptions
- \makeatletter
- \def\reserved@a{%
- \@ifl@aded\@currext{#1}%
- {\@if@ptions\@currext{#1}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space #1}%
- {The package #1 has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{#1.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}}%
- {\@pass@ptions\@currext{#2}{#1}%
- \global\expandafter
- \let\csname ver@\@currname.\@currext\endcsname\@empty
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
- \InputIfFileExists
- {\@currname.\@currext}%
- {}%
- {\@missingfileerror\@currname\@currext}%
- \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
- \@@unprocessedoptions
- \csname\@currname.\@currext-h@@k\endcsname
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
- \@undefined
- \ifx\@unprocessedoptions\relax
- \let\@unprocessedoptions\@undefined
- \else
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \fi
- \expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \@undefined}%
- \@ifl@ter\@currext{#1}{#3}{}%
- {\@latex@warning@no@line
- {You have requested,\on@line,
- version\MessageBreak
- `#3' of \@cls@pkg\space #1,\MessageBreak
- but only version\MessageBreak
- `\csname ver@#1.\@currext\endcsname'\MessageBreak
- is available}}%
- \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
- \@popfilename
- \@reset@ptions}%
- \reserved@a}
-\@onlypreamble\@onefilewithoptions
-\let\@unprocessedoptions\@undefined
-\let\@@fileswith@pti@ns\@fileswith@pti@ns
-\@onlypreamble\@@fileswith@pti@ns
-\def\@reset@ptions{%
- \global\ifx\@currext\@clsextension
- \let\default@ds\OptionNotUsed
- \else
- \let\default@ds\@unknownoptionerror
- \fi
- \global\let\ds@\@empty
- \global\let\@declaredoptions\@empty}
-\@onlypreamble\@reset@ptions
-\ifx\@begindocumenthook\@undefined
- \let\@begindocumenthook\@empty
-\fi
-\let\@enddocumenthook\@empty
-\long\def\g@addto@macro#1#2{%
- \begingroup
- \toks@\expandafter{#1#2}%
- \xdef#1{\the\toks@}%
- \endgroup}
-\def\AtEndOfPackage{%
- \expandafter\g@addto@macro\csname\@currname.\@currext-h@@k\endcsname}
-\let\AtEndOfClass\AtEndOfPackage
-\@onlypreamble\AtEndOfPackage
-\@onlypreamble\AtEndOfClass
-\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook}
-\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook}
-\@onlypreamble\AtBeginDocument
-\def\@cls@pkg{%
- \ifx\@currext\@clsextension
- document class%
- \else
- package%
- \fi}
-\@onlypreamble\@cls@pkg
-\def\@unknownoptionerror{%
- \@latex@error
- {Unknown option `\CurrentOption' for \@cls@pkg\space`\@currname'}%
- {The option `\CurrentOption' was not declared in
- \@cls@pkg\space`\@currname', perhaps you\MessageBreak
- misspelled its name.
- Try typing \space <return>
- \space to proceed.}}
-\@onlypreamble\@unknownoptionerror
-\def\@@unprocessedoptions{%
- \ifx\@currext\@pkgextension
- \edef\@curroptions{\@ptionlist{\@currname.\@currext}}%
- \@for\CurrentOption:=\@curroptions\do{%
- \ifx\CurrentOption\@empty\else\@unknownoptionerror\fi}%
- \fi}
-\@onlypreamble\@unprocessedoptions
-\@onlypreamble\@@unprocessedoptions
-\def\@badrequireerror#1[#2]#3[#4]{%
- \@latex@error
- {\noexpand\RequirePackage or \noexpand\LoadClass
- in Options Section}%
- {The \@cls@pkg\space `\@currname' is defective.\MessageBreak
- It attempts to load `#3' in the options section, i.e.,\MessageBreak
- between \noexpand\DeclareOption and \string\ProcessOptions.}}
-\@onlypreamble\@badrequireerror
-\def\@twoloadclasserror{%
- \@latex@error
- {Two \noexpand\LoadClass commands}%
- {You may only use one \noexpand\LoadClass in a class file}}
-\@onlypreamble\@twoloadclasserror
-\def\@twoclasseserror#1#{%
- \@latex@error
- {Two \noexpand\documentclass or \noexpand\documentstyle commands}%
- {The document may only declare one class.}\@gobble}
-\@onlypreamble\@twoclasseserror
-\def\two@digits#1{\ifnum#1<10 0\fi\number#1}
-\def\filecontents{\@tempswatrue\@fileswtrue
- \@ifnextchar[\filec@ntents@opt\filec@ntents
-}
-\@namedef{filecontents*}{\@tempswafalse\@fileswtrue
- \@ifnextchar[\filec@ntents@opt\filec@ntents
-}
-\def\filec@ntents@opt[#1]{%
- \edef\@fortmp{\zap@space#1 \@empty}%
- \@for\reserved@a:=\@fortmp\do{%
- \ifcsname filec@ntents@\reserved@a\endcsname
- \csname filec@ntents@\reserved@a\endcsname
- \else
- \@latex@error{Unknown filecontents option \reserved@a}%
- {Valid options are force (or overwrite), nosearch, noheader}%
- \fi}%
- \filec@ntents
-}
-\let\filec@ntents@force\@fileswfalse
-\let\filec@ntents@overwrite\@fileswfalse % alternative name
-\let\filec@ntents@noheader\@tempswafalse
-\def\filec@ntents@nosearch{%
- \let\filec@ntents@checkdir\@currdir
- \def\filec@ntents@where{in current directory}}
-\let\filec@ntents@checkdir\@empty
-\def\filec@ntents@where{exists on the system}
-\begingroup%
-\@tempcnta=1
-\loop
- \catcode\@tempcnta=12 %
- \advance\@tempcnta\@ne %
-\ifnum\@tempcnta<32 %
-\repeat %
-\catcode`\*=11 %
-\catcode`\^^M\active%
-\catcode`\^^L\active\let^^L\relax%
-\catcode`\^^I\active%
-\gdef\filec@ntents#1{%
- \set@curr@file{\filec@ntents@checkdir#1}%
- \edef\q@curr@file{\expandafter\quote@name\expandafter{\@curr@file}}%
- \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi%
- \openin\@inputcheck\q@curr@file \space %
- \ifeof\@inputcheck%
- \@latex@warning@no@line%
- {Writing file `\@currdir\@curr@file'}%
- \ch@ck7\reserved@c\write\relax%
- \immediate\openout\reserved@c\q@curr@file\relax%
- \else%
- \if@filesw%
- \@latex@warning@no@line%
- {File `\@curr@file' already \filec@ntents@where.\MessageBreak%
- Not generating it from this source}%
- \let\write\@gobbletwo%
- \let\closeout\@gobble%
- \else%
- \edef\reserved@a{#1}%
- \edef\reserved@a{\detokenize\expandafter{\reserved@a}}%
- \edef\reserved@b{\detokenize\expandafter{\jobname}}%
- \ifx\reserved@a\reserved@b%
- \@fileswtrue%
- \else%
- \edef\reserved@b{\reserved@b\detokenize{.tex}}%
- \ifx\reserved@a\reserved@b
- \@fileswtrue%
- \fi%
- \fi%
- \ch@ck7\reserved@c\write\relax%
- \if@filesw% % Foul ... trying to overwrite \jobname!
- \@latex@error{Trying to overwrite `\jobname.tex'}{You can't %
- write to the file you are reading from!\MessageBreak%
- Data is written to screen instead.}%
- \else%
- \@latex@warning@no@line%
- {Writing or overwriting file `\@currdir\@curr@file'}%
- \immediate\openout\reserved@c\q@curr@file\relax%
- \fi%
- \fi%
- \fi%
- \closein\@inputcheck%
- \if@tempswa%
- \immediate\write\reserved@c{%
- \@percentchar\@percentchar\space%
- \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J%
- \@percentchar\@percentchar\space generated by the %
- `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
- \@percentchar\@percentchar\space from source `\jobname' on %
- \number\year/\two@digits\month/\two@digits\day.^^J%
- \@percentchar\@percentchar}%
- \fi%
- \let\do\@makeother\dospecials%
- \count@ 128\relax%
- \loop%
- \catcode\count@ 11\relax%
- \advance\count@ \@ne%
- \ifnum\count@<\@cclvi%
- \repeat%
- \edef\E{\@backslashchar end\string{\@currenvir\string}}%
- \edef\reserved@b{%
- \def\noexpand\reserved@b%
- ####1\E####2\E####3\relax}%
- \reserved@b{%
- \ifx\relax##3\relax%
- \immediate\write\reserved@c{##1}%
- \else%
- \edef^^M{\noexpand\end{\@currenvir}}%
- \ifx\relax##1\relax%
- \else%
- \@latex@warning{Writing text `##1' before %
- \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
- \immediate\write\reserved@c{##1}%
- \fi%
- \ifx\relax##2\relax%
- \else%
- \@latex@warning{%
- Ignoring text `##2' after \string\end{\@currenvir}}%
- \fi%
- \fi%
- ^^M}%
- \catcode`\^^L\active%
- \let\L\@undefined%
- \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
- \catcode`\^^I\active%
- \let\I\@undefined%
- \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
- \catcode`\^^M\active%
- \edef^^M##1^^M{%
- \noexpand\reserved@b##1\E\E\relax}}%
-\endgroup%
-\begingroup
-\catcode`|=\catcode`\%
-\catcode`\%=12
-\catcode`\*=11
-\gdef\@percentchar{%}
-\gdef\endfilecontents{|
- \immediate\closeout\reserved@c
- \def\T##1##2##3{|
- \ifx##1\@undefined\else
- \@latex@warning@no@line{##2 has been converted to Blank ##3e}|
- \fi}|
- \T\L{Form Feed}{Lin}|
- \T\I{Tab}{Spac}|
- \immediate\write\@unused{}}
-\global\let\endfilecontents*\endfilecontents
-\endgroup
-\let\pkgcls@debug\@gobble
-\def\requestedLaTeXdate{0}
-\ifx\pkgcls@targetdate\@undefined
- \newcount\pkgcls@targetdate
-\fi
-\let\pkgcls@targetlabel\@empty
-\def\pkgcls@innerdate{\maxdimen}
-\let\pkgcls@candidate\@empty
-\let\pkgcls@releasedate\@empty
-\ifx\load@onefilewithoptions\@undefined
- \let\load@onefilewithoptions\@onefilewithoptions
- \def\@onefilewithoptions#1[#2][#3]#4{%
- \pkgcls@debug{--- File loaded request (\noexpand\usepackage or ...)}%
- \pkgcls@debug{\@spaces 1: #1}%
- \pkgcls@debug{\@spaces 2: #2}%
- \pkgcls@debug{\@spaces 3: #3}%
- \pkgcls@debug{\@spaces 4: #4}%
- \def\pkgcls@name{#1}% % for info message
- \def\pkgcls@arg {#3}% % for info message
- \pkgcls@parse@date@arg{#3}%
- \let\pkgcls@candidate\@empty
- \begingroup
- \edef\reserved@a{%
- \endgroup
- \unexpanded{\load@onefilewithoptions#1[#2]}%
- [\pkgcls@mindate]%
- \unexpanded{#4}}%
- \reserved@a
- }
-\fi
-\def\pkgcls@parse@date@arg #1{%
- \ifx\@nil#1\@nil
- \pkgcls@targetdate\requestedLaTeXdate\relax
- \let\pkgcls@targetlabel\@empty
- \let\pkgcls@mindate\@empty
- \else
- \pkgcls@parse@date@arg@#1=\@nil\relax
- \fi
- }
-\def\pkgcls@parse@date@arg@#1=#2\@nil{%
- \pkgcls@targetdate
- \ifx\@nil#1\@nil
- \@parse@version0#2//00\@nil\relax
- \ifnum \pkgcls@targetdate=\z@
- \pkgcls@targetdate\@ne
- \def\pkgcls@innerdate{\maxdimen}%
- \pkgcls@parse@date@arg@version#2%
- \else
- \edef\pkgcls@innerdate{\the\pkgcls@targetdate}%
- \fi
- \let\pkgcls@mindate\@empty
- \else
- \requestedLaTeXdate\relax
- \let\pkgcls@targetlabel\@empty
- \def\pkgcls@innerdate{\maxdimen}%
- \def\pkgcls@mindate{#1}%
- \ifnum \pkgcls@targetdate > \z@
- \ifnum \@parse@version0#1//00\@nil > \pkgcls@targetdate
- \@latex@warning@no@line{Suspicious rollback/min-date date given\MessageBreak
- A minimal date of #1 has been specified for
- \@cls@pkg\MessageBreak '\pkgcls@name'.\MessageBreak
- But this is in conflict
- with a rollback request to \requestedpatchdate}
- \fi
- \fi
- \fi
-}
-\def\pkgcls@parse@date@arg@version#1={%
- \def\pkgcls@targetlabel{#1}}
-\def\DeclareRelease#1#2#3{%
- \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
- \pkgcls@debug{---\string\DeclareRelease:}%
- \pkgcls@debug{\@spaces 1: #1}%
- \pkgcls@debug{\@spaces 2: #2}%
- \pkgcls@debug{\@spaces 3: #3}%
- \ifx\@nil#2\@nil
- \ifnum\pkgcls@targetdate=\@ne % named request
- \def\reserved@a{#1}%
- \ifx\pkgcls@targetlabel\reserved@a
- \pkgcls@use@this@release{#3}{}%
- \else
- \pkgcls@debug{Label doesn't match}%
- \fi
- \else
- \pkgcls@debug{Date request: ignored}%
- \fi
- \else
- \ifnum\pkgcls@targetdate>\@ne % a real request
- \ifnum\@parse@version#2//00\@nil
- >\pkgcls@targetdate
- \ifx\pkgcls@candidate\@empty
- \pkgcls@rollbackdate@error{#2}%
- \pkgcls@use@this@release{#3}{#2}%
- \else
- \pkgcls@use@this@release\pkgcls@candidate
- \pkgcls@releasedate
- \fi
- \else
- \def\pkgcls@candidate{#3}%
- \def\pkgcls@releasedate{#2}%
- \pkgcls@debug{New candidate: #3}%
- \fi
- \else
- \def\reserved@a{#1}%
- \ifx\pkgcls@targetlabel\reserved@a
- \pkgcls@use@this@release{#3}{#2}%
- \else
- \pkgcls@debug{Label doesn't match}%
- \fi
- \fi
- \fi
- \fi
-}
-\def\pkgcls@use@this@release#1#2{%
- \pkgcls@show@selection{#1}{#2}%
- \pkgcls@targetdate\z@
- \@@input #1\relax
- \endinput
-}
-\def\pkgcls@show@selection#1#2{%
- \pkgcls@debug{Result: use #1}%
- \GenericInfo
- {\@spaces\@spaces\space}{Rollback for
- \@cls@pkg\space'\@currname' requested ->
- \ifnum\pkgcls@targetdate>\@ne
- date
- \ifnum\requestedLaTeXdate=\pkgcls@targetdate
- \requestedpatchdate
- \else
- \expandafter\@gobble\pkgcls@arg
- \fi.\MessageBreak
- Best approximation is
- \else
- version '\pkgcls@targetlabel'.\MessageBreak
- This corresponds to
- \fi
- \ifx\@nil#2\@nil
- a special release%
- \else
- the release introduced on #2%
- \fi
- \@gobble}%
-}
-\def\pkgcls@rollbackdate@error#1{%
- \@latex@error{Suspicious rollback date given}%
- {The \@cls@pkg\space'\@currname' claims that it
- came into existence on #1 which\MessageBreak
- is after your requested rollback date --- so
- something is wrong here.\MessageBreak
- Continue and we use the earliest known release.}}
-\def\DeclareCurrentRelease#1#2{%
- \ifnum\pkgcls@targetdate>\z@ % some sort of rollback request
- \pkgcls@debug{---DeclareCurrentRelease}%
- \pkgcls@debug{ 1: #1}%
- \pkgcls@debug{ 2: #2}%
- \ifnum\pkgcls@targetdate>\@ne % a date request
- \ifnum\@parse@version#2//00\@nil
- >\pkgcls@targetdate
- \ifx\pkgcls@candidate\@empty
- \pkgcls@rollbackdate@error{#2}%
- \else
- \pkgcls@use@this@release\pkgcls@candidate
- \pkgcls@releasedate
- \fi
- \else
- \pkgcls@show@selection{current version}{#2}%
- \fi
- \else % a label request
- \def\reserved@a{#1}%
- \ifx\pkgcls@targetlabel\reserved@a
- \pkgcls@show@selection{current version}{#2}%
- \else
- \@latex@error{Requested version '\pkgcls@targetlabel' for
- \@cls@pkg\space'\@currname' is unknown}\@ehc
- \fi
- \fi
- \fi
-}
-\DeclareRobustCommand\IfTargetDateBefore[1]{%
- \ifnum\pkgcls@innerdate <%
- \expandafter\@parse@version\expandafter0#1//00\@nil
- \typeout{Exclude code introduced on #1}%
- \expandafter\@firstoftwo
- \else
- \typeout{Include code introduced on #1}%
- \expandafter\@secondoftwo
- \fi
-}
%%% From File: ltfinal.dtx
\tracingstats1
\newcount\@lowpenalty
@@ -10252,7 +12163,7 @@ Type H <return> for immediate help.}%
\def\font@submax{0pt}
\fi
\ifnum0%
- \ifx\Umathchar\@undefined\else 1\fi
+ \ifx\Umathcode\@undefined\else 1\fi
\ifx\mubyte\@undefined\else 1\fi
\ifx\charsubdef\@undefined\else 1\fi
=\z@
@@ -10452,12 +12363,6 @@ Type H <return> for immediate help.}%
\endgroup}
\let\@filelist\@gobble
\def\@addtofilelist#1{\xdef\@filelist{\@filelist,#1}}%
-\input lthooks.ltx
-\input ltshipout.ltx
-\input ltfilehook.ltx
-
-\g@addto@macro\@kernel@after@env@document@begin
- {\reinstall@nfss@defs\init@series@setup}
\makeatother
\errorstopmode
\dump
diff --git a/Master/texmf-dist/tex/latex-dev/base/latex209.def b/Master/texmf-dist/tex/latex-dev/base/latex209.def
index ab075121bd8..d69aad61ee0 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latex209.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latex209.def
@@ -44,7 +44,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{latex209.def}[2018/08/11 v0.54 Standard LaTeX file]
+\ProvidesFile{latex209.def}[2020/08/21 v0.55 Standard LaTeX file]
\if@compatibility
\expandafter\endinput
\else
@@ -152,6 +152,12 @@
\saved@missingfileerror{#1}{#2}%
\fi
}
+\@ifundefined{@missing@onefilewithoptions}{}{%
+ \def\@missing@onefilewithoptions#1{%
+ \@pass@ptions\@currext{#1}{\@currname}%
+ \@missingfileerror\@currname\@currext
+ \let\@currname\@empty}%
+}
\def\@obsoletefile#1#2{%
\expandafter\let\csname opt@#1\expandafter\endcsname
\csname opt@\@currname.\@currext\endcsname
diff --git a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
index b5ac7332d94..bb34f36cd02 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
@@ -8,7 +8,9 @@
%% ltvers.dtx (with options: `latexrelease')
%% latexrelease.dtx (with options: `latexrelease')
%% ltdirchk.dtx (with options: `latexrelease')
+%% ltexpl.dtx (with options: `latexrelease')
%% ltdefns.dtx (with options: `latexrelease')
+%% lthooks.dtx (with options: `latexrelease')
%% ltalloc.dtx (with options: `latexrelease')
%% ltcntrl.dtx (with options: `latexrelease')
%% lterror.dtx (with options: `latexrelease')
@@ -28,6 +30,8 @@
%% ltidxglo.dtx (with options: `latexrelease')
%% ltbibl.dtx (with options: `latexrelease')
%% ltpage.dtx (with options: `latexrelease')
+%% ltfilehook.dtx (with options: `latexrelease')
+%% ltshipout.dtx (with options: `latexrelease')
%% ltoutput.dtx (with options: `latexrelease')
%% ltclass.dtx (with options: `latexrelease,tracerollback')
%% ltspace.dtx (with options: `latexrelease')
@@ -442,6 +446,91 @@ of this package available from CTAN}
\fi
\edef\filename@base{#1}}
\EndIncludeInRelease
+%%% From File: ltexpl.dtx
+\IncludeInRelease{2020/10/01}%
+ {expl3}{Pre-load expl3}%
+\expandafter\ifx\csname tex\string _let:D\endcsname\relax
+ \expandafter\@firstofone
+\else
+ \GenericInfo{}{Skipping: expl3 code already part of the format}%
+ \expandafter\@gobble
+\fi
+ {%
+ \IfFileExists{expl3.ltx}
+ {%
+ \ifnum0%
+ \ifdefined\pdffilesize 1\fi
+ \ifdefined\filesize 1\fi
+ \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+ \ifdefined\kanjiskip 1\fi
+ >0 %
+ \expandafter\@firstofone
+ \else
+ \@latex@error{%
+ LaTeX requires the e-TeX primitives and additional\MessageBreak
+ functionality available in the engines:\MessageBreak
+ - pdfTeX v1.40\MessageBreak
+ - XeTeX v0.99992\MessageBreak
+ - LuaTeX v0.95\MessageBreak
+ - e-(u)pTeX mid-2012\MessageBreak
+ or later%
+ }\@ehd \expandafter\@gobble
+ \fi
+ }
+ {%
+ \@latex@error{LaTeX requires expl3}\@ehd
+ \@gobble
+ }%
+ {%
+ \input expl3.ltx
+ \ifdefined\NewDocumentCommand
+ \else
+ \IfFileExists{xparse.ltx}
+ {\input xparse.ltx }
+ {}%
+ \fi
+ }%
+ }
+\EndIncludeInRelease
+
+\IncludeInRelease{2020/02/02}%
+ {expl3}{Pre-load expl3}%
+\IfFileExists{expl3.ltx}
+ {%
+ \ifnum0%
+ \ifdefined\pdffilesize 1\fi
+ \ifdefined\filesize 1\fi
+ \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
+ >0 %
+ \else
+ \message{Skipping expl3-dependent extensions}
+ \expandafter\@gobbletwo
+ \fi
+ }
+ {%
+ \message{Skipping expl3-dependent extensions}%
+ \@gobbletwo
+ }%
+\input{expl3.ltx}
+\EndIncludeInRelease
+\ExplSyntaxOn
+\IncludeInRelease{2020/10/01}{expl3~2020-10-01}%
+ {expl3~macros~added~for~the~2020-10-01~release}%
+\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N
+\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF
+\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N
+\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N
+\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{expl3~2020-10-01}%
+ {expl3~macros~added~for~the~2020-10-01~release}%
+\cs_undefine:N \@expl@cs@to@str@@N
+\cs_undefine:N \@expl@str@if@eq@@nnTF
+\cs_undefine:N \@expl@cs@prefix@spec@@N
+\cs_undefine:N \@expl@cs@argument@spec@@N
+\cs_undefine:N \@expl@cs@replacement@spec@@N
+\EndIncludeInRelease
+\ExplSyntaxOff
%%% From File: ltdefns.dtx
\IncludeInRelease{2020/10/01}%
{\typeout}{Allow "par" in \typeout}%
@@ -456,6 +545,45 @@ of this package available from CTAN}
\def\typeout#1{\begingroup\set@display@protect
\immediate\write\@unused{#1}\endgroup}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}{\MakeRobust}{\MakeRobust}%
+\def\MakeRobust#1{%
+ \count@=\escapechar
+ \escapechar=`\\
+ \@ifundefined{\expandafter\@gobble\string#1}{%
+ \@latex@error{The control sequence `\string#1' is undefined!%
+ \MessageBreak There is nothing here to make robust}%
+ \@eha
+ }%
+ {%
+ \@ifundefined{\expandafter\@gobble\string#1\space}%
+ {%
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ #1%
+ \edef\reserved@a{\string#1}%
+ \def\reserved@b{#1}%
+ \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
+ \xdef#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect\noexpand#1%
+ \fi
+ \noexpand\protect\expandafter\noexpand
+ \csname\expandafter\@gobble\string#1\space\endcsname}%
+ }%
+ {\@latex@info{The control sequence `\string#1' is already robust}}%
+ }%
+ \escapechar=\count@
+}%
+\def\@kernel@rename@newcommand#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\afterassignment\global
+ \global\@copy@newcommand#1#2%
+ \global\let#2\@undefined
+ \global\expandafter\let\csname\string#2\endcsname\@undefined}%
+ {\global\let#1=#2}}%
+ {\global\let#1=#2}}
+\EndIncludeInRelease
\IncludeInRelease{2019/10/01}{\MakeRobust}{\MakeRobust}%
\def\MakeRobust#1{%
\@ifundefined{\expandafter\@gobble\string#1}{%
@@ -481,6 +609,7 @@ of this package available from CTAN}
{\@latex@info{The control sequence `\string#1' is already robust}}%
}%
}%
+\let\@kernel@rename@newcommand\@undefined
\EndIncludeInRelease
\IncludeInRelease{2015/01/01}{\MakeRobust}{\MakeRobust}%
\def\MakeRobust#1{%
@@ -507,9 +636,27 @@ of this package available from CTAN}
{\@latex@info{The control sequence `\string#1' is already robust}}%
}%
}%
+\let\@kernel@rename@newcommand\@undefined
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}{\MakeRobust}{\MakeRobust}%
\let\MakeRobust\@undefined
+\let\@kernel@rename@newcommand\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\kernel@make@fragile}{Undo robustness}%
+\def\kernel@make@fragile#1{%
+ \@ifundefined{\expandafter\@gobble\string#1\space}%
+ {}%
+ {%
+ \global\expandafter\let\expandafter #1\csname
+ \expandafter\@gobble\string#1\space\endcsname
+ \expandafter\@kernel@rename@newcommand
+ \csname\expandafter\@gobble\string#1\expandafter\endcsname
+ \csname\expandafter\@gobble\string#1\space\endcsname
+ \global\expandafter\let\csname
+ \expandafter\@gobble\string#1\space\endcsname\@undefined
+ }%
+}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\kernel@make@fragile}{Undo robustness}%
@@ -524,6 +671,210 @@ of this package available from CTAN}
}%
}
\EndIncludeInRelease
+\IncludeInRelease{2020-10-01}{\robust@command@act}
+ {Add \robust@command@act}%
+\long\def\robust@command@act#1#2#3#4{%
+ \robust@command@chk@safe#2%
+ {\expandafter\robust@command@act@loop
+ \expandafter#2%
+ #1{\@nnil\@nnil}%
+ \robust@command@act@end}%
+ {\robust@command@act@end}%
+ {#3}{#4}}%
+\long\def\robust@command@act@loop#1#2{\robust@command@act@loop@aux#1#2}
+\long\def\robust@command@act@loop@aux#1#2#3{%
+ \ifx\@nnil#2%
+ \else
+ #2{#1}%
+ {\robust@command@act@do{#3}}%
+ {\expandafter\robust@command@act@loop\expandafter#1}%
+ \fi}
+\long\def\robust@command@act@do#1%
+ \fi#2%
+ \robust@command@act@end#3#4{%
+ \fi
+ #1#4}
+\long\def\robust@command@act@end#1#2{#1#2}
+\long\def\robust@command@chk@safe#1{%
+ \begingroup
+ \escapechar=`\\
+ \expandafter\endgroup\expandafter
+ \robust@command@act@chk@args\meaning#1:->\@nil}
+\def\robust@command@act@chk@args#1:->#2\@nil{%
+ \@expl@str@if@eq@@nnTF{#1}{macro}%
+ {\@firstoftwo}%
+ {\@expl@str@if@eq@@nnTF{#1}{\protected macro}%
+ {\@firstoftwo}%
+ {\@secondoftwo}}}
+\EndIncludeInRelease
+\IncludeInRelease{0000-00-00}{\robust@command@act}
+ {Add \robust@command@act}%
+\let\robust@command@act\@undefined
+\let\robust@command@act@loop\@undefined
+\let\robust@command@act@loop@aux\@undefined
+\let\robust@command@act@do\@undefined
+\let\robust@command@act@end\@undefined
+\let\robust@command@chk@safe\@undefined
+\let\robust@command@act@chk@args\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020-10-01}{\DeclareCommandCopy}
+ {Add \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}%
+\def\NewCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstoftwo\@notdefinable}}
+\def\RenewCommandCopy{%
+ \declare@commandcopy
+ {\@latex@error{Command \@backslashchar\reserved@a\space undefined}\@ehc
+ \@firstofone}%
+ {\@firstofone}}
+\def\DeclareCommandCopy{%
+ \declare@commandcopy
+ {\@firstofone}%
+ {\@firstofone}}
+\long\def\declare@commandcopy#1#2#3#4{%
+ \edef\reserved@a{\@expl@cs@to@str@@N#3}%
+ \@ifundefined\reserved@a{#1}{#2}%
+ {\robust@command@act
+ \@declarecommandcopylisthook#4%
+ \declare@commandcopy@let{#3#4}}}
+\def\@declarecommandcopylisthook{%
+ {\@if@DeclareRobustCommand \@copy@DeclareRobustCommand}%
+ {\@if@newcommand \@copy@newcommand}}
+\long\def\declare@commandcopy@let#1#2{\let#1=#2\relax}
+\EndIncludeInRelease
+\IncludeInRelease{0000-00-00}{\DeclareCommandCopy}
+ {Undefine \NewCommandCopy, \RenewCommandCopy, and \DeclareCommandCopy}%
+\let\NewCommandCopy\@undefined
+\let\RenewCommandCopy\@undefined
+\let\DeclareCommandCopy\@undefined
+\let\declare@commandcopy\@undefined
+\let\@declarecommandcopylisthook\@undefined
+\let\declare@commandcopy@let\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020-10-01}{\ShowCommand}%
+ {Add \ShowCommand}%
+\long\def\ShowCommand#1{%
+ \robust@command@act
+ \@showcommandlisthook#1%
+ \show#1}
+\def\@showcommandlisthook{%
+ {\@if@DeclareRobustCommand \@show@DeclareRobustCommand}%
+ {\@if@newcommand \@show@newcommand}}
+\EndIncludeInRelease
+\IncludeInRelease{0000-00-00}{\ShowCommand}
+ {Undefine \ShowCommand}%
+\let\ShowCommand\@undefined
+\let\@showcommandlisthook\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020-10-01}{\@if@DeclareRobustCommand}
+ {Add \@if@DeclareRobustCommand, \@if@newcommand,
+ \@copy@DeclareRobustCommand, \@copy@newcommand,
+ \@show@DeclareRobustCommand, \@show@newcommand}%
+\long\def\@if@DeclareRobustCommand#1{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \xdef\@gtempa{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \endgroup
+ \ifx\@gtempa#1\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\long\def\@copy@DeclareRobustCommand#1#2{%
+ \begingroup
+ \escapechar=`\\
+ \edef\reserved@a{\string#1}%
+ \edef\reserved@b{\detokenize{#1}}%
+ \edef\reserved@a{%
+ \endgroup
+ \def\noexpand#1{%
+ \ifx\reserved@a\reserved@b
+ \noexpand\x@protect
+ \noexpand#1%
+ \fi
+ \noexpand\protect
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname}%
+ \noexpand\copy@kernel@robust@command
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#1 \endcsname
+ \expandafter\noexpand\csname\@expl@cs@to@str@@N#2 \endcsname}%
+ \reserved@a}
+\long\def\copy@kernel@robust@command#1#2{%
+ \robust@command@chk@safe#2%
+ {\@if@newcommand#2%
+ {\@copy@newcommand}%
+ {\declare@commandcopy@let}}
+ {\declare@commandcopy@let}%
+ #1#2}
+\long\def\@show@DeclareRobustCommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\show@kernel@robust@command
+ \csname\@expl@cs@to@str@@N#1 \endcsname}
+\long\def\show@kernel@robust@command#1{%
+ \robust@command@chk@safe#1%
+ {\@if@newcommand#1%
+ {\@show@newcommand}%
+ {\show}}%
+ {\show}%
+ #1}
+\long\def\@if@newcommand#1{%
+ \edef\reserved@a{%
+ \noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname}%
+ \edef\reserved@b{%
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@carcube#1{}{}{}\@nil}}%
+ \ifx\reserved@a\reserved@b
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi}
+\long\def\@copy@newcommand#1#2{%
+ \edef#1{\noexpand\@protected@testopt
+ \noexpand#1%
+ \expandafter\noexpand\csname\@backslashchar\@expl@cs@to@str@@N#1\endcsname
+ \unexpanded\expandafter\expandafter\expandafter
+ {\expandafter\@gobblethree#2}}%
+ \expandafter
+ \let\csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \csname\@backslashchar\@expl@cs@to@str@@N#2\endcsname}
+\long\def\@show@newcommand#1{%
+ \typeout{> \string#1=robust macro:}%
+ \typeout{->\@expl@cs@replacement@spec@@N#1.^^J}%
+ \expandafter\@show@newcommand@aux
+ \csname\@backslashchar\@expl@cs@to@str@@N#1\expandafter\endcsname
+ \expandafter{#1}}
+\long\def\@show@newcommand@aux#1#2{%
+ \typeout{> \string#1=\@expl@cs@prefix@spec@@N#1macro:}%
+ \edef\reserved@a{%
+ default \string##1=\expandafter\detokenize\@gobblethree#2.^^J%
+ \@expl@cs@argument@spec@@N#1->\@expl@cs@replacement@spec@@N#1}%
+ \showtokens\expandafter\expandafter\expandafter{\expandafter\reserved@a}}
+\EndIncludeInRelease
+\IncludeInRelease{0000-00-00}{\@if@DeclareRobustCommand}
+ {Undefine \@if@DeclareRobustCommand, \@if@newcommand,
+ \@copy@DeclareRobustCommand, \@copy@newcommand,
+ \@show@DeclareRobustCommand, \@show@newcommand}%
+\let\@if@DeclareRobustCommand\@undefined
+\let\@copy@DeclareRobustCommand\@undefined
+\let\@show@DeclareRobustCommand\@undefined
+\let\@if@newcommand\@undefined
+\let\@copy@newcommand\@undefined
+\let\@show@newcommand\@undefined
+\let\copy@kernel@robust@command\@undefined
+\let\show@kernel@robust@command\@undefined
+\let\@show@newcommand@aux\@undefined
+\EndIncludeInRelease
\IncludeInRelease{2018-04-01}{\@ifundefined}
{Leave commands undefined in \@ifundefined}%
\def\@ifundefined#1{%
@@ -631,6 +982,925 @@ of this package available from CTAN}
\kernel@make@fragile\underbar
\EndIncludeInRelease
+%%
+%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: lthooks.dtx
+\def\lthooksversion{v1.0a}
+\def\lthooksdate{2020/08/31}
+\IncludeInRelease{2020/10/01}%
+ {\NewHook}{The hook management}%
+\ExplSyntaxOn
+\bool_new:N \g__hook_debug_bool
+\cs_new_eq:NN \__hook_debug:n \use_none:n
+\cs_new_protected:Npn \hook_debug_on:
+ {
+ \bool_gset_true:N \g__hook_debug_bool
+ \__hook_debug_gset:
+ }
+\cs_new_protected:Npn \hook_debug_off:
+ {
+ \bool_gset_false:N \g__hook_debug_bool
+ \__hook_debug_gset:
+ }
+\cs_new_protected:Npn \__hook_debug_gset:
+ {
+ \cs_gset_protected:Npx \__hook_debug:n ##1
+ { \bool_if:NT \g__hook_debug_bool {##1} }
+ }
+\cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn
+\bool_new:N \l__hook_tmpa_bool
+\tl_new:N \l__hook_return_tl
+\tl_new:N \l__hook_tmpa_tl
+\tl_new:N \l__hook_tmpb_tl
+\seq_new:N \g__hook_all_seq
+\tl_new:N \g__hook_removal_list_tl
+\tl_new:N \l__hook_cur_hook_tl
+\prop_new:N \l__hook_work_prop
+\tl_new:N \g__hook_hook_curr_name_tl
+\seq_new:N \g__hook_name_stack_seq
+\cs_new_eq:NN \__hook_tmp:w ?
+\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx }
+\scan_new:N \s__hook_mark
+\cs_new_protected:Npn \hook_new:n #1
+ {
+ \exp_args:Nx \__hook_new:n
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_new:n #1 {
+ \hook_if_exist:nTF {#1}
+ { \msg_error:nnn { hooks } { exists } {#1} }
+ { \seq_gput_right:Nn \g__hook_all_seq {#1}
+ \tl_new:c { g__hook_#1_code_tl }
+ \__hook_declare:n {#1}
+ \clist_new:c {g__hook_#1_labels_clist}
+ \tl_new:c { g__hook_#1_reversed_tl }
+ \__hook_include_legacy_code_chunk:n {#1}
+ }
+}
+\cs_new_protected:Npn \__hook_declare:n #1
+ {
+ \__hook_if_exist:nF {#1}
+ {
+ \prop_new:c { g__hook_#1_code_prop }
+ \tl_new:c { g__hook_#1_code_next_tl }
+ }
+ }
+\cs_new_protected:Npn \hook_new_reversed:n #1 {
+ \hook_new:n {#1}
+ \tl_gset:cn { g__hook_#1_reversed_tl } { - }
+}
+\cs_new_protected:Npn \hook_new_pair:nn #1#2 {
+ \hook_new:n {#1} \hook_new_reversed:n {#2}
+}
+\cs_new_protected:Npn \__hook_include_legacy_code_chunk:n #1
+ {
+ \debug_suspend:
+ \tl_if_exist:cT { @#1hook }
+ {
+ \tl_if_empty:cF { @#1hook }
+ {
+ \exp_args:Nnnv \__hook_hook_gput_code_do:nnn {#1}
+ { legacy } { @#1hook }
+ \tl_gclear:c { @#1hook }
+ }
+ }
+ \debug_resume:
+ }
+\cs_new:Npn \__hook_parse_label_default:nn #1 #2
+ {
+ \tl_if_novalue:nTF {#1}
+ { \__hook_currname_or_default:n {#2} }
+ { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nn {#2} }
+ }
+\cs_generate_variant:Nn \__hook_parse_label_default:nn { V }
+\cs_new:Npn \__hook_parse_dot_label:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ {
+ \msg_expandable_error:nnn { hooks } { empty-label } {#2}
+ #2
+ }
+ {
+ \str_if_eq:nnTF {#1} { . }
+ { \__hook_currname_or_default:n {#1} }
+ { \__hook_parse_dot_label:nw {#2} #1 ./ \s__hook_mark }
+ }
+ }
+\cs_new:Npn \__hook_parse_dot_label:nw #1 #2 ./ #3 \s__hook_mark
+ {
+ \tl_if_empty:nTF {#2}
+ { \__hook_parse_dot_label_aux:nw {#1} #3 \s__hook_mark }
+ {
+ \tl_if_empty:nTF {#3}
+ {#2}
+ { \__hook_parse_dot_label_cleanup:w #2 ./ #3 \s__hook_mark }
+ }
+ }
+\cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1}
+\cs_new:Npn \__hook_parse_dot_label_aux:nw #1 #2 ./ \s__hook_mark
+ { \__hook_currname_or_default:n {#1} / #2 }
+\cs_new:Npn \__hook_currname_or_default:n #1
+ {
+ \tl_if_empty:NTF \g__hook_hook_curr_name_tl
+ {
+ \tl_if_empty:NTF \@currname
+ {#1}
+ { \@currname }
+ }
+ { \g__hook_hook_curr_name_tl }
+ }
+\cs_new_protected:Npn \hook_gput_code:nnn #1 #2
+ {
+ \exp_args:Nxx \__hook_gput_code:nnn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3
+ {
+ \__hook_if_marked_removal:nnTF {#1} {#2}
+ { \__hook_unmark_removal:nn {#1} {#2} }
+ {
+ \hook_if_exist:nTF {#1}
+ {
+ \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
+ \__hook_update_hook_code:n {#1}
+ }
+ { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} }
+ }
+ }
+\cs_generate_variant:Nn \__hook_gput_code:nnn { nxv }
+\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3
+ {
+ \__hook_debug:n{\iow_term:x{****~ Add~ to~
+ \hook_if_exist:nF {#1} { undeclared~ }
+ hook~ #1~ (#2)
+ \on@line\space <-~ \tl_to_str:n{#3}} }
+ \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
+ {
+ \prop_gput:cno { g__hook_#1_code_prop } {#2}
+ { \l__hook_return_tl #3 }
+ }
+ { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} }
+ }
+\cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3
+ {
+ \__hook_declare:n {#1}
+ \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1
+ {
+ \__hook_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1
+ {
+ \__hook_try_declaring_generic_hook:nNNnn {#1}
+ \hook_gput_next_code:nn \__hook_gput_next_do:nn
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1
+ {
+ \__hook_if_file_hook:wTF #1 / / \s__hook_mark
+ {
+ \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn
+ { \exp_args:Ne \__hook_file_hook_normalize:n {#1} }
+ }
+ { \__hook_try_declaring_generic_hook_split:nNNnn {#1} }
+ }
+\cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3
+ {
+ \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1}
+ { #2 }
+ { #3 } {#1}
+ }
+\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn
+ #1 / #2 / #3 / #4 \scan_stop: #5 { TF }
+ {
+ \tl_if_empty:nTF {#2}
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c__hook_generics_prop {#1}
+ {
+ \hook_if_exist:nF {#5} { \hook_new:n {#5} }
+ \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2}
+ { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
+ {
+ \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3}
+ { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
+ }
+ \prg_return_true:
+ }
+ { \prg_return_false: }
+ }
+ }
+\prg_new_conditional:Npnn \__hook_if_file_hook:w
+ #1 / #2 / #3 \s__hook_mark { TF }
+ {
+ \str_if_eq:nnTF {#1} { file }
+ {
+ \bool_lazy_or:nnTF
+ { \tl_if_empty_p:n {#3} }
+ { \str_if_eq_p:nn {#3} { / } }
+ { \prg_return_false: }
+ {
+ \prop_if_in:NnTF \c__hook_generics_file_prop {#2}
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ }
+ { \prg_return_false: }
+ }
+\cs_new:Npn \__hook_file_hook_normalize:n #1
+ { \__hook_strip_double_slash:n {#1} }
+\cs_new:Npn \__hook_strip_double_slash:n #1
+ { \__hook_strip_double_slash:w #1 // \s__hook_mark }
+\cs_new:Npn \__hook_strip_double_slash:w #1 // #2 \s__hook_mark
+ {
+ \tl_if_empty:nTF {#2}
+ {#1}
+ { \__hook_strip_double_slash:w #1 / #2 \s__hook_mark }
+ }
+\prop_const_from_keyval:Nn \c__hook_generics_prop
+ {env=,file=,package=,class=,include=}
+\prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=}
+\prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=}
+\prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=}
+\cs_new_protected:Npn \hook_gremove_code:nn #1 #2
+ {
+ \exp_args:Nxx \__hook_gremove_code:nn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2
+ {
+ \__hook_if_exist:nTF {#1}
+ {
+ \str_if_eq:nnTF {#2} {*}
+ { \prop_gclear:c { g__hook_#1_code_prop } }
+ {
+ \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
+ { \__hook_gremove_code_do:nn }
+ { \__hook_mark_removal:nn }
+ {#1} {#2}
+ }
+ \hook_if_exist:nT {#1}
+ { \__hook_update_hook_code:n {#1} }
+ }
+ { \__hook_mark_removal:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_gremove_code_do:nn #1 #2
+ { \prop_gremove:cn { g__hook_#1_code_prop } {#2} }
+\cs_new_protected:Npn \__hook_mark_removal:nn #1 #2
+ {
+ \tl_gput_right:Nx \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_unmark_removal:nn #1 #2
+ {
+ \tl_gremove_once:Nx \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ }
+\prg_new_protected_conditional:Npnn \__hook_if_marked_removal:nn #1 #2 { TF }
+ {
+ \exp_args:NNx \tl_if_in:NnTF \g__hook_removal_list_tl
+ { \__hook_removal_tl:nn {#1} {#2} }
+ { \prg_return_true: } { \prg_return_false: }
+ }
+\cs_new:Npn \__hook_removal_tl:nn #1 #2
+ { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ }
+\prop_new:c {g__hook_??_code_prop}
+\prop_new:c {g__hook_??_code_tl}
+\tl_new:c {g__hook_??_reversed_tl}
+\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4
+ {
+ \use:x
+ {
+ \__hook_gset_rule:nnnn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ { \__hook_parse_label_default:nn {#2} { top-level } }
+ {#3}
+ { \__hook_parse_label_default:nn {#4} { top-level } }
+ }
+ }
+\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4
+ {
+ \__hook_declare:n {#1}
+ \__hook_rule_gclear:nnn {#1} {#2} {#4}
+ \debug_suspend:
+ \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn }
+ {
+ {#1} {#2} {#4}
+ \__hook_update_hook_code:n {#1}
+ }
+ { \msg_error:nnnnnn { hooks } { unknown-rule }
+ {#1} {#2} {#3} {#4} }
+ \debug_resume:
+ }
+\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } }
+ }
+\cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn
+\cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl }
+ { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } }
+ }
+\cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn
+\cs_new_protected:Npn \__hook_rule_voids_gset:nnn #1#2#3
+ {
+ \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
+ { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } }
+ }
+\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3
+ { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } }
+\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3
+ { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } }
+\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { }
+\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3
+ { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } }
+\cs_new:Npn \__hook_label_pair:nn #1#2
+ {
+ \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f:
+ #1 | #1 % 0
+ \or: #1 | #2 % +1
+ \else: #2 | #1 % -1
+ \fi:
+ }
+\prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF }
+ {
+ \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f:
+ \prg_return_true:
+ \else
+ \prg_return_false:
+ \fi:
+ }
+\cs_new:Npn \__hook_if_label_case:nnnnn #1#2
+ {
+ \cs:w use_
+ \if_case:w \__hook_str_compare:nn {#1} {#2}
+ i \or: ii \else: iii \fi: :nnn
+ \cs_end:
+ }
+\cs_new_eq:NN \__hook_update_hook_code:n \use_none:n
+\cs_new_protected:Npn \__hook_initialize_all: {
+ \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n
+ \__hook_debug:n { \prop_gclear:N \g__hook_used_prop }
+ \seq_map_inline:Nn \g__hook_all_seq
+ {
+ \__hook_update_hook_code:n {##1}
+ }
+ \__hook_debug:n
+ { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:}
+ \prop_map_inline:Nn \g__hook_used_prop
+ { \iow_term:x{^^J~ ##1~ ->~
+ \exp_not:v {g__hook_##1_code_tl}~ }
+ }
+ }
+ \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n
+ \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n
+}
+\cs_new_protected:Npn \__hook_initialize_hook_code:n #1 {
+ \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
+ '#1' \on@line :^^J} }
+ \__hook_include_legacy_code_chunk:n {#1}
+ \hook_if_exist:nT {#1}
+ {
+ \prop_if_empty:cTF {g__hook_#1_code_prop}
+ { \tl_gset:co {g__hook_#1_code_tl}
+ {\cs:w g__hook_#1_code_next_tl \cs_end: } }
+ {
+ \__hook_if_reversed:nTF {#1}
+ { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_left:NV
+ \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV }
+ { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_right:NV
+ \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV }
+ \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop }
+ \__hook_initialize_single:cccn
+ { g__hook_#1_code_tl } { g__hook_#1_code_next_tl }
+ { g__hook_#1_labels_clist } {#1}
+ \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn
+ \g__hook_used_prop {#1}{} }
+ }
+ }
+}
+\prop_new:N\g__hook_used_prop
+\cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl }
+\cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq }
+\seq_new:N \l__hook_labels_seq
+\int_new:N \l__hook_labels_int
+\tl_new:N \l__hook_front_tl
+\tl_new:N \l__hook_rear_tl
+\tl_new:c { \__hook_tl_csname:n { 0 } }
+\cs_new_protected:Npn \__hook_initialize_single:NNNn #1#2#3#4 {
+ \debug_suspend:
+ \seq_clear:N \l__hook_labels_seq
+ \int_zero:N \l__hook_labels_int
+ \tl_set:Nn \l__hook_cur_hook_tl {#4}
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \int_incr:N \l__hook_labels_int
+ \seq_put_right:Nn \l__hook_labels_seq {##1}
+ \tl_set:cn { \__hook_tl_csname:n {##1} }{0}
+ \seq_clear_new:c { \__hook_seq_csname:n {##1} }
+ }
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \prop_map_inline:Nn \l__hook_work_prop
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_apply_label_pair:nnn {##1} {####1} }
+ { \__hook_apply_label_pair:nnn {####1} {##1} }
+ {#4}
+ }
+ }
+ \__hook_debug:n { \__hook_debug_label_data:N \l__hook_work_prop }
+ \tl_set:Nn \l__hook_rear_tl { 0 }
+ \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 }
+ \seq_map_inline:Nn \l__hook_labels_seq
+ {
+ \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1}
+ \tl_set:Nn \l__hook_rear_tl {##1}
+ }
+ }
+ \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } }
+ \tl_gclear:N #1
+ \clist_gclear:N #3
+ \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } }
+ {
+ \int_decr:N \l__hook_labels_int
+ \prop_get:NVN \l__hook_work_prop \l__hook_front_tl \l__hook_return_tl
+ \__hook_tl_gput:NV #1 \l__hook_return_tl
+ \__hook_clist_gput:NV #3 \l__hook_front_tl
+ \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} }
+ \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } }
+ {
+ \tl_set:cx { \__hook_tl_csname:n {##1} }
+ { \int_eval:n
+ { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 }
+ }
+ \int_compare:nNnT
+ { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
+ {
+ \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1}
+ \tl_set:Nn \l__hook_rear_tl {##1}
+ }
+ }
+ \tl_set_eq:Nc \l__hook_front_tl
+ { \__hook_tl_csname:n { \l__hook_front_tl } }
+ }
+ \int_compare:nNnF \l__hook_labels_int = 0
+ {
+ \iow_term:x{====================}
+ \iow_term:x{Error:~ label~ rules~ are~ incompatible:}
+ \__hook_debug_label_data:N \l__hook_work_prop
+ \iow_term:x{====================}
+ }
+ \tl_gput_right:Nn #1 {#2}
+ \debug_resume:
+}
+\cs_generate_variant:Nn \__hook_initialize_single:NNNn {ccc}
+\cs_new:Npn \__hook_tl_gput:NV {\ERROR}
+\cs_new:Npn \__hook_clist_gput:NV {\ERROR}
+\cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3
+ {
+ \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3}
+ {
+ \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { }
+ }
+ }
+\cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3
+ {
+ \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end:
+ \__hook_apply_rule:nnn {#1} {#2} {#3}
+ \exp_after:wN \use_none:n
+ \else:
+ \use:nn
+ \fi:
+ }
+\cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3
+ {
+ \cs:w __hook_apply_
+ \cs:w g__hook_#3_reversed_tl \cs_end: rule_
+ \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end:
+ {#1} {#2} {#3}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \__hook_tl_csname:n {#2} }
+ { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } }
+ \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \tl_set:cx { \__hook_tl_csname:n {#1} }
+ { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } }
+ \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_error:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 1 }
+ \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3}
+ \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3}
+ }
+\cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3
+ {
+ \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
+ \msg_warning:nnnnnn { hooks } { labels-incompatible }
+ {#1} {#2} {#3} { 0 }
+ }
+\cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3
+ {
+ \__hook_debug:n
+ {
+ \__hook_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#2'~ code~ from~
+ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~
+ because~ of~ '#1' }
+ }
+ \prop_put:Nnn \l__hook_work_prop {#2} { }
+ }
+\cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3
+ {
+ \__hook_debug:n
+ {
+ \__hook_msg_pair_found:nnn {#1} {#2} {#3}
+ \iow_term:x{--->~ Drop~ '#1'~ code~ from~
+ \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~
+ because~ of~ '#2' }
+ }
+ \prop_put:Nnn \l__hook_work_prop {#1} { }
+ }
+\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
+\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
+ {
+ \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
+ rule~ \__hook_label_pair:nn {#1} {#2}:~
+ \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~
+ found}
+ }
+\cs_new_protected:Npn \__hook_debug_label_data:N #1 {
+ \iow_term:x{Code~ labels~ for~ sorting:}
+ \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} }
+ \iow_term:x{^^J Data~ structure~ for~ label~ rules:}
+ \prop_map_inline:Nn #1
+ {
+ \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~
+ \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~}
+ }
+ }
+ \iow_term:x{}
+}
+\cs_new_protected:Npn \hook_log:n #1
+ {
+ \exp_args:Nx \__hook_log:n
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_log:n #1
+ {
+ \__hook_preamble_hook:n {#1}
+ \iow_term:x{^^JThe~ hook~ '#1':}
+ \hook_if_exist:nF {#1}
+ { \iow_term:x {~Hook~ is~ not~ declared!} }
+ \__hook_if_exist:nTF {#1}
+ {
+ \iow_term:x{~Code~ chunks:}
+ \prop_if_empty:cTF {g__hook_#1_code_prop}
+ { \iow_term:x{\@spaces ---} }
+ {
+ \prop_map_inline:cn {g__hook_#1_code_prop}
+ { \iow_term:x{\@spaces ##1~ ->~ \tl_to_str:n{##2} } }
+ }
+ \iow_term:x{~Extra~ code~ next~ invocation:}
+ \iow_term:x{\@spaces
+ \tl_if_empty:cTF { g__hook_#1_code_next_tl }
+ {---}
+ {->~ \exp_args:Nv
+ \__hook_log_next_code:n {g__hook_#1_code_next_tl} } }
+ \iow_term:x { ~Rules: }
+ \bool_set_true:N \l__hook_tmpa_bool
+ \__hook_list_rules:nn {#1}
+ {
+ \bool_set_false:N \l__hook_tmpa_bool
+ \iow_term:x
+ {
+ \@spaces ##2~ with~
+ \str_if_eq:nnT {##3} {??} { default~ }
+ relation~ ##1 }
+ }
+ \bool_if:NT \l__hook_tmpa_bool
+ { \iow_term:x { \@spaces --- } }
+ \bool_lazy_and:nnT
+ { \hook_if_exist_p:n {#1} }
+ { ! \hook_if_empty_p:n {#1} }
+ { \iow_term:x { ~Execution~ order
+ \bool_if:NTF \l__hook_tmpa_bool
+ { \__hook_if_reversed:nT {#1}
+ { ~ (after~ reversal) }
+ }
+ { ~ (after~
+ \__hook_if_reversed:nT {#1} {reversal~ and~}
+ applying~ rules)
+ }
+ :
+ }
+ \iow_term:x
+ { \@spaces \clist_use:cn {g__hook_#1_labels_clist} { ,~ } }
+ }
+ }
+ { \iow_term:n { ~The~hook~is~empty. } }
+ \iow_term:n { }
+ }
+\cs_new:Npn \__hook_log_next_code:n #1 {
+ \exp_args:No \tl_to_str:n {\use_none:nn #1}
+}
+\cs_new_protected:Npn \__hook_list_rules:nn #1 #2
+ {
+ \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_list_one_rule:nnn {##1} {####1} }
+ { \__hook_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
+ }
+ }
+\cs_new_protected:Npn \__hook_list_one_rule:nnn #1#2#3
+ {
+ \__hook_list_if_rule_exists:nnnF {#1} {#2} {#3} { }
+ { \__hook_list_if_rule_exists:nnnF {#1} {#2} { ?? } { } }
+ }
+\cs_new_protected:Npn \__hook_list_if_rule_exists:nnnF #1#2#3
+ {
+ \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end:
+ \exp_args:Nv \__hook_tmp:w
+ { g__hook_ #3 _rule_ #1 | #2 _tl } { #1 | #2 } {#3}
+ \fi:
+ }
+\cs_new_protected:Npn \__hook_debug_print_rules:n #1
+ {
+ \iow_term:n { The~hook~#1~contains~the~rules: }
+ \cs_set_protected:Npn \__hook_tmp:w ##1
+ {
+ \__hook_list_rules:nn {#1}
+ {
+ \iow_term:x
+ {
+ > ##1 {####2} ##1 => ##1 {####1}
+ \str_if_eq:nnT {####3} {??} { ~(default) }
+ }
+ }
+ }
+ \exp_args:No \__hook_tmp:w { \use:nn { ~ } { ~ } }
+ }
+\cs_new_protected:Npn \hook_gput_next_code:nn #1
+ {
+ \exp_args:Nx \__hook_gput_next_code:nn
+ { \__hook_parse_label_default:nn {#1} { top-level } }
+ }
+\cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2
+ {
+ \__hook_declare:n {#1}
+ \hook_if_exist:nTF {#1}
+ { \__hook_gput_next_do:nn {#1} {#2} }
+ { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} }
+ }
+\cs_new_protected:Npn \__hook_gput_next_do:nn #1
+ {
+ \exp_args:Nc \__hook_gput_next_do:Nnn
+ { g__hook_#1_code_next_tl } {#1}
+ }
+\cs_new_protected:Npn \__hook_gput_next_do:Nnn #1 #2
+ {
+ \tl_if_empty:cT { g__hook_#2_code_tl }
+ { \__hook_update_hook_code:n {#2} }
+ \tl_if_empty:NT #1
+ { \tl_gset:Nn #1 { \tl_gclear:c { g__hook_#2_code_next_tl } } }
+ \tl_gput_right:Nn #1
+ }
+\cs_new_protected:Npn \hook_use:n #1
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ {
+ \__hook_preamble_hook:n {#1}
+ \cs:w g__hook_#1_code_tl \cs_end:
+ }
+ { \__hook_use:wn #1 / \s__hook_mark {#1} }
+ }
+\cs_new:Npn \__hook_use_initialized:n #1
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ { \cs:w g__hook_#1_code_tl \cs_end: }
+ { \__hook_use:wn #1 / \s__hook_mark {#1} }
+ }
+\cs_new_protected:Npn \__hook_preamble_hook:n #1
+ { \__hook_initialize_hook_code:n {#1} }
+\cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3
+ {
+ \str_if_eq:nnTF {#1} { file }
+ { \__hook_try_file_hook:n {#3} }
+ { } % Hook doesn't exist
+ }
+\cs_new_protected:Npn \__hook_try_file_hook:n #1
+ {
+ \__hook_if_file_hook:wTF #1 / / \s__hook_mark
+ {
+ \exp_args:Ne \__hook_if_exist_use:n
+ { \exp_args:Ne \__hook_file_hook_normalize:n {#1} }
+ }
+ { \__hook_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before)
+ }
+\cs_new_protected:Npn \__hook_if_exist_use:n #1
+ {
+ \tl_if_exist:cT { g__hook_#1_code_tl }
+ {
+ \__hook_preamble_hook:n {#1}
+ \cs:w g__hook_#1_code_tl \cs_end:
+ }
+ }
+\cs_new_protected:Npn \hook_use_once:n #1
+ {
+ \tl_if_exist:cT { g__hook_#1_code_tl }
+ {
+ \clist_gput_left:Nn \g__hook_execute_immediately_clist {#1}
+ \hook_use:n {#1}
+ }
+ }
+\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF }
+ {
+ \__hook_if_exist:nTF {#1}
+ {
+ \bool_lazy_and:nnTF
+ { \prop_if_empty_p:c { g__hook_#1_code_prop } }
+ { \tl_if_empty_p:c { g__hook_#1_code_next_tl } }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+ { \prg_return_true: }
+ }
+\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF }
+ {
+ \tl_if_exist:cTF { g__hook_#1_code_tl }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\prg_new_conditional:Npnn \__hook_if_exist:n #1 { p , T , F , TF }
+ {
+ \prop_if_exist:cTF { g__hook_#1_code_prop }
+ { \prg_return_true: }
+ { \prg_return_false: }
+ }
+\prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF }
+ {
+ \if_int_compare:w \cs:w g__hook_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f:
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+\clist_new:N \g__hook_execute_immediately_clist
+\msg_new:nnnn { hooks } { labels-incompatible }
+ {
+ Labels~`#1'~and~`#2'~are~incompatible
+ \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~
+ \int_compare:nNnTF {#4} = { 1 }
+ { The~ code~ for~ both~ labels~ will~ be~ dropped. }
+ { You~ may~ see~ errors~ later. }
+ }
+ { LaTeX~found~two~incompatible~labels~in~the~same~hook.~
+ This~indicates~an~incompatibility~between~packages. }
+\msg_new:nnnn { hooks } { exists }
+ { Hook~`#1'~ has~ already~ been~ declared. }
+ { There~ already~ exists~ a~ hook~ declaration~ with~ this~
+ name.\\
+ Please~ use~ a~ different~ name~ for~ your~ hook.}
+\msg_new:nnn { hooks } { empty-label }
+ { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. }
+\msg_new:nnnn { hooks } { unknown-rule }
+ { Unknown~ relationship~ `#3'~
+ between~ labels~ `#2'~ and~ `#4'~
+ \str_if_eq:nnF {#1} {??} { ~in~hook~`#1' }. ~
+ Perhaps~ a~ missspelling?
+ }
+ {
+ The~ relation~ used~ not~ known~ to~ the~ system.~ Allowed~ values~ are~
+ `before'~ or~ `<',~
+ `after'~ or~ `>',~
+ `incompatible-warning',~
+ `incompatible-error',~
+ `voids'~ or~
+ `unrelated'.
+ }
+\msg_new:nnn { hooks } { should-not-happen }
+ {
+ ERROR!~This~should~not~happen.~#1 \\
+ Please~report~at~https://github.com/latex3/latex2e.
+ }
+\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} }
+\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} }
+\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} }
+\NewDocumentCommand \AddToHook { m o +m }
+ {
+ \clist_if_in:NnTF \g__hook_execute_immediately_clist {#1}
+ {#3}
+ { \hook_gput_code:nnn {#1} {#2} {#3} }
+ }
+\NewDocumentCommand \AddToHookNext { m +m }
+ { \hook_gput_next_code:nn {#1} {#2} }
+\NewDocumentCommand \RemoveFromHook { m o }
+ { \hook_gremove_code:nn {#1} {#2} }
+\seq_gpush:Nn \g__hook_name_stack_seq { }
+\cs_new_protected:Npn \__hook_curr_name_push:n #1
+ {
+ \seq_gpush:Nn \g__hook_name_stack_seq {#1}
+ \tl_gset:Nn \g__hook_hook_curr_name_tl {#1}
+ }
+\cs_new_protected:Npn \__hook_curr_name_pop:
+ {
+ \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
+ \seq_get:NNTF \g__hook_name_stack_seq \l__hook_return_tl
+ { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~default~label~stack. }
+ }
+ }
+\NewDocumentCommand \DeclareDefaultHookLabel { m }
+ {
+ \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
+ \__hook_curr_name_push:n {#1}
+ }
+\newcommand \UseHook { \hook_use:n }
+\newcommand \UseOneTimeHook { \hook_use_once:n }
+\cs_new_protected:Npn \ShowHook { \hook_log:n }
+\cs_new_protected:Npn \DebugHooksOn { \hook_debug_on: }
+\cs_new_protected:Npn \DebugHooksOff { \hook_debug_off: }
+\NewDocumentCommand \DeclareHookRule { m m m m }
+ { \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} }
+\NewDocumentCommand \DeclareDefaultHookRule { m m m }
+ { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} }
+\@onlypreamble\DeclareDefaultHookRule
+\NewDocumentCommand \ClearHookRule { m m m }
+{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
+\NewExpandableDocumentCommand \IfHookExistsTF { m }
+ { \hook_if_exist:nTF {#1} }
+\NewExpandableDocumentCommand \IfHookEmptyTF { m }
+ { \hook_if_empty:nTF {#1} }
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%5
+\cs_new_eq:NN \@expl@@@initialize@all@@
+ \__hook_initialize_all:
+\cs_new_eq:NN \@expl@@@hook@curr@name@push@@n
+ \__hook_curr_name_push:n
+\cs_new_eq:NN \@expl@@@hook@curr@name@pop@@
+ \__hook_curr_name_pop:
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\NewHook}{The hook management}%
+
+\def \NewHook#1{}
+\def \NewReversedHook#1{}
+\def \NewMirroredHookPair#1#2{}
+
+\long\def \AddToHook#1#2{}
+
+\def \AddToHookNext#1{\@gobble@AddToHook@args}
+\providecommand\@gobble@AddToHook@args[2][]{}
+
+\def\RemoveFromHook#1{\@gobble@RemoveFromHook@arg}
+\providecommand\@gobble@RemoveFromHook@arg[1][]{}
+
+\def \UseHook #1{}
+\def \UseOneTimeHook #1{}
+\def \ShowHook #1{}
+\let \DebugHooksOn \@empty
+\let \DebugHooksOff\@empty
+
+\def \DeclareHookRul#1#2#3#4{}
+\def \DeclareDefaultHookRule #1#2#3{}
+\def \ClearHookRule#1#2#3{}
+\def \IfHookExistTF #1#2#3{#3}
+\def \IfHookEmptyTF #1#2#3{#2}
+
+\EndIncludeInRelease
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltalloc.dtx
%%% From File: ltcntrl.dtx
%%% From File: lterror.dtx
@@ -654,6 +1924,42 @@ of this package available from CTAN}
{\@ifnextchar[\@makebox\mbox}}%
\expandafter\let\csname makebox \endcsname\@undefined
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@imakepicbox}{default units}%
+\long\def\@imakepicbox(#1,#2)[#3]#4{%
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \vbox to\@tempdimc
+ {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+ \let\mb@t\vss
+ \@tfor\reserved@a :=#3\do{%
+ \if s\reserved@a
+ \let\mb@l\relax\let\mb@r\relax
+ \else
+ \expandafter\let\csname mb@\reserved@a\endcsname\relax
+ \fi}%
+ \mb@t
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \hb@xt@\@tempdimc{\mb@l #4\mb@r}%
+ \mb@b
+ \kern\z@}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@imakepicbox}{default units}%
+\long\def\@imakepicbox(#1,#2)[#3]#4{%
+ \vbox to#2\unitlength
+ {\let\mb@b\vss \let\mb@l\hss\let\mb@r\hss
+ \let\mb@t\vss
+ \@tfor\reserved@a :=#3\do{%
+ \if s\reserved@a
+ \let\mb@l\relax\let\mb@r\relax
+ \else
+ \expandafter\let\csname mb@\reserved@a\endcsname\relax
+ \fi}%
+ \mb@t
+ \hb@xt@ #1\unitlength{\mb@l #4\mb@r}%
+ \mb@b
+ \kern\z@}}
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\savebox}{Make \savebox robust}%
\DeclareRobustCommand\savebox[1]{%
@@ -843,13 +2149,13 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\cases}{Make commands robust}%
-\DeclareRobustCommand\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\cases[1]{\left\{\,\vcenter{\normalbaselines\m@th
\ialign{$##\hfil$&\quad{##}\hfil\crcr#1\crcr}}\right.}
-\DeclareRobustCommand\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
+\DeclareRobustCommand*\matrix[1]{\null\,\vcenter{\normalbaselines\m@th
\ialign{\hfil$##$\hfil&&\quad\hfil$##$\hfil\crcr
\mathstrut\crcr\noalign{\kern-\baselineskip}
#1\crcr\mathstrut\crcr\noalign{\kern-\baselineskip}}}\,}
-\DeclareRobustCommand\pmatrix[1]{\left(\matrix{#1}\right)}
+\DeclareRobustCommand*\pmatrix[1]{\left(\matrix{#1}\right)}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\cases}{Make commands robust}%
@@ -974,6 +2280,94 @@ of this package available from CTAN}
\EndIncludeInRelease
%%% From File: ltpictur.dtx
\IncludeInRelease{2020/10/01}%
+ {\@defaultunitsset}{default units}%
+\def\@defaultunitsset#1#2#3{%
+ \@defaultunits#1\dimexpr#2#3\relax\relax\@nnil}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@defaultunitsset}{default units}%
+\let\@defaultunitsset\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@picture}{default units}%
+\def\@picture(#1,#2)(#3,#4){%
+ \@defaultunitsset\@picht{#2}\unitlength
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \setbox\@picbox\hb@xt@\@tempdimc\bgroup
+ \@defaultunitsset\@tempdimc{#3}\unitlength
+ \hskip -\@tempdimc
+ \@defaultunitsset\@tempdimc{#4}\unitlength
+ \lower\@tempdimc\hbox\bgroup
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@picture}{default units}%
+\def\@picture(#1,#2)(#3,#4){%
+ \@picht#2\unitlength
+ \setbox\@picbox\hb@xt@#1\unitlength\bgroup
+ \hskip -#3\unitlength
+ \lower #4\unitlength\hbox\bgroup
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\put}{default units}%
+\expandafter\let\csname put \endcsname\@undefind
+\long\def\put(#1,#2)#3{%
+ \@killglue
+ \@defaultunitsset\@tempdimc{#2}\unitlength
+ \raise\@tempdimc
+ \hb@xt@\z@{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \kern\@tempdimc
+ #3\hss}%
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\put}{default units}%
+\expandafter\let\csname put \endcsname\@undefind
+\long\def\put(#1,#2)#3{%
+ \@killglue\raise#2\unitlength
+ \hb@xt@\z@{\kern#1\unitlength #3\hss}%
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\multiput}{default units}%
+\expandafter\let\csname multiput \endcsname\@undefind
+\def\multiput(#1,#2)#3{%
+ \@defaultunitsset\@xdim{#1}\unitlength
+ \@defaultunitsset\@ydim{#2}\unitlength
+ \@multiput(}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\multiput}{default units}%
+\expandafter\let\csname multiput \endcsname\@undefind
+\def\multiput(#1,#2)#3{%
+ \@xdim #1\unitlength
+ \@ydim #2\unitlength
+ \@multiput(}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@multiput}{default units}%
+\long\def\@multiput(#1,#2)#3#4{%
+ \@killglue\@multicnt #3\relax
+ \@whilenum \@multicnt >\z@\do
+ {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
+ \advance\@multicnt\m@ne
+ \@defaultunitsset{\advance\@xdim}{#1}\unitlength
+ \@defaultunitsset{\advance\@ydim}{#2}\unitlength}%
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@multiput}{default units}%
+\long\def\@multiput(#1,#2)#3#4{%
+ \@killglue\@multicnt #3\relax
+ \@whilenum \@multicnt >\z@\do
+ {\raise\@ydim\hb@xt@\z@{\kern\@xdim #4\hss}%
+ \advance\@multicnt\m@ne
+ \advance\@xdim#1\unitlength\advance\@ydim#2\unitlength}%
+ \ignorespaces}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
{\@istackcr}{\shortstack calc support}%
\def\@istackcr[#1]{\cr\noalign{\@vspace@calcify{#1}}\ignorespaces}
\EndIncludeInRelease
@@ -982,17 +2376,191 @@ of this package available from CTAN}
\def\@istackcr[#1]{\cr\noalign{\vskip #1}\ignorespaces}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\line}{default units}%
+\expandafter\let\csname line \endcsname\@undefind
+\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@defaultunitsset\@linelen{#3}\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vline
+ \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
+ \fi
+ \fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\line}{default units}%
+\expandafter\let\csname line \endcsname\@undefind
+\def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@linelen #3\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vline
+ \else \ifnum\@yarg =\z@ \@hline \else \@sline\fi
+ \fi
+ \fi}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\vector}{default units}%
+\expandafter\let\csname vector \endcsname\@undefind
+\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
+ \ifnum\@tempcnta<5\relax
+ \@defaultunitsset\@linelen{#3}\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vvector
+ \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
+ \fi
+ \fi
+ \else\@badlinearg\fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\vector}{default units}%
+\expandafter\let\csname vector \endcsname\@undefind
+\def\vector(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
+ \@tempcnta \ifnum\@xarg<\z@ -\@xarg\else\@xarg\fi
+ \ifnum\@tempcnta<5\relax
+ \@linelen #3\unitlength
+ \ifdim\@linelen<\z@\@badlinearg\else
+ \ifnum\@xarg =\z@ \@vvector
+ \else \ifnum\@yarg =\z@ \@hvector \else \@svector\fi
+ \fi
+ \fi
+ \else\@badlinearg\fi}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\dashbox}{default units}%
+\expandafter\let\csname dashbox \endcsname\@undefind
+\def\dashbox#1(#2,#3){\leavevmode\hb@xt@\z@{\baselineskip \z@skip
+\lineskip \z@skip
+\@defaultunitsset\@dashdim{#2}\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt\@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox \hbox{\vrule \@height \@halfwidth \@depth \@halfwidth
+\@width \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(0,#3){\copy\@dashbox}%
+\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
+\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox \hbox{%
+ \@defaultunitsset\@tempdimc{#1}\unitlength
+ \vrule \@height \@halfwidth \@depth \@halfwidth \@width \@tempdimc
+ \hskip\@tempdimc}%
+\@tempcnta\z@
+\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
+\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
+\@defaultunitsset\@dashdim{#3}\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@defaultunitsset\@dashdim{#1}\unitlength
+\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt \@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else
+\divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox\hbox{\hskip -\@halfwidth
+\vrule \@width \@wholewidth
+\@height \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(#2,0){\copy\@dashbox}%
+\put(0,#3){\lower\@dashdim\copy\@dashbox}%
+\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\@defaultunitsset\@tempdimb{#1}\unitlength
+\setbox\@dashbox\hbox{%
+ \vrule \@width \@wholewidth \@height\@tempdimb}%
+\@tempcnta\z@
+\put(0,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}\@tempcnta\z@
+\put(#2,0){\hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
+\do{\vskip\@tempdimb\copy\@dashbox\advance\@tempcnta \@ne }%
+\vskip\@dashdim}}}\@makepicbox(#2,#3)}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\dashbox}{default units}%
+\expandafter\let\csname dashbox \endcsname\@undefind
+\def\dashbox#1(#2,#3){%
+\leavevmode\hb@xt@\z@{\baselineskip \z@skip
+\lineskip \z@skip
+\@dashdim #2\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt\@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else \divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox \hbox{%
+ \vrule \@height \@halfwidth \@depth \@halfwidth
+ \@width \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(0,#3){\copy\@dashbox}%
+\put(#2,0){\hskip-\@dashdim\copy\@dashbox}%
+\put(#2,#3){\hskip-\@dashdim\box\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox \hbox{%
+ \vrule \@height \@halfwidth \@depth \@halfwidth
+ \@width #1\unitlength\hskip #1\unitlength}\@tempcnta\z@
+\put(0,0){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}\@tempcnta\z@
+\put(0,#3){\hskip\@dashdim \@whilenum \@tempcnta <\@dashcnt
+\do{\copy\@dashbox\advance\@tempcnta \@ne }}%
+\@dashdim #3\unitlength
+\@dashcnt \@dashdim \advance\@dashcnt 200
+\@dashdim #1\unitlength\divide\@dashcnt \@dashdim
+\ifodd\@dashcnt \@dashdim \z@
+\advance\@dashcnt \@ne \divide\@dashcnt \tw@
+\else
+\divide\@dashdim \tw@ \divide\@dashcnt \tw@
+\advance\@dashcnt \m@ne
+\setbox\@dashbox\hbox{\hskip -\@halfwidth
+\vrule \@width \@wholewidth
+\@height \@dashdim}\put(0,0){\copy\@dashbox}%
+\put(#2,0){\copy\@dashbox}%
+\put(0,#3){\lower\@dashdim\copy\@dashbox}%
+\put(#2,#3){\lower\@dashdim\copy\@dashbox}%
+\multiply\@dashdim \thr@@
+\fi
+\setbox\@dashbox\hbox{\vrule \@width \@wholewidth
+\@height #1\unitlength}\@tempcnta\z@
+\put(0,0){%
+ \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta <\@dashcnt
+ \do{\vskip #1\unitlength\copy\@dashbox
+ \advance\@tempcnta\@ne }%
+ \vskip\@dashdim}}\@tempcnta\z@
+\put(#2,0){%
+ \hskip -\@halfwidth \vbox{\@whilenum \@tempcnta<\@dashcnt
+ \do{\vskip #1\unitlength\copy\@dashbox
+ \advance\@tempcnta \@ne }%
+ \vskip\@dashdim}}}\@makepicbox(#2,#3)}
+\EndIncludeInRelease
\IncludeInRelease{2016/03/31}%
{\@ovhlinetrue}%
{Avoid almost zero length leaders}%
\newif\if@ovvline \@ovvlinetrue
\newif\if@ovhline \@ovhlinetrue
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@ovhlinetrue}%
+ {Avoid almost zero length leaders}%
+\let\if@ovvline\@undefined
+\let\if@ovhline\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@oval}{default units}%
\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
\@ovvlinefalse \@ovhlinefalse
- \@tfor\reserved@a :=#3\do{\csname @ov\reserved@a false\endcsname}%
- \@ovxx #1\unitlength
- \@ovyy #2\unitlength
+ \@tfor\reserved@a :=#3\do{%
+ \csname @ov\reserved@a false\endcsname}%
+ \@defaultunitsset\@ovxx{#1}\unitlength
+ \@defaultunitsset\@ovyy{#2}\unitlength
\@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
\else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue \fi\fi
\advance \@tempdimb -2\p@
@@ -1010,27 +2578,39 @@ of this package available from CTAN}
\advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
\@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
\endgroup}
-\def\@ovvert#1#2{\vbox to\@ovyy{%
- \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
- \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
- \else \kern \@ovri \kern \@ovdy \fi
- \if@ovvline \leaders\vrule \@width \@wholewidth \fi
- \vfil \nointerlineskip
- \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
- \hbox{\char \@tempcntb}%
- \else \kern \@ovdy \kern \@ovro \fi}}
-\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
- \if@ovr \else \kern \@ovdx \fi
- \if@ovhline \leaders \hrule \@height \@wholewidth \fi
- \hfil
- \if@ovl \else \kern \@ovdx \fi
- \kern \@ovri}}
+\EndIncludeInRelease
+\IncludeInRelease{2016/03/31}%
+ {\@oval}{default units}%
+\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
+ \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
+ \@ovvlinefalse \@ovhlinefalse
+ \@tfor\reserved@a :=#3\do{%
+ \csname @ov\reserved@a false\endcsname}%
+ \@ovxx #1\unitlength
+ \@ovyy #2\unitlength
+ \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx \@ovvlinetrue
+ \else \@ovyy \ifdim \@ovyy =\@ovxx \else \@ovhlinetrue
+ \fi\fi
+ \advance \@tempdimb -2\p@
+ \@getcirc \@tempdimb
+ \@ovro \ht\@tempboxa \@ovri \dp\@tempboxa
+ \@ovdx\@ovxx \advance\@ovdx -\@tempdima \divide\@ovdx \tw@
+ \@ovdy\@ovyy \advance\@ovdy -\@tempdima \divide\@ovdy \tw@
+ \ifdim \@ovdx >\z@ \@ovhlinetrue \fi
+ \ifdim \@ovdy >\z@ \@ovvlinetrue \fi
+ \@circlefnt \setbox\@tempboxa
+ \hbox{\if@ovr \@ovvert32\kern -\@tempdima \fi
+ \if@ovl
+ \kern \@ovxx \@ovvert01\kern -\@tempdima \kern -\@ovxx
+ \fi
+ \if@ovt \@ovhorz \kern -\@ovxx \fi
+ \if@ovb \raise \@ovyy \@ovhorz \fi}\advance\@ovdx\@ovro
+ \advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
+ \endgroup}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\@ovhlinetrue}%
- {Avoid almost zero length leaders}%
-\let\if@ovvline\@undefined
-\let\if@ovhline\@undefined
+ {\@oval}{default units}%
\def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
\@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
\@tfor\reserved@a :=#3\do
@@ -1053,6 +2633,21 @@ of this package available from CTAN}
\advance\@ovdy\@ovro \ht\@tempboxa\z@ \dp\@tempboxa\z@
\@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
\endgroup}
+\EndIncludeInRelease
+\IncludeInRelease{2016/03/31}%
+ {\@ovvert}{Avoid almost zero length leaders}%
+\def\@ovvert#1#2{\vbox to\@ovyy{%
+ \if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
+ \kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
+ \else \kern \@ovri \kern \@ovdy \fi
+ \if@ovvline \leaders\vrule \@width \@wholewidth \fi
+ \vfil \nointerlineskip
+ \if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
+ \hbox{\char \@tempcntb}%
+ \else \kern \@ovdy \kern \@ovro \fi}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@ovvert}{Avoid almost zero length leaders}%
\def\@ovvert#1#2{\vbox to\@ovyy{%
\if@ovb \@tempcntb \@tempcnta \advance \@tempcntb #1\relax
\kern -\@ovro \hbox{\char \@tempcntb}\nointerlineskip
@@ -1061,12 +2656,181 @@ of this package available from CTAN}
\if@ovt \@tempcntb \@tempcnta \advance \@tempcntb #2\relax
\hbox{\char \@tempcntb}%
\else \kern \@ovdy \kern \@ovro \fi}}
+\EndIncludeInRelease
+\IncludeInRelease{2016/03/31}%
+ {\@ovhorz}{Avoid almost zero length leaders}%
+\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
+ \if@ovr \else \kern \@ovdx \fi
+ \if@ovhline \leaders \hrule \@height \@wholewidth \fi
+ \hfil
+ \if@ovl \else \kern \@ovdx \fi
+ \kern \@ovri}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@ovhorz}{Avoid almost zero length leaders}%
\def\@ovhorz{\hb@xt@\@ovxx{\kern \@ovro
\if@ovr \else \kern \@ovdx \fi
\leaders \hrule \@height \@wholewidth \hfil
\if@ovl \else \kern \@ovdx \fi
\kern \@ovri}}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@circle}{default units}%
+\def\@circle#1{%
+ \begingroup \boxmaxdepth \maxdimen
+ \@defaultunitsset\@tempdimb{#1}\unitlength
+ \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
+ \@ovro\ht\@tempboxa
+ \setbox\@tempboxa\hbox{\@circlefnt
+ \advance\@tempcnta\tw@ \char \@tempcnta
+ \advance\@tempcnta\m@ne \char \@tempcnta \kern -2\@tempdima
+ \advance\@tempcnta\tw@
+ \raise \@tempdima \hbox{\char\@tempcnta}\raise \@tempdima
+ \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
+ \else \@circ\@tempdimb{96}\fi\endgroup}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@circle}{default units}%
+\def\@circle#1{%
+ \begingroup \boxmaxdepth \maxdimen \@tempdimb #1\unitlength
+ \ifdim \@tempdimb >15.5\p@ \@getcirc\@tempdimb
+ \@ovro\ht\@tempboxa
+ \setbox\@tempboxa\hbox{\@circlefnt
+ \advance\@tempcnta\tw@ \char \@tempcnta
+ \advance\@tempcnta\m@ne \char \@tempcnta
+ \kern -2\@tempdima
+ \advance\@tempcnta\tw@
+ \raise \@tempdima \hbox{\char\@tempcnta}%
+ \raise \@tempdima
+ \box\@tempboxa}\ht\@tempboxa\z@ \dp\@tempboxa\z@
+ \@put{-\@ovro}{-\@ovro}{\box\@tempboxa}%
+ \else \@circ\@tempdimb{96}\fi\endgroup}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@dot}{default units}%
+\def\@dot#1{%
+ \@defaultunitsset\@tempdimb{#1}\unitlength
+ \@circ\@tempdimb{112}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@dot}{default units}%
+\def\@dot#1{\@tempdimb #1\unitlength \@circ\@tempdimb{112}}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@bezier}{default units}%
+\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
+ \ifnum #1=\z@
+ \@defaultunitsset\@ovxx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
+ \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
+ \@defaultunitsset\@ovdx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#4}\unitlength
+ \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
+ \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
+ \@defaultunitsset\@ovyy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
+ \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
+ \@defaultunitsset\@ovdy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#5}\unitlength
+ \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
+ \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
+ \@multicnt
+ \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
+ \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
+ \ifnum \qbeziermax<\@multicnt
+ \@multicnt\qbeziermax\relax
+ \fi
+ \else \@multicnt#1\relax \fi
+ \@tempcnta\@multicnt \advance\@tempcnta\@ne
+ \@defaultunitsset\@ovdx{#4}\unitlength
+ \@defaultunitsset{\advance\@ovdx}{-#2}\unitlength
+ \multiply\@ovdx \tw@
+ \@defaultunitsset\@ovxx{#6}\unitlength
+ \@defaultunitsset{\advance\@ovxx}{-#2}\unitlength
+ \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
+ \@defaultunitsset\@ovdy{#5}\unitlength
+ \@defaultunitsset{\advance\@ovdy}{-#3}\unitlength
+ \multiply\@ovdy \tw@
+ \@defaultunitsset\@ovyy{#7}\unitlength
+ \@defaultunitsset{\advance\@ovyy}{-#3}\unitlength
+ \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
+ \setbox\@tempboxa\hbox{%
+ \hskip -\@halfwidth
+ \vrule \@height\@halfwidth
+ \@depth \@halfwidth
+ \@width \@wholewidth}%
+ \put(#2,#3){%
+ \count@\z@
+ \@whilenum{\count@<\@tempcnta}\do
+ {\@xdim\count@\@ovxx
+ \advance\@xdim\@ovdx
+ \divide\@xdim\@multicnt
+ \multiply\@xdim\count@
+ \@ydim\count@\@ovyy
+ \advance\@ydim\@ovdy
+ \divide\@ydim\@multicnt
+ \multiply\@ydim\count@
+ \raise \@ydim
+ \hb@xt@\z@{\kern\@xdim
+ \unhcopy\@tempboxa\hss}%
+ \advance\count@\@ne}}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@bezier}{default units}%
+\def\@bezier#1(#2,#3)(#4,#5)(#6,#7){%
+ \ifnum #1=\z@
+ \@ovxx #4\unitlength
+ \advance\@ovxx -#2\unitlength
+ \ifdim \@ovxx<\z@ \@ovxx -\@ovxx \fi
+ \@ovdx #6\unitlength
+ \advance\@ovdx -#4\unitlength
+ \ifdim \@ovdx<\z@ \@ovdx -\@ovdx \fi
+ \ifdim \@ovxx<\@ovdx \@ovxx \@ovdx \fi
+ \@ovyy #5\unitlength
+ \advance\@ovyy -#3\unitlength
+ \ifdim \@ovyy<\z@ \@ovyy -\@ovyy \fi
+ \@ovdy #7\unitlength
+ \advance\@ovdy -#5\unitlength
+ \ifdim \@ovdy<\z@ \@ovdy -\@ovdy \fi
+ \ifdim \@ovyy<\@ovdy \@ovyy \@ovdy \fi
+ \@multicnt
+ \ifdim \@ovxx>\@ovyy \@ovxx \else \@ovyy \fi
+ \@ovxx .5\@halfwidth \divide\@multicnt\@ovxx
+ \ifnum
+ \qbeziermax<\@multicnt \@multicnt\qbeziermax\relax
+ \fi
+ \else \@multicnt#1\relax \fi
+ \@tempcnta\@multicnt \advance\@tempcnta\@ne
+ \@ovdx #4\unitlength \advance\@ovdx -#2\unitlength
+ \multiply\@ovdx \tw@
+ \@ovxx #6\unitlength \advance\@ovxx -#2\unitlength
+ \advance\@ovxx -\@ovdx \divide\@ovxx\@multicnt
+ \@ovdy #5\unitlength \advance\@ovdy -#3\unitlength
+ \multiply\@ovdy \tw@
+ \@ovyy #7\unitlength \advance\@ovyy -#3\unitlength
+ \advance\@ovyy -\@ovdy \divide\@ovyy\@multicnt
+ \setbox\@tempboxa\hbox{%
+ \hskip -\@halfwidth
+ \vrule \@height\@halfwidth
+ \@depth \@halfwidth
+ \@width \@wholewidth}%
+ \put(#2,#3){%
+ \count@\z@
+ \@whilenum{\count@<\@tempcnta}\do
+ {\@xdim\count@\@ovxx
+ \advance\@xdim\@ovdx
+ \divide\@xdim\@multicnt
+ \multiply\@xdim\count@
+ \@ydim\count@\@ovyy
+ \advance\@ydim\@ovdy
+ \divide\@ydim\@multicnt
+ \multiply\@ydim\count@
+ \raise \@ydim
+ \hb@xt@\z@{\kern\@xdim
+ \unhcopy\@tempboxa\hss}%
+ \advance\count@\@ne}}}
+\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\bezier}{Make commands robust}%
\MakeRobust\bezier
@@ -1104,8 +2868,8 @@ of this package available from CTAN}
\IncludeInRelease{2019/10/01}%
{\title}{Make commands robust}%
\DeclareRobustCommand\title[1]{\gdef\@title{#1}}
-\DeclareRobustCommand\author[1]{\gdef\@author{#1}}
-\DeclareRobustCommand\date[1]{\gdef\@date{#1}}
+\DeclareRobustCommand*\author[1]{\gdef\@author{#1}}
+\DeclareRobustCommand*\date[1]{\gdef\@date{#1}}
\DeclareRobustCommand\thanks[1]{\footnotemark
\protected@xdef\@thanks{\@thanks
\protect\footnotetext[\the\c@footnote]{#1}}%
@@ -1125,11 +2889,17 @@ of this package available from CTAN}
\kernel@make@fragile\and
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\addcontentsline}{fourth argument}%
+\def\addcontentsline#1#2#3{%
+ \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}{}%
+ \protected@file@percent}}
+\EndIncludeInRelease
\IncludeInRelease{2018/12/01}%
{\addcontentsline}{Mask line endings}%
-\def\addcontentsline#1#2#3{%
+ \def\addcontentsline#1#2#3{%
\addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}%
- \protected@file@percent}}
+ \protected@file@percent}}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\addcontentsline}{Mask line endings}%
@@ -1182,9 +2952,11 @@ of this package available from CTAN}
\let\noprotrusion\@undefined
\EndIncludeInRelease
%%% From File: ltfiles.dtx
-\IncludeInRelease{2020/06/05}%
+\IncludeInRelease{2020/10/01}%
{\document}{Added hook to load l3backend code}%
-\def\document{\endgroup
+\def\document{%
+ \UseOneTimeHook{begindocument/before}%
+ \@kernel@after@begindocument@before
\@expl@sys@load@backend@@
\ifx\@unusedoptionlist\@empty\else
\@latex@warning@no@line{Unused global option(s):^^J%
@@ -1224,8 +2996,9 @@ of this package available from CTAN}
\fi
\@noskipsecfalse
\let \@refundefined \relax
- \let\AtBeginDocument\@firstofone
- \@begindocumenthook
+ \@kernel@before@begindocument
+ \UseOneTimeHook{begindocument}%
+ \@kernel@after@begindocument
\ifdim\topskip<1sp\global\topskip 1sp\relax\fi
\global\@maxdepth\maxdepth
\global\let\@begindocumenthook\@undefined
@@ -1237,11 +3010,23 @@ of this package available from CTAN}
\@preamblecmds
\global\let \@nodocument \relax
\global\let\do\noexpand
+ \UseOneTimeHook{begindocument/end}%
\ignorespaces}
-\EndIncludeInRelease
+\NewHook{begindocument}
+\NewHook{begindocument/before}
+\NewHook{begindocument/end}
+\edef \@kernel@after@begindocument@before {%
+ \let\expandafter\noexpand\csname
+ g__hook_env/document/begin_code_tl\endcsname
+ \noexpand\@empty}
+\let \@kernel@before@begindocument \@empty
+\let \@kernel@after@begindocument \@empty
+
+\EndIncludeInRelease
\IncludeInRelease{2017/04/15}%
{\document}{Save language for hyphenation}%
+
\def\document{\endgroup
\ifx\@unusedoptionlist\@empty\else
\@latex@warning@no@line{Unused global option(s):^^J%
@@ -1353,29 +3138,39 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\includeonly}{Spaces in file names}%
+\def\include#1{\relax
+ \ifnum\@auxout=\@partaux
+ \@latex@error{\string\include\space cannot be nested}\@eha
+ \else
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
+ \expandafter\@include\expandafter{\@curr@file} % deliberate space
+ \fi}
\def\includeonly#1{%
\@partswtrue
\let\@partlist\@empty
\@for\reserved@a:=#1 \do
- {
- \expandafter\set@curr@file@trim@spaces\expandafter{\reserved@a}%
+ {%
+ \expandafter\set@curr@file\expandafter{\reserved@a}%
\ifx\@partlist\@empty
- \edef\@partlist{\@curr@file}%
+ \edef\@partlist{\@strip@tex@ext\@curr@file}%
\else
- \edef\@partlist{\@partlist,\@curr@file}%
+ \edef\@partlist{\@partlist,\@strip@tex@ext\@curr@file}%
\fi
}%
}
\@onlypreamble\includeonly
-\def\include#1{\relax
- \ifnum\@auxout=\@partaux
- \@latex@error{\string\include\space cannot be nested}\@eha
- \else
- \set@curr@file@trim@spaces{#1}%
- \expandafter\@include\expandafter{\@curr@file} % deliberate space
- \fi}
-\def\set@curr@file@trim@spaces#1{%
- \@expl@tl@trim@spaces@apply@@nN {#1} \set@curr@file }
+\def\reserved@a#1{%
+\def\@strip@tex@ext##1{%
+ \expandafter\@strip@tex@ext@aux
+ ##1\@nil\@nil
+ #1\@nil\relax\@nnil}
+\def\@strip@tex@ext@aux##1#1\@nil##2\@nnil{%
+ \ifx\relax##2\@empty
+ \expandafter\@cdr\expandafter\@empty\@cdr{}##1%
+ \else##1\fi}}%
+\expandafter\reserved@a
+\expandafter{\detokenize{.tex}}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\includeonly}{Spaces in file names}%
@@ -1394,7 +3189,9 @@ of this package available from CTAN}
\expandafter\@include\@curr@file
\fi}
-\let\set@curr@file@trim@spaces\@undefined
+\let\@strip@tex@ext\@undefined
+\let\@strip@tex@ext@aux\@undefined
+
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\includeonly}{Spaces in file names}%
@@ -1409,7 +3206,7 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
- {\@include}{Spaces in file names}%
+ {\@include}{Spaces in file names and hooks}%
\def\@include#1 {%
\clearpage
\if@filesw
@@ -1428,7 +3225,15 @@ of this package available from CTAN}
\immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}%
\fi
+ \@filehook@set@CurrentFile
+ \UseHook{include/before}%
+ \UseHook{include/before/#1}%
\@input@{#1.tex}%
+ \UseHook{include/end/#1}%
+ \UseHook{include/end}%
+ \clearpage
+ \UseHook{include/after/#1}%
+ \UseHook{include/after}%
\clearpage
\@writeckpt{#1}%
\if@filesw
@@ -1440,7 +3245,6 @@ of this package available from CTAN}
\fi
\let\@auxout\@mainaux}
\EndIncludeInRelease
-
\IncludeInRelease{0000/00/00}%
{\@include}{Spaces in file names}%
\def\@include#1 {%
@@ -1475,17 +3279,7 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
- {\set@curr@file}{Quote file names}%
-\def\set@curr@file#1{%
- \begingroup
- \escapechar\m@ne
- \xdef\@curr@file{%
- \expandafter\expandafter\expandafter\unquote@name
- \expandafter\expandafter\expandafter{%
- \expandafter\string
- \csname\@firstofone#1\@empty\endcsname}}%
- \endgroup
-}
+ {\quote@name}{Quote file names}%
\def\quote@name#1{"\quote@@name#1\@gobble""}
\def\quote@@name#1"{#1\quote@@name}
\def\unquote@name#1{\quote@@name#1\@gobble"}
@@ -1520,12 +3314,11 @@ of this package available from CTAN}
\reserved@a}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\set@curr@file}{Quote file names}%
+ {\quote@name}{Quote file names}%
\let\quote@name\@undefined
\let\quote@@name\@undefined
\let\unquote@name\@undefined
-\let\set@curr@file\@undefined
\let\IfFileExists@\@undefined
@@ -1559,24 +3352,29 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
- {\InputIfFileExists}{Don't lose the file name}%
-\DeclareRobustCommand \InputIfFileExists[2]{%
- \IfFileExists{#1}%
- {%
- \expandafter\@swaptwoargs\expandafter
- {\@filef@und}{#2\@addtofilelist{#1}\@@input}}}
+ {\@swaptwoargs}{Don't lose the file name}%
\long\def\@swaptwoargs#1#2{#2#1}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\InputIfFileExists}{Don't lose the file name}%
-\long\def \InputIfFileExists#1#2{%
- \IfFileExists{#1}%
- {#2\@addtofilelist{#1}\@@input \@filef@und}}
-
+ {\@swaptwoargs}{Don't lose the file name}%
\let\@swaptwoargs\@undefined
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@iinput}{Change in file error handling}%
+\def\@iinput#1{%
+ \InputIfFileExists{#1}{}%
+ {\filename@parse\@curr@file
+ \edef\reserved@a{\noexpand\@missingfileerror
+ {\filename@area\filename@base}%
+ {\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
+ \reserved@a
+ \edef\reserved@a{\noexpand\@iinput{%
+ \@missingfile@area\@missingfile@base.\@missingfile@ext}}%
+ \reserved@a}}
+\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\@iinput}{Quote file names}%
+
\def\@iinput#1{%
\InputIfFileExists{#1}{}%
{\filename@parse\@curr@file
@@ -1595,6 +3393,65 @@ of this package available from CTAN}
{\ifx\filename@ext\relax tex\else\filename@ext\fi}}%
\reserved@a}}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@missingfileerror}{Do not load missing file immediately}%
+\gdef\@missingfileerror#1#2{%
+ \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
+ Type X to quit or <RETURN> to proceed,^^J%
+ or enter new name. (Default extension: #2)^^J}%
+ \message{Enter file name: }%
+ {\endlinechar\m@ne
+ \global\read\m@ne to\@gtempa}%
+ \ifx\@gtempa\@empty
+ \let\@missingfile@area\@empty
+ \let\@missingfile@base\@empty
+ \def\@missingfile@ext{tex}%
+ \else
+ \def\reserved@b{\batchmode\read-1 to \reserved@a}%
+ \def\reserved@a{x}\ifx\reserved@a\@gtempa\reserved@b\fi
+ \def\reserved@a{X}\ifx\reserved@a\@gtempa\reserved@b\fi
+ \filename@parse\@gtempa
+ \edef\filename@ext{%
+ \ifx\filename@ext\relax#2\else\filename@ext\fi}%
+ \edef\reserved@a{%
+ \noexpand\IfFileExists
+ {\filename@area\filename@base.\filename@ext}%
+ {\def\noexpand\@missingfile@area{\filename@area}%
+ \def\noexpand\@missingfile@base{\filename@base}%
+ \def\noexpand\@missingfile@ext {\filename@ext}}%
+ {\noexpand\@missingfileerror
+ {\filename@area\filename@base}{\filename@ext}}}%
+ \reserved@a
+ \fi
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@missingfileerror}{Do not load missing file immediately}%
+
+\gdef\@missingfileerror#1#2{%
+ \typeout{^^J! LaTeX Error: File `#1.#2' not found.^^J^^J%
+ Type X to quit or <RETURN> to proceed,^^J%
+ or enter new name. (Default extension: #2)^^J}%
+ \message{Enter file name: }%
+ {\endlinechar\m@ne
+ \global\read\m@ne to\@gtempa}%
+ \ifx\@gtempa\@empty
+ \else
+ \def\reserved@a{x}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+ \def\reserved@a{X}\ifx\reserved@a\@gtempa\batchmode\@@end\fi
+ \filename@parse\@gtempa
+ \edef\filename@ext{%
+ \ifx\filename@ext\relax#2\else\filename@ext\fi}%
+ \edef\reserved@a{%
+ \noexpand\InputIfFileExists
+ {\filename@area\filename@base.\filename@ext}%
+ {}%
+ {\noexpand\@missingfileerror
+ {\filename@area\filename@base}{\filename@ext}}}%
+ \reserved@a
+ \fi}
+
+\EndIncludeInRelease
%%% From File: ltoutenc.dtx
\IncludeInRelease{2017/04/15}{\DeclareTextCompositeCommand}
{test for undeclared accent}%
@@ -1643,7 +3500,7 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\UseTextAccent}{Make commands robust}%
-\DeclareRobustCommand\UseTextAccent[3]{%
+\DeclareRobustCommand*\UseTextAccent[3]{%
\hmode@start@before@group
{%
\let\hmode@start@before@group\@firstofone
@@ -1651,7 +3508,7 @@ of this package available from CTAN}
\@use@text@encoding{#1}%
#2{\@use@text@encoding\@curr@enc#3}%
}}
-\DeclareRobustCommand\UseTextSymbol[2]{%
+\DeclareRobustCommand*\UseTextSymbol[2]{%
\hmode@start@before@group
{%
\def\@wrong@font@char{\MessageBreak
@@ -2072,7 +3929,7 @@ of this package available from CTAN}
%%% From File: ltpage.dtx
\IncludeInRelease{2019/10/01}%
{\markboth}{Make commands robust}%
-\DeclareRobustCommand\markboth[2]{%
+\DeclareRobustCommand*\markboth[2]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\unrestored@protected@xdef\@themark {{#1}{#2}}%
@@ -2080,7 +3937,7 @@ of this package available from CTAN}
\mark{\the\@temptokena}%
\endgroup
\if@nobreak\ifvmode\nobreak\fi\fi}
-\DeclareRobustCommand\markright[1]{%
+\DeclareRobustCommand*\markright[1]{%
\begingroup
\let\label\relax \let\index\relax \let\glossary\relax
\expandafter\@markright\@themark {#1}%
@@ -2096,6 +3953,752 @@ of this package available from CTAN}
\kernel@make@fragile\markright
\EndIncludeInRelease
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
+\IncludeInRelease{2020/10/01}%
+ {\CurrentFile}{Hook management file}%
+\ExplSyntaxOn
+\tl_new:N \CurrentFile
+\tl_new:N \CurrentFilePath
+\tl_new:N \CurrentFileUsed
+\tl_new:N \CurrentFilePathUsed
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\CurrentFile}{Hook management file}%
+
+\let \CurrentFile \@undefined
+\let \CurrentFilePath \@undefined
+\let \CurrentFileUsed \@undefined
+\let \CurrentFilePathUsed \@undefined
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\__filehook_file_parse_full_name:nN}{File helpers}%
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_file_parse_full_name:nN #1
+ {
+ \exp_args:Nf \file_parse_full_name_apply:nN
+ {
+ \exp_args:Nf \__filehook_full_name:nn
+ { \file_full_name:n {#1} } {#1}
+ }
+ }
+\cs_new:Npn \__filehook_full_name:nn #1 #2
+ {
+ \tl_if_empty:nTF {#1}
+ { \tl_trim_spaces:n {#2} }
+ { \tl_trim_spaces:n {#1} }
+ }
+\cs_new:Npn \__filehook_if_no_extension:nTF #1
+ {
+ \exp_args:Ne \tl_if_empty:nTF
+ { \file_parse_full_name_apply:nN {#1} \use_iii:nnn }
+ }
+\cs_new_protected:Npn \__filehook_drop_extension:N #1
+ {
+ \tl_gset:Nx #1
+ {
+ \exp_args:NV \__filehook_file_parse_full_name:nN #1
+ \__filehook_drop_extension_aux:nnn
+ }
+ }
+\cs_new:Npn \__filehook_drop_extension_aux:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2 }
+\tl_new:N \l__filehook_internal_tl
+\seq_new:N \g__filehook_input_file_seq
+\cs_new_protected:Npn \__filehook_file_push:
+ {
+ \seq_gpush:Nx \g__filehook_input_file_seq
+ {
+ { \CurrentFilePathUsed } { \CurrentFileUsed }
+ { \CurrentFilePath } { \CurrentFile }
+ }
+ }
+\cs_new_protected:Npn \__filehook_file_pop:
+ {
+ \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl
+ { \exp_after:wN \__filehook_file_pop_assign:nnnn \l__filehook_internal_tl }
+ {
+ \msg_error:nnn { hooks } { should-not-happen }
+ { Tried~to~pop~from~an~empty~file~name~stack. }
+ }
+ }
+\cs_new_protected:Npn \__filehook_file_pop_assign:nnnn #1 #2 #3 #4
+ {
+ \tl_set:Nn \CurrentFilePathUsed {#1}
+ \tl_set:Nn \CurrentFileUsed {#2}
+ \tl_set:Nn \CurrentFilePath {#3}
+ \tl_set:Nn \CurrentFile {#4}
+ }
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\InputIfFileExists}{Hook management (files)}%
+\let\InputIfFileExists\@undefined
+\DeclareRobustCommand \InputIfFileExists[2]{%
+ \IfFileExists{#1}%
+ {%
+ \@expl@@@filehook@file@push@@
+ \@filehook@set@CurrentFile
+ \edef\reserved@a{\@filef@und
+ \@expl@@@filehook@file@pop@assign@@nnnn
+ {\CurrentFilePathUsed}%
+ {\CurrentFileUsed}%
+ {\CurrentFilePath}%
+ {\CurrentFile}}%
+ \expandafter\@swaptwoargs\expandafter
+ {\reserved@a}%
+ {%
+ #2%
+ \@addtofilelist{#1}%
+ \UseHook{file/before}%
+ \UseHook{file/before/\CurrentFile}%
+ \@@input
+ }%
+ \UseHook{file/after/\CurrentFile}%
+ \UseHook{file/after}%
+ \@expl@@@filehook@file@pop@@
+ }%
+}
+\EndIncludeInRelease
+\IncludeInRelease{2019/10/01}%
+ {\InputIfFileExists}{Hook management (files)}%
+
+\DeclareRobustCommand \InputIfFileExists[2]{%
+ \IfFileExists{#1}%
+ {%
+ \expandafter\@swaptwoargs\expandafter
+ {\@filef@und}{#2\@addtofilelist{#1}\@@input}}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\InputIfFileExists}{Hook management (files)}%
+\long\def \InputIfFileExists#1#2{%
+ \IfFileExists{#1}%
+ {#2\@addtofilelist{#1}\@@input \@filef@und}}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\__filehook_subst_add:nn}{Declaring file substitution}%
+\ExplSyntaxOn
+\cs_new_protected:Npn \__filehook_subst_add:nn #1 #2
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_gset:cpx { @file-subst@ \__filehook_subst_file_normalize:n {#1} }
+ { \__filehook_subst_file_normalize:n {#2} }
+ \group_end:
+ }
+\cs_new_protected:Npn \__filehook_subst_remove:n #1
+ {
+ \group_begin:
+ \cs_set:cpx { } { \exp_not:o { \cs:w\cs_end: } }
+ \int_set:Nn \tex_escapechar:D { -1 }
+ \cs_undefine:c { @file-subst@ \__filehook_subst_file_normalize:n {#1} }
+ \group_end:
+ }
+\cs_new:Npn \__filehook_subst_file_normalize:n #1
+ {
+ \exp_after:wN \__filehook_subst_empty_name_chk:NN
+ \cs:w \exp_after:wN \cs_end:
+ \cs:w \__filehook_file_parse_full_name:nN {#1} \use_ii_iii:nnn \cs_end:
+ }
+\cs_new:Npn \__filehook_subst_empty_name_chk:NN #1 #2
+ { \if_meaning:w #1 #2 .tex \else: \token_to_str:N #2 \fi: }
+\cs_gset:Npn \use_ii_iii:nnn #1 #2 #3 {#2 #3}
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\declare@file@substitution}{File substitution}%
+\ExplSyntaxOn
+\cs_new_eq:NN \declare@file@substitution \__filehook_subst_add:nn
+\cs_new_eq:NN \undeclare@file@substitution \__filehook_subst_remove:n
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\declare@file@substitution}{File substitution}%
+
+\let \declare@file@substitution \@undefined
+\let \undeclare@file@substitution \@undefined
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\set@curr@file}{Setting current file name}%
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
+ \expandafter\def\csname\expandafter\endcsname
+ \expandafter{\csname\endcsname}%
+ \@expl@@@filehook@if@no@extension@@nTF{#1}%
+ {\@tempswatrue}{\@tempswafalse}%
+ \@kernel@make@file@csname\@curr@file
+ \@expl@@@filehook@resolve@file@subst@@w {#1}%
+ \@expl@@@filehook@if@file@replaced@@TF
+ {\@kernel@make@file@csname\@curr@file@reqd
+ \@expl@@@filehook@normalize@file@name@@w{#1}%
+ \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}%
+ {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi
+ \global\let\@curr@file@reqd\@curr@file}%
+ \endgroup}
+\EndIncludeInRelease
+\IncludeInRelease{2019/10/01}%
+ {\set@curr@file}{Setting current file name}%
+\def\set@curr@file#1{%
+ \begingroup
+ \escapechar\m@ne
+ \xdef\@curr@file{%
+ \expandafter\expandafter\expandafter\unquote@name
+ \expandafter\expandafter\expandafter{%
+ \expandafter\string
+ \csname\@firstofone#1\@empty\endcsname}}%
+ \endgroup
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\set@curr@file}{Setting current file name}%
+\let\set@curr@file\@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@kernel@make@file@csname}{Make file csname}%
+\def\@kernel@make@file@csname#1#2#3{%
+ \xdef#1{\expandafter\@set@curr@file@aux
+ \csname\expandafter#2\@firstofone#3\@nil\endcsname}}
+\def\@set@curr@file@aux#1{%
+ \expandafter\ifx\csname\endcsname#1%
+ .tex\else\string#1\fi}
+\def\@filehook@set@CurrentFile{%
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file}%
+ \CurrentFileUsed\CurrentFilePathUsed
+ \ifx\@curr@file@reqd\@curr@file
+ \let\CurrentFile\CurrentFileUsed
+ \let\CurrentFilePath\CurrentFilePathUsed
+ \else
+ \@expl@@@filehook@set@curr@file@@N{\@curr@file@reqd}%
+ \CurrentFile\CurrentFilePath
+ \fi}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {@@_set_curr_file:N}{Set curr file}%
+\ExplSyntaxOn
+\cs_new_protected:Npn \__filehook_set_curr_file:N #1
+ { \exp_args:NV \__filehook_set_curr_file:nNN #1 }
+\cs_new_protected:Npn \__filehook_set_curr_file:nNN #1
+ {
+ \__filehook_file_parse_full_name:nN {#1}
+ \__filehook_set_curr_file_assign:nnnNN
+ }
+\cs_new_protected:Npn \__filehook_set_curr_file_assign:nnnNN #1 #2 #3 #4 #5
+ {
+ \str_set:Nn #5 {#1}
+ \str_set:Nn #4 {#2#3}
+ }
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\__filehook_resolve_file_subst:w}{Replace files detect loops}%
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_resolve_file_subst:w #1 \@nil
+ { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_subst_begin:nnn }
+\cs_new:Npn \__filehook_normalize_file_name:w #1 \@nil
+ { \__filehook_file_parse_full_name:nN {#1} \__filehook_file_name_compose:nnn }
+\cs_new:Npn \__filehook_file_name_compose:nnn #1 #2 #3
+ { \tl_if_empty:nF {#1} { #1 / } #2#3 }
+\flag_new:n { __filehook_file_replaced }
+\cs_new:Npn \__filehook_if_file_replaced:TF #1 #2
+ { \flag_if_raised:nTF { __filehook_file_replaced } {#1} {#2} }
+\cs_new:Npn \__filehook_file_subst_begin:nnn #1 #2 #3
+ {
+ \__filehook_file_subst_tortoise_hare:nn { #2#3 } { #2#3 }
+ { \__filehook_file_name_compose:nnn {#1} {#2} {#3} }
+ }
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\__filehook_file_subst_tortoise_hare:nn}{Tortoise and Hare}%
+\ExplSyntaxOn
+\cs_new:Npn \__filehook_file_subst_tortoise_hare:nn #1 #2 #3
+ {
+ \cs_if_exist:cTF { @file-subst@ #2 }
+ {
+ \flag_if_raised:nF { __filehook_file_replaced }
+ { \flag_raise:n { __filehook_file_replaced } }
+ \cs_if_exist:cTF { @file-subst@ \use:c { @file-subst@ #2 } }
+ {
+ \__filehook_file_subst_loop:cc
+ { @file-subst@ #1 }
+ { @file-subst@ \use:c { @file-subst@ #2 } }
+ }
+ { \use:c { @file-subst@ #2 } }
+ }
+ { #3 }
+ }
+\cs_new:Npn \__filehook_file_subst_loop:NN #1 #2
+ {
+ \token_if_eq_meaning:NNTF #1 #2
+ {
+ .tex
+ \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #1
+ }
+ { \__filehook_file_subst_tortoise_hare:nn {#1} {#2} {#2} }
+ }
+\cs_generate_variant:Nn \__filehook_file_subst_loop:NN { cc }
+\cs_new:Npn \__filehook_file_subst_cycle_error:NN #1 #2
+ {
+ \__kernel_msg_expandable_error:nnff { kernel } { file-cycle }
+ {#1} { \use:c { @file-subst@ #1 } }
+ \token_if_eq_meaning:NNF #1 #2
+ { \__filehook_file_subst_cycle_error:cN { @file-subst@ #1 } #2 }
+ }
+\cs_generate_variant:Nn \__filehook_file_subst_cycle_error:NN { c }
+\__kernel_msg_new:nnn { kernel } { file-cycle }
+ { File~loop!~#1~replaced~by~#2... }
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\disable@package@load}{Disable packages}%
+\def\disable@package@load#1#2{%
+ \global\@namedef{@pkg-disable@#1.\@pkgextension}{#2}}
+\def\@disable@packageload@do#1#2{%
+ \@ifundefined{@pkg-disable@#1}{#2}%
+ {\@nameuse{@pkg-disable@#1}}}
+\def\reenable@package@load#1{%
+ \global\expandafter\let
+ \csname @pkg-disable@#1.\@pkgextension \endcsname \@undefined}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\disable@package@load}{Disable packages}%
+
+\let\disable@package@load \@undefined
+\let\@disable@packageload@do\@undefined
+\let\reenable@package@load \@undefined
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\@expl@@@filehook@if@no@extension@@nTF}{2e tmp interfaces}%
+\ExplSyntaxOn
+\cs_new_eq:NN \@expl@@@filehook@if@no@extension@@nTF
+ \__filehook_if_no_extension:nTF
+\cs_new_eq:NN \@expl@@@filehook@set@curr@file@@N
+ \__filehook_set_curr_file:N
+\cs_new_eq:NN \@expl@@@filehook@resolve@file@subst@@w
+ \__filehook_resolve_file_subst:w
+\cs_new_eq:NN \@expl@@@filehook@normalize@file@name@@w
+ \__filehook_normalize_file_name:w
+\cs_new_eq:NN \@expl@@@filehook@if@file@replaced@@TF
+ \__filehook_if_file_replaced:TF
+
+\cs_new_eq:NN \@expl@@@filehook@drop@extension@@N
+ \__filehook_drop_extension:N
+\cs_new_eq:NN \@expl@@@filehook@file@push@@
+ \__filehook_file_push:
+\cs_new_eq:NN \@expl@@@filehook@file@pop@@
+ \__filehook_file_pop:
+\cs_new_eq:NN \@expl@@@filehook@file@pop@assign@@nnnn
+ \__filehook_file_pop_assign:nnnn
+\ExplSyntaxOff
+\EndIncludeInRelease
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
+%%
+%%% From File: ltshipout.dtx
+\providecommand\ltshipoutversion{v1.0a}
+\providecommand\ltshipoutdate{2020/08/31}
+\IncludeInRelease{2020/10/01}%
+ {\shipout}{Hook mangement (shipout)}%
+\ExplSyntaxOn
+\bool_new:N \g__shipout_debug_bool
+\cs_new_eq:NN \__shipout_debug:n \use_none:n
+\cs_new_protected:Npn \shipout_debug_on:
+ {
+ \bool_gset_true:N \g__shipout_debug_bool
+ \__shipout_debug_gset:
+ }
+\cs_new_protected:Npn \shipout_debug_off:
+ {
+ \bool_gset_false:N \g__shipout_debug_bool
+ \__shipout_debug_gset:
+ }
+\cs_new_protected:Npn \__shipout_debug_gset:
+ {
+ \cs_gset_protected:Npx \__shipout_debug:n ##1
+ { \bool_if:NT \g__shipout_debug_bool {##1} }
+ }
+\box_new:N \l_shipout_box
+\cs_set_eq:NN \ShipoutBox \l_shipout_box
+\cs_set:Npn\__shipout_execute: {
+ \tl_set:Nx \l__shipout_group_level_tl
+ { \int_value:w \tex_currentgrouplevel:D }
+ \tex_afterassignment:D \__shipout_execute_test_level:
+ \tex_setbox:D \l_shipout_box
+}
+\cs_gset_eq:NN \shipout \__shipout_execute:
+\tl_new:N \l__shipout_group_level_tl
+
+\cs_new:Npn \__shipout_execute_test_level: {
+ \int_compare:nNnT
+ \l__shipout_group_level_tl < \tex_currentgrouplevel:D
+ \tex_aftergroup:D
+ \__shipout_execute_cont:
+}
+\cs_new:Npn \__shipout_execute_cont: {
+ \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} }
+ {
+ \bool_gset_false:N \g__shipout_discard_bool
+ \cs_set_eq:NN \__shipout_saved_protect: \protect
+ \set@typeset@protect
+ \__shipout_get_box_size:N \l_shipout_box
+ \hook_use:n {shipout/before}
+ \int_gincr:N \g_shipout_totalpages_int
+ \bool_if:NTF \g__shipout_discard_bool
+ { \PackageInfo{ltshipout}{Completed~ page~ discarded}
+ \bool_gset_false:N \g__shipout_discard_bool
+ \tex_deadcycles:D \c_zero_int
+ }
+ { \box_if_empty:NTF \l_shipout_box
+ { \PackageWarning{ltshipout}{
+ Shipout~ box~ was~ voided~ by~ hook,\MessageBreak
+ ignoring~ shipout~ box }
+ }
+ {
+ \int_gincr:N \g_shipout_readonly_int
+ \__shipout_debug:n {
+ \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int
+ \space (target:~ \@abspage@last)}
+ }
+ \__shipout_get_box_size:N \l_shipout_box
+ \hook_if_empty:nF {shipout/foreground}
+ { \__shipout_add_foreground_picture:n
+ { \hook_use:n {shipout/foreground} } }
+ \hook_if_empty:nF {shipout/background}
+ { \__shipout_add_background_picture:n
+ { \@kernel@before@shipout@background
+ \hook_use:n {shipout/background} } }
+ \__shipout_execute_firstpage_hook:
+ \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int
+ { \hook_if_empty:nF {shipout/lastpage}
+ { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~
+ on~ page~ \int_use:N \g_shipout_readonly_int } }
+ \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+ }
+ \bool_gset_true:N \g__shipout_lastpage_handled_bool
+ }
+ \cs_set_eq:NN \protect \exp_not:N
+ \tex_shipout:D \box_use:N \l_shipout_box
+ }
+ }
+ \cs_set_eq:NN \protect \__shipout_saved_protect:
+ }
+}
+\cs_new_eq:NN \__shipout_saved_protect: \protect
+\hook_new:n{shipout/before}
+\hook_new:n{shipout/foreground}
+\hook_new:n{shipout/background}
+\hook_new:n{shipout/firstpage}
+\hook_new:n{shipout/lastpage}
+\let\@kernel@after@shipout@lastpage\@empty
+\let\@kernel@before@shipout@background\@empty
+\cs_new:Npn \__shipout_execute_firstpage_hook: {
+ \hook_if_empty:nF {shipout/firstpage}
+ { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } }
+ \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing:
+ \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 {
+ \@latex@warning{
+ First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak
+ \string##1 }
+ }
+}
+\bool_new:N \g__shipout_lastpage_handled_bool
+\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 {
+ \AddToHook{shipout/firstpage}{#2}
+}
+\cs_new:Npn \__shipout_get_box_size:N #1 {
+ \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 }
+ \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 }
+ \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 }
+ \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim +
+ \l_shipout_box_dp_dim }
+}
+\dim_new:N \l_shipout_box_ht_dim
+\dim_new:N \l_shipout_box_dp_dim
+\dim_new:N \l_shipout_box_wd_dim
+\dim_new:N \l_shipout_box_ht_plus_dp_dim
+\bool_new:N \g__shipout_discard_bool
+\box_new:N \l__shipout_tmp_box
+\tl_new:N \l__shipout_saved_badness_tl
+\cs_new:Npn \__shipout_add_background_box:n #1
+{ \__shipout_get_box_size:N \l_shipout_box
+ \box_if_vertical:NTF \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \box_use:N \l__shipout_tmp_box
+ \vbox_unpack:N \l_shipout_box
+ \kern \c_zero_dim
+ }
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+ \l__shipout_saved_badness_tl
+ }
+ {
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_move_up:nn
+ \l_shipout_box_ht_dim
+ { \box_use:N \l__shipout_tmp_box }
+ \hbox_unpack:N \l_shipout_box
+ }
+ \l__shipout_saved_badness_tl
+ }
+ }
+}
+\cs_new:Npn \__shipout_add_foreground_box:n #1
+{
+ \box_if_vertical:NTF \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \vfuzz=\the\vfuzz\relax
+ \vbadness=\the\vbadness\relax }
+ \vfuzz=\c_max_dim
+ \vbadness=\c_max_int
+ \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
+ {
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \skip_zero:N \baselineskip
+ \skip_zero:N \lineskip
+ \skip_zero:N \lineskiplimit
+ \vbox_unpack:N \l_shipout_box
+ \kern -\l_shipout_box_ht_plus_dp_dim
+ \box_use:N \l__shipout_tmp_box
+ \kern \l_shipout_box_ht_plus_dp_dim
+ }
+ \l__shipout_saved_badness_tl
+ \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
+ \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
+ }
+ {
+ \box_if_horizontal:NT \l_shipout_box
+ {
+ \tl_set:Nx \l__shipout_saved_badness_tl
+ { \hfuzz=\the\hfuzz\relax
+ \hbadness=\the\hbadness\relax }
+ \hfuzz=\c_max_dim
+ \hbadness=\c_max_int
+ \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
+ {
+ \hbox_unpack:N \l_shipout_box
+ \kern -\box_wd:N \l_shipout_box
+ \hbox_set:Nn \l__shipout_tmp_box
+ { \l__shipout_saved_badness_tl #1 }
+ \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_move_up:nn { \box_ht:N \l_shipout_box }
+ { \box_use:N \l__shipout_tmp_box }
+ \kern \box_wd:N \l_shipout_box
+ }%
+ \l__shipout_saved_badness_tl
+ }
+ }
+}
+\cs_new:Npn \__shipout_init_page_origins: {
+ \tl_const:Nx \c__shipout_horigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { horigin }
+ { \cs_if_exist_use:NF \pdfhorigin { 1in } }
+ }
+ \tl_const:Nx \c__shipout_vorigin_tl
+ {
+ \cs_if_exist_use:NTF \pdfvariable { vorigin }
+ { \cs_if_exist_use:NF \pdfvorigin { 1in } }
+ }
+ \cs_gset_eq:NN \__shipout_init_page_origins: \prg_do_nothing:
+}
+\cs_new:Npn \__shipout_picture_overlay:n #1 {
+ \__shipout_init_page_origins:
+ \kern -\c__shipout_horigin_tl \scan_stop:
+ \vbox_to_zero:n {
+ \kern -\c__shipout_vorigin_tl \scan_stop:
+ \unitlength 1pt \scan_stop:
+ \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim { \ignorespaces #1 }
+ \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
+ \box_use:N \l__shipout_tmp_box
+ \tex_vss:D
+ }
+}
+\cs_new:Npn \__shipout_add_background_picture:n #1 {
+ \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} }
+}
+\cs_new:Npn \__shipout_add_foreground_picture:n #1 {
+ \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} }
+}
+\cs_new:Npn \shipout_discard: {
+ \bool_gset_true:N \g__shipout_discard_bool
+}
+\int_new:N \g_shipout_readonly_int
+\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int
+\int_new:N \g_shipout_totalpages_int
+\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int
+\cs_new:Npn \thetotalpages { \arabic{totalpages} }
+\xdef\@abspage@last{\number\maxdimen}
+\g@addto@macro \@kernel@after@enddocument {
+ \int_compare:nNnT \@abspage@last = \maxdimen
+ {
+ \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} }
+ }
+}
+\g@addto@macro \@kernel@after@enddocument@afterlastpage {
+ \int_compare:nNnF \g_shipout_readonly_int = 0
+ {
+ \if@filesw
+ \iow_now:Nx \@auxout {
+ \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}}
+ \fi
+ \bool_if:NF \g__shipout_lastpage_handled_bool
+ {
+ \bool_lazy_and:nnF
+ { \hook_if_empty_p:n {shipout/lastpage} }
+ { \tl_if_empty_p:N \@kernel@after@shipout@lastpage }
+ {
+ \tex_shipout:D\vbox to\textheight
+ {
+ \hbox:n { \UseHook{shipout/lastpage}
+ \@kernel@after@shipout@lastpage }
+ \__shipout_excuse_extra_page:
+ \null
+ }
+ \cs_gset_eq:NN \@extra@page@added \relax
+ }
+ }
+ }
+}
+\cs_new:Npn \__shipout_excuse_extra_page: {
+ \vfil
+ \begin{center}
+ \bfseries Temporary~ page!
+ \end{center}
+ \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~
+ correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~
+ should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~
+ page~ has~ been~ added~ to~ receive~ it.
+ \par
+ If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~
+ surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~
+ how~ many~ pages~ to~ expect~ for~ this~ document.
+ \vfil
+}
+\def\PreviousTotalPages{0}
+\g@addto@macro\@kernel@before@begindocument
+ {\ifnum\@abspage@last<\maxdimen
+ \xdef\PreviousTotalPages{\@abspage@last}\fi}
+\cs_new_eq:NN \DiscardShipoutBox \shipout_discard:
+\DeclareRobustCommand \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi}
+\cs_new_eq:NN \DebugShipoutsOn \shipout_debug_on:
+\cs_new_eq:NN \DebugShipoutsOff \shipout_debug_off:
+\cs_set_eq:NN \@expl@@@shipout@add@firstpage@material@@Nn
+ \__shipout_add_firstpage_material:Nn
+\cs_set_eq:NN \@expl@@@shipout@add@background@box@@n
+ \__shipout_add_background_box:n
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@box@@n
+ \__shipout_add_foreground_box:n
+\cs_set_eq:NN \@expl@@@shipout@add@background@picture@@n
+ \__shipout_add_background_picture:n
+\cs_set_eq:NN \@expl@@@shipout@add@foreground@picture@@n
+ \__shipout_add_foreground_picture:n
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\shipout}{The hook management (shipout)}%
+\expandafter\let\expandafter\shipout\csname tex_shipout:D\endcsname
+
+\let \ShipoutBox\@undefined
+\let \ReadonlyShipoutCounter \@undefined
+\let \c@totalpages \@undefined
+\let \thetotalpages \@undefined
+
+\let \DiscardShipoutBox \@undefined
+\let \DebugShipoutsOn \@undefined
+\let \DebugShipoutsOff \@undefined
+
+\DeclareRobustCommand \AtBeginDvi [1]{%
+ \global \setbox \@begindvibox
+ \vbox{\unvbox \@begindvibox #1}%
+}
+
+\let \AtBeginShipout \@undefined
+\let \AtBeginShipoutNext \@undefined
+
+\let \AtBeginShipoutFirst \@undefined
+
+\let \ShipoutBoxHeight \@undefined
+\let \ShipoutBoxDepth \@undefined
+\let \ShipoutBoxWidth \@undefined
+
+\let \AtBeginShipoutDiscard \@undefined
+
+\let \AtBeginShipoutAddToBox \@undefined
+\let \AtBeginShipoutAddToBoxForeground \@undefined
+\let \AtBeginShipoutUpperLeft \@undefined
+\let \AtBeginShipoutUpperLeftForeground \@undefined
+
+
+
+\let \AtEndDvi \@undefined
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\AtEndDvi}{atenddvi emulation}%
+\ExplSyntaxOn
+\cs_new:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
+\ExplSyntaxOff
+\disable@package@load{atenddvi}
+ {\PackageWarning{atenddvi}
+ {Functionality of this package is already\MessageBreak
+ provided by LaTeX.\MessageBreak\MessageBreak
+ It is there no longer necessary to load it\MessageBreak
+ and you can safely remove it.\MessageBreak
+ Found on}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\AtEndDvi}{atenddvi emulation}%
+\let \AtEndDvi \@undefined
+\EndIncludeInRelease
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltoutput.dtx
\IncludeInRelease{2015/10/01}%
{\bx@ZZ}{Extended float list}%
@@ -2891,6 +5494,7 @@ of this package available from CTAN}
\IncludeInRelease{2020/10/01}{\@pushfilename}%
{Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
\def\@pushfilename{%
+ \@expl@@@hook@curr@name@push@@n{}%
\@expl@push@filename@@
\xdef\@currnamestack{%
{\@currname}%
@@ -2913,11 +5517,12 @@ of this package available from CTAN}
\IncludeInRelease{2020/10/01}{\@popfilename}%
{Add \@expl@pop@filename@@}%
-\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil
+\def\@popfilename{\@expl@@@hook@curr@name@pop@@
+ \expandafter\@p@pfilename\@currnamestack\@nil
\@expl@pop@filename@@}
\EndIncludeInRelease
-\IncludeInRelease{0000/00/00}{\@pushfilename}%
+\IncludeInRelease{0000/00/00}{\@popfilename}%
{Add \@expl@push@filename@@ and \@expl@push@filename@aux@@}%
\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil}
\EndIncludeInRelease
@@ -3143,39 +5748,79 @@ of this package available from CTAN}
\reserved@a}
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
- {\@onefilewithoptions}{Unused options issue}%
+ {\@onefilewithoptions}{Hooks and unused options issue}%
\def\@onefilewithoptions#1[#2][#3]#4{%
\@pushfilename
\xdef\@currname{#1}%
\global\let\@currext#4%
+ \@ifl@aded\@currext\@currname
+ {\@if@ptions\@currext{\@currname}{#2}{}%
+ {\@latex@error
+ {Option clash for \@cls@pkg\space \@currname}%
+ {The package \@currname\space has already been loaded
+ with options:\MessageBreak
+ \space\space[\@ptionlist{\@currname.\@currext}]\MessageBreak
+ There has now been an attempt to load it
+ with options\MessageBreak
+ \space\space[#2]\MessageBreak
+ Adding the global options:\MessageBreak
+ \space\space
+ \@ptionlist{\@currname.\@currext},#2\MessageBreak
+ to your \noexpand\documentclass declaration may fix this.%
+ \MessageBreak
+ Try typing \space <return> \space to proceed.}}%
+ \@firstofone}%
+ {\makeatletter
+ \@reset@ptions
+ \IfFileExists{\@currname.\@currext}{}%
+ {\@missing@onefilewithoptions{#2}}%
+ \ifx\@currname\@empty
+ \expandafter\@gobble
+ \else
+ \@disable@packageload@do{\@currname.\@currext}%
+ {\@expl@@@filehook@file@push@@
+ \set@curr@file{\@currname.\@currext}%
+ \@filehook@set@CurrentFile
+ \load@onefile@withoptions{#2}%
+ \@expl@@@filehook@file@pop@@}%
+ \expandafter\@firstofone
+ \fi}%
+ {\@ifl@ter\@currext{\@currname}{#3}{}%
+ {\@latex@warning@no@line
+ {You have requested,\on@line,
+ version\MessageBreak
+ `#3' of \@cls@pkg\space \@currname,\MessageBreak
+ but only version\MessageBreak
+ `\csname ver@\@currname.\@currext\endcsname'\MessageBreak
+ is available}}%
+ \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi}%
+ \@popfilename
+ \@reset@ptions}
+\@onlypreamble\@onefilewithoptions
+\let\@unprocessedoptions\@undefined
+
+\def\@missing@onefilewithoptions#1{%
+ \@missingfileerror\@currname\@currext
+ \xdef\@currname{\@missingfile@area\@missingfile@base}%
+ \global\let\@currext\@missingfile@ext}
+\def\load@onefile@withoptions#1{%
\let\CurrentOption\@empty
\@reset@ptions
- \makeatletter
\def\reserved@a{%
- \@ifl@aded\@currext{#1}%
- {\@if@ptions\@currext{#1}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space #1}%
- {The package #1 has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{#1.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}}%
- {\@pass@ptions\@currext{#2}{#1}%
- \global\expandafter
- \let\csname ver@\@currname.\@currext\endcsname\@empty
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
- \InputIfFileExists
- {\@currname.\@currext}%
- {}%
- {\@missingfileerror\@currname\@currext}%
+ \@pass@ptions\@currext{#1}{\@currname}%
+ \global\expandafter
+ \let\csname ver@\@currname.\@currext\endcsname\@empty
+ \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
+ \ifx\@currext\@pkgextension
+ \UseHook{package/before}%
+ \UseHook{package/before/\@currname}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/before}%
+ \UseHook{class/before/\@currname}%
+ \fi
+ \fi
+ \InputIfFileExists{\@currname.\@currext}{}{}%
\expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
\@@unprocessedoptions
\csname\@currname.\@currext-h@@k\endcsname
@@ -3188,24 +5833,20 @@ of this package available from CTAN}
\fi
\expandafter\let
\csname unprocessedoptions-\@currname.\@currext\endcsname
- \@undefined}%
- \@ifl@ter\@currext{#1}{#3}{}%
- {\@latex@warning@no@line
- {You have requested,\on@line,
- version\MessageBreak
- `#3' of \@cls@pkg\space #1,\MessageBreak
- but only version\MessageBreak
- `\csname ver@#1.\@currext\endcsname'\MessageBreak
- is available}}%
- \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
- \@popfilename
- \@reset@ptions}%
+ \@undefined
+ \ifx\@currext\@pkgextension
+ \UseHook{package/after/\@currname}%
+ \UseHook{package/after}%
+ \else
+ \ifx\@currext\@clsextension
+ \UseHook{class/after/\@currname}%
+ \UseHook{class/after}%
+ \fi
+ \fi}%
\reserved@a}
-\@onlypreamble\@onefilewithoptions
-\let\@unprocessedoptions\@undefined
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\@onefilewithoptions}{Unused options issue}%
+ {\@onefilewithoptions}{Hooks and unused options issue}%
\def\load@onefilewithoptions#1[#2][#3]#4{%
\@pushfilename
@@ -3256,6 +5897,152 @@ of this package available from CTAN}
\@popfilename
\@reset@ptions}%
\reserved@a}
+
+\let \load@onefile@withoptions \@undefined
+\let \@missing@onefilewithoptions \@undefined
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\AtBeginDocument}{Use hook system}%
+\DeclareRobustCommand\AtBeginDocument{\AddToHook{begindocument}}
+\DeclareRobustCommand\AtEndDocument {\AddToHook{enddocument}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\AtBeginDocument}{Use hook system}%
+
+\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook}
+\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook}
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\filec@ntents}{Define \q@curr@file directly (gh/220)}%
+\def\filecontents{\@tempswatrue\@fileswtrue
+ \@ifnextchar[\filec@ntents@opt\filec@ntents
+}
+\@namedef{filecontents*}{\@tempswafalse\@fileswtrue
+ \@ifnextchar[\filec@ntents@opt\filec@ntents
+}
+\def\filec@ntents@opt[#1]{%
+ \edef\@fortmp{\zap@space#1 \@empty}%
+ \@for\reserved@a:=\@fortmp\do{%
+ \ifcsname filec@ntents@\reserved@a\endcsname
+ \csname filec@ntents@\reserved@a\endcsname
+ \else
+ \@latex@error{Unknown filecontents option \reserved@a}%
+ {Valid options are force (or overwrite), nosearch, noheader}%
+ \fi}%
+ \filec@ntents
+}
+\let\filec@ntents@force\@fileswfalse
+\let\filec@ntents@overwrite\@fileswfalse % alternative name
+\let\filec@ntents@noheader\@tempswafalse
+\def\filec@ntents@nosearch{%
+ \let\filec@ntents@checkdir\@currdir
+ \def\filec@ntents@where{in current directory}}
+\let\filec@ntents@checkdir\@empty
+\def\filec@ntents@where{exists on the system}
+\begingroup%
+\@tempcnta=1
+\loop
+ \catcode\@tempcnta=12 %
+ \advance\@tempcnta\@ne %
+\ifnum\@tempcnta<32 %
+\repeat %
+\catcode`\*=11 %
+\catcode`\^^M\active%
+\catcode`\^^L\active\let^^L\relax%
+\catcode`\^^I\active%
+\gdef\filec@ntents#1{%
+ \set@curr@file{\filec@ntents@checkdir#1}%
+ \edef\q@curr@file{"\@curr@file"}%
+ \chardef\reserved@c\ifx\directlua\@undefined 15 \else 127 \fi%
+ \openin\@inputcheck\q@curr@file \space %
+ \ifeof\@inputcheck%
+ \@latex@warning@no@line%
+ {Writing file `\@currdir\@curr@file'}%
+ \ch@ck7\reserved@c\write\relax%
+ \immediate\openout\reserved@c\q@curr@file\relax%
+ \else%
+ \if@filesw%
+ \@latex@warning@no@line%
+ {File `\@curr@file' already \filec@ntents@where.\MessageBreak%
+ Not generating it from this source}%
+ \let\write\@gobbletwo%
+ \let\closeout\@gobble%
+ \else%
+ \edef\reserved@a{#1}%
+ \edef\reserved@a{\detokenize\expandafter{\reserved@a}}%
+ \edef\reserved@b{\detokenize\expandafter{\jobname}}%
+ \ifx\reserved@a\reserved@b%
+ \@fileswtrue%
+ \else%
+ \edef\reserved@b{\reserved@b\detokenize{.tex}}%
+ \ifx\reserved@a\reserved@b
+ \@fileswtrue%
+ \fi%
+ \fi%
+ \ch@ck7\reserved@c\write\relax%
+ \if@filesw% % Foul ... trying to overwrite \jobname!
+ \@latex@error{Trying to overwrite `\jobname.tex'}{You can't %
+ write to the file you are reading from!\MessageBreak%
+ Data is written to screen instead.}%
+ \else%
+ \@latex@warning@no@line%
+ {Writing or overwriting file `\@currdir\@curr@file'}%
+ \immediate\openout\reserved@c\q@curr@file\relax%
+ \fi%
+ \fi%
+ \fi%
+ \closein\@inputcheck%
+ \if@tempswa%
+ \immediate\write\reserved@c{%
+ \@percentchar\@percentchar\space%
+ \expandafter\@gobble\string\LaTeX2e file `\@curr@file'^^J%
+ \@percentchar\@percentchar\space generated by the %
+ `\@currenvir' \expandafter\@gobblefour\string\newenvironment^^J%
+ \@percentchar\@percentchar\space from source `\jobname' on %
+ \number\year/\two@digits\month/\two@digits\day.^^J%
+ \@percentchar\@percentchar}%
+ \fi%
+ \let\do\@makeother\dospecials%
+ \count@ 128\relax%
+ \loop%
+ \catcode\count@ 11\relax%
+ \advance\count@ \@ne%
+ \ifnum\count@<\@cclvi%
+ \repeat%
+ \edef\E{\@backslashchar end\string{\@currenvir\string}}%
+ \edef\reserved@b{%
+ \def\noexpand\reserved@b%
+ ####1\E####2\E####3\relax}%
+ \reserved@b{%
+ \ifx\relax##3\relax%
+ \immediate\write\reserved@c{##1}%
+ \else%
+ \edef^^M{\noexpand\end{\@currenvir}}%
+ \ifx\relax##1\relax%
+ \else%
+ \@latex@warning{Writing text `##1' before %
+ \string\end{\@currenvir}\MessageBreak as last line of \@curr@file}%
+ \immediate\write\reserved@c{##1}%
+ \fi%
+ \ifx\relax##2\relax%
+ \else%
+ \@latex@warning{%
+ Ignoring text `##2' after \string\end{\@currenvir}}%
+ \fi%
+ \fi%
+ ^^M}%
+ \catcode`\^^L\active%
+ \let\L\@undefined%
+ \def^^L{\expandafter\ifx\csname L\endcsname\relax\fi ^^J^^J}%
+ \catcode`\^^I\active%
+ \let\I\@undefined%
+ \def^^I{\expandafter\ifx\csname I\endcsname\relax\fi\space}%
+ \catcode`\^^M\active%
+ \edef^^M##1^^M{%
+ \noexpand\reserved@b##1\E\E\relax}}%
+\endgroup%
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\filec@ntents}{Spaces in file names + optional arg}%
@@ -3977,6 +6764,18 @@ of this package available from CTAN}
\let\float@count\@undefined
\let\extrafloats\@undefined
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}
+ {\alloc@}{emulate alloc@}%
+\def\alloc@#1#2#3#4{\e@alloc#2#3{\count1#1}#4\float@count}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\alloc@}{emulate alloc@}%
+\def\alloc@#1#2#3#4#5{\global\advance\count1#1\@ne
+ \ch@ck#1#4#2%
+ \allocationnumber\count1#1%
+ \global#3#5\allocationnumber
+ \wlog{\string#5=\string#2\the\allocationnumber}}
+\EndIncludeInRelease
\IncludeInRelease{2015/10/01}
{\newinsert}{Extended \newinsert}%
\ifx\numexpr\@undefined
@@ -4437,75 +7236,6 @@ of this package available from CTAN}
\def\mdseries@sf{m}
\def\mdseries@tt{m}
-\def\expand@font@defaults{%
- \edef\rmdef@ult{\rmdefault}%
- \edef\sfdef@ult{\sfdefault}%
- \edef\ttdef@ult{\ttdefault}%
- \series@maybe@drop@one@m\bfdefault\bfdef@ult
- \series@maybe@drop@one@m\mddefault\mddef@ult
- \@expandfontdefaultshook
-}
-
-\DeclareRobustCommand\bfseries{%
- \not@math@alphabet\bfseries\mathbf
- \expand@font@defaults
- \ifx\bfdefault\bfdefault@previous\else
- \expandafter\def\expandafter\bfdefault
- \expandafter{\bfdefault\@empty}%
- \let\bfseries@previous\bfdefault
- \let\bfseries@rm\bfdef@ult
- \let\bfseries@sf\bfdef@ult
- \let\bfseries@tt\bfdef@ult
- \@setbfseriesdefaultshook
- \fi
- \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
- \else \fontseries\bfdefault
- \fi\fi\fi
- \selectfont
-}
-
-\DeclareRobustCommand\mdseries{%
- \not@math@alphabet\mdseries\relax
- \expand@font@defaults
- \ifx\mddefault\mddefault@previous\else
- \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
- \let\mdseries@previous\mddefault
- \let\mdseries@rm\mddef@ult
- \let\mdseries@sf\mddef@ult
- \let\mdseries@tt\mddef@ult
- \@setmdseriesdefaultshook
- \fi
- \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
- \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
- \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
- \else \fontseries\mddefault
- \fi\fi\fi
- \selectfont
-}
-
-\DeclareRobustCommand\rmfamily{%
- \not@math@alphabet\rmfamily\mathrm
- \prepare@family@series@update{rm}\rmdefault
- \@rmfamilyhook
- \selectfont}
-\DeclareRobustCommand\sffamily{%
- \not@math@alphabet\sffamily\mathsf
- \prepare@family@series@update{sf}\sfdefault
- \@sffamilyhook
- \selectfont}
-\DeclareRobustCommand\ttfamily{%
- \not@math@alphabet\ttfamily\mathtt
- \prepare@family@series@update{tt}\ttdefault
- \@ttfamilyhook
- \selectfont}
-\let\@expandfontdefaultshook\@empty
-\let\@setbfseriesdefaultshook\@empty
-\let\@setmdseriesdefaultshook\@empty
-\let\@rmfamilyhook\@empty
-\let\@sffamilyhook\@empty
-\let\@ttfamilyhook\@empty
\def\@meta@family@list{\@elt{rm}\@elt{sf}\@elt{tt}}
\def\prepare@family@series@update#1#2{%
\if@forced@series
@@ -4557,13 +7287,16 @@ of this package available from CTAN}
}
\def\init@series@setup{%
\ifx\bfseries@rm@kernel\bfseries@rm
- \expandafter\in@\expandafter{\rmdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\rmdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@rm{b}\fi\fi
\ifx\bfseries@sf@kernel\bfseries@sf
- \expandafter\in@\expandafter{\sfdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\sfdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@sf{b}\fi\fi
\ifx\bfseries@tt@kernel\bfseries@tt
- \expandafter\in@\expandafter{\ttdefault}{cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
+ \expandafter\in@\expandafter{\ttdefault}%
+ {cmr,cmss,cmtt,lcmss,lcmtt,lmr,lmss,lmtt}%
\ifin@ \else \def\bfseries@tt{b}\fi\fi
\reset@font
\ifx\seriesdefault\seriesdefault@kernel
@@ -4586,9 +7319,154 @@ of this package available from CTAN}
\let\mdseries@rm\@undefined
\let\mdseries@sf\@undefined
\let\mdseries@tt\@undefined
-\let\expand@font@defaults\@undefined
\expandafter\let\csname ver@mweights.sty\endcsname\@undefined
+\let\@meta@family@list\@undefined
+\let\prepare@family@series@update\@undefined
+\let\update@series@target@value\@undefined
+
+\let\init@series@setup\relax
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\bfseries}{Custom series with hooks}%
+
+\def\expand@font@defaults{%
+ \edef\rmdef@ult{\rmdefault}%
+ \edef\sfdef@ult{\sfdefault}%
+ \edef\ttdef@ult{\ttdefault}%
+ \series@maybe@drop@one@m\bfdefault\bfdef@ult
+ \series@maybe@drop@one@m\mddefault\mddef@ult
+ \UseHook{expand@font@defaults}%
+}
+
+\DeclareRobustCommand\bfseries{%
+ \not@math@alphabet\bfseries\mathbf
+ \expand@font@defaults
+ \ifx\bfdefault\bfdefault@previous\else
+ \expandafter\def\expandafter\bfdefault
+ \expandafter{\bfdefault\@empty}%
+ \let\bfseries@previous\bfdefault
+ \let\bfseries@rm\bfdef@ult
+ \let\bfseries@sf\bfdef@ult
+ \let\bfseries@tt\bfdef@ult
+ \UseHook{bfseries/defaults}%
+ \fi
+ \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
+ \else \fontseries\bfdefault
+ \fi\fi\fi
+ \UseHook{bfseries}%
+ \selectfont
+}
+
+\DeclareRobustCommand\mdseries{%
+ \not@math@alphabet\mdseries\relax
+ \expand@font@defaults
+ \ifx\mddefault\mddefault@previous\else
+ \expandafter\def\expandafter\mddefault\expandafter{\mddefault\@empty}%
+ \let\mdseries@previous\mddefault
+ \let\mdseries@rm\mddef@ult
+ \let\mdseries@sf\mddef@ult
+ \let\mdseries@tt\mddef@ult
+ \UseHook{mdseries/defaults}%
+ \fi
+ \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
+ \else \fontseries\mddefault
+ \fi\fi\fi
+ \UseHook{mdseries}%
+ \selectfont
+}
+
+\DeclareRobustCommand\rmfamily{%
+ \not@math@alphabet\rmfamily\mathrm
+ \prepare@family@series@update{rm}\rmdefault
+ \UseHook{rmfamily}%
+ \selectfont}
+\DeclareRobustCommand\sffamily{%
+ \not@math@alphabet\sffamily\mathsf
+ \prepare@family@series@update{sf}\sfdefault
+ \UseHook{sffamily}%
+ \selectfont}
+\DeclareRobustCommand\ttfamily{%
+ \not@math@alphabet\ttfamily\mathtt
+ \prepare@family@series@update{tt}\ttdefault
+ \UseHook{ttfamily}%
+ \selectfont}
+\NewHook{rmfamily}
+\NewHook{sffamily}
+\NewHook{ttfamily}
+\NewHook{normalfont}
+\NewHook{expand@font@defaults}
+\NewHook{bfseries}
+\NewHook{bfseries/defaults}
+\NewHook{mdseries}
+\NewHook{mdseries/defaults}
+\let\@rmfamilyhook\@empty
+\let\@sffamilyhook\@empty
+\let\@ttfamilyhook\@empty
+\let\@defaulfamilyhook\@empty
+\EndIncludeInRelease
+\IncludeInRelease{2020/02/02}%
+ {\bfseries}{Custom series with hooks}%
+
+\def\expand@font@defaults{%
+ \edef\rmdef@ult{\rmdefault}%
+ \edef\sfdef@ult{\sfdefault}%
+ \edef\ttdef@ult{\ttdefault}%
+ \edef\bfdef@ult{\bfdefault}%
+ \edef\mddef@ult{\mddefault}%
+ \edef\famdef@ult{\familydefault}%
+}
+
+\DeclareRobustCommand\bfseries{%
+ \not@math@alphabet\bfseries\mathbf
+ \expand@font@defaults
+ \ifx\f@family\rmdef@ult \fontseries\bfseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\bfseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\bfseries@tt
+ \else \fontseries\bfdefault
+ \fi\fi\fi
+ \selectfont
+}
+
+\DeclareRobustCommand\mdseries{%
+ \not@math@alphabet\mdseries\relax
+ \expand@font@defaults
+ \ifx\f@family\rmdef@ult \fontseries\mdseries@rm
+ \else\ifx\f@family\sfdef@ult \fontseries\mdseries@sf
+ \else\ifx\f@family\ttdef@ult \fontseries\mdseries@tt
+ \else \fontseries\mddefault
+ \fi\fi\fi
+ \selectfont
+}
+
+\DeclareRobustCommand\rmfamily{%
+ \not@math@alphabet\rmfamily\mathrm
+ \prepare@family@series@update{rm}\rmdefault
+ \@rmfamilyhook
+ \selectfont}
+\DeclareRobustCommand\sffamily{%
+ \not@math@alphabet\sffamily\mathsf
+ \prepare@family@series@update{sf}\sfdefault
+ \@sffamilyhook
+ \selectfont}
+\DeclareRobustCommand\ttfamily{%
+ \not@math@alphabet\ttfamily\mathtt
+ \prepare@family@series@update{tt}\ttdefault
+ \@ttfamilyhook
+ \selectfont}
+
+
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\bfseries}{Custom series with hooks}%
+
+\let\expand@font@defaults\@undefined
+
\DeclareRobustCommand\bfseries
{\not@math@alphabet\bfseries\mathbf
\fontseries\bfdefault\selectfont}
@@ -4605,21 +7483,13 @@ of this package available from CTAN}
{\not@math@alphabet\ttfamily\mathtt
\fontfamily\ttdefault\selectfont}
-\let\@expandfontdefaultshook\@undefined
-\let\@setbfseriesdefaultshook\@undefined
-\let\@setmdseriesdefaultshook\@undefined
\let\@rmfamilyhook\@undefined
\let\@sffamilyhook\@undefined
\let\@ttfamilyhook\@undefined
-\let\@meta@family@list\@undefined
-\let\prepare@family@series@update\@undefined
-\let\update@series@target@value\@undefined
-
-\let\init@series@setup\relax
\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
- {\IfFontSeriesContext}{Font series context}%
+ {\IfFontSeriesContextTF}{Font series context}%
\DeclareRobustCommand\IfFontSeriesContextTF[1]{%
\expand@font@defaults
\@font@series@contextfalse
@@ -4653,7 +7523,7 @@ of this package available from CTAN}
\newif\if@font@series@context
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\IfFontSeriesContext}{Font series context}%
+ {\IfFontSeriesContextTF}{Font series context}%
\let\IfFontSeriesContextTF\@undefined
\let\test@font@series@context\@undefined
@@ -4737,10 +7607,11 @@ of this package available from CTAN}
\edef\f@family{\familydefault}%
\edef\f@series{\seriesdefault}%
\edef\f@shape{\shapedefault}%
- \@defaultfamilyhook
+ \UseHook{normalfont}%
+ \@defaultfamilyhook % hookname from 2020/02 will vanish
\selectfont}
\let\reset@font\normalfont
-\let\@defaultfamilyhook\@empty
+\let\@defaultfamilyhook\@empty %FMi sort out
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\normalfont}{Add hook to \normalfont}%
@@ -4759,7 +7630,7 @@ of this package available from CTAN}
%%% From File: fontdef.dtx
\IncludeInRelease{2017/01/01}%
{\encodingdefault}{TU encoding default}%
-\ifx\Umathchar\@undefined
+\ifx\Umathcode\@undefined
\renewcommand\encodingdefault{OT1}
\fontencoding{\encodingdefault}
\renewcommand\rmdefault{cmr}
@@ -6448,6 +9319,18 @@ of this package available from CTAN}
\let\reinstall@nfss@defs\relax
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\reinstall@nfss@defs}{NFSS series init}%
+\g@addto@macro\@kernel@after@begindocument@before
+ {\reinstall@nfss@defs\init@series@setup}
+\EndIncludeInRelease
+\IncludeInRelease{2020/02/02}%
+ {\reinstall@nfss@defs}{NFSS series init}%
+\AtBeginDocument{\reinstall@nfss@defs\init@series@setup}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\reinstall@nfss@defs}{NFSS series init}%
+\EndIncludeInRelease
%%% From File: ltfsstrc.dtx
%% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf.
%% Copyright (C) 1994-97 by LaTeX3 project. All rights reserved.
@@ -6614,6 +9497,7 @@ of this package available from CTAN}
%%% From File: ltxref.dtx
\IncludeInRelease{2020/10/01}%
{\refstepcounter}{Add \@currentcounter}%
+\def\@currentcounter{}
\def\refstepcounter#1{\stepcounter{#1}%
\edef\@currentcounter{#1}%
\protected@edef\@currentlabel
@@ -6625,6 +9509,7 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\refstepcounter}{Add \labelformat and \Ref}%
+\let\@currentcounter\@undefined
\def\refstepcounter#1{\stepcounter{#1}%
\protected@edef\@currentlabel
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
@@ -6645,6 +9530,102 @@ of this package available from CTAN}
\EndIncludeInRelease
%%% From File: ltmiscen.dtx
+\IncludeInRelease{2020/10/01}%
+ {\enddocument}{Use Hooks}%
+\def\enddocument{%
+ \UseOneTimeHook{enddocument}%
+ \@kernel@after@enddocument
+ \@checkend{document}%
+ \clearpage
+ \UseOneTimeHook{enddocument/afterlastpage}%
+ \@kernel@after@enddocument@afterlastpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter \@@input\jobname.aux
+ \fi
+ \UseHook{enddocument/afteraux}%
+ \UseOneTimeHook{enddocument/info}%
+ \endgroup
+ \UseOneTimeHook{enddocument/end}%
+ \deadcycles\z@\@@end}
+\NewHook{enddocument}
+\NewHook{enddocument/afterlastpage}
+\NewHook{enddocument/afteraux}
+\NewHook{enddocument/info}
+\NewHook{enddocument/end}
+\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
+\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
+\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
+\let\@kernel@after@enddocument\@empty
+\let\@kernel@after@enddocument@afterlastpage\@empty
+\def\@enddocument@kernel@warnings{%
+ \ifdim \font@submax >\fontsubfuzz\relax
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+ \@defaultsubs
+ \@refundefined
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \ifx \@extra@page@added \relax
+ \@latex@warning@no@line{Temporary extra page added at the end.
+ Rerun to get it removed}%
+ \fi
+ \fi
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\enddocument}{Use Hooks}%
+
+\def\enddocument{%
+ \let\AtEndDocument\@firstofone
+ \@enddocumenthook
+ \@checkend{document}%
+ \clearpage
+ \begingroup
+ \if@filesw
+ \immediate\closeout\@mainaux
+ \let\@setckpt\@gobbletwo
+ \let\@newl@bel\@testdef
+ \@tempswafalse
+ \makeatletter \@@input\jobname.aux
+ \fi
+ \@dofilelist
+ \ifdim \font@submax >\fontsubfuzz\relax
+ \@font@warning{Size substitutions with differences\MessageBreak
+ up to \font@submax\space have occurred.\@gobbletwo}%
+ \fi
+ \@defaultsubs
+ \@refundefined
+ \if@filesw
+ \ifx \@multiplelabels \relax
+ \if@tempswa
+ \@latex@warning@no@line{Label(s) may have changed.
+ Rerun to get cross-references right}%
+ \fi
+ \else
+ \@multiplelabels
+ \fi
+ \fi
+ \endgroup
+ \deadcycles\z@\@@end}
+
+\let\@kernel@after@enddocument\@undefined
+\let\@kernel@after@enddocument@afterlastpage\@undefined
+\let\@enddocument@kernel@warnings\@undefined
+
+\EndIncludeInRelease
\IncludeInRelease{2018/12/01}%
{\protected@file@percent}{Mask line endings}%
\protected\def\protected@file@percent{}
@@ -6685,6 +9666,55 @@ of this package available from CTAN}
}%
}
\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\begin}{Use hook system}%
+\DeclareRobustCommand*\begin[1]{%
+ \UseHook{env/#1/before}%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \@execute@begin@hook{#1}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse\reserved@a}
+\def\@execute@begin@hook #1{%
+ \expandafter\ifx\csname #1\endcsname\document
+ \endgroup
+ \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}%
+ \@expl@@@initialize@all@@
+ \fi
+ \UseHook{env/#1/begin}%
+}
+\edef\end
+ {\unexpanded{%
+ \romannumeral
+ \ifx\protect\@typeset@protect
+ \expandafter %1
+ \expandafter %2
+ \expandafter %1
+ \expandafter %3 expands the \csname inside \end<space>
+ \expandafter %1
+ \expandafter %2 expands \end<space>
+ \expandafter %1 expands the \else
+ \z@
+ \else
+ \expandafter\z@\expandafter\protect
+ \fi
+ }%
+ \expandafter\noexpand\csname end \endcsname
+ }
+\@namedef{end }#1{%
+ \romannumeral
+ \IfHookEmptyTF{env/#1/end}%
+ {\expandafter\z@}%
+ {\z@\UseHook{env/#1/end}}%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \UseHook{env/#1/after}%
+ \if@ignore\@ignorefalse\ignorespaces\fi
+}
+\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
{\begin}{Making \begin/\end robust}%
\DeclareRobustCommand\begin[1]{%
@@ -6720,8 +9750,34 @@ of this package available from CTAN}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\begin}{Making \begin/\end robust}%
-\kernel@make@fragile\begin
-\kernel@make@fragile\end
+\def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+ {\def\reserved@a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on@line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse\reserved@a}
+\def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if@endpe\@doendpe\fi
+ \if@ignore\@ignorefalse\ignorespaces\fi}
+
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\AtBeginEnvironment}{Hooks for environments}%
+\newcommand\AtBeginEnvironment[2][.] {\AddToHook{env/#2/begin}[#1]}
+\newcommand\AtEndEnvironment[2][.] {\AddToHook{env/#2/end}[#1]}
+\newcommand\BeforeBeginEnvironment[2][.]{\AddToHook{env/#2/before}[#1]}
+\newcommand\AfterEndEnvironment[2][.] {\AddToHook{env/#2/after}[#1]}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\AtBeginEnvironment}{Hooks for environments}%
+
+\let\AtBeginEnvironment\@undefined
+\let\AtEndEnvironment\@undefined
+\let\BeforeBeginEnvironment\@undefined
+\let\AfterEndEnvironment\@undefined
\EndIncludeInRelease
\IncludeInRelease{2020/02/02}%
@@ -6937,23 +9993,23 @@ of this package available from CTAN}
\long\def\@firstofone#1{#1}
\ifx\e@alloc@attribute@count\@undefined
\countdef\e@alloc@attribute@count=258
+ \e@alloc@attribute@count=\z@
\fi
\def\newattribute#1{%
\e@alloc\attribute\attributedef
\e@alloc@attribute@count\m@ne\e@alloc@top#1%
}
-\e@alloc@attribute@count=\z@
\def\setattribute#1#2{#1=\numexpr#2\relax}
\def\unsetattribute#1{#1=-"7FFFFFFF\relax}
\ifx\e@alloc@ccodetable@count\@undefined
\countdef\e@alloc@ccodetable@count=259
+ \e@alloc@ccodetable@count=\z@
\fi
\def\newcatcodetable#1{%
\e@alloc\catcodetable\chardef
\e@alloc@ccodetable@count\m@ne{"8000}#1%
\initcatcodetable\allocationnumber
}
-\e@alloc@ccodetable@count=\z@
\newcatcodetable\catcodetable@initex
\newcatcodetable\catcodetable@string
\begingroup
@@ -7036,31 +10092,32 @@ of this package available from CTAN}
\endgroup
\ifx\e@alloc@luafunction@count\@undefined
\countdef\e@alloc@luafunction@count=260
+ \e@alloc@luafunction@count=\z@
\fi
\def\newluafunction{%
\e@alloc\luafunction\e@alloc@chardef
\e@alloc@luafunction@count\m@ne\e@alloc@top
}
-\e@alloc@luafunction@count=\z@
\ifx\e@alloc@whatsit@count\@undefined
\countdef\e@alloc@whatsit@count=261
+ \e@alloc@whatsit@count=\z@
\fi
\def\newwhatsit#1{%
\e@alloc\whatsit\e@alloc@chardef
\e@alloc@whatsit@count\m@ne\e@alloc@top#1%
}
-\e@alloc@whatsit@count=\z@
\ifx\e@alloc@bytecode@count\@undefined
\countdef\e@alloc@bytecode@count=262
+ \e@alloc@bytecode@count=\z@
\fi
\def\newluabytecode#1{%
\e@alloc\luabytecode\e@alloc@chardef
\e@alloc@bytecode@count\m@ne\e@alloc@top#1%
}
-\e@alloc@bytecode@count=\z@
\ifx\e@alloc@luachunk@count\@undefined
\countdef\e@alloc@luachunk@count=263
+ \e@alloc@luachunk@count=\z@
\fi
\def\newluachunkname#1{%
\e@alloc\luachunk\e@alloc@chardef
@@ -7068,7 +10125,12 @@ of this package available from CTAN}
{\escapechar\m@ne
\directlua{lua.name[\the\allocationnumber]="\string#1"}}%
}
-\e@alloc@luachunk@count=\z@
+\def\now@and@everyjob#1{%
+ \everyjob\expandafter{\the\everyjob
+ #1%
+ }%
+ #1%
+}
\begingroup
\attributedef\attributezero=0 %
\chardef \charzero =0 %
@@ -7194,20 +10256,24 @@ of this package available from CTAN}
}%
\input{expl3.ltx}
\EndIncludeInRelease
-\IncludeInRelease{2020/10/01}%
- {\@expl@tl@trim@spaces@apply@@nN}
- {l3 macro for use in include}%
\ExplSyntaxOn
-\cs_new_eq:NN \@expl@tl@trim@spaces@apply@@nN \tl_trim_spaces_apply:nN
-\ExplSyntaxOff
-\EndIncludeInRelease
-\IncludeInRelease{0000/00/00}%
- {\@expl@tl@trim@spaces@apply@@nN}
- {l3 macro for use in include}%
-
-\let\@expl@tl@trim@spaces@apply@@nN\@undefined
-
+\IncludeInRelease{2020/10/01}{expl3~2020-10-01}%
+ {expl3~macros~added~for~the~2020-10-01~release}%
+\cs_gset_eq:NN \@expl@cs@to@str@@N \cs_to_str:N
+\cs_gset_eq:NN \@expl@str@if@eq@@nnTF \str_if_eq:nnTF
+\cs_gset_eq:NN \@expl@cs@prefix@spec@@N \cs_prefix_spec:N
+\cs_gset_eq:NN \@expl@cs@argument@spec@@N \cs_argument_spec:N
+\cs_gset_eq:NN \@expl@cs@replacement@spec@@N \cs_replacement_spec:N
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{expl3~2020-10-01}%
+ {expl3~macros~added~for~the~2020-10-01~release}%
+\cs_undefine:N \@expl@cs@to@str@@N
+\cs_undefine:N \@expl@str@if@eq@@nnTF
+\cs_undefine:N \@expl@cs@prefix@spec@@N
+\cs_undefine:N \@expl@cs@argument@spec@@N
+\cs_undefine:N \@expl@cs@replacement@spec@@N
\EndIncludeInRelease
+\ExplSyntaxOff
%%% From File: ltfinal.dtx
\IncludeInRelease{2015/01/01}%
{\newmarks}{Extended Allocation}%
@@ -7343,7 +10409,7 @@ of this package available from CTAN}
\IncludeInRelease{2018/04/01}%
{\UTFviii@invalid}{UTF-8 default}%
\ifnum0%
- \ifx\Umathchar\@undefined\else 1\fi
+ \ifx\Umathcode\@undefined\else 1\fi
\ifx\mubyte\@undefined\else 1\fi
\ifx\charsubdef\@undefined\else 1\fi
=\z@
@@ -7467,211 +10533,6 @@ of this package available from CTAN}
\let\DeclareFontEncoding@saved\@undefined
\let\inputencodingname\@undefined
\EndIncludeInRelease
-\IncludeInRelease{2020/10/01}%
- {\ShowHook}{The hook management}%
-\input lthooks.ltx
-\input ltshipout.ltx
-\input ltfilehook.ltx
-\EndIncludeInRelease
-\IncludeInRelease{0000/00/00}%
- {\ShowHook}{The hook management}%
-
-
-\DeclareRobustCommand*\begin[1]{%
- \@ifundefined{#1}%
- {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
- {\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse\reserved@a}
-
-\@namedef{end }#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \if@ignore\@ignorefalse\ignorespaces\fi}
-
-\DeclareDocumentCommand \NewHook {m}{}
-\DeclareDocumentCommand \NewReversedHook {m}{}
-\DeclareDocumentCommand \NewMirroredHookPair {mm}{}
-
-\DeclareDocumentCommand \AddToHookNext {m+m}{}
-\DeclareDocumentCommand \RemoveFromHook {mo}{}
-\def \UseHook #1{}
-\def \UseOneTimeHook #1{}
-\def \ShowHook #1{}
-\let \DebugHookOn \@empty
-\let \DebugHookOff\@empty
-
-\DeclareDocumentCommand \DeclareHookRule {mmmm}{}
-\DeclareDocumentCommand \DeclareDefaultHookRule {mmm}{}
-\DeclareDocumentCommand \ClearHookRule {mmm}{}
-\DeclareExpandableDocumentCommand \IfHookExistTF {mmm}{#3}
-\DeclareExpandableDocumentCommand \IfHookEmptyTF {mmm}{#2}
-
-\DeclareRobustCommand\AtBeginDocument{\g@addto@macro\@begindocumenthook}
-\DeclareRobustCommand\AtEndDocument{\g@addto@macro\@enddocumenthook}
-
-\let\AtBeginEnvironment \@undefined
-\let\AtEndEnvironment \@undefined
-\let\BeforeBeginEnvironment \@undefined
-\let\AfterEndEnvironment \@undefined
-
-\def\@pushfilename{%
- \@expl@push@filename@@
- \xdef\@currnamestack{%
- {\@currname}%
- {\@currext}%
- {\the\catcode`\@}%
- \@currnamestack}%
- \@expl@push@filename@aux@@}
-\def\@popfilename{\expandafter\@p@pfilename\@currnamestack\@nil
- \@expl@pop@filename@@}
-
-
-% next goes away again when etoolbox is updated ...
-\expandafter\let\csname ver@etoolbox.sty\endcsname\@undefined
-
-\def\document{\endgroup
- \@expl@sys@load@backend@@
- \ifx\@unusedoptionlist\@empty\else
- \@latex@warning@no@line{Unused global option(s):^^J%
- \@spaces[\@unusedoptionlist]}%
- \fi
- \@colht\textheight
- \@colroom\textheight \vsize\textheight
- \columnwidth\textwidth
- \@clubpenalty\clubpenalty
- \if@twocolumn
- \advance\columnwidth -\columnsep
- \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
- \fi
- \hsize\columnwidth \linewidth\hsize
- \begingroup\@floatplacement\@dblfloatplacement
- \makeatletter\let\@writefile\@gobbletwo
- \global \let \@multiplelabels \relax
- \@input{\jobname.aux}%
- \endgroup
- \if@filesw
- \immediate\openout\@mainaux\jobname.aux
- \immediate\write\@mainaux{\relax}%
- \fi
- \process@table
- \let\glb@currsize\@empty % Force math initialization.
- \normalsize
- \everypar{}%
- \ifx\normalsfcodes\@empty
- \ifnum\sfcode`\.=\@m
- \let\normalsfcodes\frenchspacing
- \else
- \let\normalsfcodes\nonfrenchspacing
- \fi
- \fi
- \ifx\document@default@language\m@ne
- \chardef\document@default@language\language
- \fi
- \@noskipsecfalse
- \let \@refundefined \relax
- \let\AtBeginDocument\@firstofone
- \@begindocumenthook
- \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
- \global\@maxdepth\maxdepth
- \global\let\@begindocumenthook\@undefined
- \ifx\@listfiles\@undefined
- \global\let\@filelist\relax
- \global\let\@addtofilelist\@gobble
- \fi
- \gdef\do##1{\global\let ##1\@notprerr}%
- \@preamblecmds
- \global\let \@nodocument \relax
- \global\let\do\noexpand
- \ignorespaces}
-
-\def\enddocument{%
- \let\AtEndDocument\@firstofone
- \@enddocumenthook
- \@checkend{document}%
- \clearpage
- \begingroup
- \if@filesw
- \immediate\closeout\@mainaux
- \let\@setckpt\@gobbletwo
- \let\@newl@bel\@testdef
- \@tempswafalse
- \makeatletter \@@input\jobname.aux
- \fi
- \@dofilelist
- \ifdim \font@submax >\fontsubfuzz\relax
- \@font@warning{Size substitutions with differences\MessageBreak
- up to \font@submax\space have occurred.\@gobbletwo}%
- \fi
- \@defaultsubs
- \@refundefined
- \if@filesw
- \ifx \@multiplelabels \relax
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \fi
- \else
- \@multiplelabels
- \fi
- \fi
- \endgroup
- \deadcycles\z@\@@end}
-
-\expandafter\let\csname ver@atveryend.sty\endcsname\@undefined
-\let\AfterLastShipout \@undefined
-\let\AtVeryEndDocument \@undefined
-\let\AtEndAfterFileList \@undefined
-\let\AtVeryVeryEnd \@undefined
-\let\BeforeClearDocument \@undefined
-
-
-\expandafter\let\expandafter\shipout\csname tex_shipout:D\endcsname
-
-\let \ShipoutBox\@undefined
-\let \ReadonlyShipoutCounter \@undefined
-\let \c@totalpages \@undefined
-\let \thetotalpages \@undefined
-
-\let \DiscardShipoutBox \@undefined
-\let \DebugShipoutOn \@undefined
-\let \DebugShipoutOff \@undefined
-
-\DeclareRobustCommand \AtBeginDvi [1]{%
- \global \setbox \@begindvibox
- \vbox{\unvbox \@begindvibox #1}%
-}
-
-\let \AtBeginShipout \@undefined
-\let \AtBeginShipoutNext \@undefined
-
-\let \AtBeginShipoutFirst \@undefined
-
-\let \ShipoutBoxHeight \@undefined
-\let \ShipoutBoxDepth \@undefined
-\let \ShipoutBoxWidth \@undefined
-
-\let \AtBeginShipoutDiscard \@undefined
-
-\let \AtBeginShipoutAddToBox \@undefined
-\let \AtBeginShipoutAddToBoxForeground \@undefined
-\let \AtBeginShipoutUpperLeft \@undefined
-\let \AtBeginShipoutUpperLeftForeground \@undefined
-
-\expandafter\let\csname ver@atbegshi.sty\endcsname \@undefined
-
-\let \EveryShipout \@undefined
-\let \AtNextShipout \@undefined
-\expandafter \let \csname ver@everyshi.sty\endcsname \@undefined
-
-\let \AtEndDvi \@undefined
-\expandafter\let \csname ver@atenddvi.sty\endcsname \@undefined
-
-\AtBeginDocument{\reinstall@nfss@defs\init@series@setup}
-
-\EndIncludeInRelease
\endinput
%%
%% End of file `latexrelease.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin1.def b/Master/texmf-dist/tex/latex-dev/base/latin1.def
index b9395bd996f..ef47b4d36e9 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin1.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin1.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin1.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin10.def b/Master/texmf-dist/tex/latex-dev/base/latin10.def
index 8e8c3222f4f..25eeb22d5b4 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin10.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin10.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin10.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\texteuro}
{\TextSymbolUnavailable\texteuro}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin2.def b/Master/texmf-dist/tex/latex-dev/base/latin2.def
index d02ee9b7008..cabf30a3d40 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin2.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin2.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin2.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textcurrency}
{\TextSymbolUnavailable\textcurrency}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin3.def b/Master/texmf-dist/tex/latex-dev/base/latin3.def
index 327b8a92324..909307dc280 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin3.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin3.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin3.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textcurrency}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin4.def b/Master/texmf-dist/tex/latex-dev/base/latin4.def
index 26a6d6a0c29..b150ce4938c 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin4.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin4.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin4.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textcurrency}
{\TextSymbolUnavailable\textcurrency}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin5.def b/Master/texmf-dist/tex/latex-dev/base/latin5.def
index c6a3bd69cdc..e91af0cccbd 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin5.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin5.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin5.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/latin9.def b/Master/texmf-dist/tex/latex-dev/base/latin9.def
index 8cea14f5e92..a420b7765ea 100644
--- a/Master/texmf-dist/tex/latex-dev/base/latin9.def
+++ b/Master/texmf-dist/tex/latex-dev/base/latin9.def
@@ -44,7 +44,7 @@
\ProvidesFile{latin9.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textcent}
{\TextSymbolUnavailable\textcent}
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltexpl.ltx b/Master/texmf-dist/tex/latex-dev/base/ltexpl.ltx
deleted file mode 100644
index 64908ce7448..00000000000
--- a/Master/texmf-dist/tex/latex-dev/base/ltexpl.ltx
+++ /dev/null
@@ -1,121 +0,0 @@
-%%
-%% This is file `ltexpl.ltx',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% ltexpl.dtx (with options: `2ekernel')
-%%
-%% This is a generated file.
-%%
-%% The source is maintained by the LaTeX Project team and bug
-%% reports for it can be opened at https://latex-project.org/bugs.html
-%% (but please observe conditions on bug reports sent to that address!)
-%%
-%%
-%% Copyright (C) 1993-2020
-%% The LaTeX3 Project and any individual authors listed elsewhere
-%% in this file.
-%%
-%% This file was generated from file(s) of the LaTeX base system.
-%% --------------------------------------------------------------
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% https://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2008 or later.
-%%
-%% This file has the LPPL maintenance status "maintained".
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% base system. You may however distribute the LaTeX base system without
-%% such generated files.
-%%
-%% The list of all files belonging to the LaTeX base distribution is
-%% given in the file `manifest.txt'. See also `legal.txt' for additional
-%% information.
-%%
-%% The list of derived (unpacked) files belonging to the distribution
-%% and covered by LPPL is defined by the unpacking scripts (with
-%% extension .ins) which are part of the distribution.
-%%% From File: ltexpl.dtx
-\def\@expl@sys@load@backend@@{}
-\def\@expl@push@filename@@{}
-\def\@expl@push@filename@aux@@{}
-\def\@expl@pop@filename@@{}
-\def\@expl@finalise@setup@@{}
-\long\def\@gobble#1{}
-\long\def\@firstofone#1{#1}
-\long\def\@firstoftwo#1#2{#1}
-\long\def\@secondoftwo#1#2{#2}
-\long\def\IfFileExists#1{%
- \openin\@inputcheck"#1" %
- \ifeof\@inputcheck
- \expandafter\@secondoftwo
- \else
- \closein\@inputcheck
- \expandafter\@firstoftwo
- \fi}
-\long\def\@ifnextchar#1#2#3{%
- \let\reserved@d=#1%
- \def\reserved@a{#2}%
- \def\reserved@b{#3}%
- \futurelet\@let@token\@ifnch}
-\def\@ifnch{%
- \ifx\@let@token\reserved@d
- \expandafter\reserved@a
- \else
- \expandafter\reserved@b
- \fi}
-\expandafter\ifx\csname tex\string _let:D\endcsname\relax
- \expandafter\@firstofone
-\else
- \GenericInfo{}{Skipping: expl3 code already part of the format}%
- \expandafter\endinput
-\fi
- {%
- \IfFileExists{expl3.ltx}
- {%
- \ifnum0%
- \ifdefined\pdffilesize 1\fi
- \ifdefined\filesize 1\fi
- \ifdefined\luatexversion\ifnum\luatexversion>94 1\fi\fi
- \ifdefined\kanjiskip 1\fi
- >0 %
- \expandafter\@firstofone
- \else
- \def~{ }\def\MessageBreak{^^J~~~~~~~~~~~~~~~}%
- \errmessage{LaTeX Error:
- LaTeX requires the e-TeX primitives and additional\MessageBreak
- functionality available in the engines:\MessageBreak
- - pdfTeX v1.40\MessageBreak
- - XeTeX v0.99992\MessageBreak
- - LuaTeX v0.95\MessageBreak
- - e-(u)pTeX mid-2012\MessageBreak
- or later%
- }\batchmode \read -1 to \reserved@a
- \fi
- }
- {%
- \errmessage{LaTeX requires expl3}%
- \batchmode \read -1 to \reserved@a
- }%
- {%
- \input expl3.ltx
- \ifdefined\NewDocumentCommand
- \else
- \IfFileExists{xparse.ltx}
- {\input xparse.ltx }
- {}%
- \fi
- }%
- }
-\ExplSyntaxOn
-\cs_new_eq:NN \@expl@tl@trim@spaces@apply@@nN \tl_trim_spaces_apply:nN
-\ExplSyntaxOff
-\endinput
-%%
-%% End of file `ltexpl.ltx'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltfilehook.ltx b/Master/texmf-dist/tex/latex-dev/base/ltfilehook.ltx
deleted file mode 100644
index b164900b594..00000000000
--- a/Master/texmf-dist/tex/latex-dev/base/ltfilehook.ltx
+++ /dev/null
@@ -1,343 +0,0 @@
-%%
-%% This is file `ltfilehook.ltx',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% ltfilehook.dtx (with options: `2ekernel')
-%%
-%% This is a generated file.
-%%
-%% Copyright 2020 Frank Mittelbach
-%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
-%%
-%% The newest sources can be found below
-%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
-%%
-%%
-%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\ltfilehookversion{v0.9a}
-\providecommand\ltfilehookdate{2020/07/19}
-\def\CurrentFile{}
-\def\CurrentFilePath{}
-\ExplSyntaxOn
-\tl_new:N \l__filehook_internal_tl
-\cs_new_protected:Npn \@filehook@set@curr@file #1
- { \exp_args:NV \__filehook_normalise_file_name:n #1 }
-\cs_new_protected:Npn \__filehook_normalise_file_name:n #1
- {
- \file_if_exist:nTF {#1}
- {
- \exp_args:Nx \file_parse_full_name:nNNN
- { \file_full_name:n {#1} }
- }
- { \file_parse_full_name:nNNN {#1} }
- \CurrentFilePath \CurrentFile \l__filehook_internal_tl
- \tl_set:Nx \CurrentFile { \CurrentFile \l__filehook_internal_tl }
- }
-\seq_new:N \g__filehook_input_file_seq
-\cs_new_protected:Npn \@filehook@file@push
- {
- \seq_gpush:Nx \g__filehook_input_file_seq
- { { \CurrentFilePath } { \CurrentFile } }
- }
-\cs_new_protected:Npn \@filehook@file@pop
- {
- \seq_gpop:NNTF \g__filehook_input_file_seq \l__filehook_internal_tl
- { \exp_after:wN \__filehook_file_pop_assign:nn \l__filehook_internal_tl }
- { \ERROR_should_not_happen }
- }
-\cs_new_protected:Npn \__filehook_file_pop_assign:nn #1 #2
- {
- \tl_set:Nn \CurrentFilePath {#1}
- \tl_set:Nn \CurrentFile {#2}
- }
-\ExplSyntaxOff
-\let\InputIfFileExists\@undefined
-\DeclareRobustCommand \InputIfFileExists[3]{%
- \@filehook@file@push
- \IfFileExists{#1}%
- {%
- \edef\reserved@a{\@filef@und
- \def\noexpand\CurrentFile{\CurrentFile}%
- \def\noexpand\CurrentFilePath{\CurrentFilePath}%
- }%
- \expandafter\@swaptwoargs\expandafter
- {\reserved@a}%
- {%
- #2%
- \@addtofilelist{#1}%
- \UseHook{file/before}%
- \UseHook{file/before/\CurrentFile}%
- \@@input
- }%
- \UseHook{file/after/\CurrentFile}%
- \UseHook{file/after}%
- \@filehook@file@pop
- }%
- {\@filehook@file@pop #3}%
-}
-\def\set@curr@file#1{%
- \begingroup
- \escapechar\m@ne
- \xdef\@curr@file{%
- \expandafter\expandafter\expandafter\unquote@name
- \expandafter\expandafter\expandafter{%
- \expandafter\string
- \csname\@firstofone#1\@empty\endcsname}}%
- \endgroup
- \@filehook@set@curr@file{\@curr@file}%
-}
-\def\load@onefilewithoptions#1[#2][#3]#4{%
- \@pushfilename
- \xdef\@currname{#1}%
- \global\let\@currext#4%
- \let\CurrentOption\@empty
- \@reset@ptions
- \makeatletter
- \def\reserved@a{%
- \@ifl@aded\@currext{#1}%
- {\@if@ptions\@currext{#1}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space #1}%
- {The package #1 has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{#1.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}}%
- {\@pass@ptions\@currext{#2}{#1}%
- \global\expandafter
- \let\csname ver@\@currname.\@currext\endcsname\@empty
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
- \InputIfFileExists
- {\@currname.\@currext}%
- {%
- \ifx\@currext\@pkgextension
- \UseHook{package/before}%
- \UseHook{package/before/\@currname}%
- \else
- \ifx\@currext\@clsextension
- \UseHook{class/before}%
- \UseHook{class/before/\@currname}%
- \fi
- \fi
- \@filehook@file@push
- }%
- {\@missingfileerror\@currname\@currext}%
- \let\@unprocessedoptions\@@unprocessedoptions
- \csname\@currname.\@currext-h@@k\endcsname
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
- \@undefined
- \ifx\@currext\@pkgextension
- \UseHook{package/after/\@currname}%
- \UseHook{package/after}%
- \else
- \ifx\@currext\@clsextension
- \UseHook{class/after/\@currname}%
- \UseHook{class/after}%
- \fi
- \fi
- \@filehook@file@pop
- \@unprocessedoptions}%
- \@ifl@ter\@currext{#1}{#3}{}%
- {\@latex@warning@no@line
- {You have requested,\on@line,
- version\MessageBreak
- `#3' of \@cls@pkg\space #1,\MessageBreak
- but only version\MessageBreak
- `\csname ver@#1.\@currext\endcsname'\MessageBreak
- is available}}%
- \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
- \@popfilename
- \@reset@ptions}%
- \reserved@a}
-\@ifl@t@r\fmtversion{2020/10/01}
-{%
-\def\load@onefilewithoptions#1[#2][#3]#4{%
- \@pushfilename
- \xdef\@currname{#1}%
- \global\let\@currext#4%
- \let\CurrentOption\@empty
- \@reset@ptions
- \makeatletter
- \def\reserved@a{%
- \@ifl@aded\@currext{#1}%
- {\@if@ptions\@currext{#1}{#2}{}%
- {\@latex@error
- {Option clash for \@cls@pkg\space #1}%
- {The package #1 has already been loaded
- with options:\MessageBreak
- \space\space[\@ptionlist{#1.\@currext}]\MessageBreak
- There has now been an attempt to load it
- with options\MessageBreak
- \space\space[#2]\MessageBreak
- Adding the global options:\MessageBreak
- \space\space
- \@ptionlist{#1.\@currext},#2\MessageBreak
- to your \noexpand\documentclass declaration may fix this.%
- \MessageBreak
- Try typing \space <return> \space to proceed.}}}%
- {\@pass@ptions\@currext{#2}{#1}%
- \global\expandafter
- \let\csname ver@\@currname.\@currext\endcsname\@empty
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname\@empty
- \InputIfFileExists
- {\@currname.\@currext}%
- {%
- \ifx\@currext\@pkgextension
- \UseHook{package/before}%
- \UseHook{package/before/\@currname}%
- \else
- \ifx\@currext\@clsextension
- \UseHook{class/before}%
- \UseHook{class/before/\@currname}%
- \fi
- \fi
- \@filehook@file@push
- }%
- {\@missingfileerror\@currname\@currext}%
- \expandafter\let\csname unprocessedoptions-\@currname.\@currext\endcsname
- \@@unprocessedoptions
- \csname\@currname.\@currext-h@@k\endcsname
- \expandafter\let\csname\@currname.\@currext-h@@k\endcsname
- \@undefined
- \ifx\@unprocessedoptions\relax
- \let\@unprocessedoptions\@undefined
- \else
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \fi
- \expandafter\let
- \csname unprocessedoptions-\@currname.\@currext\endcsname
- \@undefined
- \ifx\@currext\@pkgextension
- \UseHook{package/after/\@currname}%
- \UseHook{package/after}%
- \else
- \ifx\@currext\@clsextension
- \UseHook{class/after/\@currname}%
- \UseHook{class/after}%
- \fi
- \fi
- \@filehook@file@pop
- }%
- \@ifl@ter\@currext{#1}{#3}{}%
- {\@latex@warning@no@line
- {You have requested,\on@line,
- version\MessageBreak
- `#3' of \@cls@pkg\space #1,\MessageBreak
- but only version\MessageBreak
- `\csname ver@#1.\@currext\endcsname'\MessageBreak
- is available}}%
- \ifx\@currext\@clsextension\let\LoadClass\@twoloadclasserror\fi
- \@popfilename
- \@reset@ptions}%
- \reserved@a}
-}{}%
-
-\def\@include#1 {%
- \clearpage
- \if@filesw
- \immediate\write\@mainaux{\string\@input{#1.aux}}%
- \fi
- \@tempswatrue
- \if@partsw
- \@tempswafalse
- \edef\reserved@b{#1}%
- \@for\reserved@a:=\@partlist\do
- {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
- \fi
- \if@tempswa
- \let\@auxout\@partaux
- \if@filesw
- \immediate\openout\@partaux #1.aux
- \immediate\write\@partaux{\relax}%
- \fi
- \set@curr@file{#1}%
- \UseHook{include/before}%
- \UseHook{include/before/#1}%
- \@input@{#1.tex}%
- \UseHook{include/end/#1}%
- \UseHook{include/end}%
- \clearpage
- \UseHook{include/after/#1}%
- \UseHook{include/after}%
- \clearpage
- \@writeckpt{#1}%
- \if@filesw
- \immediate\closeout\@partaux
- \fi
- \else
- \deadcycles\z@
- \@nameuse{cp@#1}%
- \fi
- \let\@auxout\@mainaux
-}
-\@ifl@t@r\fmtversion{2020/10/01}
-{%
-\def\@include#1 {%
- \clearpage
- \if@filesw
- \immediate\write\@mainaux{\string\@input{"#1.aux"}}%
- \fi
- \@tempswatrue
- \if@partsw
- \@tempswafalse
- \edef\reserved@b{#1}%
- \@for\reserved@a:=\@partlist\do
- {\ifx\reserved@a\reserved@b\@tempswatrue\fi}%
- \fi
- \if@tempswa
- \let\@auxout\@partaux
- \if@filesw
- \immediate\openout\@partaux "#1.aux"
- \immediate\write\@partaux{\relax}%
- \fi
- \UseHook{include/before}%
- \UseHook{include/before/#1}%
- \@input@{#1.tex}%
- \UseHook{include/end/#1}%
- \UseHook{include/end}%
- \clearpage
- \UseHook{include/after/#1}%
- \UseHook{include/after}%
- \clearpage
- \@writeckpt{#1}%
- \if@filesw
- \immediate\closeout\@partaux
- \fi
- \else
- \deadcycles\z@
- \@nameuse{cp@#1}%
- \fi
- \let\@auxout\@mainaux}
-}{}
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\endinput
-%%
-%% End of file `ltfilehook.ltx'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/lthooks.ltx b/Master/texmf-dist/tex/latex-dev/base/lthooks.ltx
deleted file mode 100644
index e214c4d6ccb..00000000000
--- a/Master/texmf-dist/tex/latex-dev/base/lthooks.ltx
+++ /dev/null
@@ -1,1091 +0,0 @@
-%%
-%% This is file `lthooks.ltx',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% lthooks.dtx (with options: `2ekernel')
-%%
-%% This is a generated file.
-%%
-%% Copyright 2020 Frank Mittelbach
-%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
-%%
-%% The newest sources can be found below
-%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
-%%
-%%
-%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\lthooksversion{v0.9b}
-\providecommand\lthooksdate{2020/07/19}
-
-
-
-
-
-
-\ExplSyntaxOn
-\bool_new:N \g__hook_debug_bool
-\cs_new_eq:NN \__hook_debug:n \use_none:n
-\cs_new_protected:Npn \hook_debug_on:
- {
- \bool_gset_true:N \g__hook_debug_bool
- \__hook_debug_gset:
- }
-\cs_new_protected:Npn \hook_debug_off:
- {
- \bool_gset_false:N \g__hook_debug_bool
- \__hook_debug_gset:
- }
-\cs_new_protected:Npn \__hook_debug_gset:
- {
- \cs_gset_protected:Npx \__hook_debug:n ##1
- { \bool_if:NT \g__hook_debug_bool {##1} }
- }
-
-\cs_new_eq:NN \__hook_str_compare:nn \__str_if_eq:nn
-\tl_new:N \l__hook_return_tl
-\tl_new:N \l__hook_tmpa_tl
-\tl_new:N \l__hook_tmpb_tl
-\seq_new:N \g__hook_all_seq
-\tl_new:N \g__hook_removal_list_tl
-\tl_new:N \l__hook_cur_hook_tl
-\prop_new:N \g__hook_code_temp_prop
-\tl_new:N \g__hook_hook_curr_name_tl
-\seq_new:N \g__hook_name_stack_seq
-\cs_new_eq:NN \__hook_tmp:w ?
-\cs_generate_variant:Nn \tl_gremove_once:Nn { Nx }
-\scan_new:N \s__hook_mark
-
-\cs_new_protected:Npn \hook_new:n #1
- {
- \exp_args:Nx \__hook_new:n
- { \__hook_parse_label_default:nn {#1} { top-level } }
- }
-\cs_new_protected:Npn \__hook_new:n #1 {
- \hook_if_exist:nTF {#1}
- { \ErrorHookExists }
- { \seq_gput_right:Nn \g__hook_all_seq {#1}
- \tl_new:c { g__hook_#1_code_tl }
- \__hook_declare:n {#1}
- \clist_new:c {g__hook_#1_labels_clist}
- \tl_new:c { g__hook_#1_reversed_tl }
- \__hook_provide_legacy_interface:n {#1}
- }
-}
-
-\cs_new_protected:Npn \__hook_declare:n #1
- {
- \__hook_if_exist:nF {#1}
- {
- \prop_new:c { g__hook_#1_code_prop }
- \tl_new:c { g__hook_#1_next_code_tl }
- \prop_new:c { g__hook_#1_rules_prop } % only for debugging
- }
- }
-
-\cs_new_protected:Npn \hook_new_reversed:n #1 {
- \hook_new:n {#1}
- \tl_gset:cn { g__hook_#1_reversed_tl } { - }
-}
-
-\cs_new_protected:Npn \hook_new_pair:nn #1#2 {
- \hook_new:n {#1} \hook_new_reversed:n {#2}
-}
-
-\cs_new_protected:Npn \__hook_provide_legacy_interface:n #1
- {
- \debug_suspend:
- \tl_if_exist:cT { @#1hook }
- {
- \tl_if_empty:cF { @#1hook }
- {
- \__hook_gput_code:nxv {#1}
- { \__hook_parse_label_default:Vn \c_novalue_tl { legacy } }
- { @#1hook }
- }
- }
- \tl_gset:co{@#1hook}{\cs:w g__hook_#1_code_tl\cs_end:}
- \debug_resume:
- }
-\cs_new:Npn \__hook_parse_label_default:nn #1 #2
- {
- \tl_if_novalue:nTF {#1}
- { \__hook_currname_or_default:n {#2} }
- { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nn {#2} }
- }
-\cs_generate_variant:Nn \__hook_parse_label_default:nn { V }
-\cs_new:Npn \__hook_parse_dot_label:nn #1 #2
- {
- \tl_if_empty:nTF {#1}
- {
- \msg_expandable_error:nnn { hooks } { empty-label } {#2}
- #2
- }
- {
- \str_if_eq:nnTF {#1} { . }
- { \__hook_currname_or_default:n {#1} }
- { \__hook_parse_dot_label:nw {#2} #1 ./ \s__hook_mark }
- }
- }
-\cs_new:Npn \__hook_parse_dot_label:nw #1 #2 ./ #3 \s__hook_mark
- {
- \tl_if_empty:nTF {#2}
- { \__hook_parse_dot_label_aux:nw {#1} #3 \s__hook_mark }
- {
- \tl_if_empty:nTF {#3}
- {#2}
- { \__hook_parse_dot_label_cleanup:w #2 ./ #3 \s__hook_mark }
- }
- }
-\cs_new:Npn \__hook_parse_dot_label_cleanup:w #1 ./ \s__hook_mark {#1}
-\cs_new:Npn \__hook_parse_dot_label_aux:nw #1 #2 ./ \s__hook_mark
- { \__hook_currname_or_default:n {#1} / #2 }
-\cs_new:Npn \__hook_currname_or_default:n #1
- {
- \tl_if_empty:NTF \g__hook_hook_curr_name_tl
- {
- \tl_if_empty:NTF \@currname
- {#1}
- { \@currname }
- }
- { \g__hook_hook_curr_name_tl }
- }
-
-\cs_new_protected:Npn \hook_gput_code:nnn #1 #2
- {
- \exp_args:Nxx \__hook_gput_code:nnn
- { \__hook_parse_label_default:nn {#1} { top-level } }
- { \__hook_parse_label_default:nn {#2} { top-level } }
- }
-\cs_new_protected:Npn \__hook_gput_code:nnn #1 #2 #3
- {
- \__hook_if_marked_removal:nnTF {#1} {#2}
- { \__hook_unmark_removal:nn {#1} {#2} }
- {
- \hook_if_exist:nTF {#1}
- {
- \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
- \__hook_update_hook_code:n {#1}
- }
- { \__hook_try_declaring_generic_hook:nnn {#1} {#2} {#3} }
- }
- }
-\cs_generate_variant:Nn \__hook_gput_code:nnn { nxv }
-\cs_new_protected:Npn \__hook_hook_gput_code_do:nnn #1 #2 #3
- {
- \__hook_debug:n{\iow_term:x{****~ Add~ to~
- \hook_if_exist:nF {#1} { undeclared~ }
- hook~ #1~ (#2)
- \on@line\space <-~ \tl_to_str:n{#3}} }
- \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
- {
- \prop_gput:cno { g__hook_#1_code_prop } {#2}
- { \l__hook_return_tl #3 }
- }
- { \prop_gput:cnn { g__hook_#1_code_prop } {#2} {#3} }
- }
-\cs_new_protected:Npn \__hook_gput_undeclared_hook:nnn #1 #2 #3
- {
- \__hook_declare:n {#1}
- \__hook_hook_gput_code_do:nnn {#1} {#2} {#3}
- }
-\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nnn #1
- {
- \__hook_try_declaring_generic_hook:nNNnn {#1}
- \hook_gput_code:nnn \__hook_gput_undeclared_hook:nnn
- }
-\cs_new_protected:Npn \__hook_try_declaring_generic_next_hook:nn #1
- {
- \__hook_try_declaring_generic_hook:nNNnn {#1}
- \hook_gput_next_code:nn \__hook_gput_next_do:nn
- }
-\cs_new_protected:Npn \__hook_try_declaring_generic_hook:nNNnn #1
- {
- \__hook_if_file_hook:wTF #1 / / \s__hook_mark
- {
- \exp_args:Ne \__hook_try_declaring_generic_hook_split:nNNnn
- { \exp_args:Ne \__hook_file_hook_normalise:n {#1} }
- }
- { \__hook_try_declaring_generic_hook_split:nNNnn {#1} }
- }
-\cs_new_protected:Npn \__hook_try_declaring_generic_hook_split:nNNnn #1 #2 #3
- {
- \__hook_try_declaring_generic_hook:wnTF #1 / / / \scan_stop: {#1}
- { #2 }
- { #3 } {#1}
- }
-\prg_new_protected_conditional:Npnn \__hook_try_declaring_generic_hook:wn
- #1 / #2 / #3 / #4 \scan_stop: #5 { TF }
- {
- \tl_if_empty:nTF {#2}
- { \prg_return_false: }
- {
- \prop_if_in:NnTF \c__hook_generics_prop {#1}
- {
- \hook_if_exist:nF {#5} { \hook_new:n {#5} }
- \prop_if_in:NnTF \c__hook_generics_reversed_ii_prop {#2}
- { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
- {
- \prop_if_in:NnT \c__hook_generics_reversed_iii_prop {#3}
- { \tl_gset:cn { g__hook_#5_reversed_tl } { - } }
- }
- \prg_return_true:
- }
- { \prg_return_false: }
- }
- }
-\prg_new_conditional:Npnn \__hook_if_file_hook:w
- #1 / #2 / #3 \s__hook_mark { TF }
- {
- \str_if_eq:nnTF {#1} { file }
- {
- \bool_lazy_or:nnTF
- { \tl_if_empty_p:n {#3} }
- { \str_if_eq_p:nn {#3} { / } }
- { \prg_return_false: }
- {
- \prop_if_in:NnTF \c__hook_generics_file_prop {#2}
- { \prg_return_true: }
- { \prg_return_false: }
- }
- }
- { \prg_return_false: }
- }
-\cs_new:Npn \__hook_file_hook_normalise:n #1
- { \__hook_strip_double_slash:n {#1} }
-\cs_new:Npn \__hook_strip_double_slash:n #1
- { \__hook_strip_double_slash:w #1 // \s__hook_mark }
-\cs_new:Npn \__hook_strip_double_slash:w #1 // #2 \s__hook_mark
- {
- \tl_if_empty:nTF {#2}
- {#1}
- { \__hook_strip_double_slash:w #1 / #2 \s__hook_mark }
- }
-
-\prop_const_from_keyval:Nn \c__hook_generics_prop
- {env=,file=,package=,class=,include=}
-\prop_const_from_keyval:Nn \c__hook_generics_reversed_ii_prop {after=,end=}
-\prop_const_from_keyval:Nn \c__hook_generics_reversed_iii_prop {after=}
-\prop_const_from_keyval:Nn \c__hook_generics_file_prop {before=,after=}
-
-\cs_new_eq:NN \__hook_update_hook_code:n \use_none:n
-
-\cs_new_protected:Npn \hook_gremove_code:nn #1 #2
- {
- \exp_args:Nxx \__hook_gremove_code:nn
- { \__hook_parse_label_default:nn {#1} { top-level } }
- { \__hook_parse_label_default:nn {#2} { top-level } }
- }
-\cs_new_protected:Npn \__hook_gremove_code:nn #1 #2
- {
- \__hook_if_exist:nTF {#1}
- {
- \str_if_eq:nnTF {#2} {*}
- {
- \prop_gclear:c { g__hook_#1_code_prop }
- \clist_gclear:c { g__hook_#1_labels_clist } % for debugging only
- }
- {
- \prop_get:cnNTF { g__hook_#1_code_prop } {#2} \l__hook_return_tl
- { \__hook_gremove_code_do:nn }
- { \__hook_mark_removal:nn }
- {#1} {#2}
- }
- \hook_if_exist:nT {#1}
- { \__hook_update_hook_code:n {#1} }
- }
- { \__hook_mark_removal:nn {#1} {#2} }
- }
-\cs_new_protected:Npn \__hook_gremove_code_do:nn #1 #2
- {
- \prop_gremove:cn { g__hook_#1_code_prop } {#2}
- \exp_args:Nco \clist_gremove_all:Nn
- { g__hook_#1_labels_clist } { \tl_to_str:n {#2} } % for debugging only
- }
-
-\cs_new_protected:Npn \__hook_mark_removal:nn #1 #2
- {
- \tl_gput_right:Nx \g__hook_removal_list_tl
- { \__hook_removal_tl:nn {#1} {#2} }
- }
-\cs_new_protected:Npn \__hook_unmark_removal:nn #1 #2
- {
- \tl_gremove_once:Nx \g__hook_removal_list_tl
- { \__hook_removal_tl:nn {#1} {#2} }
- }
-\prg_new_protected_conditional:Npnn \__hook_if_marked_removal:nn #1 #2 { TF }
- {
- \exp_args:NNx \tl_if_in:NnTF \g__hook_removal_list_tl
- { \__hook_removal_tl:nn {#1} {#2} }
- { \prg_return_true: } { \prg_return_false: }
- }
-\cs_new:Npn \__hook_removal_tl:nn #1 #2
- { & \tl_to_str:n {#2} $ \tl_to_str:n {#1} $ }
-
-\prop_new:c {g__hook_??_rules_prop}
-\prop_new:c {g__hook_??_code_prop}
-\prop_new:c {g__hook_??_code_tl}
-\tl_new:c {g__hook_??_reversed_tl}
-
-\cs_new_protected:Npn \__hook_debug_gset_rule:nnnn #1#2#3#4
- {
- \prop_gremove:cn{g__hook_#1_rules_prop}{#2|#4}
- \prop_gremove:cn{g__hook_#1_rules_prop}{#4|#2}
- \str_case_e:nnF {#3}
- {
- {before} { \prop_gput:cnn {g__hook_#1_rules_prop}{#2|#4}{<} }
- {after} { \prop_gput:cnn {g__hook_#1_rules_prop}{#4|#2}{<} }
- {incompatible-error} { \prop_gput:cnn {g__hook_#1_rules_prop}{#2|#4}{xE} }
- {incompatible-warning} { \prop_gput:cnn {g__hook_#1_rules_prop}{#2|#4}{xW} }
- {removes} { \prop_gput:cnn {g__hook_#1_rules_prop}{#2|#4}{->} }
- {unrelated}{ \prop_gremove:cn {g__hook_#1_rules_prop}{#2|#4}
- \prop_gremove:cn {g__hook_#1_rules_prop}{#4|#2} }
- }
- { \ERRORunknownrule }
- }
-\cs_new_protected:Npn \hook_gset_rule:nnnn #1#2#3#4
- {
- \use:x
- {
- \__hook_gset_rule:nnnn
- { \__hook_parse_label_default:nn {#1} { top-level } }
- { \__hook_parse_label_default:nn {#2} { top-level } }
- {#3}
- { \__hook_parse_label_default:nn {#4} { top-level } }
- }
- }
-\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4
- {
- \__hook_declare:n {#1}
- \__hook_rule_gclear:nnn {#1} {#2} {#4}
- \debug_suspend:
- \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn }
- {
- {#1} {#2} {#4}
- \__hook_update_hook_code:n {#1}
- }
- { \ERRORunknownrule }
- \debug_resume:
- \__hook_debug_gset_rule:nnnn {#1} {#2} {#3} {#4} % for debugging
- }
-\cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
- {
- \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
- { \__hook_label_ordered:nnTF {#2} {#3} { < } { > } }
- }
-\cs_new_eq:cN { __hook_rule_<_gset:nnn } \__hook_rule_before_gset:nnn
-\cs_new_protected:Npn \__hook_rule_after_gset:nnn #1#2#3
- {
- \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#3} {#2} _tl }
- { \__hook_label_ordered:nnTF {#3} {#2} { < } { > } }
- }
-\cs_new_eq:cN { __hook_rule_>_gset:nnn } \__hook_rule_after_gset:nnn
-\cs_new_protected:Npn \__hook_rule_removes_gset:nnn #1#2#3
- {
- \tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
- { \__hook_label_ordered:nnTF {#2} {#3} { -> } { <- } }
- }
-\cs_new_protected:cpn { __hook_rule_incompatible-error_gset:nnn } #1#2#3
- { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xE } }
-\cs_new_protected:cpn { __hook_rule_incompatible-warning_gset:nnn } #1#2#3
- { \tl_gset:cn { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } { xW } }
-\cs_new_protected:Npn \__hook_rule_unrelated_gset:nnn #1#2#3 { }
-\cs_new_protected:Npn \__hook_rule_gclear:nnn #1#2#3
- { \cs_undefine:c { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl } }
-\cs_new:Npn \__hook_label_pair:nn #1#2
- {
- \if_case:w \__hook_str_compare:nn {#1} {#2} \exp_stop_f:
- #1 | #1 % 0
- \or: #1 | #2 % +1
- \else: #2 | #1 % -1
- \fi:
- }
-\prg_new_conditional:Npnn \__hook_label_ordered:nn #1#2 { TF }
- {
- \if_int_compare:w \__hook_str_compare:nn {#1} {#2} > 0 \exp_stop_f:
- \prg_return_true:
- \else
- \prg_return_false:
- \fi:
- }
-\cs_new:Npn \__hook_if_label_case:nnnnn #1#2
- {
- \cs:w use_
- \if_case:w \__hook_str_compare:nn {#1} {#2}
- i \or: ii \else: iii \fi: :nnn
- \cs_end:
- }
-
-\cs_new_protected:Npn \__hook_initialize_all: {
- \cs_gset_eq:NN \__hook_update_hook_code:n \__hook_initialize_hook_code:n
- \__hook_debug:n { \prop_gclear:N \g__hook_used_prop }
- \seq_map_inline:Nn \g__hook_all_seq
- {
- \__hook_update_hook_code:n {##1}
- }
- \__hook_debug:n
- { \iow_term:x{^^JAll~ initialized~ (non-empty)~ hooks:}
- \prop_map_inline:Nn \g__hook_used_prop
- { \iow_term:x{^^J~ ##1~ ->~
- \exp_not:v {g__hook_##1_code_tl}~ }
- }
- }
- \cs_gset_eq:NN \hook_use:n \__hook_use_initialized:n
- \cs_gset_eq:NN \__hook_preamble_hook:n \use_none:n
-}
-
-\cs_new_protected:Npn \__hook_initialize_hook_code:n #1 {
- \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
- '#1' \on@line :^^J} }
- \hook_if_exist:nT {#1}
- {
- \prop_if_empty:cTF {g__hook_#1_code_prop}
- { \tl_gset:co {g__hook_#1_code_tl}
- {\cs:w g__hook_#1_next_code_tl \cs_end: } }
- {
- \__hook_if_reversed:nTF {#1}
- { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_left:NV
- \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_left:NV }
- { \cs_set_eq:NN \__hook_tl_gput:NV \tl_gput_right:NV
- \cs_set_eq:NN \__hook_clist_gput:NV \clist_gput_right:NV }
- \prop_gset_eq:Nc \g__hook_code_temp_prop { g__hook_#1_code_prop }
- \__hook_initialize_single:ccccn
- { g__hook_#1_code_prop } { g__hook_#1_code_tl }
- { g__hook_#1_next_code_tl } { g__hook_#1_labels_clist }
- {#1}
- \prop_gset_eq:cN { g__hook_#1_code_prop } \g__hook_code_temp_prop
- \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn \g__hook_used_prop {#1}{} }
- }
- }
-}
-
-\prop_new:N\g__hook_used_prop
-
-\cs_new:Npn \__hook_tl_csname:n #1 { l__hook_label_#1_tl }
-\cs_new:Npn \__hook_seq_csname:n #1 { l__hook_label_#1_seq }
-
-\seq_new:N \l__hook_labels_seq
-\int_new:N \l__hook_labels_int
-\tl_new:N \l__hook_front_tl
-\tl_new:N \l__hook_rear_tl
-\tl_new:c { \__hook_tl_csname:n { 0 } }
-
-\cs_new_protected:Npn \__hook_initialize_single:NNNNn #1#2#3#4#5 {
- \debug_suspend:
- \seq_clear:N \l__hook_labels_seq
- \int_zero:N \l__hook_labels_int
- \tl_set:Nn \l__hook_cur_hook_tl {#5}
- \prop_map_inline:Nn #1
- {
- \int_incr:N \l__hook_labels_int
- \seq_put_right:Nn \l__hook_labels_seq {##1}
- \tl_set:cn { \__hook_tl_csname:n {##1} }{0} % the counter k for number of
- % j before k rules
- \seq_clear_new:c { \__hook_seq_csname:n {##1} } % sequence of successors to k
- % i.e., k before j rules (stores
- % the names of the j's)
- }
- \prop_map_inline:Nn #1
- {
- \prop_map_inline:Nn #1
- {
- \__hook_if_label_case:nnnnn {##1} {####1}
- { \prop_map_break: }
- { \__hook_apply_label_pair:nnn {##1} {####1} }
- { \__hook_apply_label_pair:nnn {####1} {##1} }
- {#5}
- }
- }
- \__hook_debug:n { \__hook_debug_label_data:N #1 }
- \tl_set:Nn \l__hook_rear_tl { 0 }
- \tl_set:cn { \__hook_tl_csname:n { 0 } } { 0 } % really {l__hook_label_ \l__hook_rear_tl _tl}
- \seq_map_inline:Nn \l__hook_labels_seq
- {
- \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
- {
- \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } }{##1}
- \tl_set:Nn \l__hook_rear_tl {##1}
- }
- }
- \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { 0 } }
- \tl_gclear:N #2
- \clist_gclear:N #4
- \bool_while_do:nn { ! \str_if_eq_p:Vn \l__hook_front_tl { 0 } }
- {
- \int_decr:N \l__hook_labels_int
- \prop_get:NVN #1 \l__hook_front_tl \l__hook_return_tl
- \__hook_tl_gput:NV #2 \l__hook_return_tl
- \__hook_clist_gput:NV #4 \l__hook_front_tl
- \__hook_debug:n{ \iow_term:x{Handled~ code~ for~ \l__hook_front_tl} }
- \seq_map_inline:cn { \__hook_seq_csname:n { \l__hook_front_tl } }
- {
- \tl_set:cx { \__hook_tl_csname:n {##1} }
- { \int_eval:n { \cs:w \__hook_tl_csname:n {##1} \cs_end: - 1 } }
- \int_compare:nNnT { \cs:w \__hook_tl_csname:n {##1} \cs_end: } = 0
- {
- \tl_set:cn { \__hook_tl_csname:n { \l__hook_rear_tl } } {##1}
- \tl_set:Nn \l__hook_rear_tl {##1}
- }
- }
- \tl_set_eq:Nc \l__hook_front_tl { \__hook_tl_csname:n { \l__hook_front_tl } }
- }
- \int_compare:nNnF \l__hook_labels_int = 0
- {
- \iow_term:x{====================}
- \iow_term:x{Error:~ label~ rules~ are~ incompatible:}
- \__hook_debug_label_data:N #1
- \iow_term:x{====================}
- }
- \tl_gput_right:Nn #2 {#3}
- \debug_resume:
-}
-\cs_generate_variant:Nn \__hook_initialize_single:NNNNn {cccc}
-
-\cs_new:Npn \__hook_tl_gput:NV {\ERROR}
-\cs_new:Npn \__hook_clist_gput:NV {\ERROR}
-
-\cs_new_protected:Npn \__hook_apply_label_pair:nnn #1#2#3
- {
- \__hook_label_if_exist_apply:nnnF {#1} {#2} {#3}
- {
- \__hook_label_if_exist_apply:nnnF {#1} {#2} { ?? } { }
- }
- }
-\cs_new_protected:Npn \__hook_label_if_exist_apply:nnnF #1#2#3
- {
- \if_cs_exist:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end:
- \__hook_apply_rule:nnn {#1} {#2} {#3}
- \exp_after:wN \use_none:n
- \else:
- \use:nn
- \fi:
- }
-
-\cs_new_protected:Npn \__hook_apply_rule:nnn #1#2#3
- {
- \cs:w __hook_apply_
- \cs:w g__hook_#3_reversed_tl \cs_end: rule_
- \cs:w g__hook_ #3 _rule_ #1 | #2 _tl \cs_end: :nnn \cs_end:
- {#1} {#2} {#3}
- }
-\cs_new_protected:cpn { __hook_apply_rule_<:nnn } #1#2#3
- {
- \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
- \tl_set:cx { \__hook_tl_csname:n {#2} }
- { \int_eval:n{ \cs:w \__hook_tl_csname:n {#2} \cs_end: + 1 } }
- \seq_put_right:cn{ \__hook_seq_csname:n {#1} }{#2}
- }
-\cs_new_protected:cpn { __hook_apply_rule_>:nnn } #1#2#3
- {
- \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
- \tl_set:cx { \__hook_tl_csname:n {#1} }
- { \int_eval:n{ \cs:w \__hook_tl_csname:n {#1} \cs_end: + 1 } }
- \seq_put_right:cn{ \__hook_seq_csname:n {#2} }{#1}
- }
-\cs_new_protected:cpn { __hook_apply_rule_xE:nnn } #1#2#3
- {
- \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
- \msg_error:nnnnnn { hooks } { labels-incompatible }
- {#1} {#2} {#3} { 1 }
- \use:c { __hook_apply_rule_->:nnn } {#1} {#2} {#3}
- \use:c { __hook_apply_rule_<-:nnn } {#1} {#2} {#3}
- }
-\cs_new_protected:cpn { __hook_apply_rule_xW:nnn } #1#2#3
- {
- \__hook_debug:n { \__hook_msg_pair_found:nnn {#1} {#2} {#3} }
- \msg_warning:nnnnnn { hooks } { labels-incompatible }
- {#1} {#2} {#3} { 0 }
- }
-\cs_new_protected:cpn { __hook_apply_rule_->:nnn } #1#2#3
- {
- \__hook_debug:n
- {
- \__hook_msg_pair_found:nnn {#1} {#2} {#3}
- \iow_term:x{--->~ Drop~ '#2'~ code~ from~
- \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ because~ of~ '#1' }
- }
- \prop_gput:cnn { g__hook_ \l__hook_cur_hook_tl _code_prop } {#2} { }
- }
-\cs_new_protected:cpn { __hook_apply_rule_<-:nnn } #1#2#3
- {
- \__hook_debug:n
- {
- \__hook_msg_pair_found:nnn {#1} {#2} {#3}
- \iow_term:x{--->~ Drop~ '#1'~ code~ from~
- \iow_char:N \\ g__hook_ \l__hook_cur_hook_tl _code_prop ~ because~ of~ '#2' }
- }
- \prop_gput:cnn { g__hook_ \l__hook_cur_hook_tl _code_prop } {#1} { }
- }
-
-\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
-
-\cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
- {
- \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
- rule~ \__hook_label_pair:nn {#1} {#2}:~
- \use:c { g__hook_#3_rule_ \__hook_label_pair:nn {#1} {#2} _tl } ~ found}
- }
-
-\cs_new_protected:Npn \__hook_debug_label_data:N #1 {
- \iow_term:x{Code~ labels~ for~ sorting:}
- \iow_term:x{~ \seq_use:Nnnn\l__hook_labels_seq {~and~}{,~}{~and~} } % fix name!
- \iow_term:x{^^J Data~ structure~ for~ label~ rules:}
- \prop_map_inline:Nn #1
- {
- \iow_term:x{~ ##1~ =~ \tl_use:c{ \__hook_tl_csname:n {##1} }~ ->~
- \seq_use:cnnn{ \__hook_seq_csname:n {##1} }{~->~}{~->~}{~->~}
- }
- }
- \iow_term:x{}
-}
-
-\cs_new_protected:Npn \hook_log:n #1
- {
- \exp_args:Nx \__hook_log:n
- { \__hook_parse_label_default:nn {#1} { top-level } }
- }
-\cs_new_protected:Npn \__hook_log:n #1
- {
- \iow_term:x{^^JThe~ hook~ '#1':}
- \hook_if_exist:nF {#1}
- { \iow_term:x {~Hook~ is~ not~ declared!} }
- \__hook_if_exist:nTF {#1}
- {
- \iow_term:x{~Code~ chunks:}
- \prop_if_empty:cTF {g__hook_#1_code_prop}
- { \iow_term:x{\@spaces ---} }
- {
- \prop_map_inline:cn {g__hook_#1_code_prop}
- { \iow_term:x{\@spaces ##1~ ->~ \tl_to_str:n{##2} } }
- }
- \iow_term:x{~Extra~ code~ next~ invocation:}
- \iow_term:x{\@spaces
- \tl_if_empty:cTF { g__hook_#1_next_code_tl }
- {---} {->~ \str_use:c{g__hook_#1_next_code_tl} } }
- \iow_term:x{~Rules:}
- \prop_if_empty:cTF {g__hook_#1_rules_prop}
- { \iow_term:x{\@spaces ---} }
- { \prop_map_inline:cn {g__hook_#1_rules_prop}
- { \iow_term:x{\@spaces ##1~ with~ relation~ ##2} }
- }
- \hook_if_exist:nT {#1}
- { \iow_term:x { ~Execution~ order
- \prop_if_empty:cTF {g__hook_#1_rules_prop}
- { \__hook_if_reversed:nT {#1}
- { ~ (after~ reversal) }
- }
- { ~ (after~
- \__hook_if_reversed:nT {#1} {reversal~ and~}
- applying~ rules)
- }
- :
- }
- \iow_term:x { \@spaces
- \clist_if_empty:cTF{g__hook_#1_labels_clist}
- {not~ set~ yet}
- { \clist_use:cnnn {g__hook_#1_labels_clist}
- { ,~ } { ,~ } { ,~ } }
- }
- }
- }
- { \iow_term:n { ~The~hook~is~empty. } }
- \iow_term:n { }
- }
-
-\cs_new_protected:Npn \hook_gput_next_code:nn #1
- {
- \exp_args:Nx \__hook_gput_next_code:nn
- { \__hook_parse_label_default:nn {#1} { top-level } }
- }
-\cs_new_protected:Npn \__hook_gput_next_code:nn #1 #2
- {
- \__hook_declare:n {#1}
- \hook_if_exist:nTF {#1}
- { \__hook_gput_next_do:nn {#1} {#2} }
- { \__hook_try_declaring_generic_next_hook:nn {#1} {#2} }
- }
-\cs_new_protected:Npn \__hook_gput_next_do:nn #1 #2
- {
- \tl_gput_right:cn { g__hook_#1_next_code_tl }
- { #2 \tl_gclear:c { g__hook_#1_next_code_tl } }
- }
-\cs_new_protected:Npn \hook_use:n #1
- {
- \tl_if_exist:cTF { g__hook_#1_code_tl }
- {
- \__hook_preamble_hook:n {#1}
- \cs:w g__hook_#1_code_tl \cs_end:
- }
- { \__hook_use:wn #1 / \s__hook_mark {#1} }
- }
-\cs_new:Npn \__hook_use_initialized:n #1
- {
- \tl_if_exist:cTF { g__hook_#1_code_tl }
- { \cs:w g__hook_#1_code_tl \cs_end: }
- { \__hook_use:wn #1 / \s__hook_mark {#1} }
- }
-\cs_new_protected:Npn \__hook_preamble_hook:n #1
- { \__hook_initialize_hook_code:n {#1} }
-\cs_new:Npn \__hook_use:wn #1 / #2 \s__hook_mark #3
- {
- \str_if_eq:nnTF {#1} { file }
- { \__hook_try_file_hook:n {#3} }
- { } % Hook doesn't exist
- }
-\cs_new_protected:Npn \__hook_try_file_hook:n #1
- {
- \__hook_if_file_hook:wTF #1 / / \s__hook_mark
- {
- \exp_args:Ne \__hook_if_exist_use:n
- { \exp_args:Ne \__hook_file_hook_normalise:n {#1} }
- }
- { \__hook_if_exist_use:n {#1} } % file/ generic hook (e.g. file/before)
- }
-\cs_new_protected:Npn \__hook_if_exist_use:n #1
- {
- \tl_if_exist:cT { g__hook_#1_code_tl }
- {
- \__hook_preamble_hook:n {#1}
- \cs:w g__hook_#1_code_tl \cs_end:
- }
- }
-\cs_new_protected:Npn \hook_use_once:n #1
- {
- \tl_if_exist:cT { g__hook_#1_code_tl }
- {
- \clist_gput_left:Nn \g__hook_execute_immediately_clist {#1}
- \hook_use:n {#1}
- }
- }
-
-\prg_new_conditional:Npnn \hook_if_empty:n #1 { p , T , F , TF }
- {
- \__hook_if_exist:nTF {#1}
- {
- \bool_lazy_and:nnTF
- { \prop_if_empty_p:c { g__hook_#1_code_prop } }
- { \tl_if_empty_p:c { g__hook_#1_next_code_tl } }
- { \prg_return_true: }
- { \prg_return_false: }
- }
- { \prg_return_true: }
- }
-
-\prg_new_conditional:Npnn \hook_if_exist:n #1 { p , T , F , TF }
- {
- \tl_if_exist:cTF { g__hook_#1_code_tl }
- { \prg_return_true: }
- { \prg_return_false: }
- }
-
-\prg_new_conditional:Npnn \__hook_if_exist:n #1 { p , T , F , TF }
- {
- \prop_if_exist:cTF { g__hook_#1_code_prop }
- { \prg_return_true: }
- { \prg_return_false: }
- }
-\prg_new_conditional:Npnn \__hook_if_reversed:n #1 { p , T , F , TF }
- {
- \if_int_compare:w \cs:w g__hook_#1_reversed_tl \cs_end: 1 < 0 \exp_stop_f:
- \prg_return_true:
- \else:
- \prg_return_false:
- \fi:
- }
-
-\clist_new:N \g__hook_execute_immediately_clist
-\msg_new:nnnn { hooks } { labels-incompatible }
- {
- Labels~`#1'~and~`#2'~are~incompatible
- \str_if_eq:nnF {#3} {??} { ~in~hook~`#3' } .~
- \int_compare:nNnT {#4} = { 1 }
- { The~code~for~both~labels~will~be~dropped. }
- }
- {
- LaTeX~found~two~incompatible~labels~in~the~same~hook.~
- This~indicates~an~incompatibility~between~packages.
- }
-\msg_new:nnn { hooks } { empty-label }
- { Empty~code~label~\msg_line_context:.~Using~`#1'~instead. }
-
-\NewDocumentCommand \NewHook { m }{ \hook_new:n {#1} }
-\NewDocumentCommand \NewReversedHook { m }{ \hook_new_reversed:n {#1} }
-\NewDocumentCommand \NewMirroredHookPair { mm }{ \hook_new_pair:nn {#1}{#2} }
-
-\NewDocumentCommand \AddToHook { m o +m }
- {
- \clist_if_in:NnTF \g__hook_execute_immediately_clist {#1}
- {#3}
- { \hook_gput_code:nnn {#1} {#2} {#3} }
- }
-
-\NewDocumentCommand \AddToHookNext { m +m }
- { \hook_gput_next_code:nn {#1} {#2} }
-
-\NewDocumentCommand \RemoveFromHook { m o }
- { \hook_gremove_code:nn {#1} {#2} }
-\str_if_eq:VnTF \@currname { lthooks }
- {
- \seq_gpush:Nn \g__hook_name_stack_seq { lthooks }
- \cs_set_protected:Npn \__hook_tmp:w #1 #2 #3
- {
- \quark_if_recursion_tail_stop:n {#1}
- \seq_gput_right:Nn \g__hook_name_stack_seq { }
- \__hook_tmp:w
- }
- \exp_after:wN \__hook_tmp:w
- \@currnamestack
- \q_recursion_tail \q_recursion_tail
- \q_recursion_tail \q_recursion_stop
- }
- { \seq_gpush:Nn \g__hook_name_stack_seq { } }
-\cs_new_protected:Npn \__hook_curr_name_push:n #1
- {
- \seq_gpush:Nn \g__hook_name_stack_seq {#1}
- \tl_gset:Nn \g__hook_hook_curr_name_tl {#1}
- }
-\cs_new_protected:Npn \__hook_curr_name_pop:
- {
- \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
- \seq_get:NNTF \g__hook_name_stack_seq \l__hook_return_tl
- { \tl_gset_eq:NN \g__hook_hook_curr_name_tl \l__hook_return_tl }
- { \ERROR_should_not_happen }
- }
-\NewDocumentCommand \DeclareDefaultHookLabel { m }
- {
- \seq_gpop:NN \g__hook_name_stack_seq \l__hook_return_tl
- \__hook_curr_name_push:n {#1}
- }
-\tl_gput_left:Nn \@pushfilename { \__hook_curr_name_push:n { } }
-\tl_gput_left:Nn \@popfilename { \__hook_curr_name_pop: }
-\newcommand \UseHook { \hook_use:n }
-\cs_new_protected:Npn \UseOneTimeHook { \hook_use_once:n }
-
-\cs_new_protected:Npn \ShowHook { \hook_log:n }
-
-\cs_new_protected:Npn \DebugHookOn { \hook_debug_on: }
-\cs_new_protected:Npn \DebugHookOff { \hook_debug_off: }
-
-\NewDocumentCommand \DeclareHookRule { m m m m }
-{ \hook_gset_rule:nnnn {#1}{#2}{#3}{#4} }
-
-\NewDocumentCommand \DeclareDefaultHookRule { m m m }
- { \hook_gset_rule:nnnn {??}{#1}{#2}{#3} }
-\@onlypreamble\DeclareDefaultHookRule
-\NewDocumentCommand \ClearHookRule { m m m }
-{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
-\NewExpandableDocumentCommand \IfHookExistTF { m }
- { \hook_if_exist:nTF {#1} }
-\NewExpandableDocumentCommand \IfHookEmptyTF { m }
- { \hook_if_empty:nTF {#1} }
-
-\renewcommand\AtBeginDocument{\AddToHook{begindocument}}
-
-\renewcommand\AtEndDocument {\AddToHook{enddocument}}
-
-\begingroup
- \def\@currname{}
- \NewHook{begindocument}
- \NewHook{enddocument}
- \NewHook{rmfamily}
- \NewHook{sffamily}
- \NewHook{ttfamily}
- \NewHook{defaultfamily}
- \NewHook{documentclass}
-\endgroup
-\let\begin\relax % avoid redeclaration message
-\DeclareRobustCommand*\begin[1]{%
- \UseHook{env/#1/before}%
- \@ifundefined{#1}%
- {\def\reserved@a{\@latex@error{Environment~#1~undefined}\@eha}}%
- {\def\reserved@a{\def\@currenvir{#1}%
- \edef\@currenvline{\on@line}%
- \@execute@begin@hook{#1}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse\reserved@a}
-\def\@execute@begin@hook #1{%
- \expandafter\ifx\csname #1\endcsname\document
- \endgroup
- \gdef\@execute@begin@hook##1{\UseHook{env/##1/begin}}%
- \__hook_initialize_all:
- \@execute@begin@hook{#1}%
- \else
- \UseHook{env/#1/begin}%
- \fi
-}
-\@namedef{end~}#1{%
- \UseHook{env/#1/end}%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \UseHook{env/#1/after}%
- \if@ignore\@ignorefalse\ignorespaces\fi}%
-\@namedef{end~}#1{%
-\romannumeral
-\IfHookEmptyTF{env/#1/end}%
- {\expandafter\z@}%
- {\z@\UseHook{env/#1/end}}%
-\csname end#1\endcsname\@checkend{#1}%
-\expandafter\endgroup\if@endpe\@doendpe\fi
-\UseHook{env/#1/after}%
-\if@ignore\@ignorefalse\ignorespaces\fi}%
-\newcommand\AtBeginEnvironment[1] {\AddToHook{env/#1/begin}}
-\newcommand\AtEndEnvironment[1] {\AddToHook{env/#1/end}}
-\newcommand\BeforeBeginEnvironment[1]{\AddToHook{env/#1/before}}
-\newcommand\AfterEndEnvironment[1] {\AddToHook{env/#1/after}}
-\ExplSyntaxOff
-\NewHook{begindocument/end}
-
-\def\document{%
- \@kernel@after@env@document@begin
- \@expl@sys@load@backend@@
- \ifx\@unusedoptionlist\@empty\else
- \@latex@warning@no@line{Unused global option(s):^^J%
- \@spaces[\@unusedoptionlist]}%
- \fi
- \@colht\textheight
- \@colroom\textheight \vsize\textheight
- \columnwidth\textwidth
- \@clubpenalty\clubpenalty
- \if@twocolumn
- \advance\columnwidth -\columnsep
- \divide\columnwidth\tw@ \hsize\columnwidth \@firstcolumntrue
- \fi
- \hsize\columnwidth \linewidth\hsize
- \begingroup\@floatplacement\@dblfloatplacement
- \makeatletter\let\@writefile\@gobbletwo
- \global \let \@multiplelabels \relax
- \@input{\jobname.aux}%
- \endgroup
- \if@filesw
- \immediate\openout\@mainaux\jobname.aux
- \immediate\write\@mainaux{\relax}%
- \fi
- \process@table
- \let\glb@currsize\@empty % Force math initialization.
- \normalsize
- \everypar{}%
- \ifx\normalsfcodes\@empty
- \ifnum\sfcode`\.=\@m
- \let\normalsfcodes\frenchspacing
- \else
- \let\normalsfcodes\nonfrenchspacing
- \fi
- \fi
- \ifx\document@default@language\m@ne
- \chardef\document@default@language\language
- \fi
- \@noskipsecfalse
- \let \@refundefined \relax
- \UseOneTimeHook{begindocument}%
- \@kernel@after@begindocument
- \ifdim\topskip<1sp\global\topskip 1sp\relax\fi
- \global\@maxdepth\maxdepth
- \global\let\@begindocumenthook\@undefined
- \ifx\@listfiles\@undefined
- \global\let\@filelist\relax
- \global\let\@addtofilelist\@gobble
- \fi
- \gdef\do##1{\global\let ##1\@notprerr}%
- \@preamblecmds
- \global\let \@nodocument \relax
- \global\let\do\noexpand
- \UseOneTimeHook{begindocument/end}%
- \ignorespaces}
-\let\@kernel@after@begindocument\@empty
-\edef \@kernel@after@env@document@begin{%
- \let\expandafter\noexpand\csname
- g__hook_env/document/begin_code_tl\endcsname
- \noexpand\@empty}
-\let\@kernel@hook@begindocument\@empty
-\NewHook{enddocument/afterlastpage}
-\NewHook{enddocument/afteraux}
-\NewHook{enddocument/info}
-\NewHook{enddocument/end}
-
-\def\enddocument{%
- \UseHook{enddocument}%
- \@kernel@after@enddocument
- \@checkend{document}%
- \clearpage
- \UseHook{enddocument/afterlastpage}%
- \@kernel@after@enddocument@afterlastpage
- \begingroup
- \if@filesw
- \immediate\closeout\@mainaux
- \let\@setckpt\@gobbletwo
- \let\@newl@bel\@testdef
- \@tempswafalse
- \makeatletter \@@input\jobname.aux
- \fi
- \UseHook{enddocument/afteraux}%
- \UseHook{enddocument/info}%
- \endgroup
- \UseHook{enddocument/end}%
- \deadcycles\z@\@@end}
-\let\@kernel@after@enddocument\@empty
-\let\@kernel@after@enddocument@afterlastpage\@empty
-\def\@enddocument@kernel@warnings{%
- \ifdim \font@submax >\fontsubfuzz\relax
- \@font@warning{Size substitutions with differences\MessageBreak
- up to \font@submax\space have occurred.\@gobbletwo}%
- \fi
- \@defaultsubs
- \@refundefined
- \if@filesw
- \ifx \@multiplelabels \relax
- \if@tempswa
- \@latex@warning@no@line{Label(s) may have changed.
- Rerun to get cross-references right}%
- \fi
- \else
- \@multiplelabels
- \fi
- \fi
-}
-\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
-\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
-\DeclareHookRule{enddocument/info}{kernel/filelist}{before}{kernel/warnings}
-\expandafter\let\csname ver@atveryend.sty\endcsname\fmtversion
-\newcommand\AfterLastShipout {\AddToHook{enddocument/afterlastpage}}
-\newcommand\AtVeryEndDocument {\AddToHook{enddocument/afteraux}}
-\newcommand\AtEndAfterFileList{\AddToHook{enddocument/info}}
-\newcommand\AtVeryVeryEnd {\AddToHook{enddocument/end}}
-
-\ExplSyntaxOn
-\newcommand\BeforeClearDocument[1]
- { \AtEndDocument{#1}
- \@DEPRECATED{BeforeClearDocument \tl_to_str:n{#1}}
- }
-\cs_new:Npn\@DEPRECATED #1
- {\iow_term:x{======~DEPRECATED~USAGE~#1~==========}}
-\ExplSyntaxOff
-
-
-
-\endinput
-%%
-%% End of file `lthooks.ltx'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/lthooks.sty b/Master/texmf-dist/tex/latex-dev/base/lthooks.sty
deleted file mode 100644
index 3ee2120eab5..00000000000
--- a/Master/texmf-dist/tex/latex-dev/base/lthooks.sty
+++ /dev/null
@@ -1,67 +0,0 @@
-%%
-%% This is file `lthooks.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% lthooks.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright 2020 Frank Mittelbach
-%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
-%%
-%% The newest sources can be found below
-%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
-%%
-%%
-%% File: lthooks.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\lthooksversion{v0.9b}
-\providecommand\lthooksdate{2020/07/19}
-
-
-
-
-
-
-
-
-
-\RequirePackage{xparse}
-\ProvidesExplPackage{lthooks}{\lthooksdate}{\lthooksversion}
- {Hook management interface for LaTeX2e}
-\@ifl@t@r\fmtversion{2020/10/01}
- {}
- {\input{lthooks.ltx}
- \input{ltshipout.ltx}
- \input{ltfilehook.ltx}
- }
-\ExplSyntaxOn
-\hook_debug_off:
-\DeclareOption { debug } { \hook_debug_on:
- \shipout_debug_on: }
-\shipout_debug_off:
-\DeclareOption { debug-shipout } { \shipout_debug_on: }
-\ProcessOptions
-\RequirePackage{filehook-ltx}
-
-\endinput
-%%
-%% End of file `lthooks.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua b/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua
index 93138cc8a17..add13f3080c 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua
+++ b/Master/texmf-dist/tex/latex-dev/base/ltluatex.lua
@@ -298,7 +298,7 @@ local callbacktypes = callbacktypes or {
pre_mlist_to_hlist_filter = list,
mlist_to_hlist = exclusive,
post_mlist_to_hlist_filter = reverselist,
- new_graf = simple,
+ new_graf = exclusive,
pre_dump = simple,
start_run = simple,
stop_run = simple,
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex b/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex
index e73c4ef2c88..9cd2d436d45 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex
+++ b/Master/texmf-dist/tex/latex-dev/base/ltluatex.tex
@@ -47,7 +47,7 @@
#1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}}
\fi
\ProvidesFile{ltluatex.tex}%
-[2020/06/10 v1.1n
+[2020/08/10 v1.1r
LuaTeX support for plain TeX (core)
]
\edef\etatcatcode{\the\catcode`\@}
@@ -76,7 +76,7 @@
\expandafter\let\expandafter\new@mathgroup\csname newfam\endcsname
\fi
\edef \et@xmaxregs {\ifx\directlua\@undefined 32768\else 65536\fi}
-\edef \et@xmaxfam {\ifx\Umathchar\@undefined\sixt@@n\else\@cclvi\fi}
+\edef \et@xmaxfam {\ifx\Umathcode\@undefined\sixt@@n\else\@cclvi\fi}
\count 270=\et@xmaxregs % locally allocates \count registers
\count 271=\et@xmaxregs % ditto for \dimen registers
\count 272=\et@xmaxregs % ditto for \skip registers
@@ -120,23 +120,23 @@
\fi
\ifx\e@alloc@attribute@count\@undefined
\countdef\e@alloc@attribute@count=258
+ \e@alloc@attribute@count=\z@
\fi
\def\newattribute#1{%
\e@alloc\attribute\attributedef
\e@alloc@attribute@count\m@ne\e@alloc@top#1%
}
-\e@alloc@attribute@count=\z@
\def\setattribute#1#2{#1=\numexpr#2\relax}
\def\unsetattribute#1{#1=-"7FFFFFFF\relax}
\ifx\e@alloc@ccodetable@count\@undefined
\countdef\e@alloc@ccodetable@count=259
+ \e@alloc@ccodetable@count=\z@
\fi
\def\newcatcodetable#1{%
\e@alloc\catcodetable\chardef
\e@alloc@ccodetable@count\m@ne{"8000}#1%
\initcatcodetable\allocationnumber
}
-\e@alloc@ccodetable@count=\z@
\newcatcodetable\catcodetable@initex
\newcatcodetable\catcodetable@string
\begingroup
@@ -219,31 +219,32 @@
\endgroup
\ifx\e@alloc@luafunction@count\@undefined
\countdef\e@alloc@luafunction@count=260
+ \e@alloc@luafunction@count=\z@
\fi
\def\newluafunction{%
\e@alloc\luafunction\e@alloc@chardef
\e@alloc@luafunction@count\m@ne\e@alloc@top
}
-\e@alloc@luafunction@count=\z@
\ifx\e@alloc@whatsit@count\@undefined
\countdef\e@alloc@whatsit@count=261
+ \e@alloc@whatsit@count=\z@
\fi
\def\newwhatsit#1{%
\e@alloc\whatsit\e@alloc@chardef
\e@alloc@whatsit@count\m@ne\e@alloc@top#1%
}
-\e@alloc@whatsit@count=\z@
\ifx\e@alloc@bytecode@count\@undefined
\countdef\e@alloc@bytecode@count=262
+ \e@alloc@bytecode@count=\z@
\fi
\def\newluabytecode#1{%
\e@alloc\luabytecode\e@alloc@chardef
\e@alloc@bytecode@count\m@ne\e@alloc@top#1%
}
-\e@alloc@bytecode@count=\z@
\ifx\e@alloc@luachunk@count\@undefined
\countdef\e@alloc@luachunk@count=263
+ \e@alloc@luachunk@count=\z@
\fi
\def\newluachunkname#1{%
\e@alloc\luachunk\e@alloc@chardef
@@ -251,7 +252,12 @@
{\escapechar\m@ne
\directlua{lua.name[\the\allocationnumber]="\string#1"}}%
}
-\e@alloc@luachunk@count=\z@
+\def\now@and@everyjob#1{%
+ \everyjob\expandafter{\the\everyjob
+ #1%
+ }%
+ #1%
+}
\begingroup
\attributedef\attributezero=0 %
\chardef \charzero =0 %
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltshipout.ltx b/Master/texmf-dist/tex/latex-dev/base/ltshipout.ltx
deleted file mode 100644
index c473f64fae7..00000000000
--- a/Master/texmf-dist/tex/latex-dev/base/ltshipout.ltx
+++ /dev/null
@@ -1,424 +0,0 @@
-%%
-%% This is file `ltshipout.ltx',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% ltshipout.dtx (with options: `2ekernel')
-%%
-%% This is a generated file.
-%%
-%% Copyright 2020 Frank Mittelbach
-%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
-%%
-%% It may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3c
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
-%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
-%%
-%% The newest sources can be found below
-%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
-%%
-%%
-%% File: ltshipout.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\ltshipoutversion{v0.9a}
-\providecommand\ltshipoutdate{2020/07/15}
-
-
-
-
-
-
-
-
-
-
-\ExplSyntaxOn
-\bool_new:N \g__shipout_debug_bool
-\cs_new_eq:NN \__shipout_debug:n \use_none:n
-\cs_new_protected:Npn \shipout_debug_on:
- {
- \bool_gset_true:N \g__shipout_debug_bool
- \__shipout_debug_gset:
- }
-\cs_new_protected:Npn \shipout_debug_off:
- {
- \bool_gset_false:N \g__shipout_debug_bool
- \__shipout_debug_gset:
- }
-\cs_new_protected:Npn \__shipout_debug_gset:
- {
- \cs_gset_protected:Npx \__shipout_debug:n ##1
- { \bool_if:NT \g__shipout_debug_bool {##1} }
- }
-
-\hook_new:n{shipout/before}
-\hook_new:n{shipout/foreground}
-\hook_new:n{shipout/background}
-\hook_new:n{shipout/firstpage}
-\hook_new:n{shipout/lastpage}
-
-\box_new:N \l_shipout_box
-\cs_set_eq:NN \ShipoutBox \l_shipout_box
-
-\cs_set:Npn\__shipout_execute: {
- \tl_set:Nx \l__shipout_group_level_tl
- { \int_value:w \tex_currentgrouplevel:D }
- \tex_afterassignment:D \__shipout_execute_test_level:
- \tex_setbox:D \l_shipout_box
-}
-
-\cs_gset_eq:NN \shipout \__shipout_execute:
-
-\tl_new:N \l__shipout_group_level_tl
-
-\cs_new:Npn \__shipout_execute_test_level: {
- \int_compare:nNnT
- \l__shipout_group_level_tl < \tex_currentgrouplevel:D
- \tex_aftergroup:D
- \__shipout_execute_cont:
-}
-
-\cs_new:Npn \__shipout_execute_cont: {
- \box_if_empty:NTF \l_shipout_box
- { \PackageWarning{ltshipout}{Ignoring~ void~ shipout~ box} }
- {
- \bool_gset_false:N \g__shipout_discard_bool
- \set@typeset@protect
- \__shipout_get_box_size:N \l_shipout_box
- \hook_use:n {shipout/before}
- \int_gincr:N \g_shipout_totalpages_int
- \bool_if:NTF \g__shipout_discard_bool
- { \PackageInfo{ltshipout}{Completed~ page~ discarded}
- \bool_gset_false:N \g__shipout_discard_bool
- \tex_deadcycles:D \c_zero_int
- }
- { \box_if_empty:NTF \l_shipout_box
- { \PackageWarning{ltshipout}{
- Shipout~ box~ was~ voided~ by~ hook,\MessageBreak
- ignoring~ shipout~ box }
- }
- {
- \int_gincr:N \g_shipout_readonly_int
- \__shipout_debug:n {
- \typeout{Absolute~ page~ =~ \int_use:N \g_shipout_readonly_int
- \space (target:~ \@abspage@last)}
- }
- \__shipout_get_box_size:N \l_shipout_box
- \@kernel@before@shipout@foreground
- \hook_if_empty:nF {shipout/foreground}
- { \__shipout_add_foreground_picture:n
- { \hook_use:n {shipout/foreground} } }
- \hook_if_empty:nF {shipout/background}
- { \__shipout_add_background_picture:n
- { \hook_use:n {shipout/background} } }
- \__shipout_execute_firstpage_hook:
- \int_compare:nNnT \@abspage@last = \g_shipout_readonly_int
- { \hook_if_empty:nF {shipout/lastpage}
- { \__shipout_debug:n { \typeout{Executing~ lastpage~ hook~
- on~ page~ \int_use:N \g_shipout_readonly_int } }
- \__shipout_add_foreground_box:n { \UseHook{shipout/lastpage}
- \@kernel@after@shipout@lastpage }
- }
- \bool_gset_true:N \g__shipout_lastpage_handled_bool
- }
- \cs_set_eq:NN \protect \exp_not:N
- \tex_shipout:D \box_use:N \l_shipout_box
- }
- }
- }
-}
-
-\let\@kernel@after@shipout@lastpage\@empty
-\let\@kernel@before@shipout@foreground\@empty
-
-\cs_new:Npn \__shipout_execute_firstpage_hook: {
- \hook_if_empty:nF {shipout/firstpage}
- { \__shipout_add_background_box:n { \UseHook{shipout/firstpage} } }
- \cs_gset_eq:NN \__shipout_execute_firstpage_hook: \prg_do_nothing:
- \cs_gset:Npn \__shipout_add_firstpage_material:Nn ##1 ##2 {
- \PackageWarning{ltshipout}{
- First~ page~ is~ already~ shipped~ out,~ ignoring\MessageBreak
- \string##1 }
- }
-}
-
-\bool_new:N \g__shipout_lastpage_handled_bool
-
-\cs_new:Npn \__shipout_add_firstpage_material:Nn #1#2 {
- \AddToHook{shipout/firstpage}{#2}
-}
-
-\cs_new:Npn \__shipout_get_box_size:N #1 {
- \dim_set:Nn \l_shipout_box_ht_dim { \box_ht:N #1 }
- \dim_set:Nn \l_shipout_box_dp_dim { \box_dp:N #1 }
- \dim_set:Nn \l_shipout_box_wd_dim { \box_wd:N #1 }
- \dim_set:Nn \l_shipout_box_ht_plus_dp_dim { \l_shipout_box_ht_dim +
- \l_shipout_box_dp_dim }
-}
-
-\dim_new:N \l_shipout_box_ht_dim
-\dim_new:N \l_shipout_box_dp_dim
-\dim_new:N \l_shipout_box_wd_dim
-\dim_new:N \l_shipout_box_ht_plus_dp_dim
-
-\bool_new:N \g__shipout_discard_bool
-
-\box_new:N \l__shipout_tmp_box
-\tl_new:N \l__shipout_saved_badness_tl
-
-\cs_new:Npn \__shipout_add_background_box:n #1
-{ \__shipout_get_box_size:N \l_shipout_box
- \box_if_vertical:NTF \l_shipout_box
- {
- \tl_set:Nx \l__shipout_saved_badness_tl
- { \vfuzz=\the\vfuzz\relax
- \vbadness=\the\vbadness\relax }
- \vfuzz=\c_max_dim
- \vbadness=\c_max_int
- \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
- {
- \hbox_set:Nn \l__shipout_tmp_box
- { \l__shipout_saved_badness_tl #1 }
- \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
- \skip_zero:N \baselineskip
- \skip_zero:N \lineskip
- \skip_zero:N \lineskiplimit
- \box_use:N \l__shipout_tmp_box
- \vbox_unpack:N \l_shipout_box
- \kern \c_zero_dim
- }
- \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
- \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
- \l__shipout_saved_badness_tl
- }
- {
- \box_if_horizontal:NT \l_shipout_box
- {
- \tl_set:Nx \l__shipout_saved_badness_tl
- { \hfuzz=\the\hfuzz\relax
- \hbadness=\the\hbadness\relax }
- \hfuzz=\c_max_dim
- \hbadness=\c_max_int
- \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
- {
- \hbox_set:Nn \l__shipout_tmp_box
- { \l__shipout_saved_badness_tl #1 }
- \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
- \box_move_up:nn
- \l_shipout_box_ht_dim
- { \box_use:N \l__shipout_tmp_box }
- \hbox_unpack:N \l_shipout_box
- }
- \l__shipout_saved_badness_tl
- }
- }
-}
-
-\cs_new:Npn \__shipout_add_foreground_box:n #1
-{
- \box_if_vertical:NTF \l_shipout_box
- {
- \tl_set:Nx \l__shipout_saved_badness_tl
- { \vfuzz=\the\vfuzz\relax
- \vbadness=\the\vbadness\relax }
- \vfuzz=\c_max_dim
- \vbadness=\c_max_int
- \vbox_set_to_ht:Nnn \l_shipout_box \l_shipout_box_ht_plus_dp_dim
- {
- \hbox_set:Nn \l__shipout_tmp_box
- { \l__shipout_saved_badness_tl #1 }
- \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
- \skip_zero:N \baselineskip
- \skip_zero:N \lineskip
- \skip_zero:N \lineskiplimit
- \vbox_unpack:N \l_shipout_box
- \kern -\l_shipout_box_ht_plus_dp_dim
- \box_use:N \l__shipout_tmp_box
- \kern \l_shipout_box_ht_plus_dp_dim
- }
- \l__shipout_saved_badness_tl
- \box_set_ht:Nn \l_shipout_box \l_shipout_box_ht_dim
- \box_set_dp:Nn \l_shipout_box \l_shipout_box_dp_dim
- }
- {
- \box_if_horizontal:NT \l_shipout_box
- {
- \tl_set:Nx \l__shipout_saved_badness_tl
- { \hfuzz=\the\hfuzz\relax
- \hbadness=\the\hbadness\relax }
- \hfuzz=\c_max_dim
- \hbadness=\c_max_int
- \hbox_set_to_wd:Nnn \l_shipout_box \l_shipout_box_wd_dim
- {
- \hbox_unpack:N \l_shipout_box
- \kern -\box_wd:N \l_shipout_box
- \hbox_set:Nn \l__shipout_tmp_box
- { \l__shipout_saved_badness_tl #1 }
- \box_set_wd:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
- \box_move_up:nn { \box_ht:N \l_shipout_box }
- { \box_use:N \l__shipout_tmp_box }
- \kern \box_wd:N \l_shipout_box
- }%
- \l__shipout_saved_badness_tl
- }
- }
-}
-
-\tl_gput_right:Nn \@kernel@after@begindocument {
- \tl_const:Nx \c__shipout_horigin_tl
- {
- \cs_if_exist_use:NTF \pdfvariable { horigin }
- { \cs_if_exist_use:NF \pdfhorigin { 1in } }
- }
- \tl_const:Nx \c__shipout_vorigin_tl
- {
- \cs_if_exist_use:NTF \pdfvariable { vorigin }
- { \cs_if_exist_use:NF \pdfvorigin { 1in } }
- }
-}
-
-\cs_new:Npn \__shipout_picture_overlay:n #1 {
- \kern -\c__shipout_horigin_tl \scan_stop:
- \vbox_to_zero:n {
- \kern -\c__shipout_vorigin_tl \scan_stop:
- \unitlength 1pt \scan_stop:
- \hbox_set_to_wd:Nnn \l__shipout_tmp_box \c_zero_dim { \ignorespaces #1 }
- \box_set_ht:Nn \l__shipout_tmp_box \c_zero_dim
- \box_set_dp:Nn \l__shipout_tmp_box \c_zero_dim
- \box_use:N \l__shipout_tmp_box
- \tex_vss:D
- }
-}
-
-\cs_new:Npn \__shipout_add_background_picture:n #1 {
- \__shipout_add_background_box:n { \__shipout_picture_overlay:n {#1} }
-}
-
-\cs_new:Npn \__shipout_add_foreground_picture:n #1 {
- \__shipout_add_foreground_box:n { \__shipout_picture_overlay:n {#1} }
-}
-
-\cs_new:Npn \shipout_discard: {
- \bool_gset_true:N \g__shipout_discard_bool
-}
-
-
-
-\int_new:N \g_shipout_readonly_int
-\cs_new_eq:NN \ReadonlyShipoutCounter \g_shipout_readonly_int
-
-\int_new:N \g_shipout_totalpages_int
-\cs_new_eq:NN \c@totalpages \g_shipout_totalpages_int
-\cs_new:Npn \thetotalpages { \arabic{totalpages} }
-
-\xdef\@abspage@last{\number\maxdimen}
-
-\g@addto@macro \@kernel@after@enddocument {
- \int_compare:nNnT \@abspage@last = \maxdimen
- {
- \xdef\@abspage@last{ \int_eval:n {\g_shipout_readonly_int + 1} }
- }
-}
-\g@addto@macro \@kernel@after@enddocument@afterlastpage {
- \int_compare:nNnF \g_shipout_readonly_int = 0
- {
- \if@filesw
- \iow_now:Nx \@auxout {
- \gdef\string\@abspage@last {\int_use:N \g_shipout_readonly_int}}
- \fi
- \bool_if:NF \g__shipout_lastpage_handled_bool
- { \tex_shipout:D\vbox to\textheight{
- \hbox{\UseHook{shipout/lastpage} \@kernel@after@shipout@lastpage }
- \__shipout_excuse_extra_page:
- \null
- }
- }
- }
-}
-
-\cs_new:Npn \__shipout_excuse_extra_page: {
- \vfil
- \begin{center}
- \bfseries Temporary~ page!
- \end{center}
- \LaTeX{}~ was~ unable~ to~ guess~ the~ total~ number~ of~ pages~
- correctly.~ ~ As~ there~ was~ some~ unprocessed~ data~ that~
- should~ have~ been~ added~ to~ the~ final~ page~ this~ extra~
- page~ has~ been~ added~ to~ receive~ it.
- \par
- If~ you~ rerun~ the~ document~ (without~ altering~ it)~ this~
- surplus~ page~ will~ go~ away,~ because~ \LaTeX{}~ now~ knows~
- how~ many~ pages~ to~ expect~ for~ this~ document.
- \vfil
-}
-
-
-\cs_new_eq:NN \DiscardShipoutBox \shipout_discard:
-
-\renewcommand \AtBeginDvi {\__shipout_add_firstpage_material:Nn \AtBeginDvi}
-
-\cs_new_eq:NN \DebugShipoutOn \shipout_debug_on:
-\cs_new_eq:NN \DebugShipoutOff \shipout_debug_off:
-
-
-
-\cs_new_eq:NN \AtBeginShipoutBox \ShipoutBox
-
-\cs_set_eq:NN\AtBeginShipoutInit\@empty
-
-\newcommand\AtBeginShipout {\AddToHook{shipout/before}}
-\newcommand\AtBeginShipoutNext {\AddToHookNext{shipout/before}}
-
-\newcommand\AtBeginShipoutFirst{\__shipout_add_firstpage_material:Nn \AtBeginShipoutFirst}
-
-\cs_new:Npn \ShipoutBoxHeight { \dim_use:N \l_shipout_box_ht_dim }
-\cs_new:Npn \ShipoutBoxDepth { \dim_use:N \l_shipout_box_dp_dim }
-\cs_new:Npn \ShipoutBoxWidth { \dim_use:N \l_shipout_box_wd_dim }
-
-\cs_new_eq:NN \AtBeginShipoutDiscard \DiscardShipoutBox
-
-\cs_new_eq:NN \AtBeginShipoutAddToBox \__shipout_add_background_box:n
-\cs_new_eq:NN \AtBeginShipoutAddToBoxForeground \__shipout_add_foreground_box:n
-\cs_new_eq:NN\AtBeginShipoutUpperLeft \__shipout_add_background_picture:n
-\cs_new_eq:NN\AtBeginShipoutUpperLeftForeground \__shipout_add_foreground_picture:n
-
-\expandafter\cs_set_eq:NN\csname ver@atbegshi.sty\endcsname\fmtversion
-\@namedef {ver@atbegshi.sty}{2020/10/01}
-
-\cs_new_eq:NN\EveryShipout\AtBeginShipout
-\cs_new_eq:NN\AtNextShipout\AtBeginShipoutNext
-\expandafter\cs_set_eq:NN\csname ver@everyshi.sty\endcsname\fmtversion
-\@namedef {ver@everyshi.sty}{2020/10/01}
-
-\cs_new:Npn \AtEndDvi {\AddToHook{shipout/lastpage}}
-\expandafter\cs_set_eq:NN\csname ver@atenddvi.sty\endcsname\fmtversion
-\@namedef {ver@atenddvi.sty}{2020/10/01}
-
-\ExplSyntaxOff
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\endinput
-%%
-%% End of file `ltshipout.ltx'.
diff --git a/Master/texmf-dist/tex/latex-dev/base/ltxdoc.cls b/Master/texmf-dist/tex/latex-dev/base/ltxdoc.cls
index 09520e6cfd2..897c59b5dc8 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ltxdoc.cls
+++ b/Master/texmf-dist/tex/latex-dev/base/ltxdoc.cls
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{ltxdoc}
- [2020/05/17 v2.0z Standard LaTeX documentation class]
+ [2020/08/21 v2.1a Standard LaTeX documentation class]
\DeclareOption{a5paper}{\@latexerr{Option not supported}%
{}}
\DeclareOption*{%
@@ -159,7 +159,8 @@
\ifnum\@auxout=\@partaux
\@latexerr{\string\include\space cannot be nested}\@eha
\else
- \set@curr@file@trim@spaces{#1}%
+ \set@curr@file{#1}%
+ \edef\@curr@file{\@strip@tex@ext\@curr@file}%
\expandafter\@docinclude\expandafter{\@curr@file}
\fi}
\def\@docinclude#1 {\clearpage
@@ -169,6 +170,7 @@
\if@tempswa \let\@auxout\@partaux \if@filesw
\immediate\openout\@partaux "#1.aux"
\immediate\write\@partaux{\relax}\fi
+\@filehook@set@CurrentFile
\let\@ltxdoc@PrintIndex\PrintIndex
\let\PrintIndex\relax
\let\@ltxdoc@PrintChanges\PrintChanges
diff --git a/Master/texmf-dist/tex/latex-dev/base/macce.def b/Master/texmf-dist/tex/latex-dev/base/macce.def
index 4ec47fa44fa..abe0c3f1d77 100644
--- a/Master/texmf-dist/tex/latex-dev/base/macce.def
+++ b/Master/texmf-dist/tex/latex-dev/base/macce.def
@@ -44,7 +44,7 @@
\ProvidesFile{macce.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textdiv}
{\TextSymbolUnavailable\textdiv}
diff --git a/Master/texmf-dist/tex/latex-dev/base/next.def b/Master/texmf-dist/tex/latex-dev/base/next.def
index 076c516a7ef..7b17b7f14e8 100644
--- a/Master/texmf-dist/tex/latex-dev/base/next.def
+++ b/Master/texmf-dist/tex/latex-dev/base/next.def
@@ -44,7 +44,7 @@
\ProvidesFile{next.def}
- [2020/04/14 v1.3c Input encoding file]
+ [2020/08/01 v1.3d Input encoding file]
\ProvideTextCommandDefault{\textdegree}{\ensuremath{{^\circ}}}
\ProvideTextCommandDefault{\textonehalf}{\ensuremath{\frac12}}
\ProvideTextCommandDefault{\textonequarter}{\ensuremath{\frac14}}
diff --git a/Master/texmf-dist/tex/latex-dev/base/omlenc.def b/Master/texmf-dist/tex/latex-dev/base/omlenc.def
index 765daa54137..0ec41965eb4 100644
--- a/Master/texmf-dist/tex/latex-dev/base/omlenc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/omlenc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{omlenc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\DeclareFontEncoding{OML}{}{}
\DeclareTextSymbol{\textless}{OML}{`\<}
diff --git a/Master/texmf-dist/tex/latex-dev/base/omsenc.def b/Master/texmf-dist/tex/latex-dev/base/omsenc.def
index bdac7f76c57..af45ce463ab 100644
--- a/Master/texmf-dist/tex/latex-dev/base/omsenc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/omsenc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{omsenc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\DeclareFontEncoding{OMS}{}{}
\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
diff --git a/Master/texmf-dist/tex/latex-dev/base/ot1enc.def b/Master/texmf-dist/tex/latex-dev/base/ot1enc.def
index 7a2bccd2711..c636ed38f8f 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ot1enc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/ot1enc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{ot1enc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\DeclareFontEncoding{OT1}{}{}
\DeclareTextAccent{\"}{OT1}{127}
diff --git a/Master/texmf-dist/tex/latex-dev/base/ot4enc.def b/Master/texmf-dist/tex/latex-dev/base/ot4enc.def
index f46bb97fbb9..48b4f7384a7 100644
--- a/Master/texmf-dist/tex/latex-dev/base/ot4enc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/ot4enc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{ot4enc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\DeclareFontEncoding{OT4}{}{}
\DeclareFontSubstitution{OT4}{cmr}{m}{n}
diff --git a/Master/texmf-dist/tex/latex-dev/base/preload.cfg b/Master/texmf-dist/tex/latex-dev/base/preload.cfg
index f90763b3e7d..d6cc4e40270 100644
--- a/Master/texmf-dist/tex/latex-dev/base/preload.cfg
+++ b/Master/texmf-dist/tex/latex-dev/base/preload.cfg
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{preload.cfg}
- [2020/04/24 v3.0h LaTeX Kernel
+ [2020/08/01 v3.0i LaTeX Kernel
(Uncustomised preload
font setup)]
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls b/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls
new file mode 100644
index 00000000000..5b6700039c3
--- /dev/null
+++ b/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls
@@ -0,0 +1,228 @@
+
+% This class is buggy and needs fixing
+
+\ProvidesClass{source2edoc}
+ [2020/08/16 v0.1 Quick hack to typeset source2.tex
+ (not usable for anything else and buggy -- will vanish again)!]
+
+\LoadClass{l3doc}
+
+\RemoveFromHook{begindocument}[l3doc] % drop the standard setting making " a shortverb
+\AddToHook{begindocument}{\MakeShortVerb \|} % but readd | as one
+
+%\ShowHook{begindocument}
+
+
+
+% l3doc's def are buggy (already fixed there but not distributed yet)
+\ExplSyntaxOn
+\RenewDocumentCommand \DocInclude { m }
+ {
+ \relax\clearpage
+ \docincludeaux
+ \IfFileExists{#1.fdd}
+ { \cs_set:Npn \currentfile{#1.fdd} }
+ { \cs_set:Npn \currentfile{#1.dtx} }
+ \int_compare:nNnTF \@auxout = \@partaux
+ { \@latexerr{\string\include\space cannot~be~nested}\@eha }
+ { \@docinclude {#1} } % <--- braces needed!
+ }
+\cs_gset:Npn \@docinclude #1
+ {
+ \clearpage
+ \immediate\write\@mainaux{\string\@input{#1.aux}}
+ \@tempswatrue
+ \if@partsw
+ \@tempswafalse
+ \cs_set:Npx \@tempb {#1}
+ \clist_map_inline:Nn \@partlist
+ {
+ \if_meaning:w \@tempa \@tempb
+ \@tempswatrue
+ \fi:
+ }
+ \fi
+ \if@tempswa
+ \cs_set_eq:NN \@auxout \@partaux
+ \immediate\openout\@partaux #1.aux
+ \immediate\write\@partaux{\relax}
+ \cs_set_eq:NN \@ltxdoc@PrintIndex \PrintIndex
+ \cs_set_eq:NN \PrintIndex \relax
+ \cs_set_eq:NN \@ltxdoc@PrintChanges \PrintChanges
+ \cs_set_eq:NN \PrintChanges \relax
+ \cs_set_eq:NN \@ltxdoc@theglossary \theglossary
+ \cs_set_eq:NN \@ltxdoc@endtheglossary \endtheglossary
+ \part{\currentfile}
+ {
+ \cs_set_eq:NN \ttfamily\relax
+ \cs_gset:Npx \filekey
+ { \filekey,~ \thepart = { \ttfamily \currentfile } } % <-- mising spaces considered harmful
+ }
+ \DocInput{\currentfile}
+ \cs_set_eq:NN \PrintIndex \@ltxdoc@PrintIndex
+ \cs_set_eq:NN \PrintChanges \@ltxdoc@PrintChanges
+ \cs_set_eq:NN \theglossary \@ltxdoc@theglossary
+ \cs_set_eq:NN \endtheglossary \@ltxdoc@endtheglossary
+ \clearpage
+ \@writeckpt{#1}
+ \immediate \closeout \@partaux
+ \else
+ \@nameuse{cp@#1}
+ \fi
+ \cs_set_eq:NN \@auxout \@mainaux
+ }
+\ExplSyntaxOff
+
+\def\partname{File}
+
+
+\gdef\codeline@wrindex#1{\if@filesw
+ \begingroup
+ \let\protect\noexpand
+ \immediate\write\@indexfile
+ {\string\indexentry{#1}%
+ {\filesep\number\c@CodelineNo}}%
+ \endgroup\fi}
+\let\filesep\@empty
+\def\aalph#1{\@aalph{\csname c@#1\endcsname}}
+\def\@aalph#1{%
+ \ifcase#1\or a\or b\or c\or d\or e\or f\or g\or h\or i\or
+ j\or k\or l\or m\or n\or o\or p\or q\or r\or s\or
+ t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or
+ D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or
+ N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or
+ X\or Y\or Z\else\@ctrerr\fi}
+\def\docincludeaux{%
+ \def\thepart{\aalph{part}}\def\filesep{\thepart-}%
+ \let\filekey\@gobble
+ \g@addto@macro\index@prologue{%
+ \gdef\@oddfoot{\parbox[t]{\textwidth}{\strut\footnotesize
+ \raggedright{\bfseries File Key:} \filekey}}%
+ \let\@evenfoot\@oddfoot}%
+ \global\let\docincludeaux\relax
+ \gdef\@oddfoot{%
+ \expandafter\ifx\csname ver@\currentfile\endcsname\relax
+ File \thepart: {\ttfamily\currentfile} %
+ \else
+ \GetFileInfo{\currentfile}%
+ File \thepart: {\ttfamily\filename} %
+ Date: \filedate\ %
+ Version \fileversion
+ \fi
+ \hfill\thepage}%
+ \let\@evenfoot\@oddfoot}%
+\def\MaintainedBy#1{\gdef\@maintainedby{#1}}
+\let\@maintainedby\@empty
+\def\MaintainedByLaTeXTeam#1{%
+{\gdef\@maintainedby{%
+This file is maintained by the \LaTeX{} Project team.\\%
+Bug reports can be opened (category \texttt{#1}) at\\%
+\url{https://latex-project.org/bugs.html}.}}}
+\def\@maketitle{%
+ \newpage
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \ifx\@maintainedby\@empty
+ \else
+ \vskip 1em%
+ \fbox{\fbox{\begin{tabular}{@{}l@{}}\@maintainedby\end{tabular}}}%
+ \fi
+ \end{center}%
+ \par
+ \vskip 1.5em}
+\providecommand\url{\texttt}
+\def\task#1#2{}
+
+
+\def\oc@scan#1{%
+ \ifx\oc@bslash#1%
+ \egroup\let\next\oc@bslash\else
+ \ifcat a\noexpand#1%
+ #1\let\next\oc@scan\else
+ \ifx\oc@percent#1%
+ \def\next{\char`\%\egroup}%
+ \else
+ #1\let\next\egroup
+ \fi\fi\fi\next}
+\def\oc@bslash{\bgroup\oc@ttf\char`\\\oc@scan}%
+\def\oc@verb#1{%
+ \catcode`#1\active
+ \uccode`\~`#1%
+ \uppercase{\def~{{\oc@ttf\char`#1}}}}
+\begingroup
+ \obeyspaces%
+ \catcode`\/=\catcode`\\
+ /catcode`/\/active
+ /catcode`<=/catcode`{%
+ /catcode`>=/catcode`}%
+ /catcode`/{/active%
+ /catcode`/}/active%
+ /gdef/oldc< \end{oldcomments}>%
+ /gdef/begmac< \begin{macrocode}>%
+ /gdef/obs</def <</oc@ttf/ >>>%
+/endgroup%
+\begingroup
+ \catcode`\/=\catcode`\\
+ \catcode`\\=13
+ /catcode`/|=/catcode`/%
+ /catcode`/%=13
+ /gdef/oldcomments{|
+ /makeatletter
+ /let/do/oc@verb/dospecials
+ /frenchspacing/@vobeyspaces/obs
+ /raggedright
+ /oc@verb/>|
+ /oc@verb/<|
+ /let\/oc@bslash
+ /let%/oc@percent
+ /obeylines
+ /parindent/z@
+ /ttfamily/expandafter/let/expandafter/oc@ttf/the/font
+ /rmfamily
+ /textit{Historical /LaTeX/,2.09 comments (not necessarily accurate any more):}
+ /hfuzz/maxdimen
+ }
+/endgroup
+\begingroup
+ \sloppy%
+ \obeylines%
+ \gdef\oc@percent#1^^M{%
+ \ifvmode%
+ \def\commentline{#1}%
+ \ifx\commentline\oldc%
+ \textit{End of historical \LaTeX\,2.09 comments.}
+ \end{oldcomments}%
+ \else%
+ \ifx\commentline\begmac%
+ \begin{macrocode}%
+ \else%
+ \leavevmode%
+ #1^^M%
+ \fi\fi%
+ \else%
+ {\oc@ttf\char`\%}#1^^M%
+ \fi}%
+\endgroup%
+
+\InputIfFileExists{ltxdoc.cfg}
+ {\typeout{*************************************^^J%
+ * Local config file ltxdoc.cfg used^^J%
+ *************************************}}
+ {}
+
+
+%\errorstopmode
+\batchmode
+
+\endinput
diff --git a/Master/texmf-dist/tex/latex-dev/base/srclfile-ltx.sty b/Master/texmf-dist/tex/latex-dev/base/srclfile-ltx.sty
index 1e7ca0773cf..4c07a63305a 100644
--- a/Master/texmf-dist/tex/latex-dev/base/srclfile-ltx.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/srclfile-ltx.sty
@@ -8,33 +8,45 @@
%%
%% This is a generated file.
%%
-%% Copyright 2020 Frank Mittelbach
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
+%% version 2008 or later.
%%
-%% The newest sources can be found below
+%% This file has the LPPL maintenance status "maintained".
%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
%%
-%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\ltfilehookversion{v0.9a}
-\providecommand\ltfilehookdate{2020/07/19}
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
\newcommand\BeforeClass[2]
{\AddToHook{file/before/#1.cls}{#2}}
\newcommand\AfterClass [2]
@@ -57,8 +69,6 @@
\AddToHook{file/after/#1}{#2}}
\expandafter\let\csname ver@scrlfile.sty\endcsname\fmtversion
\@namedef {ver@scrlfile.sty}{2020/10/01}
-
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty b/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty
index 84faaeb8b54..2f625adbbc3 100644
--- a/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty
+++ b/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty
@@ -8,64 +8,68 @@
%%
%% This is a generated file.
%%
-%% Copyright 2020 Frank Mittelbach
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs.html
+%% (but please observe conditions on bug reports sent to that address!)
%%
-%% This file was generated from file(s) of the LaTeX `lthooks Bundle'.
-%% --------------------------------------------------------------------------
+%%
+%% Copyright (C) 1993-2020
+%% The LaTeX3 Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the LaTeX base system.
+%% --------------------------------------------------------------
%%
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% of this license or (at your option) any later version.
%% The latest version of this license is in
-%% http://www.latex-project.org/lppl.txt
+%% https://www.latex-project.org/lppl.txt
%% and version 1.3c or later is part of all distributions of LaTeX
-%% version 2005/12/01 or later.
-%%
-%% This file may only be distributed together with a copy of the LaTeX
-%% `lthooks Bundle'. You may however distribute the `lthooks Bundle'
-%% without such generated files.
+%% version 2008 or later.
%%
-%% The newest sources can be found below
+%% This file has the LPPL maintenance status "maintained".
%%
-%% https://github.com/FrankMittelbach/fmitex/
-%%
-%% where one can also log issues in case there are any.
+%% This file may only be distributed together with a copy of the LaTeX
+%% base system. You may however distribute the LaTeX base system without
+%% such generated files.
%%
+%% The list of all files belonging to the LaTeX base distribution is
+%% given in the file `manifest.txt'. See also `legal.txt' for additional
+%% information.
%%
-%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach, LaTeX Team
-\providecommand\ltfilehookversion{v0.9a}
-\providecommand\ltfilehookdate{2020/07/19}
+%% The list of derived (unpacked) files belonging to the distribution
+%% and covered by LPPL is defined by the unpacking scripts (with
+%% extension .ins) which are part of the distribution.
+%%
+%% File: ltfilehook.dtx (C) Copyright 2020 Frank Mittelbach,
+%% Phelype Oleinik & LaTeX Team
+%%% From File: ltshipout.dtx
+\providecommand\ltfilehookversion{v1.0a}
+\providecommand\ltfilehookdate{2020/08/30}
\ProvidesExplPackage
{structuredlog}{\ltfilehookdate}{\ltfilehookversion}
{Structuring the TeX transcript file}
-
\int_new:N \g__filehook_nesting_level_int
-
-\tl_new:N \g__filehook_nesting_prefix_tl
-\tl_gset:Nn \g__filehook_nesting_prefix_tl { }
-\AddToHook{file/before}{
- \int_gincr:N \g__filehook_nesting_level_int
- \tl_gput_right:Nn\g__filehook_nesting_prefix_tl {=}
- \iow_term:x {
- \g__filehook_nesting_prefix_tl \space
- ( LEVEL~ \int_use:N \g__filehook_nesting_level_int \space START )~
- \CurrentFile ^^J
- }
-}
-\AddToHookNext{file/after}{
- \AddToHook{file/after}{
- \iow_term:x {
- \g__filehook_nesting_prefix_tl \space
- ( LEVEL~ \int_use:N \g__filehook_nesting_level_int \space STOP )~
- \CurrentFile ^^J
- }
- \int_gdecr:N \g__filehook_nesting_level_int
- \tl_gset:Nx \g__filehook_nesting_prefix_tl
- {\exp_after:wN \use_none:n \g__filehook_nesting_prefix_tl}
+\int_gset:Nn \g__filehook_nesting_level_int
+ { ( \tl_count:N \@currnamestack ) / 3 - 1 }
+\cs_new_protected:Npn \__filehook_log_file_record:n #1
+ {
+ \str_if_eq:nnT {#1} {START} { \int_gincr:N \g__filehook_nesting_level_int }
+ \iow_term:x
+ {
+ \prg_replicate:nn { \g__filehook_nesting_level_int } { = } ~
+ ( LEVEL ~ \int_use:N \g__filehook_nesting_level_int \c_space_tl #1 ) ~
+ \CurrentFileUsed
+ \str_if_eq:NNF \CurrentFileUsed \CurrentFile
+ { ~ ( \CurrentFile \space requested ) }
+ \iow_newline:
+ }
+ \str_if_eq:nnT {#1} {STOP} { \int_gdecr:N \g__filehook_nesting_level_int }
}
-}
-
-
+\AddToHook{file/before}{ \__filehook_log_file_record:n { START } }
+\AddToHookNext{file/after}
+ { \AddToHook{file/after}{ \__filehook_log_file_record:n { STOP } } }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
diff --git a/Master/texmf-dist/tex/latex-dev/base/t1enc.def b/Master/texmf-dist/tex/latex-dev/base/t1enc.def
index 7ec2d48d443..56d77bc1a8b 100644
--- a/Master/texmf-dist/tex/latex-dev/base/t1enc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/t1enc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{t1enc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\DeclareFontEncoding{T1}{}{}
\DeclareTextAccent{\`}{T1}{0}
diff --git a/Master/texmf-dist/tex/latex-dev/base/tuenc.def b/Master/texmf-dist/tex/latex-dev/base/tuenc.def
index c7e3b1fded1..a9f8a27eb35 100644
--- a/Master/texmf-dist/tex/latex-dev/base/tuenc.def
+++ b/Master/texmf-dist/tex/latex-dev/base/tuenc.def
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{tuenc.def}
- [2020/04/22 v2.0p
+ [2020/08/10 v2.0s
Standard LaTeX file]
\providecommand\UnicodeEncodingName{TU}
\begingroup\expandafter\expandafter\expandafter\endgroup
@@ -75,7 +75,6 @@
}
\else
\newluafunction\@remove@tlig@@@@
- \def\now@and@everyjob#1{\toksapp\everyjob{#1}#1}
\now@and@everyjob{\directlua{
local rawchar_func = token.create'@remove@tlig@@@@'.index
local forcehmode = tex.forcehmode
diff --git a/Master/texmf-dist/tex/latex-dev/tools/varioref.sty b/Master/texmf-dist/tex/latex-dev/tools/varioref.sty
index 57c3227b5b3..657cf053a45 100644
--- a/Master/texmf-dist/tex/latex-dev/tools/varioref.sty
+++ b/Master/texmf-dist/tex/latex-dev/tools/varioref.sty
@@ -52,7 +52,7 @@
\DeclareCurrentRelease{}{2019-10-01}
\ProvidesPackage{varioref}
- [2020/07/20 v1.6d package for extended references (FMi)]
+ [2020/08/11 v1.6e package for extended references (FMi)]
%%
@@ -108,6 +108,9 @@
\def\reftextfaraway#1{op bladsy~\pageref{#1}}%
\def\reftextpagerange#1#2{op bladsye~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} tot~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{american}
@@ -121,6 +124,9 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{arabic}
@@ -133,6 +139,9 @@
\def\reftextfaraway#1{بالصفحة رقم~\pageref{#1}}%
\def\reftextpagerange#1#2{بالصفحات~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} حتى~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{austrian}
@@ -157,6 +166,9 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{basque}
@@ -169,6 +181,9 @@
\def\reftextfaraway#1{~\pageref{#1}. orrialdean}%
\def\reftextpagerange#1#2{~\pageref{#1}--\pageref{#2} orrialdeetan}%
\def\reftextlabelrange#1#2{\ref{#1}.etik \ref{#2}.eraino}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{bahasam}
@@ -181,6 +196,9 @@
\def\reftextfaraway#1{pada muka surat~\pageref{#1}}%
\def\reftextpagerange#1#2{pada muka surat~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{brazil}
@@ -196,6 +214,9 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{breton}
@@ -212,6 +233,9 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{bulgarian}%
@@ -242,6 +266,9 @@
\cyrs\cyrt\cyrr\cyra\cyrn\cyri\cyrc\cyri
~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{catalan}
@@ -255,6 +282,9 @@
\def\reftextpagerange#1#2{a les
p\`agines~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{croatian}
@@ -267,6 +297,9 @@
\def\reftextfaraway#1{na stranici~\pageref{#1}}%
\def\reftextpagerange#1#2{na stranicama~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{czech}
@@ -280,6 +313,9 @@
\def\reftextfaraway#1{na stran\v{e}~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}\--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v{z}~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{danish}
@@ -296,6 +332,9 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{dutch}
@@ -313,6 +352,9 @@
\def\reftextfaraway#1{op \refpagename~\pageref{#1}}%
\def\reftextpagerange#1#2{op pagina's~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{english}
@@ -326,6 +368,9 @@
\def\reftextfaraway#1{on page~\pageref{#1}}%
\def\reftextpagerange#1#2{on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{esperanto}
@@ -341,6 +386,9 @@
\def\reftextfaraway#1{en pa\^go~\pageref{#1}}%
\def\reftextpagerange#1#2{en pa\^goj~\pageref{#1} \^gis \pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \^gis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{finnish}
@@ -355,6 +403,9 @@
\def\reftextfaraway#1{sivulla~\pageref{#1}}%
\def\reftextpagerange#1#2{sivuilla~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1}--\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{french}
@@ -368,6 +419,9 @@
\def\reftextfaraway#1{page~\pageref{#1}}%
\def\reftextpagerange#1#2{pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} \`a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{galician}
@@ -381,6 +435,9 @@
\def\reftextpagerange#1#2{%
nas p\'axinas~\pageref{#1}-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{german}
@@ -393,6 +450,9 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{ngerman}
@@ -405,6 +465,9 @@
\def\reftextfaraway#1{auf Seite~\pageref{#1}}%
\def\reftextpagerange#1#2{auf den Seiten~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} bis~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{greek}
@@ -420,6 +483,9 @@
\def\reftextpagerange#1#2{stis sel'ides\nobreakspace
\pageref{#1}---\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} ws\nobreakspace\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{icelandic}
@@ -436,6 +502,9 @@
\def\reftextfaraway#1{\'{a} s\'{i}{\dh}u~\pageref{#1}}%
\def\reftextpagerange#1#2{\'{a} s\'{i}{\dh}um~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{italian}
@@ -451,20 +520,26 @@
\def\reftextfaraway#1{a pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{nelle pagine~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{da~\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{japanese}
{\vref@addto\extrasjapanese{%
- \def\reftextfaceafter {\reftextvario{見開き}{次}頁}%
- \def\reftextfacebefore{\reftextvario{見開き}{前}頁}%
- \def\reftextafter {\reftextvario{直後の}{次}頁}%
- \def\reftextbefore {\reftextvario{直前の}{前}頁}%
- \def\reftextcurrent {\reftextvario{この}{現}頁}%
- \def\reftextfaraway#1{\pageref{#1}頁}%
- \def\reftextpagerange#1#2{\pageref{#1}頁から\pageref{#2}頁}%
+ \def\reftextfaceafter {\reftextvario{見開き}{次}ページ}%
+ \def\reftextfacebefore{\reftextvario{見開き}{前}ページ}%
+ \def\reftextafter {\reftextvario{直後の}{次}ページ}%
+ \def\reftextbefore {\reftextvario{直前の}{前}ページ}%
+ \def\reftextcurrent {\reftextvario{この}{現}ページ}%
+ \def\reftextfaraway#1{\pageref{#1}ページ}%
+ \def\reftextpagerange#1#2{\pageref{#1}から\pageref{#2}ページ}%
\def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}%
- \def\vrefrangeformat#1#2#3{\vpagerefrange[{#1}]{#2}{#3}の%
- \reftextlabelrange{#2}{#3}}%
+ \def\vrefformat#1#2{\ref{#2}(\vpageref[#1]{#2})}%
+ \def\Vrefformat#1#2{\Ref{#2}(\vpageref[#1]{#2})}%
+ \def\fullrefformat#1{\ref{#1}(\reftextfaraway{#1})}%
+ \def\vrefrangeformat#1#2#3{\reftextlabelrange{#2}{#3}%
+ (\vpagerefrange[{#1}]{#2}{#3})}%
}}
\DeclareOption{magyar}
{\vref@addto\extrasmagyar{%
@@ -480,6 +555,9 @@
on pages~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\vref@stringwarning\reflabelpagerange
\ref{#1} to~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}%
\AtBeginDocument{\providecommand\aza[1]{a/az%
@@ -502,6 +580,9 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{nynorsk}
@@ -514,6 +595,9 @@
\def\reftextfaraway#1{p\aa{} side~\pageref{#1}}%
\def\reftextpagerange#1#2{p\aa{} side~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} til~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{polish}
@@ -529,6 +613,9 @@
\def\reftextfaraway#1{na stronie~\pageref{#1}}%
\def\reftextpagerange#1#2{na stronach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{portuges}
@@ -543,6 +630,9 @@
\def\reftextfaraway#1{na p\'agina~\pageref{#1}}%
\def\reftextpagerange#1#2{nas p\'aginas~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{romanian}
@@ -557,6 +647,9 @@
\def\reftextfaraway#1{pe pagina~\pageref{#1}}%
\def\reftextpagerange#1#2{pe paginile~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} la~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{russian}
@@ -582,6 +675,9 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyrr\cyra\cyrn
\cyri\cyrc\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrs~\ref{#1}\ \cyrp\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{slovak}
@@ -598,6 +694,9 @@
\def\reftextfaraway#1{na strane~\pageref{#1}}%
\def\reftextpagerange#1#2{na stran\'ach~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a\v z~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{slovene}
@@ -610,6 +709,9 @@
\def\reftextfaraway#1{na strani~\pageref{#1}}%
\def\reftextpagerange#1#2{na straneh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{od~\ref{#1} do~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{spanish}
@@ -623,6 +725,9 @@
\def\reftextpagerange#1#2{en las p\'aginas~\pageref{#1}%
-\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} a~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{swedish}
@@ -639,6 +744,9 @@
\def\reftextpagerange#1#2{p\aa\
sidorna~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\ref{#1} till~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{turkish}
@@ -676,6 +784,9 @@
\def\reftextpagerange#1#2{\cyrn\cyra\ \cyrs\cyrt\cyro\cyrr\cyrii
\cyrn\cyrk\cyra\cyrh~\pageref{#1}--\pageref{#2}}%
\def\reftextlabelrange#1#2{\cyrz~\ref{#1}\ \cyrd\cyro~\ref{#2}}%
+ \let\vrefformat\vrefdefaultformat
+ \let\Vrefformat\Vrefdefaultformat
+ \let\fullrefformat\fullrefdefaultformat
\let\vrefrangeformat\vrefrangedefaultformat
}}
\DeclareOption{francais}{%
@@ -690,7 +801,6 @@
\DeclareOption{space} {\@vrefhandlespacetrue}
\DeclareOption{nospace}{\@vrefhandlespacefalse}
\ExecuteOptions{english,final,space}
-\ProcessOptions*
\newcounter{vrcnt}
\DeclareRobustCommand\vpageref{\@ifstar
{\let\vref@maybe@space\@empty\vp@gerefstar}%
@@ -797,9 +907,11 @@
\DeclareRobustCommand\vref{\@ifstar
{\vref@star}{\vr@f}}
-\newcommand\vref@star[2][]{%
+\newcommand\vref@star[1][]{\vrefformat{#1}}
+\def\vrefdefaultformat#1#2{%
\ref{#2}
\vpageref[#1]{#2}}
+\let\vrefformat\vrefdefaultformat
\def\vr@f{%
\leavevmode
@@ -815,7 +927,10 @@
\expandafter\@firstoftwo \else
\expandafter\@secondoftwo \fi}
\def\reftextvario#1#2{\ifodd\c@vrcnt #1\else#2\fi}
-\def\fullref#1{\ref{#1} \reftextfaraway{#1}}
+\newcommand\fullref{\fullrefformat}
+\def\fullrefdefaultformat#1{%
+ \ref{#1} \reftextfaraway{#1}}
+\let\fullrefformat\fullrefdefaultformat
\def\vref@pagenum#1#2{%
\@ifundefined{r@#2}{\@namedef{r@#2}{{??}{??}}}{}%
\expandafter\expandafter\expandafter\vref@@pagenum
@@ -856,9 +971,11 @@
\DeclareRobustCommand\Vref{\@ifstar
{\Vref@star}%
{\Vr@f}}
-\newcommand\Vref@star[2][]{%
+\newcommand\Vref@star[1][]{\Vrefformat{#1}}
+\def\Vrefdefaultformat#1#2{%
\Ref{#2}
\vpageref[#1]{#2}}
+\let\Vrefformat\Vrefdefaultformat
\def\Vr@f{%
\if@vrefhandlespace
\unskip \vref@space
@@ -922,6 +1039,7 @@
\protected@edef\@currentlabel
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}
\fi
+\ProcessOptions*
\endinput
%%
%% End of file `varioref.sty'.
diff --git a/Master/texmf-dist/tex/latex-dev/tools/xr.sty b/Master/texmf-dist/tex/latex-dev/tools/xr.sty
index 41aba6c624b..3f448c9f21a 100644
--- a/Master/texmf-dist/tex/latex-dev/tools/xr.sty
+++ b/Master/texmf-dist/tex/latex-dev/tools/xr.sty
@@ -44,7 +44,7 @@
\def\XR@[#1]#2{{%
\makeatletter
\def\XR@prefix{#1}%
- \set@curr@file@trim@spaces{#2}%
+ \set@curr@file{#2}%
\expandafter\XR@next\@curr@file.aux\relax\\}}
\def\XR@next#1\relax#2\\{%
\edef\XR@list{#2}%