texlive[63339] Master/texmf-dist: latex-dev (19may22)

commits+karl at tug.org commits+karl at tug.org
Thu May 19 22:13:42 CEST 2022


Revision: 63339
          http://tug.org/svn/texlive?view=revision&revision=63339
Author:   karl
Date:     2022-05-19 22:13:40 +0200 (Thu, 19 May 2022)
Log Message:
-----------
latex-dev (19may22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsbsy.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amscd.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsgen.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsldoc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsmath.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsopn.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amstext.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsxtra.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/subeqn.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/technote.pdf
    trunk/Master/texmf-dist/doc/latex-dev/amsmath/testmath.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/README.md
    trunk/Master/texmf-dist/doc/latex-dev/base/alltt.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/cfgguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/base/classes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/cmfonts.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/cyrguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/doc-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/docstrip.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/encguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/exscale.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/fix-cm.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/graphpap.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ifthen.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/inputenc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lamport-manual.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/latexrelease.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/latexsym.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lb2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/letter.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lgc2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lppl.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltluatex.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews01.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews02.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews03.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews04.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews05.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews06.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews07.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews08.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews09.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews10.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews11.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews12.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews13.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews14.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews15.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews16.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews17.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews18.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews19.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews20.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews21.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews22.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews23.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews24.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews25.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews26.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews27.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews29.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews30.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews31.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews32.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews33.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews34.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.tex
    trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltx3info.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltxdoc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/makeindx.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/manifest.txt
    trunk/Master/texmf-dist/doc/latex-dev/base/modguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/nfssfont.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/proc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/slides.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/slifonts.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/source2e.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/source2e.tex
    trunk/Master/texmf-dist/doc/latex-dev/base/syntonly.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/tlc2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/tulm.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/usrguide3.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/utf8ienc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/webcomp.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/README.md
    trunk/Master/texmf-dist/doc/latex-dev/graphics/color.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/drivers.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/epsfig.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/graphics.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/graphicx.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/grfguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/keyval.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/lscape.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/mathcolor.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/rotating.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/rotex.pdf
    trunk/Master/texmf-dist/doc/latex-dev/graphics/trig.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/README.md
    trunk/Master/texmf-dist/doc/latex-dev/tools/afterpage.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/array.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/bm.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/calc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/tools/dcolumn.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/delarray.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/enumerate.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/fileerr.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/fontsmpl.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/ftnright.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/hhline.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/indentfirst.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/layout.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/longtable.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/multicol.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/rawfonts.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/shellesc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/showkeys.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/somedefs.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/tabularx.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/theorem.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/tools-overview.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/trace.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/varioref.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/verbatim.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/xr.pdf
    trunk/Master/texmf-dist/doc/latex-dev/tools/xspace.pdf
    trunk/Master/texmf-dist/source/latex-dev/amsmath/amsmath.dtx
    trunk/Master/texmf-dist/source/latex-dev/amsmath/amsopn.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/format.ins
    trunk/Master/texmf-dist/source/latex-dev/base/ifthen.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/latexrelease.ins
    trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltfilehook.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltfiles.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltmath.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltpara.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltxref.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/slides.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/utf8ienc.dtx
    trunk/Master/texmf-dist/source/latex-dev/tools/showkeys.dtx
    trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
    trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsopn.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/ifthen.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx
    trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/lcyenc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/ly1enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/ot2enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/slides.cls
    trunk/Master/texmf-dist/tex/latex-dev/base/slides.def
    trunk/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls
    trunk/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/t2aenc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/t2benc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/t2cenc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/ts1enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/utf8.def
    trunk/Master/texmf-dist/tex/latex-dev/base/utf8enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/base/x2enc.dfu
    trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.tex
    trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.tex
    trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx
    trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys-2014-10-28.sty

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,7 +1,7 @@
 The amsmath bundle for LaTeX
 ============================
 
-Release 2022-06-01 pre-release 2
+Release 2022-06-01 pre-release 4
 
 Overview
 --------

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsbsy.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amscd.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsgen.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsldoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsmath.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsopn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amstext.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/amsxtra.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/amsmath/changes.txt	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/amsmath/changes.txt	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,3 +1,12 @@
+2022-04-08  Frank Mittelbach  <Frank.Mittelbach at 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 at latex-project.org>
 
 	* amsmath.dtx (subsection{The \env{multline} environment}):

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/subeqn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/technote.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/testmath.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/README.md	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/README.md	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,7 +1,7 @@
 The LaTeX kernel
 ================
 
-Release 2022-06-01 pre-release 3
+Release 2022-06-01 pre-release 4
 
 Overview
 --------

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/alltt.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cfgguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt	2022-05-19 20:13:40 UTC (rev 63339)
@@ -6,6 +6,90 @@
 are not part of the distribution.
 ================================================================================
 
+2022-05-17  Phelype Oleinik  <phelype.oleinik at latex-project.org>
+
+	* lthooks.dtx (subsection{Setting rules for hooks code}):
+	Refuse sorting one-time hooks (gh/818).
+
+2022-05-17  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+	* ltmeta.dtx:
+	Added dummy definitions for target commands.
+
+2022-05-13  Phelype Oleinik  <phelype.oleinik at latex-project.org>
+
+	* lthooks.dtx (subsection{Using the hook}):
+	Avoid l3debug error on an undeclared variable in \hook_use_once:nnn.
+
+2022-05-08  Marcel Krüger  <Marcel.Krueger at latex-project.org>
+
+  * utf8ienc.dtx:
+	Declare Unicode codepoints U+3008 and U+3009 to be equivalent
+	to their canonical equivalent codepoints 2329/232A (corresponding
+	to \textlangle/\textrangle)
+
+2022-05-08  Marcel Krüger  <Marcel.Krueger at latex-project.org>
+
+	* ltmath.dtx: Use more consistent default math styles on LuaLaTeX
+
+2022-04-13  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+	* ltxref.dtx:
+	Added starred versions of \ref, \pageref and \Ref
+	  Added expandable version for \pageref and \ref
+	* ifthen.dtx:
+	use new expandable version for \pageref and \ref
+
+2022-05-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltshipout.dtx (subsection{Handling the end of job hook}):
+	Handle case where shipout/lastpage is run too early and issue
+	a warning (gh/813)
+
+2022-04-21  Joseph Wright <Joseph.Wright at latex-project.org>
+
+	* ltfinal.dtx (subsection{Lccodes and uccodes}):
+	Support \noexpand in arg. to \MakeUppercase and
+	\MakeLowercase
+
+2022-04-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltmath.dtx (subsubsection{The UNSORTED Rest}):
+	Make \openup robust (gh/123)
+
+2022-04-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltmarks.dtx: New module to implement new marks mechanism
+
+	* ltpage.dtx (section| command.):
+	Updates to \markboth and \markright to interface with new mark mechanism
+
+	* ltoutput.dtx (subsection{Floats}):
+	Interface with new mark mechanism
+
+	* ltfinal.dtx (subsection{Typesetting parameters}):
+	Integration of new mark management interface
+
+2022-04-01  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltfiles.dtx (section{File Handling}):
+	Process include/excluded hook(s) if an include file is bypassed
+
+	* lthooks.dtx (subsection{Adding or removing hook code}):
+	Add support for generic include/.../excluded hooks
+
+	* ltfilehook.dtx: document include/excluded hooks
+
+2022-03-18  Phelype Oleinik  <phelype.oleinik at latex-project.org>
+
+	* ltcmd.dtx (subsection{Utilities}):
+	Fix \@@_cmd_type_cases:NnnnnF prematurely expanding macros (gh/795).
+
+2022-03-18  Joseph Wright  <joseph.wright at latex-project.org>
+
+	* ltkeys.dtx:
+	Remove \ProcessKeyPackageOptions
+
 2022-03-10  Phelype Oleinik  <phelype.oleinik at latex-project.org>
 
 	* ltfilehook.dtx (subsection{Selecting a file (\cs{set at curr@file})}):
@@ -140,7 +224,7 @@
 
 2021-12-10  David Carlisle  <David.Carlisle at latex-project.org>
 
-	* utf8ienc.dtx: Add inputenc UTF-8 support for for Digraphs U_01C4-U+01CC
+	* utf8ienc.dtx: Add inputenc UTF-8 support for Digraphs U+01C4-U+01CC
 
 2021-12-09  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
@@ -1633,8 +1717,8 @@
 
 	* fontdef.dtx (subsection{Defaults}): Set
 	\shapedefault explicitly to "n" not \updefault
-	\bfdefault set to to "b" not "bx" (but bx for CM fonts)
-	\updefault set to to "up" not "n".
+	\bfdefault set to "b" not "bx" (but bx for CM fonts)
+	\updefault set to "up" not "n".
 	Part of extending the series and shape handling, see ltnews31.
 
 2019-12-17  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
@@ -12205,7 +12289,7 @@
 
 	* unpack2e.ins:
 	Removed unnecessary .drv generation (some are still there)
-	Added the the WITHOUT ANY WARRANTY message to some preambles.
+	Added the WITHOUT ANY WARRANTY message to some preambles.
 
 	* oldgerm.dtx:
 	Moved the driver code in front so that the documentation can be

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/classes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cmfonts.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cyrguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/doc-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/docstrip.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/encguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/exscale.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/fix-cm.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/graphpap.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ifthen.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/inputenc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lamport-manual.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/latexrelease.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/latexsym.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lb2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/letter.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lgc2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lppl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltluatex.pdf
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf	2022-05-19 20:13:40 UTC (rev 63339)

Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.tex	2022-05-19 20:13:40 UTC (rev 63339)
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{ltmarks.dtx}


Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf	2022-05-19 20:13:40 UTC (rev 63339)

Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.tex	2022-05-19 20:13:40 UTC (rev 63339)
@@ -0,0 +1,8 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+%                 \let\tableofcontents\relax
+                  \RenewCommandCopy\MaybeStop\StopEventually
+                 }
+\input{ltmarks.dtx}


Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews01.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews02.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews03.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews04.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews05.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews06.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews07.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews08.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews09.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews10.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews11.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews12.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews13.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews14.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews15.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews16.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews17.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews18.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews19.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews20.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews21.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews22.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews23.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews24.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews25.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews26.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews27.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews29.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews30.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews31.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews32.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews33.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews34.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.tex	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.tex	2022-05-19 20:13:40 UTC (rev 63339)
@@ -118,7 +118,7 @@
 \tubcommand{\input{tubltmac}}
 
 \publicationmonth{June}
-\publicationyear{2022  --- DRAFT version for upcoming release}
+\publicationyear{2022}
 
 \publicationissue{35}
 
@@ -137,6 +137,28 @@
 
 \section{Introduction}
 
+The 2022 June release of \LaTeX{} is again focussing on improvements
+made for our multi-year project to automatically offer tagged PDF
+output~\cite{35:blueprint}. These are the new document metadata
+interface, the new mark mechanism for \LaTeX{}, a standard key/value
+approach for options, and the introduction of the \texttt{latex-lab}
+area for temporary code that can be optionally loaded by a document
+(when \cs{DocumentMetadata} is used with certain test keys). These
+additions are described in the first sections.  Related to this effort
+there are updates to \pkg{hyperref} and \pkg{tagpdf} both of which
+have their own distributions.
+
+As usual, we also added a number of smaller improvements and bug
+fixes in various components of core \LaTeX{}. Perhaps the most
+interesting ones (for some users) are direct support for floating
+point arithmetic (via \cs{fpeval} see below) and the ability to
+properly color parts of math formulas without introducing spacing
+problems. For this we now offer the command \cs{mathcolor}; see the
+description near the end of the newsletter.  There is also a new major
+release of the \pkg{doc} package that supports a more fine-grained
+classification of code elements and properly supports \pkg{hyperref}.
+
+
 \section{Document metadata interface}
 
 Until recently there was no dedicated location to declare
@@ -183,7 +205,10 @@
 already existing keys are in \file{l3meta.pdf} and \file{documentmetadata-support.pdf}
 and also in the documentation of the \pkg{pdfmanagement-testphase} package.
 
+Package and class authors can test if a user has used \cs{DocumentMetadata}
+with \cs{IfDocumentMetadataTF}.
 
+
 \section{The \pkg{latex-lab} bundle}
 
 We added a new \pkg{latex-lab}oratory bundle in which we place new
@@ -197,7 +222,7 @@
 that enable code of the tagged PDF project (phase-I is frozen and
 phase-II the phase we are currently working on).  With
 \begin{verbatim}
-\DocumentMetadata{testphase=phase-II}
+  \DocumentMetadata{testphase=phase-II}
 \end{verbatim}
 you currently enable tagging for paragraphs and footnotes, more
 document elements will follow soon.
@@ -207,7 +232,8 @@
 design interface based on \pkg{l3keys} can be accessed through the
 value \texttt{prototype}, thus
 \begin{verbatim}
-\DocumentMetadata{testphase={phase-II,prototype}}
+  \DocumentMetadata
+             {testphase={phase-II,prototype}}
 \end{verbatim}
 will enable all of phase-II plus the draft template interface (which
 is not yet integrated in phase-II).
@@ -218,13 +244,74 @@
 to drop the \texttt{testphase} key setting.
 
 
+\section{A new mark mechanism for \LaTeX{}}
 
+The mark mechanism is \TeX{}'s way to pass information to the
+page-building process which happens asynchronously in order to
+communicate relevant data for running headers and footers to the
+latter, e.g., what is the first section on the page or the last
+subsection, etc. However, marks may also be
+used for other purposes. The new kernel module provides a generalized
+mechanism for marks of independent classes.
 
+The \TeX{} engines offer a low-level mark mechanism to
+communicate information about the content of the current page to
+the asynchronous operating output routine. It works by placing
+\cs{mark} commands into the source document.
 
-\section{New or improved commands}
+This mechanism works well for simple formats (such as plain \TeX)
+whose output routines are only called to generate pages. It
+fails, however, in \LaTeX{} (and other more complex formats),
+because here the output routine is sometimes called without
+producing a page, e.g., when encountering a float and placing it
+into one of the float regions.
+%
+When that happens \TeX{}'s  \cs{topmark} no
+longer reflects the situation at the top of the next page when that
+page is finally boxed.
 
-\subsection{A keyval approach to option handling}
+Furthermore, \TeX{} only offered a single mark while \LaTeX{} wanted to
+keep track of more than one piece of information.  For that reason,
+\LaTeX{} implemented its own mark mechanism where the marks always
+contained two parts with their own interfaces: \cs{markboth} and
+\cs{markright} to set marks and \cs{leftmark} and \cs{rightmark} to
+retrieve them.
 
+Unfortunately, this extended mechanism (while supporting scenarios such
+as chapter/section marks) was far from general. The mark
+situation at the top of a page (i.e., \cs{topmark}) remained
+unusable and the two marks offered were not really independent of
+each other because \cs{markboth} (as the name indicates) was
+always setting both.
+
+
+The new mechanism now available in \LaTeX{} starting with the 2022
+release overcomes both issues:
+\begin{itemize}
+\item
+  It provides arbitrary many, fully independent named marks, that
+  can be allocated and from that point onwards used.
+\item
+  It offers access for each such marks to retrieve its top,
+  first, and bottom value separately.
+\item
+  Furthermore, the mechanism is augmented to give access to marks
+  in different ``regions'' which may not be just full pages.
+\end{itemize}
+The legacy interfaces, e.g., \cs{markboth}, are kept. Thus classes and
+packages making use of them continue to work flawlessly. To make use
+of the extended possibility a new set of commands for declaration of
+mark classes, setting their values and querying their state (in the
+output routine) is now available in addition.
+%
+You find the documentation for the new interfaces together with
+examples and further notes on the mechanism in the file
+\texttt{ltmarks-doc.pdf}. Just call \texttt{texdoc}
+\texttt{ltmarks-doc} to display it on your computer.
+
+
+\section{A key/value approach to option handling}
+
 The classical \LaTeXe{} method for handling options, using \cs{ProcessOptions},
 treats each entry in the list as a string. Many package authors have sought to
 extend this handling by treating each entry as a key--value pair (keyval)
@@ -244,8 +331,6 @@
 \begin{verbatim}
 \ProcessKeyOptions[family]
 \end{verbatim}
-A version which does not consider global options,
-\cs{ProcessKeyPackageOptions}, is also available.
 
 To support creating key options for this mechanism, the new command
 \cs{DeclareKeys} has been added. This works using the same general
@@ -255,7 +340,7 @@
 Options for packages which use this new approach will not be checked for
 clashes by the kernel. Instead, each time a \cs{usepackage} or
 \cs{RequirePackage} line is encountered, the list of options given will be
-passed to \cs{ProcessKeyPackageOptions}. Options which can only be given
+passed to \cs{ProcessKeyOptions}. Options which can only be given
 the first time a package is loaded can be marked using the property
 \texttt{.usage = load}, and will result in a warning if used in a subsequent
 package loading line.
@@ -264,6 +349,11 @@
 the new command \cs{SetKeys}, which again takes an optional argument
 to specify the \emph{family}, plus a mandatory one for the options themselves.
 
+
+
+\section{New or improved commands}
+
+
 \subsection{Floating point and integer calculations}
 
 The L3 programming layer offers expandable commands for calculating
@@ -276,9 +366,9 @@
 
 An example of use could be the following:
 \begin{verbatim}
-\LaTeX{} can now compute:
-\[ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3}
-    = \fpeval{sin(3.5)/2 + 2e-3}         \]
+  \LaTeX{} can now compute:
+  \[ \frac{\sin (3.5)}{2} + 2\cdot 10^{-3}
+      = \fpeval{sin(3.5)/2 + 2e-3}         \]
 \end{verbatim}
 which produces the following output:
 \begin{quote}
@@ -294,9 +384,9 @@
 \cs{dimexpr}, and \cs{glueexpr} \Dash therefore inheriting some syntax
 peculiars and limitations in expressiveness.
 \begin{verbatim}
-\newcommand\calulateheight[1]{%
-  \setlength\textheight{\dimeval{\topskip
-        + \baselineskip * \inteval{#1-1}}}}
+  \newcommand\calulateheight[1]{%
+    \setlength\textheight{\dimeval{\topskip
+          + \baselineskip * \inteval{#1-1}}}}
 \end{verbatim}
 The above, for example, calculates the appropriate \cs{textheight} for
 a given number of text lines.
@@ -392,10 +482,34 @@
 %
 \githubissue{536}
 
+\subsection{Starred command version for \cs{ref}, \cs{Ref} and \cs{pageref}}
 
+For a long time \pkg{hyperref} provides starred versions for the reference commands
+that don't create active links. This syntax extension required users and
+package authors to check if \pkg{hyperref} was loaded and adjust the coding
+accordingly or take the starred forms out if text was copied to a document
+without \pkg{hyperref}. The commands have now been aligned with
+the \pkg{hyperref} usage and always allow an optional star. The \pkg{showkeys} package
+has been updated to handle the starred versions too, both with \pkg{hyperref} or \pkg{nameref}
+and without. The commands are defined with \cs{NewDocumentCommand} and so no longer expand when
+written to auxiliary files. This reduces the number of compilations needed to resolve references
+in captions and sectioning commands. The package \pkg{ifthen} has been updated to ensure that
+\cs{pageref} can still be used inside tests like \cs{isodd}.
 
 
+\subsection{Preparation for supporting PDF in backends}
 
+At the current point in time, basic support for PDF in
+backends is not part of \LaTeX{} core; it is provided by external
+package like \pkg{hyperref}.
+At some time in the future that work will be placed
+into the kernel but for now it is separate and has to be
+explicitly loaded in the document. To enable class and package authors
+to support PDF specific task like the creation of link targets without
+having to test first if \pkg{hyperref} has been loaded, dummy versions of
+the commands \cs{MakeLinkTarget}, \cs{LinkTargetOn}, \cs{LinkTargetOff} and
+\cs{NextLinkTarget} are provided.
+
 \section{Code improvements}
 
 \subsection{\cs{protected} UTF-8 character definitions}
@@ -505,7 +619,7 @@
 as the heading (instead of just \meta{version}), when using
 \cs{PrintChanges}.
 %
-\githubissue{gh/531}
+\githubissue{531}
 
 
 
@@ -530,7 +644,7 @@
 \class{article} class, now supports the \option{twoside} option
 displaying different data in the footer line on recto and verso pages.
 %
-\githubissue{gh/704}
+\githubissue{704}
 
 
 \subsection{Croatian character support}
@@ -539,7 +653,7 @@
 D\v Z, D\v z, d\v z, LJ, Lj, lj, NJ, Nj, nj, input as single UTF-8 code points
 in the range U+01C4 to U+01CC.
 %
-\githubissue{gh/723}
+\githubissue{723}
 
 
 \subsection{Cleanup of the Unicode declaration interface}
@@ -564,8 +678,33 @@
 \githubissue{253}
 
 
+\subsection{New hook: \hook{include/excluded}}
 
+A few releases ago we introduced a number of file hooks for different
+types of files, see~\cite{35:ltnews32} and in
+particular~\cite{35:ltfilehook-doc}.
+%
+The hooks for \cs{include} files now got an addition: if such a file
+is not included (because \cs{includeonly} is used and its \meta{name}
+is not listed in the argument) then the hooks \hook{include/excluded}
+and \hook{include/\meta{name}/excluded} are executed in that
+order\Dash of course, only if they contain code.  This happens after
+\LaTeX{} has loaded the \texttt{.aux} file for this include file,
+i.e., after \LaTeX{} has updated its counters to pretend that the file
+was seen.
 
+
+\subsection{Input support for normalized angle brackets}
+
+Source files containing \textlangle\ or \textrangle\ directly written
+as Unicode codepoints U+2329 and U+232A no longer break when the
+source file gets normalized under Unicode normalization rules.
+%
+\githubissue{gh/714}
+
+
+
+
 \section{Bug fixes}
 
 \subsection{Using \cs{DeclareUnicodeCharacter} with C1 control points}
@@ -605,11 +744,80 @@
 
 
 
+\subsection{Fix adding \hook{cmd} hooks to simple macros}
 
+A bug in how \LaTeX{} would detect the type of a command was causing a
+premature forced expansion of such commands, which, depending on their
+definition, could be harmless or could cause severe trouble.  This has
+been fixed in the latest release.
+%
+\githubissue{795}
+\sxissue{q/637565}
+
+
+\subsection{Warn if \hook{shipout/lastpage} hook is executed too early}
+
+The hook \hook{shipout/lastpage} is intended to place \cs{special}s
+into the last page shipped out. This is needed for some use cases,
+e.g., tagging. If that hook is nonempty and the user has added additional
+pages since the last run, then \LaTeX{} executes this hook too early,
+but until now without giving any indication that the document needs
+rerunning. This has now been corrected and an appropriate warning is
+given.
+%
+\githubissue{813}
+
+
+\subsection{More consistent use of cramped math styles in \LuaTeX}
+
+Using \LuaTeX's \cs{Udelimiterover} to place a horizontally extensible glyph
+on top of a mathematical expression now causes the expression to be set in cramped
+style as used in similar situations by traditional \TeX\ math rendering.
+Similarly cramped style is now used for expressions set under such a delimiter
+using \cs{Uunderdelimiter} but no longer used when setting an expression on top
+of such extensible glyphs using \cs{Uoverdelimiter}.
+This new behavior follows \TeX's rule that cramped style is used whenever something
+else appears above the expression.
+Additionally the math style of these constructs can now be detected using \cs{mathstyle}.
+
+The old behavior can be restored by adding
+\begin{verbatim}
+   \mathdefaultsmode=0
+\end{verbatim}
+to a document.
+
+
+\subsection{Fixed bug when setting hook rules for one-time hooks}
+
+If a \cs{DeclareHookRule} command is set for a one-time hook, it has to
+come \emph{before} the hook gets used, because otherwise it never
+applies\Dash after all, the hook is used only once.  There was a bug in
+the implementation in that the sorting mechanism was still applied if
+the \cs{DeclareHookRule} declaration appeared while the one-time hook was
+executed, causing the spurious typesetting of the code labels and the
+hook name.  This bug is now fixed and an error is raised when a new
+sorting rule is added to an already used one-time hook.
+
+A possible scenario in which this new error is raised is the following:
+package \pkg{AAA} declares a hook rule for \hook{begindocument} (i.e.,
+\cs{AtBeginDocument}) to sort out the behavior between itself and some
+other package. Package \pkg{BBB} wants to load package \pkg{AAA} but
+only if it hasn't been loaded in the preamble, so delays the loading to
+\hook{begindocument}. In that case the hook rule declared by \pkg{AAA}
+can no longer be applied and you get the error. If that happens the
+solution is to load the package in \hook{begindocument/before}, which
+is executed at the very end of the preamble but before
+\hook{begindocument} is processed.
+%
+\githubissue{818}
+
+
+
+
 \section{Changes to packages in the \pkg{amsmath} category}
 
 
-\subsection{\pkg{amsopn} Do not reset \cs{operator at font}}
+\subsection{\pkg{amsopn}: Do not reset \cs{operator at font}}
 
 The package \pkg{amsopn} used to define \cs{operator at font} but this
 command is already provided by the \LaTeX{} format (for at least 14
@@ -622,8 +830,8 @@
 
 In the unlikely event that you want the resetting to happen, use
 \begin{verbatim}
-  \makeatletter 
-   \def\operator at font{\mathgroup\symoperators} 
+  \makeatletter
+   \def\operator at font{\mathgroup\symoperators}
   \makeatother
 \end{verbatim}
 after loading the package.
@@ -630,7 +838,7 @@
 %
 \githubissue{734}
 
-\subsection{\pkg{amsmath} Error in \cs{shoveleft}}
+\subsection{\pkg{amsmath}: Error in \cs{shoveleft}}
 
 If \cs{shoveleft} started out with the words \enquote{plus} or
 \enquote{minus} it was misunderstood as part of a rubber length and
@@ -641,6 +849,20 @@
 \githubissue{714}
 
 
+\subsection{\pkg{amsmath} and \pkg{amsopn}: Robustify user commands}
+
+Most user-level commands have been made robust in the \LaTeX{} kernel
+during the last years, but variant definitions in \pkg{amsmath} turned
+them back into fragile beings. We have now made most commands in
+\pkg{amsmath} and \pkg{amsopn} robust as well to match the kernel
+behavior. This also resolves a bug recently discovered in the
+\pkg{mathtools} package, which was due to \cs{big} not being robust after
+\pkg{amsmath} was loaded.
+%
+\githubissue{123}
+
+
+
 \section{Changes to packages in the \pkg{graphics} category}
 
 \subsection{Color in formulas}
@@ -655,7 +877,7 @@
 % without {{ the superscript below is misplaced
                     _{{\color{black} i=1}}
 % without {{ the \sum is black
-                    ^{{\color{black} n}} 
+                    ^{{\color{black} n}}
    \color{black}    % without it the x_i is red
    x_i           \]
 \end{verbatim}
@@ -731,26 +953,29 @@
   \emph{\LaTeX{} Tagged PDF \Dash A blueprint for a large project}.\\
   \url{https://latex-project.org/publications/indexbyyear/2020/}
 
-\bibitem{35:source2e}
-  \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
-  \url{https://latex-project.org/help/documentation/}
+%\bibitem{35:source2e}
+%  \emph{\LaTeX{} documentation on the \LaTeX{} Project Website}.\\
+%  \url{https://latex-project.org/help/documentation/}
 
-\bibitem{35:ltnews31} \LaTeX{} Project Team:
-  \emph{\LaTeXe{} news 31}.\\
-  \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
+%\bibitem{35:ltnews31} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} news 31}.\\
+%  \url{https://latex-project.org/news/latex2e-news/ltnews31.pdf}
 
 \bibitem{35:ltnews32} \LaTeX{} Project Team:
   \emph{\LaTeXe{} news 32}.\\
   \url{https://latex-project.org/news/latex2e-news/ltnews32.pdf}
 
-\bibitem{35:ltnews33} \LaTeX{} Project Team:
-  \emph{\LaTeXe{} news 33}.\\
-  \url{https://latex-project.org/news/latex2e-news/ltnews33.pdf}
+%\bibitem{35:ltnews33} \LaTeX{} Project Team:
+%  \emph{\LaTeXe{} news 33}.\\
+%  \url{https://latex-project.org/news/latex2e-news/ltnews33.pdf}
 
 \bibitem{35:ltnews34} \LaTeX{} Project Team:
   \emph{\LaTeXe{} news 34}.\\
   \url{https://latex-project.org/news/latex2e-news/ltnews34.pdf}
 
+\bibitem{35:ltfilehook-doc} Frank Mittelbach, Phelype Oleinik, \LaTeX{} Project Team:
+  \emph{The \texttt{\upshape ltfilehook} documentation}.\\
+  Run \texttt{texdoc} \texttt{ltfilehook-doc} to view.
 \end{thebibliography}
 
 

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltx3info.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltxdoc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/makeindx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/manifest.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/manifest.txt	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/manifest.txt	2022-05-19 20:13:40 UTC (rev 63339)
@@ -140,6 +140,7 @@
 % ltshipout.dtx   --  Hook management for \shipout
 % ltcmdhooks.dtx  --  Hook management (generic) for commands
 % ltpara.dtx      --  Hook management for paragraphs
+% ltmarks.dtx     --  Mark management
 %
 % Standard Classes:
 % -----------------

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/modguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/nfssfont.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/proc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/slides.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/slifonts.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/source2e.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/source2e.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/source2e.tex	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/source2e.tex	2022-05-19 20:13:40 UTC (rev 63339)
@@ -324,6 +324,8 @@
 
  \DocInclude{ltbibl}   % Bibliography
 
+ \DocInclude{ltmarks}  % Output routine marks management (L3 module)
+
  \DocInclude{ltpage}   % \pagestyle \raggedbottom \sloppy
 
  \DocInclude{ltclass}  % Package & Class interface

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/syntonly.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/tlc2.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/tulm.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/usrguide3.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/utf8ienc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/webcomp.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/graphics/README.md	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/graphics/README.md	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,7 +1,7 @@
 The LaTeX `graphics` bundle
 ===========================
 
-Release 2022-06-01 pre-release 2
+Release 2022-06-01 pre-release 4
 
 Overview
 --------

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/color.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/drivers.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/epsfig.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/graphics.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/graphicx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/grfguide.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/keyval.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/lscape.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/mathcolor.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/rotating.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/rotex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/graphics/trig.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/tools/README.md	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/README.md	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,7 +1,7 @@
 The LaTeX `tools` bundle
 ========================
 
-Release 2022-06-01 pre-release 3
+Release 2022-06-01 pre-release 4
 
 Overview
 --------

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/afterpage.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/array.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/bm.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/calc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt	2022-05-19 20:13:40 UTC (rev 63339)
@@ -5,6 +5,11 @@
 are not part of the distribution.
 =======================================================================
 
+2022-04-12  Ulrike Fischer  <Ulrike.Fischer at 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 at latex-project.org>
 
 	* bm.dtx: Guard \nolimits@ for gh issue 744

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/dcolumn.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/delarray.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/enumerate.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/fileerr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/fontsmpl.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/ftnright.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/hhline.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/indentfirst.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/layout.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/longtable.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/multicol.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/rawfonts.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/shellesc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/showkeys.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/somedefs.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/tabularx.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/theorem.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/tools-overview.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/trace.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/varioref.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/verbatim.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/xr.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/xspace.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex-dev/amsmath/amsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/amsmath/amsmath.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/amsmath/amsmath.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -86,7 +86,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\ProvidesPackage{amsmath}[2022/02/03 v2.17m AMS math features]
+\ProvidesPackage{amsmath}[2022/04/08 v2.17n AMS math features]
 %    \end{macrocode}
 %
 % \section{Catcode defenses}
@@ -615,7 +615,8 @@
 %    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 @@
 \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 @@
 %    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 @@
 %    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 at th$\displaystyle#1$}}
+\DeclareRobustCommand{\boxed}[1]{\fbox{\m at th$\displaystyle#1$}}
 %    \end{macrocode}
 %    \end{macro}
 %
@@ -980,8 +983,9 @@
 %    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 @@
  {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}%
  {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}}
 %
-\ams at newcommand{\iint}{\DOTSI\protect\MultiIntegral{2}}
-\ams at newcommand{\iiint}{\DOTSI\protect\MultiIntegral{3}}
-\ams at newcommand{\iiiint}{\DOTSI\protect\MultiIntegral{4}}
-\newcommand{\idotsint}{\DOTSI\protect\MultiIntegral{0}}
+\ams at newcommand{\iint}{\DOTSI\MultiIntegral{2}}
+\ams at newcommand{\iiint}{\DOTSI\MultiIntegral{3}}
+\ams at newcommand{\iiiint}{\DOTSI\MultiIntegral{4}}
+\newcommand{\idotsint}{\DOTSI\MultiIntegral{0}}
 %    \end{macrocode}
 %    \end{macro}
 %    \end{macro}
@@ -1403,8 +1407,9 @@
 %    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 at c{\noexpand\intop
     \ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi
     \ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi
@@ -1582,11 +1587,12 @@
 %    the \latex/ kernel; the macro |\n at 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 @@
   {\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 @@
 %    \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 at font mod}\penalty900
   \mkern5mu\nonscript\mskip-\medmuskip}
-\newcommand{\pod}[1]{\allowbreak
+\DeclareRobustCommand{\pod}[1]{\allowbreak
   \if at display\mkern18mu\else\mkern8mu\fi(#1)}
-\renewcommand{\pmod}[1]{\pod{{\operator at font mod}\mkern6mu#1}}
-\newcommand{\mod}[1]{\allowbreak\if at display\mkern18mu
+\DeclareRobustCommand{\pmod}[1]{\pod{{\operator at font mod}\mkern6mu#1}}
+\DeclareRobustCommand{\mod}[1]{\allowbreak\if at display\mkern18mu
   \else\mkern12mu\fi{\operator at font mod}\,\,#1}
 %    \end{macrocode}
 %    \end{macro}
@@ -2109,8 +2128,9 @@
 %    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 @@
 %    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 @@
 %    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 @@
 %    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 @@
 %    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 at ifvmode\@undefined
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
   \def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
   \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@\box\z@}%
   \ifmmode \@xp\mathpalette\@xp\mathsm at sh
@@ -2192,7 +2216,7 @@
   \fi
 }
 \else
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
   \def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
   \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@ \leavevmode at ifvmode\box\z@}%
   \ifmmode \@xp\mathpalette\@xp\mathsm at sh
@@ -2240,9 +2264,10 @@
 %
 %    \begin{macro}{\relbar}
 %    \begin{macro}{\Relbar}
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
 %    \begin{macrocode}
-\ams at def\relbar{\mathrel{\mathpalette\mathsm at sh\std at minus}}
-\ams at def\Relbar{\mathrel\std at equal}
+\ams at DeclareRobustCommand\relbar{\mathrel{\mathpalette\mathsm at sh\std at minus}}
+\ams at DeclareRobustCommand\Relbar{\mathrel\std at equal}
 %    \end{macrocode}
 %    \end{macro}
 %    \end{macro}
@@ -2272,6 +2297,17 @@
 \ams at 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 @@
   \mathpalette{\underarrow@\leftrightarrowfill@}}
 %    \end{macrocode}
 %
+%    
+% \changes{v2.17n}{2022/04/08}{Make commands robust (gh/123)}
 %    \begin{macrocode}
-%\newcommand{\xrightarrow}[2][]{\ext at 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 at arrow 0359\rightarrowfill@{#1}{#2}}
 \def\ext at arrow#1#2#3#4#5#6#7{%
   \mathrel{\mathop{%
 %    \end{macrocode}
@@ -2315,8 +2362,8 @@
 %    sub/superscripts. These commands are robust because they take an
 %    optional argument.
 %    \begin{macrocode}
-\newcommand{\xrightarrow}[2][]{\ext at arrow 0359\rightarrowfill@{#1}{#2}}
-\newcommand{\xleftarrow}[2][]{\ext at arrow 3095\leftarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xrightarrow}[2][]{\ext at arrow 0359\rightarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xleftarrow}[2][]{\ext at arrow 3095\leftarrowfill@{#1}{#2}}
 %    \end{macrocode}
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -2406,8 +2453,9 @@
 % \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 @@
 %    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 @@
 %    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 @@
 %    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 at ifnextchar}.
+% \changes{v2.17n}{2022/04/08}{Make command robust (gh/123)}
 %    \begin{macrocode}
-\newcommand{\allowdisplaybreaks}[1][4]{%
+\DeclareRobustCommand{\allowdisplaybreaks}[1][4]{%
   \interdisplaylinepenalty\getdsp at pen{#1}\relax
 }
 %    \end{macrocode}
@@ -2709,8 +2760,9 @@
 % \begin{macro}{\dspbrk at context}
 % \begin{macro}{\nogood at 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 at ifnextchar[\dspbrk@{\dspbrk@[4]}}
+\DeclareRobustCommand{\displaybreak}{\new at ifnextchar[\dspbrk@{\dspbrk@[4]}}
 \chardef\dspbrk at context=\sixt@@n
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/amsmath/amsopn.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/amsmath/amsopn.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/amsmath/amsopn.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -58,7 +58,7 @@
 %    \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}[2022/01/20 v2.03 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 @@
 \@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 at font}
@@ -226,23 +227,24 @@
 %    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 at th\ialign{##\cr
     \hfil$#1\operator at 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 at th\operator at font lim$}}}
-\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
+\protected\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
 \def\varlimsup@#1{\@@overline{\hbox{$#1\m at th\operator at font lim$}}}
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/base/format.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/format.ins	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/format.ins	2022-05-19 20:13:40 UTC (rev 63339)
@@ -202,6 +202,7 @@
           \from{ltfloat.dtx}{2ekernel}
           \from{ltidxglo.dtx}{2ekernel}
           \from{ltbibl.dtx}{2ekernel}
+          \from{ltmarks.dtx}{trace,2ekernel}    % L3 layer module
           \from{ltpage.dtx}{2ekernel}
          \from{ltclass.dtx}{2ekernel,tracerollback}
           \from{ltkeys.dtx}{2ekernel}           % L3 layer module

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ifthen.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ifthen.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ifthen.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %<driver>\ProvidesFile{ifthen.drv}
 % \fi
 %         \ProvidesFile{ifthen.dtx}
-          [2020/11/24 v1.1c Standard LaTeX ifthen package (DPC)]
+          [2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)]
 %
 % \iffalse
 %<*driver>
@@ -80,6 +80,7 @@
 % \changes{v1.0k}{1995/04/25}{Fix `driver' docstrip guards.}
 % \changes{v1.0n}{1997/11/03}{Documentation fix.}
 % \changes{v1.0o}{1998/08/17}{Documentation fix.}
+% \changes{v1.1d}{2022/04/13}{Make reference command locally expandable.}
 %
 % \section{Introduction}
 %
@@ -263,7 +264,15 @@
 % macros expanding to |T| or |F| has been completely replaced by a
 % simpler system using |\iftrue|, which furthermore allows lazy
 % evaluation on the second pass.
+% With a LaTeX 2022/06/01 we have to ensure that |\pageref| is expandable.
 %    \begin{macrocode}
+\@ifl at t@r\fmtversion{2022/06/01}
+  {\def\TE at ref@exp{\let\pageref\@kernel at pageref@exp
+                  \let\ref\@kernel at ref@exp}}
+  {\def\TE at ref@exp{\def\@setref##1##2##3{%
+         \ifx##1\relax\z@\else\expandafter##2##1\fi}}}
+%    \end{macrocode}
+%    \begin{macrocode}
 \long\def\ifthenelse#1{%
 %    \end{macrocode}
 % \changes{v1.0h}{1994/05/14}{Use \cs{TE at repl}}
@@ -295,11 +304,11 @@
 % \changes{v1.0l}{1996/03/22}
 %      {Use \cs{begingroup} not \cs{bgroup} for latex/2105}
 % \changes{v1.1a}{1999/01/07}{\cs{isundefined} added for /2824}
+% \changes{v1.1d}{2022/04/13}{changed method to make \cs{pageref} and \cs{ref} locally expandable.}
 %    \begin{macrocode}
     \begingroup
         \let\protect\@unexpandable at protect
-        \def\@setref##1##2##3{%
-         \ifx##1\relax\z@\else\expandafter##2##1\fi}%
+        \TE at ref@exp
         \def\value##1{\the\csname c@##1\endcsname}%
         \let\equal\TE at equal \let\(\TE at lparen \let\)\TE at rparen
         \let\isodd\TE at odd \let\lengthtest\TE at length

Modified: trunk/Master/texmf-dist/source/latex-dev/base/latexrelease.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/latexrelease.ins	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/latexrelease.ins	2022-05-19 20:13:40 UTC (rev 63339)
@@ -129,6 +129,7 @@
   \from{ltfloat.dtx}     {latexrelease}%
   \from{ltidxglo.dtx}    {latexrelease}% empty
   \from{ltbibl.dtx}      {latexrelease}% empty
+  \from{ltmarks.dtx}     {latexrelease}% L3 layer module
   \from{ltpage.dtx}      {latexrelease}% empty
   \from{ltclass.dtx}     {latexrelease,tracerollback}%
   \from{ltfilehook.dtx}  {latexrelease}% empty  % L3 layer module

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2021/12/09 v1.5a LaTeX Kernel (Class & Package Interface)]
+             [2022/04/16 v1.5b LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -2175,9 +2175,10 @@
 %    \begin{macrocode}
   \@ifl at aded\@currext\@currname
 %    \end{macrocode}
+% \changes{v1.5b}{2022/03/18}{Switch to \cs{ProcessKeyOptions}}
 %    In the current preferred approach, a key family name will exist for
 %    processing using \pkg{ltkeys}. In that case, we replace the previous
-%    package options with with the new ones, then call the key handler.
+%    package options with the new ones, then call the key handler.
 %    Otherwise, we use the more classical clash handler.
 %    \begin{macrocode}
     {%
@@ -2185,7 +2186,7 @@
         {\@onefilewithoptions at clashchk{#2}}
         {%
           \@namedef{opt@\@currname.\@currext}{#2}%
-          \expandafter\expandafter\expandafter\ProcessKeyPackageOptions
+          \expandafter\expandafter\expandafter\ProcessKeyOptions
             \expandafter\expandafter\expandafter
               [\csname opt at fam@\@currname.\@currext\endcsname]%
         }%

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -34,8 +34,8 @@
 %%% From File: ltcmd.dtx
 %
 %    \begin{macrocode}
-\def\ltcmdversion{v1.0k}
-\def\ltcmddate{2022-02-28}
+\def\ltcmdversion{v1.0l}
+\def\ltcmddate{2022-03-18}
 %    \end{macrocode}
 %
 %<*driver>
@@ -4097,8 +4097,10 @@
 % \begin{macro}{\@@_cmd_type_cases:Nnnnn}
 % \changes{v1.0d}{2021/04/19}{Renamed \cs{__cmd_cmd_if_xparse:NTF} to
 %      \cs{__kernel_cmd_if_xparse:NTF} for cross-module usage}
-% \changes{v1.0d}{2021/07/30}{Added \cs{@@_cmd_type_cases:Nnnnn} for
+% \changes{v1.0d}{2021/07/30}{Added \cs{@@_cmd_type_cases:NnnnnF} for
 %      \cs{NewCommandCopy} and \cs{ShowCommand} support}
+% \changes{v1.0l}{2022/03/18}{Fix \cs{@@_cmd_type_cases:NnnnnF}
+%"     prematurely expanding macros (gh/795)}
 % \begin{macro}{\@@_cmd_if_xparse_aux:N}
 %
 %    To determine whether the command is an \pkg{xparse} command check
@@ -4117,22 +4119,14 @@
     \exp_args:Ne \str_case_e:nnF
       {
         \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
-          {
-            \token_if_macro:NT #1
-              {
-                \exp_after:wN \exp_after:wN
-                \exp_after:wN \token_to_str:N
-                \exp_after:wN \use_i_delimit_by_q_stop:nw
-                  #1 \scan_stop: \q_stop
-              }
-          }
+          { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
       }
       {
-        { \token_to_str:N \@@_start:nNNnnn } {#2}
-        { \token_to_str:N \@@_start_expandable:nNNNNn } {#3}
-        { \token_to_str:N \@@_start_env:nnnnn } {#4}
+        { \exp_not:N \@@_start:nNNnnn } {#2}
+        { \exp_not:N \@@_start_expandable:nNNNNn } {#3}
+        { \exp_not:N \@@_start_env:nnnnn } {#4}
         {
-          \exp_after:wN \token_to_str:N
+          \exp_after:wN \exp_not:N
             \cs:w environment~
               \exp_last_unbraced:Ne \use_none:nnn
                 { \cs_to_str:N #1 } ~end~aux \cs_end:

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltdefns.dtx}
-             [2021/06/04 v1.5q LaTeX Kernel (definition commands)]
+             [2022/05/13 v1.5q LaTeX Kernel (definition commands)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltdefns.dtx}
@@ -1601,7 +1601,7 @@
 %   But more importantly, the most common use case of copying a command is to
 %   redefine it later, while preserving the old definition, as in:
 % \begin{verbatim}
-%   \ProvideComandCopy \A \B
+%   \ProvideCommandCopy \A \B
 %   \renewcommand \B { ... \A ... }
 % \end{verbatim}
 %   then, if \verb=\A= is already defined the first line is skipped, an in this

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfilehook.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfilehook.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfilehook.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -32,7 +32,7 @@
 %
 %    \begin{macrocode}
 \providecommand\ltfilehookversion{v1.0m}
-\providecommand\ltfilehookdate{2022/03/10}
+\providecommand\ltfilehookdate{2022/04/01}
 %    \end{macrocode}
 %
 %<*driver>
@@ -39,21 +39,6 @@
 
 \documentclass{l3doc}
 
-% bug fix fo l3doc.cls
-\ExplSyntaxOn
-\cs_set_protected:Npn \__codedoc_macro_typeset_one:nN #1#2
-  {
-    \vbox_set:Nn \l__codedoc_macro_box
-      {
-        \vbox_unpack_drop:N \l__codedoc_macro_box
-        \hbox { \llap { \__codedoc_print_macroname:nN {#1} #2
-            \MacroFont       % <----- without it the \ is in lmr10 if a link is made
-            \
-        } }
-      }
-    \int_incr:N \l__codedoc_macro_int
-  }
-\ExplSyntaxOff
 
 \providecommand\InternalDetectionOff{}
 \providecommand\InternalDetectionOn{}
@@ -73,9 +58,10 @@
 %
 % \long\def\fmi#1{\begin{quote}\itshape Todo: #1\end{quote}}
 %
-% \let\hook\texttt
+% \providecommand\hook[1]{\texttt{#1}}
 %
-% \title{The \texttt{ltfilehook} package\thanks{This package has version
+%
+% \title{The \texttt{ltfilehook} documentation\thanks{This code has version
 %    \ltfilehookversion\ dated \ltfilehookdate, \copyright\ \LaTeX\
 %    Project.}}
 %
@@ -120,7 +106,7 @@
 %                   }
 %    These are:
 %    \begin{description}
-%    \item[\texttt{file/before}, \texttt{file/\meta{file-name}/before}]
+%    \item[\hook{file/before}, \hook{file/\meta{file-name}/before}]
 %
 %       These hooks are executed in that order just before the file is
 %       loaded for reading. The code of the first hook is used
@@ -128,16 +114,16 @@
 %       file with matching \meta{file-name} allowing you to specify
 %       code that only applies to one file.
 %
-%    \item[\texttt{file/\meta{file-name}/after}, \texttt{file/after}]
+%    \item[\hook{file/\meta{file-name}/after}, \hook{file/after}]
 %
 %       These hooks are after the file with name \meta{file-name} has
 %       been fully consumed. The order is swapped (the specific one
-%       comes first) so that the \texttt{before} and \texttt{after}
+%       comes first) so that the \hook{/before} and \hook{/after}
 %       hooks nest properly, which is important if any of them involve
 %       grouping (e.g., contain environments, for example).
 %       Furthermore both hooks are reversed hooks to support correct
 %       nesting of different packages adding code to both
-%       \texttt{/before} and \texttt{/after} hooks.
+%       \hook{/before} and \hook{/after} hooks.
 %
 %    \end{description}
 %  \end{variable}
@@ -216,7 +202,7 @@
 %    \cs{RequirePackage}, \cs{LoadPackageWithOptions}, etc.) offer the
 %    hooks from section~\ref{sec:general-file-hooks} when they are
 %    used to load a  package or class file, e.g.,
-%    \texttt{file/array.sty/after} would be called after the
+%    \hook{file/array.sty/after} would be called after the
 %    \pkg{array} package got loaded. But as packages and classes form as special group
 %    of files, there are some additional hooks available that only
 %    apply when a package or class is loaded.
@@ -230,21 +216,21 @@
 %                   }
 %    These are:
 %    \begin{description}
-%    \item[\texttt{package/before}, \texttt{package/after}]
+%    \item[\hook{package/before}, \hook{package/after}]
 %
 %      These hooks are called for each package being loaded.
 %
-%    \item[\texttt{package/\meta{name}/before},
-%    \texttt{package/\meta{name}/after}]
+%    \item[\hook{package/\meta{name}/before},
+%    \hook{package/\meta{name}/after}]
 %
 %      These hooks are additionally called if the package name is
 %      \meta{name} (without extension).
 %
-%    \item[\texttt{class/before}, \texttt{class/after}]
+%    \item[\hook{class/before}, \hook{class/after}]
 %
 %      These hooks are called for each class being loaded.
 %
-%    \item[\texttt{class/\meta{name}/before}, \texttt{class/\meta{name}/after}]
+%    \item[\hook{class/\meta{name}/before}, \hook{class/\meta{name}/after}]
 %
 %      These hooks are additionally called if the class name is
 %      \meta{name} (without extension).
@@ -269,8 +255,8 @@
 %    \>\cs{UseHook}\marg{\hook{package/\meta{package name}/after}} \\
 %    \>\cs{UseHook}\marg{\hook{package/after}}
 %  \end{tabbing}
-%    and similar for class file loading, except that \texttt{package/}
-%    is replaced by \texttt{class/} and \cs{AtEndOfPackage} by
+%    and similar for class file loading, except that \hook{package/}
+%    is replaced by \hook{class/} and \cs{AtEndOfPackage} by
 %    \cs{AtEndOfClass}.
 %
 %    If a package or class is not loaded (or it was loaded before the
@@ -321,7 +307,7 @@
 %    These are:
 %    \begin{description}
 %
-%    \item[\texttt{include/before}, \texttt{include/\meta{name}/before}]
+%    \item[\hook{include/before}, \hook{include/\meta{name}/before}]
 %
 %      These hooks are executed (in that order) after the initial
 %      \cs{clearpage} and after \texttt{.aux} file is changed to use
@@ -331,7 +317,7 @@
 %      file.
 %
 %
-%    \item[\texttt{include/\meta{name}/end}, \texttt{include/end}]
+%    \item[\hook{include/\meta{name}/end}, \hook{include/end}]
 %
 %      These hooks are executed (in that order) after \LaTeX{} has
 %      stopped reading from the \cs{include} file, but before it has
@@ -338,7 +324,7 @@
 %      issued a \cs{clearpage} to output any deferred floats.
 %
 %
-%    \item[\texttt{include/\meta{name}/after}, \texttt{include/after}]
+%    \item[\hook{include/\meta{name}/after}, \hook{include/after}]
 %
 %      These hooks are executed (in that order) after \LaTeX{} has
 %      issued the \cs{clearpage} but before is has switched back
@@ -349,6 +335,19 @@
 %      included material and bypassed if it is not loaded because of
 %      some \cs{includeonly} statement.\footnotemark
 %
+%    \item[\hook{include/excluded}, \hook{include/\meta{name}/excluded}]
+%
+%      The above hooks for \cs{include} files are only executed when
+%      the file is loaded (or more exactly the load is attempted). If,
+%      however, the \cs{include} file is explicitly excluded (through
+%      an \cs{includeonly} statement) the above
+%      hooks are bypassed and instead the \hook{include/excluded}
+%      hook followed by the \hook{include/\meta{name}/excluded} hook
+%      are executed. This happens after
+%      \LaTeX{} has loaded the \texttt{.aux} file for this include file,
+%      i.e., after \LaTeX{} has updated its counters to pretend that the file
+%      was seen.
+%
 %    \end{description}
 %  \end{variable}\footnotetext{For that reason
 %      another \cs{clearpage} is executed after these hooks which
@@ -359,6 +358,9 @@
 %    All \hook{include} hooks involving the name of the included file are implemented as
 %    one-time hooks (whereas all other such hooks are normal hooks).
 %
+%    If you want to execute code that is run for every \cs{include}
+%    regardless of whether or not it is excluded, use the
+%    \hook{cmd/include/before} or \hook{cmd/include/after} hooks.
 %
 %
 %
@@ -728,7 +730,7 @@
 % this declaration is done for you automatically and, indeed, they should
 % not be declared explicitly. 
 %
-% Those named \hook{.../after} and \texttt{include/.../end}
+% Those named \hook{.../after} and \hook{include/.../end}
 % are, when code is added, declared as reversed hooks.
 %
 %
@@ -742,8 +744,8 @@
 % \begin{macro}{\@input at file@exists at with@hooks}
 % \begin{macro}{\unqu at tefilef@und}
 %    \cs{InputIfFileExists} loads any file if it is available so we
-%    have to add the hooks \texttt{file/before} and
-%    \texttt{file/after} in the right places. If the file doesn't
+%    have to add the hooks \hook{file/before} and
+%    \hook{file/after} in the right places. If the file doesn't
 %    exist no hooks should be executed.
 %    \begin{macrocode}
 %</2ekernel>
@@ -783,7 +785,7 @@
 %    can't rely on that still being true after the file has been
 %    processed. Thus for using the name in the file hooks we need to
 %    preserve the name and then restore it for the
-%    \texttt{file/.../after} hook.
+%    \hook{file/.../after} hook.
 %
 %    The hook always refers to the file requested by the user.  The hook
 %    is \emph{always} loaded for \cs{CurrentFile} which usually is the

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfiles.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfiles.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfiles.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfiles.dtx}
-             [2021/10/14 v1.2p LaTeX Kernel (File Handling)]
+             [2022/04/01 v1.2q LaTeX Kernel (File Handling)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfiles.dtx}
@@ -817,7 +817,7 @@
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease>\IncludeInRelease{2022/06/01}%
 %<latexrelease>                 {\@include}{Spaces in file names and hooks}%
 %    \end{macrocode}
 %    
@@ -899,6 +899,16 @@
 %    \begin{macrocode}
     \deadcycles\z@
     \@nameuse{cp@#1}%
+%    \end{macrocode}
+%    We also execute a hook in this case, first a general used for
+%    every include file that is exclude and then a specific one that
+%    contains the name of the include file.
+% \changes{v1.2q}{2022/04/01}{Process some hooks is an include file is bypassed}
+%    \begin{macrocode}
+%-----------------------------------------
+    \UseHook{include/excluded}%
+    \UseOneTimeHook{include/#1/excluded}%
+%-----------------------------------------
   \fi
   \let\@auxout\@mainaux
 %    \end{macrocode}
@@ -917,13 +927,66 @@
 \NewHook{include/before}
 \NewReversedHook{include/end}
 \NewReversedHook{include/after}
+\NewHook{include/excluded}
 %<latexrelease>\EndIncludeInRelease
 %</2ekernel|latexrelease>
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease>                 {\@include}{Spaces in file names and hooks}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\def\@include#1 {%
+%<latexrelease>\ifx\@nodocument\relax
+%<latexrelease>  \clearpage
+%<latexrelease>  \if at filesw
+%<latexrelease>    \immediate\write\@mainaux{\string\@input{#1.aux}}%
+%<latexrelease>  \fi
+%<latexrelease>  \@tempswatrue
+%<latexrelease>  \if at partsw
+%<latexrelease>    \@tempswafalse
+%<latexrelease>    \edef\reserved at b{#1}%
+%<latexrelease>    \@for\reserved at a:=\@partlist\do
+%<latexrelease>      {\ifx\reserved at a\reserved at b\@tempswatrue\fi}%
+%<latexrelease>  \fi
+%<latexrelease>  \if at tempswa
+%<latexrelease>    \let\@auxout\@partaux
+%<latexrelease>    \if at filesw
+%<latexrelease>      \immediate\openout\@partaux "#1.aux"
+%<latexrelease>      \immediate\write\@partaux{\relax}%
+%<latexrelease>    \fi
+%<latexrelease>    \@filehook at set@CurrentFile
+%<latexrelease>    \UseHook{include/before}%
+%<latexrelease>    \UseOneTimeHook{include/#1/before}%
+%<latexrelease>    \@input@{#1.tex}%
+%<latexrelease>    \UseOneTimeHook{include/#1/end}%
+%<latexrelease>    \UseHook{include/end}%
+%<latexrelease>    \clearpage
+%<latexrelease>    \UseOneTimeHook{include/#1/after}%
+%<latexrelease>    \UseHook{include/after}%
+%<latexrelease>    \clearpage
+%<latexrelease>    \@writeckpt{#1}%
+%<latexrelease>    \if at filesw
+%<latexrelease>      \immediate\closeout\@partaux
+%<latexrelease>    \fi
+%<latexrelease>  \else
+%<latexrelease>    \deadcycles\z@
+%<latexrelease>    \@nameuse{cp@#1}%
+%<latexrelease>  \fi
+%<latexrelease>  \let\@auxout\@mainaux
+%<latexrelease>\else
+%<latexrelease>\@latex at warning{%
+%<latexrelease>  \noexpand\include should only be used after \string\begin{document}}%
+%<latexrelease>\@input@{#1}%
+%<latexrelease>\fi}
+%<latexrelease>\NewHook{include/before}
+%<latexrelease>\NewReversedHook{include/end}
+%<latexrelease>\NewReversedHook{include/after}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease>                 {\@include}{Spaces in file names}%
+%<latexrelease>                 {\@include}{Spaces in file names and hooks}%
 %<latexrelease>\def\@include#1 {%
 %<latexrelease>  \clearpage
 %<latexrelease>  \if at filesw

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltfinal.dtx}
-             [2022/02/20 v2.2r LaTeX Kernel (Final Settings)]
+             [2022/04/21 v2.2t LaTeX Kernel (Final Settings)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltfinal.dtx}
@@ -153,6 +153,34 @@
 %    \end{macrocode}
 % \end{macro}
 %
+%
+%    
+%    Allocate 3 mark classes to be used in \cs{markboth} and
+%    \cs{markright}. Should be done earlier but for that definition of
+%    \cs{newmarks} needs moving (which it should I guess).
+% \changes{v2.2s}{2022/04/03}{Integration of new mark management interface}
+%    \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {2e-left}{Delayed legacy marks}%
+\NewMarkClass {2e-left}     
+\NewMarkClass {2e-right}     
+\NewMarkClass {2e-right-nonempty}
+%    \end{macrocode}
+%    No rollback really, the marks will remain.
+%    \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {2e-left}{Delayed legacy marks}%
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
+
+
+%
 %\begin{macro}{\newXeTeXintercharclass}
 % \changes{v2.0a}{2014/12/30}{macro added}
 % \changes{v2.0b}{2015/01/23}{use reserved count 257}
@@ -1076,14 +1104,15 @@
 % \changes{v2.1h}{2019/09/14}{Expand UTF8 chars when case changing (github/177)}
 % \changes{v2.2r}{2022/02/20}
 %                {Use \cs{@expl at text@uppercase@@n}, removing local redefinition of \cs{UTF at two@octets at noexpand}}%
+% \changes{v2.2t}{2022/04/21}{Support \cs{noexpand} in argument of \cs{@expl at text@uppercase@@n}}
 %    \begin{macrocode}
-      \protected at edef\reserved at a{\@expl at text@uppercase@@n{#1}}%
+      \protected at edef\reserved at a{\@expl at text@uppercase@@n{\noexpand\unexpanded{#1}}}%
       \reserved at a
    }}
 \DeclareRobustCommand{\MakeLowercase}[1]{{%
       \def\reserved at a##1##2{\let##2##1\reserved at a}%
       \expandafter\reserved at a\@uclclist\reserved at b{\reserved at b\@gobble}%
-      \protected at edef\reserved at a{\@expl at text@lowercase@@n{#1}}%
+      \protected at edef\reserved at a{\@expl at text@lowercase@@n{\noexpand\unexpanded{#1}}}%
       \reserved at a
    }}
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -31,8 +31,8 @@
 %%% From File: lthooks.dtx
 %
 %    \begin{macrocode}
-\def\lthooksversion{v1.0s}
-\def\lthooksdate{2022/01/06}
+\def\lthooksversion{v1.0u}
+\def\lthooksdate{2022/05/19}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1378,7 +1378,7 @@
 %    in real documents.
 %
 %    For example, \pkg{babel} may want to provide hooks such as
-%    \hook{babel/afterextras/\meta{language}}.  Language support in
+%    \hook{babel/\meta{language}/afterextras}.  Language support in
 %    \pkg{babel} is often done through external language
 %    packages. Thus doing the activation for all languages inside the
 %    core \pkg{babel} code is not a viable approach. Instead it needs
@@ -1946,6 +1946,20 @@
 %    \end{description}
 %
 %
+%
+% \subsection{Hook provided by the mark mechanism}
+%
+%    See \texttt{ltmarks-doc.pdf} for details.
+%    \begin{description}
+%
+%    \item[\hook{insertmark}]
+%
+%      This hook allows for a special setup while \cs{InsertMark}
+%      inserts a mark. It is executed in group so local changes only
+%      apply to the mark being inserted.
+%
+%    \end{description}
+%
 % \MaybeStop{\setlength\IndexMin{200pt}  \PrintIndex  }
 %
 %
@@ -2182,7 +2196,6 @@
 % \end{macro}
 %
 %
-%
 % \subsection{Providing new hooks}
 %
 % \subsubsection{The data structures of a hook}
@@ -3442,7 +3455,12 @@
   }
 \tl_const:cn { c_@@_generic_env/./begin_tl } { + }
 \tl_const:cn { c_@@_generic_env/./end_tl   } { + }
+%    \end{macrocode}
+%
+% \changes{v1.0t}{2022/04/01}{Support generic \texttt{include/.../excluded} hooks}
+%    \begin{macrocode}
 \tl_const:cn { c_@@_generic_include/./end_tl } { - }
+\tl_const:cn { c_@@_generic_include/./excluded_tl } { + }
 %    \end{macrocode}
 %
 %   Deprecated generic hooks:
@@ -3608,6 +3626,11 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}{\@@_gset_rule:nnnn}
+%<latexrelease>                 {Refuse~setting~rule~for~one-time~hooks}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \cs_new_protected:Npn \@@_gset_rule:nnnn #1#2#3#4
   {
     \@@_if_deprecated_generic:nT {#1}
@@ -3615,8 +3638,14 @@
         \@@_deprecated_generic_warn:n {#1}
         \@@_do_deprecated_generic:Nn \@@_gset_rule:nnnn {#1}
           {#2} {#3} {#4}
-        \exp_after:wN \use_none:nnnnnnnnn \use_none:n
+        \@@_clean_to_scan:w
       }
+    \@@_if_execute_immediately:nT {#1}
+      {
+        \msg_error:nnnnnn { hooks } { rule-too-late }
+          {#1} {#2} {#3} {#4}
+        \@@_clean_to_scan:w
+      }
 %    \end{macrocode}
 %    First we ensure the basic data structure of the hook exists:
 %    \begin{macrocode}
@@ -3634,10 +3663,41 @@
           {#1} {#2} {#4}
         \@@_update_hook_code:n {#1}
       }
-      { \msg_error:nnnnnn { hooks } { unknown-rule }
-                          {#1} {#2} {#3} {#4}        }
+      {
+        \msg_error:nnnnnn { hooks } { unknown-rule }
+          {#1} {#2} {#3} {#4}
+      }
+    \s_@@_mark
   }
 %    \end{macrocode}
+%
+%    \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/10/01}{\@@_gset_rule:nnnn}
+%<latexrelease>                 {Refuse~setting~rule~for~one-time~hooks}
+%<latexrelease>\cs_new_protected:Npn \@@_gset_rule:nnnn #1#2#3#4
+%<latexrelease>  {
+%<latexrelease>    \@@_if_deprecated_generic:nT {#1}
+%<latexrelease>      {
+%<latexrelease>        \@@_deprecated_generic_warn:n {#1}
+%<latexrelease>        \@@_do_deprecated_generic:Nn \@@_gset_rule:nnnn {#1}
+%<latexrelease>          {#2} {#3} {#4}
+%<latexrelease>        \exp_after:wN \use_none:nnnnnnnnn \use_none:n
+%<latexrelease>      }
+%<latexrelease>    \@@_init_structure:n {#1}
+%<latexrelease>    \@@_rule_gclear:nnn {#1} {#2} {#4}
+%<latexrelease>    \cs_if_exist_use:cTF { @@_rule_#3_gset:nnn }
+%<latexrelease>      {
+%<latexrelease>          {#1} {#2} {#4}
+%<latexrelease>        \@@_update_hook_code:n {#1}
+%<latexrelease>      }
+%<latexrelease>      {
+%<latexrelease>        \msg_error:nnnnnn { hooks } { unknown-rule }
+%<latexrelease>          {#1} {#2} {#3} {#4}
+%<latexrelease>      }
+%<latexrelease>  }
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 %
@@ -3815,7 +3875,6 @@
 %  \end{macro}
 %
 %
-%
 %  \begin{macro}{\@@_initialize_hook_code:n}
 %    Initializing or reinitializing the fast execution hook code. In
 %    the preamble this is selectively done in case a hook gets used
@@ -3824,8 +3883,8 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_initialize_hook_code:n #1
   {
-    \@@_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
-                                    '#1' \on at line :^^J} }
+    \@@_debug:n
+      { \iow_term:x { ^^J Update~code~for~hook~'#1' \on at line :^^J } }
 %    \end{macrocode}
 %    This does the sorting and the updates.
 %    First thing we do is to check if a legacy hook macro exists and
@@ -3843,6 +3902,7 @@
 %    \cs{@@_initialize_single:NNn} and pass to it ready made csnames
 %    as they are needed several times inside. This way we save a bit
 %    on processing time if we do that up front.
+% \changes{v1.0u}{2022/05/17}{Refuse sorting one-time hooks (gh/818).}
 %    \begin{macrocode}
     \@@_if_usable:nT {#1}
       {
@@ -3857,7 +3917,7 @@
           {
 %    \end{macrocode}
 %    By default the algorithm sorts the code chunks and then saves the
-%    result in a token list for fast execution; this is done by adding the code chunks 
+%    result in a token list for fast execution; this is done by adding the code chunks
 %    one after another, using \cs{tl_gput_right:NV}. When we sort code for
 %    a reversed hook, all we have to do is to add the code chunks in
 %    the opposite order into the token list. So all we have to do
@@ -3886,8 +3946,8 @@
 %    i.e., we are only interested in storing the keys and the value is
 %    arbitrary.
 %    \begin{macrocode}
-            \@@_debug:n{ \exp_args:NNx \prop_gput:Nnn
-                                       \g_@@_used_prop {#1}{} }
+            \@@_debug:n
+              { \exp_args:NNx \prop_gput:Nnn \g_@@_used_prop {#1} { } }
           }
       }
   }
@@ -4304,16 +4364,17 @@
 %     \@@_apply_-rule_>:nnn,
 %     \@@_apply_-rule_<-:nnn,
 %     \@@_apply_-rule_->:nnn,
-%     \@@_apply_-rule_x:nnn,
+%     \@@_apply_-rule_xW:nnn,
+%     \@@_apply_-rule_xE:nnn,
 %   }
 %   Reversed rules.
 %    \begin{macrocode}
-\cs_new_eq:cc { @@_apply_-rule_<:nnn  } { @@_apply_rule_>:nnn }
-\cs_new_eq:cc { @@_apply_-rule_>:nnn  } { @@_apply_rule_<:nnn }
+\cs_new_eq:cc { @@_apply_-rule_<:nnn } { @@_apply_rule_>:nnn }
+\cs_new_eq:cc { @@_apply_-rule_>:nnn } { @@_apply_rule_<:nnn }
 \cs_new_eq:cc { @@_apply_-rule_<-:nnn } { @@_apply_rule_<-:nnn }
 \cs_new_eq:cc { @@_apply_-rule_->:nnn } { @@_apply_rule_->:nnn }
-\cs_new_eq:cc { @@_apply_-rule_xE:nnn  } { @@_apply_rule_xE:nnn }
-\cs_new_eq:cc { @@_apply_-rule_xW:nnn  } { @@_apply_rule_xW:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xE:nnn } { @@_apply_rule_xE:nnn }
+\cs_new_eq:cc { @@_apply_-rule_xW:nnn } { @@_apply_rule_xW:nnn }
 %    \end{macrocode}
 % \end{macro}
 %
@@ -4831,6 +4892,7 @@
 %   clears the hook so that any further call to \cs{hook_use:n} or
 %   \cs{hook_use_once:n} will expand to nothing.
 % \changes{v1.0r}{2021/09/06}{Clean up after \cs{UseOneTimeHook} (gh/606)}
+% \changes{v1.0u}{2022/05/13}{Check if prop exists to avoid l3debug error}
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_use_once_set:n #1
   { \@@_tl_gset:cn { g_@@_#1_reversed_tl } { I } }
@@ -4839,7 +4901,7 @@
     \@@_tl_gclear:c { @@~#1 }
     \@@_tl_gclear:c { @@_next~#1 }
     \@@_tl_gclear:c { @@_toplevel~#1 }
-    \prop_gclear:c { g_@@_#1_code_prop }
+    \prop_gclear_new:c { g_@@_#1_code_prop }
   }
 %    \end{macrocode}
 % \end{macro}
@@ -4856,7 +4918,7 @@
 %   empty.
 % \changes{v1.0r}{2021/09/06}{Macro added (gh/606)}
 %    \begin{macrocode}
-\prg_new_conditional:Npnn \@@_if_execute_immediately:n #1 { F, TF }
+\prg_new_conditional:Npnn \@@_if_execute_immediately:n #1 { T, F, TF }
   {
     \@@_if_usable:nTF {#1}
       {
@@ -5097,7 +5159,8 @@
 %
 %    \begin{macrocode}
 \msg_new:nnnn { hooks } { unknown-rule }
-  { Unknown~ relationship~ '#3'~
+  {
+    Unknown~ relationship~ '#3'~
     between~ labels~ '#2'~ and~ '#4'~
     \str_if_eq:nnF {#1} {??} { ~in~hook~'#1' }. ~
     Perhaps~ a~ misspelling?
@@ -5114,6 +5177,22 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\msg_new:nnnn { hooks } { rule-too-late }
+  {
+    Sorting~rule~for~'#1'~hook~applied~too~late.\\
+    Try~setting~this~rule~earlier.
+  }
+  {
+    You~tried~to~set~the~ordering~of~hook~'#1'~using\\
+    \ \ \iow_char:N\\DeclareHookRule{#1}{#2}{#3}{#4}\\
+    but~hook~'#1'~was~already~used~as~a~one-time~hook,~
+    thus~sorting~is\\
+    no~longer~possible.~Declare~the~rule~
+    before~the~hook~is~used.
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \msg_new:nnnn { hooks } { misused-top-level }
   {
     Illegal~use~of~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltkeys.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltkeys.dtx}
-             [2022/02/21 v1.0e LaTeX Kernel (Kevyal options)]
+             [2022/02/21 v1.0f LaTeX Kernel (Kevyal options)]
 % \iffalse
 \documentclass{l3doc}
 \GetFileInfo{ltkeys.dtx}
@@ -99,8 +99,8 @@
 %   \texttt{second-name} can be given anywhere, and will save its value in
 %   \cs{@mypkg at other@name}.
 %
-%   Keys created \emph{before} the use of
-%   \cs{ProcessKeyOptions}/\cs{ProcessKeyPackageOptions} act as package options.
+%   Keys created \emph{before} the use of \cs{ProcessKeyOptions}act as
+%   package options.
 % \end{function}
 %
 % \begin{function}{\DeclareUnknownKeyHandler}
@@ -124,17 +124,6 @@
 %   is called in a package.
 % \end{function}
 %
-% \begin{function}{\ProcessKeyPackageOptions}
-%   \begin{syntax}
-%     \cs{ProcessKeyPackageOptions} \oarg{family}
-%   \end{syntax}
-%   This function works in a similar manner to \cs{ProcessKeyOptions}.
-%   When used in a package, \cs{ProcessKeyPackageOptions}
-%   will not examine any global (class) class options available. In contrast,
-%   \cs{ProcessKeyOptions} does parse class options (in common with the
-%   classical \cs{ProcessOptions} command).
-% \end{function}
-%
 % \begin{function}{\SetKeys}
 %   \begin{syntax}
 %     \cs{SetKeys} \oarg{family} \Arg{keyvals}
@@ -142,7 +131,7 @@
 %   Sets (applies) the explicit list of \meta{keyvals}  for the \meta{family}:
 %   it the latter is not given, the value of \cs{@currname} used. This command
 %   may be used within a package to set options before or after using
-%   \cs{ProcessKeyOptions}/\cs{ProcessKeyPackageOptions}.
+%   \cs{ProcessKeyOptions}.
 % \end{function}
 %
 % \StopEventually{}
@@ -211,8 +200,9 @@
 %    \end{macrocode}
 % \end{variable}
 %
-% \begin{macro}{\@@_options:Nn}
-% \begin{macro}{\@@_options:nN}
+% \begin{macro}{\@@_options:n}
+% \changes{v1.0f}{2022/03/18}{Simplify to always cover global options}
+% \begin{macro}{\@@_options_aux:n}
 % \changes{v1.0b}{2022/01/15}
 %         {Clear option list in end-of-package hook}
 % \begin{macro}{\@@_options_end:}
@@ -226,14 +216,14 @@
 %   with the key family not matching the file name, we store the family
 %   in all cases.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_options:Nn #1#2
-  { \@@_options_expand_module:Nn \@@_options:nN {#2} #1 }
-\cs_new_protected:Npn \@@_options:nN #1#2
+\cs_new_protected:Npn \@@_options:n #1
+  { \@@_options_expand_module:Nn \@@_options_aux:n {#1} }
+\cs_new_protected:Npn \@@_options_aux:n #1
   {
     \cs_gset_nopar:cpn { opt at fam@\@currname.\@currext } {#1}
     \cs_set_protected:Npn \@@_option_end: { }
     \clist_clear:N \l_@@_options_clist
-    \@@_options_global:Nn #2 {#1}
+    \@@_options_global:n {#1}
     \@@_options_local:
     \keys_if_exist:nnF {#1} { unknown }
       {
@@ -266,7 +256,8 @@
 % \end{macro}
 % \end{macro}
 %
-% \begin{macro}{\@@_options_global:Nn}
+% \begin{macro}{\@@_options_global:n}
+% \changes{v1.0f}{2022/03/18}{Simplify to always cover global options}
 %   Global (class) options are handled differently for \LaTeXe{} packages
 %   and classes. Hence this function is essentially a check on the current
 %  file type. The initial test is needed as \LaTeXe{} allows variables to
@@ -273,16 +264,13 @@
 %   be equal to \cs{scan_stop:}, which is usually forbidden in \pkg{expl3}
 %   code.
 %    \begin{macrocode}
-\cs_new_protected:Npn \@@_options_global:Nn #1#2
+\cs_new_protected:Npn \@@_options_global:n #1
   {
     \cs_if_eq:NNF \@classoptionslist \scan_stop:
       {
         \cs_if_eq:NNTF \@currext \@clsextension
-          { \@@_options_class:n {#2} }
-          {
-            \bool_if:NT #1
-             { \@@_options_package:n {#2} }
-          }
+          { \@@_options_class:n {#1} }
+          { \@@_options_package:n {#1} }
       }
   }
 %    \end{macrocode}
@@ -427,9 +415,10 @@
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}{\ProcessKeyOptions, \ProcessKeyPackageOptions}
+% \begin{macro}{\ProcessKeyOptions}
 % \changes{v1.0c}{2022/02/15}{Expand module argument}
 % \changes{v1.0d}{2022/02/16}{Allow for active characters in module argument}
+% \changes{v1.0f}{2022/03/18}{Remove \cs{ProcessKeyPackageOptions}}
 %   We need to deal with the older interface from \pkg{l3keys2e} here: it had
 %   a mandatory argument. We can mop that up using a look-ahead, and then
 %   exploit that information to determine whether the package option handling
@@ -436,11 +425,8 @@
 %   is set up for the new approach for clash handling.
 %    \begin{macrocode}
 \NewDocumentCommand \ProcessKeyOptions { O { \@currname } }
-  { \@@_options:Nn \c_true_bool {#1} }
-\NewDocumentCommand \ProcessKeyPackageOptions { O { \@currname } }
-  { \@@_options:Nn \c_false_bool {#1} }
+  { \@@_options:n {#1} }
 \@onlypreamble \ProcessKeyOptions
-\@onlypreamble \ProcessKeyPackageOptions
 %    \end{macrocode}
 % \end{macro}
 %

Added: trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -0,0 +1,1602 @@
+% \iffalse meta-comment
+%
+%% File: ltmarks.dtx (C) Copyright 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: ltmarks.dtx
+%
+%    \begin{macrocode}
+\def\ltmarksversion{v1.0c}
+\def\ltmarksdate{2022/05/06}
+%    \end{macrocode}
+%<*driver>
+\documentclass{l3doc}
+
+%\usepackage{ltmarks}
+
+% 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{ltmarks.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+% \providecommand\hook[1]{\texttt{#1}}
+% \providecommand\env[1]{\texttt{#1}}
+%
+%
+%
+% \title{The \texttt{ltmarks.dtx} code\thanks{This file has version
+%    \ltmarksversion\ dated \ltmarksdate, \copyright\ \LaTeX\
+%    Project.}}
+% \author{^^A
+%  Frank Mittelbach, \LaTeX{} Project\thanks
+%    {^^A
+%      E-mail:
+%        \href{mailto:latex-team at latex-project.org}
+%          {latex-team at latex-project.org}^^A
+%    }^^A
+% }
+%
+% \maketitle
+%
+%
+% \begin{abstract}
+%    Marks are used to communicate information about the content of a
+%    page to the output routine. For example, in order to construct
+%    running headers, the output routine needs information about which
+%    section names are present on a page, and this information is
+%    passed to it through the mark system. However, marks may also be
+%    used for other purposes. This module provides a generalized
+%    mechanism for marks of independent classes.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% ^^A \begin{documentation}
+%
+% \section{Introduction}
+%
+%    The \TeX{} engines offer a low-level mark mechanism to
+%    communicate information about the content of the current page to
+%    the asynchronous operating output routine. It works by placing
+%    \cs{mark} commands into the source document. When the material
+%    for the current page is assembled in box 255, \TeX{} scans for
+%    such marks and sets the commands \cs{topmark}, \cs{firstmark} and
+%    \cs{botmark}.  The \cs{firstmark} receives the content of the
+%    first \cs{mark} seen in box 255 and \cs{botmark} the content of
+%    the last mark seen.  The \cs{topmark} holds the content of the
+%    last mark seen on the previous page or more exactly the value of
+%    \cs{botmark} from the previous page.  If there are no marks on
+%    the current page then all three are made equal to the
+%    \cs{botmark} from the previous page.
+%
+%    This mechanism works well for simple formats (such as plain \TeX)
+%    whose output routines are only called to generate pages. It
+%    fails, however, in \LaTeX{} (and other more complex formats),
+%    because here the output routine is sometimes called without
+%    producing a page, e.g., when encountering a float and placing it
+%    into one of the float regions. In that case the output routine is
+%    called, determines where to place the float, alters the goal for
+%    assembling text material (if the float was added to the top or
+%    bottom region) and then it resumes collecting textual material.
+%
+%    As a result the \cs{botmark} gets updated and so \cs{topmark} no
+%    longer reflects the situation at the top of the next page when that
+%    page is finally boxed.
+%
+%    Another problem for \LaTeX{} was that it wanted to use several
+%    \enquote{independent} marks and in the early implementations of
+%    \TeX{} there was only a single \cs{mark} command available.
+%    For that reason \LaTeX{} implemented its own mark
+%    mechanism where the marks always contained two parts with their
+%    own interfaces: \cs{markboth} and \cs{markright} to set marks and
+%    \cs{leftmark} and \cs{rightmark} to retrieve them.
+%
+%    However, this extended mechanism (while supporting scenarios such
+%    as chapter/section marks) was far from general. The mark
+%    situation at the top of a page (i.e., \cs{topmark}) remained
+%    unusable and the two marks offered were not really independent of
+%    each other because \cs{markboth} (as the name indicates) was
+%    always setting both.
+%
+%    The new mechanism overcomes both
+%    issues:
+%    \begin{itemize}
+%    \item
+%      It provides arbitrarily many, fully independent named marks, that
+%      can be allocated and, from that point onwards, used.
+%    \item
+%      It offers access for each such marks to retrieve its top,
+%      first, and bottom values separately.
+%    \item
+%      Furthermore, the mechanism is augmented to give access to marks
+%      in different \enquote{regions} which may not be just full pages.
+%    \end{itemize}
+%
+%
+% \section{Design-level and code-level interfaces}
+%
+%    The interfaces are mainly meant for package developers, but they
+%    are usable (with appropriate care) also in the document
+%    preamble, for example, when setting up special running headers
+%    with \pkg{fancyhdr}, etc. They are therefore available both as
+%    CamelCase commands as well as commands for use in the L3
+%    programming layer. Both are described together below.
+%
+% \begin{function}{\NewMarkClass,\mark_new_class:n}
+%   \begin{syntax}
+%     \cs{NewMarkClass} \Arg{class}
+%     \cs{mark_new_class:n} \Arg{class}
+%   \end{syntax}
+%   Declares a new \meta{class} of marks to be tracked by \LaTeX{}. Each \meta{class}
+%   must be declared before it is used.
+%
+%   Mark classes can only be declared before \verb=\begin{document}=.
+% \end{function}
+%
+% \begin{function}{\InsertMark,\mark_insert:nn}
+%   \begin{syntax}
+%     \cs{InsertMark} \Arg{class} \Arg{text}
+%     \cs{mark_insert:nn}  \Arg{class} \Arg{text}
+%   \end{syntax}
+%   Adds a mark to the current galley for the \meta{class}, containing the
+%   \meta{text}.
+%
+%   It has no effect in places in which you can't place floats, e.g.,
+%   a mark inside a box or inside a footnote never shows up anywhere.
+%
+%   If used in vertical mode it obeys \LaTeX's internal
+%   \cs{@nobreak} switch, i.e., it does not introduce a
+%   breakpoint if used after a heading. If used in horizontal mode it
+%   doesn't handle spacing (like, for example, \cs{index} or
+%   \cs{label} does, so it should be attached to material that is
+%   typeset.
+% \end{function}
+%
+% \begin{variable}{insertmark}
+%   \begin{syntax}
+%     \cs{AddToHook} \texttt{\{insertmark\}} \Arg{code}
+%   \end{syntax}
+%  When marks are inserted, the mark content may need some special
+%  treatment, e.g., by default \cs{label}, \cs{index}, and
+%  \cs{glossary} do not expand at this time (but only later if and when the
+%  mark content is actually used.
+%  In order to allow packages to augment or alter this setup there is
+%  a public hook \hook{insertmark} that is executed at this point.  It
+%  runs in a group so local modification to commands are only applied
+%  to the \meta{text} argument of \cs{InsertMark} or \cs{mark_insert:nn}.
+% \end{variable}
+%
+% \begin{function}[EXP]{\TopMark, \FirstMark, \LastMark,
+%      \mark_use_top:nn,\mark_use_first:nn,\mark_use_last:nn,}
+%   \begin{syntax}
+%     \cs{TopMark}   \oarg{region} \Arg{class}
+%     \cs{FirstMark} \oarg{region} \Arg{class}
+%     \cs{LastMark}  \oarg{region} \Arg{class}
+%     \cs{mark_use_top:nn}   \Arg{region} \Arg{class}
+%     \cs{mark_use_first:nn} \Arg{region} \Arg{class}
+%     \cs{mark_use_last:nn}  \Arg{region} \Arg{class}
+%   \end{syntax}
+%   These functions expand to the appropriate mark \meta{text} for
+%   the given \meta{class} in the specified \meta{region}.
+%   The default \meta{region} in the design-level commands is \texttt{page}.
+%   Note that with the L3 layer commands there are no
+%   optional arguments, i.e., both arguments have to be provided.
+%   \begin{texnote}
+%     The result is returned within the \tn{unexpanded}
+%     primitive (\cs{exp_not:n}), which means that the \meta{text}
+%     does not expand further when appearing in an \texttt{x}-type
+%     or \texttt{e}-type argument expansion.
+%   \end{texnote}
+%
+%   The \enquote{first} and \enquote{last} marks are
+%   those seen first and last in the current region/page, respectively. The
+%   \enquote{top} mark is the last mark of the \meta{class} seen
+%   in an earlier region, i.e., the \meta{text} what would be \enquote{current} at the
+%   very top of the region.
+%
+%   \noindent\llap{\bfseries Important!\qquad}\indent
+%   The commands are only meaningful inside the output routine, in
+%   other places their result is (while not random) unpredictable due
+%   to the way \LaTeX{} cuts text material into pages.
+%% \end{function}
+%
+%
+%
+%   Currently, \meta{region} is one of
+%   \texttt{page},
+%   \texttt{previous-page},
+%   \texttt{column}, and
+%   \texttt{previous-column}.
+%   If a page has just been finished then the region \texttt{page}
+%   refers to the current page and \texttt{previous-page}, as the name
+%   indicates, to the page that has been finished previously. This
+%   means you are able to access mark information for the current page
+%   as well as for the page before if you are inside the output
+%   routine, without the need to explicitly save that information
+%   beforehand.
+%
+%   In single column documents the \texttt{column} is the same as the
+%   \texttt{page} region, but in two-column documents, \texttt{column}
+%   refers to the current column that just got finished and
+%   \text{previous-column} to the one previously finished.  Code for
+%   running headers are (in standard \LaTeX{}) only evaluated when
+%   both columns are assembled, which is another way of saying that in
+%   that case \texttt{previous-column} refers to the left column and
+%   \texttt{column} to the right column.
+%   However, to make this a bit nicer to access, there are also alias
+%   regions named \texttt{first-column} and
+%   \texttt{last-column}\footnote{This is called \enquote{last} not \enquote{second}
+%   in anticipation of extending the mechanism to multiple columns,
+%   where first and last would still make sense.} to
+%   access these regions.\footnote{At the moment there aren't any
+%   \texttt{previous-...-column} regions to access the columns from
+%   the previous page. If necessary, the mechanism could be
+%   easily augmented to cover them too, though.}
+%
+%   Note that you can only look backwards at already processed regions,
+%   e.g., in a \texttt{twoside} document finishing a recto (odd,
+%   right-hand) page  you can access the data from the facing verso
+%   (left-hand) page, but if you are finishing a left-hand page you
+%   can't integrate data from the upcoming right-hand page. If such a
+%   scenario needs to be realized then it is necessary to save the
+%   left-hand page temporarily instead of finalizing it, process
+%   material for the right-hand page and once both are ready, attach
+%   running headers and footers and shipout out both in one
+%   go.\footnote{As of now that scenario is not yet officially supported.}
+%
+% \begin{function}[EXP]{\IfMarksEqualTF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
+%   \begin{syntax}
+%     \cs{IfMarksEqualTF}    \oarg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
+%     \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
+%     \cs{mark_if_eq:nnnnnnTF} \Arg{region_1} \Arg{class_1} \Arg{pos_1}
+%  \verb=                    = \Arg{region_2} \Arg{class_2} \Arg{pos_2} \Arg{true} \Arg{false}
+%   \end{syntax}
+%   These conditionals allow you to compare the content of two marks
+%   and act based on the result. The commands work in an expansion
+%   context, if necessary.
+% \end{function}
+%
+%    It is quite common when programming with marks to need to
+%    interrogate conditions such as whether marks have appeared on a
+%    previous page, or if there are multiple marks present on the
+%    current page, and so on.
+%    The tests above allow for the construction of a variety of
+%    typical test scenarios, with three examples presented below.
+%
+%    The first two conditionals cover only the common scenarios.  Both
+%    marks are picked up from the same \meta{region} (by default
+%    \texttt{page}) and they have to be of the same
+%    \meta{class}.\footnote{If an undeclared mark class is used the
+%    tests return \emph{true} (not an error).}
+%    The \meta{pos\textsubscript{\itshape i}} argument can be either
+%    \texttt{top}, \texttt{first}, or \texttt{last}.
+%
+%    If you wish to compare marks across different regions or across
+%    different classes, you have to do it using the generic test only
+%    available in the L3 programming layer or do it manually, i.e.,
+%    get the marks and then compare the values yourself.\footnote{If
+%    two undeclared mark classes are compared the result is always
+%    \emph{true}; if a declared and an undeclared mark class is used
+%    it is always \emph{false}.}
+%
+%   However, the basic version is enough for the following typical use cases:
+%   \begin{description}
+%   \item[Test for at most one mark of class \texttt{myclass} on current
+%      page:]
+%
+%      If the first and last mark in a region are the same then
+%      either there was no mark at all, or there was at most one. To test
+%      this on the current page:
+%\begin{verbatim}
+%  \NewMarkClass{myclass}
+%  \IfMarksEqualTF{myclass}{first}{last}
+%                 { <zero or one mark> }{ <two or more marks> }
+%\end{verbatim}
+%
+%   \item[Test for no mark of class \texttt{myclass} in the previous
+%      page:]
+%
+%      If the top mark is the same as the first mark, there is no mark
+%      in the region at all. If we wanted to do this test for the
+%      previous page:
+%\begin{verbatim}
+%  \IfMarksEqualTF[previous-page]{myclass}{top}{first}
+%                 { <no marks> }{ <at least one mark> }
+%\end{verbatim}
+%      Comparing \texttt{top} and \texttt{last} would give you the
+%      same result.
+%
+%   \item[Test for zero, one, or more than one:]
+%
+%      Combining the two tests from above you can test for zero, one
+%      or more than one mark.
+%\begin{verbatim}
+%  \IfMarksEqualTF{myclass}{top}{first}
+%                 { <no marks> }
+%                 {\IfMarksEqualTF{myclass}{first}{last}
+%                   { <exactly one mark> }{ <more than one mark> }}
+%\end{verbatim}
+%
+% \end{description}
+%
+% If  you need one of such tests more often (or if you want a separate
+% command for it for readability), then consider defining:
+%\begin{verbatim}
+%  \providecommand\IfNoMarkTF[2][page]{\IfMarksEqualTF[#1]{#2}{first}{last}}
+%\end{verbatim}
+%
+%
+%
+% \subsection{Debugging mark code}
+%
+%
+% \begin{function}{\DebugMarksOn,\DebugMarksOff,
+%                  \mark_debug_on:,\mark_debug_off:}
+%   \begin{syntax}
+%     \cs{DebugMarksOn} ...  \cs{DebugMarksOff}
+%   \end{syntax}
+%
+%    Commands to turn the debugging of mark code on or off. The
+%    debugging output is rather coarse and not really intended for
+%    normal use at this point in time.
+%
+% \end{function}
+%
+%
+%
+% \section{Application examples}
+%
+% If you want to figure out if a break was taken at a specific point,
+% e.g., whether a heading appears at the top of the page,
+% you can do something like this:
+%\begin{verbatim}
+% \newcounter{breakcounter}
+% \NewMarkClass{break}
+% \newcommand\markedbreak[1]{\stepcounter{breakcounter}%
+%                            \InsertMark{break}{\arabic{breakcounter}%
+%                            \penalty #1\relax
+%                            \InsertMark{break}{-\arabic{breakcounter}}
+%\end{verbatim}
+% To test if the break was taken you can test if
+% \verb=\TopMark{break}= is positive (taken) or negative (not taken)
+% or zero (there was never any marked break so far).
+%  The absolute value can be used to keep track of which break it
+% was (with some further coding).
+%
+%
+% \emph{to be extended with additional application examples}
+%
+%
+%
+% \section{Legacy \LaTeXe{} interface}
+%
+%  Here we describe the interfaces that \LaTeXe{} offered since the
+%  early nineties and some minor extensions.
+%
+% \subsection{Legacy design-level and document-level interfaces}
+%
+% \begin{function}{\markboth, \markright}
+%   \begin{syntax}
+%     \cs{markboth}   \Arg{left} \Arg{right}
+%     \cs{markright}  \Arg{right}
+%   \end{syntax}
+% \LaTeXe{} uses two marks which aren't fully independent. A
+%   \enquote{left} mark generated by the first argument of \cs{markboth}
+%   and a \enquote{right} mark generated by the second argument of
+%   \cs{markboth} or by the only argument of \cs{markright}. The
+%   command \cs{markboth} and \cs{markright} are in turn called from
+%   heading commands such as \cs{chaptermark} or \cs{sectionmark} and
+%   their behavior is controlled by the document class.
+%
+% For example, in the \cls{article} class with \texttt{twoside} in
+%   force the \cs{sectionmark} will issue \cs{markboth} with an empty
+%   second argument and \cs{subsectionmark} will issue
+%   \cs{markright}. As a result the left mark will contain chapter
+%   titles and the right mark subsection titles.
+%
+% Note, however, that in one-sided documents the standard behavior is
+%   that only \cs{markright} is used, i.e., there will only be
+%   right-marks but no left marks!
+% \end{function}
+%
+% \begin{function}[EXP]{\leftmark, \rightmark}
+%   \begin{syntax}
+%     \cs{leftmark}
+%     \cs{rightmark}
+%   \end{syntax}
+%   These functions return the appropriate mark value from the current page
+%   and work as before, that is \cs{leftmark} will get the last (!)
+%   left mark from the page and \cs{rightmark} the first (!) right
+%   mark.
+%
+%   In other words they work reasonably well if you want to show the
+%   section title that is current when you are about to turn the page and
+%   also show the first subsection title on the current page (or the last
+%   from the previous page if there wasn't one). Other combinations
+%   can't be shown using this interface.
+%
+%   The commands are fully expandable, because this is how they have
+%   been always defined in \LaTeX{}. However, this is of course
+%   only true if the content of the mark they return is itself
+%   expandable and does not contain any fragile material. Given that
+%   this can't be guaranteed for arbitrary content, a programmer using
+%   them in this way should use \cs{protected at edef} and \emph{not}
+%   \cs{edef} to avoid bad surprises as far as this is possible, or use
+%   the new interfaces (\cs{TopMark}, \cs{FirstMark}, and \cs{LastMark})
+%   which return the \meta{text} in \cs{exp_not:n} to prevent
+%   uncontrolled expansion.
+% \end{function}
+%
+%
+% \subsection{Legacy interface extensions}
+%
+%   The new implementation adds three mark classes: \texttt{2e-left},
+%   \texttt{2e-right} and \texttt{2e-right-nonempty} and patches
+%   \cs{markboth} and \cs{markright} slightly so that they also update
+%   these new mark classes, so that the new classes work with existing
+%   document classes.
+%
+%   As a result you can use \verb=\LastMark{2e-left}= and
+%   \verb=\FirstMark{2e-right}= instead of \cs{leftmark} and
+%   \cs{rightmark}. But more importantly, you can use any of the other
+%   retrieval commands to get a different status value from those
+%   marks, e.g., \verb=\LastMark{2e-right}= would return the last
+%   subsection on the page (instead of the first as
+%   returned by \cs{rightmark}).
+%
+%   The difference between \texttt{2e-right} and
+%   \texttt{2e-right-nonempty}  is that the latter will only be updated
+%   if the material for the mark is not empty. Thus
+%   \verb=\markboth{title}{}= as issued by, say, \cs{sectionmark},
+%   sets a \texttt{2e-left} mark with \texttt{title} and a
+%   \texttt{2e-right} mark with the empty string but does not add a
+%   \texttt{2e-right-nonempty} mark.
+%
+%   Thus, if you have a section at the start of a page and you would
+%   ask for \verb=\FirstMark{2e-right}= you would get an empty string
+%   even if there are subsections on that page. But
+%   \texttt{2e-right-nonempty} would then give you the first or last subsection
+%   on that page. Of course, nothing is simple. If there are no
+%   subsections it would tell you the last subsection from an earlier
+%   page. We therefore need comparison tools, e.g., if top and
+%   first are identical you know that the value is
+%   bogus, i.e., a suitable implementation would be
+%\begin{verbatim}
+% \IfMarksEqualTF{2e-right-nonempty}{top}{first}
+%                { <appropriate action if there was no real mark> }
+%                {\FirstMark{2e-right-nonempty}}
+%\end{verbatim}
+%
+%
+%
+% \section{Notes on the mechanism}
+%
+% In contrast to vanilla \TeX, \eTeX{} extends the mark system to
+% allow multiple independent marks. However, it does not solve the
+% \cs{topmark} problem which means that \LaTeX{} still needs to manage
+% marks almost independently of \TeX{}. The reason for this is that
+% the more complex output routine used by \LaTeX{} to handle floats
+% (and related structures) means that \tn{topmark(s)} remain
+% unreliable. Each time the output routine is fired up, \TeX{} moves
+% \tn{botmark} to \tn{topmark}, and while \eTeX{} extends this to
+% multiple registers the fundamental concept remains the same. That
+% means that the state of marks needs to be tracked by \LaTeX{}
+% itself. An early implementation of this package used \TeX{}'s
+% \tn{botmark} only to ensure the correct interaction with the output
+% routine (this was before the \eTeX{} mechanism was even
+% available). However, other than in a prototype implementation for
+% \LaTeX3, this package was never made public.
+%
+% The new implementation now uses \eTeX{}'s marks as they have some
+% advantages, because with them we can leave the mark text within the
+% galley and only extract the marks during the output routine when we
+% are finally shipping out a page or storing away a column for use in
+% the next page. That means we do not have to maintain a global data
+% structure that we have to keep in sync with informational marks in
+% the galley but can rely on everything being in one place and thus
+% manipulations (e.g.~reordering of material) will take the marks with
+% them without a need for updating a fragile linkage.
+
+% To allow for completely independent marks we use the following
+% procedure:
+% \begin{itemize}
+%   \item
+%
+%     For every type of marks we allocate a mark class so
+%     that in the output routine \TeX{} can calculate for each class
+%     the current
+%     top, first, and bottom mark independently. For this we use
+%     \cs{newmarks}, i.e., one marks register per class.
+%
+%   \item
+%
+%     As already mentioned firing up an output routine without
+%     shipping out a page means that \TeX's top marks get wrong so it
+%     is impossible to rely on \TeX's approach directly. What we do
+%     instead is to keep track of the real marks (for the last page or
+%     more generally last region) in some global variables.
+%
+%   \item
+%
+%     These variables are updated in the output routine at defined
+%     places, i.e., when we do real output processing but not if we
+%     use special output routines to do internal housekeeping.
+%
+%   \item
+%
+%     The trick we use to get correctly updated variables is the
+%     following: the material that contains new marks (for example the
+%     page to be shipped out) is stored in a box. We then use \TeX{}
+%     primitive box splitting functions by splitting off the largest
+%     amount possible (which should be the whole box if nothing goes
+%     really wrong). While that seems a rather pointless thing to do, it
+%     has one important side effect: \TeX{} sets up first and bottom
+%     marks for each mark class from the material it has split off. This
+%     way we get the first and last marks (if there have been any) from
+%     the material in the box.
+%
+%   \item
+%
+%     The top marks are simply the last marks from the previous
+%     page or region. And if there hasn't been a first or bottom mark in
+%     the box then the new top mark also becomes new first and last mark
+%     for that class.
+%
+%   \item
+%
+%     That mark data is then stored in global token lists for use
+%     during the output routine and legacy commands such as
+%     \cs{leftmark} or new commands such as \cs{TopMark} simply access
+%     the data stored in these token lists.
+%  \end{itemize}
+%  That's about it in a nutshell. Of course, there are some details to
+%  be taken care of---those are discussed in the implementation sections.
+%
+%
+% \section{Internal output routine functions}
+%
+% The functions in this section are tied to the output routine and used in the
+% interface to \LaTeXe{} and perhaps at some later time within a new
+% output routine
+% for \LaTeX. They are not meant for general use and are therefore made internal.
+% Internal means that \verb|@@| automatically gets
+% replaced in the code (and in the documentation) so we have to give
+% it a suitable value.
+%    \begin{macrocode}
+%<@@=mark>
+%    \end{macrocode}
+%
+% \begin{function}{\@@_update_singlecol_structures:}
+%   \begin{syntax}
+%     \cs{@@_update_singlecol_structures:}
+%   \end{syntax}
+%   \LaTeXe{} integration function in case we are doing single column
+%   layouts.  It assumes that the page content is already stored in
+%   \cs{@outputbox} and processes the marks inside that box. It is
+%   called as part of \cs{@opcol}.
+% \end{function}
+%
+%
+% \begin{function}{\@@_update_dblcol_structures:}
+%   \begin{syntax}
+%     \cs{@@_update_singlecol_structures:}
+%   \end{syntax}
+%   \LaTeXe{} integration function mark used when we are doing double
+%   column documents. It assumes that the page content is already
+%   stored in \cs{@outputbox} and processes the marks inside that
+%   box. It then does different post-processing depending on the start
+%   of the switch \cs{if at firstcolumn}. If we are in the second column
+%   it also has to update page marks, otherwise it only updates column
+%   marks. It too is called as part of \cs{@opcol}.
+% \end{function}
+%
+% \begin{function}{\@@_update_structure:nn}
+%   \begin{syntax}
+%     \cs{@@_update_structure:nn}  \Arg{region} \Arg{material with marks}
+%   \end{syntax}
+%   Helper function that inspects the marks
+%   inside the second argument and assigns new mark values based on
+%   that to the \meta{region} given in the first argument.
+%   For this it first copies the mark structure from \meta{region} to
+%   \texttt{previous-}\meta{region} and then takes all last mark
+%   values currently in the region and makes them the new top mark
+%   values. Finally it assigns new first and last values for all mark
+%   classes based on what was found in the second argument.
+%
+%   As a consequence, the allowed values for \meta{region} are
+%   \texttt{page} and \texttt{column} because only they have
+%   \texttt{previous-...} counterparts.
+%
+%   Another important part to keep in mind is that marks are only
+%   recognized if they appear on top-level, e.g., if we want to
+%   process material stored in boxes we need to put it unboxed (using
+%   \cs{unvcopy} etc.)\ into the second argument.
+% \end{function}
+%
+%
+%
+% \begin{function}{\@@_update_structure_alias:nn}
+%   \begin{syntax}
+%     \cs{@@_update_structure_alias:nn} \Arg{alias} \Arg{source}
+%   \end{syntax}
+%   Helper function that copies all mark values in the \meta{source}
+%   region to \meta{alias}, i.e., make the structures identical. Used
+%   to update the \texttt{previous-...} structures inside
+%   \cs{@@_update_structure:nn} and \texttt{first-column} and
+%   \texttt{last-column} structures inside
+%   \cs{@@_update_singlecol_structures:} or
+%   \cs{@@_update_dblcol_structures:}.
+% \end{function}
+%
+%
+%
+%
+% \begin{function}{\@@_update_structure_to_err:n}
+%   \begin{syntax}
+%     \cs{@@_update_structure_to_err:n} \Arg{region}
+%   \end{syntax}
+%   Helper function that sets all mark values in the \meta{region} to
+%   an error message. This is currently used for \texttt{last-column}
+%   at times where using marks from it would be questionable/wrong, i.e.,
+%   when we have just processed the first column in a two-column document.
+% \end{function}
+%
+%
+%
+% ^^A \end{documentation}
+%
+%
+%
+%
+%
+% \StopEventually{\setlength\IndexMin{200pt}  \PrintIndex  }
+%
+%
+% \section{The Implementation}
+%
+%
+%
+%    \begin{macrocode}
+%<*2ekernel|latexrelease>
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ExplSyntaxOn
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+%<latexrelease>\NewModuleRelease{2022/06/01}{ltmarks}
+%<latexrelease>                 {Marks~handling}
+%    \end{macrocode}
+%
+% \subsection{Allocating new mark classes}
+%
+%
+% \begin{variable}{\g_@@_classes_seq}
+%    A list holding all the mark classes that have been declared.
+%    \begin{macrocode}
+\seq_new:N \g_@@_classes_seq
+%    \end{macrocode}
+% \end{variable}
+%
+%
+%
+%
+% \begin{macro}{\mark_new_class:n,\@@_new_class:nn}
+%    A mark class is created by initializing a number of data
+%    structures.  First, we get a register number to refer to the mark class.
+%    The new mark class is then added to the \cs{g_@@_classes_seq}
+%    sequence to be able to easily loop over all classes.  Finally a
+%    number of top-level global token lists are declared that hold
+%    various versions of the mark for access.
+%    \begin{macrocode}
+\cs_new_protected:Npn \mark_new_class:n #1
+{
+  \seq_if_in:NnTF \g_@@_classes_seq {#1}
+      {
+        \msg_error:nnn { mark } { class-already-defined }
+          {#1}
+      }
+      { \@@_new_class:nn {#1} }
+}
+%    \end{macrocode}
+%    This is only available in the preamble.
+% \changes{v1.0c}{2022/05/06}{Wrong command made \cs{@onlypreamble}}
+%    \begin{macrocode}
+\@onlypreamble \mark_new_class:n
+%    \end{macrocode}
+%    The internal command carries out the necessary allocations.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_new_class:nn #1
+{
+%<*trace>
+  \@@_debug:n { \iow_term:x { Marks:~new~mark:~#1~\msg_line_context: } }
+%</trace>
+%    \end{macrocode}
+%    Use the \LaTeXe{} interface for now as the L3 programming layer
+%    doesn't have one for marks yet.
+%    \begin{macrocode}
+  \exp_args:Nc \newmarks {c_@@_class_ #1 _mark}
+%    \end{macrocode}
+%    Remember the new class in the sequence.
+%    \begin{macrocode}
+  \seq_gput_right:Nn \g_@@_classes_seq {#1}
+%    \end{macrocode}
+%    We need three token lists for each region, one for top, first,
+%    and last.
+%    \begin{macrocode}
+  \tl_new:c   { g_@@_page_top_   #1 _tl }
+  \tl_new:c   { g_@@_page_first_ #1 _tl }
+  \tl_new:c   { g_@@_page_last_  #1 _tl }
+%    \end{macrocode}
+%    For the \texttt{page} region we also keep track of the
+%    \texttt{previous-page}.
+%    \begin{macrocode}
+  \tl_new:c   { g_@@_previous-page_top_   #1 _tl }
+  \tl_new:c   { g_@@_previous-page_first_ #1 _tl }
+  \tl_new:c   { g_@@_previous-page_last_  #1 _tl }
+%    \end{macrocode}
+%    Same game for \texttt{column} and \texttt{previous-column}
+%    \begin{macrocode}
+  \tl_new:c   { g_@@_column_top_   #1 _tl }
+  \tl_new:c   { g_@@_column_first_ #1 _tl }
+  \tl_new:c   { g_@@_column_last_  #1 _tl }
+  \tl_new:c   { g_@@_previous-column_top_   #1 _tl }
+  \tl_new:c   { g_@@_previous-column_first_ #1 _tl }
+  \tl_new:c   { g_@@_previous-column_last_  #1 _tl }
+%    \end{macrocode}
+%    But for columns we also allocate token lists for the alias
+%    regions \texttt{first-column} and \texttt{last-column}.
+%    \begin{macrocode}
+  \tl_new:c   { g_@@_first-column_top_   #1 _tl }
+  \tl_new:c   { g_@@_first-column_first_ #1 _tl }
+  \tl_new:c   { g_@@_first-column_last_  #1 _tl }
+  \tl_new:c   { g_@@_last-column_top_    #1 _tl }
+  \tl_new:c   { g_@@_last-column_first_  #1 _tl }
+  \tl_new:c   { g_@@_last-column_last_   #1 _tl }
+}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Updating mark structures}
+%
+%
+%  \begin{macro}{\l_@@_box,\g_@@_tmp_tl,\g_@@_new_top_tl}
+%    For some operations we need a temporary private box and two
+%    private global token lists.
+%    \begin{macrocode}
+\box_new:N \l_@@_box
+\tl_new:N  \g_@@_tmp_tl
+\tl_new:N  \g_@@_new_top_tl
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%  \begin{macro}{\@@_update_structure:nn}
+%
+%    This function updates the mark structures. The first argument is
+%    the region to update and second argument receives the material
+%    that holds the marks. Out of this material we extract the first
+%    and last marks for all classes (if there are any) to do the
+%    assignments.
+%
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_update_structure:nn #1#2
+  {
+%    \end{macrocode}
+%    First thing we do is copying the current structure to
+%    \texttt{previous-...}; this leaves the current structure
+%    untouched so we can update it class by class (which is necessary).
+%    \begin{macrocode}
+    \@@_update_structure_alias:nn { previous-#1 } {#1}
+%    \end{macrocode}
+%    Getting the first and last marks out of the material in \verb=#2=
+%    is done by putting the material in a box and then doing a
+%    split operation to the maximum size possible (which hopefully
+%    means all of the content).\footnote{We could verify this, maybe we
+%    should.} Because this is an action only for the sake of getting
+%    at the mark values we don't want any underfull
+%    box warnings so we turn those (locally) off.
+%    \begin{macrocode}
+    \group_begin:
+      \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+      \int_set_eq:NN \tex_vbadness:D      \c_max_int
+      \dim_set_eq:NN \tex_vfuzz:D         \c_max_dim
+%    \end{macrocode}
+%    There is a further complication: if the region contains infinite
+%    shrinking glue then a \cs{vsplit} operation will balk with a
+%    low-level error. Now pages or columns, which are our main concern here, can't
+%    have such infinite shrinkage if they are cut straight from the
+%    galley, however the use of \cs{enlargethispage} actually does add
+%    some at the very bottom (and also wraps the whole page into a box
+%    by itself, so if we leave it this way then a) we get this error
+%    and b) we don't see any marks because they are hidden one level
+%    down).
+%
+%    We therefore do an \tn{unskip} to get rid of that glue if present and
+%    also check if we have then a \cs{vbox} as the last item and if so
+%    unpack that too. All this is temporary, just for getting the
+%    marks out, so it doesn't affect the final page production.
+%
+%    In fact, we go one step further and set the box to a large
+%    negative height possible and afterwards take a look at the
+%    reported badness: if it is zero we know that there has still been
+%    infinite shrinkage in the box so that we can't do a
+%    \tn{vsplit}. If that is the case we generate an error message and
+%    bypass extracting the marks. We use only half of \cs{c_max_dim}
+%    because otherwise \TeX{} will report an overfull vbox despite our
+%    setting of \cs{tex_vfuzz:D}. This test will not find existing
+%    infinite shrinkage in all cases, e.g., if there are several glues
+%    that cancel each other, but it is the best we can do.
+%    \begin{macrocode}
+      \vbox_set_to_ht:Nnn \l_@@_box { -.5\c_max_dim }
+        {
+          #2
+          \tex_unskip:D
+          \box_set_to_last:N \l_@@_box
+          \box_if_vertical:NT \l_@@_box
+              { \vbox_unpack:N \l_@@_box }
+%    \end{macrocode}
+%    If it wasn't a vbox, it was either an hbox or there was no box.
+%    Given that we are only interested in the marks we don't need put
+%    it back in that case. However, we have to make sure that the box
+%    is not totally empty (which it might have been from the start, or
+%    now), because \TeX{} does not report a badness for empty boxes
+%    which means out test would incorrectly conclude that we have
+%    infinite shrinking glue. A simple \tn{kern} is enough to avoid this.
+%    \begin{macrocode}
+          \tex_kern:D \c_zero_dim
+        }
+      \int_compare:nNnTF \tex_badness:D > 0
+%    \end{macrocode}
+%    If the box had no infinite shrinkage (or rather if our test
+%    didn't show any) we vsplit it. Note that it
+%    doesn't matter that we set it to this strange size first. If there
+%    was infinite shrinkage after all, we end up with a low-level
+%    \TeX{} error, but if there is, it is a coding error and needs
+%    correcting.
+%    \begin{macrocode}
+        {
+          \vbox_set_split_to_ht:NNn \l_@@_box \l_@@_box \c_max_dim
+%    \end{macrocode}
+%    After this action we can get first and last marks of the various
+%    classes through \cs{tex_splitfirstmarks:D} and
+%    \cs{tex_splitbotmarks:D}. So now we loop over all classes stored in
+%    \cs{g_@@_classes_seq}.
+%    \begin{macrocode}
+          \seq_map_inline:Nn \g_@@_classes_seq
+            {
+%    \end{macrocode}
+%    First action: get the last mark from the previous region, i.e.,
+%    \verb=previous-#1=.  But because it is also still inside \verb=#1=,
+%    at the moment we use that to construct the name because this is a
+%    tiny bit faster. Given that we
+%    need this value in various assignments we store it away which
+%    avoids unnecessary further csname generations.
+%    \begin{macrocode}
+              \tl_gset_eq:Nc \g_@@_new_top_tl { g_@@_#1_last_##1_tl }
+%    \end{macrocode}
+%    This will first of all become the new top mark for the current class.
+%    \begin{macrocode}
+              \tl_gset_eq:cN { g_@@_#1_top_##1_tl } \g_@@_new_top_tl
+%    \end{macrocode}
+%    Next action is to get ourselves the new last mark from the
+%    material supplied.
+%    \begin{macrocode}
+              \tl_gset:No \g_@@_tmp_tl
+                { \tex_splitbotmarks:D \use:c { c_@@_class_##1_mark } }
+%    \end{macrocode}
+%    If this mark doesn't exist then obviously first mark does
+%    neither, so both become the last mark from the previous region. We
+%    have to be a little careful here: something like
+%    \verb=\mark_insert:nn{foo}{}= adds an \enquote{empty} mark that should
+%    not be confused with no mark at all. But no mark in our material
+%    will result in \cs{g_@@_tmp_tl} being fully empty. This is why we
+%    have to make sure that \enquote{empty} from \cs{mark_insert:nn} only
+%    appears to be empty but fails the next test (see below how this
+%    is done).
+%    \begin{macrocode}
+              \tl_if_empty:NTF \g_@@_tmp_tl
+                {
+                  \tl_gset_eq:cN { g_@@_#1_last_ ##1_tl }
+                    \g_@@_new_top_tl
+                  \tl_gset_eq:cN { g_@@_#1_first_##1_tl }
+                    \g_@@_new_top_tl
+                }
+%    \end{macrocode}
+%    If it wasn't empty, i.e., if it had a real value then we use this
+%    value for our new last mark instead.
+%    \begin{macrocode}
+                {
+                  \tl_gset_eq:cN { g_@@_#1_last_##1_tl } \g_@@_tmp_tl
+%    \end{macrocode}
+%    Because we had a last mark we also have a first mark (which
+%    might be the same, but might be not), so we pick that up and
+%    assign it to the appropriate token list. This explains why we first
+%    checked for the last mark because that makes the processing
+%    faster in case there is none.
+%    \begin{macrocode}
+                  \tl_gset:co { g_@@_#1_first_##1_tl }
+                    {
+                      \tex_splitfirstmarks:D
+                        \use:c { c_@@_class_##1_mark }
+                    }
+                }
+            }
+        }
+%    \end{macrocode}
+%    If the badness was zero (we actually tested for${}>0$ but it
+%    can't get negative) then we had infinite shrinkage, so we report
+%    that and set all marks to the value the last mark had before.
+%    \begin{macrocode}
+        {
+          \msg_error:nnn { mark } { infinite-shrinkage } {#1}
+          \seq_map_inline:Nn \g_@@_classes_seq
+            {
+              \tl_gset_eq:cc { g_@@_#1_top_  ##1_tl }
+                             { g_@@_#1_last_ ##1_tl }
+              \tl_gset_eq:cc { g_@@_#1_first_##1_tl }
+                             { g_@@_#1_last_ ##1_tl }
+            }
+        }
+%    \end{macrocode}
+%    Once all mark classes have been processed the data structures are
+%    updated and we can close the group which undoes our local
+%    changes and retains only the global ones.
+%    \begin{macrocode}
+    \group_end:
+  }
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%  \begin{macro}{\@@_update_structure_alias:nn}
+%    This function copies the structure for one region to  another
+%    (name), e.g., from \texttt{page} to \texttt{previous-page} above,
+%    or later from \texttt{column} to \texttt{first-column}, etc.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_update_structure_alias:nn #1#2 {
+%    \end{macrocode}
+%    This requires a simple loop through all mark classes copying the
+%    token list from one name to the next.
+%    \begin{macrocode}
+  \seq_map_inline:Nn \g_@@_classes_seq
+    {
+      \tl_gset_eq:cc { g_@@_ #1 _top_   ##1 _tl }
+                     { g_@@_ #2 _top_   ##1 _tl }
+      \tl_gset_eq:cc { g_@@_ #1 _first_ ##1 _tl }
+                     { g_@@_ #2 _first_ ##1 _tl }
+      \tl_gset_eq:cc { g_@@_ #1 _last_  ##1 _tl }
+                     { g_@@_ #2 _last_  ##1 _tl }
+    }
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%  \begin{macro}{\@@_update_structure_to_err:n,\@@_error:n}
+%    A slight variation is to install a fixed error message as the value.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_update_structure_to_err:n #1 {
+  \seq_map_inline:Nn \g_@@_classes_seq
+      {
+        \tl_gset:cn { g_@@_ #1 _top_   ##1 _tl } { \@@_error:n {#1} }
+        \tl_gset:cn { g_@@_ #1 _first_ ##1 _tl } { \@@_error:n {#1} }
+        \tl_gset:cn { g_@@_ #1 _last_  ##1 _tl } { \@@_error:n {#1} }
+      }
+}
+%    \end{macrocode}
+%    Given that this is used in only one place, we could hardwire the
+%    argument which would be a bit more compact, but who knows,
+%    perhaps we end up with another reason to use this error command
+%    elsewhere, so for now we keep the argument.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_error:n #1 {
+  \msg_error:nnn { mark } { invalid-use } {#1}
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%
+% \subsection{Placing and retrieving marks}
+%
+%
+%
+%  \begin{macro}{\mark_insert:nn}
+%    This function puts a mark for some \meta{class} at the current point.
+%    \begin{macrocode}
+\cs_new_protected:Npn \mark_insert:nn #1#2
+{
+  \seq_if_in:NnTF \g_@@_classes_seq {#1}
+      {
+%    \end{macrocode}
+%    We need to pass the evaluated argument into the mark but protected
+%    commands should not expand including those protected using the \cs{protect} approach of
+%    \LaTeXe{}. We also  disable \cs{label} and the
+%    like.\footnote{Straight copy from \texttt{latex.ltx} but is this
+%    even correct? At least a label in a running header makes little
+%    sense if it get set several times! Maybe that needs looking at in
+%    the 2e kernel.}
+%
+%    At this point the code eventually should get a public
+%    (and a kernel) hook instead of a set of hardwired settings.
+%    \begin{macrocode}
+        \group_begin:
+%    \end{macrocode}
+%    Within the group we alter some comments, e.g, \cs{label} or
+%    \cs{index}, to do the right at this point. This is done in the
+%    kernel hook \cs{@kernel at before@insertmark} which is followed by
+%    the public hook \hook{insertmark} that can be used by packages to
+%    augment or alter that setup as necessary.
+%    \begin{macrocode}
+          \@kernel at before@insertmark
+          \hook_use:n { insertmark }
+          \unrestored at protected@xdef \g_@@_tmp_tl {#2}
+%<*trace>
+          \@@_debug:n{ \iow_term:x { Marks:~ set~#1~<-~
+              '\tl_to_str:V \g_@@_tmp_tl' ~ \msg_line_context: } }
+%</trace>
+          \tex_marks:D \use:c { c_@@_class_ #1 _mark }
+            {
+%    \end{macrocode}
+%    Here is the trick to avoid truly empty marks: if the result from
+%    the above processing is empty we add something which eventually
+%    becomes empty, but not immediately; otherwise we just put
+%    \cs{g_@@_tmp_tl} in.
+%    \begin{macrocode}
+              \tl_if_empty:NTF \g_@@_tmp_tl
+                { \exp_not:n { \prg_do_nothing: } }
+                { \exp_not:o { \g_@@_tmp_tl } }
+            }
+        \group_end:
+%    \end{macrocode}
+%    A mark introduces a possible break point and in certain
+%    situations that should not happen in vertical mode in \LaTeX{}.
+%    This needs some cleanup \ldots.
+%    \begin{macrocode}
+        \if at nobreak\ifvmode\nobreak\fi\fi
+      }
+%    \end{macrocode}
+%    If the mark class was not known, raise an error.
+%    \begin{macrocode}
+      {
+        \msg_error:nnx { mark } { unknown-class }
+          { \tl_to_str:n {#1} }
+      }
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+% \begin{macro}[int]{\@kernel at before@insertmark}
+% \begin{macro}{insertmark}
+%    By default \cs{label}, \cs{index}, and \cs{glossary} do nothing
+%    when the mark is inserted.
+%    \begin{macrocode}
+\cs_new:Npn \@kernel at before@insertmark {
+          \cs_set_eq:NN \label    \scan_stop:
+          \cs_set_eq:NN \index    \scan_stop:
+          \cs_set_eq:NN \glossary \scan_stop:
+}
+%    \end{macrocode}
+%    The public hook to augment the setup.
+%    \begin{macrocode}
+\hook_new:n {insertmark}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}[EXP]{\mark_use_top:nn, \mark_use_first:nn, \mark_use_last:nn}
+%
+%    To retrieve the first, last or top region mark, we grab the
+%    appropriate value stored in the corresponding token list variable
+%    and pass its contents back. These functions should be used only
+%    in output routines after \cs{@@_update_structure:nn} has acted,
+%    otherwise their value will be wrong.
+%
+%    If used with an unknown class or region they generate an error
+%    (fairly low-level because we are in an expandable context).
+%    \begin{macrocode}
+\cs_new:Npn \mark_use_first:nn #1#2 { \exp_not:v { g_@@_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2  { \exp_not:v { g_@@_#1_last_#2_tl }  }
+\cs_new:Npn \mark_use_top:nn #1#2   { \exp_not:v { g_@@_#1_top_#2_tl }   }
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{Comparing mark values}
+%
+%
+%
+%  \begin{macro}[TF,EXP]{\mark_if_eq:nnnn,\mark_if_eq:nnnnnn}
+%    Test if in a given region (\verb=#1=) for a given class
+%   (\verb=#2=) the marks in position \verb=#3= and \verb=#4= (top,
+%   first, or last) are identical
+%    \begin{macrocode}
+\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g_@@_ #1 _#3_ #2 _tl }
+                 { g_@@_ #1 _#4_ #2 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+%    \end{macrocode}
+%    The fully general test (with two triplets of the form
+%    \meta{region}, \meta{class}, and \meta{position}) is this:
+%    \begin{macrocode}
+\prg_new_conditional:Npnn \mark_if_eq:nnnnnn #1#2#3#4#5#6 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g_@@_ #1 _#3_ #2 _tl }
+                 { g_@@_ #4 _#6_ #5 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+% \subsection{Messages}
+%
+%    \begin{macrocode}
+\msg_new:nnnn { mark } { class-already-defined }
+  { Mark~class~'#1'~already~defined }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~define~a~new~mark~class~called~'#1':~
+    this~mark~class~already~exists.
+    \c__msg_return_text_tl
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\msg_new:nnnn { mark } { unknown-class }
+  { Unknown~mark~class~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
+    but~this~class~of~marks~does~not~exist.
+  }
+%    \end{macrocode}
+%
+%
+%    \begin{macrocode}
+
+\msg_new:nnnn { mark } { invalid-use }
+  { Mark~region~'#1'~not ~usable }
+  {
+    \c__msg_coding_error_text_tl
+    The~region~'#1'~can~only~be~used~after~
+    all~columns~have~been~assembled.
+    \c__msg_return_text_tl
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\msg_new:nnnn { mark } { infinite-shrinkage }
+  { Infinite~shrinkage~found~in~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    The~mark~region~'#1'~contains~some~infinite~negative~glue~
+    allowing~it~to~shrink~to~an~arbitrary~size.~
+    This~makes~it~impossible~to~split~the~region~apart~to~
+    get~at~its~marks.~They~are~lost.
+  }
+%    \end{macrocode}
+%
+%
+%
+% \subsection{Debugging the mark structures}
+%
+%  Code and commands in this section are not final, it needs more
+%  experimentation to see what kind of tracing information is going to
+%  be useful in practice. For now the tracing is mainly meant to be used
+%  for code testing and not so much for application testing.
+%
+% It is quite likely that the
+% commands and the behavior of the tracing might change in the
+% future once we gained some experience with it.
+%
+%  \begin{macro}{\g_@@_debug_bool}
+%    Holds the current debugging state.
+%    \begin{macrocode}
+\bool_new:N \g_@@_debug_bool
+%    \end{macrocode}
+%  \end{macro}
+%
+%  \begin{macro}{\mark_debug_on:,\mark_debug_off:}
+%  \begin{macro}{\@@_debug:n}
+%  \begin{macro}{\@@_debug_gset:}
+%    Turns debugging on and off by redefining \cs{@@_debug:n}.
+%    \begin{macrocode}
+\cs_new_eq:NN \@@_debug:n \use_none:n
+\cs_new_protected:Npn \mark_debug_on:
+  {
+    \bool_gset_true:N \g_@@_debug_bool
+    \@@_debug_gset:
+  }
+\cs_new_protected:Npn \mark_debug_off:
+  {
+    \bool_gset_false:N \g_@@_debug_bool
+    \@@_debug_gset:
+  }
+\cs_new_protected:Npn \@@_debug_gset:
+  {
+    \cs_gset_protected:Npx \@@_debug:n ##1
+      { \bool_if:NT \g_@@_debug_bool {##1} }
+  }
+%    \end{macrocode}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%
+%
+%
+%  \begin{macro}{\DebugMarksOn,\DebugMarksOff}
+%    CamelCase commands for debugging.
+%    \begin{macrocode}
+\cs_new_eq:NN \DebugMarksOn   \mark_debug_on:
+\cs_new_eq:NN \DebugMarksOff  \mark_debug_off:
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%  \begin{macro}{\@@_class_status:nn}
+%    Shows the mark values across all regions for one mark class
+%    (\verb=#2=). The first argument gives some \meta{info} to help
+%    identifying where the command was called.
+%    \begin{macrocode}
+%<*trace>
+\cs_new_protected:Npn \@@_class_status:nn #1#2
+   {
+           \typeout{ Marks:~#2~ #1:}
+           \typeout{\@spaces page~ (current):
+             | \exp_not:v { g_@@_page_top_ #2 _tl }
+             | \exp_not:v { g_@@_page_first_ #2 _tl }
+             | \exp_not:v { g_@@_page_last_ #2 _tl }     |}
+           \typeout{\@spaces page~ (previous):
+             | \exp_not:v { g_@@_previous-page_top_ #2 _tl }
+             | \exp_not:v { g_@@_previous-page_first_ #2 _tl }
+             | \exp_not:v { g_@@_previous-page_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (previous):
+             | \exp_not:v { g_@@_previous-column_top_ #2 _tl }
+             | \exp_not:v { g_@@_previous-column_first_ #2 _tl }
+             | \exp_not:v { g_@@_previous-column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (current):
+             | \exp_not:v { g_@@_column_top_ #2 _tl }
+             | \exp_not:v { g_@@_column_first_ #2 _tl }
+             | \exp_not:v { g_@@_column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (first):
+             | \exp_not:v { g_@@_first-column_top_ #2 _tl }
+             | \exp_not:v { g_@@_first-column_first_ #2 _tl }
+             | \exp_not:v { g_@@_first-column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (second):
+             | \exp_not:v { g_@@_last-column_top_ #2 _tl }
+             | \exp_not:v { g_@@_last-column_first_ #2 _tl }
+             | \exp_not:v { g_@@_last-column_last_ #2 _tl }     |}
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%
+%  \begin{macro}{\@@_status:n}
+%    Show all mark class values across all regions.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_status:n #1
+  {
+    \seq_map_inline:Nn \g_@@_classes_seq
+      { \@@_class_status:nn {#1} {##1} }
+  }
+%</trace>
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%
+% \subsection{Designer-level interfaces}
+%
+%
+% \begin{macro}{\NewMarkClass,\InsertMark}
+%    These two are identical to the L3 programming layer commands.
+%    \begin{macrocode}
+\cs_new_eq:NN  \NewMarkClass \mark_new_class:n
+\@onlypreamble \NewMarkClass
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\cs_new_eq:NN \InsertMark  \mark_insert:nn
+%    \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}[EXP]{\TopMark, \FirstMark, \LastMark}
+%    The following commands take an optional argument that defaults to
+%    page. There is no checking that the region is actually valid. If
+%    not there is simply an empty return.
+%    \begin{macrocode}
+\NewExpandableDocumentCommand \FirstMark { O{page} m }
+                    { \mark_use_first:nn {#1}{#2} }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\NewExpandableDocumentCommand \LastMark { O{page} m }
+                    { \mark_use_last:nn {#1}{#2} }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\NewExpandableDocumentCommand \TopMark { O{page} m }
+                    { \mark_use_top:nn {#1}{#2} }
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
+%  \begin{macro}[EXP]{\IfMarksEqualTF}
+%    We only provide a CamelCase command for the case with one region
+%    (optional) and one class. One could think of also providing a
+%    version for the general case with several optional arguments, but
+%    use cases for this are most likely rare, so not done yet.
+%    \begin{macrocode}
+\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
+  \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%
+%
+%  \section{\LaTeXe{} integration}
+%
+%  \subsection{Core \LaTeXe{} integration}
+%
+%  \begin{macro}{\@@_update_singlecol_structures:}
+%    This command updates the mark structures if we are producing a
+%    single column document.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_update_singlecol_structures: {
+%    \end{macrocode}
+%    First we update the \texttt{page} region (which also updates the
+%    \texttt{previous-page}.
+%
+%    The \cs{@outputbox} is normally in \cs{vbox} in \LaTeX{} but we
+%    can't take that for granted (an \pkg{amsmath} test document
+%    changed it to an \cs{hbox} just to trip me up) so we are a little
+%    careful with unpack now.
+%    \begin{macrocode}
+  \box_if_vertical:NTF \@outputbox
+      {
+        \@@_update_structure:nn {page}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \@@_update_structure:nn {page}
+           { \hbox_unpack:N  \@outputbox }
+      }
+%    \end{macrocode}
+%    The we provide the necessary updates for the aliases.
+%    \begin{macrocode}
+  \@@_update_structure_alias:nn {previous-column}{previous-page}
+  \@@_update_structure_alias:nn {column}{page}
+  \@@_update_structure_alias:nn {first-column}{page}
+  \@@_update_structure_alias:nn {last-column}{page}
+%<*trace>
+% move this into status itself?
+     \@@_debug:n
+         {
+           \@@_status:n
+                { in~ OR~ (
+                  \legacy_if:nTF {@twoside}
+                         { twoside-
+                           \int_if_odd:nTF \c at page
+                               { odd }{ even }
+                         }
+                         { oneside }
+                         )
+                }
+         }
+%</trace>
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%  \begin{macro}{\@@_update_dblcol_structures:}
+%    This commands handles the updates if we are doing two-column pages.
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_update_dblcol_structures: {
+%    \end{macrocode}
+%    First we update the \texttt{column} and \texttt{previous-column}
+%    regions using the material assembled in \cs{@outputbox}.
+%    \begin{macrocode}
+  \box_if_vertical:NTF \@outputbox
+      {
+        \@@_update_structure:nn {column}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \@@_update_structure:nn {column}
+           { \hbox_unpack:N  \@outputbox }
+      }
+%    \end{macrocode}
+%    How we have to update the alias regions depends on whether or not
+%    \cs{@opcol} was called to process the first column or to produce
+%    the completed page
+%    \begin{macrocode}
+  \legacy_if:nTF {@firstcolumn}
+    {
+%    \end{macrocode}
+%    If we are processing the first column then \texttt{column} is our
+%    \texttt{first-column} and there is no \texttt{last-column} yet,
+%    so we make those an error.
+%    \begin{macrocode}
+      \@@_update_structure_alias:nn {first-column}{column}
+      \@@_update_structure_to_err:n {last-column}
+    }
+    {
+%    \end{macrocode}
+%    If we produce the completed page then the \texttt{first-column}
+%    is the same as the new \texttt{previous-column}. However, the
+%    structure should already be correct if you think about it
+%    (because is was set to \texttt{column} last time which is now the
+%    \texttt{previous-column}), thus there is no need to make an update.
+%    \begin{macrocode}
+%     \@@_update_structure_alias:nn {first-column}{previous-column}
+%    \end{macrocode}
+%    However, we now have a proper \texttt{last-column} so we assign that.
+%    \begin{macrocode}
+      \@@_update_structure_alias:nn {last-column}{column}
+%    \end{macrocode}
+%    What now remains doing is to update the \texttt{page} and
+%    \texttt{previous-page} regions. For this we have to copy the
+%    settings in \texttt{page} into \texttt{previous-page} and then
+%    update \texttt{page} such that the top and first marks are taken
+%    from the \texttt{first-column} region and the last marks are
+%    taken from the \texttt{last-column} region. All this has to be
+%    done for all mark classes so we loop over our sequence.
+%
+%    Note that one loop is needed if we arrange the copy statements in
+%    a suitable way.
+%    \begin{macrocode}
+      \seq_map_inline:Nn \g_@@_classes_seq
+        {
+          \tl_gset_eq:cc { g_@@_previous-page_top_   ##1 _tl }
+                         { g_@@_page_top_            ##1 _tl }
+          \tl_gset_eq:cc { g_@@_previous-page_first_ ##1 _tl }
+                         { g_@@_page_first_          ##1 _tl }
+          \tl_gset_eq:cc { g_@@_previous-page_last_  ##1 _tl }
+                         { g_@@_page_last_           ##1 _tl }
+%    \end{macrocode}
+%    The \texttt{page} updates need to come after the corresponding
+%    updates for \texttt{previous-page} otherwise we loose the
+%    necessary value.
+%    \begin{macrocode}
+          \tl_gset_eq:cc { g_@@_page_top_           ##1 _tl }
+                         { g_@@_first-column_top_   ##1 _tl }
+          \tl_gset_eq:cc { g_@@_ page_first_        ##1 _tl }
+                         { g_@@_first-column_first_ ##1 _tl }
+          \tl_gset_eq:cc { g_@@_page_last_          ##1 _tl }
+                         { g_@@_last-column_last_   ##1 _tl }
+        }
+    }
+%<*trace>
+     \@@_debug:n
+         {
+           \@@_status:n
+              { in~ OR~ (
+                \legacy_if:nTF {@twoside}
+                       { twoside-
+                         \int_if_odd:nTF \c at page
+                             { odd }{ even }
+                       }
+                       { oneside }
+                       \space
+                       \legacy_if:nTF {@firstcolumn}
+                              { first~ }{ second~ }
+                              column )
+              }
+         }
+%</trace>
+}
+%    \end{macrocode}
+%  \end{macro}
+%
+%    \begin{macrocode}
+%<@@=>
+%    \end{macrocode}
+%
+%  \begin{macro}[int]{\@expl@@@mark at update@singlecol at structures@@,
+%                \@expl@@@mark at update@dblcol at structures@@}
+%    \begin{macrocode}
+\cs_new_eq:NN  \@expl@@@mark at update@singlecol at structures@@
+               \__mark_update_singlecol_structures:
+\cs_new_eq:NN  \@expl@@@mark at update@dblcol at structures@@
+               \__mark_update_dblcol_structures:
+%    \end{macrocode}
+%  \end{macro}
+%
+%  \subsection{Other \LaTeXe{} output routines}
+%
+%  This section will cover \pkg{multicol} and other packages altering
+%  or providing their own output routine. Not done yet.
+%
+%
+%
+%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}{ltmarks}%
+%<latexrelease>                 {Undo~Marks~handling}
+%<latexrelease>
+%    \end{macrocode}
+%    We keep the interface commands around even if we roll back in
+%    case they are used in packages that don't roll back. Not likely
+%    to do a lot of good, but then there is not much we can do, but
+%    this at least then doesn't give errors.
+%    \begin{macrocode}
+%<latexrelease>\DeclareRobustCommand \NewMarkClass[1]{}
+%<latexrelease>\DeclareRobustCommand \InsertMark[2]{}
+%<latexrelease>\RenewExpandableDocumentCommand \FirstMark { O{} m } { }
+%<latexrelease>\RenewExpandableDocumentCommand \LastMark { O{} m } { }
+%<latexrelease>\RenewExpandableDocumentCommand \TopMark { O{} m } { }
+%<latexrelease>\RenewExpandableDocumentCommand \IfMarksEqualTF { O{} mmm }{ }
+%<latexrelease>
+%    \end{macrocode}
+%    Same here, this avoided extra roll back code in the OR.
+%    \begin{macrocode}
+%<latexrelease>\let \@expl@@@mark at update@singlecol at structures@@ \relax
+%<latexrelease>\let \@expl@@@mark at update@dblcol at structures@@ \relax
+%<latexrelease>
+%<latexrelease>
+%<latexrelease>\EndModuleRelease
+%    \end{macrocode}
+%
+%    \begin{macrocode}
+\ExplSyntaxOff
+%    \end{macrocode}
+%    \begin{macrocode}
+%</2ekernel|latexrelease>
+%    \end{macrocode}
+%
+%    Reset module prefix:
+%    \begin{macrocode}
+%<@@=>
+%    \end{macrocode}
+%
+%
+%
+%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\endinput
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%


Property changes on: trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmath.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmath.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -38,7 +38,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmath.dtx}
-              [2021/10/14 v1.2j LaTeX Kernel (Math Setup)]
+              [2022/05/08 v1.2l LaTeX Kernel (Math Setup)]
 % \iffalse
 %</driver>
 %
@@ -467,8 +467,9 @@
 % \end{macro}
 %
 % \begin{macro}{\openup}
+% \changes{v1.2k}{2022/04/08}{Make \cs{protected} (gh/123)}
 %    \begin{macrocode}
-\def\openup{\afterassignment\@penup\dimen@}
+\protected\def\openup{\afterassignment\@penup\dimen@}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -1089,7 +1090,19 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \changes{v1.2l}{2022/05/08}{Use consistent math styles under \LuaTeX}
+% \LuaTeX\ contains new math primitives to place expression over or under
+% horizontally extensible glyphs. Before \LuaTeX\ 1.14 these did not work
+% correctly with the |\mathstyle| primitive and sometimes did not use
+% cramped style in consistent ways. For newer version, we opt into the
+% corrected behavior.
 %    \begin{macrocode}
+\ifx\mathdefaultsmode\@undefined\else
+  \mathdefaultsmode=1
+\fi
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %</2ekernel>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%% File: ltmeta.dtx (C) Copyright 2021
+%% File: ltmeta.dtx (C) Copyright 2021, 2022
 %       Frank Mittelbach, LaTeX Team
 %
 % It may be distributed and/or modified under the conditions of the
@@ -14,14 +14,12 @@
 %%% From File: ltmeta.dtx
 %
 %    \begin{macrocode}
-\def\ltmetaversion{v1.0a}
-\def\ltmetadate{2021/12/07}
+\def\ltmetaversion{v1.0b}
+\def\ltmetadate{2022/05/18}
 %    \end{macrocode}
 %<*driver>
 \documentclass{l3doc}
 
-%\usepackage{ltmeta}
-
 % Fixing footnotes in  functions and variables: this should be in l3doc!
 
 \newcommand\fixfootnote[2]{\footnotemark
@@ -122,11 +120,12 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%<latexrelease>\NewModuleRelease{2021/06/01}{ltmeta}
+%<latexrelease>\NewModuleRelease{2022/06/01}{ltmeta}
 %<latexrelease>                 {Document Metadata handling}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
+\let \IfDocumentMetadataTF \@secondoftwo
 \protected\def\DocumentMetadata{%
   \InputIfFileExists{documentmetadata-support.ltx}%
      {}%
@@ -149,16 +148,44 @@
 %    \begin{macrocode}
       \let\DocumentMetadata\@gobble
      }%
+  \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
 %    \end{macrocode}
 %
+%   To allow package and class author to support for document links
+%   we provide also the new interface commands of the hyperref package
+%   for the creation of targets.
+% \changes{v1.0b}{2022/05/17}{Default definition for targets added}
+%  \begin{macro}{\MakeLinkTarget}
+%  \begin{macro}{\LinkTargetOn}
+%  \begin{macro}{\LinkTargetOff}
+%  \begin{macro}{\NextLinkTarget}
+%    \begin{macrocode}
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+  \ifvmode
+    \special{}%
+  \else
+    \@savsf\spacefactor
+    \smash{}%
+    \spacefactor\@savsf
+  \fi}
+\NewDocumentCommand\LinkTargetOn{}{}
+\NewDocumentCommand\LinkTargetOff{}{}
+\NewDocumentCommand\NextLinkTarget{m}{}
+%    \end{macrocode}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
+%  \end{macro}
 %
 %
-%
-%
+%    We do not undo \cs{MakeLinkTarget} and friends if we roll back, in
+%    case they are used in packages that themselves do not offer
+%    rollback. This way a roll forward adds them, but the dummies remain
+%    if you roll back and you don't get missing csname errors if they
+%    are used.
 %    \begin{macrocode}
-%
 %<latexrelease>\IncludeInRelease{0000/00/00}{ltmeta}%
 %<latexrelease>                 {Undo Document Metadata handling}
 %<latexrelease>

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -37,7 +37,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltoutput.dtx}
-             [2021/09/03 v1.4h LaTeX Kernel (Output Routine)]
+             [2022/04/03 v1.4i LaTeX Kernel (Output Routine)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltoutput.dtx}
@@ -1648,8 +1648,18 @@
 %<*2ekernel|fltrace>
 \def \@opcol {%
   \if at twocolumn
+%    \end{macrocode}
+% \changes{v1.ih}{2022/04/03}{Interface with new mark mechanism}
+%    The funny-looking internal commands are interfacing with the new
+%    marks mechanism. We make sure (elsewhere) that those are always
+%    defined, even when we roll back, so here we add them
+%    unconditionally. This still need turning into a hook or config
+%    point eventually:
+%    \begin{macrocode}
+    \@expl@@@mark at update@dblcol at structures@@
     \@outputdblcol
   \else
+    \@expl@@@mark at update@singlecol at structures@@ 
     \@outputpage
 %<*trace>
     \fl at trace{PAGE: one column (float? see above) page completed}%

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltpage.dtx}
-             [2020/12/05 v1.0m LaTeX Kernel (page style setup)]
+             [2022/04/03 v1.0n LaTeX Kernel (page style setup)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltpage.dtx}
@@ -180,10 +180,11 @@
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2019/10/01}%
-%<latexrelease>                 {\markboth}{Make commands robust}%
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\markboth}{New mark support}%
 %    \end{macrocode}
 %
+%
 % \begin{macro}{\markboth}
 % \begin{macro}{\markright}
 % \changes{v1.0d}{1994/05/20}{Changed setting for \cs{protect}.}
@@ -202,12 +203,30 @@
 % \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
 %                             error (pr/3203).}
 % \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
+% \changes{v1.0n}{2022/04/04}{Interface with new mark mechanism}
 %    \begin{macrocode}
+\ExplSyntaxOn
 \DeclareRobustCommand*\markboth[2]{%
   \begingroup
     \let\label\relax \let\index\relax \let\glossary\relax
     \unrestored at protected@xdef\@themark {{#1}{#2}}%
     \@temptokena \expandafter{\@themark}%
+%    \end{macrocode}
+%    In addition to generating the legacy mark we output the
+%    individual ones as well at the very same point.
+%    The legacy mark is kept unchanged in order to work with packages
+%    that expect that mark in exactly the way it is right now.
+%
+%    We might want to think about how to improve this in one-side
+%    documents, see comments below.
+%
+%    We have not changed all of the code to L3 prog layer convention,
+%    in case packages attempt to do some patching and expect the 2e
+%    names being around. Eventually this should and will change.
+%    \begin{macrocode}
+    \mark_insert:nn{2e-left}{#1}
+    \mark_insert:nn{2e-right}{#2} 
+    \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
     \mark{\the\@temptokena}%
   \endgroup
   \if at nobreak\ifvmode\nobreak\fi\fi}
@@ -214,6 +233,7 @@
 %    \end{macrocode}
 %
 % \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
+% \changes{v1.0n}{2022/04/04}{Interface with new mark mechanism}
 %    \begin{macrocode}
 \DeclareRobustCommand*\markright[1]{%
   \begingroup
@@ -223,9 +243,23 @@
 %    \begin{macrocode}
     \expandafter\@markright\@themark {#1}%
     \@temptokena \expandafter{\@themark}%
+%    \end{macrocode}
+%    Same game with \cs{markright} more or less \ldots
+%    \begin{macrocode}
+    \mark_insert:nn{2e-right}{#1}
+    \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
+%    \end{macrocode}
+%    The legacy \LaTeX{} mechanism always sets left and right mark,
+%    i.e., if a sub-mark (i.e., right mark) is set the corresponding main
+%    mark also is getting a mark with the same value it had previously.
+%    However, for the individual mark classes this means we are losing
+%    information so for them that is not done.
+%    \begin{macrocode}
+%   \mark_insert:nn{2e-left}{\exp_after:wN \use_i:nn \@themark }
     \mark{\the\@temptokena}%
   \endgroup
   \if at nobreak\ifvmode\nobreak\fi\fi}
+\ExplSyntaxOff
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}
@@ -233,6 +267,27 @@
 %    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease>                 {\markboth}{Make commands robust}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand*\markboth[2]{%
+%<latexrelease>  \begingroup
+%<latexrelease>    \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease>    \unrestored at protected@xdef\@themark {{#1}{#2}}%
+%<latexrelease>    \@temptokena \expandafter{\@themark}%
+%<latexrelease>    \mark{\the\@temptokena}%
+%<latexrelease>  \endgroup
+%<latexrelease>  \if at nobreak\ifvmode\nobreak\fi\fi}
+%<latexrelease>\DeclareRobustCommand*\markright[1]{%
+%<latexrelease>  \begingroup
+%<latexrelease>    \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease>    \expandafter\@markright\@themark {#1}%
+%<latexrelease>    \@temptokena \expandafter{\@themark}%
+%<latexrelease>    \mark{\the\@temptokena}%
+%<latexrelease>  \endgroup
+%<latexrelease>  \if at nobreak\ifvmode\nobreak\fi\fi}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>                 {\markboth}{Make commands robust}%
 %<latexrelease>

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltpara.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltpara.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltpara.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -15,7 +15,7 @@
 %
 %    \begin{macrocode}
 \def\ltparaversion{v1.0k}
-\def\ltparadate{2021/11/11}
+\def\ltparadate{2022/05/13}
 %    \end{macrocode}
 %<*driver>
 \documentclass{l3doc}
@@ -484,7 +484,7 @@
 %
 %    To avoid issues a paragraph started by them should always be
 %    ended by \cs{RawParEnd}\footnote{Technical note for those who
-%    know their \textit{\TeX book\/}: the \cs{RawParEnd} comand
+%    know their \textit{\TeX book\/}: the \cs{RawParEnd} command
 %    invokes the original \TeX{} engine definition of \cs{par} that
 %    (soley) triggers the paragraph builder in \TeX{} when found
 %    inside unrestricted horizontal mode and does nothing in other

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltshipout.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -32,8 +32,8 @@
 %%% From File: ltshipout.dtx
 %
 %    \begin{macrocode}
-\providecommand\ltshipoutversion{v1.0l}
-\providecommand\ltshipoutdate{2022/01/06}
+\providecommand\ltshipoutversion{v1.0m}
+\providecommand\ltshipoutdate{2022/05/08}
 %    \end{macrocode}
 %
 %<*driver>
@@ -1014,8 +1014,14 @@
                       \_@@_add_foreground_box:n
                           { \UseHook{shipout/lastpage}
                             \@kernel at after@shipout at lastpage }
+                      \bool_gset_true:N \g_@@_lastpage_handled_bool
+%    \end{macrocode}
+%    We record that we have handled the \hook{shipout/lastpage} hook
+%    but only if we really did.
+% \changes{v1.0m}{2022/05/08}{Handle case where shipout/lastpage is
+%    run too early (gh/813)}
+%    \begin{macrocode}
                     }
-                    \bool_gset_true:N \g_@@_lastpage_handled_bool
                 }
               \@@_finalize_box:
 %    \end{macrocode}
@@ -1723,15 +1729,35 @@
           \gdef\string\@abspage at last {\int_use:N \g_shipout_readonly_int}}
      \fi
 %    \end{macrocode}
-%    But we may have guessed wrongly earlier and we still have to run the
+%    But we may have guessed wrongly earlier and have run it too early
+%    or we still have to run the
 %    \hook{shipout/lastpage} even though there is no page to place
 %    it into. If that is the case we make a trivial extra page and put
 %    it there. This temporary page will then vanish again on the next
 %    run but helps to keep pdf viewers happy.
+%    In either case we should put out an appropriate ``rerun'' warning.
+% \changes{v1.0m}{2022/05/08}{Handle case where shipout/lastpage is
+%    run too early (gh/813)}
 %    \begin{macrocode}
-      \bool_if:NF \g_@@_lastpage_handled_bool
+      \bool_if:NTF \g_@@_lastpage_handled_bool
          {
 %    \end{macrocode}
+%    If the hook was already executed, we have to test if that total
+%    shipouts match the shipouts from last run (because that
+%    corresponds to the page it was executed). If not we output a warning.
+%    \begin{macrocode}
+           \int_compare:nNnF \@abspage at last = \g_shipout_readonly_int
+            {
+              \@latex at warning@no at line{Hook~ 'shipout/lastpage'~ executed~
+                on~ wrong~ page~ (\@abspage at last\space not~
+                \int_use:N\g_shipout_readonly_int).\MessageBreak
+                Rerun~ to~ correct~ this}%
+            } 
+         }
+         {
+%    \end{macrocode}
+%    If the hook was not run, we need to add an extra page and place
+%    it there.
 %    However, making this extra page in case the hook is actually
 %    empty would be forcing a rerun without any reason, so we check
 %    that condition and also check if

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -115,7 +115,7 @@
    {2022-06-01}
 %</2ekernel|latexrelease>
 %<*2ekernel>
-\def\patch at level{-3}
+\def\patch at level{-4}
 %    \end{macrocode}
 %
 % \begin{macro}{\development at branch@name}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltxref.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltxref.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltxref.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltxref.dtx}
-             [2020/12/05 v1.1o LaTeX Kernel (Cross Referencing)]
+             [2022/04/12 v1.1p LaTeX Kernel (Cross Referencing)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltxref.dtx}
@@ -63,17 +63,19 @@
 %     {Extract file ltxref from ltcntlen.}
 % \changes{v1.1b}{1994/05/21}{Use new warning commands}
 % \changes{v1.1c}{1994/05/25}{Modify documentation}
+% \changes{v1.1p}{2022/04/12}{Add starred variants for the ref commands}
 %
 % \section{Cross Referencing}
 %  The user writes  |\label|\marg{foo}  to define the following
 %  cross-references:
 %
-%   |\ref|\marg{foo}: value of most recently incremented referenceable
+%   |\ref|*\marg{foo}: value of most recently incremented referenceable
 %             counter. in the current environment. (Chapter, section,
-%             theorem and enumeration counters are
-%             referenceable, footnote counters are not.)
+%             theorem, footnote and enumeration counters and other counters
+%             stepped with \cs{refstepcounter} are
+%             referenceable.)
 %
-%   |\pageref|\marg{foo}: page number at which |\label{foo}|  command
+%   |\pageref|*\marg{foo}: page number at which |\label{foo}|  command
 %             appeared.  where  foo  can be any string of characters not
 %             containing  `|\|', `|{|' or `|}|'.
 %
@@ -87,7 +89,11 @@
 %  leaving a space on both sides of it is equivalent to leaving
 %  a space on either side.
 %
+%  Note: the starred versions |\ref*| and |\pageref*| are provided
+%  to align with the use of \pkg{hyperref}. Without \pkg{hyperref} (or some
+%  other package using the starred form) the star is simply ignored.
 %
+%
 % \MaybeStop{}
 %
 % \subsection{Cross Referencing}
@@ -206,8 +212,10 @@
 %    \end{macrocode}
 %  \begin{macro}{\ref}
 % \changes{LaTeX2e}{1993/12/11}{Macro reimplemented}
+% \changes{LaTeX2e}{2022/04/12}{Macro reimplemented with a starred version}
 %  \begin{macro}{\pageref}
 % \changes{LaTeX2e}{1993/12/11}{Macro reimplemented}
+% \changes{LaTeX2e}{2022/04/12}{Macro reimplemented with a starred version}
 %  \begin{macro}{\@setref}
 % \changes{LaTeX2e}{1993/12/11}{Macro added}
 % \changes{v1.1h}{1995/10/24}{Switch for refundefined renamed}
@@ -229,10 +237,44 @@
   \else
    \expandafter#2#1\null
   \fi}
-\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
-\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
-                                   \@secondoftwo{#1}}
 %    \end{macrocode}
+%    \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\ref}{Add starred reference commands}%
+%    \end{macrocode}
+%    \begin{macrocode}
+\def\@kernel at sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\@kernel at spageref#1{\expandafter\@setref\csname r@#1\endcsname
+                 \@secondoftwo{#1}}
+\let\@kernel at ref\@kernel at sref
+\let\@kernel at pageref\@kernel at spageref
+\NewDocumentCommand\ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sref}{\@kernel at ref}}
+\NewDocumentCommand\pageref{s}
+   {\IfBooleanTF{#1}{\@kernel at spageref}{\@kernel at pageref}}
+%    \end{macrocode}
+% As the commands are now protected we also need expandable versions for use
+% in \cs{ifthenelse}:
+%    \begin{macrocode}
+\def\@kernel at pageref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{2}}{0}}
+\def\@kernel at ref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{1}}{0}}
+%    \end{macrocode}
+%    \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\ref}{Add starred reference commands}%
+%<latexrelease>\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+%<latexrelease>\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
+%<latexrelease>                                   \@secondoftwo{#1}}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
 %  \end{macro}
@@ -311,8 +353,8 @@
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2020/10/01}%
-%<latexrelease>                 {\refstepcounter}{Add \@currentcounter}%
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\Ref}{Add starred version}%
 %    \end{macrocode}
 %
 %  \begin{macro}{\refstepcounter}
@@ -373,9 +415,14 @@
 %    normal \texttt{\textbackslash ref} which might spoil kerning.
 %    Perhaps one day this needs redoing.}
 %  \changes{v1.1l}{2019/08/22}{Commanded moved from \texttt{varioref.sty}}
+%  \changes{v1.1p}{2022/04/12}{Macro reimplemented with a starred version}%
 %    \begin{macrocode}
-\DeclareRobustCommand\Ref[1]{\protected at edef\@tempa{\ref{#1}}%
-   \expandafter\MakeUppercase\@tempa}
+\def\@kernel at Ref#1{\protected at edef\@tempa{\@kernel at ref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\def\@kernel at sRef#1{\protected at edef\@tempa{\@kernel at sref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\NewDocumentCommand\Ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sRef}{\@kernel at Ref}}
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -385,6 +432,18 @@
 %    \begin{macrocode}
 %</2ekernel|latexrelease>
 %<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease>                 {\Ref}{Add starred version}%
+%<latexrelease>\def\@currentcounter{}
+%<latexrelease>\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease>    \edef\@currentcounter{#1}%
+%<latexrelease>    \protected at edef\@currentlabel
+%<latexrelease>       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%<latexrelease>}
+%<latexrelease>\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
+%<latexrelease>\DeclareRobustCommand\Ref[1]{\protected at edef\@tempa{\ref{#1}}%
+%<latexrelease>   \expandafter\MakeUppercase\@tempa}
+%<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{2019/10/01}%
 %<latexrelease>                 {\refstepcounter}{Add \labelformat and \Ref}%
 %<latexrelease>\let\@currentcounter\@undefined

Modified: trunk/Master/texmf-dist/source/latex-dev/base/slides.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/slides.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/slides.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -53,7 +53,7 @@
 %<*driver>
        \ProvidesFile{slides.drv}
 %</driver>
-              [2021/10/04 v2.4b
+              [2022/05/18 v2.4b
 %<+class>               Standard LaTeX document class]
 %<+cmd>               SLiTeX definitions]
 %    \end{macrocode}
@@ -2348,8 +2348,9 @@
 %  any output when the |@visible| switch is false.
 %
 % \changes{v2.2j}{1994/03/11}{Corrected \cs{@oval}, like previous
+%    change to the \LaTeX{} format.}
 % \changes{v2.4a}{2016/03/29}{Initialize in \cs{@oval}tests added for
-%    latex/4452} change to the \LaTeX{} format.}
+%    latex/4452}
 %    \begin{macrocode}
 \def\line(#1,#2)#3{\if at visible\@xarg #1\relax \@yarg #2\relax
 \@linelen #3\unitlength

Modified: trunk/Master/texmf-dist/source/latex-dev/base/utf8ienc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/utf8ienc.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/base/utf8ienc.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -216,7 +216,7 @@
 %<+ts1> \ProvidesFile{ts1enc.dfu}
 %<+x2>  \ProvidesFile{x2enc.dfu}
 %<+all> \ProvidesFile{utf8enc.dfu}
-%<-utf8-2018>   [2022/02/13 v1.3a UTF-8 support]
+%<-utf8-2018>   [2022/05/08 v1.3b UTF-8 support]
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -1820,8 +1820,14 @@
 %<all,ts1>\DeclareUnicodeCharacter{2191}{\textuparrow}
 %<all,ts1>\DeclareUnicodeCharacter{2192}{\textrightarrow}
 %<all,ts1>\DeclareUnicodeCharacter{2193}{\textdownarrow}
+%    \end{macrocode}
+% \changes{v1.3b}{2022/05/08}{Declare Unicode codepoints U+3008/U+3009 to
+%     better support normalized documents}
+%    \begin{macrocode}
 %<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{2329}{\textlangle}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{3008}{\textlangle}
 %<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{232A}{\textrangle}
+%<all,x2,ts1,t2c,t2b,t2a>\DeclareUnicodeCharacter{3009}{\textrangle}
 %<all,ts1>\DeclareUnicodeCharacter{2422}{\textblank}
 %<all,x2,t2c,t2b,t2a,t1,utf8>\DeclareUnicodeCharacter{2423}{\textvisiblespace}
 %<all,ts1>\DeclareUnicodeCharacter{25E6}{\textopenbullet}

Modified: trunk/Master/texmf-dist/source/latex-dev/tools/showkeys.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/showkeys.dtx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/showkeys.dtx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -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
@@ -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 at def\@@vpageref#1[#2]#3{{%
-      \let\label\SK at label
-      \SK@@@vpageref{#1}[{#2}]{#3}}}%
-    \def\vr at f#1{%
-      \leavevmode\unskip\vref at space
-      \ref{#1}%
-      {\let\label\SK at 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 at def\ref#1{\SK@\SK@@ref{#1}\SK at ref{#1}}%
-  \SK at def\pageref#1{\SK@\SK@@ref{#1}\SK at pageref{#1}}%
+  \let\@kernel at ref@\@kernel at ref
+  \let\@kernel at sref@\@kernel at sref
+  \SK at def\@kernel at ref#1{\SK@\SK@@ref{#1}\SK@@kernel at ref{#1}}%
+  \SK at def\@kernel at sref#1{\SK@\SK@@ref{#1}\SK@@kernel at sref{#1}}%
+  \SK at def\@kernel at pageref#1{\SK@\SK@@ref{#1}\SK@@kernel at pageref{#1}}%
+  \SK at def\@kernel at spageref#1{\SK@\SK@@ref{#1}\SK@@kernel at spageref{#1}}%
+  \SK at def\@kernel at Ref#1{{\let\@kernel at ref\@kernel at ref@\SK@\SK@@ref{#1}\SK@@kernel at Ref{#1}}}%
+  \SK at def\@kernel at sRef#1{\let\@kernel at sref\@kernel at sref@\SK@\SK@@ref{#1}\SK@@kernel at sRef{#1}}%
 %    \end{macrocode}
 % varioref support.
 %    \begin{macrocode}
   \@ifpackageloaded{varioref}{%
     \SK at def\@@vpageref#1[#2]#3{{%
-      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
-      \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%
-    \def\vr at f#1{%
-      \leavevmode\unskip\vref at space
-      \ref{#1}%
-      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
-      \vpageref[\unskip]{#1}}%
+      \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%%
   }{}}
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -27,7 +27,7 @@
 \providecommand\DeclareCurrentRelease[2]{}
 \DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
 \DeclareCurrentRelease{}{2019-04-01}
-\ProvidesPackage{amsmath}[2022/02/03 v2.17m AMS math features]
+\ProvidesPackage{amsmath}[2022/04/08 v2.17n AMS math features]
 \edef\@temp{\catcode 96=\number\catcode 96 }
 \catcode\string `\`=12
 \def\do#1{\catcode\number`#1=\number\catcode`#1}
@@ -235,11 +235,11 @@
 \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}
 \DeclareRobustCommand{\binom}{\genfrac()\z@{}}
-\newcommand{\dbinom}{\genfrac(){0pt}0}
-\newcommand{\tbinom}{\genfrac(){0pt}1}
+\DeclareRobustCommand{\dbinom}{\genfrac(){0pt}0}
+\DeclareRobustCommand{\tbinom}{\genfrac(){0pt}1}
 \ifx\directlua\@undefined
 \ifx\XeTeXcharclass\@undefined
 \DeclareRobustCommand{\genfrac}[4]{%
@@ -397,7 +397,7 @@
 }{}
 \@saveprimitive\overline\@@overline
 \DeclareRobustCommand{\overline}[1]{\@@overline{#1}}
-\newcommand{\boxed}[1]{\fbox{\m at th$\displaystyle#1$}}
+\DeclareRobustCommand{\boxed}[1]{\fbox{\m at th$\displaystyle#1$}}
 \newcommand{\implies}{\DOTSB\;\Longrightarrow\;}
 \newcommand{\impliedby}{\DOTSB\;\Longleftarrow\;}
 \def\And{\DOTSB\;\mathchar"3026 \;}
@@ -407,7 +407,7 @@
        \else\setboxz at h{\the\toks@\nobreak}\unhbox\z@\fi}%
   \FN@\next@
 }
-\renewcommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
+\DeclareRobustCommand{\colon}{\nobreak\mskip2mu\mathpunct{}\nonscript
   \mkern-\thinmuskip{:}\mskip6muplus1mu\relax}
 \let\ifgtest@\iffalse                              % initial value
 \def\gtest at true{\global\let\ifgtest@\iftrue}
@@ -656,11 +656,11 @@
  {{\cdotp}\mkern1.5mu{\cdotp}\mkern1.5mu{\cdotp}}%
  {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}%
  {{\cdotp}\mkern1mu{\cdotp}\mkern1mu{\cdotp}}}
-\ams at newcommand{\iint}{\DOTSI\protect\MultiIntegral{2}}
-\ams at newcommand{\iiint}{\DOTSI\protect\MultiIntegral{3}}
-\ams at newcommand{\iiiint}{\DOTSI\protect\MultiIntegral{4}}
-\newcommand{\idotsint}{\DOTSI\protect\MultiIntegral{0}}
-\newcommand{\MultiIntegral}[1]{%
+\ams at newcommand{\iint}{\DOTSI\MultiIntegral{2}}
+\ams at newcommand{\iiint}{\DOTSI\MultiIntegral{3}}
+\ams at newcommand{\iiiint}{\DOTSI\MultiIntegral{4}}
+\newcommand{\idotsint}{\DOTSI\MultiIntegral{0}}
+\DeclareRobustCommand{\MultiIntegral}[1]{%
   \edef\ints at c{\noexpand\intop
     \ifnum#1=\z@\noexpand\intdots@\else\noexpand\intkern@\fi
     \ifnum#1>\tw@\noexpand\intop\noexpand\intkern@\fi
@@ -719,10 +719,10 @@
        \vbox{\kern-\normallineskiplimit\copy\strutbox}}}
 \addto at hook\every at math@size{\reset at strutbox@}
 \AtBeginDocument{\reset at strutbox@}
-\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}}
 \ifx\leavevmode at ifvmode\@undefined
 \def\bBigg@#1#2{%
   {\@mathmeasure\z@{\nulldelimiterspace\z@}%
@@ -748,6 +748,10 @@
 \ams at newcommand{\ddddot}[1]{%
   {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@
    \hbox{\,\normalfont....}\vss}}}}
+\AtBeginDocument{%
+  \MakeRobust\dddot
+  \MakeRobust\ddddot
+  }
 \def\set at mathaccent#1#2#3#4{%
   \xdef#2{%
     \@nx\mathaccentV
@@ -898,24 +902,24 @@
 \def\Vec{\vec}
 \def\nonmatherr@#1{\@amsmath at err{\protect
   #1 allowed only in math mode}\@ehd}
-\renewcommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin
+\DeclareRobustCommand{\bmod}{\nonscript\mskip-\medmuskip\mkern5mu\mathbin
   {\operator at font mod}\penalty900
   \mkern5mu\nonscript\mskip-\medmuskip}
-\newcommand{\pod}[1]{\allowbreak
+\DeclareRobustCommand{\pod}[1]{\allowbreak
   \if at display\mkern18mu\else\mkern8mu\fi(#1)}
-\renewcommand{\pmod}[1]{\pod{{\operator at font mod}\mkern6mu#1}}
-\newcommand{\mod}[1]{\allowbreak\if at display\mkern18mu
+\DeclareRobustCommand{\pmod}[1]{\pod{{\operator at font mod}\mkern6mu#1}}
+\DeclareRobustCommand{\mod}[1]{\allowbreak\if at display\mkern18mu
   \else\mkern12mu\fi{\operator at font mod}\,\,#1}
-\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}
-\newcommand{\overset}[2]{\binrel@{#2}%
+\DeclareRobustCommand{\overset}[2]{\binrel@{#2}%
   \binrel@@{\mathop{\kern\z@#2}\limits^{#1}}}
-\newcommand{\underset}[2]{\binrel@{#2}%
+\DeclareRobustCommand{\underset}[2]{\binrel@{#2}%
   \binrel@@{\mathop{\kern\z@#2}\limits_{#1}}}
-\newcommand{\overunderset}[3]{\binrel@{#3}%
+\DeclareRobustCommand{\overunderset}[3]{\binrel@{#3}%
   \binrel@@{\mathop{\kern\z@#3}\limits^{#1}_{#2}}}
-\newcommand{\sideset}[3]{%
+\DeclareRobustCommand{\sideset}[3]{%
   \@mathmeasure\z@\displaystyle{#3}%
   \global\setbox\@ne\vbox to\ht\z@{}\dp\@ne\dp\z@
   \setbox\tw@\box\@ne
@@ -925,7 +929,7 @@
   \hbox to\dimen@{}\mathop{\kern-\dimen@\box4\box6}%
 }
 \ifx\leavevmode at ifvmode\@undefined
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
   \def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
   \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@\box\z@}%
   \ifmmode \@xp\mathpalette\@xp\mathsm at sh
@@ -933,7 +937,7 @@
   \fi
 }
 \else
-\renewcommand{\smash}[1][tb]{%
+\DeclareRobustCommand{\smash}[1][tb]{%
   \def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
   \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@ \leavevmode at ifvmode\box\z@}%
   \ifmmode \@xp\mathpalette\@xp\mathsm at sh
@@ -963,8 +967,8 @@
       \Umathcharnumdef\std at equal\Umathcodenum`\=\relax
     }%
   }
-\ams at def\relbar{\mathrel{\mathpalette\mathsm at sh\std at minus}}
-\ams at def\Relbar{\mathrel\std at equal}
+\ams at DeclareRobustCommand\relbar{\mathrel{\mathpalette\mathsm at sh\std at minus}}
+\ams at DeclareRobustCommand\Relbar{\mathrel\std at equal}
 \def\arrowfill@#1#2#3#4{%
   $\m at th\thickmuskip0mu\medmuskip\thickmuskip\thinmuskip\thickmuskip
    \relax#4#1\mkern-7mu%
@@ -985,6 +989,13 @@
   \mathpalette{\overarrow@\leftarrowfill@}}
 \ams at newcommand{\overleftrightarrow}{%
   \mathpalette{\overarrow@\leftrightarrowfill@}}
+\AtBeginDocument{%
+  \expandafter\let\csname overleftarrow \endcsname\@undefined
+  \expandafter\let\csname overrightarrow \endcsname\@undefined
+  \MakeRobust\overrightarrow
+  \MakeRobust\overleftarrow
+  \MakeRobust\overleftrightarrow
+  }
 \def\underarrow@#1#2#3{%
  \vtop{\ialign{##\crcr$\m at th\hfil#2#3\hfil$\crcr
  \noalign{\nointerlineskip\kern1.3\ex@}#1#2\crcr}}}
@@ -994,6 +1005,11 @@
   \mathpalette{\underarrow@\leftarrowfill@}}
 \ams at newcommand{\underleftrightarrow}{%
   \mathpalette{\underarrow@\leftrightarrowfill@}}
+\AtBeginDocument{%
+  \MakeRobust\underrightarrow
+  \MakeRobust\underleftarrow
+  \MakeRobust\underleftrightarrow
+  }
 \def\ext at arrow#1#2#3#4#5#6#7{%
   \mathrel{\mathop{%
     \setbox\z@\hbox{#5\displaystyle}%
@@ -1009,8 +1025,8 @@
     \@ifnotempty{#6}{_{\if0#1\else\mkern#1mu\fi
                        #6\if0#2\else\mkern#2mu\fi}}}%
 }
-\newcommand{\xrightarrow}[2][]{\ext at arrow 0359\rightarrowfill@{#1}{#2}}
-\newcommand{\xleftarrow}[2][]{\ext at arrow 3095\leftarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xrightarrow}[2][]{\ext at arrow 0359\rightarrowfill@{#1}{#2}}
+\DeclareRobustCommand{\xleftarrow}[2][]{\ext at arrow 3095\leftarrowfill@{#1}{#2}}
 \ifx\directlua\@undefined
 \newenvironment{subarray}[1]{%
   \vcenter\bgroup
@@ -1041,7 +1057,7 @@
   \crcr\egroup\egroup
 }
 \fi
-\newcommand{\substack}[1]{\subarray{c}#1\endsubarray}
+\DeclareRobustCommand{\substack}[1]{\subarray{c}#1\endsubarray}
 \newenvironment{smallmatrix}{\null\,\vcenter\bgroup
   \Let@\restore at math@cr\default at tag
   \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
@@ -1124,7 +1140,7 @@
   \setcounter{equation}{\value{parentequation}}%
   \ignorespacesafterend
 }
-\newcommand{\numberwithin}[3][\arabic]{%
+\DeclareRobustCommand{\numberwithin}[3][\arabic]{%
   \@ifundefined{c@#2}{\@nocounterr{#2}}{%
     \@ifundefined{c@#3}{\@nocnterr{#3}}{%
       \@addtoreset{#2}{#3}%
@@ -1131,17 +1147,17 @@
       \@xp\xdef\csname the#2\endcsname{%
         \@xp\@nx\csname the#3\endcsname .\@nx#1{#2}}}}%
 }
-\newcommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
+\DeclareRobustCommand{\eqref}[1]{\textup{\tagform@{\ref{#1}}}}
 \newcount\dspbrk at lvl
 \dspbrk at lvl=-1
 \interdisplaylinepenalty\@M
-\newcommand{\allowdisplaybreaks}[1][4]{%
+\DeclareRobustCommand{\allowdisplaybreaks}[1][4]{%
   \interdisplaylinepenalty\getdsp at pen{#1}\relax
 }
 \def\getdsp at pen#1{%
   \ifcase #1\@M \or 9999 \or 6999 \or 2999 \or \z@\fi
 }
-\newcommand{\displaybreak}{\new at ifnextchar[\dspbrk@{\dspbrk@[4]}}
+\DeclareRobustCommand{\displaybreak}{\new at ifnextchar[\dspbrk@{\dspbrk@[4]}}
 \chardef\dspbrk at context=\sixt@@n
 \def\dspbrk@[#1]{%
   \ifmeasuring@

Modified: trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsopn.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsopn.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsopn.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -23,7 +23,7 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
 [1994/12/01]% LaTeX date must December 1994 or later
-\ProvidesPackage{amsopn}[2022/01/20 v2.03 operator names]
+\ProvidesPackage{amsopn}[2022/04/08 v2.04 operator names]
 \def\nolimits@{\@ifnextchar\limits{\nolimits\@gobble}{\nolimits}}
 \begingroup \catcode`\"=12
 \ifx\Umathcode\@undefined
@@ -53,58 +53,58 @@
     \DeclareRobustCommand{#2}{\qopname\newmcodes@#1{#3}}}}
 \@onlypreamble\DeclareMathOperator
 \@onlypreamble\@declmathop
-\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}}
 \def\operatorfont{\operator at font}
 \def\operatornamewithlimits{\operatorname*}
-\def\varlim@#1#2{%
+\protected\def\varlim@#1#2{%
   \vtop{\m at th\ialign{##\cr
     \hfil$#1\operator at 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 at th\operator at font lim$}}}
-\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
+\protected\def\varlimsup{\mathop{\mathpalette\varlimsup@{}}\nmlimits@}
 \def\varlimsup@#1{\@@overline{\hbox{$#1\m at th\operator at font lim$}}}
 \let\nmlimits@\displaylimits
 \DeclareOption{namelimits}{\let\nmlimits@\displaylimits}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/atbegshi-ltx.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -46,8 +46,8 @@
 %%               Frank Mittelbach, LaTeX Team
 %%
 %%% From File: ltshipout.dtx
-\providecommand\ltshipoutversion{v1.0l}
-\providecommand\ltshipoutdate{2022/01/06}
+\providecommand\ltshipoutversion{v1.0m}
+\providecommand\ltshipoutdate{2022/05/08}
  %    \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the
 \ProvidesPackage{atbegshi-ltx}
    [2021/01/10 v1.0c

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/atveryend-ltx.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -43,7 +43,7 @@
 %% extension .ins) which are part of the distribution.
 %%% From File: ltfilehook.dtx
 \providecommand\ltfilehookversion{v1.0m}
-\providecommand\ltfilehookdate{2022/03/10}
+\providecommand\ltfilehookdate{2022/04/01}
 \ProvidesPackage{atveryend-ltx}
    [2020/08/19 v1.0a
      Emulation of the original atveryend package^^Jwith kernel methods]

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -224,8 +224,10 @@
 \let\f at depth\z@
 \def \@opcol {%
   \if at twocolumn
+    \@expl@@@mark at update@dblcol at structures@@
     \@outputdblcol
   \else
+    \@expl@@@mark at update@singlecol at structures@@
     \@outputpage
     \fl at trace{PAGE: one column (float? see above) page completed}%
   \fi

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ifthen.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ifthen.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ifthen.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -49,7 +49,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}[1994/12/01]
 \ProvidesPackage{ifthen}
-          [2020/11/24 v1.1c Standard LaTeX ifthen package (DPC)]
+          [2022/04/13 v1.1d Standard LaTeX ifthen package (DPC)]
 \def\TE at throw{\@ne=\@ne\noexpand\fi}
 \def\boolean#1#2{%
   \TE at throw\expandafter\noexpand\csname if#1\endcsname#2}
@@ -72,6 +72,11 @@
     ##2}%
   \expandafter\toks@\expandafter{\expandafter}%
   \expandafter\@tempc\the\toks@#1\@tempc}
+\@ifl at t@r\fmtversion{2022/06/01}
+  {\def\TE at ref@exp{\let\pageref\@kernel at pageref@exp
+                  \let\ref\@kernel at ref@exp}}
+  {\def\TE at ref@exp{\def\@setref##1##2##3{%
+         \ifx##1\relax\z@\else\expandafter##2##1\fi}}}
 \long\def\ifthenelse#1{%
   \toks@{#1}%
   \TE at repl\or\TE at or
@@ -82,8 +87,7 @@
   \TE at repl\NOT\TE at neg
     \begingroup
         \let\protect\@unexpandable at protect
-        \def\@setref##1##2##3{%
-         \ifx##1\relax\z@\else\expandafter##2##1\fi}%
+        \TE at ref@exp
         \def\value##1{\the\csname c@##1\endcsname}%
         \let\equal\TE at equal \let\(\TE at lparen \let\)\TE at rparen
         \let\isodd\TE at odd \let\lengthtest\TE at length

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx	2022-05-19 20:13:40 UTC (rev 63339)
@@ -45,6 +45,7 @@
 %% ltfloat.dtx  (with options: `2ekernel')
 %% ltidxglo.dtx  (with options: `2ekernel')
 %% ltbibl.dtx  (with options: `2ekernel')
+%% ltmarks.dtx  (with options: `trace,2ekernel')
 %% ltpage.dtx  (with options: `2ekernel')
 %% ltclass.dtx  (with options: `2ekernel,tracerollback')
 %% ltkeys.dtx  (with options: `2ekernel')
@@ -705,7 +706,7 @@
 \def\fmtname{LaTeX2e}
 \edef\fmtversion
    {2022-06-01}
-\def\patch at level{-3}
+\def\patch at level{-4}
 \edef\development at branch@name{develop \the\year-\the\month-\the\day}
 \iffalse
 \def\reserved at a#1/#2/#3\@nil{%
@@ -1730,8 +1731,8 @@
     \xdef#1{\the\toks@}%
   \endgroup}
 %%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.0k}
-\def\ltcmddate{2022-02-28}
+\def\ltcmdversion{v1.0l}
+\def\ltcmddate{2022-03-18}
 \message{document commands,}
 \ExplSyntaxOn
 \tl_new:N \l__cmd_arg_spec_tl
@@ -3873,22 +3874,14 @@
     \exp_args:Ne \str_case_e:nnF
       {
         \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
-          {
-            \token_if_macro:NT #1
-              {
-                \exp_after:wN \exp_after:wN
-                \exp_after:wN \token_to_str:N
-                \exp_after:wN \use_i_delimit_by_q_stop:nw
-                  #1 \scan_stop: \q_stop
-              }
-          }
+          { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
       }
       {
-        { \token_to_str:N \__cmd_start:nNNnnn } {#2}
-        { \token_to_str:N \__cmd_start_expandable:nNNNNn } {#3}
-        { \token_to_str:N \__cmd_start_env:nnnnn } {#4}
+        { \exp_not:N \__cmd_start:nNNnnn } {#2}
+        { \exp_not:N \__cmd_start_expandable:nNNNNn } {#3}
+        { \exp_not:N \__cmd_start_env:nnnnn } {#4}
         {
-          \exp_after:wN \token_to_str:N
+          \exp_after:wN \exp_not:N
             \cs:w environment~
               \exp_last_unbraced:Ne \use_none:nnn
                 { \cs_to_str:N #1 } ~end~aux \cs_end:
@@ -4357,8 +4350,8 @@
 \ExplSyntaxOff
 
 %%% From File: lthooks.dtx
-\def\lthooksversion{v1.0s}
-\def\lthooksdate{2022/01/06}
+\def\lthooksversion{v1.0u}
+\def\lthooksdate{2022/05/19}
 \ExplSyntaxOn
 \bool_new:N \g__hook_debug_bool
 \cs_new_eq:NN \__hook_debug:n \use_none:n
@@ -4778,6 +4771,7 @@
 \tl_const:cn { c__hook_generic_env/./begin_tl } { + }
 \tl_const:cn { c__hook_generic_env/./end_tl   } { + }
 \tl_const:cn { c__hook_generic_include/./end_tl } { - }
+\tl_const:cn { c__hook_generic_include/./excluded_tl } { + }
 \clist_map_inline:nn { file , package , class , include }
   {
     \tl_const:cn { c__hook_deprecated_#1/./before_tl } { }
@@ -4831,8 +4825,14 @@
         \__hook_deprecated_generic_warn:n {#1}
         \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1}
           {#2} {#3} {#4}
-        \exp_after:wN \use_none:nnnnnnnnn \use_none:n
+        \__hook_clean_to_scan:w
       }
+    \__hook_if_execute_immediately:nT {#1}
+      {
+        \msg_error:nnnnnn { hooks } { rule-too-late }
+          {#1} {#2} {#3} {#4}
+        \__hook_clean_to_scan:w
+      }
     \__hook_init_structure:n {#1}
     \__hook_rule_gclear:nnn {#1} {#2} {#4}
     \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn }
@@ -4840,8 +4840,11 @@
           {#1} {#2} {#4}
         \__hook_update_hook_code:n {#1}
       }
-      { \msg_error:nnnnnn { hooks } { unknown-rule }
-                          {#1} {#2} {#3} {#4}        }
+      {
+        \msg_error:nnnnnn { hooks } { unknown-rule }
+          {#1} {#2} {#3} {#4}
+      }
+    \s__hook_mark
   }
 \cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
   {
@@ -4912,8 +4915,8 @@
 }
 \cs_new_protected:Npn \__hook_initialize_hook_code:n #1
   {
-    \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
-                                    '#1' \on at line :^^J} }
+    \__hook_debug:n
+      { \iow_term:x { ^^J Update~code~for~hook~'#1' \on at line :^^J } }
     \__hook_include_legacy_code_chunk:n {#1}
     \__hook_if_usable:nT {#1}
       {
@@ -4934,8 +4937,8 @@
             \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop }
             \__hook_initialize_single:ccn
               { __hook~#1 } { g__hook_#1_labels_clist } {#1}
-            \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn
-                                       \g__hook_used_prop {#1}{} }
+            \__hook_debug:n
+              { \exp_args:NNx \prop_gput:Nnn \g__hook_used_prop {#1} { } }
           }
       }
   }
@@ -5092,12 +5095,12 @@
        }
     \prop_put:Nnn \l__hook_work_prop {#1} { }
   }
-\cs_new_eq:cc { __hook_apply_-rule_<:nnn  } { __hook_apply_rule_>:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_>:nnn  } { __hook_apply_rule_<:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
 \cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
 \cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xE:nnn  } { __hook_apply_rule_xE:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xW:nnn  } { __hook_apply_rule_xW:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
 \cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
   {
     \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
@@ -5333,9 +5336,9 @@
     \__hook_tl_gclear:c { __hook~#1 }
     \__hook_tl_gclear:c { __hook_next~#1 }
     \__hook_tl_gclear:c { __hook_toplevel~#1 }
-    \prop_gclear:c { g__hook_#1_code_prop }
+    \prop_gclear_new:c { g__hook_#1_code_prop }
   }
-\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { F, TF }
+\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF }
   {
     \__hook_if_usable:nTF {#1}
       {
@@ -5458,7 +5461,8 @@
     This~command~was~ignored.
   }
 \msg_new:nnnn { hooks } { unknown-rule }
-  { Unknown~ relationship~ '#3'~
+  {
+    Unknown~ relationship~ '#3'~
     between~ labels~ '#2'~ and~ '#4'~
     \str_if_eq:nnF {#1} {??} { ~in~hook~'#1' }. ~
     Perhaps~ a~ misspelling?
@@ -5472,6 +5476,19 @@
     'voids'~ or~
     'unrelated'.
   }
+\msg_new:nnnn { hooks } { rule-too-late }
+  {
+    Sorting~rule~for~'#1'~hook~applied~too~late.\\
+    Try~setting~this~rule~earlier.
+  }
+  {
+    You~tried~to~set~the~ordering~of~hook~'#1'~using\\
+    \ \ \iow_char:N\\DeclareHookRule{#1}{#2}{#3}{#4}\\
+    but~hook~'#1'~was~already~used~as~a~one-time~hook,~
+    thus~sorting~is\\
+    no~longer~possible.~Declare~the~rule~
+    before~the~hook~is~used.
+  }
 \msg_new:nnnn { hooks } { misused-top-level }
   {
     Illegal~use~of~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
@@ -6344,7 +6361,7 @@
 %% File: ltpara.dtx (C) Copyright 2020-2021
 %%% From File: ltpara.dtx
 \def\ltparaversion{v1.0k}
-\def\ltparadate{2021/11/11}
+\def\ltparadate{2022/05/13}
 
 
 \ExplSyntaxOn
@@ -6469,10 +6486,11 @@
 
 \ExplSyntaxOff
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% File: ltmeta.dtx (C) Copyright 2021
+%% File: ltmeta.dtx (C) Copyright 2021, 2022
 %%% From File: ltmeta.dtx
-\def\ltmetaversion{v1.0a}
-\def\ltmetadate{2021/12/07}
+\def\ltmetaversion{v1.0b}
+\def\ltmetadate{2022/05/18}
+\let \IfDocumentMetadataTF \@secondoftwo
 \protected\def\DocumentMetadata{%
   \InputIfFileExists{documentmetadata-support.ltx}%
      {}%
@@ -6484,8 +6502,20 @@
          Without it, the declaration is ignored.}%
       \let\DocumentMetadata\@gobble
      }%
+  \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+  \ifvmode
+    \special{}%
+  \else
+    \@savsf\spacefactor
+    \smash{}%
+    \spacefactor\@savsf
+  \fi}
+\NewDocumentCommand\LinkTargetOn{}{}
+\NewDocumentCommand\LinkTargetOff{}{}
+\NewDocumentCommand\NextLinkTarget{m}{}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% From File: ltspace.dtx
 \message{spacing,}
@@ -6897,6 +6927,8 @@
   \else
     \deadcycles\z@
     \@nameuse{cp@#1}%
+    \UseHook{include/excluded}%
+    \UseOneTimeHook{include/#1/excluded}%
   \fi
   \let\@auxout\@mainaux
 \else
@@ -6907,6 +6939,7 @@
 \NewHook{include/before}
 \NewReversedHook{include/end}
 \NewReversedHook{include/after}
+\NewHook{include/excluded}
 \def\@writeckpt#1{%
   \if at filesw
     \immediate\write\@partaux{\string\@setckpt{#1}\@charlb}%
@@ -10932,9 +10965,19 @@
   \else
    \expandafter#2#1\null
   \fi}
-\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
-\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
-                                   \@secondoftwo{#1}}
+\def\@kernel at sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\@kernel at spageref#1{\expandafter\@setref\csname r@#1\endcsname
+                 \@secondoftwo{#1}}
+\let\@kernel at ref\@kernel at sref
+\let\@kernel at pageref\@kernel at spageref
+\NewDocumentCommand\ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sref}{\@kernel at ref}}
+\NewDocumentCommand\pageref{s}
+   {\IfBooleanTF{#1}{\@kernel at spageref}{\@kernel at pageref}}
+\def\@kernel at pageref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{2}}{0}}
+\def\@kernel at ref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{1}}{0}}
 \def\@newl at bel#1#2#3{{%
   \@ifundefined{#1@#2}%
     \relax
@@ -10956,8 +10999,12 @@
        {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
 }
 \def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
-\DeclareRobustCommand\Ref[1]{\protected at edef\@tempa{\ref{#1}}%
-   \expandafter\MakeUppercase\@tempa}
+\def\@kernel at Ref#1{\protected at edef\@tempa{\@kernel at ref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\def\@kernel at sRef#1{\protected at edef\@tempa{\@kernel at sref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\NewDocumentCommand\Ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sRef}{\@kernel at Ref}}
 \def\@currentlabel{}
 %%% From File: ltmiscen.dtx
 \message{environments,}
@@ -11345,7 +11392,7 @@
     \global\setbox\@ne\vbox{\box\@ne\kern2\p@}%
     \vcenter{\kern-\ht\@ne\unvbox\z@\kern-\baselineskip}\,\right)$}%
   \null\;\vbox{\kern\ht\@ne\box\tw@}\endgroup}
-\def\openup{\afterassignment\@penup\dimen@}
+\protected\def\openup{\afterassignment\@penup\dimen@}
 \def\@penup{\advance\lineskip\dimen@
   \advance\baselineskip\dimen@
   \advance\lineskiplimit\dimen@}
@@ -11495,6 +11542,9 @@
     \expandafter\@ensuredmath
   \fi}
 \long\def\@ensuredmath#1{$\relax#1$}
+\ifx\mathdefaultsmode\@undefined\else
+  \mathdefaultsmode=1
+\fi
 %%% From File: ltlists.dtx
 \newskip\topsep
 \newskip\partopsep
@@ -13425,6 +13475,355 @@
 \def\@cite#1#2{[{#1\if at tempswa , #2\fi}]}
 \let\@cite at ofmt\hbox
 \def\@biblabel#1{[#1]}
+%% File: ltmarks.dtx (C) Copyright 2022
+%%% From File: ltmarks.dtx
+\def\ltmarksversion{v1.0c}
+\def\ltmarksdate{2022/05/06}
+%% \end{function}
+
+\ExplSyntaxOn
+\seq_new:N \g__mark_classes_seq
+\cs_new_protected:Npn \mark_new_class:n #1
+{
+  \seq_if_in:NnTF \g__mark_classes_seq {#1}
+      {
+        \msg_error:nnn { mark } { class-already-defined }
+          {#1}
+      }
+      { \__mark_new_class:nn {#1} }
+}
+\@onlypreamble \mark_new_class:n
+\cs_new_protected:Npn \__mark_new_class:nn #1
+{
+  \__mark_debug:n { \iow_term:x { Marks:~new~mark:~#1~\msg_line_context: } }
+  \exp_args:Nc \newmarks {c__mark_class_ #1 _mark}
+  \seq_gput_right:Nn \g__mark_classes_seq {#1}
+  \tl_new:c   { g__mark_page_top_   #1 _tl }
+  \tl_new:c   { g__mark_page_first_ #1 _tl }
+  \tl_new:c   { g__mark_page_last_  #1 _tl }
+  \tl_new:c   { g__mark_previous-page_top_   #1 _tl }
+  \tl_new:c   { g__mark_previous-page_first_ #1 _tl }
+  \tl_new:c   { g__mark_previous-page_last_  #1 _tl }
+  \tl_new:c   { g__mark_column_top_   #1 _tl }
+  \tl_new:c   { g__mark_column_first_ #1 _tl }
+  \tl_new:c   { g__mark_column_last_  #1 _tl }
+  \tl_new:c   { g__mark_previous-column_top_   #1 _tl }
+  \tl_new:c   { g__mark_previous-column_first_ #1 _tl }
+  \tl_new:c   { g__mark_previous-column_last_  #1 _tl }
+  \tl_new:c   { g__mark_first-column_top_   #1 _tl }
+  \tl_new:c   { g__mark_first-column_first_ #1 _tl }
+  \tl_new:c   { g__mark_first-column_last_  #1 _tl }
+  \tl_new:c   { g__mark_last-column_top_    #1 _tl }
+  \tl_new:c   { g__mark_last-column_first_  #1 _tl }
+  \tl_new:c   { g__mark_last-column_last_   #1 _tl }
+}
+\box_new:N \l__mark_box
+\tl_new:N  \g__mark_tmp_tl
+\tl_new:N  \g__mark_new_top_tl
+\cs_new_protected:Npn \__mark_update_structure:nn #1#2
+  {
+    \__mark_update_structure_alias:nn { previous-#1 } {#1}
+    \group_begin:
+      \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+      \int_set_eq:NN \tex_vbadness:D      \c_max_int
+      \dim_set_eq:NN \tex_vfuzz:D         \c_max_dim
+      \vbox_set_to_ht:Nnn \l__mark_box { -.5\c_max_dim }
+        {
+          #2
+          \tex_unskip:D
+          \box_set_to_last:N \l__mark_box
+          \box_if_vertical:NT \l__mark_box
+              { \vbox_unpack:N \l__mark_box }
+          \tex_kern:D \c_zero_dim
+        }
+      \int_compare:nNnTF \tex_badness:D > 0
+        {
+          \vbox_set_split_to_ht:NNn \l__mark_box \l__mark_box \c_max_dim
+          \seq_map_inline:Nn \g__mark_classes_seq
+            {
+              \tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl }
+              \tl_gset_eq:cN { g__mark_#1_top_##1_tl } \g__mark_new_top_tl
+              \tl_gset:No \g__mark_tmp_tl
+                { \tex_splitbotmarks:D \use:c { c__mark_class_##1_mark } }
+              \tl_if_empty:NTF \g__mark_tmp_tl
+                {
+                  \tl_gset_eq:cN { g__mark_#1_last_ ##1_tl }
+                    \g__mark_new_top_tl
+                  \tl_gset_eq:cN { g__mark_#1_first_##1_tl }
+                    \g__mark_new_top_tl
+                }
+                {
+                  \tl_gset_eq:cN { g__mark_#1_last_##1_tl } \g__mark_tmp_tl
+                  \tl_gset:co { g__mark_#1_first_##1_tl }
+                    {
+                      \tex_splitfirstmarks:D
+                        \use:c { c__mark_class_##1_mark }
+                    }
+                }
+            }
+        }
+        {
+          \msg_error:nnn { mark } { infinite-shrinkage } {#1}
+          \seq_map_inline:Nn \g__mark_classes_seq
+            {
+              \tl_gset_eq:cc { g__mark_#1_top_  ##1_tl }
+                             { g__mark_#1_last_ ##1_tl }
+              \tl_gset_eq:cc { g__mark_#1_first_##1_tl }
+                             { g__mark_#1_last_ ##1_tl }
+            }
+        }
+    \group_end:
+  }
+\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 {
+  \seq_map_inline:Nn \g__mark_classes_seq
+    {
+      \tl_gset_eq:cc { g__mark_ #1 _top_   ##1 _tl }
+                     { g__mark_ #2 _top_   ##1 _tl }
+      \tl_gset_eq:cc { g__mark_ #1 _first_ ##1 _tl }
+                     { g__mark_ #2 _first_ ##1 _tl }
+      \tl_gset_eq:cc { g__mark_ #1 _last_  ##1 _tl }
+                     { g__mark_ #2 _last_  ##1 _tl }
+    }
+}
+\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 {
+  \seq_map_inline:Nn \g__mark_classes_seq
+      {
+        \tl_gset:cn { g__mark_ #1 _top_   ##1 _tl } { \__mark_error:n {#1} }
+        \tl_gset:cn { g__mark_ #1 _first_ ##1 _tl } { \__mark_error:n {#1} }
+        \tl_gset:cn { g__mark_ #1 _last_  ##1 _tl } { \__mark_error:n {#1} }
+      }
+}
+\cs_new_protected:Npn \__mark_error:n #1 {
+  \msg_error:nnn { mark } { invalid-use } {#1}
+}
+\cs_new_protected:Npn \mark_insert:nn #1#2
+{
+  \seq_if_in:NnTF \g__mark_classes_seq {#1}
+      {
+        \group_begin:
+          \@kernel at before@insertmark
+          \hook_use:n { insertmark }
+          \unrestored at protected@xdef \g__mark_tmp_tl {#2}
+          \__mark_debug:n{ \iow_term:x { Marks:~ set~#1~<-~
+              '\tl_to_str:V \g__mark_tmp_tl' ~ \msg_line_context: } }
+          \tex_marks:D \use:c { c__mark_class_ #1 _mark }
+            {
+              \tl_if_empty:NTF \g__mark_tmp_tl
+                { \exp_not:n { \prg_do_nothing: } }
+                { \exp_not:o { \g__mark_tmp_tl } }
+            }
+        \group_end:
+        \if at nobreak\ifvmode\nobreak\fi\fi
+      }
+      {
+        \msg_error:nnx { mark } { unknown-class }
+          { \tl_to_str:n {#1} }
+      }
+}
+\cs_new:Npn \@kernel at before@insertmark {
+          \cs_set_eq:NN \label    \scan_stop:
+          \cs_set_eq:NN \index    \scan_stop:
+          \cs_set_eq:NN \glossary \scan_stop:
+}
+\hook_new:n {insertmark}
+\cs_new:Npn \mark_use_first:nn #1#2 { \exp_not:v { g__mark_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2  { \exp_not:v { g__mark_#1_last_#2_tl }  }
+\cs_new:Npn \mark_use_top:nn #1#2   { \exp_not:v { g__mark_#1_top_#2_tl }   }
+\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+                 { g__mark_ #1 _#4_ #2 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+\prg_new_conditional:Npnn \mark_if_eq:nnnnnn #1#2#3#4#5#6 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+                 { g__mark_ #4 _#6_ #5 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+\msg_new:nnnn { mark } { class-already-defined }
+  { Mark~class~'#1'~already~defined }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~define~a~new~mark~class~called~'#1':~
+    this~mark~class~already~exists.
+    \c__msg_return_text_tl
+  }
+\msg_new:nnnn { mark } { unknown-class }
+  { Unknown~mark~class~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
+    but~this~class~of~marks~does~not~exist.
+  }
+
+\msg_new:nnnn { mark } { invalid-use }
+  { Mark~region~'#1'~not ~usable }
+  {
+    \c__msg_coding_error_text_tl
+    The~region~'#1'~can~only~be~used~after~
+    all~columns~have~been~assembled.
+    \c__msg_return_text_tl
+  }
+\msg_new:nnnn { mark } { infinite-shrinkage }
+  { Infinite~shrinkage~found~in~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    The~mark~region~'#1'~contains~some~infinite~negative~glue~
+    allowing~it~to~shrink~to~an~arbitrary~size.~
+    This~makes~it~impossible~to~split~the~region~apart~to~
+    get~at~its~marks.~They~are~lost.
+  }
+\bool_new:N \g__mark_debug_bool
+\cs_new_eq:NN \__mark_debug:n \use_none:n
+\cs_new_protected:Npn \mark_debug_on:
+  {
+    \bool_gset_true:N \g__mark_debug_bool
+    \__mark_debug_gset:
+  }
+\cs_new_protected:Npn \mark_debug_off:
+  {
+    \bool_gset_false:N \g__mark_debug_bool
+    \__mark_debug_gset:
+  }
+\cs_new_protected:Npn \__mark_debug_gset:
+  {
+    \cs_gset_protected:Npx \__mark_debug:n ##1
+      { \bool_if:NT \g__mark_debug_bool {##1} }
+  }
+\cs_new_eq:NN \DebugMarksOn   \mark_debug_on:
+\cs_new_eq:NN \DebugMarksOff  \mark_debug_off:
+\cs_new_protected:Npn \__mark_class_status:nn #1#2
+   {
+           \typeout{ Marks:~#2~ #1:}
+           \typeout{\@spaces page~ (current):
+             | \exp_not:v { g__mark_page_top_ #2 _tl }
+             | \exp_not:v { g__mark_page_first_ #2 _tl }
+             | \exp_not:v { g__mark_page_last_ #2 _tl }     |}
+           \typeout{\@spaces page~ (previous):
+             | \exp_not:v { g__mark_previous-page_top_ #2 _tl }
+             | \exp_not:v { g__mark_previous-page_first_ #2 _tl }
+             | \exp_not:v { g__mark_previous-page_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (previous):
+             | \exp_not:v { g__mark_previous-column_top_ #2 _tl }
+             | \exp_not:v { g__mark_previous-column_first_ #2 _tl }
+             | \exp_not:v { g__mark_previous-column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (current):
+             | \exp_not:v { g__mark_column_top_ #2 _tl }
+             | \exp_not:v { g__mark_column_first_ #2 _tl }
+             | \exp_not:v { g__mark_column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (first):
+             | \exp_not:v { g__mark_first-column_top_ #2 _tl }
+             | \exp_not:v { g__mark_first-column_first_ #2 _tl }
+             | \exp_not:v { g__mark_first-column_last_ #2 _tl }     |}
+           \typeout{\@spaces column~ (second):
+             | \exp_not:v { g__mark_last-column_top_ #2 _tl }
+             | \exp_not:v { g__mark_last-column_first_ #2 _tl }
+             | \exp_not:v { g__mark_last-column_last_ #2 _tl }     |}
+}
+\cs_new_protected:Npn \__mark_status:n #1
+  {
+    \seq_map_inline:Nn \g__mark_classes_seq
+      { \__mark_class_status:nn {#1} {##1} }
+  }
+\cs_new_eq:NN  \NewMarkClass \mark_new_class:n
+\@onlypreamble \NewMarkClass
+\cs_new_eq:NN \InsertMark  \mark_insert:nn
+\NewExpandableDocumentCommand \FirstMark { O{page} m }
+                    { \mark_use_first:nn {#1}{#2} }
+\NewExpandableDocumentCommand \LastMark { O{page} m }
+                    { \mark_use_last:nn {#1}{#2} }
+\NewExpandableDocumentCommand \TopMark { O{page} m }
+                    { \mark_use_top:nn {#1}{#2} }
+\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
+  \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
+}
+\cs_new_protected:Npn \__mark_update_singlecol_structures: {
+  \box_if_vertical:NTF \@outputbox
+      {
+        \__mark_update_structure:nn {page}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \__mark_update_structure:nn {page}
+           { \hbox_unpack:N  \@outputbox }
+      }
+  \__mark_update_structure_alias:nn {previous-column}{previous-page}
+  \__mark_update_structure_alias:nn {column}{page}
+  \__mark_update_structure_alias:nn {first-column}{page}
+  \__mark_update_structure_alias:nn {last-column}{page}
+     \__mark_debug:n
+         {
+           \__mark_status:n
+                { in~ OR~ (
+                  \legacy_if:nTF {@twoside}
+                         { twoside-
+                           \int_if_odd:nTF \c at page
+                               { odd }{ even }
+                         }
+                         { oneside }
+                         )
+                }
+         }
+}
+\cs_new_protected:Npn \__mark_update_dblcol_structures: {
+  \box_if_vertical:NTF \@outputbox
+      {
+        \__mark_update_structure:nn {column}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \__mark_update_structure:nn {column}
+           { \hbox_unpack:N  \@outputbox }
+      }
+  \legacy_if:nTF {@firstcolumn}
+    {
+      \__mark_update_structure_alias:nn {first-column}{column}
+      \__mark_update_structure_to_err:n {last-column}
+    }
+    {
+      \__mark_update_structure_alias:nn {last-column}{column}
+      \seq_map_inline:Nn \g__mark_classes_seq
+        {
+          \tl_gset_eq:cc { g__mark_previous-page_top_   ##1 _tl }
+                         { g__mark_page_top_            ##1 _tl }
+          \tl_gset_eq:cc { g__mark_previous-page_first_ ##1 _tl }
+                         { g__mark_page_first_          ##1 _tl }
+          \tl_gset_eq:cc { g__mark_previous-page_last_  ##1 _tl }
+                         { g__mark_page_last_           ##1 _tl }
+          \tl_gset_eq:cc { g__mark_page_top_           ##1 _tl }
+                         { g__mark_first-column_top_   ##1 _tl }
+          \tl_gset_eq:cc { g__mark_ page_first_        ##1 _tl }
+                         { g__mark_first-column_first_ ##1 _tl }
+          \tl_gset_eq:cc { g__mark_page_last_          ##1 _tl }
+                         { g__mark_last-column_last_   ##1 _tl }
+        }
+    }
+     \__mark_debug:n
+         {
+           \__mark_status:n
+              { in~ OR~ (
+                \legacy_if:nTF {@twoside}
+                       { twoside-
+                         \int_if_odd:nTF \c at page
+                             { odd }{ even }
+                       }
+                       { oneside }
+                       \space
+                       \legacy_if:nTF {@firstcolumn}
+                              { first~ }{ second~ }
+                              column )
+              }
+         }
+}
+\cs_new_eq:NN  \@expl@@@mark at update@singlecol at structures@@
+               \__mark_update_singlecol_structures:
+\cs_new_eq:NN  \@expl@@@mark at update@dblcol at structures@@
+               \__mark_update_dblcol_structures:
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% From File: ltpage.dtx
 \def\pagestyle#1{%
   \@ifundefined{ps@#1}%
@@ -13442,11 +13841,15 @@
      \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
 \let\@leftmark\@firstoftwo
 \let\@rightmark\@secondoftwo
+\ExplSyntaxOn
 \DeclareRobustCommand*\markboth[2]{%
   \begingroup
     \let\label\relax \let\index\relax \let\glossary\relax
     \unrestored at protected@xdef\@themark {{#1}{#2}}%
     \@temptokena \expandafter{\@themark}%
+    \mark_insert:nn{2e-left}{#1}
+    \mark_insert:nn{2e-right}{#2}
+    \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
     \mark{\the\@temptokena}%
   \endgroup
   \if at nobreak\ifvmode\nobreak\fi\fi}
@@ -13455,9 +13858,12 @@
     \let\label\relax \let\index\relax \let\glossary\relax
     \expandafter\@markright\@themark {#1}%
     \@temptokena \expandafter{\@themark}%
+    \mark_insert:nn{2e-right}{#1}
+    \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
     \mark{\the\@temptokena}%
   \endgroup
   \if at nobreak\ifvmode\nobreak\fi\fi}
+\ExplSyntaxOff
 \def\@markright#1#2#3{\@temptokena {#1}%
   \unrestored at protected@xdef\@themark{{\the\@temptokena}{#3}}}
 \def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
@@ -13851,7 +14257,7 @@
         {\@onefilewithoptions at clashchk{#2}}
         {%
           \@namedef{opt@\@currname.\@currext}{#2}%
-          \expandafter\expandafter\expandafter\ProcessKeyPackageOptions
+          \expandafter\expandafter\expandafter\ProcessKeyOptions
             \expandafter\expandafter\expandafter
               [\csname opt at fam@\@currname.\@currext\endcsname]%
         }%
@@ -14391,14 +14797,14 @@
 \cs_generate_variant:Nn \clist_put_right:Nn { Nv }
 \clist_new:N \l__keys_options_clist
 \bool_new:N \l__keys_options_loading_bool
-\cs_new_protected:Npn \__keys_options:Nn #1#2
-  { \__keys_options_expand_module:Nn \__keys_options:nN {#2} #1 }
-\cs_new_protected:Npn \__keys_options:nN #1#2
+\cs_new_protected:Npn \__keys_options:n #1
+  { \__keys_options_expand_module:Nn \__keys_options_aux:n {#1} }
+\cs_new_protected:Npn \__keys_options_aux:n #1
   {
     \cs_gset_nopar:cpn { opt at fam@\@currname.\@currext } {#1}
     \cs_set_protected:Npn \__keys_option_end: { }
     \clist_clear:N \l__keys_options_clist
-    \__keys_options_global:Nn #2 {#1}
+    \__keys_options_global:n {#1}
     \__keys_options_local:
     \keys_if_exist:nnF {#1} { unknown }
       {
@@ -14426,16 +14832,13 @@
     LaTeX~has~been~asked~to~set~an~option~called~'#1'~
     but~the~#2~package~has~not~created~an~option~with~this~name.
   }
-\cs_new_protected:Npn \__keys_options_global:Nn #1#2
+\cs_new_protected:Npn \__keys_options_global:n #1
   {
     \cs_if_eq:NNF \@classoptionslist \scan_stop:
       {
         \cs_if_eq:NNTF \@currext \@clsextension
-          { \__keys_options_class:n {#2} }
-          {
-            \bool_if:NT #1
-             { \__keys_options_package:n {#2} }
-          }
+          { \__keys_options_class:n {#1} }
+          { \__keys_options_package:n {#1} }
       }
   }
 \cs_new_protected:Npn \__keys_options_class:n #1
@@ -14504,11 +14907,8 @@
       }
   }
 \NewDocumentCommand \ProcessKeyOptions { O { \@currname } }
-  { \__keys_options:Nn \c_true_bool {#1} }
-\NewDocumentCommand \ProcessKeyPackageOptions { O { \@currname } }
-  { \__keys_options:Nn \c_false_bool {#1} }
+  { \__keys_options:n {#1} }
 \@onlypreamble \ProcessKeyOptions
-\@onlypreamble \ProcessKeyPackageOptions
 \cs_new_protected:Npn \__keys_options_loaded:n #1
   {
     \prop_get:NnNT \l_keys_usage_load_prop {#1} \l__keys_tmpa_tl
@@ -14565,7 +14965,7 @@
 \ExplSyntaxOff
 %%% From File: ltfilehook.dtx
 \providecommand\ltfilehookversion{v1.0m}
-\providecommand\ltfilehookdate{2022/03/10}
+\providecommand\ltfilehookdate{2022/04/01}
 \ExplSyntaxOn
 \tl_new:N \CurrentFile
 \tl_new:N \CurrentFilePath
@@ -14852,8 +15252,8 @@
 %%               Frank Mittelbach, LaTeX Team
 %%
 %%% From File: ltshipout.dtx
-\providecommand\ltshipoutversion{v1.0l}
-\providecommand\ltshipoutdate{2022/01/06}
+\providecommand\ltshipoutversion{v1.0m}
+\providecommand\ltshipoutdate{2022/05/08}
  %    \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the
 \ExplSyntaxOn
 \bool_new:N \g__shipout_debug_bool
@@ -14965,8 +15365,8 @@
                       \__shipout_add_foreground_box:n
                           { \UseHook{shipout/lastpage}
                             \@kernel at after@shipout at lastpage }
+                      \bool_gset_true:N \g__shipout_lastpage_handled_bool
                     }
-                    \bool_gset_true:N \g__shipout_lastpage_handled_bool
                 }
               \__shipout_finalize_box:
               \cs_set_eq:NN \protect \exp_not:N
@@ -15211,8 +15611,17 @@
         \iow_now:Nx \@auxout {
           \gdef\string\@abspage at last {\int_use:N \g_shipout_readonly_int}}
      \fi
-      \bool_if:NF \g__shipout_lastpage_handled_bool
+      \bool_if:NTF \g__shipout_lastpage_handled_bool
          {
+           \int_compare:nNnF \@abspage at last = \g_shipout_readonly_int
+            {
+              \@latex at warning@no at line{Hook~ 'shipout/lastpage'~ executed~
+                on~ wrong~ page~ (\@abspage at last\space not~
+                \int_use:N\g_shipout_readonly_int).\MessageBreak
+                Rerun~ to~ correct~ this}%
+            }
+         }
+         {
           \bool_lazy_and:nnF
             { \hook_if_empty_p:n {shipout/lastpage} }
             { \tl_if_empty_p:N \@kernel at after@shipout at lastpage }
@@ -15599,8 +16008,10 @@
 }%
 \def \@opcol {%
   \if at twocolumn
+    \@expl@@@mark at update@dblcol at structures@@
     \@outputdblcol
   \else
+    \@expl@@@mark at update@singlecol at structures@@
     \@outputpage
   \fi
   \global \@mparbottom \z@ \global \@textfloatsheight \z@
@@ -16366,6 +16777,10 @@
 \def\newmarks{%
   \e at alloc\marks \e at alloc@chardef{\count256}\m at ne\e at alloc@top}
 \fi
+\NewMarkClass {2e-left}
+\NewMarkClass {2e-right}
+\NewMarkClass {2e-right-nonempty}
+
 \ifx\XeTeXcharclass\@undefined
 \else
 \ifdim\the\XeTeXversion\XeTeXrevision\p@>0.99993\p@
@@ -16687,13 +17102,13 @@
       \def\i{I}\def\j{J}%
       \def\reserved at a##1##2{\let##1##2\reserved at a}%
       \expandafter\reserved at a\@uclclist\reserved at b{\reserved at b\@gobble}%
-      \protected at edef\reserved at a{\@expl at text@uppercase@@n{#1}}%
+      \protected at edef\reserved at a{\@expl at text@uppercase@@n{\noexpand\unexpanded{#1}}}%
       \reserved at a
    }}
 \DeclareRobustCommand{\MakeLowercase}[1]{{%
       \def\reserved at a##1##2{\let##2##1\reserved at a}%
       \expandafter\reserved at a\@uclclist\reserved at b{\reserved at b\@gobble}%
-      \protected at edef\reserved at a{\@expl at text@lowercase@@n{#1}}%
+      \protected at edef\reserved at a{\@expl at text@lowercase@@n{\noexpand\unexpanded{#1}}}%
       \reserved at a
    }}
 \def\@uclclist{\oe\OE\o\O\ae\AE

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -48,6 +48,7 @@
 %% ltfloat.dtx  (with options: `latexrelease')
 %% ltidxglo.dtx  (with options: `latexrelease')
 %% ltbibl.dtx  (with options: `latexrelease')
+%% ltmarks.dtx  (with options: `latexrelease')
 %% ltpage.dtx  (with options: `latexrelease')
 %% ltclass.dtx  (with options: `latexrelease,tracerollback')
 %% ltfilehook.dtx  (with options: `latexrelease')
@@ -1889,8 +1890,8 @@
 
 \EndIncludeInRelease
 %%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.0k}
-\def\ltcmddate{2022-02-28}
+\def\ltcmdversion{v1.0l}
+\def\ltcmddate{2022-03-18}
 \edef\@latexrelease at catcode@null{\the\catcode`\^^@ }
 \catcode`\^^@=12
 \ExplSyntaxOn
@@ -4049,22 +4050,14 @@
     \exp_args:Ne \str_case_e:nnF
       {
         \exp_args:Nf \tl_if_empty:nT { \cs_argument_spec:N #1 }
-          {
-            \token_if_macro:NT #1
-              {
-                \exp_after:wN \exp_after:wN
-                \exp_after:wN \token_to_str:N
-                \exp_after:wN \use_i_delimit_by_q_stop:nw
-                  #1 \scan_stop: \q_stop
-              }
-          }
+          { \exp_not:N \exp_not:n { \exp_not:e { \tl_head:N #1 } } }
       }
       {
-        { \token_to_str:N \__cmd_start:nNNnnn } {#2}
-        { \token_to_str:N \__cmd_start_expandable:nNNNNn } {#3}
-        { \token_to_str:N \__cmd_start_env:nnnnn } {#4}
+        { \exp_not:N \__cmd_start:nNNnnn } {#2}
+        { \exp_not:N \__cmd_start_expandable:nNNNNn } {#3}
+        { \exp_not:N \__cmd_start_env:nnnnn } {#4}
         {
-          \exp_after:wN \token_to_str:N
+          \exp_after:wN \exp_not:N
             \cs:w environment~
               \exp_last_unbraced:Ne \use_none:nnn
                 { \cs_to_str:N #1 } ~end~aux \cs_end:
@@ -4552,8 +4545,8 @@
 \catcode`\^^@=\@latexrelease at catcode@null\relax
 
 %%% From File: lthooks.dtx
-\def\lthooksversion{v1.0s}
-\def\lthooksdate{2022/01/06}
+\def\lthooksversion{v1.0u}
+\def\lthooksdate{2022/05/19}
 \ExplSyntaxOn
 \NewModuleRelease{2020/10/01}{lthooks}
                  {The~hook~management~system}
@@ -5133,6 +5126,7 @@
 \tl_const:cn { c__hook_generic_env/./begin_tl } { + }
 \tl_const:cn { c__hook_generic_env/./end_tl   } { + }
 \tl_const:cn { c__hook_generic_include/./end_tl } { - }
+\tl_const:cn { c__hook_generic_include/./excluded_tl } { + }
 \clist_map_inline:nn { file , package , class , include }
   {
     \tl_const:cn { c__hook_deprecated_#1/./before_tl } { }
@@ -5194,6 +5188,8 @@
     \__hook_normalize_hook_rule_args:Nnnnn \__hook_gset_rule:nnnn
       {#1} {#2} {#3} {#4}
   }
+\IncludeInRelease{2022/06/01}{\__hook_gset_rule:nnnn}
+                 {Refuse~setting~rule~for~one-time~hooks}
 \cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4
   {
     \__hook_if_deprecated_generic:nT {#1}
@@ -5201,6 +5197,37 @@
         \__hook_deprecated_generic_warn:n {#1}
         \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1}
           {#2} {#3} {#4}
+        \__hook_clean_to_scan:w
+      }
+    \__hook_if_execute_immediately:nT {#1}
+      {
+        \msg_error:nnnnnn { hooks } { rule-too-late }
+          {#1} {#2} {#3} {#4}
+        \__hook_clean_to_scan:w
+      }
+    \__hook_init_structure:n {#1}
+    \__hook_rule_gclear:nnn {#1} {#2} {#4}
+    \cs_if_exist_use:cTF { __hook_rule_#3_gset:nnn }
+      {
+          {#1} {#2} {#4}
+        \__hook_update_hook_code:n {#1}
+      }
+      {
+        \msg_error:nnnnnn { hooks } { unknown-rule }
+          {#1} {#2} {#3} {#4}
+      }
+    \s__hook_mark
+  }
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}{\__hook_gset_rule:nnnn}
+                 {Refuse~setting~rule~for~one-time~hooks}
+\cs_new_protected:Npn \__hook_gset_rule:nnnn #1#2#3#4
+  {
+    \__hook_if_deprecated_generic:nT {#1}
+      {
+        \__hook_deprecated_generic_warn:n {#1}
+        \__hook_do_deprecated_generic:Nn \__hook_gset_rule:nnnn {#1}
+          {#2} {#3} {#4}
         \exp_after:wN \use_none:nnnnnnnnn \use_none:n
       }
     \__hook_init_structure:n {#1}
@@ -5210,9 +5237,12 @@
           {#1} {#2} {#4}
         \__hook_update_hook_code:n {#1}
       }
-      { \msg_error:nnnnnn { hooks } { unknown-rule }
-                          {#1} {#2} {#3} {#4}        }
+      {
+        \msg_error:nnnnnn { hooks } { unknown-rule }
+          {#1} {#2} {#3} {#4}
+      }
   }
+\EndIncludeInRelease
 \cs_new_protected:Npn \__hook_rule_before_gset:nnn #1#2#3
   {
     \__hook_tl_gset:cx { g__hook_#1_rule_ \__hook_label_pair:nn {#2} {#3} _tl }
@@ -5282,8 +5312,8 @@
 }
 \cs_new_protected:Npn \__hook_initialize_hook_code:n #1
   {
-    \__hook_debug:n{ \iow_term:x{^^JUpdate~ code~ for~ hook~
-                                    '#1' \on at line :^^J} }
+    \__hook_debug:n
+      { \iow_term:x { ^^J Update~code~for~hook~'#1' \on at line :^^J } }
     \__hook_include_legacy_code_chunk:n {#1}
     \__hook_if_usable:nT {#1}
       {
@@ -5304,8 +5334,8 @@
             \prop_set_eq:Nc \l__hook_work_prop { g__hook_#1_code_prop }
             \__hook_initialize_single:ccn
               { __hook~#1 } { g__hook_#1_labels_clist } {#1}
-            \__hook_debug:n{ \exp_args:NNx \prop_gput:Nnn
-                                       \g__hook_used_prop {#1}{} }
+            \__hook_debug:n
+              { \exp_args:NNx \prop_gput:Nnn \g__hook_used_prop {#1} { } }
           }
       }
   }
@@ -5462,12 +5492,12 @@
        }
     \prop_put:Nnn \l__hook_work_prop {#1} { }
   }
-\cs_new_eq:cc { __hook_apply_-rule_<:nnn  } { __hook_apply_rule_>:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_>:nnn  } { __hook_apply_rule_<:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_<:nnn } { __hook_apply_rule_>:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_>:nnn } { __hook_apply_rule_<:nnn }
 \cs_new_eq:cc { __hook_apply_-rule_<-:nnn } { __hook_apply_rule_<-:nnn }
 \cs_new_eq:cc { __hook_apply_-rule_->:nnn } { __hook_apply_rule_->:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xE:nnn  } { __hook_apply_rule_xE:nnn }
-\cs_new_eq:cc { __hook_apply_-rule_xW:nnn  } { __hook_apply_rule_xW:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xE:nnn } { __hook_apply_rule_xE:nnn }
+\cs_new_eq:cc { __hook_apply_-rule_xW:nnn } { __hook_apply_rule_xW:nnn }
 \cs_new_protected:Npn \__hook_msg_pair_found:nnn #1#2#3
   {
     \iow_term:x{~ \str_if_eq:nnTF {#3} {??} {default} {~normal} ~
@@ -5763,9 +5793,9 @@
     \__hook_tl_gclear:c { __hook~#1 }
     \__hook_tl_gclear:c { __hook_next~#1 }
     \__hook_tl_gclear:c { __hook_toplevel~#1 }
-    \prop_gclear:c { g__hook_#1_code_prop }
+    \prop_gclear_new:c { g__hook_#1_code_prop }
   }
-\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { F, TF }
+\prg_new_conditional:Npnn \__hook_if_execute_immediately:n #1 { T, F, TF }
   {
     \__hook_if_usable:nTF {#1}
       {
@@ -5888,7 +5918,8 @@
     This~command~was~ignored.
   }
 \msg_new:nnnn { hooks } { unknown-rule }
-  { Unknown~ relationship~ '#3'~
+  {
+    Unknown~ relationship~ '#3'~
     between~ labels~ '#2'~ and~ '#4'~
     \str_if_eq:nnF {#1} {??} { ~in~hook~'#1' }. ~
     Perhaps~ a~ misspelling?
@@ -5902,6 +5933,19 @@
     'voids'~ or~
     'unrelated'.
   }
+\msg_new:nnnn { hooks } { rule-too-late }
+  {
+    Sorting~rule~for~'#1'~hook~applied~too~late.\\
+    Try~setting~this~rule~earlier.
+  }
+  {
+    You~tried~to~set~the~ordering~of~hook~'#1'~using\\
+    \ \ \iow_char:N\\DeclareHookRule{#1}{#2}{#3}{#4}\\
+    but~hook~'#1'~was~already~used~as~a~one-time~hook,~
+    thus~sorting~is\\
+    no~longer~possible.~Declare~the~rule~
+    before~the~hook~is~used.
+  }
 \msg_new:nnnn { hooks } { misused-top-level }
   {
     Illegal~use~of~\iow_char:N \\AddToHook{#1}[top-level]{...}.\\
@@ -6582,7 +6626,7 @@
 %% File: ltpara.dtx (C) Copyright 2020-2021
 %%% From File: ltpara.dtx
 \def\ltparaversion{v1.0k}
-\def\ltparadate{2021/11/11}
+\def\ltparadate{2022/05/13}
 
 
 \ExplSyntaxOn
@@ -6726,12 +6770,13 @@
 \EndModuleRelease
 \ExplSyntaxOff
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% File: ltmeta.dtx (C) Copyright 2021
+%% File: ltmeta.dtx (C) Copyright 2021, 2022
 %%% From File: ltmeta.dtx
-\def\ltmetaversion{v1.0a}
-\def\ltmetadate{2021/12/07}
-\NewModuleRelease{2021/06/01}{ltmeta}
+\def\ltmetaversion{v1.0b}
+\def\ltmetadate{2022/05/18}
+\NewModuleRelease{2022/06/01}{ltmeta}
                  {Document Metadata handling}
+\let \IfDocumentMetadataTF \@secondoftwo
 \protected\def\DocumentMetadata{%
   \InputIfFileExists{documentmetadata-support.ltx}%
      {}%
@@ -6743,8 +6788,20 @@
          Without it, the declaration is ignored.}%
       \let\DocumentMetadata\@gobble
      }%
+  \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+  \ifvmode
+    \special{}%
+  \else
+    \@savsf\spacefactor
+    \smash{}%
+    \spacefactor\@savsf
+  \fi}
+\NewDocumentCommand\LinkTargetOn{}{}
+\NewDocumentCommand\LinkTargetOff{}{}
+\NewDocumentCommand\NextLinkTarget{m}{}
 \IncludeInRelease{0000/00/00}{ltmeta}%
                  {Undo Document Metadata handling}
 
@@ -7338,8 +7395,61 @@
   \else \@include#1 \fi}
 
 \EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {\@include}{Spaces in file names and hooks}%
+\def\@include#1 {%
+\ifx\@nodocument\relax
+  \clearpage
+  \if at filesw
+    \immediate\write\@mainaux{\string\@input{#1.aux}}%
+  \fi
+  \@tempswatrue
+  \if at partsw
+    \@tempswafalse
+    \edef\reserved at b{#1}%
+    \@for\reserved at a:=\@partlist\do
+      {\ifx\reserved at a\reserved at b\@tempswatrue\fi}%
+  \fi
+  \if at tempswa
+    \let\@auxout\@partaux
+    \if at filesw
+      \immediate\openout\@partaux "#1.aux"
+      \immediate\write\@partaux{\relax}%
+    \fi
+    \@filehook at set@CurrentFile
+    \UseHook{include/before}%
+    \UseOneTimeHook{include/#1/before}%
+    \@input@{#1.tex}%
+    \UseOneTimeHook{include/#1/end}%
+    \UseHook{include/end}%
+    \clearpage
+    \UseOneTimeHook{include/#1/after}%
+    \UseHook{include/after}%
+    \clearpage
+    \@writeckpt{#1}%
+    \if at filesw
+      \immediate\closeout\@partaux
+    \fi
+  \else
+    \deadcycles\z@
+    \@nameuse{cp@#1}%
+    \UseHook{include/excluded}%
+    \UseOneTimeHook{include/#1/excluded}%
+  \fi
+  \let\@auxout\@mainaux
+\else
+\@latex at warning{%
+  \noexpand\include should only be used after \string\begin{document}}%
+\@input@{#1}%
+\fi}
+\NewHook{include/before}
+\NewReversedHook{include/end}
+\NewReversedHook{include/after}
+\NewHook{include/excluded}
+\EndIncludeInRelease
 \IncludeInRelease{2020/10/01}%
                  {\@include}{Spaces in file names and hooks}%
+\EndIncludeInRelease
 \def\@include#1 {%
 \ifx\@nodocument\relax
   \clearpage
@@ -7386,9 +7496,8 @@
 \NewHook{include/before}
 \NewReversedHook{include/end}
 \NewReversedHook{include/after}
-\EndIncludeInRelease
 \IncludeInRelease{0000/00/00}%
-                 {\@include}{Spaces in file names}%
+                 {\@include}{Spaces in file names and hooks}%
 \def\@include#1 {%
   \clearpage
   \if at filesw
@@ -10868,8 +10977,47 @@
 
 %%% From File: ltpageno.dtx
 %%% From File: ltxref.dtx
+\IncludeInRelease{2022/06/01}%
+                 {\ref}{Add starred reference commands}%
+\def\@kernel at sref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\@kernel at spageref#1{\expandafter\@setref\csname r@#1\endcsname
+                 \@secondoftwo{#1}}
+\let\@kernel at ref\@kernel at sref
+\let\@kernel at pageref\@kernel at spageref
+\NewDocumentCommand\ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sref}{\@kernel at ref}}
+\NewDocumentCommand\pageref{s}
+   {\IfBooleanTF{#1}{\@kernel at spageref}{\@kernel at pageref}}
+\def\@kernel at pageref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{2}}{0}}
+\def\@kernel at ref@exp#1{\csname cs_if_exist:cTF\endcsname
+   {r@#1}{\csname tl_item:cn\endcsname{r@#1}{1}}{0}}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+                 {\ref}{Add starred reference commands}%
+\def\ref#1{\expandafter\@setref\csname r@#1\endcsname\@firstoftwo{#1}}
+\def\pageref#1{\expandafter\@setref\csname r@#1\endcsname
+                                   \@secondoftwo{#1}}
+
+\EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {\Ref}{Add starred version}%
+\def\@currentcounter{}
+\def\refstepcounter#1{\stepcounter{#1}%
+    \edef\@currentcounter{#1}%
+    \protected at edef\@currentlabel
+       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+}
+\def\labelformat#1{\expandafter\def\csname p@#1\endcsname##1}
+\def\@kernel at Ref#1{\protected at edef\@tempa{\@kernel at ref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\def\@kernel at sRef#1{\protected at edef\@tempa{\@kernel at sref{#1}}%
+       \expandafter\MakeUppercase\@tempa}
+\NewDocumentCommand\Ref{s}
+   {\IfBooleanTF{#1}{\@kernel at sRef}{\@kernel at Ref}}
+\EndIncludeInRelease
 \IncludeInRelease{2020/10/01}%
-                 {\refstepcounter}{Add \@currentcounter}%
+                 {\Ref}{Add starred version}%
 \def\@currentcounter{}
 \def\refstepcounter#1{\stepcounter{#1}%
     \edef\@currentcounter{#1}%
@@ -12883,9 +13031,337 @@
   \@esphack}
 
 \EndIncludeInRelease
+%% File: ltmarks.dtx (C) Copyright 2022
+%%% From File: ltmarks.dtx
+\def\ltmarksversion{v1.0c}
+\def\ltmarksdate{2022/05/06}
+%% \end{function}
+
+\ExplSyntaxOn
+\NewModuleRelease{2022/06/01}{ltmarks}
+                 {Marks~handling}
+\seq_new:N \g__mark_classes_seq
+\cs_new_protected:Npn \mark_new_class:n #1
+{
+  \seq_if_in:NnTF \g__mark_classes_seq {#1}
+      {
+        \msg_error:nnn { mark } { class-already-defined }
+          {#1}
+      }
+      { \__mark_new_class:nn {#1} }
+}
+\@onlypreamble \mark_new_class:n
+\cs_new_protected:Npn \__mark_new_class:nn #1
+{
+  \exp_args:Nc \newmarks {c__mark_class_ #1 _mark}
+  \seq_gput_right:Nn \g__mark_classes_seq {#1}
+  \tl_new:c   { g__mark_page_top_   #1 _tl }
+  \tl_new:c   { g__mark_page_first_ #1 _tl }
+  \tl_new:c   { g__mark_page_last_  #1 _tl }
+  \tl_new:c   { g__mark_previous-page_top_   #1 _tl }
+  \tl_new:c   { g__mark_previous-page_first_ #1 _tl }
+  \tl_new:c   { g__mark_previous-page_last_  #1 _tl }
+  \tl_new:c   { g__mark_column_top_   #1 _tl }
+  \tl_new:c   { g__mark_column_first_ #1 _tl }
+  \tl_new:c   { g__mark_column_last_  #1 _tl }
+  \tl_new:c   { g__mark_previous-column_top_   #1 _tl }
+  \tl_new:c   { g__mark_previous-column_first_ #1 _tl }
+  \tl_new:c   { g__mark_previous-column_last_  #1 _tl }
+  \tl_new:c   { g__mark_first-column_top_   #1 _tl }
+  \tl_new:c   { g__mark_first-column_first_ #1 _tl }
+  \tl_new:c   { g__mark_first-column_last_  #1 _tl }
+  \tl_new:c   { g__mark_last-column_top_    #1 _tl }
+  \tl_new:c   { g__mark_last-column_first_  #1 _tl }
+  \tl_new:c   { g__mark_last-column_last_   #1 _tl }
+}
+\box_new:N \l__mark_box
+\tl_new:N  \g__mark_tmp_tl
+\tl_new:N  \g__mark_new_top_tl
+\cs_new_protected:Npn \__mark_update_structure:nn #1#2
+  {
+    \__mark_update_structure_alias:nn { previous-#1 } {#1}
+    \group_begin:
+      \dim_set_eq:NN \tex_splitmaxdepth:D \c_max_dim
+      \int_set_eq:NN \tex_vbadness:D      \c_max_int
+      \dim_set_eq:NN \tex_vfuzz:D         \c_max_dim
+      \vbox_set_to_ht:Nnn \l__mark_box { -.5\c_max_dim }
+        {
+          #2
+          \tex_unskip:D
+          \box_set_to_last:N \l__mark_box
+          \box_if_vertical:NT \l__mark_box
+              { \vbox_unpack:N \l__mark_box }
+          \tex_kern:D \c_zero_dim
+        }
+      \int_compare:nNnTF \tex_badness:D > 0
+        {
+          \vbox_set_split_to_ht:NNn \l__mark_box \l__mark_box \c_max_dim
+          \seq_map_inline:Nn \g__mark_classes_seq
+            {
+              \tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl }
+              \tl_gset_eq:cN { g__mark_#1_top_##1_tl } \g__mark_new_top_tl
+              \tl_gset:No \g__mark_tmp_tl
+                { \tex_splitbotmarks:D \use:c { c__mark_class_##1_mark } }
+              \tl_if_empty:NTF \g__mark_tmp_tl
+                {
+                  \tl_gset_eq:cN { g__mark_#1_last_ ##1_tl }
+                    \g__mark_new_top_tl
+                  \tl_gset_eq:cN { g__mark_#1_first_##1_tl }
+                    \g__mark_new_top_tl
+                }
+                {
+                  \tl_gset_eq:cN { g__mark_#1_last_##1_tl } \g__mark_tmp_tl
+                  \tl_gset:co { g__mark_#1_first_##1_tl }
+                    {
+                      \tex_splitfirstmarks:D
+                        \use:c { c__mark_class_##1_mark }
+                    }
+                }
+            }
+        }
+        {
+          \msg_error:nnn { mark } { infinite-shrinkage } {#1}
+          \seq_map_inline:Nn \g__mark_classes_seq
+            {
+              \tl_gset_eq:cc { g__mark_#1_top_  ##1_tl }
+                             { g__mark_#1_last_ ##1_tl }
+              \tl_gset_eq:cc { g__mark_#1_first_##1_tl }
+                             { g__mark_#1_last_ ##1_tl }
+            }
+        }
+    \group_end:
+  }
+\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 {
+  \seq_map_inline:Nn \g__mark_classes_seq
+    {
+      \tl_gset_eq:cc { g__mark_ #1 _top_   ##1 _tl }
+                     { g__mark_ #2 _top_   ##1 _tl }
+      \tl_gset_eq:cc { g__mark_ #1 _first_ ##1 _tl }
+                     { g__mark_ #2 _first_ ##1 _tl }
+      \tl_gset_eq:cc { g__mark_ #1 _last_  ##1 _tl }
+                     { g__mark_ #2 _last_  ##1 _tl }
+    }
+}
+\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 {
+  \seq_map_inline:Nn \g__mark_classes_seq
+      {
+        \tl_gset:cn { g__mark_ #1 _top_   ##1 _tl } { \__mark_error:n {#1} }
+        \tl_gset:cn { g__mark_ #1 _first_ ##1 _tl } { \__mark_error:n {#1} }
+        \tl_gset:cn { g__mark_ #1 _last_  ##1 _tl } { \__mark_error:n {#1} }
+      }
+}
+\cs_new_protected:Npn \__mark_error:n #1 {
+  \msg_error:nnn { mark } { invalid-use } {#1}
+}
+\cs_new_protected:Npn \mark_insert:nn #1#2
+{
+  \seq_if_in:NnTF \g__mark_classes_seq {#1}
+      {
+        \group_begin:
+          \@kernel at before@insertmark
+          \hook_use:n { insertmark }
+          \unrestored at protected@xdef \g__mark_tmp_tl {#2}
+          \tex_marks:D \use:c { c__mark_class_ #1 _mark }
+            {
+              \tl_if_empty:NTF \g__mark_tmp_tl
+                { \exp_not:n { \prg_do_nothing: } }
+                { \exp_not:o { \g__mark_tmp_tl } }
+            }
+        \group_end:
+        \if at nobreak\ifvmode\nobreak\fi\fi
+      }
+      {
+        \msg_error:nnx { mark } { unknown-class }
+          { \tl_to_str:n {#1} }
+      }
+}
+\cs_new:Npn \@kernel at before@insertmark {
+          \cs_set_eq:NN \label    \scan_stop:
+          \cs_set_eq:NN \index    \scan_stop:
+          \cs_set_eq:NN \glossary \scan_stop:
+}
+\hook_new:n {insertmark}
+\cs_new:Npn \mark_use_first:nn #1#2 { \exp_not:v { g__mark_#1_first_#2_tl } }
+\cs_new:Npn \mark_use_last:nn #1#2  { \exp_not:v { g__mark_#1_last_#2_tl }  }
+\cs_new:Npn \mark_use_top:nn #1#2   { \exp_not:v { g__mark_#1_top_#2_tl }   }
+\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+                 { g__mark_ #1 _#4_ #2 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+\prg_new_conditional:Npnn \mark_if_eq:nnnnnn #1#2#3#4#5#6 { T , F , TF }
+{
+  \tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
+                 { g__mark_ #4 _#6_ #5 _tl }
+                 \prg_return_true:
+                 \prg_return_false:
+}
+\msg_new:nnnn { mark } { class-already-defined }
+  { Mark~class~'#1'~already~defined }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~define~a~new~mark~class~called~'#1':~
+    this~mark~class~already~exists.
+    \c__msg_return_text_tl
+  }
+\msg_new:nnnn { mark } { unknown-class }
+  { Unknown~mark~class~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
+    but~this~class~of~marks~does~not~exist.
+  }
+
+\msg_new:nnnn { mark } { invalid-use }
+  { Mark~region~'#1'~not ~usable }
+  {
+    \c__msg_coding_error_text_tl
+    The~region~'#1'~can~only~be~used~after~
+    all~columns~have~been~assembled.
+    \c__msg_return_text_tl
+  }
+\msg_new:nnnn { mark } { infinite-shrinkage }
+  { Infinite~shrinkage~found~in~'#1'. }
+  {
+    \c__msg_coding_error_text_tl
+    The~mark~region~'#1'~contains~some~infinite~negative~glue~
+    allowing~it~to~shrink~to~an~arbitrary~size.~
+    This~makes~it~impossible~to~split~the~region~apart~to~
+    get~at~its~marks.~They~are~lost.
+  }
+\bool_new:N \g__mark_debug_bool
+\cs_new_eq:NN \__mark_debug:n \use_none:n
+\cs_new_protected:Npn \mark_debug_on:
+  {
+    \bool_gset_true:N \g__mark_debug_bool
+    \__mark_debug_gset:
+  }
+\cs_new_protected:Npn \mark_debug_off:
+  {
+    \bool_gset_false:N \g__mark_debug_bool
+    \__mark_debug_gset:
+  }
+\cs_new_protected:Npn \__mark_debug_gset:
+  {
+    \cs_gset_protected:Npx \__mark_debug:n ##1
+      { \bool_if:NT \g__mark_debug_bool {##1} }
+  }
+\cs_new_eq:NN \DebugMarksOn   \mark_debug_on:
+\cs_new_eq:NN \DebugMarksOff  \mark_debug_off:
+\cs_new_eq:NN  \NewMarkClass \mark_new_class:n
+\@onlypreamble \NewMarkClass
+\cs_new_eq:NN \InsertMark  \mark_insert:nn
+\NewExpandableDocumentCommand \FirstMark { O{page} m }
+                    { \mark_use_first:nn {#1}{#2} }
+\NewExpandableDocumentCommand \LastMark { O{page} m }
+                    { \mark_use_last:nn {#1}{#2} }
+\NewExpandableDocumentCommand \TopMark { O{page} m }
+                    { \mark_use_top:nn {#1}{#2} }
+\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
+  \mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
+}
+\cs_new_protected:Npn \__mark_update_singlecol_structures: {
+  \box_if_vertical:NTF \@outputbox
+      {
+        \__mark_update_structure:nn {page}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \__mark_update_structure:nn {page}
+           { \hbox_unpack:N  \@outputbox }
+      }
+  \__mark_update_structure_alias:nn {previous-column}{previous-page}
+  \__mark_update_structure_alias:nn {column}{page}
+  \__mark_update_structure_alias:nn {first-column}{page}
+  \__mark_update_structure_alias:nn {last-column}{page}
+}
+\cs_new_protected:Npn \__mark_update_dblcol_structures: {
+  \box_if_vertical:NTF \@outputbox
+      {
+        \__mark_update_structure:nn {column}
+           { \vbox_unpack:N  \@outputbox }
+      }
+      {
+        \__mark_update_structure:nn {column}
+           { \hbox_unpack:N  \@outputbox }
+      }
+  \legacy_if:nTF {@firstcolumn}
+    {
+      \__mark_update_structure_alias:nn {first-column}{column}
+      \__mark_update_structure_to_err:n {last-column}
+    }
+    {
+      \__mark_update_structure_alias:nn {last-column}{column}
+      \seq_map_inline:Nn \g__mark_classes_seq
+        {
+          \tl_gset_eq:cc { g__mark_previous-page_top_   ##1 _tl }
+                         { g__mark_page_top_            ##1 _tl }
+          \tl_gset_eq:cc { g__mark_previous-page_first_ ##1 _tl }
+                         { g__mark_page_first_          ##1 _tl }
+          \tl_gset_eq:cc { g__mark_previous-page_last_  ##1 _tl }
+                         { g__mark_page_last_           ##1 _tl }
+          \tl_gset_eq:cc { g__mark_page_top_           ##1 _tl }
+                         { g__mark_first-column_top_   ##1 _tl }
+          \tl_gset_eq:cc { g__mark_ page_first_        ##1 _tl }
+                         { g__mark_first-column_first_ ##1 _tl }
+          \tl_gset_eq:cc { g__mark_page_last_          ##1 _tl }
+                         { g__mark_last-column_last_   ##1 _tl }
+        }
+    }
+}
+\cs_new_eq:NN  \@expl@@@mark at update@singlecol at structures@@
+               \__mark_update_singlecol_structures:
+\cs_new_eq:NN  \@expl@@@mark at update@dblcol at structures@@
+               \__mark_update_dblcol_structures:
+\IncludeInRelease{0000/00/00}{ltmarks}%
+                 {Undo~Marks~handling}
+
+\DeclareRobustCommand \NewMarkClass[1]{}
+\DeclareRobustCommand \InsertMark[2]{}
+\RenewExpandableDocumentCommand \FirstMark { O{} m } { }
+\RenewExpandableDocumentCommand \LastMark { O{} m } { }
+\RenewExpandableDocumentCommand \TopMark { O{} m } { }
+\RenewExpandableDocumentCommand \IfMarksEqualTF { O{} mmm }{ }
+
+\let \@expl@@@mark at update@singlecol at structures@@ \relax
+\let \@expl@@@mark at update@dblcol at structures@@ \relax
+
+
+\EndModuleRelease
+\ExplSyntaxOff
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%% From File: ltpage.dtx
+\IncludeInRelease{2022/06/01}%
+                 {\markboth}{New mark support}%
+\ExplSyntaxOn
+\DeclareRobustCommand*\markboth[2]{%
+  \begingroup
+    \let\label\relax \let\index\relax \let\glossary\relax
+    \unrestored at protected@xdef\@themark {{#1}{#2}}%
+    \@temptokena \expandafter{\@themark}%
+    \mark_insert:nn{2e-left}{#1}
+    \mark_insert:nn{2e-right}{#2}
+    \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
+    \mark{\the\@temptokena}%
+  \endgroup
+  \if at nobreak\ifvmode\nobreak\fi\fi}
+\DeclareRobustCommand*\markright[1]{%
+  \begingroup
+    \let\label\relax \let\index\relax \let\glossary\relax
+    \expandafter\@markright\@themark {#1}%
+    \@temptokena \expandafter{\@themark}%
+    \mark_insert:nn{2e-right}{#1}
+    \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
+    \mark{\the\@temptokena}%
+  \endgroup
+  \if at nobreak\ifvmode\nobreak\fi\fi}
+\ExplSyntaxOff
+\EndIncludeInRelease
 \IncludeInRelease{2019/10/01}%
                  {\markboth}{Make commands robust}%
+
 \DeclareRobustCommand*\markboth[2]{%
   \begingroup
     \let\label\relax \let\index\relax \let\glossary\relax
@@ -12902,6 +13378,7 @@
     \mark{\the\@temptokena}%
   \endgroup
   \if at nobreak\ifvmode\nobreak\fi\fi}
+
 \EndIncludeInRelease
 \IncludeInRelease{0000/00/00}%
                  {\markboth}{Make commands robust}%
@@ -13476,7 +13953,7 @@
         {\@onefilewithoptions at clashchk{#2}}
         {%
           \@namedef{opt@\@currname.\@currext}{#2}%
-          \expandafter\expandafter\expandafter\ProcessKeyPackageOptions
+          \expandafter\expandafter\expandafter\ProcessKeyOptions
             \expandafter\expandafter\expandafter
               [\csname opt at fam@\@currname.\@currext\endcsname]%
         }%
@@ -14020,7 +14497,7 @@
 \EndIncludeInRelease
 %%% From File: ltfilehook.dtx
 \providecommand\ltfilehookversion{v1.0m}
-\providecommand\ltfilehookdate{2022/03/10}
+\providecommand\ltfilehookdate{2022/04/01}
 \IncludeInRelease{2020/10/01}%
                  {\CurrentFile}{Hook management file}%
 \ExplSyntaxOn
@@ -14504,8 +14981,8 @@
 %%               Frank Mittelbach, LaTeX Team
 %%
 %%% From File: ltshipout.dtx
-\providecommand\ltshipoutversion{v1.0l}
-\providecommand\ltshipoutdate{2022/01/06}
+\providecommand\ltshipoutversion{v1.0m}
+\providecommand\ltshipoutdate{2022/05/08}
  %    \cs{AtBeginDvi} is the existing \LaTeXe{} interface to fill the
 \IncludeInRelease{2020/10/01}%
                  {\shipout}{Hook management (shipout)}%
@@ -14619,8 +15096,8 @@
                       \__shipout_add_foreground_box:n
                           { \UseHook{shipout/lastpage}
                             \@kernel at after@shipout at lastpage }
+                      \bool_gset_true:N \g__shipout_lastpage_handled_bool
                     }
-                    \bool_gset_true:N \g__shipout_lastpage_handled_bool
                 }
               \__shipout_finalize_box:
               \cs_set_eq:NN \protect \exp_not:N
@@ -14865,8 +15342,17 @@
         \iow_now:Nx \@auxout {
           \gdef\string\@abspage at last {\int_use:N \g_shipout_readonly_int}}
      \fi
-      \bool_if:NF \g__shipout_lastpage_handled_bool
+      \bool_if:NTF \g__shipout_lastpage_handled_bool
          {
+           \int_compare:nNnF \@abspage at last = \g_shipout_readonly_int
+            {
+              \@latex at warning@no at line{Hook~ 'shipout/lastpage'~ executed~
+                on~ wrong~ page~ (\@abspage at last\space not~
+                \int_use:N\g_shipout_readonly_int).\MessageBreak
+                Rerun~ to~ correct~ this}%
+            }
+         }
+         {
           \bool_lazy_and:nnF
             { \hook_if_empty_p:n {shipout/lastpage} }
             { \tl_if_empty_p:N \@kernel at after@shipout at lastpage }
@@ -15950,6 +16436,16 @@
                  {\newmarks}{Extended Allocation}%
 \let\newmarks\@undefined
 \EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {2e-left}{Delayed legacy marks}%
+\NewMarkClass {2e-left}
+\NewMarkClass {2e-right}
+\NewMarkClass {2e-right-nonempty}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+                 {2e-left}{Delayed legacy marks}%
+
+\EndIncludeInRelease
 \IncludeInRelease{2015/01/01}%
               {\newXeTeXintercharclass}{Extended Allocation}%
 \ifx\XeTeXcharclass\@undefined

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/lcyenc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/lcyenc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/lcyenc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{lcyenc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
 \DeclareUnicodeCharacter{00BB}{\guillemotright}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ly1enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ly1enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ly1enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{ly1enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A0}{\nobreakspace}
 \DeclareUnicodeCharacter{00A1}{\textexclamdown}
 \DeclareUnicodeCharacter{00A2}{\textcent}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{omsenc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A7}{\textsection}
 \DeclareUnicodeCharacter{00B6}{\textparagraph}
 \DeclareUnicodeCharacter{00B7}{\textperiodcentered}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{ot1enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A0}{\nobreakspace}
 \DeclareUnicodeCharacter{00A1}{\textexclamdown}
 \DeclareUnicodeCharacter{00A3}{\textsterling}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot2enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot2enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot2enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{ot2enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
 \DeclareUnicodeCharacter{00BB}{\guillemotright}
 \DeclareUnicodeCharacter{0131}{\i}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/slides.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/slides.cls	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/slides.cls	2022-05-19 20:13:40 UTC (rev 63339)
@@ -43,7 +43,7 @@
 %% extension .ins) which are part of the distribution.
 \NeedsTeXFormat{LaTeX2e}[1997/06/01]
 \ProvidesClass{slides}
-              [2021/10/04 v2.4b
+              [2022/05/18 v2.4b
                Standard LaTeX document class]
 \input{slides.def}
 \InputIfFileExists{sfonts.cfg}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/slides.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/slides.def	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/slides.def	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
 \ProvidesFile{slides.def}
-              [2021/10/04 v2.4b
+              [2022/05/18 v2.4b
                SLiTeX definitions]
 \message{hacks,}
 

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/source2edoc.cls	2022-05-19 20:13:40 UTC (rev 63339)
@@ -2,7 +2,7 @@
 % This class is buggy and needs fixing
 
 \ProvidesClass{source2edoc}
-              [2021/01/14 v0.2b Quick hack to typeset source2.tex
+              [2022/04/03 v0.2c Quick hack to typeset source2.tex
                (not usable for anything else and buggy -- will vanish again)!]
 
 
@@ -171,7 +171,10 @@
          t\or u\or v\or w\or x\or y\or z\or A\or B\or C\or
          D\or E\or F\or G\or H\or I\or J\or K\or L\or M\or
          N\or O\or P\or Q\or R\or S\or T\or U\or V\or W\or
-         X\or Y\or Z\else\@ctrerr\fi}
+         X\or Y\or Z\or
+         aa\or bb\or cc\or  % we are getting definitely too many modules
+         dd%
+         \else\@ctrerr\fi}
 \def\docincludeaux{%
   \def\thepart{\aalph{part}}\def\filesep{\thepart-}%
   \let\filekey\@gobble
@@ -295,6 +298,11 @@
     \fi}%
 \endgroup%
 
+
+% don't run tocs when they are in some module files
+\AddToHook{cmd/tableofcontents/after}{\global\let\tableofcontents\relax} 
+
+
 \InputIfFileExists{ltxdoc.cfg}
            {\typeout{*************************************^^J%
                      * Local config file ltxdoc.cfg used^^J%
@@ -302,6 +310,7 @@
            {}
 
 
+
 \errorstopmode
 \batchmode           
 

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/structuredlog.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -43,7 +43,7 @@
 %% extension .ins) which are part of the distribution.
 %%% From File: ltfilehook.dtx
 \providecommand\ltfilehookversion{v1.0m}
-\providecommand\ltfilehookdate{2022/03/10}
+\providecommand\ltfilehookdate{2022/04/01}
 \ProvidesExplPackage
     {structuredlog}{\ltfilehookdate}{\ltfilehookversion}
     {Structuring the TeX transcript file}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
   \ProvidesFile{t1enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A0}{\nobreakspace}
 \DeclareUnicodeCharacter{00A1}{\textexclamdown}
 \DeclareUnicodeCharacter{00A3}{\textsterling}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t2aenc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t2aenc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t2aenc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{t2aenc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
 \DeclareUnicodeCharacter{00A7}{\textsection}
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
@@ -228,7 +228,9 @@
 \DeclareUnicodeCharacter{2031}{\textpertenthousand}
 \DeclareUnicodeCharacter{2116}{\textnumero}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
 \DeclareUnicodeCharacter{27E8}{\textlangle}
 \DeclareUnicodeCharacter{27E9}{\textrangle}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t2benc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t2benc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t2benc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{t2benc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
 \DeclareUnicodeCharacter{00A7}{\textsection}
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
@@ -222,7 +222,9 @@
 \DeclareUnicodeCharacter{2031}{\textpertenthousand}
 \DeclareUnicodeCharacter{2116}{\textnumero}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
 \DeclareUnicodeCharacter{27E8}{\textlangle}
 \DeclareUnicodeCharacter{27E9}{\textrangle}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t2cenc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t2cenc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t2cenc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{t2cenc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
 \DeclareUnicodeCharacter{00A7}{\textsection}
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
@@ -218,7 +218,9 @@
 \DeclareUnicodeCharacter{2031}{\textpertenthousand}
 \DeclareUnicodeCharacter{2116}{\textnumero}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
 \DeclareUnicodeCharacter{27E8}{\textlangle}
 \DeclareUnicodeCharacter{27E9}{\textrangle}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ts1enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ts1enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ts1enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{ts1enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A2}{\textcent}
 \DeclareUnicodeCharacter{00A3}{\textsterling}
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
@@ -107,7 +107,9 @@
 \DeclareUnicodeCharacter{2192}{\textrightarrow}
 \DeclareUnicodeCharacter{2193}{\textdownarrow}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2422}{\textblank}
 \DeclareUnicodeCharacter{25E6}{\textopenbullet}
 \DeclareUnicodeCharacter{25EF}{\textbigcircle}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/utf8.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/utf8.def	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/utf8.def	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
 \ProvidesFile{utf8.def}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \ifx\ifincsname\@undefined  % old e-pTeX or e-upTeX engines
   \input utf8-2018.def
   \expandafter\@firstofone

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/utf8enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/utf8enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/utf8enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
  \ProvidesFile{utf8enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A0}{\nobreakspace}
 \DeclareUnicodeCharacter{00A1}{\textexclamdown}
 \DeclareUnicodeCharacter{00A2}{\textcent}
@@ -589,7 +589,9 @@
 \DeclareUnicodeCharacter{2192}{\textrightarrow}
 \DeclareUnicodeCharacter{2193}{\textdownarrow}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2422}{\textblank}
 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
 \DeclareUnicodeCharacter{25E6}{\textopenbullet}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/x2enc.dfu
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/x2enc.dfu	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/x2enc.dfu	2022-05-19 20:13:40 UTC (rev 63339)
@@ -42,7 +42,7 @@
 %% and covered by LPPL is defined by the unpacking scripts (with
 %% extension .ins) which are part of the distribution.
   \ProvidesFile{x2enc.dfu}
-   [2022/02/13 v1.3a UTF-8 support]
+   [2022/05/08 v1.3b UTF-8 support]
 \DeclareUnicodeCharacter{00A4}{\textcurrency}
 \DeclareUnicodeCharacter{00A7}{\textsection}
 \DeclareUnicodeCharacter{00AB}{\guillemotleft}
@@ -266,7 +266,9 @@
 \DeclareUnicodeCharacter{2031}{\textpertenthousand}
 \DeclareUnicodeCharacter{2116}{\textnumero}
 \DeclareUnicodeCharacter{2329}{\textlangle}
+\DeclareUnicodeCharacter{3008}{\textlangle}
 \DeclareUnicodeCharacter{232A}{\textrangle}
+\DeclareUnicodeCharacter{3009}{\textrangle}
 \DeclareUnicodeCharacter{2423}{\textvisiblespace}
 \DeclareUnicodeCharacter{27E8}{\textlangle}
 \DeclareUnicodeCharacter{27E9}{\textrangle}

Added: trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys-2014-10-28.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys-2014-10-28.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys-2014-10-28.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -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 at ref\@empty}
+\DeclareOption{notcite}{\let\SK at cite\@empty}
+\let\SK at refcolor\relax
+\let\SK at labelcolor\relax
+\DeclareOption{color}{\AtEndOfPackage{%
+  \RequirePackage{color}%
+  \definecolor{refkey}{gray}{.75}%
+  \definecolor{labelkey}{gray}{.75}%
+  \def\SK at refcolor{\color{refkey}}%
+  \def\SK at labelcolor{\color{labelkey}}}}
+\DeclareOption{final}{%
+  \providecommand*\showkeyslabelformat[1]{}%
+  \endinput}
+\DeclareOption{draft}{}
+\ProcessOptions
+\let\SK at label\label
+\let\SK at bibitem\@bibitem
+\let\SK at lbibitem\@lbibitem
+\def\label#1{%
+  \@bsphack
+  \SK@\SK@@label{#1}%
+  \begingroup
+    \SK at label{#1}%
+  \endgroup
+  \@esphack}
+\def\@bibitem#1{%
+  \SK at bibitem{#1}\SK@\SK@@label{#1}\ignorespaces}
+\def\@lbibitem[#1]#2{%
+  \SK at lbibitem[{#1}]{#2}\SK@\SK@@label{#2}\ignorespaces}
+\def\SK@#1#2{%
+  \protected at edef\@tempa{#2}%
+  \expandafter#1\meaning\@tempa\SK@}
+\providecommand*\showkeyslabelformat[1]{%
+  \fbox{\normalfont\small\ttfamily#1}}
+\def\SK@@label#1>#2\SK@{%
+  \gdef\SK at lab{\smash{\SK at labelcolor\showkeyslabelformat{#2}}}%
+  \ifvmode
+    \if at inlabel
+      \global\setbox\@labels\hbox{%
+        \llap{\SK at lab\SK at 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 at lab\SK at lab@relax\kern\marginparsep}%
+        \else
+          \hbox{\box\z@\rlap{\kern\marginparsep\SK at labx}}%
+        \fi
+        \vskip\skip@
+      \else
+        \llap{\SK at lab\SK at lab@relax\kern\marginparsep}%
+      \fi
+      \prevdepth\dimen@
+    \fi
+  \else
+    \csname SK@\@currenvir\endcsname
+    \ifSK at equation\else
+      \ifmmode
+        \SK at labx
+      \else
+        \ifinner
+          \rlap\SK at lab
+      \else
+          \vadjust{\llap{\SK at lab\kern\marginparsep}}%
+        \fi
+        \SK at lab@relax
+      \fi
+    \fi
+  \fi}
+\AtBeginDocument{%
+  \let\SK at eqnnum\@eqnnum
+  \@ifpackageloaded{amsmath}{%
+    \let\SK at tagform@\tagform@
+    \let\SK at maketag@@@\maketag@@@
+    \iftagsleft@
+      \def\tagform@#1{%
+        \ifx\df at label\@empty
+          \SK at lab@relax
+        \else
+          \expandafter\SK@@label\meaning\df at label\SK@
+        \fi
+        \llap{\SK at lab\kern\marginparsep}%
+        \SK at lab@relax\SK at tagform@{#1}}%
+      \def\maketag@@@#1{%
+        \ifx\df at label\@empty
+          \SK at lab@relax
+        \else
+          \expandafter\SK@@label\meaning\df at label\SK@
+        \fi
+        \llap{\SK at lab\kern\marginparsep}\SK at lab@relax
+        \SK at maketag@@@{#1}%
+      }%
+      \def\@eqnnum{%
+        \llap{\SK at lab\kern\displaywidth\kern\marginparsep}%
+        \SK at lab@relax\SK at eqnnum}%
+    \else
+      \def\tagform@#1{%
+        \ifx\df at label\@empty
+          \SK at lab@relax
+        \else
+          \expandafter\SK@@label\meaning\df at label\SK@
+        \fi
+        \SK at tagform@{#1}%
+        \rlap{\kern\marginparsep\SK at lab}\SK at lab@relax}%
+      \def\maketag@@@#1{%
+        \ifx\df at label\@empty
+          \SK at lab@relax
+        \else
+          \expandafter\SK@@label\meaning\df at label\SK@
+        \fi
+        \SK at maketag@@@{#1}%
+        \rlap{\kern\marginparsep\SK at lab}\SK at lab@relax
+      }%
+      \def\@eqnnum{\SK at eqnnum\rlap{\kern\marginparsep\SK at lab}%
+        \SK at lab@relax}%
+    \fi
+  }%
+  {%
+    \@ifundefined{ver at leqno.clo}{%
+      \def\@eqnnum{\SK at eqnnum\rlap{\kern\marginparsep\SK at lab}%
+        \SK at lab@relax}%
+    }{%
+      \def\@eqnnum{%
+        \llap{\SK at lab\kern\displaywidth\kern\marginparsep}%
+        \SK at lab@relax\SK at eqnnum}%
+    }%
+  }%
+}
+\def\SK at labx{\rlap\SK at lab\global\let\SK at lab\relax}
+\def\SK at lab@relax{\global\let\SK at lab\relax}\SK at lab@relax
+\newif\ifSK at equation
+\let\SK at equation\SK at equationtrue
+\let\SK at eqnarray\SK at equationtrue
+\toks@\expandafter{\eqnarray}
+\edef\eqnarray{\let\noexpand\tagform@\noexpand\SK at tagform@\the\toks@}
+\let\SK at align\SK at equationtrue
+\let\SK at alignat\SK at equationtrue
+\let\SK at xalignat\SK at equationtrue
+\let\SK at xxalignat\SK at equationtrue
+\let\SK at gather\SK at equationtrue
+\let\SK at multline\SK at equationtrue
+\let\SK at flalign\SK at equationtrue
+\expandafter\let\csname SK at align*\endcsname\SK at equationtrue
+\expandafter\let\csname SK at alignat*\endcsname\SK at equationtrue
+\expandafter\let\csname SK at flalign*\endcsname\SK at equationtrue
+\expandafter\let\csname SK at gather*\endcsname\SK at equationtrue
+\expandafter\let\csname SK at multline*\endcsname\SK at equationtrue
+\expandafter\let\csname SK at equation*\endcsname\SK at equationtrue
+\def\SK at 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 at ref\@empty
+\AtBeginDocument{%
+  \@ifpackageloaded{varioref}{%
+    \SK at def\@@vpageref#1[#2]#3{{%
+      \let\label\SK at label
+      \SK@@@vpageref{#1}[{#2}]{#3}}}%
+    \def\vr at f#1{%
+      \leavevmode\unskip\vref at space
+      \ref{#1}%
+      {\let\label\SK at label
+      \vpageref[\unskip]{#1}}}%
+  }{}}
+\else
+\AtBeginDocument{%
+  \SK at def\ref#1{\SK@\SK@@ref{#1}\SK at ref{#1}}%
+  \SK at def\pageref#1{\SK@\SK@@ref{#1}\SK at pageref{#1}}%
+  \@ifpackageloaded{varioref}{%
+    \SK at def\@@vpageref#1[#2]#3{{%
+      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
+      \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%
+    \def\vr at f#1{%
+      \leavevmode\unskip\vref at space
+      \ref{#1}%
+      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
+      \vpageref[\unskip]{#1}}%
+  }{}}
+\fi
+\ifx\SK at cite\@empty
+\AtBeginDocument{%
+  \ifx\HAR at checkdef\@undefined\else
+      \expandafter\let\expandafter
+         \SK at HAR@bi\csname\string\harvarditem\endcsname
+      \expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
+        \SK at HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
+  \fi}
+\else
+\AtBeginDocument{%
+  \ifx\HAR at checkdef\@undefined
+    \ifx\citen\@undefined
+      \SK at def\@citex[#1]#2{\SK at citex[{#1}]{#2}}%
+    \else
+      \SK at def\citen#1{\SK@\SK@@ref{#1}\SK at citen{#1}}%
+    \fi
+    \SK at def\citeauthor#1{\SK@\SK@@ref{#1}\SK at citeauthor{#1}}%
+    \SK at def\citefullauthor#1{\SK@\SK@@ref{#1}\SK at citefullauthor{#1}}%
+    \SK at def\citeyear#1{\SK@\SK@@ref{#1}\SK at citeyear{#1}}%
+  \else
+    \SK at def\HAR at checkdef#1#2{%
+      \expandafter\SK@\expandafter\SK@@ref\expandafter{#1}%
+      \SK at HAR@checkdef{#1}{#2}}%
+      \expandafter\let\expandafter
+         \SK at HAR@bi\csname\string\harvarditem\endcsname
+      \expandafter\def\csname\string\harvarditem\endcsname[#1]#2#3#4{%
+        \SK at HAR@bi[{#1}]{#2}{#3}{#4}\SK@\SK@@label{#4}}%
+  \fi}
+\def\SK at citex[#1]#2{%
+  \SK@\SK@@ref{#2}\SK@@citex[{#1}]{#2}}
+\fi
+\def\SK@@ref#1>#2\SK@{%
+  \leavevmode\vbox to\z@{{%
+    \vss
+    \SK at refcolor
+    \rlap{\vrule\raise .75em%
+       \hbox{\underbar{\normalfont\footnotesize\ttfamily#2}}}}}}
+\endinput
+%%
+%% End of file `showkeys.sty'.


Property changes on: trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys-2014-10-28.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys.sty	2022-05-19 20:11:06 UTC (rev 63338)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/showkeys.sty	2022-05-19 20:13:40 UTC (rev 63339)
@@ -38,8 +38,15 @@
 %% File: showkeys.dtx Copyright (C) 1992-1997 David Carlisle
 %% File: showkeys.dtx Copyright (C) 2006-2019 David Carlisle, LaTeX Project
 \NeedsTeXFormat{LaTeX2e}
+
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{}{2014-10-28}{showkeys-2014-10-28.sty}
+\DeclareCurrentRelease{}{2022-06-01}
+
 \ProvidesPackage{showkeys}
-          [2014/10/28 v3.17 Show cite and label keys (DPC, MH)]
+          [2022/04/12 v3.18 Show cite and label keys (DPC, MH)]
 \DeclareOption{notref}{\let\SK at ref\@empty}
 \DeclareOption{notcite}{\let\SK at cite\@empty}
 \let\SK at refcolor\relax
@@ -204,30 +211,19 @@
         \expandafter\protect\csname\@tempa\space\endcsname}%
   \expandafter\def\csname\@tempa\space\endcsname}
 \ifx\SK at ref\@empty
-\AtBeginDocument{%
-  \@ifpackageloaded{varioref}{%
-    \SK at def\@@vpageref#1[#2]#3{{%
-      \let\label\SK at label
-      \SK@@@vpageref{#1}[{#2}]{#3}}}%
-    \def\vr at f#1{%
-      \leavevmode\unskip\vref at space
-      \ref{#1}%
-      {\let\label\SK at label
-      \vpageref[\unskip]{#1}}}%
-  }{}}
 \else
 \AtBeginDocument{%
-  \SK at def\ref#1{\SK@\SK@@ref{#1}\SK at ref{#1}}%
-  \SK at def\pageref#1{\SK@\SK@@ref{#1}\SK at pageref{#1}}%
+  \let\@kernel at ref@\@kernel at ref
+  \let\@kernel at sref@\@kernel at sref
+  \SK at def\@kernel at ref#1{\SK@\SK@@ref{#1}\SK@@kernel at ref{#1}}%
+  \SK at def\@kernel at sref#1{\SK@\SK@@ref{#1}\SK@@kernel at sref{#1}}%
+  \SK at def\@kernel at pageref#1{\SK@\SK@@ref{#1}\SK@@kernel at pageref{#1}}%
+  \SK at def\@kernel at spageref#1{\SK@\SK@@ref{#1}\SK@@kernel at spageref{#1}}%
+  \SK at def\@kernel at Ref#1{{\let\@kernel at ref\@kernel at ref@\SK@\SK@@ref{#1}\SK@@kernel at Ref{#1}}}%
+  \SK at def\@kernel at sRef#1{\let\@kernel at sref\@kernel at sref@\SK@\SK@@ref{#1}\SK@@kernel at sRef{#1}}%
   \@ifpackageloaded{varioref}{%
     \SK at def\@@vpageref#1[#2]#3{{%
-      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
-      \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%
-    \def\vr at f#1{%
-      \leavevmode\unskip\vref at space
-      \ref{#1}%
-      \let\label\SK at label\let\ref\SK at ref\let\pageref\SK at pageref
-      \vpageref[\unskip]{#1}}%
+      \leavevmode\unskip\SK@\SK@@ref{#3}\SK@@@vpageref{#1}[{#2}]{#3}}}%%
   }{}}
 \fi
 \ifx\SK at cite\@empty



More information about the tex-live-commits mailing list.