summaryrefslogtreecommitdiff
path: root/macros/latex/required
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-06-09 03:01:00 +0000
committerNorbert Preining <norbert@preining.info>2022-06-09 03:01:00 +0000
commit16559ce13a74c7a182875559b379cac00b07efda (patch)
tree6ee63e6aadfabf9a7334e6667fa32646fd812667 /macros/latex/required
parentb3aac3ae7b628835121d1f485fd49998308170e7 (diff)
CTAN sync 202206090300
Diffstat (limited to 'macros/latex/required')
-rw-r--r--macros/latex/required/amsmath/README.md5
-rw-r--r--macros/latex/required/amsmath/amsbsy.dtx2
-rw-r--r--macros/latex/required/amsmath/amsbsy.ins2
-rw-r--r--macros/latex/required/amsmath/amsbsy.pdfbin173746 -> 174944 bytes
-rw-r--r--macros/latex/required/amsmath/amscd.dtx4
-rw-r--r--macros/latex/required/amsmath/amscd.ins4
-rw-r--r--macros/latex/required/amsmath/amscd.pdfbin178672 -> 179945 bytes
-rw-r--r--macros/latex/required/amsmath/amsgen.dtx4
-rw-r--r--macros/latex/required/amsmath/amsgen.ins2
-rw-r--r--macros/latex/required/amsmath/amsgen.pdfbin176740 -> 178187 bytes
-rw-r--r--macros/latex/required/amsmath/amsldoc.pdfbin508199 -> 508210 bytes
-rw-r--r--macros/latex/required/amsmath/amsldoc.tex2
-rw-r--r--macros/latex/required/amsmath/amsmath.dtx155
-rw-r--r--macros/latex/required/amsmath/amsmath.ins4
-rw-r--r--macros/latex/required/amsmath/amsmath.pdfbin399735 -> 419913 bytes
-rw-r--r--macros/latex/required/amsmath/amsopn.dtx96
-rw-r--r--macros/latex/required/amsmath/amsopn.ins4
-rw-r--r--macros/latex/required/amsmath/amsopn.pdfbin138783 -> 140095 bytes
-rw-r--r--macros/latex/required/amsmath/amstext.dtx4
-rw-r--r--macros/latex/required/amsmath/amstext.ins4
-rw-r--r--macros/latex/required/amsmath/amstext.pdfbin215810 -> 217498 bytes
-rw-r--r--macros/latex/required/amsmath/amsxtra.dtx4
-rw-r--r--macros/latex/required/amsmath/amsxtra.ins4
-rw-r--r--macros/latex/required/amsmath/amsxtra.pdfbin112556 -> 113561 bytes
-rw-r--r--macros/latex/required/amsmath/changes.txt29
-rw-r--r--macros/latex/required/amsmath/subeqn.pdfbin109737 -> 109731 bytes
-rw-r--r--macros/latex/required/amsmath/technote.pdfbin145610 -> 147462 bytes
-rw-r--r--macros/latex/required/amsmath/testmath.pdfbin454662 -> 454511 bytes
-rw-r--r--macros/latex/required/firstaid/changes.txt9
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx61
-rw-r--r--macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdfbin238410 -> 256609 bytes
-rw-r--r--macros/latex/required/graphics/README.md4
-rw-r--r--macros/latex/required/graphics/changes.txt20
-rw-r--r--macros/latex/required/graphics/color.dtx13
-rw-r--r--macros/latex/required/graphics/color.pdfbin208054 -> 212223 bytes
-rw-r--r--macros/latex/required/graphics/drivers.dtx4
-rw-r--r--macros/latex/required/graphics/drivers.pdfbin286458 -> 286459 bytes
-rw-r--r--macros/latex/required/graphics/epsfig.dtx4
-rw-r--r--macros/latex/required/graphics/epsfig.pdfbin160073 -> 159997 bytes
-rw-r--r--macros/latex/required/graphics/graphics.dtx57
-rw-r--r--macros/latex/required/graphics/graphics.ins2
-rw-r--r--macros/latex/required/graphics/graphics.pdfbin303029 -> 303464 bytes
-rw-r--r--macros/latex/required/graphics/graphicx.dtx4
-rw-r--r--macros/latex/required/graphics/graphicx.pdfbin240629 -> 240623 bytes
-rw-r--r--macros/latex/required/graphics/grfguide.pdfbin330070 -> 330978 bytes
-rw-r--r--macros/latex/required/graphics/grfguide.tex17
-rw-r--r--macros/latex/required/graphics/keyval.dtx8
-rw-r--r--macros/latex/required/graphics/keyval.pdfbin239821 -> 239589 bytes
-rw-r--r--macros/latex/required/graphics/lscape.dtx4
-rw-r--r--macros/latex/required/graphics/lscape.pdfbin155981 -> 155986 bytes
-rw-r--r--macros/latex/required/graphics/mathcolor.dtx431
-rw-r--r--macros/latex/required/graphics/mathcolor.pdfbin0 -> 475986 bytes
-rw-r--r--macros/latex/required/graphics/rotating.dtx4
-rw-r--r--macros/latex/required/graphics/rotating.pdfbin269553 -> 278253 bytes
-rw-r--r--macros/latex/required/graphics/rotex.pdfbin172230 -> 172227 bytes
-rw-r--r--macros/latex/required/graphics/trig.dtx4
-rw-r--r--macros/latex/required/graphics/trig.pdfbin199269 -> 199266 bytes
-rw-r--r--macros/latex/required/latex-lab/README.md42
-rw-r--r--macros/latex/required/latex-lab/changes.txt27
-rw-r--r--macros/latex/required/latex-lab/documentmetadata-support-code.pdfbin0 -> 512020 bytes
-rw-r--r--macros/latex/required/latex-lab/documentmetadata-support-code.tex4
-rw-r--r--macros/latex/required/latex-lab/documentmetadata-support-doc.pdfbin0 -> 375907 bytes
-rw-r--r--macros/latex/required/latex-lab/documentmetadata-support-doc.tex6
-rw-r--r--macros/latex/required/latex-lab/documentmetadata-support.dtx418
-rw-r--r--macros/latex/required/latex-lab/latex-lab-footnotes.dtx1822
-rw-r--r--macros/latex/required/latex-lab/latex-lab-footnotes.pdfbin0 -> 614594 bytes
-rw-r--r--macros/latex/required/latex-lab/latex-lab-new-or.dtx545
-rw-r--r--macros/latex/required/latex-lab/latex-lab-new-or.pdfbin0 -> 529091 bytes
-rw-r--r--macros/latex/required/latex-lab/latex-lab-testphase.dtx84
-rw-r--r--macros/latex/required/latex-lab/latex-lab-testphase.pdfbin0 -> 290879 bytes
-rw-r--r--macros/latex/required/latex-lab/latex-lab.ins82
-rw-r--r--macros/latex/required/latex-lab/usage-of-@footnotemark.txt186
-rw-r--r--macros/latex/required/latex-lab/usage-of-@footnotetext.txt842
-rw-r--r--macros/latex/required/latex-lab/usage-of-kern-kern.txt80
-rw-r--r--macros/latex/required/tools/README.md4
-rw-r--r--macros/latex/required/tools/afterpage.dtx4
-rw-r--r--macros/latex/required/tools/afterpage.ins4
-rw-r--r--macros/latex/required/tools/afterpage.pdfbin205344 -> 197738 bytes
-rw-r--r--macros/latex/required/tools/array.dtx16
-rw-r--r--macros/latex/required/tools/array.pdfbin517114 -> 516458 bytes
-rw-r--r--macros/latex/required/tools/bm.dtx13
-rw-r--r--macros/latex/required/tools/bm.ins4
-rw-r--r--macros/latex/required/tools/bm.pdfbin331424 -> 323432 bytes
-rw-r--r--macros/latex/required/tools/calc.dtx4
-rw-r--r--macros/latex/required/tools/calc.pdfbin370414 -> 370657 bytes
-rw-r--r--macros/latex/required/tools/changes.txt29
-rw-r--r--macros/latex/required/tools/dcolumn.dtx4
-rw-r--r--macros/latex/required/tools/dcolumn.pdfbin220689 -> 220834 bytes
-rw-r--r--macros/latex/required/tools/delarray.dtx4
-rw-r--r--macros/latex/required/tools/delarray.pdfbin198647 -> 191064 bytes
-rw-r--r--macros/latex/required/tools/enumerate.dtx4
-rw-r--r--macros/latex/required/tools/enumerate.pdfbin215355 -> 215498 bytes
-rw-r--r--macros/latex/required/tools/fileerr.dtx4
-rw-r--r--macros/latex/required/tools/fileerr.pdfbin195578 -> 187495 bytes
-rw-r--r--macros/latex/required/tools/fontsmpl.dtx4
-rw-r--r--macros/latex/required/tools/fontsmpl.pdfbin154034 -> 146446 bytes
-rw-r--r--macros/latex/required/tools/ftnright.dtx4
-rw-r--r--macros/latex/required/tools/ftnright.pdfbin370277 -> 386995 bytes
-rw-r--r--macros/latex/required/tools/hhline.dtx4
-rw-r--r--macros/latex/required/tools/hhline.pdfbin189538 -> 189679 bytes
-rw-r--r--macros/latex/required/tools/indentfirst.dtx4
-rw-r--r--macros/latex/required/tools/indentfirst.pdfbin157803 -> 157954 bytes
-rw-r--r--macros/latex/required/tools/layout.dtx4
-rw-r--r--macros/latex/required/tools/layout.pdfbin267761 -> 259969 bytes
-rw-r--r--macros/latex/required/tools/longtable.dtx4
-rw-r--r--macros/latex/required/tools/longtable.ins4
-rw-r--r--macros/latex/required/tools/longtable.pdfbin382155 -> 391313 bytes
-rw-r--r--macros/latex/required/tools/multicol-2019-10-01.sty1105
-rw-r--r--macros/latex/required/tools/multicol.dtx14
-rw-r--r--macros/latex/required/tools/multicol.ins4
-rw-r--r--macros/latex/required/tools/multicol.pdfbin518295 -> 521223 bytes
-rw-r--r--macros/latex/required/tools/rawfonts.dtx4
-rw-r--r--macros/latex/required/tools/rawfonts.pdfbin146534 -> 138963 bytes
-rw-r--r--macros/latex/required/tools/shellesc.dtx2
-rw-r--r--macros/latex/required/tools/shellesc.pdfbin183532 -> 175929 bytes
-rw-r--r--macros/latex/required/tools/showkeys-2014-10-28.sty272
-rw-r--r--macros/latex/required/tools/showkeys.dtx52
-rw-r--r--macros/latex/required/tools/showkeys.pdfbin260624 -> 251782 bytes
-rw-r--r--macros/latex/required/tools/somedefs.dtx4
-rw-r--r--macros/latex/required/tools/somedefs.pdfbin175169 -> 167572 bytes
-rw-r--r--macros/latex/required/tools/tabularx.dtx4
-rw-r--r--macros/latex/required/tools/tabularx.ins4
-rw-r--r--macros/latex/required/tools/tabularx.pdfbin278041 -> 287073 bytes
-rw-r--r--macros/latex/required/tools/theorem.dtx4
-rw-r--r--macros/latex/required/tools/theorem.pdfbin351794 -> 351471 bytes
-rw-r--r--macros/latex/required/tools/tools-overview.pdfbin73674 -> 73672 bytes
-rw-r--r--macros/latex/required/tools/tools-overview.tex2
-rw-r--r--macros/latex/required/tools/tools.ins4
-rw-r--r--macros/latex/required/tools/trace.dtx4
-rw-r--r--macros/latex/required/tools/trace.pdfbin229713 -> 222076 bytes
-rw-r--r--macros/latex/required/tools/varioref.dtx54
-rw-r--r--macros/latex/required/tools/varioref.ins4
-rw-r--r--macros/latex/required/tools/varioref.pdfbin383524 -> 398985 bytes
-rw-r--r--macros/latex/required/tools/verbatim.dtx4
-rw-r--r--macros/latex/required/tools/verbatim.pdfbin330815 -> 330963 bytes
-rw-r--r--macros/latex/required/tools/xr.dtx4
-rw-r--r--macros/latex/required/tools/xr.pdfbin177595 -> 169986 bytes
-rw-r--r--macros/latex/required/tools/xspace.dtx4
-rw-r--r--macros/latex/required/tools/xspace.pdfbin256897 -> 257018 bytes
139 files changed, 6478 insertions, 306 deletions
diff --git a/macros/latex/required/amsmath/README.md b/macros/latex/required/amsmath/README.md
index f7c700994c..1bc1702484 100644
--- a/macros/latex/required/amsmath/README.md
+++ b/macros/latex/required/amsmath/README.md
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2021-11-15
+Release 2022-06-01
Overview
--------
@@ -77,4 +77,5 @@ version 1.3c or later.
-----
<p>Copyright (C) 2001-2004, 2007, 2008, 2010, 2011, 2013 American Mathematical Society. <br />
-<p>Copyright (C) 2016-2021 The LaTeX Project and American Mathematical Society. <br />
+<p>Copyright (C) 2016-2022 The LaTeX Project and American Mathematical Society. <br />
+
diff --git a/macros/latex/required/amsmath/amsbsy.dtx b/macros/latex/required/amsmath/amsbsy.dtx
index 8557c6534a..d94bf9a72f 100644
--- a/macros/latex/required/amsmath/amsbsy.dtx
+++ b/macros/latex/required/amsmath/amsbsy.dtx
@@ -81,7 +81,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \[
% \pmb{\infty} = \boldsymbol{\infty} \quad ?
% \]
-% \StopEventually{}
+% \MaybeStop{}
%
% Standard package info.
% \begin{macrocode}
diff --git a/macros/latex/required/amsmath/amsbsy.ins b/macros/latex/required/amsmath/amsbsy.ins
index 9194608622..c35a72dad6 100644
--- a/macros/latex/required/amsmath/amsbsy.ins
+++ b/macros/latex/required/amsmath/amsbsy.ins
@@ -26,7 +26,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsbsy.pdf b/macros/latex/required/amsmath/amsbsy.pdf
index 50882b2530..e85825b6f9 100644
--- a/macros/latex/required/amsmath/amsbsy.pdf
+++ b/macros/latex/required/amsmath/amsbsy.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amscd.dtx b/macros/latex/required/amsmath/amscd.dtx
index f3528dd7c1..1ed5be6b67 100644
--- a/macros/latex/required/amsmath/amscd.dtx
+++ b/macros/latex/required/amsmath/amscd.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -97,7 +97,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{CD}\end{equation}
% \end{verbatim}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% Standard package info.
% \begin{macrocode}
diff --git a/macros/latex/required/amsmath/amscd.ins b/macros/latex/required/amsmath/amscd.ins
index 30b2f28177..5ecf051583 100644
--- a/macros/latex/required/amsmath/amscd.ins
+++ b/macros/latex/required/amsmath/amscd.ins
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2010 American Mathematical Society.
-%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amscd.pdf b/macros/latex/required/amsmath/amscd.pdf
index f1182d6c20..c0ecd2961b 100644
--- a/macros/latex/required/amsmath/amscd.pdf
+++ b/macros/latex/required/amsmath/amscd.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsgen.dtx b/macros/latex/required/amsmath/amsgen.dtx
index 10ac58b18e..0493940071 100644
--- a/macros/latex/required/amsmath/amsgen.dtx
+++ b/macros/latex/required/amsmath/amsgen.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -49,7 +49,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% distribution. Some of these might eventually make it into the \latex/
% kernel.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% Standard package info.
% Using \cs{ProvidesFile} rather than \cs{ProvidesPackage} because
diff --git a/macros/latex/required/amsmath/amsgen.ins b/macros/latex/required/amsmath/amsgen.ins
index aacb6e0c39..7d845e61cf 100644
--- a/macros/latex/required/amsmath/amsgen.ins
+++ b/macros/latex/required/amsmath/amsgen.ins
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsgen.pdf b/macros/latex/required/amsmath/amsgen.pdf
index 7f7d05c81f..014feb8d2a 100644
--- a/macros/latex/required/amsmath/amsgen.pdf
+++ b/macros/latex/required/amsmath/amsgen.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsldoc.pdf b/macros/latex/required/amsmath/amsldoc.pdf
index b3cbac1118..dd7061eac5 100644
--- a/macros/latex/required/amsmath/amsldoc.pdf
+++ b/macros/latex/required/amsmath/amsldoc.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsldoc.tex b/macros/latex/required/amsmath/amsldoc.tex
index 97294772e7..4a8230e39f 100644
--- a/macros/latex/required/amsmath/amsldoc.tex
+++ b/macros/latex/required/amsmath/amsldoc.tex
@@ -1,6 +1,6 @@
%
% Copyright (C) 1995, 2000, 2013 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsmath.dtx b/macros/latex/required/amsmath/amsmath.dtx
index a5cf333e79..34d17b65f0 100644
--- a/macros/latex/required/amsmath/amsmath.dtx
+++ b/macros/latex/required/amsmath/amsmath.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 2000, 2013 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -68,7 +68,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% provided here is found in the AMSmath Users' Guide,
% \fn{amsldoc.tex}.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% Standard file identification.
% \begin{macrocode}
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2021/10/15 v2.17l AMS math features]
+\ProvidesPackage{amsmath}[2022/04/08 v2.17n AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -615,7 +615,8 @@ Foreign command \@backslashchar#1;\MessageBreak
% abbreviations for some commonly needed mathstyle overrides. To
% conserve csnames we avoid making \cn{dfrac} and \cn{tfrac} robust
% (\cn{genfrac} is itself robust).
-% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)}
+% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)}
+% \changes{v2.17n}{2022/04/08}{Make fraction commands robust (gh/123)}
% \begin{macrocode}
%
\ifx\directlua\@undefined
@@ -623,8 +624,8 @@ Foreign command \@backslashchar#1;\MessageBreak
\else
\DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}}
\fi
-\newcommand{\dfrac}{\genfrac{}{}{}0}
-\newcommand{\tfrac}{\genfrac{}{}{}1}
+\DeclareRobustCommand{\dfrac}{\genfrac{}{}{}0}
+\DeclareRobustCommand{\tfrac}{\genfrac{}{}{}1}
% \end{macrocode}
% The \cn{binom} command for binomial notation works like \cn{frac}
% and has similar variants. Note that we do not use \cs{z@} in
@@ -632,10 +633,11 @@ Foreign command \@backslashchar#1;\MessageBreak
% like \cn{binom}, and so the \cs{z@} with the potentially
% problematic \qc{\@} character would become visible when writing one
% of those commands to a \fn{.toc} file.
+% \changes{v2.17n}{2022/04/08}{Make binom commands robust (gh/123)}
% \begin{macrocode}
\DeclareRobustCommand{\binom}{\genfrac()\z@{}}
-\newcommand{\dbinom}{\genfrac(){0pt}0}
-\newcommand{\tbinom}{\genfrac(){0pt}1}
+\DeclareRobustCommand{\dbinom}{\genfrac(){0pt}0}
+\DeclareRobustCommand{\tbinom}{\genfrac(){0pt}1}
% \end{macrocode}
%
% \begin{macro}{\genfrac}
@@ -938,8 +940,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% an equation or piece of an equation. (Not including the equation
% number.) This isn't trivial for end-users to do it properly
% with \cs{fbox} so we provide a command for them.
+% \changes{v2.17n}{2022/04/08}{Make \cs{boxed} command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}}
+\DeclareRobustCommand{\boxed}[1]{\fbox{\m@th$\displaystyle#1$}}
% \end{macrocode}
% \end{macro}
%
@@ -980,8 +983,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% small space on the left, larger space on the right. The \qc{\:}
% character by itself is treated as a \cs{mathrel} i.e. large, equal
% spacing on both sides.
+% \changes{v2.17n}{2022/04/08}{Make \cs{colon} command robust (gh/123)}
% \begin{macrocode}
-\renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
+\DeclareRobustCommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
\mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
% \end{macrocode}
% \end{macro}
@@ -1386,10 +1390,10 @@ Foreign command \@backslashchar#1;\MessageBreak
{{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}%
{{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}}
%
-\ams@newcommand{\iint}{\DOTSI\protect\MultiIntegral{2}}
-\ams@newcommand{\iiint}{\DOTSI\protect\MultiIntegral{3}}
-\ams@newcommand{\iiiint}{\DOTSI\protect\MultiIntegral{4}}
-\newcommand{\idotsint}{\DOTSI\protect\MultiIntegral{0}}
+\ams@newcommand{\iint}{\DOTSI\MultiIntegral{2}}
+\ams@newcommand{\iiint}{\DOTSI\MultiIntegral{3}}
+\ams@newcommand{\iiiint}{\DOTSI\MultiIntegral{4}}
+\newcommand{\idotsint}{\DOTSI\MultiIntegral{0}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1403,8 +1407,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% the left-hand space a bit to make the subscript visually centered.
%
% \verb'#1' is the multiplicity.
+% \changes{v2.17n}{2022/04/08}{Make \cs{MultiIntegral} command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\MultiIntegral}[1]{%
+\DeclareRobustCommand{\MultiIntegral}[1]{%
\edef\ints@c{\noexpand\intop
\ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi
\ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi
@@ -1582,11 +1587,12 @@ Foreign command \@backslashchar#1;\MessageBreak
% the \latex/ kernel; the macro |\n@space| is then superfluous (since
% it is only used once) and should be removed to avoid wasting hash
% table space unnecessarily.
+% \changes{v2.17n}{2022/04/08}{Make biggg commands robust (gh/123)}
% \begin{macrocode}
-\renewcommand{\big}{\bBigg@\@ne}
-\renewcommand{\Big}{\bBigg@{1.5}}
-\renewcommand{\bigg}{\bBigg@\tw@}
-\renewcommand{\Bigg}{\bBigg@{2.5}}
+\DeclareRobustCommand{\big}{\bBigg@\@ne}
+\DeclareRobustCommand{\Big}{\bBigg@{1.5}}
+\DeclareRobustCommand{\bigg}{\bBigg@\tw@}
+\DeclareRobustCommand{\Bigg}{\bBigg@{2.5}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -1666,6 +1672,17 @@ Foreign command \@backslashchar#1;\MessageBreak
{\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
\hbox{\,\normalfont....}\vss}}}}
% \end{macrocode}
+%
+% We make the commands robust only at the end of the preamble as
+% \pkg{amsmath} interacts with \pkg{stix} (which should also move
+% to robust commands).
+% \changes{v2.17n}{2022/04/08}{Make dddot commands robust (gh/123)}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \MakeRobust\dddot
+ \MakeRobust\ddddot
+ }
+% \end{macrocode}
% \end{macro}
% \end{macro}
%
@@ -2087,14 +2104,16 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\mod}
% The commands \cn{bmod}, \cn{pmod}, \cn{pod}, \cn{mod} aren't
% currently robust. [mjd, 1994/09/05]
+% Now they are
+% \changes{v2.17n}{2022/04/08}{Make mod commands robust (gh/123)}
% \begin{macrocode}
-\renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin
+\DeclareRobustCommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin
{\operator@font mod}\penalty900
\mkern5mu\nonscript\mskip-\medmuskip}
-\newcommand{\pod}[1]{\allowbreak
+\DeclareRobustCommand{\pod}[1]{\allowbreak
\if@display\mkern18mu\else\mkern8mu\fi(#1)}
-\renewcommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}}
-\newcommand{\mod}[1]{\allowbreak\if@display\mkern18mu
+\DeclareRobustCommand{\pmod}[1]{\pod{{\operator@font mod}\mkern6mu#1}}
+\DeclareRobustCommand{\mod}[1]{\allowbreak\if@display\mkern18mu
\else\mkern12mu\fi{\operator@font mod}\,\,#1}
% \end{macrocode}
% \end{macro}
@@ -2109,8 +2128,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% fraction rules to line up. The \cs{strut} keeps the numerator of
% a subsidiary cfrac from coming too close to the fraction rule above
% it.
+% \changes{v2.17n}{2022/04/08}{Make \cs{cfrac} command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\cfrac}[3][c]{{\displaystyle\frac{%
+\DeclareRobustCommand{\cfrac}[3][c]{{\displaystyle\frac{%
\strut\ifx r#1\hfill\fi#2\ifx l#1\hfill\fi}{#3}}%
\kern-\nulldelimiterspace}
% \end{macrocode}
@@ -2123,13 +2143,15 @@ Foreign command \@backslashchar#1;\MessageBreak
% naturally accept limits. \cs{binrel@@} uses information collected
% by \cs{binrel@} to make the resulting construction be of type
% mathrel or mathbin if the base symbol is either of those types.
+% \changes{v2.17n}{2022/04/08}{Make \cs{overset}, \cs{underset} and
+% \cs{overunderset} commands robust (gh/123)}
% \begin{macrocode}
-\newcommand{\overset}[2]{\binrel@{#2}%
+\DeclareRobustCommand{\overset}[2]{\binrel@{#2}%
\binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}
% \end{macrocode}
%
% \begin{macrocode}
-\newcommand{\underset}[2]{\binrel@{#2}%
+\DeclareRobustCommand{\underset}[2]{\binrel@{#2}%
\binrel@@{\mathop{\kern\z@#2}\limits_{#1}}}
% \end{macrocode}
% \end{macro}
@@ -2141,7 +2163,7 @@ Foreign command \@backslashchar#1;\MessageBreak
% something that is sometimes needed.
% \changes{v2.17c}{2019/04/01}{New command \cs{overunderset}}
% \begin{macrocode}
-\newcommand{\overunderset}[3]{\binrel@{#3}%
+\DeclareRobustCommand{\overunderset}[3]{\binrel@{#3}%
\binrel@@{\mathop{\kern\z@#3}\limits^{#1}_{#2}}}
% \end{macrocode}
% \end{macro}
@@ -2157,8 +2179,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% have to read and measure the top and bottom limits and use
% mathchoice to always get the right mathstyle for each piece,
% etc., etc.
+% \changes{v2.17n}{2022/04/08}{Make \cs{sideset} command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\sideset}[3]{%
+\DeclareRobustCommand{\sideset}[3]{%
\@mathmeasure\z@\displaystyle{#3}%
% \end{macrocode}
% Use a global box assignment here since the depth override is
@@ -2182,9 +2205,10 @@ Foreign command \@backslashchar#1;\MessageBreak
% denoting the part of the formula to be smashed.
% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{smash}
% if necessary (github/49)}
+% \changes{v2.17n}{2022/04/08}{Make \cs{smash} command robust (gh/123)}
% \begin{macrocode}
\ifx\leavevmode@ifvmode\@undefined
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
\def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}%
\edef\finsm@sh{\csname mb@#1\endcsname\z@\z@\box\z@}%
\ifmmode \@xp\mathpalette\@xp\mathsm@sh
@@ -2192,7 +2216,7 @@ Foreign command \@backslashchar#1;\MessageBreak
\fi
}
\else
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
\def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}%
\edef\finsm@sh{\csname mb@#1\endcsname\z@\z@ \leavevmode@ifvmode\box\z@}%
\ifmmode \@xp\mathpalette\@xp\mathsm@sh
@@ -2240,9 +2264,10 @@ Foreign command \@backslashchar#1;\MessageBreak
%
% \begin{macro}{\relbar}
% \begin{macro}{\Relbar}
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
% \begin{macrocode}
-\ams@def\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}}
-\ams@def\Relbar{\mathrel\std@equal}
+\ams@DeclareRobustCommand\relbar{\mathrel{\mathpalette\mathsm@sh\std@minus}}
+\ams@DeclareRobustCommand\Relbar{\mathrel\std@equal}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2272,6 +2297,17 @@ Foreign command \@backslashchar#1;\MessageBreak
\ams@newcommand{\overleftrightarrow}{%
\mathpalette{\overarrow@\leftrightarrowfill@}}
% \end{macrocode}
+% Again we delay making commands robut for \pkg{stix}.
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
+% \begin{macrocode}
+\AtBeginDocument{%
+ \expandafter\let\csname overleftarrow \endcsname\@undefined
+ \expandafter\let\csname overrightarrow \endcsname\@undefined
+ \MakeRobust\overrightarrow
+ \MakeRobust\overleftarrow
+ \MakeRobust\overleftrightarrow
+ }
+% \end{macrocode}
%
% \begin{macrocode}
\def\underarrow@#1#2#3{%
@@ -2285,8 +2321,19 @@ Foreign command \@backslashchar#1;\MessageBreak
\mathpalette{\underarrow@\leftrightarrowfill@}}
% \end{macrocode}
%
+%
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
% \begin{macrocode}
-%\newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}}
+\AtBeginDocument{%
+ \MakeRobust\underrightarrow
+ \MakeRobust\underleftarrow
+ \MakeRobust\underleftrightarrow
+ }
+% \end{macrocode}
+%
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
+% \begin{macrocode}
+%\DeclareRobustCommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}}
\def\ext@arrow#1#2#3#4#5#6#7{%
\mathrel{\mathop{%
% \end{macrocode}
@@ -2315,8 +2362,8 @@ Foreign command \@backslashchar#1;\MessageBreak
% sub/superscripts. These commands are robust because they take an
% optional argument.
% \begin{macrocode}
-\newcommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}}
-\newcommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xrightarrow}[2][]{\ext@arrow 0359\rightarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xleftarrow}[2][]{\ext@arrow 3095\leftarrowfill@{#1}{#2}}
% \end{macrocode}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2406,8 +2453,9 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\substack}
% The \cn{substack} command is just an abbreviation for the
% most common use of \env{subarray}.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\substack}[1]{\subarray{c}#1\endsubarray}
+\DeclareRobustCommand{\substack}[1]{\subarray{c}#1\endsubarray}
% \end{macrocode}
% \end{macro}
%
@@ -2630,8 +2678,9 @@ ill-advised in LaTeX.%
% numbered within sections. The \LaTeX{} kernel contains a similar command
% \cs{counterwithin} (with a slightly extended syntax) that can be used
% as a drop-in replacement for \cs{numberwithin}.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\numberwithin}[3][\arabic]{%
+\DeclareRobustCommand{\numberwithin}[3][\arabic]{%
\@ifundefined{c@#2}{\@nocounterr{#2}}{%
\@ifundefined{c@#3}{\@nocnterr{#3}}{%
\@addtoreset{#2}{#3}%
@@ -2645,8 +2694,9 @@ ill-advised in LaTeX.%
% To make references to equation numbers easier, we provide
% \cn{eqref}. We almost don't need \cn{textup}, except that
% \cs{tagform@} doesn't supply the italic correction.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
+\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
% \end{macrocode}
% \end{macro}
%
@@ -2685,8 +2735,9 @@ ill-advised in LaTeX.%
% The \cn{allowdisplaybreaks} command. Since this is intended for use
% outside displayed formulas (typically in the preamble), it does not
% need to use \cs{new@ifnextchar}.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\allowdisplaybreaks}[1][4]{%
+\DeclareRobustCommand{\allowdisplaybreaks}[1][4]{%
\interdisplaylinepenalty\getdsp@pen{#1}\relax
}
% \end{macrocode}
@@ -2709,8 +2760,9 @@ ill-advised in LaTeX.%
% \begin{macro}{\dspbrk@context}
% \begin{macro}{\nogood@displaybreak}
% For breaks in a certain row of a alignment.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
% \begin{macrocode}
-\newcommand{\displaybreak}{\new@ifnextchar[\dspbrk@{\dspbrk@[4]}}
+\DeclareRobustCommand{\displaybreak}{\new@ifnextchar[\dspbrk@{\dspbrk@[4]}}
\chardef\dspbrk@context=\sixt@@n
% \end{macrocode}
%
@@ -6130,15 +6182,16 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
% in his \fn{amstex.doc} Spivak indicates those commands should never
% be used on a first or last line. Perhaps better to leave the
% question open unless/until real-life examples turn up.
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trival)}
% \begin{macrocode}
\iftagsleft@
- \def\shoveright#1{%
+ \protected\def\shoveright#1{%
#1%
\hfilneg
\hskip\multlinegap
}
\else
- \def\shoveright#1{%
+ \protected\def\shoveright#1{%
#1%
\hfilneg
\iftag@
@@ -6153,12 +6206,14 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\fi
}
\fi
-
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trival)}
+% \begin{macrocode}
\if@fleqn
\def\shoveleft#1{#1}%
\else
\iftagsleft@
- \def\shoveleft#1{%
+ \protected\def\shoveleft#1{%
\setboxz@h{$\m@th\displaystyle{}#1$}%
\setbox\@ne\hbox{$\m@th\displaystyle#1$}%
\hfilneg
@@ -6173,17 +6228,23 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\hskip\multlinegap
\fi
\hskip.5\wd\@ne
- \hskip-.5\wdz@
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)}
+% \begin{macrocode}
+ \hskip-.5\wdz@ \relax
#1%
}
\else
- \def\shoveleft#1{%
+ \protected\def\shoveleft#1{%
\setboxz@h{$\m@th\displaystyle{}#1$}%
\setbox\@ne\hbox{$\m@th\displaystyle#1$}%
\hfilneg
\hskip\multlinegap
\hskip.5\wd\@ne
- \hskip-.5\wdz@
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)}
+% \begin{macrocode}
+ \hskip-.5\wdz@ \relax
#1%
}
\fi
diff --git a/macros/latex/required/amsmath/amsmath.ins b/macros/latex/required/amsmath/amsmath.ins
index 1bb73101bb..82876ffc5d 100644
--- a/macros/latex/required/amsmath/amsmath.ins
+++ b/macros/latex/required/amsmath/amsmath.ins
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2010 American Mathematical Society.
-%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999, 2000, 2013 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsmath.pdf b/macros/latex/required/amsmath/amsmath.pdf
index 1212097e79..806926ebc0 100644
--- a/macros/latex/required/amsmath/amsmath.pdf
+++ b/macros/latex/required/amsmath/amsmath.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsopn.dtx b/macros/latex/required/amsmath/amsopn.dtx
index 03df1a116b..110a5fa8be 100644
--- a/macros/latex/required/amsmath/amsopn.dtx
+++ b/macros/latex/required/amsmath/amsopn.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -52,13 +52,13 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% similar to the standard function names \cn{sin}, \cn{lim},
% \cn{max}, etc.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% Standard file identification.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must December 1994 or later
-\ProvidesPackage{amsopn}[2021/08/26 v2.02 operator names]
+\ProvidesPackage{amsopn}[2022/04/08 v2.04 operator names]
% \end{macrocode}
%
% What \cs{nolimits@} does is keep a \cn{limits} typed by the user
@@ -151,41 +151,42 @@ Bug reports can be opened (category \texttt{#1}) at\\%
\@onlypreamble\@declmathop
% \end{macrocode}
%
+% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)}
% \begin{macrocode}
-\def\arccos{\qopname\relax o{arccos}}
-\def\arcsin{\qopname\relax o{arcsin}}
-\def\arctan{\qopname\relax o{arctan}}
-\def\arg{\qopname\relax o{arg}}
-\def\cos{\qopname\relax o{cos}}
-\def\cosh{\qopname\relax o{cosh}}
-\def\cot{\qopname\relax o{cot}}
-\def\coth{\qopname\relax o{coth}}
-\def\csc{\qopname\relax o{csc}}
-\def\deg{\qopname\relax o{deg}}
-\def\det{\qopname\relax m{det}}
-\def\dim{\qopname\relax o{dim}}
-\def\exp{\qopname\relax o{exp}}
-\def\gcd{\qopname\relax m{gcd}}
-\def\hom{\qopname\relax o{hom}}
-\def\inf{\qopname\relax m{inf}}
-\def\injlim{\qopname\relax m{inj\,lim}}
-\def\ker{\qopname\relax o{ker}}
-\def\lg{\qopname\relax o{lg}}
-\def\lim{\qopname\relax m{lim}}
-\def\liminf{\qopname\relax m{lim\,inf}}
-\def\limsup{\qopname\relax m{lim\,sup}}
-\def\ln{\qopname\relax o{ln}}
-\def\log{\qopname\relax o{log}}
-\def\max{\qopname\relax m{max}}
-\def\min{\qopname\relax m{min}}
-\def\Pr{\qopname\relax m{Pr}}
-\def\projlim{\qopname\relax m{proj\,lim}}
-\def\sec{\qopname\relax o{sec}}
-\def\sin{\qopname\relax o{sin}}
-\def\sinh{\qopname\relax o{sinh}}
-\def\sup{\qopname\relax m{sup}}
-\def\tan{\qopname\relax o{tan}}
-\def\tanh{\qopname\relax o{tanh}}
+\protected\def\arccos{\qopname\relax o{arccos}}
+\protected\def\arcsin{\qopname\relax o{arcsin}}
+\protected\def\arctan{\qopname\relax o{arctan}}
+\protected\def\arg{\qopname\relax o{arg}}
+\protected\def\cos{\qopname\relax o{cos}}
+\protected\def\cosh{\qopname\relax o{cosh}}
+\protected\def\cot{\qopname\relax o{cot}}
+\protected\def\coth{\qopname\relax o{coth}}
+\protected\def\csc{\qopname\relax o{csc}}
+\protected\def\deg{\qopname\relax o{deg}}
+\protected\def\det{\qopname\relax m{det}}
+\protected\def\dim{\qopname\relax o{dim}}
+\protected\def\exp{\qopname\relax o{exp}}
+\protected\def\gcd{\qopname\relax m{gcd}}
+\protected\def\hom{\qopname\relax o{hom}}
+\protected\def\inf{\qopname\relax m{inf}}
+\protected\def\injlim{\qopname\relax m{inj\,lim}}
+\protected\def\ker{\qopname\relax o{ker}}
+\protected\def\lg{\qopname\relax o{lg}}
+\protected\def\lim{\qopname\relax m{lim}}
+\protected\def\liminf{\qopname\relax m{lim\,inf}}
+\protected\def\limsup{\qopname\relax m{lim\,sup}}
+\protected\def\ln{\qopname\relax o{ln}}
+\protected\def\log{\qopname\relax o{log}}
+\protected\def\max{\qopname\relax m{max}}
+\protected\def\min{\qopname\relax m{min}}
+\protected\def\Pr{\qopname\relax m{Pr}}
+\protected\def\projlim{\qopname\relax m{proj\,lim}}
+\protected\def\sec{\qopname\relax o{sec}}
+\protected\def\sin{\qopname\relax o{sin}}
+\protected\def\sinh{\qopname\relax o{sinh}}
+\protected\def\sup{\qopname\relax m{sup}}
+\protected\def\tan{\qopname\relax o{tan}}
+\protected\def\tanh{\qopname\relax o{tanh}}
% \end{macrocode}
%
% \begin{macro}{\operator@font}
@@ -198,8 +199,16 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% more accessible so that users can call this font for use in special
% constructs that are not ordinary operator names but conceptually
% related.
+%
+% \cs{operator@font} is also declared by the \LaTeX{} kernel (for
+% at least 14 years), thus defining it here effectively means
+% ``resetting it'' to the kernel value, which is counterproductive
+% in situations where the user (or a class) has altered its
+% definition and at a later point \pkg{amsopn} got added.
+% \changes{v2.03}{2022/01/20}{Do not reset \cs{operator@font} it is
+% already defined in the LaTeX kernel (gh/734)}
% \begin{macrocode}
-\def\operator@font{\mathgroup\symoperators}
+%\def\operator@font{\mathgroup\symoperators} % commented out in 2.03
\def\operatorfont{\operator@font}
% \end{macrocode}
% \end{macro}
@@ -218,23 +227,24 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% vertical spacing may not be optimal in script and scriptscript
% sizes. Unfortunately \tex/ provides no easy way to do math mode
% vertical spacing that varies with current math style like mu units.
+% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)}
% \begin{macrocode}
-\def\varlim@#1#2{%
+\protected\def\varlim@#1#2{%
\vtop{\m@th\ialign{##\cr
\hfil$#1\operator@font lim$\hfil\cr
\noalign{\nointerlineskip\kern1.5\ex@}#2\cr
\noalign{\nointerlineskip\kern-\ex@}\cr}}%
}
-\def\varinjlim{%
+\protected\def\varinjlim{%
\mathop{\mathpalette\varlim@{\rightarrowfill@\textstyle}}\nmlimits@
}
-\def\varprojlim{%
+\protected\def\varprojlim{%
\mathop{\mathpalette\varlim@{\leftarrowfill@\textstyle}}\nmlimits@
}
-\def\varliminf{\mathop{\mathpalette\varliminf@{}}\nmlimits@}
+\protected\def\varliminf{\mathop{\mathpalette\varliminf@{}}\nmlimits@}
\def\varliminf@#1{\@@underline{\vrule\@depth.2\ex@\@width\z@
\hbox{$#1\m@th\operator@font lim$}}}
-\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
+\protected\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
\def\varlimsup@#1{\@@overline{\hbox{$#1\m@th\operator@font lim$}}}
% \end{macrocode}
%
diff --git a/macros/latex/required/amsmath/amsopn.ins b/macros/latex/required/amsmath/amsopn.ins
index 72c649c340..8a57404c1e 100644
--- a/macros/latex/required/amsmath/amsopn.ins
+++ b/macros/latex/required/amsmath/amsopn.ins
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2010 American Mathematical Society.
-%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsopn.pdf b/macros/latex/required/amsmath/amsopn.pdf
index 0c6ae29bc2..0c1f60fd38 100644
--- a/macros/latex/required/amsmath/amsopn.pdf
+++ b/macros/latex/required/amsmath/amsopn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amstext.dtx b/macros/latex/required/amsmath/amstext.dtx
index 88cc837f03..7498040214 100644
--- a/macros/latex/required/amsmath/amstext.dtx
+++ b/macros/latex/required/amsmath/amstext.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -72,7 +72,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% macro called \cs{mathhexbox} so that commands like \cn{dag}
% or \cn{P} will change sizes if used in math subscripts.
%
-% \StopEventually{}
+% \MaybeStop{}
% Package information.
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
diff --git a/macros/latex/required/amsmath/amstext.ins b/macros/latex/required/amsmath/amstext.ins
index 5578a7e947..3ba3000eb8 100644
--- a/macros/latex/required/amsmath/amstext.ins
+++ b/macros/latex/required/amsmath/amstext.ins
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2010 American Mathematical Society.
-%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amstext.pdf b/macros/latex/required/amsmath/amstext.pdf
index afaa124a10..bc92eb847d 100644
--- a/macros/latex/required/amsmath/amstext.pdf
+++ b/macros/latex/required/amsmath/amstext.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/amsxtra.dtx b/macros/latex/required/amsmath/amsxtra.dtx
index aaa5fd1a2d..c2bc4bbd26 100644
--- a/macros/latex/required/amsmath/amsxtra.dtx
+++ b/macros/latex/required/amsmath/amsxtra.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1995, 1999 American Mathematical Society.
-% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -53,7 +53,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% documents using the \pkg{amstex} package these commands are just
% wasted overhead.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \begin{macrocode}
\ProvidesPackage{amsxtra}[1999/11/15 v1.2c AMS extra commands]
diff --git a/macros/latex/required/amsmath/amsxtra.ins b/macros/latex/required/amsmath/amsxtra.ins
index 7eca6e065a..70f50c6bcb 100644
--- a/macros/latex/required/amsmath/amsxtra.ins
+++ b/macros/latex/required/amsmath/amsxtra.ins
@@ -1,6 +1,6 @@
%%
%% Copyright (C) 2010 American Mathematical Society.
-%% Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+%% Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -25,7 +25,7 @@
\preamble
Copyright (C) 1995, 1999 American Mathematical Society.
-Copyright (C) 2016-2021 LaTeX Project and American Mathematical Society.
+Copyright (C) 2016-2022 LaTeX Project and American Mathematical Society.
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either version 1.3c
diff --git a/macros/latex/required/amsmath/amsxtra.pdf b/macros/latex/required/amsmath/amsxtra.pdf
index 7c694e14b2..6074bb822e 100644
--- a/macros/latex/required/amsmath/amsxtra.pdf
+++ b/macros/latex/required/amsmath/amsxtra.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/changes.txt b/macros/latex/required/amsmath/changes.txt
index 3f3c36bf79..83d6c6e3a1 100644
--- a/macros/latex/required/amsmath/changes.txt
+++ b/macros/latex/required/amsmath/changes.txt
@@ -3,6 +3,35 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
+# 2022-06-01 Release
+#########################
+
+2022-04-08 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx:
+ Make various math commands robust to match the LaTeX kernel (gh/123)
+
+ * amsopn.dtx:
+ Make various operators \protected (gh/123)
+
+
+2022-02-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{The \env{multline} environment}):
+ Added missing \relax for (gh/716)
+ Also make \shoveleft and \shoveright robust (part of gh/123)
+
+2022-01-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsopn.dtx:
+ Do not define/reset \operator@font; it is already defined in
+ the LaTeX kernel (gh/734)
+
+2021-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * All *.dtx: Replaced \StopEventually by \MaybeStop
+
+#########################
# 2021-11-15 Release
#########################
diff --git a/macros/latex/required/amsmath/subeqn.pdf b/macros/latex/required/amsmath/subeqn.pdf
index c016df16b8..28c721c6f2 100644
--- a/macros/latex/required/amsmath/subeqn.pdf
+++ b/macros/latex/required/amsmath/subeqn.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/technote.pdf b/macros/latex/required/amsmath/technote.pdf
index 7027cfd8df..6a8c594364 100644
--- a/macros/latex/required/amsmath/technote.pdf
+++ b/macros/latex/required/amsmath/technote.pdf
Binary files differ
diff --git a/macros/latex/required/amsmath/testmath.pdf b/macros/latex/required/amsmath/testmath.pdf
index 7fc3601faf..8aef17f9ef 100644
--- a/macros/latex/required/amsmath/testmath.pdf
+++ b/macros/latex/required/amsmath/testmath.pdf
Binary files differ
diff --git a/macros/latex/required/firstaid/changes.txt b/macros/latex/required/firstaid/changes.txt
index 6f8268c6b6..a3626f83a4 100644
--- a/macros/latex/required/firstaid/changes.txt
+++ b/macros/latex/required/firstaid/changes.txt
@@ -1,3 +1,12 @@
+2022-02-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Fixes for biditools because taken out as package is updated
+
+2021-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * All *.dtx: Replaced \StopEventually by \MaybeStop
+
2021-11-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
index fb8d340137..1e6e286a73 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2021
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2022
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
@@ -99,7 +99,7 @@
% release we have to make and distribute also a matching
% development release.
%
-% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
%
%
% \section{The Implementation}
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2021/11/11}
-\def\LaTeXFirstAidVersion{v1.0q}
+\def\LaTeXFirstAidDate{2022/02/20}
+\def\LaTeXFirstAidVersion{v1.0r}
% \end{macrocode}
%
% \begin{macrocode}
@@ -311,11 +311,12 @@
%<*kernel>
% \end{macrocode}
%
+% Bidi is now ar a new version: patches are no longer needed.
% \begin{macrocode}
-\AddToHook{file/biditools.sty/after}[firstaid]{%
- \FirstAidNeededT{biditools}{sty}%
- {2020/05/13 v2 Programming tools for bidi package}%
- {%
+%\AddToHook{file/biditools.sty/after}[firstaid]{%
+% \FirstAidNeededT{biditools}{sty}%
+% {2020/05/13 v2 Programming tools for bidi package}%
+% {%
% \end{macrocode}
% \pkg{bidi} adds some code to the beginning of \cs{document} which
% contains \cs{endgroup} and \cs{begingroup} which is no longer
@@ -324,20 +325,20 @@
% Patching \cs{document} using \cs{bidi@patchcmd} doesn't work so
% we take the extra groups out by hand:
% \begin{macrocode}
- \def\firstaid@bidi@document@patch
- \endgroup#1\begingroup#2\firstaid@bidi@document@patch
- {\unexpanded{#1#2}}%
- \edef\document{\expandafter\firstaid@bidi@document@patch\document
- \firstaid@bidi@document@patch}%
+% \def\firstaid@bidi@document@patch
+% \endgroup#1\begingroup#2\firstaid@bidi@document@patch
+% {\unexpanded{#1#2}}%
+% \edef\document{\expandafter\firstaid@bidi@document@patch\document
+% \firstaid@bidi@document@patch}%
% \end{macrocode}
% There are also some patches into \cs{enddocument}, some continue
% to go in but one fails, so we add that now into the right place.
% \begin{macrocode}
- \AddToHook{enddocument/info}%
- {\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
- \bidi@afterenddocumentchecklabelsrerunhook}%
- }%
-}
+% \AddToHook{enddocument/info}%
+% {\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
+% \bidi@afterenddocumentchecklabelsrerunhook}%
+% }%
+%}
% \end{macrocode}
%
%
@@ -559,6 +560,30 @@
}
% \end{macrocode}
%
+% \subsection{The \pkg{german} class first aid}
+%
+% Handling of \cs{protected} UTF-8
+% \begin{macrocode}
+\AddToHook{file/german.sty/after}[firstaid]{%
+ \FirstAidNeededT{german}{sty}{1998/07/08 v2.5e Support for writing german texts (br)}
+ {%
+\let\grmn@active@dq@\@active@dq
+\def\@active@dq{\protect\grmn@active@dq@}%
+\germanTeX
+}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AddToHook{file/ngerman.sty/after}[firstaid]{%
+ \FirstAidNeededT{ngerman}{sty}{1998/07/08 v2.5e Support for writing german texts (br)}
+ {%
+\let\grmn@active@dq@\@active@dq
+\def\@active@dq{\protect\grmn@active@dq@}%
+\ngermanTeX
+}%
+}
+% \end{macrocode}
%
%
%
diff --git a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
index d505fa379b..ef46525b24 100644
--- a/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/README.md b/macros/latex/required/graphics/README.md
index e58a421c93..5ccff78a3b 100644
--- a/macros/latex/required/graphics/README.md
+++ b/macros/latex/required/graphics/README.md
@@ -1,7 +1,7 @@
The LaTeX `graphics` bundle
===========================
-Release 2021-12-14
+Release 2022-06-01
Overview
--------
@@ -61,4 +61,4 @@ of the package.
-----
-<p>Copyright (C) 1993-2021 The LaTeX Project <br />
+<p>Copyright (C) 1993-2022 The LaTeX Project <br />
diff --git a/macros/latex/required/graphics/changes.txt b/macros/latex/required/graphics/changes.txt
index eb95865d2f..616f56230f 100644
--- a/macros/latex/required/graphics/changes.txt
+++ b/macros/latex/required/graphics/changes.txt
@@ -9,6 +9,26 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
+# 2022-06-01 Release
+#########################
+
+2022-03-10 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * graphics.dtx:
+ Use \set@curr@file@nosearch to avoid premature inclusion of path
+ from \cs{graphicspath} (gh/776).
+
+2022-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * mathcolor.dtx:
+ Support \mathcolor to correctly color parts of formulas without
+ spacing problems. This command is *only* supported in math mode.
+
+2021-12-07 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * color.dtx: Remove stray spaces after change for xcolor/gh/10}
+
+#########################
# 2021-12-14 Release
#########################
diff --git a/macros/latex/required/graphics/color.dtx b/macros/latex/required/graphics/color.dtx
index b4b0ad1091..cf3a7efbcf 100644
--- a/macros/latex/required/graphics/color.dtx
+++ b/macros/latex/required/graphics/color.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% color.dtx Copyright (C) 1994--1999 David Carlisle
-%% Copyright (C) 2005-2021
+%% Copyright (C) 2005-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -21,7 +21,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2021/12/07 v1.3c Standard LaTeX Color (DPC)]
+ [2022/01/06 v1.3d Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -56,7 +56,7 @@
% document \emph{Packages in the `graphics' bundle} in the file
% \texttt{grfguide.tex}.
%
-% \StopEventually{}
+% \MaybeStop{}
%
%
% \section{Options}
@@ -826,6 +826,13 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Providing \cs{mathcolor}}
+%
+% This is shared coded between different packages, so external.
+%
+% \begin{macrocode}
+\input{mathcolor.ltx}
+% \end{macrocode}
%
% \section{Extra Groups}
% Turning on extra groups in the standard \LaTeX\ commands, so that
diff --git a/macros/latex/required/graphics/color.pdf b/macros/latex/required/graphics/color.pdf
index 540a4f2808..b3cca89de7 100644
--- a/macros/latex/required/graphics/color.pdf
+++ b/macros/latex/required/graphics/color.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/drivers.dtx b/macros/latex/required/graphics/drivers.dtx
index 6704ad11c6..e1c19e0296 100644
--- a/macros/latex/required/graphics/drivers.dtx
+++ b/macros/latex/required/graphics/drivers.dtx
@@ -3,7 +3,7 @@
%
%% drivers.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
%% Copyright (C) 1995 1996 1997 1998 1999 David Carlisle
-%% Copyright (C) 2000-2021
+%% Copyright (C) 2000-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -77,7 +77,7 @@
%
%
%
-% \StopEventually{}
+% \MaybeStop{}
%
%
% \section{Colour}
diff --git a/macros/latex/required/graphics/drivers.pdf b/macros/latex/required/graphics/drivers.pdf
index 0f83884b10..a9bfdac464 100644
--- a/macros/latex/required/graphics/drivers.pdf
+++ b/macros/latex/required/graphics/drivers.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/epsfig.dtx b/macros/latex/required/graphics/epsfig.dtx
index a34aa6842e..b8927f2da5 100644
--- a/macros/latex/required/graphics/epsfig.dtx
+++ b/macros/latex/required/graphics/epsfig.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% epsfig.dtx Copyright (C) 1994-1996 1999 Sebastian Rahtz
-%% Copyright (C) 2000-2021
+%% Copyright (C) 2000-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -41,7 +41,7 @@
% \maketitle
%
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{Preface}
% \begin{macrocode}
diff --git a/macros/latex/required/graphics/epsfig.pdf b/macros/latex/required/graphics/epsfig.pdf
index f8af4c38ae..b72f727ebb 100644
--- a/macros/latex/required/graphics/epsfig.pdf
+++ b/macros/latex/required/graphics/epsfig.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/graphics.dtx b/macros/latex/required/graphics/graphics.dtx
index cec35559ef..92b3c8f335 100644
--- a/macros/latex/required/graphics/graphics.dtx
+++ b/macros/latex/required/graphics/graphics.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995-2021
+%% Copyright (C) 1995-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -27,7 +27,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)]
+ [2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -276,7 +276,7 @@
% and |\rotatebox| commands that some people may prefer. It is provided
% by the accompanying |graphicx| package.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Graphics Kernel Functions}
%
@@ -1053,33 +1053,39 @@
% \edef{macrocode}
% \end{macro}
%
-% \begin{macro}{\set@curr@file}
+% \begin{macro}{\Gin@set@curr@file}
% \begin{macro}{\quote@name}
% \changes{v1.3c}{2019/10/08}
% {Definitions added for old formats}
+% \changes{v1.4e}{2022/03/10}
+% {Use \cs{Gin@set@curr@file}, and define it appropriately}
+% We have to cope with older formats (rollback as far as 2019-10-01)
+% and Plain. Define a minimal \cs{Gin@set@curr@file} first:
% \begin{macrocode}
-\def\Gin@temp#1{%
- \begingroup
- \escapechar\m@ne
- \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
- \endgroup
-}
-\ifx\set@curr@file\@Gin@temp
- \let\set@curr@file\@undefined
-\fi
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ifx\set@curr@file\@undefined
-\def\set@curr@file#1{%
+\def\Gin@set@curr@file#1{%
\begingroup
\escapechar\m@ne
\xdef\@curr@file{\expandafter\string\csname\@firstofone#1\@empty\endcsname}%
- \endgroup
-}
-\def\quote@name#1{"\quote@@name#1\@gobble""}
-\def\quote@@name#1"{#1\quote@@name}
-\def\unquote@name#1{\quote@@name#1\@gobble"}
+ \endgroup}
+% \end{macrocode}
+% Then, if \cs{set@curr@file@nosearch} is undefined, we're before
+% 2022-06-01, and if \cs{set@curr@file} is undefined, we're before
+% 2019-10-01 (aka Plain, as far as these tests are concerned). Make
+% \cs{Gin@set@curr@file} be a copy of the most recent macro:
+% \cs{set@curr@file@nosearch} if it exists, and \cs{set@curr@file}
+% otherwise. If neither exist, we also need to define
+% \cs{quote@name} et~al.
+% \begin{macrocode}
+\ifx\set@curr@file@nosearch\@undefined
+ \ifx\set@curr@file\@undefined
+ \def\quote@name#1{"\quote@@name#1\@gobble""}
+ \def\quote@@name#1"{#1\quote@@name}
+ \def\unquote@name#1{\quote@@name#1\@gobble"}
+ \else
+ \let\Gin@set@curr@file\set@curr@file
+ \fi
+\else
+ \let\Gin@set@curr@file\set@curr@file@nosearch
\fi
% \end{macrocode}
% \end{macro}
@@ -1114,8 +1120,11 @@
%
% \changes{v1.3d}{2019/11/01}
% {\cs{curr@name} now unquoted}
+% \changes{v1.4e}{2022/03/10}
+% {Use \cs{set@curr@file@nosearch} to avoid premature inclusion of
+% path from \cs{graphicspath}}
% \begin{macrocode}
- \set@curr@file{#1}%
+ \Gin@set@curr@file{#1}%
\expandafter\filename@parse\expandafter{\@curr@file}%
% \end{macrocode}
% If extension is |.gz| tack on to previous extension, eg |.eps.gz| if available.
diff --git a/macros/latex/required/graphics/graphics.ins b/macros/latex/required/graphics/graphics.ins
index 95e190c9ec..09c37e7c38 100644
--- a/macros/latex/required/graphics/graphics.ins
+++ b/macros/latex/required/graphics/graphics.ins
@@ -40,4 +40,6 @@ reports for it can be opened at https://latex-project.org/bugs/
\generate{\file{rotating.sty}{\from{rotating.dtx}{package}}}
+\generate{\file{mathcolor.ltx}{\from{mathcolor.dtx}{code}}}
+
\endbatchfile
diff --git a/macros/latex/required/graphics/graphics.pdf b/macros/latex/required/graphics/graphics.pdf
index a50ff186fd..5cdae79b24 100644
--- a/macros/latex/required/graphics/graphics.pdf
+++ b/macros/latex/required/graphics/graphics.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/graphicx.dtx b/macros/latex/required/graphics/graphicx.dtx
index 29e0db5b12..8c20091585 100644
--- a/macros/latex/required/graphics/graphicx.dtx
+++ b/macros/latex/required/graphics/graphicx.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphicx.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995-2021
+%% Copyright (C) 1995-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -211,7 +211,7 @@
% which rotates around the reference point on the baseline, thus
% producing a box that is mainly \emph{below} the baseline.
%
-% \StopEventually{}
+% \MaybeStop{}
%
%
% \section{Implementation}
diff --git a/macros/latex/required/graphics/graphicx.pdf b/macros/latex/required/graphics/graphicx.pdf
index 88ef6488c2..2a02092804 100644
--- a/macros/latex/required/graphics/graphicx.pdf
+++ b/macros/latex/required/graphics/graphicx.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/grfguide.pdf b/macros/latex/required/graphics/grfguide.pdf
index 95e7c76295..419ea295ed 100644
--- a/macros/latex/required/graphics/grfguide.pdf
+++ b/macros/latex/required/graphics/grfguide.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/grfguide.tex b/macros/latex/required/graphics/grfguide.tex
index 3b679ea382..585e87adc7 100644
--- a/macros/latex/required/graphics/grfguide.tex
+++ b/macros/latex/required/graphics/grfguide.tex
@@ -243,12 +243,27 @@ to the font commands such as |\textbf|:
So the above is essentially equivalent to
|{\color|\arg{name}\emph{text}|}|.
+\subsection{Using Colours in math formulas}
+
+While |\color| and to some extent |\textcolor| can be used in
+formulas, this is cumbersome, may lead to bad spacing, and in some
+situations is simply not possible. For this reason we also introduce
+|\mathcolor| which will help in this respect. The basic syntax is:
+
+\begin{decl}
+|\mathcolor|\arg{name}\arg{math}
+\end{decl}
+
+See \texttt{mathcolor.pdf} for details on this command.
+
+
\subsubsection{Using colour specifications directly}
\begin{decl}
|\color|\oarg{model}\arg{specification}\\
-|\textcolor|\oarg{model}\arg{specification}\arg{text}
+|\textcolor|\oarg{model}\arg{specification}\arg{text}\\
+|\mathcolor|\oarg{model}\arg{specification}\arg{math}
\end{decl}
Normally one would predeclare all the colours used in a package, or in
diff --git a/macros/latex/required/graphics/keyval.dtx b/macros/latex/required/graphics/keyval.dtx
index 58664b8f03..9fce6267e0 100644
--- a/macros/latex/required/graphics/keyval.dtx
+++ b/macros/latex/required/graphics/keyval.dtx
@@ -1,7 +1,7 @@
%
% \iffalse
%% keyval.dtx Copyright (C) 1993 1994 1995 1997 1998 1999 David Carlisle
-%% Copyright (C) 2000-2021 David Carlisle, LaTeX Project
+%% Copyright (C) 2000-2022 David Carlisle, LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -20,7 +20,7 @@
%<driver> \ProvidesFile{keyval.drv}
% \fi
% \ProvidesFile{keyval.dtx}
- [2014/10/28 v1.15 key=value parser (DPC)]
+ [2022/05/29 v1.15 key=value parser (DPC)]
%
% \iffalse
%</!plain>
@@ -177,7 +177,7 @@
% \section{The Internal Interface}
% A declaration of the form:\\
% |\define@key{family}{key}{...}|\\
-% Defines a macro |\KV@prefix@key| with one argument. When used in a
+% Defines a macro |\KV@family@key| with one argument. When used in a
% keyval list, the macro receives the value as its argument.
%
% A declaration of the form:\\
@@ -202,7 +202,7 @@
% package do not break styles making use of these `low level'
% definitions.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/graphics/keyval.pdf b/macros/latex/required/graphics/keyval.pdf
index 8746550d0e..5b1bd6a06e 100644
--- a/macros/latex/required/graphics/keyval.pdf
+++ b/macros/latex/required/graphics/keyval.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/lscape.dtx b/macros/latex/required/graphics/lscape.dtx
index 969c94ae7a..d173af6468 100644
--- a/macros/latex/required/graphics/lscape.dtx
+++ b/macros/latex/required/graphics/lscape.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% lscape.dtx Copyright (C) 1994 1999-2000 David Carlisle
-%% Copyright (C) 2000-2021
+%% Copyright (C) 2000-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -54,7 +54,7 @@
% page before the page head and foot are added.
%
%
-% \StopEventually{\end{landscape}}
+% \MaybeStop{\end{landscape}}
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% \changes{v1.00}{1992/04/28}{Initial release}
diff --git a/macros/latex/required/graphics/lscape.pdf b/macros/latex/required/graphics/lscape.pdf
index 178ffb231d..cc6e113a01 100644
--- a/macros/latex/required/graphics/lscape.pdf
+++ b/macros/latex/required/graphics/lscape.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/mathcolor.dtx b/macros/latex/required/graphics/mathcolor.dtx
new file mode 100644
index 0000000000..2341e71e28
--- /dev/null
+++ b/macros/latex/required/graphics/mathcolor.dtx
@@ -0,0 +1,431 @@
+% \iffalse meta-comment
+%
+%% File: mathcolor.dtx (C) Copyright 2021-2022
+% Frank Mittelbach, LaTeX Team
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+%%% From File: mathcolor.dtx
+%
+% \begin{macrocode}
+\def\mathcolorversion{v1.0b}
+\def\mathcolordate{2022/01/28}
+% \end{macrocode}
+%<*driver>
+\documentclass{l3doc}
+
+%\makeatletter \input{mathcolor.ltx} \makeatother
+
+\usepackage{color}
+
+% Fixing footnotes in functions and variables: this should be in l3doc!
+
+\newcommand\fixfootnote[2]{\footnotemark
+ \AddToHookNext{env/#1/after}{\footnotetext{#2}}}
+\AddToHook{env/function/begin}{\def\footnote{\fixfootnote{function}}}
+\AddToHook{env/variable/begin}{\def\footnote{\fixfootnote{variable}}}
+
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{mathcolor.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+
+
+
+%
+% \title{Providing color in math\thanks{This file has version
+% \mathcolorversion\ dated \mathcolordate, \copyright\ \LaTeX\
+% Project.}}
+% \author{Frank Mittelbach}
+%
+% \maketitle
+%
+%
+% \section{Introduction}
+%
+% It is possible to use the \cs{color} command in math formulas but
+% doing that has a number of restrictions and often leads to rather
+% unreadable input. For example, to color the summation sign in red
+% in the following formula
+% \[
+% X = \color{red} \sum_{{\color{black} i=1}}^{{\color{black} n}} \color{black} x_i
+% \]
+% A total of four color commands and a number of seemingly
+% unnecessary extra braces in the sub and superscript are needed:
+%\begin{verbatim}
+% \[ X = \color{red} \sum
+% _{{\color{black} i=1}} % without {{ the superscript is misplaced
+% ^{{\color{black} n}} % without {{ the \sum is black
+% \color{black} % without the x_i is red
+% x_i \]
+%\end{verbatim}
+% While this is ugly but at least works, other things are simply
+% impossible, e.g.,
+% \[ \left\{ \frac{1}{2} \mathcolor{red}{\right\}} \]
+% are not achievable at all because of the fact that \cs{left} and
+% \cs{right} form a group. Thus, a \cs{color} command immediately
+% before the \cs{right} has no effect and \verb=\}= remains black.
+% Putting the color change before the \cs{left} and then resetting
+% the color inside would work if you want to color both braces, but
+% the above combination or the attempt to color only the left brace
+% fails always.
+%
+% Using \cs{textcolor} in formulas appears to work on first glance,
+% but it produces spacing problems that are not easy to overcome
+% either, because it generates a single \cs{mathord} and no
+% longer reflects its input, thus
+% \verb/\[ a = b \textcolor{red}{\neq} c \]/
+% produces
+% \[ a = b \textcolor{red}{\neq} c \]
+% This is a case one could mend by wrapping the
+% \cs{textcolor} and its arguments in a \cs{mathrel}, but even when
+% that is possible, the resulting formula source is difficult to
+% maintain and in other situations the solutions are even more
+% complicated or there is no solution at all.
+%
+% We therefore offer now a dedicated math coloring command named
+% \cs{mathcolor}.
+%
+% \begin{function}{\mathcolor}
+% \begin{syntax}
+% \cs{mathcolor} \oarg{model} \Arg{color-spec} \Arg{math material}
+% \end{syntax}
+% It has the same arguments as \cs{textcolor} but is intended for
+% use in formulas. The command does not generate a group and the
+% \meta{math material} retains its math atom states and it correctly
+% handles sub and superscripts that follow.
+% \end{function}
+%
+% The command can also be used to color a single opening or closing
+% symbol, e.g., the correct input to our earlier example is
+%\begin{verbatim}
+% \[ \left\{ \frac{1}{2} \mathcolor{red}{\right\}} \]
+%\end{verbatim}
+% which is how it was produced.
+%
+% If you attempt to color large operators that use explicit
+% \cs{limits}, \cs{nolimits}, or \cs{displaylimits}, then these
+% limit controls need to immediately follow the operator. However,
+% \cs{mathcolor} is written in a way that it is possible write
+%\begin{verbatim}
+% \[ \mathcolor{red}{\int}\limits_0^1 \textrm{ or }
+% \mathcolor{red}{\int\limits}_0^1 \]
+%\end{verbatim}
+% and achieve the same effect:
+% \[ \mathcolor{red}{\int}\limits_0^1 \textrm{ or }
+% \mathcolor{red}{\int\limits}_0^1 \]
+
+%
+%
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% The code is called inside of the \pkg{color} or \pkg{xcolor}
+% packages, so \texttt{@} is already a letter, but the
+% coding here is done in the L3 programming layer, so we need to
+% activate that. But first we check if this file was loaded before,
+% e.g., when both \pkg{color} and \pkg{xcolor} are in the preamble
+% and in that case we stop immediately.
+% \begin{macrocode}
+%<*code>
+\ifcsname mathcolor\endcsname \endinput \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+%<@@=mathcolor>
+% \end{macrocode}
+%
+% \begin{macro}{\g_@@_seq}
+% We need to keep our own stack of color commands, so we allocate a
+% sequence for that.
+% \begin{macrocode}
+\seq_new:N \g_@@_seq
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\mathcolor}
+% The document-level command which expects a color (if unnamed then
+% the optional argument is the model) and colors the content of the
+% second argument (like \cs{textcolor}, but without spacing
+% problems in math).
+% \begin{macrocode}
+\DeclareDocumentCommand \mathcolor { o m m } {
+% \end{macrocode}
+% The \cs{mathcolor} is only supported in math mode because in text
+% mode it has problems scanning away a space after it, for example.
+% We therefore raise an error if it executes
+% anywhere else. The \LaTeXe{} error command is a
+% bit strangely named, because in the kernel it is only used for
+% math alphabets, but the message it gives is fine.
+% \changes{v1.0b}{2022/01/28}{Restrict command to math mode}
+% \begin{macrocode}
+ \mode_if_math:F { \non@alpherr {\mathcolor\space} }
+% \end{macrocode}
+% First real action is to save the current color value on a stack
+% (needed if the command is nested or contains some further color
+% changes with \cs{color} inside).
+% \begin{macrocode}
+ \seq_gpush:No \g_@@_seq \current@color
+% \end{macrocode}
+% Then we switch to the new color, but we do not want to reset the
+% color after the group (which is done by \cs{color} using
+% \cs{aftergroup}\cs{reset@color}). The best solution here would be
+% if the color packages would provide a command doing just the
+% color switching, but for now we simply undo that part by pushing
+% \cs{use_none:n} which gobbles the \cs{reset@color} added by
+% \cs{color} with \cs{aftergroup}.
+% \begin{macrocode}
+ \group_insert_after:N \use_none:n
+% \end{macrocode}
+% Switching the color is also slightly suboptimal, because
+% depending on whether or not we have a \meta{model} argument, we
+% have to call \cs{color} with or without the optional argument. But
+% going low-level here is not an option as we need to support
+% different color packages and their internals are not identical.
+% \begin{macrocode}
+ \IfValueTF{#1} { \color[#1]{#2} }{ \color{#2} }
+% \end{macrocode}
+% Then comes the math material we want to see colored:
+% \begin{macrocode}
+ #3
+% \end{macrocode}
+% After that we need to reset the color ourselves (without a group
+% that does it for us), i.e., popping the saved color from our
+% stack, but there are some twists to that so we do this in a
+% separate command (which in fact needs to be called several times,
+% so inlining the code wouldn't be possible.
+% \begin{macrocode}
+ \@@_scan_for_scripts:w
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_scan_for_scripts:w}
+% The complication when changing the color back is due to the fact
+% that the \cs{mathcolor} may be followed by \verb=^= or \verb=_=
+% or the hidden superscript \texttt{'} and its argument may end in a
+% \cs{mathop} in which case the sub and superscripts may be
+% attached as \cs{limits} instead of after the material. All cases
+% need separate treatment.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_scan_for_scripts:w {
+% \end{macrocode}
+% We therefore first parse for a \cs{c_math_subscript_token}
+% ignoring (dropping) any spaces and \cs{relax} as \TeX{} would
+% do. We do this with expansion so that hidden sub or superscripts
+% in macros are still found as long as the macros are expandable.
+% \begin{macrocode}
+ \@@_peek_catcode_ignore_filler_expand:NTF \c_math_subscript_token
+% \end{macrocode}
+% If we found that character we call a function that handles sub or
+% superscripts.
+% \begin{macrocode}
+ { \@@_handle_scripts:Nw }
+% \end{macrocode}
+% Otherwise check if this token we peeked at (which is now stored
+% in \cs{l_peek_token} is a superscript token.
+% \begin{macrocode}
+ { \token_if_math_superscript:NTF \l_peek_token
+% \end{macrocode}
+% If found we call the sub/superscript handler.
+% \begin{macrocode}
+ { \@@_handle_scripts:Nw }
+% \end{macrocode}
+% Otherwise we check if it was any of the limit operation
+% primitives. If that is the case, e.g., if we have a situation
+% such as
+%\begin{verbatim}
+% \mathcolor{red}{\int}\limits_1
+%\end{verbatim}
+% we have to move it directly after the \cs{int} to ensure there
+% is no color reset between the operator and the \cs{limits} command.
+% \begin{macrocode}
+ { \token_case_meaning:NnTF \l_peek_token
+ {
+ \limits { \limits }
+ \nolimits { \nolimits }
+ \displaylimits { \displaylimits }
+ }
+% \end{macrocode}
+% Once that is done, we have to get rid of the token we peeked at
+% and then restart scanning for sub or superscripts. Given that
+% \cs{@@_scan_for_scripts:w} expands while scanning the simplest
+% solution is to add \cs{use_none:n} in front of the peeked at token.
+% \begin{macrocode}
+ { \@@_scan_for_scripts:w \use_none:n }
+% \end{macrocode}
+% If it was one of these we look for a \texttt{'} and if found remove it and
+% replace it by its expansion. The reason we have to do this (and
+% not rely on the earlier peeking to expand for us is the fact
+% that \texttt{'} is only ``math active'' and that doesn't expand
+% under \cs{expanded} or \cs{expandafter}.
+% \begin{macrocode}
+ { \peek_meaning_remove:NTF '
+ { \@@_handle_scripts:Nw ^\c_group_begin_token \prim@s }
+% \end{macrocode}
+% If it is anything else we finish off which means we reset the
+% color (because we prevented that before to happen automatically
+% after the next group) and pop the color stack setting \cs{current@color}.
+% \begin{macrocode}
+ { \reset@color
+ \seq_gpop:NN \g_@@_seq \current@color
+ }
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+
+
+
+% \begin{macro}{\@@_handle_scripts:Nw}
+% The tricky part of handling sub and superscripts is that we have
+% to reset color to the one that is on the stack but reset it back
+% to what it was before to allow for cases like
+%\begin{verbatim}
+% \[ \mathcolor{red}{a+\sum}_{i=1}^n \]
+%\end{verbatim}
+% Here, \TeX{} constructs a \cs{vbox} stacking subscript, summation
+% sign, and superscript. So technically the superscript comes first
+% and the \cs{sum} that should get colored red is the middle.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_handle_scripts:Nw #1 {
+% \end{macrocode}
+% The argument is either \verb=^= or \verb=_=, so we execute it and
+% explicitly open two \verb={= groups. We need two because color
+% resets are always done after a group, so the first group is for
+% script material (in case it was just something like \verb=_i=)
+% and the second is needed for the color reset to keep it within
+% the super or subscript. If that reset would happen after it then
+% the color \cs{special} would interfere with \TeX{} math spacing.
+% \begin{macrocode}
+ #1 \c_group_begin_token \c_group_begin_token
+% \end{macrocode}
+% Now it is time to change the color back to the one on the stack.
+% \begin{macrocode}
+ \seq_get:NN \g_@@_seq \current@color
+ \set@color
+% \end{macrocode}
+% \cs{set@color} adds \cs{aftergroup}\cs{reset@color}. We now a add
+% bit more so that the code executed after the current (inner) group
+% looks like this:
+%\begin{verbatim}
+% \reset@color } \@@_scan_for_scripts:w
+%\end{verbatim}
+% The \cs{_@@_scan_for_scripts:w} then retakes control and initiates
+% parsing for another sub or superscript.
+% \begin{macrocode}
+ \group_insert_after:N \c_group_end_token
+ \group_insert_after:N \@@_scan_for_scripts:w
+% \end{macrocode}
+% Before we give control to \TeX{} to process the sub or
+% superscript some final adjustment is necessary: if the input was
+% \verb=^{...}= then we have one \verb={= too many, because we
+% already supplied the outer one already. In that case we drop
+% it. Otherwise we have an unbraced single token sub or superscript
+% which means we are missing a closing \verb=}= at the end and need
+% to account for that: this is done in \cs{_@@_handle_unbraced_script:N}.
+% \begin{macrocode}
+ \@@_peek_catcode_ignore_filler_expand:NTF \c_group_begin_token
+ { \peek_catcode_remove:NT \c_group_begin_token { } }
+ { \@@_handle_unbraced_script:N }
+ }% \end{macrocode}
+% \end{macro}
+
+
+% \begin{macro}{\@@_handle_unbraced_script:N}
+% All we have to do here is to add the final closing brace.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_handle_unbraced_script:N #1 {
+ #1 \c_group_end_token }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{Utility function for the peek module}
+%
+% This peek is expanding and ignores spaces and \cs{relax} (even
+% though the name doesn't say so)
+% but \cs{relax} is usually allowed in such places where we so it
+% may not be bad to have it in this way in general --- maybe this
+% should move to expl3 peek functions (or otherwise the naming
+% should perhaps be adjusted).
+%
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_peek_tmp_tl
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_peek_catcode_ignore_filler_expand:NTF #1#2#3
+ {
+ \tl_set:Nn \l_@@_peek_tmp_tl
+ { \token_if_eq_catcode:NNTF \l_peek_token #1 {#2} {#3} }
+ \@@_peek_expand:w
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_peek_expand:w
+ {
+ \exp_after:wN \peek_catcode_remove:NTF
+ \exp_after:wN \c_space_token
+ \exp_after:wN \@@_peek_test_expand:w
+ \exp_after:wN \@@_peek_test_relax:w
+ \exp:w \exp_end_continue_f:w
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_peek_test_expand:w
+ {
+ \token_if_expandable:NTF \l_peek_token
+ { \@@_peek_expand:w }
+ { \l_@@_peek_tmp_tl }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_peek_test_relax:w
+ {
+ \peek_meaning_remove:NTF \scan_stop:
+ { \@@_peek_expand:w }
+ { \@@_peek_test_expand:w }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+%</code>
+% \end{macrocode}
+%
+% \Finale
+%
+%
+
+%%%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%%%
+
diff --git a/macros/latex/required/graphics/mathcolor.pdf b/macros/latex/required/graphics/mathcolor.pdf
new file mode 100644
index 0000000000..1940791f90
--- /dev/null
+++ b/macros/latex/required/graphics/mathcolor.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/rotating.dtx b/macros/latex/required/graphics/rotating.dtx
index c6db1273a4..ac64086082 100644
--- a/macros/latex/required/graphics/rotating.dtx
+++ b/macros/latex/required/graphics/rotating.dtx
@@ -5,7 +5,7 @@
% File: rotating.dtx
%% Copyright (C) 1995-1999 Sebastian Rahtz and Leonor Barroca
%% Copyright (C) 2001-2003,2007-2009 Robin Fairbairns
-%% Copyright (C) 2016-2021 LaTeX Project
+%% Copyright (C) 2016-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%
@@ -157,7 +157,7 @@
% top does
% \end{tabular}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{Setup}
% Now we present the documented code. First, package options.
diff --git a/macros/latex/required/graphics/rotating.pdf b/macros/latex/required/graphics/rotating.pdf
index 94fab64ec2..3352fd8fd1 100644
--- a/macros/latex/required/graphics/rotating.pdf
+++ b/macros/latex/required/graphics/rotating.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/rotex.pdf b/macros/latex/required/graphics/rotex.pdf
index 3ca96254af..6027e6cb08 100644
--- a/macros/latex/required/graphics/rotex.pdf
+++ b/macros/latex/required/graphics/rotex.pdf
Binary files differ
diff --git a/macros/latex/required/graphics/trig.dtx b/macros/latex/required/graphics/trig.dtx
index 533f3b0648..4b673494af 100644
--- a/macros/latex/required/graphics/trig.dtx
+++ b/macros/latex/required/graphics/trig.dtx
@@ -1,6 +1,6 @@
% \iffalse
%% File: trig.dtx Copyright (C) 1993-1999 David Carlisle
-%% Copyright (C) 2000-2021
+%% Copyright (C) 2000-2022 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -78,7 +78,7 @@
% |\dimen2=\UseSin{30}\dimen0|. Which means that |\UseSin| must
% \emph{expand} to a \meta{factor}.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/graphics/trig.pdf b/macros/latex/required/graphics/trig.pdf
index cc9bbe3bcf..8521167f77 100644
--- a/macros/latex/required/graphics/trig.pdf
+++ b/macros/latex/required/graphics/trig.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/README.md b/macros/latex/required/latex-lab/README.md
new file mode 100644
index 0000000000..410292cda5
--- /dev/null
+++ b/macros/latex/required/latex-lab/README.md
@@ -0,0 +1,42 @@
+# LaTeX laboratory
+
+Release 2022-06-01 pre-release 4
+
+## Overview
+
+This bundle holds optional files that are loaded in certain situations
+by kernel code (if available). For example, the new (as of 2021/12)
+`\DocumentMetadata` command in the kernel loads a file from here holding
+the real payload. While this code is still in development and the use
+is experimental and mainly for the tagging project, the code is stored
+outside the format so that there can be intermediate releases not
+affecting the production use of LaTeX.
+
+
+Once the code is finalized and properly tested it will eventually move
+to the kernel and the corresponding file in this bundle will
+vanish. Note that none of these files are directly user accessible in
+documents (i.e., they aren't packages) so the process is transparent
+to documents already using the new functionality.
+
+
+## Current support code in the bundle
+
+### Support for `\DocumentMetadata`
+
+### New output routine code (under development)
+
+ - so far there is a first implementation of footnote support
+
+
+## License
+
+The license is LPPL 1.3c.
+
+
+## Copyright
+
+This README file is
+
+Copyright (C) 2021-2022
+The LaTeX Project
diff --git a/macros/latex/required/latex-lab/changes.txt b/macros/latex/required/latex-lab/changes.txt
new file mode 100644
index 0000000000..80b3b4a22c
--- /dev/null
+++ b/macros/latex/required/latex-lab/changes.txt
@@ -0,0 +1,27 @@
+2022-05-28 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * latex-lab-prototype.dtx
+ Removed
+
+2022-14-04 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * documentmeta-support.dtx:
+ add key A-4 for first steps to support pdf/A-4
+
+2022-03-08 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * latex-lab-prototype.dtx
+ New file re-implementing ideas from on xtemplate.dtx using updated
+ keyval support
+
+2021-12-30 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * documentmeta-support.dtx:
+ cleaned up keys and bundle name
+ * added latex-lab-testphase.dtx for wrappers for the testphase
+ key.
+
+2021-12-16 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * README.md:
+ Add the bundle to support project work.
diff --git a/macros/latex/required/latex-lab/documentmetadata-support-code.pdf b/macros/latex/required/latex-lab/documentmetadata-support-code.pdf
new file mode 100644
index 0000000000..a6dadb2e9c
--- /dev/null
+++ b/macros/latex/required/latex-lab/documentmetadata-support-code.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/documentmetadata-support-code.tex b/macros/latex/required/latex-lab/documentmetadata-support-code.tex
new file mode 100644
index 0000000000..c051960ab9
--- /dev/null
+++ b/macros/latex/required/latex-lab/documentmetadata-support-code.tex
@@ -0,0 +1,4 @@
+% this will typeset documentation + code
+
+\AtBeginDocument{\AlsoImplementation}
+\input{documentmetadata-support.dtx}
diff --git a/macros/latex/required/latex-lab/documentmetadata-support-doc.pdf b/macros/latex/required/latex-lab/documentmetadata-support-doc.pdf
new file mode 100644
index 0000000000..1cfe4cdaf7
--- /dev/null
+++ b/macros/latex/required/latex-lab/documentmetadata-support-doc.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/documentmetadata-support-doc.tex b/macros/latex/required/latex-lab/documentmetadata-support-doc.tex
new file mode 100644
index 0000000000..dcf45514d6
--- /dev/null
+++ b/macros/latex/required/latex-lab/documentmetadata-support-doc.tex
@@ -0,0 +1,6 @@
+% this will typeset only documentation but not the code
+
+\AtBeginDocument{\OnlyDescription
+ \let\tableofcontents\relax
+ }
+\input{documentmetadata-support.dtx}
diff --git a/macros/latex/required/latex-lab/documentmetadata-support.dtx b/macros/latex/required/latex-lab/documentmetadata-support.dtx
new file mode 100644
index 0000000000..23053a484a
--- /dev/null
+++ b/macros/latex/required/latex-lab/documentmetadata-support.dtx
@@ -0,0 +1,418 @@
+% \iffalse meta-comment
+%
+%% File: documentmetadata-support.dtx
+% Copyright (C) 2021-2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e
+%
+% for those people who are interested or want to report an issue.
+%
+% \begin{macrocode}
+\def\documentmetadatasupportversion{1.0b}
+\def\documentmetadatasupportdate{2022-14-04}
+% \end{macrocode}
+%
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{documentmetadata-support.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+%\NewDocElement[macrolike = false ,
+% toplevel = true,
+% idxtype = key ,
+% noprint = true ,
+% idxgroup = metadata keys ,
+% printtype = \textit{key}
+% ]{Mkey}{mkey}
+%
+%
+% \title{The \texttt{documentmetadata-support} code\thanks{This file
+% has version \documentmetadatasupportversion\ dated
+% \documentmetadatasupportdate, \copyright\ \LaTeX\
+% Project.}}
+% \author{Frank Mittelbach, Ulrike Fischer, \LaTeX{} Project}
+%
+% \maketitle
+%
+%
+% \section{Introduction}
+%
+% The kernel command \cs{DocumentMetadata}, which can be used as
+% the very first declaration in a document (i.e., before
+% \cs{documentclass}), defines metadata and other configuration
+% data that applies to the document as a whole (using a key/value
+% syntax).
+%
+% While the underlying functionality is still under
+% development (e.g., further keys will be added over time and keys
+% marked temporary may vanish again) the code for
+% \cs{DocumentMetadata} is place in a separate bundle, so that it
+% is easier to update it without the need to build a full \LaTeX{}
+% release. Over time the functionality will move fully into the
+% kernel.
+%
+% From a process perspective \cs{DocumentMetadata} loads the
+% \pkg{pdfmanagement} code the first time it is called and then
+% redefines itself to only manage key/value pairs in case it is
+% called more than once. In particular, this means that a document
+% without a \cs{DocumentMetadata} declaration has no code available
+% for extended management of PDF output as needed for various
+% features developed as part of the multi-year ``Tagged PDF''
+% project~\cite{blueprint}.
+%
+%
+%
+% \section{Currently supported key/values}
+%
+%
+% Currently the following keys are implemented for \cs{DocumentMetadata}:
+% \DescribeMkey{colorprofiles}
+% \DescribeMkey{debug}
+% \DescribeMkey{lang}
+% \DescribeMkey{pdfstandard}
+% \DescribeMkey{pdfversion}
+% \DescribeMkey{testphase}
+% \DescribeMkey{uncompress}
+%
+% \begin{description}
+% \item[\texttt{backend}] Passes the backend name to expl3. This is
+% needed only if the needed backend can't be automatically
+% determined or if the workflow used requires a special backend.
+%
+%^^A This will probably be extended to pass the value also to
+%^^A packages.
+%
+% \item[\texttt{pdfversion}] Sets the PDF version explicitly, e.g., \texttt{pdfversion=1.7}
+% \item[\texttt{uncompress}] (no value) Forces an uncompressed pdf
+% --- mainly for debugging purposes.
+%
+% \item[\texttt{lang}] Explicitly sets the Lang entry in the Catalog,
+% e.g., \texttt{lang=de-DE}. If not given the default value used is |en-US|.
+%
+% \item[\texttt{pdfstandard}] Choice key to set the pdf standard.
+% Currently |A-1b|, |A-2a|, |A-2b|, |A-2u|, |A-3a|, |A-3b|, |A-3u| and |A-4| are accepted as
+% values. The casing is irrelevant, |a-1b| works too.
+% The underlying code to ensure the requirements (as far as they
+% can be ensured) is still incomplete, but a color profile is included and the
+% \texttt{/OutputIntent} is set. The |u| variants for example do not force unicode,
+% but they will pass the information to hyperref and hyperxmp. The |a| variants
+% do \emph{not} enforce (or even test) a tagged pdf yet. The |A-4| support is
+% currently incomplete.
+% More information can be found in the documentation
+% of \pkg{l3pdfmeta}.
+%
+% \item[\texttt{colorprofiles}] This allows to load icc-colorprofiles. Details
+% are described in the documentation of \pkg{l3pdfmeta}.
+%
+% \item[\texttt{testphase}] This key is used to load testphase code. The values it accepts
+% and their effect will change over time, when testphase packages are added or
+% removed or when the code is moved into the kernel.
+% \begin{description}
+% \item[\texttt{phase-I}]
+% This value loads code implementing the first phase of the project~\cite{blueprint}, i.e., it
+% will load the tagpdf package. It will also activate tagging by issuing
+% |\tagpdfsetup{activate,interwordspace}|. This phase
+% is frozen.
+% \item[\texttt{phase-II}]
+% This is the current development phase.
+% Currently it differs from \texttt{phase-I} only in one point: It will
+% additionally activate tagging of paragraphs with
+% |\tagpdfsetup{paratagging}|. In the upcoming months it will
+% also enable automatic tagging of other basic document elements.
+% \end{description}
+% The |testphase| key can only be used in the first \cs{DocumentMetadata}.
+%
+% \item[\texttt{debug}] This key activates some debug options. It takes a list of key-values
+% as value. Currently the following keys are known:
+% \begin{description}
+% \item[\texttt{para}] with the default and only value |show|. It will activate the |paratagging-show|
+% option of \pkg{tagpdf},
+% \item[\texttt{log}] with the values as described in the documentation \pkg{tagpdf},
+% \item[\texttt{uncompress}] which does the same as |uncompress| as main key
+% \item[\texttt{pdfmanagement}] a boolean which allows to deactivate the pdfmanagement.
+% \item[\texttt{firstaidoff}] This accepts a comma lists of keywords and disables the patches
+% related to them. More information can be found in the documentation of
+% \pkg{pdfmanagement-firstaid}.
+% \end{description}
+% \end{description}
+%
+% \bibliographystyle{plain}
+%
+% \begin{thebibliography}{9}
+%
+% \bibitem{blueprint} Frank Mittelbach and Chris Rowley:
+% \emph{\LaTeX{} Tagged PDF\,---\,A blueprint for a large project}.
+% \url{https://latex-project.org/publications/indexbyyear/2020/}
+%
+% \end{thebibliography}
+%
+%
+%
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
+%
+% \begin{implementation}
+%
+% \section{The Implementation}
+%
+%
+% \begin{macrocode}
+%<@@=pdfmanagement>
+%<*code>
+% \end{macrocode}
+%
+% \begin{macrocode}
+
+\RequirePackage{pdfmanagement-testphase}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn\makeatletter
+% \end{macrocode}
+
+
+
+% \begin{macro}{\DocumentMetadata}
+%
+% \cs{DocumentMetadata} should not be used after
+% \cs{documentclass} so we error in this case.
+% It can be used more than once
+% but follow-up calls should not do the initialization code.
+% \begin{macrocode}
+\cs_set_protected:Npn \DocumentMetadata #1
+ {
+ \cs_if_eq:NNTF \documentclass \@twoclasseserror
+ { \msg_error:nn { meta } { after-class } }
+ {
+% \end{macrocode}
+%
+% The wanted backend must be detected first, we read the init
+% key and then force the loading of the backend.
+% The backend can contain management commands, so the boolean should
+% be set to true first.
+% \begin{macrocode}
+ \bool_gset_true:N \g_@@_active_bool
+ \keys_set_groups:nnn { document / metadata} {init}{ #1 }
+ %if no backend has been loaded force it now:
+ \str_if_exist:NF \c_sys_backend_str
+ {
+ \sys_load_backend:n {}
+ }
+% \end{macrocode}
+% Now we load the extra backend code:
+% \begin{macrocode}
+ \ExplSyntaxOn\makeatletter
+ \file_input:n {l3backend-testphase-\c_sys_backend_str.def}
+ \ExplSyntaxOff\makeatother
+% \end{macrocode}
+% Set the default language (this requires that the backend has been loaded),
+% process the rest of the keys,
+% and setup the generic driver.
+% \begin{macrocode}
+ \keys_set_filter:nnn { document / metadata } { init } { lang=en-US, #1 }
+ \bool_if:NT \g_@@_active_bool
+ {
+ \PassOptionsToPackage{customdriver=hgeneric-testphase}{hyperref}
+ }
+% \end{macrocode}
+% \cs{pdfmanagement_add:nnn} has collected values in this hook.
+% \begin{macrocode}
+ \hook_use_once:n {pdfmanagement/add}
+% \end{macrocode}
+% Now we redefine \cs{DocumentMetadata} so that it only process the
+% keys on any further calls.
+%
+% We need to update the hyperref option if the active status changes.
+% \begin{macrocode}
+ \cs_set_protected:Npn \DocumentMetadata ##1
+ {
+ \keys_set_filter:nnn { document / metadata } { init } { ##1 }
+ \str_remove_all:cn {opt@hyperref.sty}{customdriver=hgeneric-testphase}
+ \bool_if:NT \g__pdfmanagement_active_bool
+ {
+ \PassOptionsToPackage{customdriver=hgeneric-testphase}{hyperref}
+ }
+ }
+% \end{macrocode}
+% Load more modules, the testphase code and the firstaid code. The code is only
+% loaded in the first \cs{DocumentMetadata} call!
+% \begin{macrocode}
+ \g_@@_testphase_tl
+ \RequirePackage{pdfmanagement-firstaid}
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+
+
+
+
+% \begin{macrocode}
+%FMi defined elsewhere
+%FMi
+%FMi \clist_new:N \g_@@_firstaidoff_clist
+%FMi \tl_new:N \g_@@_testphase_tl
+% UFi should the definition move to here?
+\keys_define:nn { document / metadata }
+ {
+ backend .choices:nn =
+ { dvipdfmx , dvips , dvisvgm , luatex , pdftex , pdfmode , xdvipdfmx , xetex }
+ {
+ \sys_load_backend:n {#1}
+ },
+ backend .groups:n = { init } ,
+ }
+
+\keys_define:nn { document / metadata }
+ {
+ ,pdfversion .code:n =
+ {
+ \pdf_version_gset:n { #1 }
+ \AddToDocumentProperties[document]{pdfversion}{#1}
+ }
+ ,uncompress .code:n =
+ {
+ \pdf_uncompress:
+ }
+ ,uncompress .value_forbidden:n = true
+ ,lang .code:n =
+ {
+ \pdfmanagement_add:nnn {Catalog} {Lang}{(#1)}
+ \AddToDocumentProperties[document]{lang}{#1}
+ }
+ %,xmpmeta .bool_gset:N = \g_pdfmeta_xmp_bool %see pdfmeta unused and undefined for now!
+ % this uses internal command from pdfmeta, it should probably move there ...
+ ,pdfstandard .code:n =
+ {
+ \exp_args:Nnx
+ \keys_set:nn {document / metadata} {_pdfstandard=\str_uppercase:n{#1}}
+ }
+ ,_pdfstandard .choices:nn =
+ {A-1B,A-2A,A-2B,A-2U,A-3A,A-3B,A-3U,A-4}
+ {
+ \prop_if_exist:cT { g__pdfmeta_standard_pdf/#1_prop }
+ {
+ \prop_gset_eq:Nc \g__pdfmeta_standard_prop { g__pdfmeta_standard_pdf/#1 _prop }
+ }
+ \AddToDocumentProperties [document]{pdfstandard}{#1}
+ }
+ ,_pdfstandard / unknown .code:n =
+ {
+ \msg_warning:nnn{pdf}{unknown-standard}{#1}
+ }
+ ,testphase .multichoice:
+ ,testphase / tagpdf .code:n =
+ {
+ \tl_gput_right:Nn\g_@@_testphase_tl
+ {
+ \file_if_exist_input:nF {tagpdf-latex-lab-testphase.ltx}
+ {
+ \RequirePackage{tagpdf}
+ \AddToDocumentProperties [document]{testphase/tagpdf}{loaded}
+ \tagpdfsetup{activate,paratagging,interwordspace}
+ \AddToDocumentProperties [document]{tagging}{active}
+ \AddToDocumentProperties [document]{tagging/para}{active}
+ \AddToDocumentProperties [document]{tagging/interwordspace}{active}
+ }
+ }
+ }
+ ,testphase / unknown .code:n =
+ {
+ \tl_gput_right:Nn\g_@@_testphase_tl
+ {
+ \AddToDocumentProperties [document]{testphase/#1}{loaded}
+ \file_if_exist_input:nF {#1-latex-lab-testphase.ltx}
+ {
+ \msg_warning:nnn{meta}{latex-lab-pkg-missing}{#1}
+ \AddToDocumentProperties [document]{testphase/#1}{missing}
+ }
+ }
+ }
+ ,activate .multichoice:
+ ,activate / tagging .code:n =
+ {
+ \PackageWarning{pdfmanagement-testphase}
+ {The~activate~key~is~deprecated.\MessageBreak
+ Tagging~is~activated~with~'testphase=tagpdf'~directly}{}
+ }
+ ,debug .code:n =
+ {
+ \keys_set:nn { document / metadata / debug } {#1}
+ }
+ ,debug / para .code:n =
+ {
+ \AddToHook
+ {
+ package/tagpdf/after
+ }
+ {
+ \tagpdfsetup{paratagging-show}
+ }
+ }
+ ,debug / log .code:n =
+ {
+ \AddToHook
+ {
+ package/tagpdf/after
+ }
+ {
+ \tagpdfsetup{log=#1}
+ }
+ }
+ ,debug / uncompress .code:n =
+ {
+ \pdf_uncompress:
+ }
+ ,debug / pdfmanagement .bool_gset:N = \g_@@_active_bool
+ ,debug / firstaidoff .clist_gset:N = \g_@@_firstaidoff_clist
+ }
+
+
+% \end{macrocode}
+% \subsection{Messages}
+% \begin{macrocode}
+%UFi is meta the right module name here?
+\prop_gput:Nnn \g_msg_module_type_prop { meta } { LaTeX }
+\prop_gput:Nnn \g_msg_module_name_prop { meta } { DocumentMetadata }
+
+\msg_new:nnn { meta } { after-class }
+ {
+ \token_to_str:N \DocumentMetadata \c_space_tl
+ should~be~used~only~before~\token_to_str:N\documentclass
+ }
+\msg_new:nnn { meta } { latex-lab-pkg-missing }
+ {
+ LaTeX-lab~package~'#1'~not~found.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOff\makeatother
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</code>
+% \end{macrocode}
+%
+% \end{implementation}
+%
+% \Finale
+%
diff --git a/macros/latex/required/latex-lab/latex-lab-footnotes.dtx b/macros/latex/required/latex-lab/latex-lab-footnotes.dtx
new file mode 100644
index 0000000000..330ae7b0cc
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-footnotes.dtx
@@ -0,0 +1,1822 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-footnotes.dtx
+% Copyright (C) 2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-footnotes.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \title{The \texttt{latex-lab-footnotes} code\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
+% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
+% \providecommand\class[1]{\texttt{#1.cls}}
+% \providecommand\pkg[1]{\texttt{#1}}
+% \providecommand\hook[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \emph{to be written}
+% \end{abstract}
+%
+% \tableofcontents
+%
+%
+% \section{Introduction}
+%
+% This code reimplements the footnote interfaces for \LaTeX{}
+% offering configurable methods for layout and functionality
+% adjustments that avoid overwriting each other when used in
+% classes as well as in packages (as far as possible --- obviously
+% some adjustments are mutally exclusive). This is achieved by
+% providing a a larger number of hooks (for areas where different
+% packages/classes can easily coexist with their adjustments) and a
+% number of configuration points to which only one class or package
+% can write to successfully (in case of multiple changes the the
+% last one wins). The latter are for special functionality, e.g.,
+% if footnote text is typeset as a single paragraph, it can't be configured
+% the same time to be typeset vertically with one footnote below
+% each other.
+%
+% The interfaces are set up to support tagged PDF, but in order
+% for this to work, all packages altering the fontnote setup should
+% use the inferfaces provided here and not do it through the
+% legacy methods (though there is some support for the latter as
+% well, but if will not work in a cases).
+%
+% \subsection{Configuration methods}
+%
+% Historically, the footnote setup in \LaTeX{} was done by
+% providing definitions for \cs{@makefnmark} (format the footnote
+% mark in running text and in front of the footnote text) and
+% \cs{@makefntext} (formatting the footnote text and placing a mark
+% in front of it).
+%
+% There was a default definition for \cs{@makefnmark} in the format
+% that was used by most document classes,
+% but \cs{@makefntext} had to be defined in the class itself because
+% the format didn't provide a default. As a result you will find
+% definitions for the latter in all document classes and defintions
+% for \cs{@makefnmark} only in very few.
+%
+% Furthermore, to enable special footnote layouts or provide
+% additional functionality a few packages (and a few classes)
+% overwrote other internal commands of \LaTeX's footnote
+% mechanism. The commands affected in this way are mainly
+% \cs{@footnotemark} and \cs{@footnotetext}. These overwrites could
+% not be used in combination, so either the packages/classes had to
+% be aware of being loaded together (which they sometimes did or
+% tried to) or they would fail by overwriting each other
+% unconditionally.
+%
+% The present rewrite is an attempt to improve this situation, but
+% of course, it will only work if all packages/classes make use of
+% the new interfaces. Fortunately, the number of problematical
+% packages altering these internal commands are fairly small so
+% arranging for updates is a realistic goal --- to achieve properly
+% tagged PDF it is a requirement.
+%
+%
+%
+% \section{Hooks and configuration points}
+%
+% Note: the configuration points do not have an interface mechanism
+% yet and all their names are temporary right now.
+% Also note that configuration points are of interest only to very
+% few specialized packages, mainly \pkg{footmisc}, and packages
+% providing similar functionality---the current documentation is
+% therefore fairly sketchy.
+%
+% In contrast the hooks are of interest to many classes to provide
+% their layout alterations in a way that it works smoothly with
+% other packages handling aspects of foonote formatting.
+%
+%
+% \subsection{Formatting the mark in the main text}
+%
+% This implements formatting the mark\footnote{Like this one.} and
+% its relation to surrounding text, e.g., if several marks appear
+% in the same place, etc.
+%
+%
+% \subsubsection{Configuration points}
+%
+% None: everything is implemented through a single definition for
+% \cs{@footnotemark} that offers a number of hooks that can be used
+% by packages to implement handling of multiple marks and the
+% formatting of marks.
+%
+%
+% \subsubsection{Hooks}
+%
+% The hooks to customize the marks in the text are the following:
+% \begin{description}
+% \item[\hook{fnmark/before}]
+%
+% Executed at the very beginning of \cs{footnotemark}. Currently
+% there are two packages (\pkg{bibarts} and \pkg{chextras}) that
+% prepend material at this point (not ncessarily correctly, e.g.,
+% they do not all check that they are in horizontal mode).
+%
+% This hook is paired with hook \hook{fnmark/after}.
+%
+% \item[\hook{fnmark}]
+%
+% Executed in horizontal mode and after the current space factor
+% has been saved away for reuse. This is where currently code for multiple
+% marks does its preparation (as done by \pkg{footmisc} and
+% others).
+%
+% The hook is only executed in hmode, i.e., not if the mark is
+% generated in math --- maybe that means the multiple handling
+% should happen later?
+%
+% After the hook \cs{nobreak} is executed, so any
+% ``material'' added in the hook is tied to the following mark
+% unless it contains its own permissible penalty.
+%
+% \item[\hook{fnmark/begin}]
+%
+% This hook is executed directly in front of the typeset mark.
+% This is the place where \pkg{hyperref} adds part of its code,
+% i.e., after the \cs{nobreak} mentioned above. With a closer
+% integration of \pkg{hyperref} this hook may not be necessary at
+% all.
+%
+% \item[\hook{fnmark/end}]
+%
+% This hook is executed directly after the typeset mark. It is
+% used by \pkg{hyperref}, \pkg{memhfixc}, \pkg{scrlttr2}, and
+% \pkg{footmisc}. Used, for example, to implement support for
+% multiple marks in succession.
+%
+% It is \emph{not} a reversed hook.
+%
+%
+% \item[\hook{fnmark/after}]
+%
+% This hook is executed at the very end of the \cs{footnotemark} command.
+%
+% It is a reversed hook to pair with \hook{fnmark/before}
+% \end{description}
+%
+%
+%
+%
+% \subsubsection{Additional configuration possibilities}
+%
+% The actual formatting is done through \cs{@makefnmark} --- no
+% special customization support for now.
+%
+%
+%
+% \subsection{Formatting the footnote text}
+%
+% This implements the formatting of the footnote text the way it
+% appears at the bottom of the page (default case), or possibly
+% elsewhere, e.g. in the margin.
+%
+% \subsubsection{Configuration points}
+%
+% To cater for different layout configurations there are four
+% configuration points which can be set only by one package or
+% class, if two packages/classes set them they are mutually
+% incompatible.
+% These are:
+% \begin{description}
+% \item[\cs{@footnotetext@cfgpoint} (1 argument)]
+%
+% This receives all material that is to be processed (or stored)
+% including color protection code and what have you. The default
+% definition is to run \cs{insert}\cs{footins}.
+%
+% \item[\cs{@footnotetext@cfgpointii} (1 argument)]
+%
+% The default definition runs \cs{@makefntext} which contains
+% various hooks for customization. For most scenarios this is
+% sufficient. However, when running all footnotes as a single
+% paragraph at the bottom, then each footnote needs to be
+% prepared prior to storing in the insert and this configuration
+% point allows running extra code to do that.
+%
+% \item[\cs{@footnotetext@cfgpointiii} (no argument)]
+%
+% By default this configuration point adds a strut to the
+% footnote material. so that consecutive footnotes are properly
+% spaced vertically. In some use cases this is not appropriate
+% (e.g., when running all footnotes s a single paragraph) and so
+% this configuration point can cancel the action or do something
+% else instead.
+%
+% The configuration point is executed near the start of the
+% argument for the configuration point
+% \cs{@footnotetext@cfgpointii}.
+%
+% \item[\cs{@footnotetext@cfgpointiv} (no argument)]
+%
+% This configuration point is executed at the very end of the
+% argument passed to \cs{@footnotetext@cfgpointii}.
+% By default it adds a final strut as long as we are still in
+% horizontal mode (i.e., processing the footnote text paragraph.
+% When running several footnotes in one paragraph some additional
+% material (some horizontal glue) needs adding at this point.
+%
+% \end{description}
+% The configuration point \cs{@footnotetext@cfgpointii} runs
+% \cs{@makefntext} and this command contains two further
+% configuration points (and a few hooks):
+% \begin{description}
+% \item[\cs{@makefntext@cfgpoint} (1 argument)]
+%
+% This configuration point receives the material to typeset the
+% footnote mark. By default, all it does is running \cs{indent}
+% to get a paragraph indentation (if one is set up---in most
+% layouts it is 0~points) and then typesets the mark, but in
+% some designs it executes more elaborate code.
+%
+% If tagging is produced this configuration point is also
+% responsible for surrounding the mark with the appropriate tags
+% marking the mark as an Lbl. It does this using the command \cs{tag@FELbl}.
+%
+% \item[\cs{@makefntext@cfgpointii} (1 argument)]
+%
+% This configuration point manages the formatting of the footnote
+% text once the mark has been typeset.
+%
+% If tagging is produced this configuration point is also
+% responsible for surrounding the mark with the appropriate tags
+% marking the mark as an MC of type FENote. It does this using
+% the command \cs{tag@FENote}.
+%
+% \end{description}
+%
+%
+% The above configuration points are sufficient to implement all
+% commonly used footnote layouts assuming L-R typesetting. For R-L
+% typesetting they or may or may not need some extension (though
+% that is not clear right now).
+%
+%
+%
+% \subsubsection{Hooks}
+%
+% \begin{description}
+% \item[\hook{fntext/before}]
+%
+% Executed at the very beginning of \cs{footnotetext}. Currently
+% there is on package (\pkg{linguex}) that
+% prepends material at this point.
+%
+% This hook is paired with hook \hook{fnmark/after}.
+%
+% \item[\hook{fntext}]
+%
+% Executed at the beginning of the material passed to the first
+% configuration point. Typically used to set any baseline
+% stretch for the footnote text, e.g., by \pkg{setspace},
+% \pkg{footmisc}, \class{uathesis} and others. Could be done in a
+% later hook but is a bit more efficient here.
+%
+% After the hook has run, the font is established, i.e., it can't
+% be used to set a different font size.
+%
+% \item[\hook{fntext/para}]
+%
+% After the font is set default paragraph parameters are set up
+% including \cs{interlinepenalty}, \cs{hsize}, \cs{parindent} and
+% a number of others, as some of them depend on the font
+% size. Then the \hook{fntext/para} is run. If one wants to
+% change the font size, it is probably necessary to reset these
+% other parameters too, e.g., \cs{parindent}, which can be done
+% here.
+%
+% The configuration point \cs{@footnotetext@cfgpointii} normally
+% runs the command \cs{@makefntext} or some code that eventually
+% runs this command, and this then produces the footnote mark (in
+% front of the footnote text) and the formatted footnote text. In
+% front of both the mark and the footnote text some classes have
+% placed paragraph parameter adjustments in their redefinition of
+% \cs{@makefntext}. However, there is no need to place it there
+% it could equally well go into the \hook{fntext/para} hook. We
+% therefore do not provide another hook at this point.
+%
+% \item[\hook{fntext/begin} \& \hook{fntext/end}]
+%
+% The footnote text itself is surrounded by the hooks
+% \hook{fntext/begin} and \hook{fntext/end}. The two hooks are
+% not paired as they are typically used independently.
+%
+% \item[\hook{fntext/after}]
+%
+% At the very end of \cs{footnotetext} we execute the hook
+% \hook{fntext/after} which is a reversed hook paired with
+% \hook{fntext/before}. Some packages, e.g., \pkg{linuex}, have
+% code in that position.
+%
+% \end{description}
+%
+%
+%
+%
+% \subsubsection{Additional configuration possibilities}
+%
+% The formatting of the footnote mark in front of the footnote
+% texts is influenced by the setting of the dimen parameter
+% \cs{footnotemargin}. By default its value is 1.8em in the current
+% text font (or \texttt{-}\cs{maxdimen} when the para option is
+% chosen). The following rules apply:
+% \begin{itemize}
+% \item
+%
+% If it has the value \texttt{-}\cs{maxdimen} then the mark is
+% generated by \cs{@makefnmark}.
+%
+% \item
+%
+% Otherwise, if the value is
+% negative then the mark is placed into an \cs{llap} left aligned
+% in a box of size \texttt{-}\cs{footnotemargin}.
+%
+% \item
+%
+% If the value is zero an \cs{llap} is used without an inner box.
+%
+% \item
+%
+% If the value is greater zero (but less than \cs{maxdimen}) the
+% mark is placed right aligned into a box of size
+% \cs{footnotemargin}.
+%
+% \item
+%
+% The value \cs{maxdimen} is used as a marker to indicate that
+% no value was given and that the default should be used,
+% i.e. 1.8em or \texttt{-}\cs{maxdimen} depending on the chosen
+% option.
+% \end{itemize}
+%
+%
+% \section{Tagging support}
+%
+% \emph{To be documented}
+%
+%
+%
+%
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% All this is very rough and misses a lot of documentation.
+%
+% \begin{macrocode}
+%<*kernel>
+%<@@=fnote>
+% \end{macrocode}
+%
+% \subsection{File declaration}
+% \begin{macrocode}
+\ProvidesFile{latex-lab-footnotes.ltx}
+ [2022-03-10 v0.6a changes to the footnote interfaces]
+% \end{macrocode}
+%
+% \begin{macrocode}
+
+% latex.ltx
+
+ % not looked at yet
+
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \def\@currentcounter{mpfootnote}%
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \par
+ \color@endgroup}}
+
+
+\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
+
+
+
+\def\@mpfn{footnote}
+\def\thempfn{\thefootnote}
+
+
+
+%-------------------------------------
+
+
+\ExplSyntaxOn
+
+
+\cs_new_protected:Npn \fnote_step_fnmark:nn #1#2 {
+ \tl_if_novalue:nTF {#1}
+ {
+ \stepcounter {#2}
+ \protected@xdef \@thefnmark { \use:c { the#2 } }
+ }
+ {
+ \group_begin:
+% \end{macrocode}
+% Note that this is a local assignment even though \LaTeX{}
+% counters are normally globally changed. This is the way it was in
+% 2e and so far we haven't changed it. The alternative would be to
+% store the current value and restore it after \cs{@thefnmark} is
+% altered.
+% \begin{macrocode}
+ \int_set:cn { c@#2 }{ #1 }
+ \unrestored@protected@xdef \@thefnmark { \use:c { the#2 } }
+ \group_end:
+ }
+}
+
+\cs_new_protected:Npn \fnote_set_fnmark:nn #1#2 {
+ \tl_if_novalue:nTF {#1}
+ {
+ \protected@xdef \@thefnmark { \use:c { the#2 } }
+ }
+ {
+ \group_begin:
+ \int_set:cn { c@#2 }{ #1 }
+ \unrestored@protected@xdef \@thefnmark { \use:c { the#2 } }
+ \group_end:
+ }
+}
+
+%-------------------------------------
+
+% the debugging code is just temp
+\bool_new:N \g_fnote_debug_bool
+\bool_gset_true:N \g_fnote_debug_bool % for now we have debugging turned on by default
+
+%-------------------------------------
+
+
+
+\NewMirroredHookPair{fnmark/before}{fnmark/after}
+\NewHook{fnmark}
+\NewHook{fnmark/begin}
+\NewHook{fnmark/end}
+
+
+\cs_new:Npn \@@_debug_footnotemark: {
+ \bool_if:NT \g_fnote_debug_bool
+ {
+ \LogHook{fnmark/before}
+ \LogHook{fnmark}
+ \LogHook{fnmark/begin}
+ \LogHook{fnmark/end}
+ \LogHook{fnmark/after}
+ \cs_gset_eq:NN \@@_debug_footnotemark: \prg_do_nothing:
+ }
+}
+
+
+\cs_new_protected:Npn \fnote_footnotemark: {
+ \@@_debug_footnotemark:
+%-------
+% bibarts
+% chextras --- actually in the wrong place does an \unskip
+ \UseHook{fnmark/before}
+%-------
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}
+%-------
+% bxjsja-minimal.def --- what they do could be done at ``bibarts''
+% (a bit less efficient)
+% memhfixc.sty
+% footmisc.sty
+ \UseHook{fnmark}
+%-------
+ \nobreak
+ \fi
+%-------
+% hyperref.sty
+ \UseHook{fnmark/begin}
+%-------
+ \@kernel@process@makefnmark
+ \@makefnmark
+%-------
+% \end{macrocode}
+% If a footnote mark is placed by its own then it should finish by
+% executing \hook{fnmark/end}, resetting the space factor, and
+% finishing with \hook{fnmark/after}. However, inf a complete
+% footnote these actions have to happen only after we have handled
+% the footnote text (e.g., by placing it into an \cs{insert}. In
+% such a situation \cs{_@@_footmark_finish:} below does nothing
+% and the action is carried out later.
+% \begin{macrocode}
+ \@@_footnotemark_finish:
+}
+
+
+\cs_new:Npn \@@_finish: {
+% hyperref.sty
+% memhfixc.sty --- could move fnmark/after
+% scrlttr2.cls --- could vanish if footmisc uses a hook
+% footmisc.sty
+ \UseHook{fnmark/end}
+%-------
+ \ifhmode
+ \spacefactor \@x@sf \relax
+ \fi
+%
+%-------
+ \UseHook{fnmark/after}
+%-------
+}
+
+
+\cs_new_eq:NN \@@_footnotemark_finish: \@@_finish:
+
+
+
+% Not a public config point but the kernel hook to add tagging
+\def \@kernel@process@makefnmark { }
+
+
+% alterations not covered:
+%
+% ./arabtex/afoot.sty --- too different (and probably too old)
+
+
+% Provide the name \LaTeXe{} is used to.
+
+\cs_set_eq:NN \@footnotemark \fnote_footnotemark:
+
+
+
+%-------------------------------------
+
+\NewMirroredHookPair{fntext/before}{fntext/after}
+\NewHook{fntext}
+\NewHook{fntext/para}
+\NewHook{fntext/begin}
+\NewHook{fntext/end}
+
+
+\cs_new:Npn \@@_debug_footnotetext: {
+ \bool_if:NT \g_fnote_debug_bool
+ {
+ \cs_log:N\@footnotetext@cfgpoint
+ \cs_log:N\@footnotetext@cfgpointii
+ \cs_log:N\@footnotetext@cfgpointiii
+ \cs_log:N\@footnotetext@cfgpointiv
+ \cs_log:N\@makefntext@cfgpoint
+ \cs_log:N\@makefntext@cfgpointii
+ \LogHook{fntext/before}
+ \LogHook{fntext}
+ \LogHook{fntext/para}
+ \LogHook{fntext/begin}
+ \LogHook{fntext/end}
+ \LogHook{fntext/after}
+% \end{macrocode}
+% Show the info only once (if at all).
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_debug_footnotetext: \prg_do_nothing:
+ }
+ }
+
+\cs_new_protected:Npn \fnote_footnotetext:n #1 {
+ \@@_debug_footnotetext:
+%-------
+% ./linguex/linguex.sty
+ \UseHook{fntext/before}
+%-------
+ \@kernel@process@footnotetext
+ \@footnotetext@cfgpoint { % config point
+%-------
+% resetting baselinestretch ... (could be done further down)
+% ./uafthesis/uafthesis.cls
+% ./setspace/setspace.sty
+% ./footmisc/footmisc.sty (normal)
+ \UseHook{fntext}
+%-------
+ \reset@font
+ \footnotesize
+%-------
+% some classes use a different font size, e.g.,
+% ./nrc/nrc1.cls ./nrc/nrc2.cls
+% but those could be done in fntext/para instead
+%-------
+% \end{macrocode}
+% In case of sidenotes the next settings are pointless, but as they
+% do not hurt (except for the \cs{hsize} setting) and are needed
+% for all other cases we make them here and overwrite them for side notes
+% \begin{macrocode}
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \parindent 1em % typical default used in \@makefntext moved up here
+ \def\@currentcounter{footnote}
+ \protected@edef \@currentlabel { \p@footnote \@thefnmark }
+%-------
+% for altering para parameters ...
+% code for resphilosophica came earlier but it could go here.
+% Has the advantage that one can also overwrite \cs{@currentcounter}
+% and \cs{@currentlabel} is that is necessary.
+%
+% ./resphilosophica/resphilosophica.cls
+ \UseHook{fntext/para}
+%-------
+ \color@begingroup
+%-------
+% fnpara wants to replace \@makefntext{...} and para and side option of footmisc etc too ...
+% so we make this a config point
+%-------
+ \@footnotetext@cfgpointii % config point
+ {
+%-------
+% ./resphilosophica/resphilosophica.cls
+%-------
+ \@footnotetext@cfgpointiii % config point
+%-------
+% bibarts
+% fnbreak.sty
+ \UseHook{fntext/begin}
+%-------
+ \ignorespaces
+ #1
+%-------
+% bibarts
+% fnbreak.sty
+ \UseHook{fntext/end}
+%-------
+ \@footnotetext@cfgpointiv % config point
+ }
+ \par
+ \color@endgroup
+ }
+%-------
+% ./linguex/linguex.sty
+ \UseHook{fntext/after}
+%-------
+}
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@footnotetext@cfgpoint { \insert\footins }
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@footnotetext@cfgpointii { \@makefntext }
+
+
+% default for config point (0 args)
+\cs_new_protected:Npn \@footnotetext@cfgpointiii { \rule\z@\footnotesep }
+
+% default for config point (0 args)
+\cs_new_protected:Npn \@footnotetext@cfgpointiv { \@finalstrut\strutbox }
+
+
+% kernel hook for tagging (2 args)
+\cs_new_protected:Npn \@kernel@process@footnotetext {}
+
+% Provide the name \LaTeXe{} is used to and do this unconditionally
+% (no patching of class code if any). This means that if a class provides it own
+% definition that gets lost and if necessary needs to be handled
+% with firstaid (or updating of the class.
+
+\AddToHook{begindocument}{
+ \cs_set_eq:NN \@footnotetext \fnote_footnotetext:n
+}
+
+% alterations not covered:
+%
+% ./revtex4-1/revtex4-1.cls ./revtex/ltxutil.sty ./revtex/revtex4-2.cls ... (need analysis)
+% ./bigfoot/bigfoot.sty
+
+
+
+% \footnotemargin is the logic implemented by footmisc. Perhaps we
+% don't want to do this like that in the kernel but for now I have
+% used this interface unchanged.
+
+
+\newdimen\footnotemargin
+\footnotemargin\maxdimen % no value given
+
+\AtBeginDocument{
+ \ifdim \footnotemargin=\maxdimen
+ \setlength\footnotemargin{1.8em}
+ \fi
+}
+
+
+\cs_new_protected:Npn \fnote_makefntext:n #1 {
+% \end{macrocode}
+% Some classes in their redefinition for \cs{@makefntext} have
+% places some paragraph parameters at this point, but those can
+% equally well go into the hook \hook{fntext/para}. We therefore do
+% not provide a further hook at this point.
+% \begin{macrocode}
+ \@makefntext@cfgpoint
+ {
+ \ifdim\footnotemargin>\z@
+ \hb@xt@ \footnotemargin{\hss\@makefnmark}
+ \else
+ \ifdim\footnotemargin=\z@
+ \llap{\@makefnmark}
+ \else
+ \ifdim\footnotemargin=-\maxdimen
+ \@makefnmark
+ \else
+ \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}
+ \fi
+ \fi
+ \fi
+ }
+ \@makefntext@cfgpointii
+ { #1 }
+}
+
+
+
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@makefntext@cfgpoint { \noindent }
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@makefntext@cfgpointii #1 { #1 }
+% \end{macrocode}
+%
+%
+%
+% If the definition for \cs{@makefntext} is that of the standard
+% classes then replace it with \cs{fnote_makefntext:n}, otherwise
+% try to patch the definition.
+%
+% Here is the the definition the way it is in
+% \texttt{classes.dtx}. Notice that (for saving space) there is no
+% space after \texttt{em} to terminate the assignment. We need to
+% mimic that, otherwise a test would return false even if the
+% definition has not been modified.
+%
+% \begin{macrocode}
+\newcommand\old@std@class@makefntext[1]{%
+ \parindent 1em%
+ \noindent
+ \hb@xt@1.8em{\hss\@makefnmark}#1}
+
+% \end{macrocode}
+% Here is the messy code for patching. Note that this is only there
+% to help classes along that aren't updated yet so it does some
+% minimal patching to hopefully add configuration points in the
+% right place.
+%
+% What it does is roughly the
+% following: It look for a definition of \cs{@makefntext} of the form
+%\begin{verbatim}
+% {AAA \hbox BBB { CCC } DDD #1 EEE }
+%\end{verbatim}
+% where ``BBB'' is something like \texttt{to 1em} or similar. It then
+% replaces that with
+%\begin{verbatim}
+% {AAA \@makefntext@cfgpoint{\hbox BBB { CCC }} DDD
+% \@makefntext@cfgpointii{#1} EEE }
+%\end{verbatim}
+% The patching is not very careful, i.e., it assumes there is only
+% one \verb=#1= in the replacement text and that a \cs{hbox} found
+% is the right one to patch. But that is enough to cater for all
+% definitions of \cs{@makefntext} out there in the TL distribution.
+%
+% If \cs{hbox} is not found it tries the same looking for
+% \cs{hb@xt@} which is what some classes use and if that is not
+% found either it assume that this is a version that uses
+% \cs{@makefnmark} without surrounding it in a box and if that
+% fails it gives up with an \cs{ERROR} (which needs to get a proper definition).
+% \begin{macrocode}
+
+\tl_new:N \l_@@_patch_tl
+\cs_new_eq:NN \@@_tmp:w \ERROR
+
+\cs_new_protected:Npn \@@_patch:
+ {
+ \tl_set:No \l_@@_patch_tl { \@makefntext { \@makefntext@cfgpointii{##1} } }
+ \tl_if_in:NnTF \l_@@_patch_tl { \hbox }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_hbox:w }
+ {
+ \tl_if_in:NnTF \l_@@_patch_tl { \hb@xt@ }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_hb@xt@:w }
+ {
+ \tl_if_in:NnTF \l_@@_patch_tl { \@makefnmark }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_@makefnmark:w }
+ { \ERROR
+ \cs_set_eq:NN \@@_tmp:w \exp_stop_f: }
+ }
+ }
+ \tl_set:Nf \l_@@_patch_tl
+ { \exp_after:wN \@@_tmp:w \l_@@_patch_tl }
+ \cs_set:Npn \@@_tmp:w { \long \def \@makefntext ####1 }
+ \exp_after:wN \@@_tmp:w \exp_after:wN { \l_@@_patch_tl }
+ }
+% \end{macrocode}
+%
+% If \cs{@makefntext} contains \cs{hbox} then grab ``AAA'' as
+% \verb=#1= and ``BBB'' (up to the open \verb={=) and return it as
+%\begin{verbatim}
+% AAA \@makefntext@processX { \hbox BBB }
+%\end{verbatim}
+% \begin{macrocode}
+\cs_new:Npn \@@_patch_hbox:w #1 \hbox #2 #
+ { \exp_stop_f: #1 \@makefntext@processX { \hbox #2 } }
+% \end{macrocode}
+% Same for the other cases.
+% \begin{macrocode}
+\cs_new:Npn \@@_patch_hb@xt@:w #1 \hb@xt@ #2 #
+ { \exp_stop_f: #1 \@makefntext@processX { \hb@xt@ #2 } }
+\cs_new:Npn \@@_patch_@makefnmark:w #1 \@makefnmark
+ { \exp_stop_f: #1 \@makefntext@processX { \use:n } { \@makefnmark } }
+% \end{macrocode}
+%
+% The code provided by Bruno above expects 2 arguments but we need a
+% different structure so this is a simple reshuffling. Would be
+% better if we can patch the right structure in directly, but I'm
+% not a patch person, so this is the simple way out for now:
+%
+% \begin{macrocode}
+\cs_new:Npn \@makefntext@processX #1#2{\@makefntext@cfgpoint{#1{#2}}}
+% \end{macrocode}
+% At \verb=\begin{document}= check if the current definition is
+% that of the standard classes and if so replace it by
+% \cs{fnote_makefntext:n} otherwise try and patch the definition
+% using the approach above.
+% \begin{macrocode}
+
+\AddToHook{begindocument}{
+ \cs_if_eq:NNTF \@makefntext \old@std@class@makefntext
+ {
+ \cs_set_eq:NN \@makefntext \fnote_makefntext:n
+ }
+ {
+ \@@_patch:
+ }
+}
+
+
+% possibly add the following to check for multiple \hbox in
+% the definition:
+%
+% \seq_set_split:NnV \l_@@_patch_seq { \hbox } \l_@@_patch_tl
+% \int_compare:nT { \seq_count:N \l_@@_patch_seq } > 2 \ERROR
+%
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{Document-level commands}
+%
+% \begin{macrocode}
+
+\DeclareDocumentCommand\footnotetext {om} {
+ \fnote_set_fnmark:nn {#1} \@mpfn
+ \@footnotetext {#2}
+}
+
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnote {om} {
+ \fnote_step_fnmark:nn {#1} \@mpfn
+ \cs_set_eq:NN \@@_footnotemark_finish: \prg_do_nothing:
+ \@footnotemark
+ \cs_set_eq:NN \@@_footnotemark_finish: \@@_finish:
+ \@footnotetext {#2}
+ \@@_footnotemark_finish:
+}
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnotemark {o} {
+ \fnote_step_fnmark:nn {#1} { footnote }
+ \@footnotemark
+}
+
+
+%-------------------------------------
+
+\DeclareDocumentCommand\footref {m}{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+% \subsection{Firstaid for packages and classes}
+%
+% \subsubsection{\pkg{setspace}}
+%
+% It should not overwrite it any longer but use a hook, so for now we
+% do just that here.
+% \begin{macrocode}
+\AddToHook{package/setspace/after}
+ {\let \@footnotetext \fnote_footnotetext:n
+ \AddToHook{fntext}[setspace]{\let\baselinestretch\setspace@singlespace}}
+% \end{macrocode}
+%
+%
+%
+%
+% \subsubsection{\pkg{hyperref}}
+%
+% Prevent hyperref from redefining footnote stuff --- this is a
+% temp solution.
+% \begin{macrocode}
+\AddToHook{package/hyperref/after}{
+ \let\H@@footnotetext\fnote_footnotetext:n
+ \let\H@@footnotemark\fnote_footnotemark:
+ \let \@footnotetext \fnote_footnotetext:n
+ \let \@footnotemark \fnote_footnotemark:
+}
+
+
+
+% \end{macrocode}
+%
+% \subsection{Stuff that needs cleanup and documentation}
+%
+% \begin{macrocode}
+
+
+%-------------------------------------
+
+% use of kerns to mark h-mode positions (unit sp)
+%
+% 1 = CJK
+% 2 = CJK
+% 3 = multiple footnotes (footmisc, koma, eledmac, tufte, memoir,
+% parnotes, sidenotes)
+% 3 = outer kern in letter spacing (letterspace)
+% 3 = beginning of list (examdesign.cls)
+% 4 = CJK pigin
+% 5 = CJK ruby
+
+% 1-4 = polyglossia for korean
+
+%-------------------------------------
+
+
+
+%-------------------------------------
+% Tagging
+%-------------------------------------
+
+% hyperref support only when loaded (improve integration)
+
+\newcounter{absfootnote}
+\AddToHook{fnmark/begin}{\stepcounter{absfootnote}} % too simple (fails with opt args)
+
+
+
+% this is rubbish and should be handled better:
+
+\cs_new_protected:Npn \tag_if_loaded:TF { \cs_if_exist:NTF \tag_struct_begin:n }
+
+
+
+\cs_new_protected:Npn \tag@FEMark #1 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_end_push:
+ \exp_args:Nx
+ \tag_struct_begin:n{tag=Lbl,ref=fn.\the\c@absfootnote}
+ \tag_mc_begin:n{tag=Lbl}
+ \IfPackageLoadedTF{hyperref}{ \hyper@linkstart
+ {link}{fn.\the\c@absfootnote} }{}
+ #1
+ \IfPackageLoadedTF{hyperref}{ \hyper@linkend }{}
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+ { #1 }
+}
+
+% to be done next round around:
+%
+% \the\c@absfootnote should be replaced directly by some command with default meaning
+% \the\c@absfootnote so that the actual reference can be changed from the outside.
+%
+% there are several instances that are curently hardwired.
+
+\cs_set_eq:NN \@kernel@process@makefnmark \tag@FEMark
+
+
+
+% kernel hook for tagging (2 args)
+\cs_set:Npn \@kernel@process@footnotetext #1#2 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_end_push:
+ \tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote }
+ #1 {#2}
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+ { #1 {#2} }
+}
+
+
+
+\cs_set:Npn \@makefntext@cfgpoint #1 {
+ \noindent
+ \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_end_push: }
+ \tag@FELbl { #1 }
+}
+
+\cs_set:Npn \@makefntext@cfgpointii #1 {
+ \tag@FENote { #1 }
+ \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_begin_pop:n{} }
+}
+
+
+
+
+\cs_new_protected:Npn \tag@FELbl #1 {
+ \tag_if_loaded:TF
+ {
+ % target should perhaps be raised ...
+ \IfPackageLoadedTF{hyperref}{ \hypertarget{fn.\the\c@absfootnote}{} }{}
+ %\tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote } %alternativ location for structure
+ \tag_struct_begin:n { tag=Lbl }
+ \tag_mc_begin:n { tag=Lbl }
+ #1
+ \tag_mc_end:
+ \tag_struct_end:
+ }
+ { #1 }
+}
+
+\cs_new_protected:Npn \tag@FENote #1 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_begin:n{tag=FENote}
+ #1
+ \tag_mc_end:
+ %\tag_struct_end: %alternative location for structure end but ends inside a P
+ }
+ { #1 }
+}
+
+%-------------------------------------
+
+
+\ExplSyntaxOff
+%</kernel>
+% \end{macrocode}
+%
+%
+% \section{Reimplementing the \pkg{footmisc} package}
+%
+% \begin{macrocode}
+%<*footmisc>
+%%
+%% Copyright (c) 1995-2011 Robin Fairbairns
+%% Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
+%%
+%% This file is part of the `latex-lab 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
+%% 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 work has the LPPL maintenance status 'maintained'.
+%%
+%%
+%% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns
+%% (C) Copyright 2018-2022 Frank Mittelbach
+\NeedsTeXFormat{LaTeX2e}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
+\DeclareCurrentRelease{}{2022-02-14}
+\ProvidesPackage{latex-lab-footmisc}%
+ [2022/03/08 v6.0d
+ a miscellany of footnote facilities -- latex-lab version%
+ ]
+
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\newtoks\FN@temptoken
+\providecommand\protected@writeaux{%
+ \protected@write\@auxout
+}
+\def\l@advance@macro{\@@dvance@macro\edef}
+\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax
+ \advance\@tempcnta#3\relax
+ #1#2{\the\@tempcnta}%
+}
+\let\@advance@macro\l@advance@macro
+\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
+\newif\ifFN@robust \FN@robustfalse
+\DeclareOption{symbol*}{%
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \FN@robusttrue
+ \AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
+}
+\newif\ifFN@para \FN@parafalse
+\DeclareOption{para}{%
+% \end{macrocode}
+% Options are executed in the order of declaration, thus no point in
+% checking for side option as footmisc did in the past
+% \begin{macrocode}
+% \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+% option "side"}%
+% {I shall ignore "\CurrentOption"}%
+ \FN@paratrue
+ \setlength\footnotemargin{-\maxdimen} % default when para is used
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{side}{\ifFN@para
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "para"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \def\@footnotetext@cfgpoint {\marginpar}
+ \AddToHook{fntext/para}{%
+ \hsize\marginparwidth % correct the default \hsize
+ \footnotesep\z@ % don't add a default separation
+ }
+ \def\@footnotetext@cfgpointii {\@makefntext}
+ \def\@footnotetext@cfgpointiii {}
+ \def\@footnotetext@cfgpointiv {}
+ \fi
+}
+\let\footnotelayout\@empty
+\DeclareOption{ragged}{%
+ \@ifundefined{RaggedRight}%
+ {\renewcommand\footnotelayout{\linepenalty50 \raggedright}}%
+ {\renewcommand\footnotelayout{\linepenalty50 \RaggedRight}}%
+}
+\newif\ifFN@perpage
+\FN@perpagefalse
+\DeclareOption{perpage}{%
+ \FN@perpagetrue
+}
+\newif\ifFN@fixskip \FN@fixskipfalse
+
+\let\FN@bottomcases\thr@@
+\newif\ifFN@abovefloats \FN@abovefloatstrue
+\DeclareOption{bottom}{%
+ \let\FN@bottomcases\@ne
+ \FN@abovefloatsfalse
+ \FN@fixskiptrue
+}
+\DeclareOption{bottomfloats}{%
+ \let\FN@bottomcases\tw@
+ \FN@abovefloatstrue \FN@fixskiptrue
+}
+\DeclareOption{abovefloats}{\FN@abovefloatstrue \FN@fixskiptrue}
+\DeclareOption{belowfloats}{\FN@abovefloatsfalse \FN@fixskiptrue}
+\DeclareOption{marginal}{%
+ \footnotemargin-0.8em\relax
+}
+\DeclareOption{flushmargin}{%
+ \footnotemargin0pt\relax
+}
+\newif\ifFN@hangfoot \FN@hangfootfalse
+\DeclareOption{hang}{%
+ \FN@hangfoottrue
+}
+\newcommand*\hangfootparskip{0.5\baselineskip}
+\newcommand*\hangfootparindent{0em}%
+\DeclareOption{norule}{%
+ \renewcommand\footnoterule{}%
+ \advance\skip\footins 4\p@\@plus2\p@\relax
+}
+\DeclareOption{splitrule}{%
+ \gdef\split@prev{0}
+ \let\pagefootnoterule\footnoterule
+ \let\mpfootnoterule\footnoterule
+ \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@}
+ \def\footnoterule{\relax
+ \ifx \@listdepth\@mplistdepth
+ \mpfootnoterule
+ \else
+ \ifnum\split@prev=\z@
+ \pagefootnoterule
+ \else
+ \splitfootnoterule
+ \fi
+ \xdef\split@prev{\the\insertpenalties}%
+ \fi
+ }%
+}
+\newif\ifFN@stablefootnote \FN@stablefootnotefalse
+\DeclareOption{stable}{\FN@stablefootnotetrue}
+\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse
+\DeclareOption{multiple}{\FN@multiplefootnotetrue}
+\ProcessOptions
+% \end{macrocode}
+% This version of \pkg{footmisc} can assume that the new OR code is
+% already available, thus nothing needs loading at this
+% point. However, as long as we use this code also in a package
+% version that can be loaded by other package while we are in a
+% transition phase it is not clear whether not the kernel code is
+% already available for other packages.
+% \begin{macrocode}
+%\@ifundefined{@kernel@before@cclv}
+% {\input{latex-lab-new-or.ltx}}{}
+% \end{macrocode}
+%
+% Footnote box layout for para footnotes;
+% this would also be the hook to support dblfootnotes (from the
+% \texttt{dblfnote} package if we integrate that).
+% \begin{macrocode}
+\ifFN@para
+ \def\@makecol@cfgpointii {%
+ \global\setbox\footins\vbox{\FN@makefootnoteparagraph}%
+ }
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifFN@fixskip
+ \def\@outputbox@removebskip{%
+ \ifx\@textbottom\relax \else
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
+ }%
+ \fi
+ }
+\let\@outputbox@reinsertbskip\relax
+\else
+ \let\@outputbox@removebskip \relax
+ \let\@outputbox@reinsertbskip\relax
+\fi
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\ifcase \FN@bottomcases\relax
+\ERROR
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@if@bfloats@TF{\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}}%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@outputbox@attachfloats
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}%
+ \@outputbox@appendfootnotes
+ }
+ \fi
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@if@bfloats@TF
+ {\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}%
+ \@outputbox@attachfloats
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@if@bfloats@TF{\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}}%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ }
+ \fi
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ \@outputbox@reinsertbskip
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ \@outputbox@reinsertbskip
+}
+ \fi
+\else
+\ERROR
+\fi
+
+% next can be dropped when cleaned up
+\newif\ifFN@setspace
+\@ifpackageloaded{setspace}%
+ {%
+ \FN@setspacetrue
+ \@ifclassloaded{memoir}%
+ {%
+ \AddToHook{fntext}{\let\baselinestretch\m@m@singlespace}%
+ \let\FN@baselinestretch\m@m@singlespace
+ }%
+ {%
+% \AddToHook{fntext}{\let\baselinestretch\setspace@singlespace}%
+ \let\FN@baselinestretch\setspace@singlespace
+ }%
+ }%
+ {%
+ \FN@setspacefalse
+ }
+
+
+
+\ifFN@para
+ \def\@footnotetext@cfgpoint {\insert\footins}
+
+ \long\def\@footnotetext@cfgpointii #1{%
+ \setbox\FN@tempboxa\hbox{\@makefntext{#1}}%
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa
+ \dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip /\columnwidth\relax
+ \box\FN@tempboxa
+ }
+
+
+ \def\@footnotetext@cfgpointiii {}
+ \def\@footnotetext@cfgpointiv {% config point
+ \strut
+ \penalty-10\relax
+ \hskip\footglue
+ }
+\fi
+
+
+
+\ifFN@para
+ \let\FN@tempboxa\@tempboxa
+ \newbox\FN@tempboxb
+ \newbox\FN@tempboxc
+ \newskip\footglue \footglue=1em plus.3em minus.3em
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \newdimen\footnotebaselineskip
+
+ % establish late:
+
+\AddToHook{begindocument/before} {%
+ {%
+ \footnotesize
+ \global\footnotebaselineskip=\normalbaselineskip
+ }%
+}
+% \end{macrocode}
+% The coding is based on David Kastrup's improvement to Don Knuth's
+% original implementation. You find in the \TeX{}book if you own
+% the latest edition.
+% \begin{macrocode}
+
+ \long\def\FN@makefootnoteparagraph{%
+ \FN@setfootnoteparawidth
+ \@parboxrestore
+ \baselineskip=\footnotebaselineskip
+ \unvbox\footins \FN@removehboxes
+ \RawParEnd
+ }
+ \def\FN@removehboxes{\setbox\FN@tempboxa\lastbox
+ \ifhbox\FN@tempboxa{\FN@removehboxes}%
+ \unhbox\FN@tempboxa
+ \else
+ \RawNoindent
+ \rule\z@\footnotesep
+ \fi
+ }
+\fi
+
+
+\@ifpackageloaded{multicol}
+ {\def\FN@setfootnoteparawidth
+ {\hsize\ifnum\doublecol@number>\@ne
+ \textwidth
+ \else \columnwidth \fi}}
+ {\def\FN@setfootnoteparawidth{\hsize\columnwidth}}
+
+\ifFN@perpage
+ \RequirePackage{perpage}
+ \MakePerPage{footnote}
+% \end{macrocode}
+% Fix a bug in perpage \ldots
+% \begin{macrocode}
+ \def\@stpelt#1{\global\csname c@#1\endcsname \m@ne
+ \stepcounter{#1}%
+ \pp@fix@MakePerPage{#1}%
+ }
+ \def\pp@fix@MakePerPage#1{%
+ \ifnum \value{#1}>\z@
+ \addtocounter{#1}\m@ne\fi
+ }
+% \end{macrocode}
+% The above code may look a bit odd: the \cs{stepcounter} sets the
+% counter to zero and then we alter it if it is not zero. The
+% reason is that \cs{stepcounter} resets other counters and when
+% perpage is loaded this results in updating counters on the reset
+% list to 1 (or to a higher starting value if \cs{MakePerPage} is
+% used with an optional argument, which is precisely the problem
+% here. By subtracting 1 in that case we set it back to 1 lower
+% than the starting value.
+%
+% But to make this fully work we also need to update a support
+% command in \pkg{perpage}:
+% \begin{macrocode}
+ \def\pp@cl@end@iii\stepcounter#1\pp@fix@MakePerPage#2{}
+\fi
+
+
+\ifFN@para
+
+% This can use the default interface, except that a negative value for
+% \footnotemargin makes little sense, so we test for this and warn if
+% necessary. But -\maxdimen is ok again, so would need to be a litte bit more elaborate.
+%
+
+%\AddToHook{fntext/para}{
+% \ifdim \footnotemargin >\z@ \else
+% \PackageWarningNoline{footmisc}{Option 'para' needs positive \noexpand\footnotemargin}%
+% \footnotemargin 1.8em\relax
+% \fi
+%}
+
+
+\AddToHook{fntext/begin}{\nobreak \hspace{.2em}}
+
+
+
+
+\else
+
+ \ifFN@hangfoot
+ \long\def\@makefntext#1{%
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \ifdim\footnotemargin>\z@
+ \hb@xt@\footnotemargin{\@makefnmark\hss}%
+ \else
+ \@makefnmark
+ \fi
+ }%
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ \footnotesize
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ \parskip\hangfootparskip\relax
+ \parindent\hangfootparindent\relax
+ \footnotelayout#1%
+ \par
+ \egroup
+ }
+
+ \else
+
+% This is now using the default interface:
+%
+% \long\def\@makefntext#1{%
+% \parindent1em
+% \noindent
+% \ifdim\footnotemargin>\z@
+% \hb@xt@ \footnotemargin{\hss\@makefnmark}%
+% \else
+% \ifdim\footnotemargin=\z@
+% \llap{\@makefnmark}%
+% \else
+% \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
+% \fi
+% \fi
+% \footnotelayout#1%
+% }
+
+ \fi
+\fi
+
+
+
+
+\ifFN@multiplefootnote
+ \providecommand*{\multiplefootnotemarker}{3sp}
+ \providecommand*{\multfootsep}{,}
+ \AddToHook{fnmark} {\FN@mf@check}
+ \AddToHook{fnmark/end} {\FN@mf@prepare}
+%
+ \def\FN@mf@prepare{%
+ \kern-\multiplefootnotemarker
+ \kern\multiplefootnotemarker\relax
+ }
+ \def\FN@mf@check{%
+ \ifdim\lastkern=\multiplefootnotemarker\relax
+%?? is that necessary or even correct ??
+ \edef\@x@sf{\the\spacefactor}%
+%?? shouldn't that be 2 unkerns ?? (none would also be ok)
+ \unkern % new
+ \unkern
+ \textsuperscript{\multfootsep}%
+ \spacefactor\@x@sf\relax
+ \fi
+ }
+\else
+ \let\FN@mf@prepare\relax
+\fi
+\ifFN@stablefootnote
+\let\FN@sf@@footnote\footnote
+\def\footnote{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnote
+ \else
+ \expandafter\FN@sf@gobble@opt
+ \fi
+}
+\edef\FN@sf@gobble@opt{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
+\expandafter\def\csname FN@sf@gobble@opt \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@twobracket
+ \@gobble
+}
+\def\FN@sf@gobble@twobracket[#1]#2{}
+\let\FN@sf@@footnotemark\footnotemark
+\def\footnotemark{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnotemark
+ \else
+ \expandafter\FN@sf@gobble@optonly
+ \fi
+}
+\edef\FN@sf@gobble@optonly{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname}
+\expandafter\def\csname FN@sf@gobble@optonly \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@bracket
+ {}%
+}
+\def\FN@sf@gobble@bracket[#1]{}
+\fi
+\newcommand\setfnsymbol[1]{%
+ \@bsphack
+ \@ifundefined{FN@fnsymbol@#1}%
+ {%
+ \PackageError{footmisc}{Symbol style "#1" not known}%
+ \@eha
+ }{%
+ \expandafter\let\expandafter\@fnsymbol\csname
+ FN@fnsymbol@#1\endcsname
+ }%
+ \@esphack
+}
+\let\FN@fnsymbol@lamport\@fnsymbol
+\newif\if@tempswb
+\DeclareDocumentCommand\DefineFNsymbols {smO{text}m}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldef#4\end
+ \def\@tempc{math}%
+ \def\@tempd{#3}%
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
+ \ifx\@tempc\@tempd
+ \noexpand\ensuremath
+ \else
+ \noexpand\nfss@text
+ \fi
+ {%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
+ }%
+ }%
+}
+\def\FN@build@symboldef#1{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or#1}%
+ \expandafter\FN@build@symboldef
+ \fi
+}
+\DeclareDocumentCommand\DefineFNsymbolsTM {smm}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldefTM#3\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
+ }%
+}
+\def\FN@build@symboldefTM#1#2{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or\TextOrMath{#1}{#2}}%
+ \expandafter\FN@build@symboldefTM
+ \fi
+}
+\def\FN@orange#1{%
+ \ifFN@robust
+ \@arabic#1%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+ \else \@ctrerr \fi
+}
+\global\let\@diagnose@fnsymbol@orange\relax
+\AtEndDocument{\@diagnose@fnsymbol@orange}
+\def\@fnsymbol@orange{%
+ \gdef\@diagnose@fnsymbol@orange{%
+ \PackageWarningNoLine{footmisc}{Some footnote number(s)
+ were out of range
+ \MessageBreak
+ see log for details%
+ }%
+ }%
+}
+\DefineFNsymbolsTM{bringhurst}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \textparagraph \mathparagraph
+}%
+\DefineFNsymbolsTM{chicago}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \#\#%
+}%
+\DefineFNsymbolsTM{wiley}{%
+ \textasteriskcentered *%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+}%
+\DefineFNsymbolsTM{lamport-robust}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+}
+\DefineFNsymbolsTM*{lamport*}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\setfnsymbol{lamport*}
+\DefineFNsymbolsTM{lamport*-robust}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\newcommand\mpfootnotemark{%
+ \@ifnextchar[%
+ \@xmpfootnotemark
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark
+ }%
+}
+\def\@xmpfootnotemark[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark
+}
+% \end{macrocode}
+% TEMP PATCHES FOR TESTING
+% \begin{macrocode}
+
+\endinput
+%</footmisc>
+% \end{macrocode}
+% \Finale
+%
diff --git a/macros/latex/required/latex-lab/latex-lab-footnotes.pdf b/macros/latex/required/latex-lab/latex-lab-footnotes.pdf
new file mode 100644
index 0000000000..2e35bfb74e
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-footnotes.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/latex-lab-new-or.dtx b/macros/latex/required/latex-lab/latex-lab-new-or.dtx
new file mode 100644
index 0000000000..08b58a7286
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-new-or.dtx
@@ -0,0 +1,545 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-new-or.dtx
+% Copyright (C) 2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-new-or.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \title{The \texttt{latex-lab-new-or} code\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
+% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
+% \providecommand\pkg[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% This code implements changes to the output routine.
+%
+%
+%
+%
+% \section{Hooks and configuration points}
+%
+% Note: the configuration points do not have an interface mechanism
+% yet and all their names are temporary right now.
+%
+%
+% \subsubsection{Configuration points}
+%
+% To cater for different layouts with respect to text, footnotes,
+% and bottom-floats placements there are two configuration points for
+% now.
+% \begin{description}
+% \item[\cs{@makecol@cfgpoint} (0 arguments)]
+%
+% In this configuration point the \cs{@outputbox} (holding the
+% galley text for the current column or page) is augmented by
+% attaching floats and footnote areas together with appropriate
+% spacing. Before the code is run any existing glue at the bottom
+% of the \cs{@outputbox} is removed and stored in a safe
+% place. If needed, it can be reinserted with one of the helper
+% commands.
+%
+% To support setting this up the following helper commands are available:
+% \begin{description}
+% \item[\cs{@outputbox@append} (1 argument)]
+%
+% This general purpose command alters the \cs{@outputbox} box by
+% appending material to it.
+%
+% \item[\cs{@outputbox@appendfootnotes} (0 arguments)]
+%
+% This command appends the footnotes to the \cs{@outputbox} (if
+% there are any). If not, then it does nothing.
+%
+% \item[\cs{@outputbox@attachfloats} (0 arguments)]
+% \item[\cs{@outputbox@attachtopfloats} (0 arguments)]
+% \item[\cs{@outputbox@attachbottomfloats} (0 arguments)]
+%
+% Attaching top and bottom floats can usually be done in one
+% go, but for special layouts we might want more control so we
+% provide also separate commands.
+%
+% \item[\cs{@outputbox@reinsertbskip} (0 arguments)]
+%
+% Reinsert the bottom skip of the \cs{@outputbox} that was
+% saved before.
+%
+% \item[Testing for existence of material]
+%
+% There are a number of helpers to run conditional code
+% depending on whether or not there are footnotes or bottom
+% floats. They are \cs{@if@footnotes@TF} and
+% \cs{@if@bfloats@TF}
+% (names are likely to change).
+%
+% \end{description}
+% This configuration point needs an appropriate definition; a
+% default is already given in the kernel.
+%
+% \item[\cs{@makecol@cfgpointii} (0 arguments)]
+%
+% This configuration point is used to manipulate the footnote
+% material inside \cs{box}\cs{footins}. It if contains code, it
+% is supposed to do some processing of that box and then write
+% the result back into it (and nothing else!). By default it
+% does nothing.
+%
+% \end{description}
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% \begin{macrocode}
+%<*code>
+% \end{macrocode}
+%
+% \subsection{File declaration}
+% \begin{macrocode}
+\ProvidesFile{latex-lab-new-or.ltx}
+ [2022-03-09 v0.1b changes to the output routine]
+% \end{macrocode}
+% \subsection{\cs{@makecol} reimplementation}
+%
+% In order for other packages to prepend or append code to
+% \cs{@makecol}, they can use the generic command hooks
+% \texttt{cmd/@makecol/before} and \texttt{cmd/@makecol/after}, so
+% there is nothing we need to do here.
+%
+%
+% \begin{macro}{\@makecol}
+% \cs{@makecol} is shortened a lot, basically all the hardwired
+% code in the middle has moved into a configuration point.
+% \begin{macrocode}
+\def \@makecol {%
+ \@kernel@before@cclv
+ \setbox\@outputbox \box\@cclv
+% \end{macrocode}
+% The only real addition is the next command which either does
+% nothing or removes an infinite glue from the bottom of the
+% \cs{@outputbox}.
+% \begin{macrocode}
+ \@outputbox@removebskip
+% \end{macrocode}
+% Any ``here'' floats in the \cs{@outputbox} are now handled so we
+% recycle their registers and put them back to the \cs{@freelist}.
+% \begin{macrocode}
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+% \end{macrocode}
+% Here we have the configurable part.
+% \fmi{Interface to configuration points will change in the future}
+% \begin{macrocode}
+ \@makecol@cfgpoint
+% \end{macrocode}
+% The we deal with any \cs{enlargethispage} or run the normal code
+% to build a column.
+% \begin{macrocode}
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \@makenormalcolbox
+ \fi
+ \global \maxdepth \@maxdepth
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputbox@depth}
+% We need to know the depth of \cs{@outputbox} once in a
+% while. Rather than using a temp dimen (as it was done in the
+% past), we give it a proper register.
+% \begin{macrocode}
+\newdimen\@outputbox@depth
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makenormalcolbox}
+% Taken out of \cs{@makecol} for readability.
+% \begin{macrocode}
+\def \@makenormalcolbox {%
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \@outputbox@depth \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\@outputbox@depth
+ \@textbottom
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@makespecialcolbox}
+% Make the colbox when \cs{enlargethispage} was used.
+% \begin{macrocode}
+\def \@makespecialcolbox {%
+ \@outputbox@append {\vskip-\@outputbox@depth}%
+ \@tempdima \@colht
+ \ifdim \wd\@kludgeins>\z@
+ \advance \@tempdima -\ht\@outputbox
+ \advance \@tempdima \pageshrink
+ \setbox\@outputbox \vbox to \@colht {%
+ \unvbox\@outputbox
+ \vskip \@tempdima
+ \@textbottom
+ }%
+ \else
+ \advance \@tempdima -\ht\@kludgeins
+ \setbox \@outputbox \vbox to \@colht {%
+ \vbox to \@tempdima {%
+ \unvbox\@outputbox
+ \@textbottom}%
+ \vss}%
+ \fi
+ {\setbox \@tempboxa \box \@kludgeins}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputbox@removebskip}
+%
+% This is really a bug fix for the kernel but one we only
+% automatically make in new documents using \cs{DocumentMetadata}.
+% \fmi{may make optional for legacy docs}
+% If
+% \cs{raggedbottom} is in force, footnotes get attached to the main
+% galley at a distance of \cs{footskip} on all pages except on
+% those that are ended by \cs{newpage} or \cs{clearpage} where the
+% \cs{vfil} from \cs{newpage} pushes the footnotes to the very bottom.
+%
+% This is kind of a weird difference to a page ending with
+% \cs{pagebreak}---in that case the page is also run
+% short, but the footnotes are not pushed to the bottom.
+%
+% In \pkg{footmisc} \cs{@outputbox@removebskip} is only applied when
+% \pkg{footmisc} is called with with an option specifying the
+% footnote placement, i.e., not in the default case.
+% In new documents we apply it always.
+% \begin{macrocode}
+\def\@outputbox@removebskip{%
+% \end{macrocode}
+% We first test if we are in a \cs{raggedbottom} layout. If not we
+% do nothing, but we don't disable the code because
+% \cs{raggedbottom} may get used only for some parts of the
+% document.
+% \begin{macrocode}
+ \ifx\@textbottom\relax \else
+% \end{macrocode}
+% We then append some negative glue at the end of \cs{@outputbox}
+% provided it has a glue stretch order of 1 or more (i.e., contains
+% a \texttt{fil} or \texttt{fill} part).
+% \begin{macrocode}
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+% \end{macrocode}
+% \begin{macro}{\@outputbox@reinsertbskip}
+% We also record the value so that it can be reinserted
+% elsewhere. As we have to do this globally, we also need to
+% explicitly reset it if we don't find any such glue.
+% \begin{macrocode}
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
+ }%
+ \fi
+}
+% \end{macrocode}
+% We need a trivial top-level definition for
+% \cs{@outputbox@reinsertbskip} in case the first page has no
+% bottom glue and the command gets called.
+% \begin{macrocode}
+\let\@outputbox@reinsertbskip\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@kernel@before@cclv}
+% \begin{macro}{\@kernel@before@footins}
+% These two commands are internal kernel hooks intended for tagging
+% support in case that is active. By default they do nothing (and
+% may have been defined already by \cs{DocumentMetadata}).
+% \begin{macrocode}
+\providecommand\@kernel@before@cclv{}
+\providecommand\@kernel@before@footins{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{The output routine configuration components}
+%
+% Here we provide the components that are used to define
+% \cs{@makecol@cfgpoint}.
+%
+%
+% \begin{macro}{\@outputbox@append}
+%
+% This general purpose command alters the \cs{@outputbox} box by
+% appending material to it. As this is a box typesetting operation
+% we make sure that the last line of the box reflects the true
+% depth of the last line (in case that is needed later). We also
+% expose the current depth of \cs{@outputbox} as
+% \cs{@outputbox@depth} before unboxing so that its value can be
+% used by \verb=#1= if wanted.
+% \begin{macrocode}
+\def\@outputbox@append #1{%
+% \if!\detokenize{#1}!\else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \@outputbox@depth\dp\@outputbox % if needed in #1
+ \unvbox \@outputbox
+ #1%
+ }%
+% \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\@outputbox@appendfootnotes}
+%
+% This command appends the footnotes to the \cs{@outputbox} (if
+% there are any). If not then it does nothing.
+% \begin{macrocode}
+\def\@outputbox@appendfootnotes {%
+ \ifvoid\footins \else
+% \end{macrocode}
+% First come two configuration points: what to do if we are in a split
+% footnote situation and a second one that does some manipulation
+% of the \cs{footins} box before it gets appended.
+% \fmi{this code will get revised as part of CP handling in the future}
+% \begin{macrocode}
+ \@makecol@handlesplitfootnotes
+ \@makecol@cfgpointii
+% \end{macrocode}
+% Then the footnotes are appended:
+% \begin{macrocode}
+ \@outputbox@append{%
+ \vskip \skip\footins
+ \@kernel@before@footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+% \end{macrocode}
+% Support for \pkg{pdfcolfoot}, eventually this can go once color
+% is properly supported.
+% \begin{macrocode}
+ \csname pdfcolfoot@current\endcsname
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@outputbox@attachfloats}
+% \begin{macro}{\@outputbox@attachtopfloats}
+% \begin{macro}{\@outputbox@attachbottomfloats}
+% Attaching top and bottom floats can usually be done in one go,
+% but for special layouts we might want more control so we provide
+% also separate commands.
+% \begin{macrocode}
+\let \@outputbox@attachfloats \@combinefloats
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def \@outputbox@attachtopfloats {%
+ \ifx \@toplist\@empty \else \@cflt \fi
+}
+\def \@outputbox@attachbottomfloats {%
+ \ifx \@botlist\@empty \else \@cflb \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@makecol@handlesplitfootnotes}
+% \begin{macro}{\@makecol@splitfootnotemessagehook}
+% This is only an early draft and doesn't do much.
+% Contains incomplete preparation for tagging commented out.
+% \fmi{Interfaces and code will change in the future}
+% \begin{macrocode}
+\def\@makecol@handlesplitfootnotes {%
+% \ifx\splitfootnote@continuation\@empty \else
+% \setbox\footins\vbox{\splitfootnote@continuation\unvbox\footins}%
+% \global\let\splitfootnote@continuation\@empty
+% \fi
+ \ifnum\insertpenalties>\z@
+ \@makecol@splitfootnotemessagehook
+% \setbox\footins\vbox{\unvbox\footins --- END at split}%
+% \gdef\splitfootnote@continuation {--- START after split}%
+ \fi
+}
+%\def\splitfootnote@continuation{}
+% \end{macrocode}
+% This could issue warning if split footnotes are encountered.
+% \begin{macrocode}
+\let \@makecol@splitfootnotemessagehook \@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@makecol@cfgpointii}
+%
+% Configuration point to support manipulation of footins box
+% (result needs to be moved back in there). Used by the
+% \texttt{para} option.
+% \fmi{Interface will change in the future}
+% \begin{macrocode}
+\let \@makecol@cfgpointii \@empty
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+%
+% \fmi{Some temp interfaces until configuration points are available.}
+%
+% \begin{macro}{\@if@flushbottom@TF}
+% Test for \cs{flushbottom} (currently not used).
+% \begin{macrocode}
+\def\@if@flushbottom@TF{%
+ \ifx\@textbottom\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@if@footnotes@TF}
+% Test if footnotes are present on the current page.
+% \begin{macrocode}
+\def\@if@footnotes@TF{%
+ \ifvoid\footins
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@if@bfloats@TF}
+% Test if bottom floats are around.
+% \begin{macrocode}
+\def\@if@bfloats@TF{%
+ \ifx \@botlist\@empty
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{The \cs{@makecol} configuration}
+%
+%
+% \begin{macro}{\@makecol@cfgpoint}
+%
+% Here is only the configuration for the default case for now,
+% others are provided by \pkg{footmisc}.
+%
+% \begin{macrocode}
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+% \end{macrocode}
+% We do, however, reinsert the bottom skip from \cs{newpage} if it
+% was taken out earlier. This is, strictly speaking, not necessary
+% in most cases, but it is a \cs{vfil} while \cs{raggedbottom} is
+% only generating \verb=\vspace{0pt plus .0001fil}=, so if you have
+% several \cs{vfil} on the page before the \cs{newpage} you would
+% alter the space distribution if one is taken out.
+% \begin{macrocode}
+ \@outputbox@reinsertbskip
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section {Replacement for the \pkg{footmisc} package}
+%
+% The replacement for \pkg{footmisc}. If the new code is used, we must replace
+% the package if it is loaded by the user:
+% \begin{macrocode}
+\declare@file@substitution{footmisc.sty}{latex-lab-footmisc.ltx}
+% \end{macrocode}
+%
+%
+%
+% \section {Temp stuff that is related but should go to the kernel}
+%
+% \begin{macrocode}
+\input{latex-lab-footnotes.ltx}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</code>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex/required/latex-lab/latex-lab-new-or.pdf b/macros/latex/required/latex-lab/latex-lab-new-or.pdf
new file mode 100644
index 0000000000..ad45673c55
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-new-or.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/latex-lab-testphase.dtx b/macros/latex/required/latex-lab/latex-lab-testphase.dtx
new file mode 100644
index 0000000000..d8d9c671c3
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-testphase.dtx
@@ -0,0 +1,84 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-testphase.dtx
+% Copyright (C) 2021-2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-testphase.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+
+% \title{The \texttt{latex-lab-testphase} code\thanks{}}
+% \author{Ulrike Fischer \LaTeX{} Project}
+%
+% \maketitle
+%
+%
+% \begin{abstract}
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% This code implements small files which can be loaded with the |testphase|
+% key of \cs{DocumentMetadata}. This will be extended to allow user to load
+% well defined parts of the tagged PDF project.
+% Currently the values |phase-I|, |phase-II| and |new-or| are provided.
+% |tagpdf| is an undocumented alias for |phase-II| which is kept for compability.
+%
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+% New output routine code is loaded in phase-II and new-or:
+% \begin{macrocode}
+%<*tagpdf|phase-II|new-or>
+\IfFileExists{latex-lab-testphase-new-or.sty}
+ {
+ \RequirePackage{latex-lab-testphase-new-or}
+ }
+ {}
+%</tagpdf|phase-II|new-or>
+% \end{macrocode}
+% \begin{macrocode}
+%<*tagpdf|phase-I|phase-II>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\RequirePackage{tagpdf}
+\AddToDocumentProperties [document]{testphase/tagpdf}{loaded}
+%</tagpdf|phase-I|phase-II>
+%<tagpdf|phase-II>\tagpdfsetup{activate,paratagging,interwordspace}
+%<phase-I>\tagpdfsetup{activate,interwordspace}
+%<*tagpdf|phase-I|phase-II>
+\AddToDocumentProperties [document]{tagging}{active}
+\AddToDocumentProperties [document]{tagging/para}{active}
+\AddToDocumentProperties [document]{tagging/interwordspace}{active}
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</tagpdf|phase-I|phase-II>
+% \end{macrocode}
+% \Finale
+%
diff --git a/macros/latex/required/latex-lab/latex-lab-testphase.pdf b/macros/latex/required/latex-lab/latex-lab-testphase.pdf
new file mode 100644
index 0000000000..6ab6a28554
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab-testphase.pdf
Binary files differ
diff --git a/macros/latex/required/latex-lab/latex-lab.ins b/macros/latex/required/latex-lab/latex-lab.ins
new file mode 100644
index 0000000000..bc668a71e1
--- /dev/null
+++ b/macros/latex/required/latex-lab/latex-lab.ins
@@ -0,0 +1,82 @@
+%%
+%% This file will generate fast loadable files and documentation
+%% driver files from the dtx file(s) in this package when run through
+%% LaTeX or TeX.
+%%
+%% Copyright (C) 2021-2022 The LaTeX Project
+%%
+%%
+%% This file is part of the `LaTeX-lab Bundle' for LaTeX.
+%% -------------------------------------------------------------------
+%%
+%% 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 2008 or later.
+%%
+%% In particular, NO PERMISSION is granted to modify the contents of this
+%% file since it contains the legal notices that are placed in the files
+%% it generates.
+%%
+%%
+%%
+%% --------------- start of docstrip commands ------------------
+%%
+\input docstrip
+
+\keepsilent
+
+\usedir{tex/latex/contrib/latex-lab}
+
+\preamble
+
+This is a generated file.
+
+Copyright 2021,2022 LaTeX Project
+
+This file was generated from file(s) of the `LaTeX-lab 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 2008 or later.
+
+This file may only be distributed together with a copy of the LaTeX
+`LaTeX-lab Bundle'. You may however distribute the `LaTeX-lab Bundle'
+without such generated files.
+
+The newest sources can be found below
+
+ https://github.com/latex3/latex2e/required/latex-lab
+
+where one can also log issues in case there are any.
+
+
+\endpreamble
+
+
+\generate{\file{documentmetadata-support.ltx}{\from{documentmetadata-support.dtx}{code}}}
+
+% files that should be loadable with the testphase key should use the naming scheme
+% #1-latex-lab-testphase.ltx
+\generate{\file{phase-I-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{phase-I}}}
+\generate{\file{phase-II-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{phase-II}}}
+
+\generate{\file{tagpdf-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{tagpdf}}}
+\generate{\file{new-or-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{new-or}}}
+
+% support files (the new-or code is a private package to make life easier)
+
+\generate{\file{latex-lab-testphase-new-or.sty}{\from{latex-lab-new-or.dtx}{code}}}
+\generate{\file{latex-lab-footmisc.ltx}{\from{latex-lab-footnotes.dtx}{footmisc}}}
+\generate{\file{latex-lab-footnotes.ltx}{\from{latex-lab-footnotes.dtx}{kernel}}}
+
+
+\endbatchfile
diff --git a/macros/latex/required/latex-lab/usage-of-@footnotemark.txt b/macros/latex/required/latex-lab/usage-of-@footnotemark.txt
new file mode 100644
index 0000000000..684a695faa
--- /dev/null
+++ b/macros/latex/required/latex-lab/usage-of-@footnotemark.txt
@@ -0,0 +1,186 @@
+% packages that alter \@footnotemark ...
+
+
+% bibarts
+
+\let\ba@footnmark=\@footnotemark
+\def\@footnotemark{\ifhmode{\nobreak \hskip 0.04em plus 0.01em}\else\leavevmode\fi\ba@footnmark}%
+
+
+% ./bxjscls/bxjsja-minimal.def
+
+\def\bxjs@cjk@loaded{%
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax
+ \unkern\unkern
+ \ifdim\lastskip>\z@ \unskip \fi
+ \fi\fi
+ \nobreak
+ \fi
+ \@makefnmark
+ \ifhmode \spacefactor\@x@sf \fi
+ \relax}%
+ \let\bxjs@cjk@loaded\relax
+}
+
+% ./arabtex/afoot.sty
+
+\let \a@@footnotemark \@footnotemark
+
+\def \a@footnotemark {% inside Arabic environment
+\iftrans \unskip \unskip \nobreak \@makefnmark \fi
+\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi }
+
+% ./hyperref/hyperref.sty
+
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+
+
+% ./hypdvips/hypdvips.sty
+
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \ifHy@draft%
+ \@makefnmark%
+ \else%
+ \pp@hyperfootnote%
+ \fi%
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+
+ \newcommand{\pp@hyperfootnote}{%
+ \ifx\pp@activerect\pp@true%
+ \@makefnmark%
+ \else%
+ \ifpp@smallfootnotes%
+ \let\pp@backup@@thefnmark\@thefnmark%
+ \renewcommand{\@thefnmark}{\pdf@rect{\pp@backup@@thefnmark}}%
+ \Hy@colorlink\@footnotecolor%
+ \@makefnmark%
+ \Hy@endcolorlink%
+ \pdfmark{%
+ pdfmark=/ANN,%
+ linktype=footnote,%
+ Subtype=/Link,%
+ AcroHighlight=\@pdfhighlight,%
+ Border=\@pdfborder,%
+ BorderStyle=\@pdfborderstyle,%
+ Color=\@footnotebordercolor,%
+ Dest=\Hy@footnote@currentHref,%
+ Raw=H.B%
+ }%
+ \let\@thefnmark\pp@backup@@thefnmark%
+ \else%
+ \pdfmark[\@makefnmark]{%
+ pdfmark=/ANN,%
+ linktype=footnote,%
+ Subtype=/Link,%
+ AcroHighlight=\@pdfhighlight,%
+ Border=\@pdfborder,%
+ BorderStyle=\@pdfborderstyle,%
+ Color=\@footnotebordercolor,%
+ Dest=\Hy@footnote@currentHref%
+ }%
+ \fi%
+ \fi%
+ }
+
+
+% ./memoir/memhfixc.sty
+
+\ifHy@hyperfootnotes
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}%
+ \m@mmf@check% <--- added
+ \nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \m@mmf@prepare% <--- added
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+\fi
+
+
+% caption3.sty
+
+% this is altering the top-level when inside a float
+
+
+% ./koma-script/scrlttr2.cls
+
+\newcommand*{\scr@footnotemark}{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\FN@mf@check\nobreak\fi
+ \@makefnmark
+ \csname FN@mf@prepare\endcsname
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+% tested against this ...
+
+\newcommand*{\scr@saved@footnotemark}{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+
+% ./chextras/chextras.sty
+
+\ifstd@notes\else
+ \let\std@footnotemark\@footnotemark
+ \def\alt@footnotemark{\unskip\thinspace\std@footnotemark}
+ \let\@footnotemark\alt@footnotemark
+
+% footmisx.sty
+
+ \newcommand*\@footmisxnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \FN@mf@check
+ \nobreak
+ \fi
+ \@footmicx@makefnmark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \FN@mf@prepare
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+
+
diff --git a/macros/latex/required/latex-lab/usage-of-@footnotetext.txt b/macros/latex/required/latex-lab/usage-of-@footnotetext.txt
new file mode 100644
index 0000000000..48a3172843
--- /dev/null
+++ b/macros/latex/required/latex-lab/usage-of-@footnotetext.txt
@@ -0,0 +1,842 @@
+
+% ./bibarts/bibarts.sty
+
+\let\ba@footnotetext=\@footnotetext
+\long\def\@footnotetext#1{\ba@footnotetext{%
+ \global\let\thisto@ba=-%
+ \global\let\thisti@ba=-%
+ \global\let\thisp@ba=-%
+ \global\let\thisvol@ba=-%
+ \global\let\thiss@ba=-%
+ \global\let\thisn@ba=-%
+ \global\let\pos@ba=0%
+ \kern 0.1em\nulskip@ba{\@footnotetrue\ignorespaces
+ #1\nulskip@ba\ba@textmode}\global\let\lastto@ba=\thisto@ba
+ \global\let\lastti@ba=\thisti@ba
+ \global\let\lastp@ba=\thisp@ba
+ \global\let\lastvol@ba=\thisvol@ba
+ \global\let\lasts@ba=\thiss@ba
+ \global\let\lastn@ba=\thisn@ba}}%
+
+
+% ./fnbreak/fnbreak.sty
+
+ \let\fnb@orig@footnotetext\@footnotetext
+ \long\def\@footnotetext#1{\fnb@orig@footnotetext{\fnb@fnstart#1\fnb@fnend}}%
+
+
+% ./revtex4-1/revtex4-1.cls ./revtex/ltxutil.sty ./revtex/revtex4-2.cls ...
+
+\long\def\@footnotetext{%
+ \insert\footins\bgroup
+ \make@footnotetext
+}%
+\long\def\@mpfootnotetext{%
+ \minipagefootnote@pick
+ \make@footnotetext
+}%
+\long\def\make@footnotetext#1{%
+ \set@footnotefont
+ \set@footnotewidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@\@mpfn\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1%
+ \@finalstrut\strutbox\vadjust{\vskip\z@skip}%
+ }%
+ \color@endgroup
+ \minipagefootnote@drop
+}%
+
+
+% ./nrc/nrc1.cls ./nrc/nrc2.cls
+
+% this is missing the \par at the end and \@currentcounter
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \reset@font\smallt
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+}%
+
+%-------------------------------------
+
+% ./bigfoot/bigfoot.sty
+
+ \def\@footnotetext{\Footnotetextdefault{}}%
+
+%-------------------------------------
+
+
+% ./uafthesis/uafthesis.cls
+
+% this is missing the \par at the end and \@currentcounter
+
+%% this little gem provides for single-spaced footnotes
+\long\def\@footnotetext#1{\insert\footins{%
+ \ssp
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}}}
+
+%-------------------------------------
+
+
+
+% ./resphilosophica/resphilosophica.cls
+
+% I wonder if this \, is really intended below ...
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \,\rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+%-------------------------------------
+
+
+
+% ./setspace/setspace.sty
+
+% this is missing the \par at the end and \@currentcounter
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+% GT: Next line added. Hook desired here!
+ \def\baselinestretch {\setspace@singlespace}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+%-------------------------------------
+
+
+
+% ./linguex/linguex.sty
+
+
+\let\predefinedfootnotetext=\@footnotetext
+\long\def\@footnotetext#1{\@noftnotefalse\predefinedfootnotetext{#1}%
+ \@noftnotetrue}
+
+
+%-------------------------------------
+
+
+% ./fnpara/fnpara.sty
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \setbox0=\hbox{%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox
+ \penalty -10
+ \hskip\footglue
+ }%
+ }%
+ \dp0=0pt \ht0=\fudgefactor\wd0 \box0
+ \color@endgroup}}
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (para option)
+
+% this is missing the \par at the end and \@currentcounter
+
+ \long\def\FN@footnotetext#1{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \setbox\FN@tempboxa\hbox{%
+ \@makefntext{\ignorespaces#1\strut
+ \penalty-10\relax
+ \hskip\footglue
+ }% end of \@makefntext parameter
+ }% end of \hbox
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa\dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip / \columnwidth\relax
+ \box\FN@tempboxa
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (normal)
+
+% this is missing the \par at the end and \@currentcounter
+
+ \long\def\FN@footnotetext#1{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep
+ \ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+
+
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (side option)
+
+ \long\def\FN@footnotetext#1{%
+ \marginpar{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \ignorespaces#1%
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+
+
+
+%-------------------------------------
+
+
+
+% ./bxjscls/bxjsarticle.cls ./bxjscls/bxjsbook.cls ...
+
+\long\def\@footnotetext{%
+ \insert\footins\bgroup
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces}%
+ \futurelet\jsc@next\jsc@fo@t}
+\def\jsc@fo@t{\ifcat\bgroup\noexpand\jsc@next \let\jsc@next\jsc@f@@t
+ \else \let\jsc@next\jsc@f@t\fi \jsc@next}
+\def\jsc@f@@t{\bgroup\aftergroup\jsc@@foot\let\jsc@next}
+\def\jsc@f@t#1{#1\jsc@@foot}
+\def\jsc@@foot{\@finalstrut\strutbox\color@endgroup\egroup
+ \ifx\pltx@foot@penalty\@undefined\else
+ \ifhmode\null\fi
+ \ifnum\pltx@foot@penalty=\z@\else
+ \penalty\pltx@foot@penalty
+ \pltx@foot@penalty\z@
+ \fi
+ \fi}
+
+
+not covered so far supports \footnote{ catcode changes ...} but also
+\foonote A --- the latter is questionable I would say
+
+
+%-------------------------------------
+
+
+% ./fn2end/fn2end.sty
+
+obsolete I guess, ignored in evaluation
+
+
+%-------------------------------------
+
+
+% ./hyperref/hyperref.sty
+
+ \long\def\@footnotetext#1{%
+ \H@@footnotetext{%
+ \ifHy@nesting
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ {%
+ \expandafter\hyper@@anchor\expandafter{%
+ \Hy@footnote@currentHref
+ }{\ignorespaces #1}%
+ }{%
+ \Hy@raisedlink{%
+ \expandafter\hyper@@anchor\expandafter{%
+ \Hy@footnote@currentHref
+ }{\relax}%
+ }%
+ \let\@currentHref\Hy@footnote@currentHref
+ \let\@currentlabelname\@empty
+ \ignorespaces #1%
+ }%
+ }%
+ }%
+
+
+Handling of anchors (in nested context) I guess. This needs to be
+married with the anchor setting that the tagging currently does and
+the latter improved/adjusted
+
+
+%-------------------------------------
+
+% ./biblatex-gb7714-2015/gb7714-2015ms.bbx ./biblatex-gb7714-2015/gb7714-2015mx.bbx ...
+
+ \long\def\@footnotetext##1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \leftskip \footbibmargin%增加的左侧缩进
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces##1\@finalstrut\strutbox%
+ }%
+ \color@endgroup}}%
+
+fits the structure
+%-------------------------------------
+
+
+% ./amscls/amsbook.cls ./amscls/amsproc.cls ./amscls/amsart.cls ...
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./umich-thesis/umich-thesis.cls
+
+% change LaTeX's footnotes to get vertical spacing correct
+\skip\footins \baselinestretch2\skip\footins
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {\setspace@singlespace}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \vskip 1.2\baselineskip
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./nostarch/nostarch.cls
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@{13.5pt}\ignorespaces#1}%
+ \color@endgroup}}%
+
+fixed \footsep, probably very old
+fits the structure
+%-------------------------------------
+
+
+
+% ./coursepaper/coursepaper.cls
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {1}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./ucthesis/ucthesis.cls
+
+% Single-space footnotes.
+\long\def\@footnotetext#1{\insert\footins{\ssp\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}}}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./jura/jura.cls
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \linespread{\J@FootnoteSpread}\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+fits the structure
+%-------------------------------------
+
+
+% ./asaetr/asaesub.sty
+
+2.09
+
+%-------------------------------------
+
+
+% ./lineno/fnlineno.sty
+
+%% |\FNLN@@text| stores the `\@footnotetext' found,
+%% we might check if it is `\FNLN@ltx@fntext' ... %% TODO
+\let\FNLN@@text\@footnotetext
+\def\@footnotetext{%
+ \ifLineNumbers \expandafter \FNLN@text
+ \else \expandafter \FNLN@@text
+ \fi}
+
+
+\def \FNLN@text {% %% 2010/12/31 arg read later
+ \vadjust{\penalty-\FNLN@M@swap@codepen}%
+%% Standard \LaTeX's `\@footnotetext' expands `\@thefnmark'
+%% to produce the footnote mark at the page bottom,
+%% right after it has been determined for the mark
+%% in the main text. \emph{Here} the footnote text
+%% will be typeset only when \emph{other} footnote marks
+%% may have been formed for typesetting the main text
+%% paragraph before.
+%% %%% (TODO clearer wording)
+%% In the \strong{footnote list}
+%% macro |\FNLN@list|, the (\dqtd{`&\protect'ed})
+%% \emph{current} expansion <mark> of `\@thefnmark'
+%% is stored as an item preceding the footnote text
+%% <text>. One footnote entry in `\FNLN@list'
+%% thus has the form \lq`<mark>\@lt<text>\@lt'\rq.
+%% \LaTeX's internal `\g@addto@macro' is used to \emph{append}
+%% an entry to the list (at the right). The OTR will later
+%% take the entries from the left of the list.
+%%
+%% The argument of the auxiliary/temporary `\@tempa'
+%% will contain the footnote text and thus must be able to
+%% carry `\par' tokens. We therefore need a `\long' version of
+%% `\protected@edef':
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \long \edef \@tempa ##1{%
+ \noexpand\g@addto@macro \noexpand\FNLN@list {%
+ \@thefnmark \noexpand\@lt ##1\noexpand \@lt}}%
+%% ... issuing
+%% \lq`\g@addto@macro\FNLN@list{<mark>\elt<text>\@lt}'\rq\ ...
+ \@tempa %% reads arg
+}
+%% Here we initialize |\FNLN@list|:
+\let\FNLN@list\@empty
+
+
+
+probably continues working but needs separate checking
+
+%-------------------------------------
+
+
+
+% ./jurabib/jurabib.sty
+
+ \long\def\@footnotetext#1{%
+ \Orig@tabularx@footnotetext{%
+ \jb@fntrue
+ #1%
+ \setcounter{jb@cites@in@footnote}{0}%
+ }%
+ }%
+
+ \let\jbsaved@footnotetext\@footnotetext
+ \long\def\@footnotetext#1{%
+ \begingroup
+ \jb@fntrue
+ \jbsaved@footnotetext{#1}%
+ \setcounter{jb@cites@in@footnote}{0}%
+ \endgroup
+ }%
+
+
+first is table notes, second
+fits the structure
+%-------------------------------------
+
+
+
+% ./york-thesis/york-thesis.cls
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {1}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./ucdavisthesis/ucdavisthesis.cls
+
+\long\def\@footnotetext#1{\insert\footins{\renewcommand\baselinestretch{1}
+ \footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}\renewcommand\baselinestretch{\@spacing}}}
+
+looks old ...
+fits the structure
+%-------------------------------------
+
+
+% ./ledmac/afoot.sty
+
+fairly old and buggy in some aspects
+
+%%% Make the LaTeX \cs{footnote} catcode-safe, like in Plain TeX.
+
+\def \@footnotetext {% new, do not yet read footnote text
+ \insert \footins \bgroup
+ \ifx \footglue \undefined % prepare normal footnote
+ \interlinepenalty \interfootnotelinepenalty \floatingpenalty \@MM
+ \splittopskip \footnotesep \splitmaxdepth \dp \strutbox
+ \else
+ \global\long\def \@makefntext ##1{{$^{\@thefnmark }$}##1\nobreak }%
+ \setbox0=\hbox \bgroup % fnpara.sty is present
+ \floatingpenalty=20000 \footnotesize
+ \fi
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \a@fntext }
+
+
+%-------------------------------------
+
+
+% ./toptesi/toptesi.sty
+
+
+\long\def\@footnotetext#1{\insert\footins{\linespread{1}\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{\rule{\z@}{\footnotesep}\ignorespaces#1\strut}}}
+
+
+fits the structure
+%-------------------------------------
+
+
+% ./gb4e/gb4e.sty
+
+\let\@gbsaved@footnotetext=\@footnotetext
+\long\def\@footnotetext#1{%
+ \@noftnotefalse\setcounter{fnx}{0}%
+ \@gbsaved@footnotetext{#1}%
+ \@noftnotetrue}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./koma-script/scrlttr2.cls ./koma-script/scrextend.sty ./koma-script/scrreprt.cls ...
+
+same bug as footmisc: the @prepare is in the wrong place
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./tabu/tabu.sty
+
+not checked what that does
+
+
+%-------------------------------------
+
+
+% ./uwthesis/uwthesis.cls
+
+does chapter notes -- ignore for now
+
+%-------------------------------------
+
+
+% ./tools/multicol.sty
+
+\long\def\mult@footnotetext#1{\begingroup
+ \columnwidth\textwidth
+ \orig@footnotetext{#1}\endgroup}
+
+
+fits the structure, but need to think what makes sense here as this a
+temporary redefinition for the environment only
+
+%-------------------------------------
+
+
+% ./fancyvrb/fancyvrb.sty
+
+\long\def\V@footnotetext{%
+ \afterassignment\V@@footnotetext
+ \let\@tempa}
+\def\V@@footnotetext{%
+ \insert\footins\bgroup
+ \csname reset@font\endcsname
+ \footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \def\@currentcounter{footnote}%
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{}%
+ \rule{\z@}{\footnotesep}%
+ \bgroup
+ \aftergroup\V@@@footnotetext
+ \ignorespaces}
+\def\V@@@footnotetext{\strut\egroup}
+
+
+another one of the footnote commands that do not read they argument as an argument
+
+%-------------------------------------
+
+
+% ./savefnmark/savefnmark.sty
+
+obsolete
+
+%-------------------------------------
+
+
+% ./changebar/changebar.sty
+
+\let\ltx@footnotetext\@footnotetext
+\long\def\cb@footnotetext#1{%
+ \cb@trace@stack{end footnote on page \the\c@page}%
+ \cb@pop\cb@currentstack
+ \ifnum\cb@topleft=\cb@nil
+ \ltx@footnotetext{#1}%
+ \else
+ \cb@push\cb@currentstack
+ \edef\cb@temp{\the\cb@curbarwd}%
+ \ltx@footnotetext{\cb@start[\cb@temp]#1\cb@end}%
+ \fi}
+\let\@footnotetext\cb@footnotetext
+
+
+% ./eledmac/eledmac.sty
+
+\apptocmd{\@footnotetext}{\m@mmf@prepare}{}{}
+\pretocmd{\@footnotetext}{%
+ \ifnumberedpar@
+ \edtext{}{\l@dbfnote{#1}}%
+ \else
+ }{}{}
+\apptocmd{\@footnotetext}{\fi}{}{}%
+
+
+% ./yafoot/dblfnote.sty
+
+\long\def\dfn@footnotetext#1{{\setbox\dfn@boxa\vbox{
+ \let\insert\dfn@gobble
+ \columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
+ \def\@makefnmark{\smash{\dfn@makefnmark}}
+ \dfn@latex@footnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
+ \dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
+ \ifdim\dfn@dima>\z@\else
+ \dfn@dima1sp\relax
+ \setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
+ \global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \ifvoid\dfn@ins\else
+ \unvbox\dfn@ins \allowbreak \nointerlineskip \fi
+ \ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
+ \setbox\dfn@boxa\copy\dfn@ins
+ \dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \advance\@tempdima\@tempdimb \@tempdimb\@tempdima
+ \advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
+ \insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
+ \xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
+\let\dfn@latex@footnotetext\@footnotetext
+\let\@footnotetext\dfn@footnotetext
+
+
+% ./ftnxtra/ftnxtra.sty
+
+not checked what this does
+
+
+% ./acmart/acmart.cls
+
+\if@ACM@sigchiamode
+\long\def\@footnotetext#1{\marginpar{%
+ \reset@font\small
+ \interlinepenalty\interfootnotelinepenalty
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+\fi
+
+
+% ./memoir/memoir.cls
+
+ this needs some further analysis
+
diff --git a/macros/latex/required/latex-lab/usage-of-kern-kern.txt b/macros/latex/required/latex-lab/usage-of-kern-kern.txt
new file mode 100644
index 0000000000..e119197b70
--- /dev/null
+++ b/macros/latex/required/latex-lab/usage-of-kern-kern.txt
@@ -0,0 +1,80 @@
+
+ \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax
+./bxjscls/bxjsja-minimal.def
+
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/letterspace.sty
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/microtype-pdftex.def
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/microtype-luatex.def
+
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./eledmac/eledmac.sty
+
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./reledmac/reledmac.sty
+
+
+\edef\CJK@kern{\kern -2sp\kern 2sp}
+\edef\CJK@CJK{\kern -1sp\kern 1sp}
+./cjk/texinput/CJK.sty
+
+
+\edef\ruby@kern{\kern -5sp\kern 5sp}
+./cjk/texinput/ruby.sty
+
+
+% hyphenation between pinyin syllables. Values 1sp-3sp are already used
+\edef\py@sp{\kern -4sp\kern 4sp}
+./cjk/texinput/pinyin.sty
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./tufte-latex/tufte-common.def
+
+
+
+\newcommand*{\multiplefootnotemarker}{3sp}
+./memoir/memoir.cls
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./parnotes/parnotes.sty
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./lwarp/lwarp-footmisc.sty
+
+
+ \bgroup \kern-3sp\kern3sp % kerns so I can test for beginning of list
+./examdesign/examdesign.cls
+
+
+ \kern-1sp \kern1sp }
+ \kern-2sp \kern2sp }
+ \kern-3sp \kern3sp }
+ \kern-4sp \kern4sp }
+./polyglossia/gloss-korean.ldf
+
+
+
+\NewDocumentCommand \@sidenotes@multisign { } {3sp}
+./sidenotes/sidenotes.sty
+
diff --git a/macros/latex/required/tools/README.md b/macros/latex/required/tools/README.md
index cad662ebb1..5c8ee4cc31 100644
--- a/macros/latex/required/tools/README.md
+++ b/macros/latex/required/tools/README.md
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2021-11-15
+Release 2022-06-01
Overview
--------
@@ -51,4 +51,4 @@ of the package.
-----
-<p>Copyright (C) 1993-2021 The LaTeX Project <br />
+<p>Copyright (C) 1993-2022 The LaTeX Project <br />
diff --git a/macros/latex/required/tools/afterpage.dtx b/macros/latex/required/tools/afterpage.dtx
index e5fa69f515..cf949c0aca 100644
--- a/macros/latex/required/tools/afterpage.dtx
+++ b/macros/latex/required/tools/afterpage.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -101,7 +101,7 @@
% on a new page.
% \end{enumerate}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \begin{macrocode}
%<*package>
diff --git a/macros/latex/required/tools/afterpage.ins b/macros/latex/required/tools/afterpage.ins
index 0cfc531f19..3aa1679f77 100644
--- a/macros/latex/required/tools/afterpage.ins
+++ b/macros/latex/required/tools/afterpage.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/afterpage.pdf b/macros/latex/required/tools/afterpage.pdf
index 305337ebc1..d9e5b6285f 100644
--- a/macros/latex/required/tools/afterpage.pdf
+++ b/macros/latex/required/tools/afterpage.pdf
Binary files differ
diff --git a/macros/latex/required/tools/array.dtx b/macros/latex/required/tools/array.dtx
index ba88aba7c2..c9f77d77a3 100644
--- a/macros/latex/required/tools/array.dtx
+++ b/macros/latex/required/tools/array.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -33,7 +33,7 @@
%<+package>\DeclareCurrentRelease{}{2020-10-01}
%<+package>
%<+package>\ProvidesPackage{array}
-%<+package> [2021/10/04 v2.5f Tabular extension package (FMi)]
+%<+package> [2022/03/10 v2.5f Tabular extension package (FMi)]
%
% \fi
%
@@ -753,7 +753,7 @@
%
% \changes{v2.2b}{1994/02/04}{Removed interactive prompt}
%
-% \StopEventually{
+% \MaybeStop{
%
%
% \begin{thebibliography}{1}
@@ -773,7 +773,7 @@
% Addison-Wesley, Reading, Massachusetts, 1986.
% \end{thebibliography}
%
-% } ^^A end of \StopEventually
+% } ^^A end of \MaybeStop
%
%
%
@@ -890,8 +890,8 @@
% c & 0 & 0 \\
% l & 0 & 1 \\
% r & 0 & 2 \\
-% p-arg & 0 & 3 \\
-% t-arg & 0 & 4 \\
+% m-arg & 0 & 3 \\
+% p-arg & 0 & 4 \\
% b-arg & 0 & 5 \\
% | & 1 & 0 \\
% !-arg & 1 & 1 \\
@@ -907,8 +907,8 @@
% @ & 7 & --- \\
% < & 8 & --- \\
% > & 9 & --- \\
-% p & 10 & 3 \\
-% t & 10 & 4 \\
+% m & 10 & 3 \\
+% p & 10 & 4 \\
% b & 10 & 5
% \end{tabular}
% \end{center}
diff --git a/macros/latex/required/tools/array.pdf b/macros/latex/required/tools/array.pdf
index b53441748b..6059b098ca 100644
--- a/macros/latex/required/tools/array.pdf
+++ b/macros/latex/required/tools/array.pdf
Binary files differ
diff --git a/macros/latex/required/tools/bm.dtx b/macros/latex/required/tools/bm.dtx
index 2b56b92b54..daf4dce66b 100644
--- a/macros/latex/required/tools/bm.dtx
+++ b/macros/latex/required/tools/bm.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -22,7 +22,7 @@
% \fi
%
% \iffalse
-%% Copyright 1996 1997 1998 1999 2002 2003 2004 2016 2017 2019
+%% Copyright 1996 1997 1998 1999 2002 2003 2004 2016 2017 2019 2021 2022
%% David Carlisle Frank Mittelbach
%%
%% Development of this package was commissioned by Y&Y Inc.
@@ -36,7 +36,7 @@
%<driver>\ProvidesFile{bm.drv}
% \fi
% \ProvidesFile{bm.dtx}
- [2021/04/25 v1.2e Bold Symbol Support (DPC/FMi)]
+ [2022/01/05 v1.2f Bold Symbol Support (DPC/FMi)]
%
% \iffalse
%<*driver>
@@ -312,7 +312,7 @@
% the package option |nopbm| is available which prevents its use in which case |\bm| will
% use the non-bold for characters from the affected font,
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{Implementation}
%
@@ -839,9 +839,12 @@
\unvcopy{\GenericError{##1}{##2}{##3}{##4}}}%
% \end{macrocode}
% For AMS definitions.
+% \changes{v1.2f}{2022/01/05}
+% {Guard \cs{nolimits@}, gh/744}
% \begin{macrocode}
\let\DN@\copy
\let\FN@\copy
+ \let\nolimits@\copy
\let\next@\copy
\global\let\bm@first\@empty
% \end{macrocode}
@@ -1016,7 +1019,7 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\bm@end}
+% \begin{macro}[outer]{\bm@end}
% \changes{v0.10}{1997/01/04}
% {Macro added}
% Normally speaking |\outer| declarations should be avoided at all
diff --git a/macros/latex/required/tools/bm.ins b/macros/latex/required/tools/bm.ins
index c00a3e5cca..51243a6090 100644
--- a/macros/latex/required/tools/bm.ins
+++ b/macros/latex/required/tools/bm.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/bm.pdf b/macros/latex/required/tools/bm.pdf
index 676814876a..bac5c04169 100644
--- a/macros/latex/required/tools/bm.pdf
+++ b/macros/latex/required/tools/bm.pdf
Binary files differ
diff --git a/macros/latex/required/tools/calc.dtx b/macros/latex/required/tools/calc.dtx
index 78b6167fe6..97ef72e7b9 100644
--- a/macros/latex/required/tools/calc.dtx
+++ b/macros/latex/required/tools/calc.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -425,7 +425,7 @@
% syntax characters.
%
%
-% \StopEventually{
+% \MaybeStop{
% \begin{thebibliography}{1}
% \bibitem{texbook}
% \textsc{D. E. Knuth}.
diff --git a/macros/latex/required/tools/calc.pdf b/macros/latex/required/tools/calc.pdf
index 27edf27493..1d82f19254 100644
--- a/macros/latex/required/tools/calc.pdf
+++ b/macros/latex/required/tools/calc.pdf
Binary files differ
diff --git a/macros/latex/required/tools/changes.txt b/macros/latex/required/tools/changes.txt
index 43464f8b24..689d3f4369 100644
--- a/macros/latex/required/tools/changes.txt
+++ b/macros/latex/required/tools/changes.txt
@@ -10,6 +10,32 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
+# 2022-06-01 Release
+#########################
+
+2022-04-12 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * showkeys.dtx: Adapt to starred references, update varioref support.
+ Added rollback to 2014-10-28
+
+2022-01-05 David Carlisle <David.Carlisle@latex-project.org>
+
+ * bm.dtx: Guard \nolimits@ for gh issue 744
+
+2021-12-05 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * multicol.dtx (subsection{Manual column breaking} \label{sec:colbreak}):
+ Added a missing guard in \newcolumn -- it only worked in hmode (sx/624940)
+
+2021-11-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * multicol.dtx: Added rollback to v1.8 (2019-10-01 release)
+
+2021-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * All *.dtx: Replaced \StopEventually by \MaybeStop
+
+#########################
# 2021-11-15 Release
#########################
@@ -87,7 +113,7 @@ All changes above are only part of the development branch for the next release.
2021-03-28 David Carlisle <David.Carlisle@latex-project.org>
* longtable.dtx: \reset@font in captions gh/133
-
+
* longtable.dtx: Allow paragraphs in footnotes gh/364
2021-03-10 Johannes Braams <Johannes.Braams@latex-project.org>
@@ -1903,4 +1929,3 @@ Wed Jul 10 11:15:30 1996 David Carlisle <carlisle@cs.man.ac.uk>
Changed driver code slightly.
Moved the driver code in front so that the documentation can be
processed by simply running the file through LaTeX2e.
-
diff --git a/macros/latex/required/tools/dcolumn.dtx b/macros/latex/required/tools/dcolumn.dtx
index 069e633221..7415e23752 100644
--- a/macros/latex/required/tools/dcolumn.dtx
+++ b/macros/latex/required/tools/dcolumn.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -191,7 +191,7 @@
% "D{+}{\,\pm\,}{3,3}" will give nice, symmetric layout of up to three
% digits on either side of a $\pm$ sign.
%
-% \StopEventually{}
+% \MaybeStop{}
%
%
% \section{The Macros}
diff --git a/macros/latex/required/tools/dcolumn.pdf b/macros/latex/required/tools/dcolumn.pdf
index 8b5ed07f9e..ae58873898 100644
--- a/macros/latex/required/tools/dcolumn.pdf
+++ b/macros/latex/required/tools/dcolumn.pdf
Binary files differ
diff --git a/macros/latex/required/tools/delarray.dtx b/macros/latex/required/tools/delarray.dtx
index cc503707b0..d8aba52f32 100644
--- a/macros/latex/required/tools/delarray.dtx
+++ b/macros/latex/required/tools/delarray.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -100,7 +100,7 @@
% \end{verbatim}
%
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/tools/delarray.pdf b/macros/latex/required/tools/delarray.pdf
index e166deaf34..5b38f447a9 100644
--- a/macros/latex/required/tools/delarray.pdf
+++ b/macros/latex/required/tools/delarray.pdf
Binary files differ
diff --git a/macros/latex/required/tools/enumerate.dtx b/macros/latex/required/tools/enumerate.dtx
index 150a7386b8..89910438e9 100644
--- a/macros/latex/required/tools/enumerate.dtx
+++ b/macros/latex/required/tools/enumerate.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -122,7 +122,7 @@
% |\ref{LA}|, |\ref{LB}| and |\ref{LC}| produce
% `\ref{LA}', `\ref{LB}' and `\ref{LC}' respectively.
%
-% \StopEventually{}
+% \MaybeStop{}
%
%\section{Macros}
%
diff --git a/macros/latex/required/tools/enumerate.pdf b/macros/latex/required/tools/enumerate.pdf
index f9c8f07850..6ea6e1d4d6 100644
--- a/macros/latex/required/tools/enumerate.pdf
+++ b/macros/latex/required/tools/enumerate.pdf
Binary files differ
diff --git a/macros/latex/required/tools/fileerr.dtx b/macros/latex/required/tools/fileerr.dtx
index d916304116..59c1bbbbec 100644
--- a/macros/latex/required/tools/fileerr.dtx
+++ b/macros/latex/required/tools/fileerr.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -51,7 +51,7 @@
% \par After installing these files the user can respond with
% |h|, |q|, |r|, |s|, |e|, |x|, and on some systems also with
% \meta{return} to \TeX's missing file name question.
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The documentation driver}
% This code will generate the documentation. Since it is the
diff --git a/macros/latex/required/tools/fileerr.pdf b/macros/latex/required/tools/fileerr.pdf
index 3ae0da8810..7507c3009b 100644
--- a/macros/latex/required/tools/fileerr.pdf
+++ b/macros/latex/required/tools/fileerr.pdf
Binary files differ
diff --git a/macros/latex/required/tools/fontsmpl.dtx b/macros/latex/required/tools/fontsmpl.dtx
index b720826773..de2b55a608 100644
--- a/macros/latex/required/tools/fontsmpl.dtx
+++ b/macros/latex/required/tools/fontsmpl.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -70,7 +70,7 @@
% The |fontsmpl| document prompts interactively for a font family (for
% example `|cmr|') and produces a sample of that family.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{Documentation}
%
diff --git a/macros/latex/required/tools/fontsmpl.pdf b/macros/latex/required/tools/fontsmpl.pdf
index 5a4123dfc5..0ee42b5913 100644
--- a/macros/latex/required/tools/fontsmpl.pdf
+++ b/macros/latex/required/tools/fontsmpl.pdf
Binary files differ
diff --git a/macros/latex/required/tools/ftnright.dtx b/macros/latex/required/tools/ftnright.dtx
index e8da56aa20..1a7f7f584f 100644
--- a/macros/latex/required/tools/ftnright.dtx
+++ b/macros/latex/required/tools/ftnright.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -292,7 +292,7 @@
% worth of footnote material and that means that some of your footnotes are
% likely to be detached from their reference and show up on a later page!
%
-% \StopEventually{
+% \MaybeStop{
%
% \begin{small}
% \begin{thebibliography}{1}
diff --git a/macros/latex/required/tools/ftnright.pdf b/macros/latex/required/tools/ftnright.pdf
index e98cb88633..1085686752 100644
--- a/macros/latex/required/tools/ftnright.pdf
+++ b/macros/latex/required/tools/ftnright.pdf
Binary files differ
diff --git a/macros/latex/required/tools/hhline.dtx b/macros/latex/required/tools/hhline.dtx
index 98d6802451..74143d1373 100644
--- a/macros/latex/required/tools/hhline.dtx
+++ b/macros/latex/required/tools/hhline.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -148,7 +148,7 @@
% program, or if this is not possible, increasing "\arrayrulewidth"
% may help to reduce the effect.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/tools/hhline.pdf b/macros/latex/required/tools/hhline.pdf
index 188fd037f7..47076e83e9 100644
--- a/macros/latex/required/tools/hhline.pdf
+++ b/macros/latex/required/tools/hhline.pdf
Binary files differ
diff --git a/macros/latex/required/tools/indentfirst.dtx b/macros/latex/required/tools/indentfirst.dtx
index e54df284ae..dff777d29d 100644
--- a/macros/latex/required/tools/indentfirst.dtx
+++ b/macros/latex/required/tools/indentfirst.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -59,7 +59,7 @@
%
% \CheckSum{4}^^A Still I think a record:-)
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \begin{macro}{\if@afterindent}
% \LaTeX\ uses the switch |\if@afterindent| to decide whether to indent
diff --git a/macros/latex/required/tools/indentfirst.pdf b/macros/latex/required/tools/indentfirst.pdf
index f6460af970..dbc58d7de9 100644
--- a/macros/latex/required/tools/indentfirst.pdf
+++ b/macros/latex/required/tools/indentfirst.pdf
Binary files differ
diff --git a/macros/latex/required/tools/layout.dtx b/macros/latex/required/tools/layout.dtx
index de61aeae8c..323705e9ba 100644
--- a/macros/latex/required/tools/layout.dtx
+++ b/macros/latex/required/tools/layout.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -92,7 +92,7 @@
% \layout
% \end{figure}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The implementation}
%
diff --git a/macros/latex/required/tools/layout.pdf b/macros/latex/required/tools/layout.pdf
index 153ffc0a8a..911f310408 100644
--- a/macros/latex/required/tools/layout.pdf
+++ b/macros/latex/required/tools/layout.pdf
Binary files differ
diff --git a/macros/latex/required/tools/longtable.dtx b/macros/latex/required/tools/longtable.dtx
index b66aef075e..72b8727d81 100644
--- a/macros/latex/required/tools/longtable.dtx
+++ b/macros/latex/required/tools/longtable.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -770,7 +770,7 @@
% \end{verbatim}
% \endgroup
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \finalclearpage
% \section{The Macros}
diff --git a/macros/latex/required/tools/longtable.ins b/macros/latex/required/tools/longtable.ins
index 92a04e00d4..7f53df7c5e 100644
--- a/macros/latex/required/tools/longtable.ins
+++ b/macros/latex/required/tools/longtable.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/longtable.pdf b/macros/latex/required/tools/longtable.pdf
index 77ab8c2bbc..009110e47c 100644
--- a/macros/latex/required/tools/longtable.pdf
+++ b/macros/latex/required/tools/longtable.pdf
Binary files differ
diff --git a/macros/latex/required/tools/multicol-2019-10-01.sty b/macros/latex/required/tools/multicol-2019-10-01.sty
new file mode 100644
index 0000000000..221f62f68e
--- /dev/null
+++ b/macros/latex/required/tools/multicol-2019-10-01.sty
@@ -0,0 +1,1105 @@
+%% This is a rollback file for multicol to the last version within release 2019-10-01
+%% =======================
+%%
+%%
+%% This is file `multicol.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% multicol.dtx (with options: `package,badness,check,marktrace,nobalance')
+%%
+%% 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/
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%% Copyright (C) 1993-2021
+%% The LaTeX Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools 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
+%% 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
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% Package `multicol' to use with LaTeX2e
+%% Copyright 1989-2019 Frank Mittelbach
+%%
+%% In addition to the terms of LPPL any distributed version
+%% (unchanged or modified) of multicol has to keep the statement
+%% about the moral obligation for using multicol. In case of major
+%% changes where this would not be appropriate the author of the
+%% changed version should contact the copyright holder.
+%%
+%%
+%% Moral obligation for using multicol:
+%% ------------------------------------
+%%
+%% Users of multicol who wish to include or use multicol or a modified
+%% version in a proprietary and commercially market product are asked
+%% under certain conditions (see below) for the payment of a license
+%% fee. The size of this fee is to be determined, in each instance,
+%% by the commercial user, depending on his/her judgment of the value of
+%% multicol for his/her product.
+%%
+%%
+%% The conditions for this are as follows:
+%%
+%% The producer of a proprietary and commercially market product
+%% that involves typesetting using multicol is asked to determine
+%% the value of a license fee for using multicol if
+%%
+%% - the product is a document and the producer has decided to
+%% include multicol to typeset (parts of) the document or has
+%% directed the author of the document to include multicol (for
+%% example, by providing a class file to be used by the author)
+%%
+%% - the product is a LaTeX class or package that includes multicol
+%%
+%%
+%% There is no moral obligation in case
+%%
+%% - the product is a document but producer has not directed
+%% the author to include multicol (in that case the moral obligation
+%% lies with the author of the document)
+%%
+%% - the product does not involve typesetting, e.g., consists, for
+%% example, of distributing multicol and its documentation.
+%%
+%% - the product is not proprietary, i.e., is made available as free
+%% software itself (which doesn't prohibit its commercial marketing)
+%%
+%% - multicol is used for non-commercial purposes
+%%
+%%
+%% Determining a license fee might result in a license fee of zero
+%% (i.e., no payment) in case a producer has determined that the use
+%% of multicol has no enhancing effect on the product. This is a
+%% plausible scenario, i.e., in the above two cases the producer is
+%% only asked to evaluate the value of multicol for the product
+%% not for the payment of a license fee per se (which might or might
+%% not follow from this evaluation).
+%%
+%% The license fee, if any, can be payed either to the LaTeX fund
+%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
+%% the program who can be contacted at
+%%
+%% Frank.Mittelbach@latex-project.org
+%%
+\NeedsTeXFormat{LaTeX2e}[2018-04-01]
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
+\DeclareCurrentRelease{}{2018-04-01}
+
+\ProvidesPackage{multicol}
+ [2019/12/09 v1.8y multicolumn formatting (FMi)]
+%%
+\DeclareOption{twocolumn}
+ {\PackageWarning{multicol}{May not work
+ with the twocolumn option}}
+\newcount\c@tracingmulticols
+\DeclareOption{errorshow}
+ {\c@tracingmulticols\z@}
+\DeclareOption{infoshow}
+ {\c@tracingmulticols\@ne}
+\DeclareOption{balancingshow}
+ {\c@tracingmulticols\tw@}
+\DeclareOption{markshow}
+ {\c@tracingmulticols\thr@@}
+\DeclareOption{debugshow}
+ {\c@tracingmulticols5\relax}
+\let\mc@gridwarn\maxdimen
+\DeclareOption{grid}{\def\mc@gridwarn{\@maxdepth}}
+\DeclareOption{colaction}{%
+ \def\mc@col@status@write{%
+ \protected@write\@auxout{}%
+ {\string\mc@col@status
+ {\ifmc@firstcol 1\else 2\fi}}%
+ \mc@firstcolfalse}%
+ \def\mc@lastcol@status@write{%
+ \protected@write\@auxout{}%
+ {\string\mc@col@status{3}}}%
+}
+\let\mc@col@status@write\relax
+\let\mc@lastcol@status@write\relax
+\ProcessOptions
+\def\multicols#1{\col@number#1\relax
+ \ifnum\col@number<\tw@
+ \PackageWarning{multicol}%
+ {Using `\number\col@number'
+ columns doesn't seem a good idea.^^J
+ I therefore use two columns instead}%
+ \col@number\tw@ \fi
+ \ifnum\col@number>20
+ \PackageError{multicol}%
+ {Too many columns}%
+ {Current implementation doesn't
+ support more than 20 columns.%
+ \MessageBreak
+ I therefore use 20 columns instead}%
+ \col@number20 \fi
+ \ifx\@footnotetext\mult@footnotetext\else
+ \let\orig@footnotetext\@footnotetext
+ \let\@footnotetext\mult@footnotetext
+ \fi
+ \@ifnextchar[\mult@cols{\mult@cols[]}}
+\long\def\mult@footnotetext#1{\begingroup
+ \columnwidth\textwidth
+ \orig@footnotetext{#1}\endgroup}
+\def\mult@cols[#1]{\@ifnextchar[%
+ {\mult@@cols{#1}}%
+ {\mult@@cols{#1}[\premulticols]}}
+\def\mult@@cols#1[#2]{%
+ \par
+ \ifinner \@boxedmulticolstrue
+ \else
+ \ifnum \doublecol@number>\z@
+ \@boxedmulticolstrue
+ \fi
+ \fi
+ \mult@info\z@
+ {Starting environment with
+ \the\col@number\space columns%
+ \if@boxedmulticols\MessageBreak
+ (boxed mode)\fi
+ }%
+ \enough@room{#2}%
+ #1\par\addvspace\multicolsep
+ \ifdim \prevdepth = -\@m\p@
+ \else
+ \@tempcnta\prevdepth
+ \@tempcntb\baselineskip
+ \divide\@tempcnta\@tempcntb
+ \advance\@tempcnta\@ne
+ \dimen@\prevdepth
+ \advance\dimen@ -\@tempcnta\baselineskip
+ \advance\dimen@ \topskip
+ \kern-\dimen@
+ \fi
+ \begingroup
+ \prepare@multicols
+ \if@boxedmulticols
+ \setbox\mult@box\vbox\bgroup
+ \color@setgroup
+ \fi
+ \ignorespaces}
+\newif\if@boxedmulticols
+\@boxedmulticolsfalse
+\newbox\mult@box
+\def\enough@room#1{%
+ \if@boxedmulticols\else
+ \par
+ \bgroup\@nobreakfalse\addpenalty\z@\egroup
+ \page@free \pagegoal
+ \advance \page@free -\pagetotal
+ \@tempskipa#1\relax
+ \mult@info\z@
+ {Current page:\MessageBreak
+ height=%
+ \the\pagegoal: used \the\pagetotal
+ \space -> free=\the\page@free
+ \MessageBreak
+ needed \the\@tempskipa
+ \space(for #1)}%
+ \ifdim \page@free <#1\newpage \fi
+ \fi}
+\def\prepare@multicols{%
+ \multicol@leftmargin\@totalleftmargin
+ \@totalleftmargin\z@
+ \parshape\z@
+ \doublecol@number\col@number
+ \multiply\doublecol@number\tw@
+ \advance\doublecol@number\mult@rightbox
+ \if@boxedmulticols
+ \let\l@kept@firstmark\kept@firstmark
+ \let\l@kept@botmark\kept@botmark
+ \global\let\kept@firstmark\@empty
+ \global\let\kept@botmark\@empty
+ \else
+ \nointerlineskip {\topskip\z@\null}%
+ \output{%
+ \global\setbox\partial@page\vbox
+ {%
+ \ifvoid\partial@page\else
+ \PackageError{multicol}%
+ {Error saving partial page}%
+ {The part of the page before
+ the multicols environment was
+ nearly full with^^Jthe result
+ that starting the environment
+ will produce an overfull
+ page. Some^^Jtext may be lost!
+ Please increase \premulticols
+ either generally or for this%
+ ^^Jenvironment by specifying a
+ suitable value in the second
+ optional argument to^^Jthe
+ multicols environment.}
+ \unvbox\partial@page
+ \box\last@line
+ \fi
+ \unvbox\@cclv
+ \global\setbox\last@line\lastbox
+ }%
+ \prep@keptmarks
+ \global\let\kept@topmark\firstmark
+ }\eject
+ \advance\@colroom-\ht\partial@page
+ \set@mult@vsize\relax
+ \output{\multi@column@out}%
+ \init@mult@footins
+ \reinsert@footnotes
+ \def\clearpage{%
+ \ifx\@deferlist\@empty\else
+ \PackageError{multicol}%
+ {Deferred floats not cleared}%
+ {A \string\clearpage\space inside multicols acts like
+ \string\newpage\space and doesn't clear floats.\MessageBreak
+ Move it before the multicols environment if you need it.}%
+ \fi
+ \newpage}%
+ \fi
+ \vbadness\@Mi \hbadness5000
+ \tolerance\multicoltolerance
+ \pretolerance\multicolpretolerance
+ \setemergencystretch\col@number\hsize
+ \set@floatcmds
+ \advance\baselineskip\multicolbaselineskip
+ \hsize\linewidth \advance\hsize\columnsep
+ \advance\hsize-\col@number\columnsep
+ \divide\hsize\col@number
+ \full@width\linewidth
+ \linewidth\hsize
+ \columnwidth\hsize
+}
+\def\init@mult@footins{%
+ \multiply\count\footins\col@number
+ \multiply\skip \footins\col@number
+}
+\def\set@mult@vsize#1{%
+ \vsize\@colroom
+ \@tempdima\baselineskip
+ \advance\@tempdima-\topskip
+ \advance\vsize\@tempdima
+ \vsize\col@number\vsize
+ \advance\vsize-\@tempdima
+ \advance\vsize\col@number\baselineskip
+ #1\advance\vsize
+ \c@collectmore\baselineskip}
+\newdimen\multicol@leftmargin
+\mathchardef\@Mvi=10006 % 10005 is \columnbreak
+\def\endmulticols{\par
+ \if@boxedmulticols
+ \remove@discardable@items\color@endgroup\egroup
+ \balance@columns
+ \return@nonemptymark{first}%
+ \kept@firstmark
+ \return@nonemptymark{bot}%
+ \kept@botmark
+ \page@sofar
+ \global\let\kept@firstmark
+ \l@kept@firstmark
+ \global\let\kept@botmark
+ \l@kept@botmark
+ \mult@info\tw@
+ {Restore kept marks to\MessageBreak
+ first: \meaning\kept@firstmark
+ \MessageBreak bot\space\space:
+ \meaning\kept@botmark }%
+ \else
+ \ifdim\pagegoal=\maxdimen
+ \ifvoid\colbreak@box\else
+ \mult@info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \unvbox\colbreak@box\fi
+ \fi
+ \penalty\z@
+ \penalty-\@Mvi
+ \ifvbox\partial@page
+ \unvbox\partial@page\fi
+ \global\let\kept@firstmark\@empty
+ \global\let\kept@botmark\@empty
+ \mult@info\tw@
+ {Make kept marks empty}%
+ \fi
+ \@checkend{multicols}%
+ \endgroup
+ \global\c@unbalance\z@
+ \if@boxedmulticols
+ \mc@col@status@write
+ \else
+ \reinsert@footnotes
+ \ifdim \pagegoal=\maxdimen
+ \global\vsize\@colroom
+ \else
+ \enough@room\postmulticols
+ \fi
+ \fi
+ \addvspace\multicolsep
+ \prevdepth\z@
+ \mult@info\z@
+ {Ending environment
+ \if@boxedmulticols
+ \space(boxed mode)\fi
+ }}
+\newcount\c@unbalance
+\newcount\c@collectmore
+\newcount\doublecol@number
+\newcount\multicoltolerance
+\newcount\multicolpretolerance
+\newdimen\full@width
+\newdimen\page@free
+\newdimen\premulticols
+\newdimen\postmulticols
+\newskip\multicolsep
+\newskip\multicolbaselineskip
+\newbox\partial@page
+\newbox\last@line
+\c@unbalance = 0
+\c@collectmore = 0
+\multicoltolerance = 9999
+\multicolpretolerance = -1
+\premulticols = 50pt
+\postmulticols= 20pt
+\multicolsep = 12pt plus 4pt minus 3pt
+\multicolbaselineskip=0pt
+\def\process@cols#1#2{\count@#1\relax
+ \loop
+ #2%
+ \advance\count@\tw@
+ \ifnum\count@<\doublecol@number
+ \repeat}
+\def\page@sofar{%
+ \process@cols\mult@rightbox
+ {\ifvoid\count@
+ \setbox\count@\hbox to\hsize{}%
+ \else
+ \wd\count@\hsize
+ \fi}%
+ \count@\col@number \advance\count@\m@ne
+ \mult@info\z@
+ {Column spec: \the\full@width\space = indent
+ + columns + sep =\MessageBreak
+ \the\multicol@leftmargin\space
+ + \the\col@number\space
+ x \the\hsize\space
+ + \the\count@\space
+ x \the\columnsep
+ }%
+\ifvmode\else\errmessage{Multicol Error}\fi
+ \nointerlineskip
+ \setbox\z@\hbox{p}\global\dimen\tw@\dp\z@
+ \moveright\multicol@leftmargin
+ \hbox to\full@width{%
+ \mc@align@columns
+ \rlap{\phantom p}%
+ }%
+ \prevdepth\z@
+ \kern-\dimen\tw@
+ \ifdim\dimen\tw@ > \mc@gridwarn
+ \PackageWarning{multicol}%
+ {Very deep columns!\MessageBreak
+ Grid alignment might be broken}%
+ \fi
+}
+\def\columnseprulecolor{\normalcolor}
+\def\reinsert@footnotes{\ifvoid\footins\else
+ \insert\footins{}\fi}
+\def\vfilmaxdepth{\vskip \z@ \@plus .0001fil
+ \@minus \@maxdepth}
+\def\multi@column@out{%
+ \ifnum\outputpenalty <-\@M
+ \speci@ls \else
+ \ifvoid\colbreak@box\else
+ \mult@info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \setbox\@cclv\vbox{%
+ \unvbox\colbreak@box
+ \penalty-\@Mv
+ \unvbox\@cclv}%
+ \fi
+ \splittopskip\topskip
+ \splitmaxdepth\@maxdepth
+ \boxmaxdepth\@maxdepth
+ \dimen@\@colroom
+ \divide\skip\footins\col@number
+ \ifvoid\footins \else
+ \leave@mult@footins
+ \fi
+
+ \ifvbox \@kludgeins
+ \advance \dimen@ -\ht\@kludgeins
+ \ifdim \wd\@kludgeins>\z@
+ \shr@nkingtrue
+ \fi
+ \fi
+ \process@cols\mult@gfirstbox{%
+ \setbox\count@
+ \vsplit\@cclv to\dimen@
+ \set@keptmarks
+ \setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@
+ \ifshr@nking\vfilmaxdepth\fi}%
+ }%
+ \setbox\mult@rightbox
+ \vsplit\@cclv to\dimen@
+ \set@keptmarks
+ \setbox\mult@rightbox\vbox to\dimen@
+ {\unvbox\mult@rightbox
+ \ifshr@nking\vfilmaxdepth\fi}%
+ \ifvoid\@cclv \else
+ \unvbox\@cclv
+ \ifnum\outputpenalty=\@M
+ \else
+ \penalty\outputpenalty
+ \fi
+ \ifvoid\footins\else
+ \PackageWarning{multicol}%
+ {I moved some lines to
+ the next page.\MessageBreak
+ Footnotes on page
+ \thepage\space might be wrong}%
+ \fi
+ \ifnum \c@tracingmulticols>\thr@@
+ \hrule\allowbreak \fi
+ \fi
+ \ifx\@empty\kept@firstmark
+ \let\firstmark\kept@topmark
+ \let\botmark\kept@topmark
+ \else
+ \let\firstmark\kept@firstmark
+ \let\botmark\kept@botmark
+ \fi
+ \let\topmark\kept@topmark
+ \mult@info\tw@
+ {Use kept top mark:\MessageBreak
+ \meaning\kept@topmark
+ \MessageBreak
+ Use kept first mark:\MessageBreak
+ \meaning\kept@firstmark
+ \MessageBreak
+ Use kept bot mark:\MessageBreak
+ \meaning\kept@botmark
+ \MessageBreak
+ Produce first mark:\MessageBreak
+ \meaning\firstmark
+ \MessageBreak
+ Produce bot mark:\MessageBreak
+ \meaning\botmark
+ \@gobbletwo}%
+ \boxmaxdepth\maxdimen
+ \setbox\@cclv\vbox{\unvbox\partial@page
+ \page@sofar}%
+ \@makecol\@outputpage
+ \global\let\kept@topmark\botmark
+ \global\let\kept@firstmark\@empty
+ \global\let\kept@botmark\@empty
+ \mult@info\tw@
+ {(Re)Init top mark:\MessageBreak
+ \meaning\kept@topmark
+ \@gobbletwo}%
+ \global\@colroom\@colht
+ \global \@mparbottom \z@
+ \global \@textfloatsheight \z@
+ \process@deferreds
+ \@whilesw\if@fcolmade\fi{\@outputpage
+ \global\@colroom\@colht
+ \process@deferreds}%
+ \mult@info\@ne
+ {Colroom:\MessageBreak
+ \the\@colht\space
+ after float space removed
+ = \the\@colroom \@gobble}%
+ \set@mult@vsize \global
+ \fi}
+\def\leave@mult@footins{%
+ \advance\dimen@-\skip\footins
+ \advance\dimen@-\ht\footins
+}
+\def\speci@ls{%
+ \ifnum\outputpenalty <-\@Mi
+ \ifnum \outputpenalty<-\@MM
+ \PackageError{multicol}{Document end
+ inside multicols environment}\@ehd
+ \@specialoutput
+ \else
+ \ifnum\outputpenalty = -\@Mv
+ \mult@info\@ne{Forced column
+ break seen}%
+ \global\advance\vsize-\pagetotal
+ \global\setbox\colbreak@box
+ \vbox{%
+ \ifvoid\colbreak@box
+ \else
+ \unvbox\colbreak@box
+ \penalty-\@Mv
+ \fi
+ \boxmaxdepth\@maxdepth
+ \setbox\@cclv\vbox{%
+ \unvbox\@cclv
+ \remove@discardable@items}%
+ \dimen@\dp\@cclv
+ \unvbox\@cclv
+ \kern-\dimen@
+ }%
+ \reinsert@footnotes
+ \else
+ \ifnum\outputpenalty = -\@Mvi
+ \mult@info\@ne{End penalty of multicols seen}%
+ \outputpenalty\@M % pretend we had a natural forced break
+ \balance@columns@out
+ \else
+ \PackageWarningNoLine{multicol}%
+ {Floats and marginpars not
+ allowed inside `multicols'
+ environment!}%
+ \unvbox\@cclv\reinsert@footnotes
+ \xdef\@freelist{\@freelist\@currlist}%
+ \gdef\@currlist{}%
+ \fi
+ \fi
+ \fi
+ \else \@doclearpage \fi
+}
+\def\process@deferreds{%
+ \@floatplacement
+ \@tryfcolumn\@deferlist
+ \if@fcolmade\else
+ \begingroup
+ \let\@tempb\@deferlist
+ \gdef\@deferlist{}%
+ \let\@elt\@scolelt
+ \@tempb \endgroup
+ \fi}
+\newif\ifshr@nking
+\def\raggedcolumns{%
+ \@bsphack\shr@nkingtrue\@esphack}
+\def\flushcolumns{%
+ \@bsphack\shr@nkingfalse\@esphack}
+\def\balance@columns@out{%
+ \setbox\mult@box\vbox{%
+ \ifvoid\colbreak@box\else
+ \unvbox\colbreak@box
+ \penalty-\@Mv
+ \mult@info\@ne{Re-adding
+ forced break(s) in balancing}%
+ \fi
+ \unvbox\@cclv
+ \remove@discardable@items
+ }%
+ \balance@columns
+ \iftoo@bad
+ \mult@info\@ne
+ {Balancing failed ...
+ cut a normal page}%
+ \setbox\@cclv\vbox
+ {\vskip\topskip
+ \vskip-\splittopskip
+ \unvbox\mult@box
+ \penalty-\@Mvi
+ }%
+ \multi@column@out
+ \else
+ \global\vsize\@colroom
+ \global\advance\vsize\ht\partial@page
+ \ifvbox\@kludgeins\insert\@kludgeins
+ {\unvbox\@kludgeins}\fi
+ \unvbox\partial@page
+ \return@nonemptymark{first}\kept@firstmark
+ \return@nonemptymark{bot}\kept@botmark
+ \page@sofar
+ \penalty\z@
+ \fi
+}
+\def\balance@columns{%
+ \get@keptmarks\mult@box
+ \setbox\mult@box\vbox{%
+ \penalty-\@M
+ \unvbox\mult@box
+ }%
+ \@tempdima\topskip
+ \splittopskip\@tempdima
+ \@plus\multicolundershoot
+ \@minus\multicolovershoot
+ \splitmaxdepth\@maxdepth
+ \boxmaxdepth\@maxdepth
+ \setbox\@tempboxa\vsplit\mult@box to\z@
+ \@tempdima\ht\mult@box
+ \advance\@tempdima\dp\mult@box
+ \divide\@tempdima\col@number
+ \count@\@tempdima
+ \divide\count@\baselineskip
+ \dimen@\count@\baselineskip
+ \advance\dimen@\topskip
+ \ifdim \dimen@ >\@tempdima
+ \advance\dimen@-\baselineskip
+ \fi
+ \@tempdima\dimexpr
+ \topskip +\c@minrows\baselineskip-\baselineskip\relax
+ \ifnum\dimen@<\@tempdima
+ \mult@info\@ne
+ {Start value
+ \the\dimen@ \space ->
+ \the\@tempdima \space (corrected for minrows)}%
+ \dimen@\@tempdima
+ \fi
+ \advance\dimen@\c@unbalance\baselineskip
+ \mult@info\@ne
+ {Balance columns\on@line:
+ \ifnum\c@unbalance=\z@\else
+ (off balance=\number\c@unbalance)\fi
+ \@gobbletwo}%
+ \ifnum\dimen@<\topskip
+ \mult@info\@ne
+ {Start value
+ \the\dimen@ \space ->
+ \the\topskip \space (corrected)}%
+ \dimen@\topskip
+ \fi
+ \vbadness\@M
+ \vfuzz \maxdimen
+ \last@try-\p@
+ \loop
+ {\process@cols\mult@grightbox
+ {\global\setbox\count@
+ \box\voidb@x}}%
+ \global\setbox\mult@grightbox
+ \copy\mult@box
+ \too@badfalse
+ \forcedbreak@leftoverfalse
+ {\process@cols\mult@firstbox{%
+ \global\setbox\count@
+ \vsplit\mult@grightbox to\dimen@
+ \global\setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@}%
+ \ifnum\c@tracingmulticols>\@ne
+ \@tempcnta\count@
+ \advance\@tempcnta-\mult@grightbox
+ \divide\@tempcnta \tw@
+ \message{^^JColumn
+ \number\@tempcnta\space
+ badness: \the\badness\space}%
+ \fi
+ \ifnum\badness>\c@columnbadness
+ \ifnum\c@tracingmulticols>\@ne
+ \message{too bad
+ (>\the\c@columnbadness)}%
+ \fi
+ \too@badtrue
+ \fi
+ }}%
+ \global\setbox\mult@grightbox
+ \vbox{\unvbox\mult@grightbox}%
+ \setbox\mult@nat@firstbox
+ \vbox{\unvcopy\mult@firstbox}%
+ \ifnum\c@tracingmulticols>\@ne
+ \message{^^JFirst column
+ = \the\dimen@\space
+ (\the\ht\mult@nat@firstbox)}\fi
+ \ifnum\c@tracingmulticols>\@ne
+ \message{<> last column =
+ \the\ht\mult@grightbox^^J}%
+ \fi
+ \ifdim\ht\mult@grightbox >\dimen@
+ \too@badtrue
+ \ifnum\c@tracingmulticols>\@ne
+ \typeout{Rejected: last
+ column too large!}%
+ \fi
+ \else
+ \setbox\@tempboxa
+ \copy\mult@grightbox
+ \setbox\z@\vsplit\@tempboxa to\maxdimen
+ \ifvoid\@tempboxa
+ \global\setbox\mult@grightbox
+ \vbox to\dimen@
+ {\unvbox\mult@grightbox}%
+ \ifnum\c@tracingmulticols>\@ne
+ \message{Final badness:
+ \the\badness}%
+ \fi
+ \ifnum\badness>\c@finalcolumnbadness
+ \global\setbox\mult@grightbox
+ \vbox to\dimen@
+ {\unvbox\mult@grightbox\vfil}%
+ \ifnum\c@tracingmulticols>\@ne
+ \message{ setting natural
+ (> \the\c@finalcolumnbadness)}%
+ \fi
+ \fi
+ \else
+ \@tempdima\@colroom
+ \advance\@tempdima \maxbalancingoverflow
+ \ifdim \dimen@ < \@tempdima
+ \too@badtrue
+ \ifnum\c@tracingmulticols>\@ne
+ \typeout{Rejected: unprocessed
+ forced break(s) in last column!}%
+ \fi
+ \else
+ \forcedbreak@leftovertrue
+ \ifnum\c@tracingmulticols>\@ne
+ \typeout{Failed: columns too large
+ with unprocessed forced break(s)!}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifdim\ht\mult@nat@firstbox<\dimen@
+ \ifdim\ht\mult@nat@firstbox>\last@try
+ \too@badtrue
+ \ifnum\c@tracingmulticols>\@ne
+ \typeout{Retry: using natural
+ height of first column!}%
+ \fi
+ \dimen@\ht\mult@nat@firstbox
+ \last@try\dimen@
+ \advance\dimen@-\p@
+ \fi
+ \fi
+ \iftoo@bad
+ \advance\dimen@\p@
+ \repeat
+ \ifforcedbreak@leftover
+ \too@badtrue
+ \else
+ \if@boxedmulticols\else
+ \ifdim\dimen@>\@colroom
+ \dimen@\@colroom
+ \fi
+ \fi
+ \process@cols\mult@rightbox
+ {\@tempcnta\count@
+ \advance\@tempcnta\@ne
+ \vfuzz\z@
+ \setbox\count@\vbox to\dimen@
+ {%
+ \vskip \z@
+ \@plus-\multicolundershoot
+ \@minus-\multicolovershoot
+ \unvbox\@tempcnta
+ \ifshr@nking\vfilmaxdepth\fi
+ }%
+ \ifnum\badness>\@M
+ \vfuzz\maxdimen % no overfull warning
+ \setbox\@tempboxa \vbox to\dimen@
+ {\vskip-\maxbalancingoverflow
+ \unvcopy\count@}%
+ \ifnum\badness>\@M
+ \mult@info\@ne
+ {Balanced column more than
+ \the\maxbalancingoverflow\space
+ too large}%
+ \too@badtrue
+ \else
+ \mult@info\@ne
+ {Balanced column
+ too large, but less than
+ \the\maxbalancingoverflow}%
+ \fi
+ \fi
+ }%
+ \fi
+}
+\newdimen\maxbalancingoverflow
+\maxbalancingoverflow=12pt
+
+\ifnum\numexpr \count20-\count14-1<41 % = 2 * 20 + 1
+ \count14=\@cclv
+\fi
+\newbox\mult@rightbox
+\newbox\mult@grightbox
+\newbox\mult@gfirstbox
+\newbox\mult@firstbox
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa
+\let\@tempa\relax
+\@ifundefined{emergencystretch}
+ {\newdimen\emergencystretch}{}
+\def\setemergencystretch#1#2{%
+ \emergencystretch 4pt
+ \multiply\emergencystretch#1}
+
+\def\set@floatcmds{%
+ \let\@dblfloat\@dbflt
+ \def\end@dblfloat{\@endfloatbox
+ \@largefloatcheck
+ \outer@nobreak
+ \ifnum\@floatpenalty<\z@
+ \@cons\@deferlist\@currbox
+ \fi
+ \ifnum\@floatpenalty=-\@Mii
+ \@Esphack
+ \fi}}
+\def\kept@topmark{{}{}}
+\let\kept@firstmark\@empty
+\let\kept@botmark\@empty
+\def\return@nonemptymark#1#2{%
+ \ifx#2\@empty
+ \else
+ \mult@info\tw@
+ {Returned #1 mark:\MessageBreak
+ \meaning#2}%
+ \toks@\expandafter{#2}%
+ \mark{\the\toks@}%
+ \nobreak
+ \fi}
+\def\get@keptmarks#1{%
+ \begingroup
+ \vbadness\@M
+ \setbox#1\copy#1%
+ \setbox#1\vsplit#1to\maxdimen
+ \set@keptmarks
+ \endgroup
+}
+\def\set@keptmarks{%
+ \ifx\kept@firstmark\@empty
+ \expandafter\gdef\expandafter
+ \kept@firstmark
+ \expandafter{\splitfirstmark}%
+ \ifx\kept@firstmark\@empty\else
+ \mult@info\tw@
+ {Set kept first mark:\MessageBreak
+ \meaning\kept@firstmark%
+ \@gobbletwo}%
+ \fi
+ \fi
+ \expandafter\def\expandafter\@tempa
+ \expandafter{\splitbotmark}%
+ \ifx\@tempa\@empty\else
+ \global\let\kept@botmark\@tempa
+ \mult@info\tw@
+ {Set kept bot mark:\MessageBreak
+ \meaning\kept@botmark%
+ \@gobbletwo}%
+ \fi}%
+\def\prep@keptmarks{%
+ \if@boxedmulticols \else
+ \get@keptmarks\partial@page
+ \fi}
+\skip0=0pt
+\edef\the@zero@skip{\the\skip0}
+\def\remove@discardable@items{%
+ \unpenalty
+ \edef\@tempa{\the\lastskip}%
+ \unskip
+ \ifx\@tempa\the@zero@skip
+ \edef\@tempb{\the\lastskip}%
+ \ifx\@tempb\the@zero@skip
+ \else
+ \unskip
+ \ifnum \lastpenalty=\@M
+ \vskip\@tempb\vskip\@tempa\relax
+ \else
+ \remove@discardable@items
+ \fi
+ \fi
+ \else
+ \remove@discardable@items
+ \fi
+}
+\newif\iftoo@bad
+\def\too@badtrue{\global\let\iftoo@bad\iftrue}
+\def\too@badfalse{\global\let\iftoo@bad\iffalse}
+\newif\ifforcedbreak@leftover
+\newcount\c@minrows
+\c@minrows=1
+\newcount\c@columnbadness
+\c@columnbadness=10000
+\newcount\c@finalcolumnbadness
+\c@finalcolumnbadness=9999
+
+\newdimen\last@try
+
+\newdimen\multicolovershoot
+\newdimen\multicolundershoot
+\multicolovershoot=0pt
+\multicolundershoot=2pt
+\newbox\mult@nat@firstbox
+\def\mult@info#1#2{%
+ \ifnum\c@tracingmulticols>#1%
+ \GenericWarning
+ {(multicol)\@spaces\@spaces}%
+ {Package multicol: #2}%
+ \fi
+}
+ \@namedef{multicols*}{%
+ \ifinner
+ \PackageWarning{multicol}%
+ {multicols* inside a box does
+ not make sense.\MessageBreak
+ Going to balance anyway}%
+ \else
+ \def\balance@columns@out
+ {\multi@column@out \penalty-\@Mvi }%
+ \fi
+ \begin{multicols}
+}
+\@namedef{endmulticols*}{%
+ \par
+ \ifdim\lastskip>\z@ \vskip-\lastskip \fi
+ \ifdim \prevdepth>\z@
+ \vskip-\ifdim\prevdepth>\boxmaxdepth
+ \boxmaxdepth
+ \else \prevdepth \fi
+ \fi
+ \ifshr@nking\else
+ \vfil
+ \fi
+ \end{multicols}}
+\mathchardef\@Mv=10005
+\def\columnbreak{%
+ \ifnum\col@number<\tw@
+ \PackageError{multicol}%
+ {\noexpand\columnbreak outside multicols}%
+ {This command can only be used within
+ a multicols or multicols* environment.}%
+ \else
+ \ifvmode
+ \penalty -\@Mv\relax
+ \else
+ \@bsphack
+ \vadjust{\penalty -\@Mv\relax}%
+ \@esphack
+ \fi
+ \fi}
+\newbox\colbreak@box
+\def\LR@column@boxes{%
+ \process@cols\mult@gfirstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \mc@col@status@write
+ \box\count@
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss}%
+ \ifdim\dp\mult@rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult@rightbox \fi
+ \mc@lastcol@status@write
+ \box\mult@rightbox
+}
+
+\def\RL@column@boxes{%
+ \process@cols\mult@gfirstbox{%
+ \hskip\hsize
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss
+ }%
+ \hskip\hsize
+ \process@cols\mult@gfirstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \hskip-\hsize
+ \mc@col@status@write
+ \box\count@
+ \hskip-\hsize
+ \hskip-\columnsep
+ }%
+ \ifdim\dp\mult@rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult@rightbox \fi
+ \hskip-\hsize
+ \mc@lastcol@status@write
+ \box\mult@rightbox
+ \hskip-\hsize
+ \hskip\full@width
+ }
+\newcommand\RLmulticolcolumns
+ {\let\mc@align@columns
+ \RL@column@boxes}
+\newcommand\LRmulticolcolumns
+ {\let\mc@align@columns
+ \LR@column@boxes}
+\LRmulticolcolumns
+\newcount\mc@col@check@num
+
+\newcommand\docolaction{%
+ \ifx\mc@col@status@write\relax
+ \PackageError{multicol}%
+ {Option 'colaction' not selected}%
+ {\string\docolaction\space
+ requires the use of the 'colaction'
+ option on the package}%
+ \fi
+ \global\advance\mc@col@check@num\@ne
+ \edef\mc@col@type{\expandafter\ifx
+ \csname mc@col-\the\mc@col@check@num
+ \endcsname\relax
+ 0\else
+ \csname mc@col-\the\mc@col@check@num
+ \endcsname
+ \fi}%
+ \@ifstar
+ {\@docolactionstartrue \@docolaction}%
+ {\@docolactionstarfalse\@docolaction}%
+}
+\newcommand\@docolaction[4][1]{%
+ \edef\@docolactioncheck{\write\@auxout
+ {\string\mc@set@col@status
+ {mc@col-\the\mc@col@check@num}%
+ {\mc@col@type}}}%
+ \if@docolactionstar \@docolactioncheck \fi
+ \ifcase \mc@col@type\relax
+ \ifcase #1\or #2\or#3\or#4\fi
+ \or
+ #2% % 1 First col
+ \or
+ #3% % 2 any middle col
+ \or
+ #4% % 3 last col
+ \else
+ \ERRORwrongdefaultgiven
+ \fi
+ \if@docolactionstar \else \@docolactioncheck \fi
+}
+\newif\if@docolactionstar
+\def\mc@col@status#1{%
+ \gdef\mc@curr@col@status{#1}}
+\def\mc@set@col@status#1#2{%
+ \global\expandafter\let\csname #1\endcsname
+ \mc@curr@col@status}
+\AtEndDocument{\def\mc@set@col@status#1#2{%
+ \ifnum #2=\mc@curr@col@status\else
+ \@tempswatrue
+ \fi}%
+}
+\newif\ifmc@firstcol
+\mc@firstcoltrue
+\endinput
+%%
+%% End of file `multicol.sty'.
diff --git a/macros/latex/required/tools/multicol.dtx b/macros/latex/required/tools/multicol.dtx
index 8d868357da..aa21d75f07 100644
--- a/macros/latex/required/tools/multicol.dtx
+++ b/macros/latex/required/tools/multicol.dtx
@@ -92,17 +92,19 @@
%<package>\providecommand\DeclareCurrentRelease[2]{}
%<package>
%<package>\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
-%<package>\DeclareCurrentRelease{}{2018-04-01}
+%<package>\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
+%<package>\DeclareCurrentRelease{}{2021-11-15}
%<package>
%<package>\ProvidesPackage{multicol}
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2021/10/28 v1.9b multicolumn formatting (FMi)]
+ [2021/11/30 v1.9d multicolumn formatting (FMi)]
%
%
%%
%
+% \changes{v1.9c}{2021/11/30}{Added rollback to v1.8}
% \changes{v1.5n}{1997/06/05}{Applied improvement of documentation,
% kindly done by Robin Fairbairns.}
% \changes{v1.4h}{1992/06/04}{Added mark tracing with
@@ -844,7 +846,7 @@
% \changes{v1.5l}{1996/01/13}{Try hard to explain unresolved reference
% that happens if \cs{OnlyDescription} is used}
%
-% \StopEventually{\PrintIndex \PrintChanges
+% \MaybeStop{\PrintIndex \PrintChanges
% \ifx\Finale\relax
% \typeout{**********************************}
% \typeout{* Info: Typesetting this document with
@@ -4149,7 +4151,11 @@
a multicols or multicols* environment.}%
\else
\ifvmode
- \nobreak\vfill\penalty -\@Mv\relax
+% \end{macrocode}
+% We need to guard the \cs{vfill} from disappearing.
+% \changes{v1.9d}{2021/12/05}{Guard the \cs{vfill} (sx/624940)}
+% \begin{macrocode}
+ \nobreak\vfill\kern\z@\penalty -\@Mv\relax
\else
\@bsphack
\vadjust{\nobreak\vfill\kern\z@\penalty -\@Mv\relax}%
diff --git a/macros/latex/required/tools/multicol.ins b/macros/latex/required/tools/multicol.ins
index c8838f8be2..9bbf2780ad 100644
--- a/macros/latex/required/tools/multicol.ins
+++ b/macros/latex/required/tools/multicol.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/multicol.pdf b/macros/latex/required/tools/multicol.pdf
index 28fca20e96..206491447a 100644
--- a/macros/latex/required/tools/multicol.pdf
+++ b/macros/latex/required/tools/multicol.pdf
Binary files differ
diff --git a/macros/latex/required/tools/rawfonts.dtx b/macros/latex/required/tools/rawfonts.dtx
index f54aeaf44d..cbd1ba89ea 100644
--- a/macros/latex/required/tools/rawfonts.dtx
+++ b/macros/latex/required/tools/rawfonts.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -63,7 +63,7 @@
% \end{verbatim}
% to your |latex209.cfg| \LaTeX~2.09 compatibility configuration file.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section*{Implementation}
%
diff --git a/macros/latex/required/tools/rawfonts.pdf b/macros/latex/required/tools/rawfonts.pdf
index 7f9906149f..0e773a6289 100644
--- a/macros/latex/required/tools/rawfonts.pdf
+++ b/macros/latex/required/tools/rawfonts.pdf
Binary files differ
diff --git a/macros/latex/required/tools/shellesc.dtx b/macros/latex/required/tools/shellesc.dtx
index 54027cada7..4f60ff8d03 100644
--- a/macros/latex/required/tools/shellesc.dtx
+++ b/macros/latex/required/tools/shellesc.dtx
@@ -1,6 +1,6 @@
% \iffalse
%% Source File: shellesc.dtx
-%% Copyright (C) 2015-2021
+%% Copyright (C) 2015-2022
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
diff --git a/macros/latex/required/tools/shellesc.pdf b/macros/latex/required/tools/shellesc.pdf
index c67ea825d4..2eca7d5446 100644
--- a/macros/latex/required/tools/shellesc.pdf
+++ b/macros/latex/required/tools/shellesc.pdf
Binary files differ
diff --git a/macros/latex/required/tools/showkeys-2014-10-28.sty b/macros/latex/required/tools/showkeys-2014-10-28.sty
new file mode 100644
index 0000000000..b4d7b19028
--- /dev/null
+++ b/macros/latex/required/tools/showkeys-2014-10-28.sty
@@ -0,0 +1,272 @@
+%%
+%% This is file `showkeys.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% showkeys.dtx (with options: `package')
+%%
+%% 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/
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%%
+%% Copyright (C) 1993-2021
+%% The LaTeX Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools 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
+%% 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
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% File: showkeys.dtx Copyright (C) 1992-1997 David Carlisle
+%% File: showkeys.dtx Copyright (C) 2006-2019 David Carlisle, LaTeX Project
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{showkeys}
+ [2014/10/28 v3.17 Show cite and label keys (DPC, MH)]
+\DeclareOption{notref}{\let\SK@ref\@empty}
+\DeclareOption{notcite}{\let\SK@cite\@empty}
+\let\SK@refcolor\relax
+\let\SK@labelcolor\relax
+\DeclareOption{color}{\AtEndOfPackage{%
+ \RequirePackage{color}%
+ \definecolor{refkey}{gray}{.75}%
+ \definecolor{labelkey}{gray}{.75}%
+ \def\SK@refcolor{\color{refkey}}%
+ \def\SK@labelcolor{\color{labelkey}}}}
+\DeclareOption{final}{%
+ \providecommand*\showkeyslabelformat[1]{}%
+ \endinput}
+\DeclareOption{draft}{}
+\ProcessOptions
+\let\SK@label\label
+\let\SK@bibitem\@bibitem
+\let\SK@lbibitem\@lbibitem
+\def\label#1{%
+ \@bsphack
+ \SK@\SK@@label{#1}%
+ \begingroup
+ \SK@label{#1}%
+ \endgroup
+ \@esphack}
+\def\@bibitem#1{%
+ \SK@bibitem{#1}\SK@\SK@@label{#1}\ignorespaces}
+\def\@lbibitem[#1]#2{%
+ \SK@lbibitem[{#1}]{#2}\SK@\SK@@label{#2}\ignorespaces}
+\def\SK@#1#2{%
+ \protected@edef\@tempa{#2}%
+ \expandafter#1\meaning\@tempa\SK@}
+\providecommand*\showkeyslabelformat[1]{%
+ \fbox{\normalfont\small\ttfamily#1}}
+\def\SK@@label#1>#2\SK@{%
+ \gdef\SK@lab{\smash{\SK@labelcolor\showkeyslabelformat{#2}}}%
+ \ifvmode
+ \if@inlabel
+ \global\setbox\@labels\hbox{%
+ \llap{\SK@lab\SK@lab@relax
+ \kern\@totalleftmargin\kern\marginparsep}%
+ \box\@labels}%
+ \else
+ \dimen@\prevdepth
+ \nointerlineskip
+ \ifinner
+ \skip@\lastskip\unskip
+ \advance\skip@\lastskip\unskip
+ \setbox\z@\lastbox
+ \ifvoid\z@
+ \llap{\SK@lab\SK@lab@relax\kern\marginparsep}%
+ \else
+ \hbox{\box\z@\rlap{\kern\marginparsep\SK@labx}}%
+ \fi
+ \vskip\skip@
+ \else
+ \llap{\SK@lab\SK@lab@relax\kern\marginparsep}%
+ \fi
+ \prevdepth\dimen@
+ \fi
+ \else
+ \csname SK@\@currenvir\endcsname
+ \ifSK@equation\else
+ \ifmmode
+ \SK@labx
+ \else
+ \ifinner
+ \rlap\SK@lab
+ \else
+ \vadjust{\llap{\SK@lab\kern\marginparsep}}%
+ \fi
+ \SK@lab@relax
+ \fi
+ \fi
+ \fi}
+\AtBeginDocument{%
+ \let\SK@eqnnum\@eqnnum
+ \@ifpackageloaded{amsmath}{%
+ \let\SK@tagform@\tagform@
+ \let\SK@maketag@@@\maketag@@@
+ \iftagsleft@
+ \def\tagform@#1{%
+ \ifx\df@label\@empty
+ \SK@lab@relax
+ \else
+ \expandafter\SK@@label\meaning\df@label\SK@
+ \fi
+ \llap{\SK@lab\kern\marginparsep}%
+ \SK@lab@relax\SK@tagform@{#1}}%
+ \def\maketag@@@#1{%
+ \ifx\df@label\@empty
+ \SK@lab@relax
+ \else
+ \expandafter\SK@@label\meaning\df@label\SK@
+ \fi
+ \llap{\SK@lab\kern\marginparsep}\SK@lab@relax
+ \SK@maketag@@@{#1}%
+ }%
+ \def\@eqnnum{%
+ \llap{\SK@lab\kern\displaywidth\kern\marginparsep}%
+ \SK@lab@relax\SK@eqnnum}%
+ \else
+ \def\tagform@#1{%
+ \ifx\df@label\@empty
+ \SK@lab@relax
+ \else
+ \expandafter\SK@@label\meaning\df@label\SK@
+ \fi
+ \SK@tagform@{#1}%
+ \rlap{\kern\marginparsep\SK@lab}\SK@lab@relax}%
+ \def\maketag@@@#1{%
+ \ifx\df@label\@empty
+ \SK@lab@relax
+ \else
+ \expandafter\SK@@label\meaning\df@label\SK@
+ \fi
+ \SK@maketag@@@{#1}%
+ \rlap{\kern\marginparsep\SK@lab}\SK@lab@relax
+ }%
+ \def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}%
+ \SK@lab@relax}%
+ \fi
+ }%
+ {%
+ \@ifundefined{ver@leqno.clo}{%
+ \def\@eqnnum{\SK@eqnnum\rlap{\kern\marginparsep\SK@lab}%
+ \SK@lab@relax}%
+ }{%
+ \def\@eqnnum{%
+ \llap{\SK@lab\kern\displaywidth\kern\marginparsep}%
+ \SK@lab@relax\SK@eqnnum}%
+ }%
+ }%
+}
+\def\SK@labx{\rlap\SK@lab\global\let\SK@lab\relax}
+\def\SK@lab@relax{\global\let\SK@lab\relax}\SK@lab@relax
+\newif\ifSK@equation
+\let\SK@equation\SK@equationtrue
+\let\SK@eqnarray\SK@equationtrue
+\toks@\expandafter{\eqnarray}
+\edef\eqnarray{\let\noexpand\tagform@\noexpand\SK@tagform@\the\toks@}
+\let\SK@align\SK@equationtrue
+\let\SK@alignat\SK@equationtrue
+\let\SK@xalignat\SK@equationtrue
+\let\SK@xxalignat\SK@equationtrue
+\let\SK@gather\SK@equationtrue
+\let\SK@multline\SK@equationtrue
+\let\SK@flalign\SK@equationtrue
+\expandafter\let\csname SK@align*\endcsname\SK@equationtrue
+\expandafter\let\csname SK@alignat*\endcsname\SK@equationtrue
+\expandafter\let\csname SK@flalign*\endcsname\SK@equationtrue
+\expandafter\let\csname SK@gather*\endcsname\SK@equationtrue
+\expandafter\let\csname SK@multline*\endcsname\SK@equationtrue
+\expandafter\let\csname SK@equation*\endcsname\SK@equationtrue
+\def\SK@def#1{%
+ \edef\@tempa{\expandafter\@gobble\string#1}%
+ \@ifundefined{\@tempa\space}%
+ {\expandafter\let\csname SK@\@tempa\endcsname#1}%
+ {\expandafter\let\csname SK@\@tempa\expandafter\endcsname
+ \csname\@tempa\space\endcsname}%
+ \expandafter\def\expandafter#1\expandafter{%
+ \expandafter\protect\csname\@tempa\space\endcsname}%
+ \expandafter\def\csname\@tempa\space\endcsname}
+\ifx\SK@ref\@empty
+\AtBeginDocument{%
+ \@ifpackageloaded{varioref}{%
+ \SK@def\@@vpageref#1[#2]#3{{%
+ \let\label\SK@label
+ \SK@@@vpageref{#1}[{#2}]{#3}}}%
+ \def\vr@f#1{%
+ \leavevmode\unskip\vref@space
+ \ref{#1}%
+ {\let\label\SK@label
+ \vpageref[\unskip]{#1}}}%
+ }{}}
+\else
+\AtBeginDocument{%
+ \SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}%
+ \SK@def\pageref#1{\SK@\SK@@ref{#1}\SK@pageref{#1}}%
+ \@ifpackageloaded{varioref}{%
+ \SK@def\@@vpageref#1[#2]#3{{%
+ \let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
+ \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%
+ \def\vr@f#1{%
+ \leavevmode\unskip\vref@space
+ \ref{#1}%
+ \let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
+ \vpageref[\unskip]{#1}}%
+ }{}}
+\fi
+\ifx\SK@cite\@empty
+\AtBeginDocument{%
+ \ifx\HAR@checkdef\@undefined\else
+ \expandafter\let\expandafter
+ \SK@HAR@bi\csname\string\harvarditem\endcsname
+ \expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
+ \SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
+ \fi}
+\else
+\AtBeginDocument{%
+ \ifx\HAR@checkdef\@undefined
+ \ifx\citen\@undefined
+ \SK@def\@citex[#1]#2{\SK@citex[{#1}]{#2}}%
+ \else
+ \SK@def\citen#1{\SK@\SK@@ref{#1}\SK@citen{#1}}%
+ \fi
+ \SK@def\citeauthor#1{\SK@\SK@@ref{#1}\SK@citeauthor{#1}}%
+ \SK@def\citefullauthor#1{\SK@\SK@@ref{#1}\SK@citefullauthor{#1}}%
+ \SK@def\citeyear#1{\SK@\SK@@ref{#1}\SK@citeyear{#1}}%
+ \else
+ \SK@def\HAR@checkdef#1#2{%
+ \expandafter\SK@\expandafter\SK@@ref\expandafter{#1}%
+ \SK@HAR@checkdef{#1}{#2}}%
+ \expandafter\let\expandafter
+ \SK@HAR@bi\csname\string\harvarditem\endcsname
+ \expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
+ \SK@HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
+ \fi}
+\def\SK@citex[#1]#2{%
+ \SK@\SK@@ref{#2}\SK@@citex[{#1}]{#2}}
+\fi
+\def\SK@@ref#1>#2\SK@{%
+ \leavevmode\vbox to\z@{{%
+ \vss
+ \SK@refcolor
+ \rlap{\vrule\raise .75em%
+ \hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}}
+\endinput
+%%
+%% End of file `showkeys.sty'.
diff --git a/macros/latex/required/tools/showkeys.dtx b/macros/latex/required/tools/showkeys.dtx
index 3c9236f2ef..3aed90d304 100644
--- a/macros/latex/required/tools/showkeys.dtx
+++ b/macros/latex/required/tools/showkeys.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -28,11 +28,18 @@
\ProvidesFile{showkeys.dtx}
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>
+%<package>\providecommand\DeclareRelease[3]{}
+%<package>\providecommand\DeclareCurrentRelease[2]{}
+%<package>
+%<package>\DeclareRelease{}{2014-10-28}{showkeys-2014-10-28.sty}
+%<package>\DeclareCurrentRelease{}{2022-06-01}
+%<package>
%<package>\ProvidesPackage{showkeys}
%<driver> \ProvidesFile{showkeys.drv}
% \fi
% \ProvidesFile{showkeys.dtx}
- [2014/10/28 v3.17 Show cite and label keys (DPC, MH)]
+ [2022/04/12 v3.18 Show cite and label keys (DPC, MH)]
%
% \iffalse
%<*driver>
@@ -70,7 +77,8 @@
% {Support harvard, varioref and natbib packages,}
% \changes{v3.02}{1995/03/17}
% {Support new AMS files}
-%
+% \changes{v3.18}{2022/04/12}
+% {Support starred references}
% \section{Introduction}\label{sec:intro}
%
% |showkeys.sty| modifies the |\label|, |\ref|, |\pageref|, |\cite|, and
@@ -248,7 +256,7 @@
%
% \end{thebibliography}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
@@ -749,18 +757,10 @@
% \changes{v3.13}{2006/01/09}{Updated varioref support, for latex/3373}
% \changes{v3.15}{2006/06/19}
% {Prevent loss of brackets}
+% \changes{v3.18}{2022/04/12}
+% {update varioref support: it no longer uses label, so no patch
+% needed if notref is used.}
% \begin{macrocode}
-\AtBeginDocument{%
- \@ifpackageloaded{varioref}{%
- \SK@def\@@vpageref#1[#2]#3{{%
- \let\label\SK@label
- \SK@@@vpageref{#1}[{#2}]{#3}}}%
- \def\vr@f#1{%
- \leavevmode\unskip\vref@space
- \ref{#1}%
- {\let\label\SK@label
- \vpageref[\unskip]{#1}}}%
- }{}}
\else
% \end{macrocode}
%
@@ -775,22 +775,26 @@
% {Make redefinition conditional on notref option}
% \changes{v3.15}{2006/06/19}
% {Prevent loss of brackets}
+% \changes{v3.18}{2022/04/12}
+% {support new kernel commands with starred versions}
+% \changes{v3.18}{2022/04/12}
+% {update varioref support: it no longer uses label}
% \begin{macrocode}
\AtBeginDocument{%
- \SK@def\ref#1{\SK@\SK@@ref{#1}\SK@ref{#1}}%
- \SK@def\pageref#1{\SK@\SK@@ref{#1}\SK@pageref{#1}}%
+ \let\@kernel@ref@\@kernel@ref
+ \let\@kernel@sref@\@kernel@sref
+ \SK@def\@kernel@ref#1{\SK@\SK@@ref{#1}\SK@@kernel@ref{#1}}%
+ \SK@def\@kernel@sref#1{\SK@\SK@@ref{#1}\SK@@kernel@sref{#1}}%
+ \SK@def\@kernel@pageref#1{\SK@\SK@@ref{#1}\SK@@kernel@pageref{#1}}%
+ \SK@def\@kernel@spageref#1{\SK@\SK@@ref{#1}\SK@@kernel@spageref{#1}}%
+ \SK@def\@kernel@Ref#1{{\let\@kernel@ref\@kernel@ref@\SK@\SK@@ref{#1}\SK@@kernel@Ref{#1}}}%
+ \SK@def\@kernel@sRef#1{\let\@kernel@sref\@kernel@sref@\SK@\SK@@ref{#1}\SK@@kernel@sRef{#1}}%
% \end{macrocode}
% varioref support.
% \begin{macrocode}
\@ifpackageloaded{varioref}{%
\SK@def\@@vpageref#1[#2]#3{{%
- \let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
- \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%
- \def\vr@f#1{%
- \leavevmode\unskip\vref@space
- \ref{#1}%
- \let\label\SK@label\let\ref\SK@ref\let\pageref\SK@pageref
- \vpageref[\unskip]{#1}}%
+ \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%%
}{}}
% \end{macrocode}
%
diff --git a/macros/latex/required/tools/showkeys.pdf b/macros/latex/required/tools/showkeys.pdf
index 96b4c88ab0..49429fdeb6 100644
--- a/macros/latex/required/tools/showkeys.pdf
+++ b/macros/latex/required/tools/showkeys.pdf
Binary files differ
diff --git a/macros/latex/required/tools/somedefs.dtx b/macros/latex/required/tools/somedefs.dtx
index 825a93ec66..24916b4286 100644
--- a/macros/latex/required/tools/somedefs.dtx
+++ b/macros/latex/required/tools/somedefs.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -87,7 +87,7 @@
% For a longer example of the use of the |somedefs| package, look at the
% |rawfonts| package.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section*{Implementation}
%
diff --git a/macros/latex/required/tools/somedefs.pdf b/macros/latex/required/tools/somedefs.pdf
index 7599f073cd..0a7116d3fd 100644
--- a/macros/latex/required/tools/somedefs.pdf
+++ b/macros/latex/required/tools/somedefs.pdf
Binary files differ
diff --git a/macros/latex/required/tools/tabularx.dtx b/macros/latex/required/tools/tabularx.dtx
index a0f75fc4fa..0d1cbeac34 100644
--- a/macros/latex/required/tools/tabularx.dtx
+++ b/macros/latex/required/tools/tabularx.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -261,7 +261,7 @@
% This behaviour of the package can be customised slightly
% as noted in the documentation of the code section.
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/tools/tabularx.ins b/macros/latex/required/tools/tabularx.ins
index a0d39c2564..0c6d26e940 100644
--- a/macros/latex/required/tools/tabularx.ins
+++ b/macros/latex/required/tools/tabularx.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/tabularx.pdf b/macros/latex/required/tools/tabularx.pdf
index f07adf175a..84eb73e06f 100644
--- a/macros/latex/required/tools/tabularx.pdf
+++ b/macros/latex/required/tools/tabularx.pdf
Binary files differ
diff --git a/macros/latex/required/tools/theorem.dtx b/macros/latex/required/tools/theorem.dtx
index 8543ff9d7c..2dc0412efb 100644
--- a/macros/latex/required/tools/theorem.dtx
+++ b/macros/latex/required/tools/theorem.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -332,7 +332,7 @@
% (looking everything over) and many others providing useful
% suggestions.
%
-% \StopEventually{%
+% \MaybeStop{%
% \begin{thebibliography}{9}
% \bibitem{bk:GMS94} \textsc{M.~Goossens}, \textsc{F.~Mittelbach}
% and \textsc{A.~Samarin}.
diff --git a/macros/latex/required/tools/theorem.pdf b/macros/latex/required/tools/theorem.pdf
index 767812d4af..3c78214b6d 100644
--- a/macros/latex/required/tools/theorem.pdf
+++ b/macros/latex/required/tools/theorem.pdf
Binary files differ
diff --git a/macros/latex/required/tools/tools-overview.pdf b/macros/latex/required/tools/tools-overview.pdf
index b52db51d7d..a8c55fbe0a 100644
--- a/macros/latex/required/tools/tools-overview.pdf
+++ b/macros/latex/required/tools/tools-overview.pdf
Binary files differ
diff --git a/macros/latex/required/tools/tools-overview.tex b/macros/latex/required/tools/tools-overview.tex
index a2dae49e8f..882a2ae77f 100644
--- a/macros/latex/required/tools/tools-overview.tex
+++ b/macros/latex/required/tools/tools-overview.tex
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{tools-overview.tex}[2015/03/31 v1.0 Tools overview]
-% Copyright (C) 2006-2021
+% Copyright (C) 2006-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
diff --git a/macros/latex/required/tools/tools.ins b/macros/latex/required/tools/tools.ins
index 15c64ac80a..b93f649153 100644
--- a/macros/latex/required/tools/tools.ins
+++ b/macros/latex/required/tools/tools.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -49,7 +49,7 @@ reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/trace.dtx b/macros/latex/required/tools/trace.dtx
index d10243f690..93906eb76b 100644
--- a/macros/latex/required/tools/trace.dtx
+++ b/macros/latex/required/tools/trace.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -278,7 +278,7 @@
% \small \texttt{\$} \stop
%\end{verbatim}
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{Implementation}
%
diff --git a/macros/latex/required/tools/trace.pdf b/macros/latex/required/tools/trace.pdf
index 8e407516eb..03c5e05f66 100644
--- a/macros/latex/required/tools/trace.pdf
+++ b/macros/latex/required/tools/trace.pdf
Binary files differ
diff --git a/macros/latex/required/tools/varioref.dtx b/macros/latex/required/tools/varioref.dtx
index faf8b0383c..579c411868 100644
--- a/macros/latex/required/tools/varioref.dtx
+++ b/macros/latex/required/tools/varioref.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -40,7 +40,7 @@
%<package>\DeclareCurrentRelease{}{2019-10-01}
%<package>
%<package>\ProvidesPackage{varioref}
-%<package> [2021/07/07 v1.6f package for extended references (FMi)]
+%<package> [2022/01/09 v1.6f package for extended references (FMi)]
% \fi
%
%%
@@ -149,7 +149,7 @@
% |\pageref| when the difference is larger. The word `facing' is used
% when label and reference both fall onto a double spread. However,
% if a special page numbering scheme is used instead of the usual
-% arabic numbering (e.g., |\pagenumbering{roman}|) then there will be
+% Arabic numbering (e.g., |\pagenumbering{roman}|) then there will be
% no distinction between one or many pages off.
%
%\DescribeMacro\vpageref Sometimes one wants to refer only to page
@@ -172,7 +172,7 @@
% A space in front of |\vpageref| it will be ignored if
% the command doesn't produce any text at all.
%
-% But in fact |\vpageref| allows even more control. If has two
+% But in fact |\vpageref| allows even more control. It has two
% optional arguments. With the first one, one can specify the text
% that should be used if label and reference fall on the same page.
% This is very helpful if both are near to each other, so that they
@@ -293,7 +293,7 @@
% Another command for conditional processing is |\vpagerefnearby|. It
% takes three arguments: a label and a \meta{true} and \meta{false}
% argument. It compares the page reference to the label with the
-% current page number and if both are arabic number and only differ by
+% current page number and if both are Arabic number and only differ by
% $\pm1$ the \meta{true} argument is executed otherwise the
% \meta{false} argument. In other words it tells you if a |\vpageref|
% to the label would result in a textual reference to the previous,
@@ -330,19 +330,19 @@
% space in front. Of course you are then responsible to always add it
% when necessary, but that does make the source more readable so it is
% a good thing. This also has the advantage that the star forms are
-% now unnecessary again and can be used in the way implemeented by
+% now unnecessary again and can be used in the way implemented by
% \pkg{hyperref} if both packages are used together.
%
% In fact it would be much nicer to make that the
% default but the package has been used by many people for so many
-% years that changing the default would break way to many older documents.
+% years that changing the default would break way too many older documents.
%
%
% \DescribeMacro\labelformat
% A reference via |\ref| produces by default the data associated with
% the corresponding |\label| command (typically a number); any
% additional formatting has to be provided by the user. With
-% |\labelformat| it is possible to declare scuch formatting for each
+% |\labelformat| it is possible to declare such formatting for each
% ``reference'' counter, e.g.,
%\begin{verbatim}
% \labelformat{section}{section~#1}
@@ -454,7 +454,7 @@
%\DescribeMacro\reftextvario To allow a bit random variation in the
% generated strings one can use the command |\reftextvario| inside the
% string macros. It takes two arguments and selects one or the other
-% for printing depending on the number of already seens |\vref| or
+% for printing depending on the number of already seen |\vref| or
% |\vpageref| commands. As an example see the definitions of
% |\reftextbefore| etc.\ \vpageref[below]{reftextbefore}.
%
@@ -485,7 +485,7 @@
% \DescribeMacro\fullrefformat
% In some languages (currently only for Japanese) the generated text
% has to typeset in different word order to most other (Western) languages.
-% To accomodate for this \cs{vrefformat}, etc.\ has been
+% To accommodate for this \cs{vrefformat}, etc.\ has been
% added to allow to alter this on a per language basis.
% There should be normally no need to alter the setup. For details see
% the code section.
@@ -572,7 +572,7 @@
% know for sure that label and reference can't fall onto nearby pages.
%
%
-% \StopEventually{\PrintIndex\PrintChanges}
+% \MaybeStop{\PrintIndex\PrintChanges}
%
%
% \section{The documentation driver file}
@@ -701,7 +701,7 @@
% \label{reftextbefore} The options do set the macros that
% generate the textual strings. Note, that they do not start with a
% space, the space is already added in the main macro below.
-% \changes{v1.2a}{1998/08/22}{Added american defaults for
+% \changes{v1.2a}{1998/08/22}{Added American defaults for
% \cs{reftextpagerange} and \cs{reftextlabelrange}}
% \changes{v1.4d}{2002/11/11}{Changed default for \cs{reftextbefore}}
%
@@ -1335,7 +1335,7 @@
% \end{macrocode}
% Defaults for Japanese. It needs a special \cs{vrefformat},
% \cs{Vrefformat}, \cs{fullrefformat} and \cs{vrefrangeformat}
-% for gramatical reasons. As our standard documentation
+% for grammatical reasons. As our standard documentation
% workflow uses pdf\TeX{} the Japanese letters can't be displayed
% easily, so you will see missing glyphs below. To see the real
% letters you have to look at the source or package file.
@@ -1354,7 +1354,7 @@
\def\reftextpagerange#1#2{\pageref{#1}から\pageref{#2}ページ}%
\def\reftextlabelrange#1#2{\ref{#1}から\ref{#2}}%
% \end{macrocode}
-% Note that the parentheses beow are not normal ones but full width
+% Note that the parentheses below are not normal ones but full width
% ones U+FF08 and U+FF09!
% \begin{macrocode}
\def\vrefformat#1#2{\ref{#2}(\vpageref[#1]{#2})}%
@@ -1376,7 +1376,7 @@
%
% The option assumes that there is a command |\aza| defined which
% helps resolving this problem.\footnote{This information is actually quite
-% old but unfortunately never made it into varioref. In case any work
+% old but unfortunately never made it into \pkg{varioref}. In case any work
% has been undertaken to resolve this please inform the author about it.}
% \changes{v1.2a}{1998/08/22}{Added defaults for magyar}
% \changes{v1.4j}{2005/01/22}{Defined \cs{reftextfaceafter} and
@@ -1505,7 +1505,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% The portuguese default text has been provided by
+% The Portuges default text has been provided by
% Jos\'e Carlos Oliveira Santos \verb=jcsantos@fc.up.pt=.
% \changes{v1.2b}{1999/11/25}{Added portuguese defaults}
% \changes{v1.2c}{1999/12/02}{Added more portuguese defaults}
@@ -1552,7 +1552,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% The text for russian was taken from the book in Russian by
+% The text for Russian was taken from the book in Russian by
% I.~A.~Kotelnikov and P.~Z.~Chebotaev, and adapted
% to the encoding-independent form by Vladimir Volovich
% (\verb=vvv@vsu.ru=).
@@ -1589,7 +1589,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% The text for slovak defaults was contributed by Miroslav Sedivy\\
+% The text for Slovak defaults was contributed by Miroslav Sedivy\\
% (\verb=<miro@slovensko.com>=).
% \changes{v1.4b}{2002/03/11}{Contributed defaults added}
% \begin{macrocode}
@@ -1613,7 +1613,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% The text for slovene defaults was contributed by Roman Maurer\\
+% The text for Slovene defaults was contributed by Roman Maurer\\
% (\verb=<roman.maurer@amis.net>=).
% \changes{v1.4a}{2002/03/05}{Contributed defaults added}
% \begin{macrocode}
@@ -1633,7 +1633,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% Text for spanish defaults was contributed by Julio Sanchez
+% Text for Spanish defaults was contributed by Julio Sanchez
% (\verb=jsanchez@gmv.es=) and Fernando Dobladez (\verb=<ferd@fuego.com>=).
% \changes{v1.0f}{1994/03/16}{Inserted missing hash mark}
% \changes{v1.0k}{1994/06/05}{Corrected misspelled cmd `extrasspanish}
@@ -1657,7 +1657,7 @@
\let\vrefrangeformat\vrefrangedefaultformat
}}
% \end{macrocode}
-% The text for swedish was contributed by Mats Dahlgren
+% The text for Swedish was contributed by Mats Dahlgren
% (\verb=matsd@sssk.se=).
% \changes{v1.0p}{1995/01/10}{Added swedish strings}
% \changes{v1.2a}{1998/08/22}{Added swedish defaults for
@@ -1729,7 +1729,7 @@
}}
% \end{macrocode}
% We support francais as an alternative to french since people
-% might be used to it, but we discurrage it.
+% might be used to it, but we discourage it.
% \begin{macrocode}
\DeclareOption{francais}{%
\typeout{Please use `french' instead of `francais'}%
@@ -1757,7 +1757,7 @@
%
%
% Whether or not \pkg{varioref} uses its own white space and
-% removes the one in the source document is handeled by the
+% removes the one in the source document is handled by the
% following two options. For historical reasons the default is to
% handle the space, but the recommendation these days is to use
% \texttt{nospace}.
@@ -1814,7 +1814,7 @@
% space either. Thus in this case the star form doesn't
% have any effect and below |\vp@gerefstar| is let to
% |\vp@geref|. This allows a package like \pkg{hyperef} to redefine
-% it and useit for its own tasks (like denoting that no link should
+% it and use it for its own tasks (like denoting that no link should
% be produced).
% \begin{macrocode}
\DeclareRobustCommand\vpageref{\@ifstar
@@ -1859,7 +1859,7 @@
% By default the second optional argument is empty.
% \changes{v1.0h}{1994/06/11}{Pass first argument in both cases}
% \changes{v1.0i}{1994/06/20}{Do it correctly}
-% \changes{v1.6a}{2019/08/25}{Default for optional argumet changed}
+% \changes{v1.6a}{2019/08/25}{Default for optional argument changed}
% \begin{macrocode}
{\@@vpageref{#1}}{\@@vpageref{#1}[]}}
% \end{macrocode}
@@ -2169,7 +2169,7 @@
% \pkg{varioref} by testing
%\begin{verbatim}
% \ifdefined\vp@gerefstar
-% ... code fore noew varioref
+% ... code for new varioref
% \else
% ... code for old varioref
% \fi
@@ -2638,7 +2638,7 @@
% \begin{macro}{\vpagerefcomparenearby}
% \changes{v1.6a}{2019/08/25}{Macro added}
-% True if the two pages have arabic page numbers are at most off by
+% True if the two pages have Arabic page numbers are at most off by
% one so that |\vpageref| would produce a special string.
%
% This is in some sense a general version of |\vpagerefnearby| for
diff --git a/macros/latex/required/tools/varioref.ins b/macros/latex/required/tools/varioref.ins
index 559f1f2854..cef11f9c2f 100644
--- a/macros/latex/required/tools/varioref.ins
+++ b/macros/latex/required/tools/varioref.ins
@@ -3,7 +3,7 @@
%% driver files from the doc files in this package when run through
%% LaTeX or TeX.
%%
-%% Copyright (C) 1993-2021
+%% Copyright (C) 1993-2022
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
@@ -45,7 +45,7 @@ The source is maintained by the LaTeX Project team and bug
reports for it can be opened at https://latex-project.org/bugs/
(but please observe conditions on bug reports sent to that address!)
-Copyright (C) 1993-2021
+Copyright (C) 1993-2022
The LaTeX Project and any individual authors listed elsewhere
in this file.
diff --git a/macros/latex/required/tools/varioref.pdf b/macros/latex/required/tools/varioref.pdf
index e1a3f52c5f..32259ea3a4 100644
--- a/macros/latex/required/tools/varioref.pdf
+++ b/macros/latex/required/tools/varioref.pdf
Binary files differ
diff --git a/macros/latex/required/tools/verbatim.dtx b/macros/latex/required/tools/verbatim.dtx
index fcbaf28172..c7cb2f02a9 100644
--- a/macros/latex/required/tools/verbatim.dtx
+++ b/macros/latex/required/tools/verbatim.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -242,7 +242,7 @@
% This command has also a |*|-variant that prints spaces as \verb*+ +.
%
%
-% \StopEventually{}
+% \MaybeStop{}
%
%
% \section{Interfaces for package writers}
diff --git a/macros/latex/required/tools/verbatim.pdf b/macros/latex/required/tools/verbatim.pdf
index 6c1dd55c35..357918e255 100644
--- a/macros/latex/required/tools/verbatim.pdf
+++ b/macros/latex/required/tools/verbatim.pdf
Binary files differ
diff --git a/macros/latex/required/tools/xr.dtx b/macros/latex/required/tools/xr.dtx
index c0d0b90c0f..33e096c6cd 100644
--- a/macros/latex/required/tools/xr.dtx
+++ b/macros/latex/required/tools/xr.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -89,7 +89,7 @@
% For compatibility with |xcite|, |\externalcitedocument| is made available
% as an alias for |\externaldocument|
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The macros}
%
diff --git a/macros/latex/required/tools/xr.pdf b/macros/latex/required/tools/xr.pdf
index b48bceadb4..f918a9664d 100644
--- a/macros/latex/required/tools/xr.pdf
+++ b/macros/latex/required/tools/xr.pdf
Binary files differ
diff --git a/macros/latex/required/tools/xspace.dtx b/macros/latex/required/tools/xspace.dtx
index adcfe154da..7b29b7b0be 100644
--- a/macros/latex/required/tools/xspace.dtx
+++ b/macros/latex/required/tools/xspace.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2022
%
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
@@ -199,7 +199,7 @@
% \end{verbatim}
%
%
-% \StopEventually{}
+% \MaybeStop{}
%
% \section{The Macros}
%
diff --git a/macros/latex/required/tools/xspace.pdf b/macros/latex/required/tools/xspace.pdf
index e562c76f96..acf4f25ef1 100644
--- a/macros/latex/required/tools/xspace.pdf
+++ b/macros/latex/required/tools/xspace.pdf
Binary files differ