texlive[72549] Master/texmf-dist: latex-dev (14oct24)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 14 21:13:47 CEST 2024


Revision: 72549
          https://tug.org/svn/texlive?view=revision&revision=72549
Author:   karl
Date:     2024-10-14 21:13:47 +0200 (Mon, 14 Oct 2024)
Log Message:
-----------
latex-dev (14oct24)

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-historic.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex
    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/fntguide.tex
    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/ltmarks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.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/ltnews36.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews37.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews38.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.tex
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.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/ltproperties-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-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/ltsockets-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/ltsockets-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/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/syntonly.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/tlc2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/tlc3.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/tulm.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/usrguide-historic.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.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/firstaid/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/firstaid/latex2e-first-aid-for-external-files.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/latex-lab/README.md
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-amsmath.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-bib.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-block.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-firstaid.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-float.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-footnotes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-graphic.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-marginpar.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-math.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathpkg.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathtools.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-minipage.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-namespace.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-sec.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-table.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-testphase.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-text.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-title.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
    trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.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/l3sys-query.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/base/fontdef.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltcounts.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/lterror.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltlength.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx
    trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.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/firstaid/latex2e-first-aid-for-external-files.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-amsmath.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-footnotes.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-graphic.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-marginpar.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-mathtools.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-minipage.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-table.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx
    trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc.dtx
    trunk/Master/texmf-dist/source/latex-dev/tools/array.dtx
    trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx
    trunk/Master/texmf-dist/source/latex-dev/tools/tools.ins
    trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
    trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
    trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
    trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
    trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
    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/preload.cfg
    trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/documentmetadata-support.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/graphic-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-amsmath.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footmisc.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footnotes.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-mathtools.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-graphic.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-marginpar.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-minipage.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-table.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-text.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc.sty
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/marginpar-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/minipage-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/sec-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/table-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/tabular-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/text-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/latex-lab/toc-latex-lab-testphase.ltx
    trunk/Master/texmf-dist/tex/latex-dev/tools/.tex
    trunk/Master/texmf-dist/tex/latex-dev/tools/array.sty
    trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.tex
    trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf
    trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.tex

Modified: trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/amsmath/README.md	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,7 +1,7 @@
 The amsmath bundle for LaTeX
 ============================
 
-Release 2024-11-01 pre-release 0
+Release 2024-11-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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/amsmath/changes.txt	2024-10-14 19:13:47 UTC (rev 72549)
@@ -2,8 +2,14 @@
 All changes above are only part of the development branch for the next release.
 ================================================================================
 
+2024-08-02  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* amsmath.dtx (section{Ellipsis dots}):
+	Support special \dots magic in case of robust symbols protected with
+	\protected or via \DeclareRobustCommand (gh/1265)
+
 #########################
-# 2023-11-01 Release
+# 2024-06-01 Release
 #########################
 
 2024-05-23  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>

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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/README.md	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,7 +1,7 @@
 The LaTeX kernel
 ================
 
-Release 2024-11-01 pre-release 3
+Release 2024-11-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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt	2024-10-14 19:13:47 UTC (rev 72549)
@@ -6,11 +6,82 @@
 not part of the distribution.
 ================================================================================
 
+2024-10-12  Joseph Wright  <Joseph.Wright at latex-project.org>
+	* ltmiscen.dtx
+	Define \begin as an engine-protected macro
+
+2024-10-07  Joseph Wright  <Joseph.Wright at latex-project.org>
+	* lttemplates.dtx
+	Correct passing of token list content using \KeyValue
+
+2024-10-02 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* lttagging.dtx: restore also paratagging in the para/restore socket, 
+	see https://github.com/latex3/tagging-project/issues/723
+
+2024-09-25 Matthew Bertucci <bertucci at math.utah.edu>
+	* ltproperties.dtx: Fix definitions for \IfLabelExistsT and \IfLabelExistsF
+
+2024-09-17 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* lttagging.dtx: dummy for \tag_suspend:n and \tag_resume:n
+	* lttagging.dtx: declare tagging sockets for floats and caption.
+
+
+2024-09-21  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+    * ltcounts.dtx (subsection{Environment Counter Macros}):
+      extend \@definecounter and \@addtoreset so that they define also \theH<counter>
+    * ltxref.dtx (subsection{Cross Referencing}):
+      Use sockets in \refstepcounter for target and tagging support.
+    * ltmeta.dtx: move patches and change of \MakeLinkTarget from latex-lab.
+    * lttagging.dtx: add tagging socket for targets.
+       
+
+2024-09-15  Joseph Wright  <Joseph.Wright at latex-project.org>
+	* lttemplates-doc.tex, lttemplates-code.tex:
+	New files
+	* clsguide.tex
+	Link to template documentation
+
+2024-09-12 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* ltproperties.dtx: remove @filesw-test in \__property_record:nn,
+	see https://github.com/latex3/tagging-project/issues/696
+
+2024-09-11  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* lterror.dtx (subsection{Specific errors}):
+	Add error message "Not allowed in LR mode"
+
+2024-09-10  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltspace.dtx (subsection{Vertical spacing}):
+	Drop unnecessary \@noitemerr in \addvspace and \addpenalty and
+	instead generate \@parmodeerr if we are in restricted hmode (gh/1460)
+	Also use \protected definitions for them.
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* ltlength.dtx: suspend tagging in \@settodim
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* fontdef.dtx: preload t1cmss.fd and t1cmtt.fd
+
+2024-09-02  Joseph Wright  <Joseph.Wright at latex-project.org>
+
+	* clsguide.tex:
+	Document \IfPackageLoadedTF, \IfPackageAtLeastTF, etc.
+
 2024-08-12  Joseph Wright  <Joseph.Wright at latex-project.org>
 
 	* ltluatex.dtx:
 	Allow for missing version string in Lua modules (gh/1443)
 
+2024-08-09  Yukai Chou  <muzimuzhi at gmail.com>
+	* lthooks.dtx: (subsection{Parsing a label})
+	Raise different errors for empty label and empty hook (gh/1423)
+
+2024-08-03  Yukai Chou  <muzimuzhi at gmail.com>
+	* ltclass.dtx (section{Package/class rollback mechanism}):
+	Add selected release to the file list (gh/1413)
+
 2024-08-12  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* letter.dtx (subsection{The generic letter commands}):
@@ -28,6 +99,11 @@
 	* lttagging.dtx: (subsection{Paragraph sockets}): A socket and plug to restore paragraph
 	setting added.
 
+2024-07-23  Yukai Chou  <muzimuzhi at gmail.com>
+
+	* ltclass.dtx (section{Implementation}):
+	Trim spaces from unused option added by \OptionNotUsed (gh/1238)
+
 2024-07-13 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
 	* lttagging.dtx: (subsection{Tagging sockets}): toc-related tagging sockets added.
 

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/clsguide-historic.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/clsguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -42,7 +42,7 @@
     \texttt{clsguide.tex} for full details.}%
 }
 
-\date{2024-06-19}
+\date{2024-09-15}
 
 \NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
 \NewDocumentCommand\marg{m}{\arg{#1}}
@@ -76,13 +76,13 @@
 commands, etc.
 
 \section{Writing classes and packages}
-\label{Sec:writing}
+\label{sec:writing}
 
 This section covers some general points concerned with writing
 \LaTeX{} classes and packages.
 
 \subsection{Is it a class or a package?}
-\label{Sec:classorpkg}
+\label{sec:classorpkg}
 
 The first thing to do when you want to put some new \LaTeX{} commands
 in a file is to decide whether it should be a \emph{document class} or a
@@ -211,7 +211,7 @@
 \url{https://www.alanshawn.com/latex3-tutorial/}.
 
 \subsection{Box commands and color}
-\label{Sec:color}
+\label{sec:color}
 
 Even if you do not intend to use color in your own documents, by taking note of
 the points in this section you can ensure that your class or package is
@@ -243,7 +243,7 @@
 color'.
 
 \subsection{General style}
-\label{Sec:general}
+\label{sec:general}
 
 \LaTeX{} provides many commands designed to help you produce well-structured
 class and package files that are both robust and portable. This section
@@ -250,7 +250,7 @@
 outlines some ways to make intelligent use of these.
 
 \subsubsection{Loading other files}
-\label{Sec:loading}
+\label{sec:loading}
 
 \LaTeX{} provides these commands:
 \begin{verbatim}
@@ -331,9 +331,9 @@
 avoid every University having its own thesis class, all called |thesis.cls|.
 
 If you rely on some features of the \LaTeX{} kernel, or on a package,
-please specify the release-date you need.  For example, the package
-error commands were introduced in the June 2022 release so, if you use
-them then you should put:
+please specify the release-date you need.  For example, the keyval
+options (see Section~\ref{sec:opt:keyval}) were introduced in the June
+2022 release so, if you use them then you should put:
 \begin{verbatim}
    \NeedsTeXFormat{LaTeX2e}[2022-06-01]
 \end{verbatim}
@@ -351,7 +351,7 @@
 also hooks to apply to files, described in \texttt{ltfilehooks}.
 
 \section{The structure of a class or package}
-\label{Sec:structure}
+\label{sec:structure}
 
 The outline of a class or package file is:
 \begin{description}
@@ -366,7 +366,8 @@
    declaring new variables, commands and fonts; and loading other files.
 \end{description}
 
-\subsection{Identification}
+\subsection{Identification%
+  \label{sec:ID}}
 
 The first thing a class or package file does is identify itself.
 Package files do this as follows:
@@ -389,12 +390,14 @@
    \NeedsTeXFormat{LaTeX2e}
    \ProvidesClass{article}[2022-06-01 Standard LaTeX class]
 \end{verbatim}
-The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' and must be
-present if the optional argument is used (this is also true for the
-|\NeedsTeXFormat| command). Any derivation from this syntax will result in
-low-level \TeX{} errors---the commands expect a valid syntax to speed up the
-daily usage of the package or class and make no provision for the case that the
-developer made a mistake!
+The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' or
+`\textsc{yyyy/mm/dd}' and must be present if the optional argument is used.
+Exactly four digits are required for the year and two each for the month and
+day. Where necessary, zeros should be added to pad the month and day
+appropriately. If digits or separators are missing, the date will likely be
+misinterpreted: the commands expect a valid syntax to speed up the routine usage
+of the package or class and make no provision for the case there is an error
+in the date specification.
 
 This date is checked whenever a user specifies a date in their |\documentclass|
 or |\usepackage| command. For example, if you wrote:
@@ -467,7 +470,7 @@
 second step. Both also allow options to be passed on to other packages or an
 underlying class. As the `classical' simple text approach is conceptually more
 straight-forward to illustrate, it is used here to show the general structure:
-see Section~\ref{Sec:opt:keyval} for full details of the key--value approach.
+see Section~\ref{sec:opt:keyval} for full details of the key--value approach.
 
 An option is declared as follows:
 \begin{verbatim}
@@ -513,7 +516,7 @@
 It is possible to pass options on to another package or class, using the
 command |\PassOptionsToPackage| or |\PassOptionsToClass| (note that this is a
 specialised operation that works only for option names): see
-Section~\ref{Sec:opmove}. For example, to pass every unknown option on to the
+Section~\ref{sec:opmove}. For example, to pass every unknown option on to the
 |article| class, you can use:
 \begin{verbatim}
    \DeclareOption*{%
@@ -529,7 +532,7 @@
    \ProcessOptions\relax
 \end{verbatim}
 This executes the \m{code} for each option that was both specified and declared
-(see Section~\ref{Sec:commands.options} for details of how this is done).
+(see Section~\ref{sec:commands.options} for details of how this is done).
 
 For example, if the |jane| package file contains:
 \begin{verbatim}
@@ -656,7 +659,7 @@
 gives a start. The |ltnews| class file is not much more complex than this one.
 
 \section{Commands for class and package writers}
-\label{Sec:commands}
+\label{sec:commands}
 
 This section describes briefly each of the commands for class and package
 writers. To find out about other aspects of the system,
@@ -675,8 +678,10 @@
 with name \m{format-name}. You can use the optional argument \m{release-date}
 to further specify the earliest release date of the format that is needed. When
 the release date of the format is older than the one specified a warning will
-be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The date, if
-present, must be in the form \textsc{yyyy-mm-dd}.
+be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The
+\meta{release-date}, if
+present, must be in the form `\textsc{yyyy-mm-dd}' or
+`\textsc{yyyy/mm/dd}'.
 
 Example:
 \begin{verbatim}
@@ -732,7 +737,7 @@
 distribution.
 
 \subsection{Loading files}
-\label{Sec:loadf}
+\label{sec:loadf}
 
 This group of commands can be used to create your own document class or package
 by building on existing classes or packages.
@@ -771,10 +776,10 @@
 
 The two |WithOptions| versions simply load the class (or package) file with
 exactly those options that are being used by the current file (class or
-package). See below, in \ref{Sec:opmove}, for further discussion of their use.
+package). See below, in \ref{sec:opmove}, for further discussion of their use.
 
 \subsection{Delaying code}
-\label{Sec:delays}
+\label{sec:delays}
 
 As noted earlier, a sophisticated hook system is available and described in
 \texttt{lthooks}. Here, we document a small set of convenient short names for
@@ -819,7 +824,7 @@
 stored (and later executed) in the order of their declarations.
 
 \subsection{Creating and using keyval options}
-\label{Sec:opt:keyval}
+\label{sec:opt:keyval}
 
 As with any key--value input, using key--value pairs as package or class
 options has two parts: creating the key options and setting (using) them.
@@ -905,7 +910,7 @@
 within a package to set options before or after using |\ProcessKeyOptions|.
 
 \subsection{Passing options around}
-\label{Sec:opmove}
+\label{sec:opmove}
 
 These two commands are also very useful within the \m{code} argument of
 options.
@@ -932,7 +937,7 @@
 another class to be loaded with |\LoadClass|.
 
 The effects and use of these two commands should be contrasted with those of
-the following two (documented above, in \ref{Sec:loadf}):
+the following two (documented above, in \ref{sec:loadf}):
 \begin{verbatim}
    \LoadClassWithOptions
    \RequirePackageWithOptions
@@ -977,6 +982,62 @@
 handler, but this handler is not used for |landscape| because that option is
 explicitly declared.
 
+\subsection{Useful status tests}
+
+A number of status tests are available which can be used by package and
+class authors to query the presence and date of other code, the current kernel
+release and other related ideas. Three forms of each test are provided, one
+requiring arguments for both \meta{true} and \meta{false} branches, one
+requiring only a \meta{true} branch and one requiring only a \meta{false}
+branch. These are indicated in their names as |TF|, |T| and |F|, respectively.
+Here, we document only the |TF| versions: the other forms are however also
+available.
+
+\begin{decl}
+  |\IfPackageLoadedTF| \arg{package-name} \arg{true code} \arg{false code}\\
+  |\IfClassLoadedTF| \arg{class-name} \arg{true code} \arg{false code}\\
+  |\IfFileLoadedTF| \arg{file-name} \arg{true code} \arg{false code}
+\end{decl}
+These commands test whether the named package, class or file has been loaded: this is
+done by using information that must be contained in an appropriate
+|\Provides...| line, as described in Section~\ref{sec:ID}. In the case of
+\cs{IfFileLoadedTF}, the full \meta{file-name} must be provided; in contrast,
+no extension should be given if testing for a package or class.
+
+\begin{decl}
+  |\IfPackageLoadedWithOptionsTF| \arg{package-name} \arg{options} \arg{true code} \arg{false code}\\
+  |\IfClassLoadedWithOptionsTF| \arg{class-name} \arg{options} \arg{true code} \arg{false code}
+\end{decl}
+These commands test whether the named package or class has been loaded with
+\emph{exactly} the \meta{options} specified. In order to take the \meta{true}
+branch, the package or class must be loaded (giving a \meta{true} result for
+\cs{If...LoadedT}) and the option list used when loading it must be identical
+to the \meta{options}.
+
+\begin{decl}
+  |\IfPackageAtLeastTF| \arg{package-name} \arg{date} \arg{true code} \arg{false code}\\
+  |\IfClassAtLeastTF| \arg{class-name} \arg{date} \arg{true code} \arg{false code}\\
+  |\IfFileAtLeastTF| \arg{file-name} \arg{date} \arg{true code} \arg{false code}
+\end{decl}
+These tests are used to check whether the date information given in the
+|\Provides...| line of a package, class or file is no earlier than the given
+\meta{date}. The \meta{date} is compared with that in the
+optional argument to \cs{Provides...} (as described in Section~\ref{sec:ID});
+if \cs{Provides...} was missing or had no optional argument, it is treated
+as |0000/00/00| (i.e.~earlier than any other date).
+As for \cs{Provides...}, the \meta{date} should be given in the form
+`\textsc{yyyy-mm-dd}' or `\textsc{yyyy/mm/dd}'. If the package, class or file is not
+loaded, the \meta{false} branch will be taken; in contrast, if the \meta{date}
+is not given in the required form, the behavior is formally undefined.
+
+\begin{decl}
+  |\IfFormatAtLeastTF| \arg{date} \arg{true code} \arg{false code}
+\end{decl}
+Tests the release \meta{date} of the \LaTeX{} format and selects the
+appropriate branch. The date used by the format is adjusted to incorporate any
+roll forward or back that has been applied to it, so that the apparent date
+of the format will be that after roll forward or back.
+
 \subsection{Safe file commands}
 
 These commands deal with file input; they ensure that the non-existence of a
@@ -1070,7 +1131,7 @@
 automatically added.
 
 \section{Miscellaneous commands, etc.}
-\label{Sec:commands.misc}
+\label{sec:commands.misc}
 
 \subsection{Layout parameters}
 
@@ -1336,6 +1397,25 @@
 \texttt{expl3} commands and more details can be found in
 \texttt{ltproperties-doc.pdf}.
 
+\subsubsection{Templates (protoype document commands)}
+
+\emph{Templates} as defined by \LaTeX{} are a mechanism to cleanly separate the
+three layers needed for writing a document
+\begin{enumerate}
+  \item authoring of the text with mark-up;
+  \item document layout design;
+  \item implementation (with \TeX{} programming) of the design.
+\end{enumerate}
+They allow document authors to modify design without altering code, and allow
+programmers to make portable changes to classes.
+
+Implementing this mechanism requires a number of steps and a family of commands
+which allow variation in outcomes. A typical use of templates will make use of
+most or all of |\NewTemplateType|, |\DeclareTemplateInterface|,
+|\DeclareTemplateCode|, |\DeclareInstance| and |\UseInstance|, plus potentially
+some more specialised commands. These are descrined in \texttt{lttemplates-doc}
+in full detail.
+
 \subsection{Preparing link targets}
 
 Active links in a document need targets to which they can jump to. Such
@@ -1431,7 +1511,7 @@
 particular, that no other package has redefined the same command.
 
 \subsection{Option declaration}
-\label{Sec:commands.options.dec}
+\label{sec:commands.options.dec}
 
 The following commands deal with the declaration and handling of options to
 document classes and packages using a classical `simple text' approach. Every
@@ -1471,7 +1551,7 @@
 specified but undeclared option for that package will produce an error.
 
 \subsection{Commands within option code}
-\label{Sec:within.code}
+\label{sec:within.code}
 
 These two commands can be used only within the \m{code} argument of either
 |\DeclareOption| or |\DeclareOption*|. Other commands commonly used within
@@ -1488,7 +1568,7 @@
 This causes the current option to be added to the list of `unused options'.
 
 \subsection{Option processing}
-\label{Sec:commands.options}
+\label{sec:commands.options}
 
 \begin{decl}
   |\ProcessOptions|

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/fntguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.tex	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -52,7 +52,7 @@
    \texttt{fntguide.tex} for full details.}%
 }
 
-\date{March 2024}
+\date{Sep 2024}
 
 \begin{document}
 
@@ -93,28 +93,28 @@
 
 \begin{description}
 
-\item[Section~\ref{Sec:text}] describes the commands for selecting fonts
+\item[Section~\ref{sec:text}] describes the commands for selecting fonts
   in classes and packages.  It lists the five \LaTeX{} font attributes,
   and lists the commands for selecting fonts.  It also describes how to
   customize the author commands such as |\textrm| and |\textit| to suit
   your document design.
 
-\item[Section~\ref{Sec:math}] explains the commands for controlling
+\item[Section~\ref{sec:math}] explains the commands for controlling
   \LaTeX{} math fonts.  It describes how to specify new math fonts and
   new math symbols.
 
-\item[Section~\ref{Sec:install}] explains how to install new fonts into
+\item[Section~\ref{sec:install}] explains how to install new fonts into
   \LaTeX.  It shows how \LaTeX{} font attributes are turned into \TeX{}
   font names, and how to specify your own fonts using font definition
   files.
 
-\item[Section~\ref{Sec:encode}] discusses text font encodings.  It
+\item[Section~\ref{sec:encode}] discusses text font encodings.  It
   describes how to declare a new encoding and how to define commands,
   such as |\AE| or |\"|, which have different definitions in different
   encodings, depending on whether ligatures, etc.\ are available in the
   encoding.
 
-\item[Section~\ref{Sec:misc}] covers font miscellanea.  It describes how
+\item[Section~\ref{sec:misc}] covers font miscellanea.  It describes how
   \LaTeX{} performs font substitution, how to customize fonts that are
   preloaded in the \LaTeX{} format, and the naming conventions used in
   \LaTeX{} font selection.
@@ -143,7 +143,7 @@
 The |psnfss| software uses fonts generated by Alan Jeffrey's |fontinst|
 software.  This can convert fonts from Adobe Font Metric format into a
 format readable by \LaTeX, including the generation of the font
-definition files described in Section~\ref{Sec:install}.  The |fontinst|
+definition files described in Section~\ref{sec:install}.  The |fontinst|
 software should be available from the same source as your copy of
 \LaTeX.
 
@@ -175,7 +175,7 @@
 
 
 \section{Text fonts}
-\label{Sec:text}
+\label{sec:text}
 
 This section describes the commands available to class and package
 writers for specifying and selecting fonts.
@@ -392,7 +392,7 @@
   \caption{Author font commands and their effects (article class)}\label{tab:attributes}
 \end{table}
 The values used by these commands are determined by the document class,
-using the parameters defined in Section~\ref{Sec:text.param}.
+using the parameters defined in Section~\ref{sec:text.param}.
 
 Note that there are no author commands for selecting new encodings.
 These should be provided by packages, such as the |fontenc| package.
@@ -399,7 +399,7 @@
 
 This section does not explain how \LaTeX{} font specifications are
 turned into \TeX{} font names.  This is described in
-Section~\ref{Sec:install}.
+Section~\ref{sec:install}.
 
 
 
@@ -483,7 +483,7 @@
 warning you might produce code that loops.
 
 \subsection{Parameters for author commands}
-\label{Sec:text.param}
+\label{sec:text.param}
 
 The parameter values set by author commands such as |\textrm| and
 |\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these
@@ -644,7 +644,7 @@
 
 
 \section{Math fonts}
-\label{Sec:math}
+\label{sec:math}
 
 This section describes the commands available to class and package
 writers for specifying math fonts and math commands.
@@ -658,7 +658,7 @@
 |\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math
   alphabets}.  These math alphabet commands affect only the font used
 for letters and symbols of type |\mathalpha| (see
-Section~\ref{Sec:math.commands}); other symbols within the argument will
+Section~\ref{sec:math.commands}); other symbols within the argument will
 be left unchanged.  The predefined math alphabets are:
 \begin{center}
   \begin{tabular}{ccc}
@@ -730,7 +730,7 @@
 
 There are no commands for selecting symbol fonts.  Instead, these are
 selected indirectly through symbol commands like |\oplus|.
-Section~\ref{Sec:math.commands} explains how to define symbol commands.
+Section~\ref{sec:math.commands} explains how to define symbol commands.
 
 \begin{decl}
   |\mathnormal{<math>}| \quad
@@ -908,7 +908,7 @@
 when its command is used within a math formula.
 
 \subsection{Declaring math symbols}
-\label{Sec:math.commands}
+\label{sec:math.commands}
 
 \begin{decl}
   |\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font}
@@ -1040,7 +1040,7 @@
 \end{verbatim}
 
 \section{Font installation}
-\label{Sec:install}
+\label{sec:install}
 
 This section explains how \LaTeX's font attributes are turned into
 \TeX{} font specifications.
@@ -1328,7 +1328,7 @@
 
 
 \section{Encodings}
-\label{Sec:encode}
+\label{sec:encode}
 
 This section explains how to declare and use new font encodings and how
 to declare commands for use with particular encodings.
@@ -1353,7 +1353,7 @@
 The declarations in the encoding definition file |<enc>enc.def| for
 encoding \m{ENC} are responsible for declaring this encoding and telling
 \LaTeX{} how to produce characters in this encoding; this file should
-contain nothing else (see Section~\ref{Sec:encode.def}.
+contain nothing else (see Section~\ref{sec:encode.def}.
 
 The standard \LaTeX{} format declares the |OT1| and |T1| text encodings
 by inputting the files |ot1enc.def| and |t1enc.def|; it also sets up
@@ -1371,7 +1371,7 @@
 the `cmr' family).
 
 \subsection{Encoding definition file commands}
-\label{Sec:encode.def}
+\label{sec:encode.def}
 
 \emph{Note}: An encoding definition file should contain only commands
 from this subsection.
@@ -1660,7 +1660,7 @@
 
 \NEWdescription{2019/07/10}
 This declaration is normally done in an encoding definition file
-(see~\ref{Sec:encode.def}), but can also be used in a class file or the
+(see~\ref{sec:encode.def}), but can also be used in a class file or the
 document preamble to alter the default for a specific encoding.
 
 If no defaults are set up for an encoding, the values given by
@@ -1705,7 +1705,7 @@
 extended for use with some Cyrillic encodings.
 
 \section{Miscellanea}
-\label{Sec:misc}
+\label{sec:misc}
 
 This section covers the remaining font commands in \LaTeX{} and some
 other issues.

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)

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

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

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/ltnews36.pdf
===================================================================
(Binary files differ)

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.tex	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -388,7 +388,7 @@
 %
 \cs{IfClassAtLeastTF},
 \cs{IfClassLoadedTF},
-\cs{IfClassLoadedWithOptionsFF},
+\cs{IfClassLoadedWithOptionsTF},
 \cs{IfFormatAtLeastTF},
 \cs{IfPackageAtLeastTF},
 \cs{IfPackageLoadedTF}, and

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -157,8 +157,27 @@
 
 \section{Introduction}
 
-% To write
+\emph{to write \ldots\ 30th aniversary of \LaTeXe{} this year btw}
 
+\section{Switch to T1 as default encoding in documents using \cs{DocumentMetadata}}
+
+As it is well known the font encoding \texttt{OT1} supports only 128 characters and 
+has various problems and quirks notably for languages different to English. 
+Nevertheless \texttt{OT1} is the default encoding in \LaTeX{} and this can not be easily 
+changed without affecting many documents as the \texttt{T1} version of the fonts have slightly different metrics. 
+
+The introduction of the \cs{DocumentMetadata} command, which announces 
+\emph{new} code and changes that can also affect the layout gives us now the 
+opportunity to make this step. So with this version a use of 
+\cs{DocumentMetadata} with (pdf)\LaTeX{} will setup  \texttt{T1} as default 
+font encoding\footnote{The Unicode engines will continue to use \texttt{TU} 
+as encoding.}. To ensure that scalable fonts are used, the package 
+\pkg{cm-super} has to be installed. Users who want to revert to the 
+\texttt{OT1} encoding in their document can do so with
+\verb+\usepackage[OT1]{fontenc}+. 
+
+
+
 \section{News from the \enquote{\LaTeX{} Tagged PDF} project}
 
 The tagging of tabulars has been extended: it is now possible to tag
@@ -173,6 +192,10 @@
 This new feature can be disabled with \verb+\tagpdfsetup{math/mathml/luamml=false}+ 
 More details can be found in the documentation of \pkg{latex-lab-math}. 
 
+At \url{https://latex3.github.io/tagging-project/tagging-status/} we show the status of many \LaTeX{} Packages and Classes with respect to PDF tagging. 
+We also started to improve tagging support in external packages. If the 
+\texttt{firstaid} key is used in addition to the \texttt{phase-III} key
+basic commands of packages like \pkg{amsthm} and \pkg{fancyvrb} can now be used. 
 
 \section{Handling paragraph continuation}
 
@@ -213,6 +236,24 @@
 
 \section{New or improved commands}
 
+\subsection{Avoid bogus \enquote{no item} error}
+
+The commands \cs{addvspace} and \cs{addpenalty} generated the famous
+error message \enquote{Something's wrong--perhaps a missing \cs{item}}
+when they were encountered outside vertical mode. Most of the time this
+error was bogus and if not, then it was generated several times rather
+than once.
+
+Once upon a time (in \LaTeX{}~2.09) it was necessary that these
+commands were used only in vertical mode, but with \LaTeXe{} in 1994,
+we changed the internals but simply overlooked that this error message
+then had become useless. In this release, i.e.,~30 years too late, we have
+finally lifted the ban and from now on this error should only show
+up if there is indeed a missing \cs{item}.
+%
+\githubissue{1460}
+
+
 \section{Code improvements}
 
 \subsection{Avoiding keyval option clashes between classes and packages}
@@ -241,11 +282,47 @@
 \texttt{draft} option will be treated in the normal way by packages using
 keyvals, but they will ignore the \texttt{mode} option: it is effectively
 marked as \enquote{private} to the class.
+%
+\githubissue{1279}
 
 
+\subsection{Improved error raised by empty hook}
 
-\githubissue{1279}
+When using the hook management, both hook and label names (if specified) 
+should be non-empty. Before empty hook and empty label both raised the
+same label-specific error.
+\begin{verbatim}
+! LaTeX hooks Error: Empty code label on line ....
+  Using 'top-level' instead.
+\end{verbatim}
+This has now been improved. Now empty hook raises
+\begin{verbatim}
+! LaTeX hooks Error: Empty hook on line ....
+\end{verbatim}
+%
+\githubissue{1423}
 
+\subsection{Provide counter representations for link targets}
+
+To create unique target names for links the package 
+\pkg{hyperref} uses a special counter representation
+\verb+\theH+\meta{counter}. To ensure that this 
+counter representation exists, \pkg{hyperref} redefined the 
+commands \verb+\@definecounter+, \verb+\@addtoreset+ 
+and \verb+\refstepcounter+. This counter representation is also
+needed for the Tagged PDF project and and so these augmented command definitions 
+have now been incorporated
+into the kernel. 
+Thus from now on every \verb+\newcounter{+\meta{counter}\verb+}+ will not
+only define \verb+\the+\meta{counter} but also \verb+\theH+\meta{counter}.
+
+\subsection{Extending \cs{refstepcounter}}
+
+The package \pkg{hyperref} redefines since many years \verb+\refstepcounter+ and
+adds code that creates link targets. The kernel definition has now been extended
+with socket interfaces that will allow \pkg{hyperref} to avoid the redefinitions. The new interfaces are also used by the Tagged PDF code that needs target names to resolve
+references between structures.
+
 \section{Bug fixes}
 
 \subsection{Fix wrong file type in a rollback warning}
@@ -286,6 +363,30 @@
 %
 \githubissue{1399}
 
+\subsection{Handling of global keys with spaces}
+
+If the global (class) options contained spaces around key names,
+\cs{ProcessKeyOptions} would fail to remove known keys from the
+list of unused global options and \cs{OptionNotUsed} would mistakenly
+add space-surrounded key names to that list.
+These has been corrected as a hotfix in patch level 1 of the November 2023
+release (but unfortunately not mentioned in~\cite{40:ltnews38}) and
+the current release, respectively.
+%
+\githubissue{1238}
+
+\subsection{File list entries for rolled back packages/classes}
+When the rollback mechanism for packages and classes was introduced
+in 2018~\cite{40:ltnews28}, loading of the selected historic release
+was not recorded in the file list used by \cs{listfiles}.
+This has now been corrected so that the extended usage~\cite{40:ltnews39}
+\begin{verbatim}
+\listfiles[hashes,sizes]
+\end{verbatim}
+now gives more complete and less confusing info.
+%
+\githubissue{1413}
+
 \subsection{\pkg{doc}:\ \cs{PrintDescribeMacro} in preamble}
 
 In \pkg{doc} version 2 it was possible alter the definition of
@@ -317,9 +418,15 @@
 %
 \githubissue{1407}
 
+\section{Passing template keys using \cs{KeyValue}}
 
+With the move of the template code to the kernel, some internal efficiencies
+were also made. However, there was an oversight in how passing key values from
+one setting to another was implemented, meaning that using \cs{KeyValue} could
+result in an infinite loop. This has now been fixed.
+%
+\githubissue{1486}
 
-
 \section{Changes to packages in the \pkg{amsmath} category}
 
 \section{Extend support for \cs{dots}}
@@ -341,7 +448,16 @@
 
 \section{Changes to packages in the \pkg{tools} category}
 
+\subsection{Modification to generation of the \file{.tex} from \pkg{fileerr}}
 
+The \pkg{fileerr} extraction has been modified to write \texttt{rename-to-empty-base.tex}
+rather than \texttt{.tex} to comply with an expected security change in texlive 2025.
+\texttt{build.lua} has been  modified to rename \texttt{rename-to-empty-base.tex} to \texttt{.tex}
+after unpacking. However if using \textsf{docstrip} directly rather than using \textsf{l3build}
+or the unpacked zip file from \CTAN{}, the user must now rename the file and  install as \texttt{.tex}.
+%
+\githubissue{1412}
+
 \subsection{\pkg{array}: Tagging support for \cs{cline}}
 
 In the last release we added tagging support for \pkg{array},
@@ -375,6 +491,18 @@
   {\endlongtable}
 \end{verbatim}
 
+
+\subsection{\pkg{array}: Improve \texttt{>\{...\}} specifier}
+
+If the argument of \texttt{>\{...\}} ended with a command accepting a
+trailing optional argument, e.g., defined for example with
+\verb=\NewDocumentCommand\foo{o}{...}=, one could get low-level
+parsing errors. This has now been corrected.
+%
+\githubissue{1468}
+
+
+
 %\section{Changes to files in the \pkg{cyrillic} category}
 
 \begin{thebibliography}{9}\frenchspacing
@@ -393,10 +521,18 @@
   \emph{\LaTeXe{} news 1--39}. June, 2024.
   \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
 
+\bibitem{40:ltnews28} \LaTeX{} Project Team.
+  \emph{\LaTeXe{} news 28}. April 2018.
+  \url{https://latex-project.org/news/latex2e-news/ltnews28.pdf}
+
 \bibitem{40:ltnews35} \LaTeX{} Project Team.
   \emph{\LaTeXe{} news 35}. June 2022.
   \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
 
+\bibitem{40:ltnews38} \LaTeX{} Project Team.
+  \emph{\LaTeXe{} news 38}. November 2023.
+  \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}
+
 \bibitem{40:ltnews39} \LaTeX{} Project Team.
   \emph{\LaTeXe{} news 39}. June 2024.
   \url{https://latex-project.org/news/latex2e-news/ltnews39.pdf}

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/ltproperties-code.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-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/ltsockets-code.pdf
===================================================================
(Binary files differ)

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

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

Index: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf	2024-10-14 19:13:47 UTC (rev 72549)

Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-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/lttemplates-code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{lttemplates.dtx}


Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-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/lttemplates-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf	2024-10-14 19:13:47 UTC (rev 72549)

Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-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/lttemplates-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -0,0 +1,8 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+%                 \let\tableofcontents\relax
+                  \RenewCommandCopy\MaybeStop\StopEventually
+                 }
+\input{lttemplates.dtx}


Property changes on: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-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/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/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/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/tlc3.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-historic.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/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/firstaid/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,3 +1,8 @@
+2024-06-25  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* latex2e-first-aid-for-external-files.dtx: add firstaid for arydshln
+	define two internal macros as \protected to be safe in colortbl
+
 2024-03-22  Ulrike Fischer  <Ulrike.Fischer at latex-project.org>
 
 	* latex2e-first-aid-for-external-files.dtx: add firstaid for cleveref

Modified: trunk/Master/texmf-dist/doc/latex-dev/firstaid/latex2e-first-aid-for-external-files.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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/graphics/README.md	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,7 +1,7 @@
 The LaTeX `graphics` bundle
 ===========================
 
-Release 2024-11-01 pre-release 2
+Release 2024-11-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/latex-lab/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,6 +1,6 @@
 # LaTeX laboratory
 
-Release 2024-11-01 pre-release 3
+Release 2024-11-01 pre-release 4
 
 ## Overview
 

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

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,3 +1,90 @@
+2024-10-12 Joseph Wright <Joseph.Wright at latex-project.org>
+	* latex-lab-math.dtx: Sync with protected-begin status
+
+2024-10-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-toc.dtx, latex-lab-sec.dtx, latex-lab-toc-kernel-changes: move target
+	handling (\MakeLinkTarget patches) into the kernel.
+
+2024-10-11  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* latex-lab-block.dtx (subsubsection{verse environment}):
+	Update \@itemlabel in \l_@@_legacy_env_params_tl and not at the start of
+	the environment (tagging/730)
+
+	Set the defaults for \@itemlabel, \@listctr and @nmbrlist early in the
+	block code before the setup code gets executed (tagging/730)
+
+	(subsubsection{Implementation of list templates ...):
+	Correct logic for setting up the list counter  (tagging/730)
+
+2024-10-04  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-firstaid.dtx: add first support for fancyvrb environments.
+
+2024-10-04  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-sec.dtx (subsection{Sockets}):
+	add missing braces around optional arg (tagging/725)
+
+2024-10-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+	* latex-lab-block.dtx (subsubsection{Implementation of list templates ...}):
+	Pass user keys on list to \item for evaluation
+
+2024-10-02  Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-math.dtx (subsection{Sockets}):
+	disable paratagging in inline math (tagging/711)
+
+2024-09-30 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-footnotes.dtx: remove unneeded NonStruct structure.
+
+2024-09-30  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+	* latex-lab-math.dtx (subsection{Content grabbing}):
+	Correct logic for inserting below skips after displays (tagging/721)
+
+2024-09-26 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-firstaid.dtx: add support for theorems declared with
+	amsthm, amsart, amsbook, amsproc.
+
+2024-09-24 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-sec.dtx,latex-lab-footnotes.dtx:
+	correct and improve footnotes in longtable
+
+2024-09-24 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-toc.dtx,latex-lab-footnotes.dtx: adapt Ref handling to tagpdf 0.99f
+
+2024-09-18 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-amsmath.dtx,latex-lab-graphic.dtc,
+	latex-lab-marginpar.dtx,latex-lab-math.dtx,latex-lab-mathtools.dtx,
+	latex-lab-minipage.dtx,latex-lab-sec.dtx,latex-lab-table.dtx,latex-lab-text.dtx:
+	 switch to \tag_suspend:n and \tag_resume:n
+
+2024-09-17 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-float.dtx: switch to tagging sockets
+
+2024-09-13 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* documentmetadata-support.dtx: change warning to error if pdfstandard is unknown,
+      see https://github.com/latex3/pdfresources/issues/77#issuecomment-2329522654.
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* documentmetadata-support.dtx: switch to T1 encoding by default for non-Unicode
+	engines.
+
+2024-09-02  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+	* latex-lab-block.dtx (subsubsection{List tags}):
+	Do not close LI and LBody if they were never opened because of a
+	missing \item (issue tagging/641)
+
+	(subsubsection{Implementation of \cs{item} template(s)}):
+	Set @newlist to false after the first \item (issue tagging/36)
+
+	Call \@noitemerr in para/begin hook if hmode is started before
+	the first item
+
+	(subsubsection{Implementation of block templates \ldots}):
+	Drop \@noitemerr from \addvspace and \addpenalty
+
+2024-08-29 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* latex-lab-math.dtx: avoid loosing math if tagging is suspended,
+	  tagging-project issue #661
+
 2024-08-22 Joseph Wright <Joseph.Wright at latex-project.org>
 	* latex-lab-math.dtx: correct handling of empty math processing
 
@@ -21,7 +108,7 @@
 	* latex-lab-block.dtx, latex-lab-table.dtx: reset flattened level in para/restore, issue #544
 
 2024-08-08 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
-	* latex-lab-minipage.dtx, latex-lab-table.dtx: improve support for minipage in tables. 
+	* latex-lab-minipage.dtx, latex-lab-table.dtx: improve support for minipage in tables.
 	 handle issue #37
 
 2024-08-06 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
@@ -41,7 +128,7 @@
 	(subsection{Misc stuff}): drop unused socket
 
 2024-07-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
-	* latex-lab-toc.dtx, latex-lab-toc-kernel-changes: switch from configuration points 
+	* latex-lab-toc.dtx, latex-lab-toc-kernel-changes: switch from configuration points
 	 to sockets.
 
 2024-05-25 Ulrike Fischer <Ulrike.Fischer at latex-project.org>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
===================================================================
(Binary files differ)

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

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

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

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

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

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/README.md	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,7 +1,7 @@
 The LaTeX `tools` bundle
 ========================
 
-Release 2024-11-01 pre-release 2
+Release 2024-11-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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,3 +1,32 @@
+=======================================================================
+This file lists changes to the LaTeX2e files in reverse chronological order.
+It is provided for convenience only.  It therefore makes no claims to
+completeness or accuracy and it contains some references to files that
+are not part of the distribution.
+=======================================================================
+
+2024-10-12  Joseph Wright  <Joseph.Wright at latex-project.org>
+
+	* array.dtx (section{The insertion of declarations ...}):
+	Further work on handling optional arguments in the argument
+	of >{...} to work around a master counter oddity (gh/1468)
+
+2024-09-18  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* array.dtx (section{The insertion of declarations ...}):
+	Stop parsing too far for an optional argument if >{...} ends in a command
+	with a trailing optional arg (gh/1468)
+
+2024-09-17  Ulrike Fischer  <Ulrike.Fischer at latex-project.org>
+	* multicol.dtx: add tagging support  (tagging/705)
+
+2024-09-12  David Carlisle  <David.Carlisle at latex-project.org>
+
+	* build.lua, tools.ins:
+	Modify fileerr extraction to write rename-to-empty-base.tex rather than .tex
+	to comply with expected security change in texlive 2025
+	build.lua modified to rename rename-to-empty-base.tex to .tex after unpacking.
+
 2024-08-13  Ulrike Fischer  <Ulrike.Fischer at latex-project.org>
 
 	* longtable.dtx:
@@ -9,13 +38,6 @@
 	* array.dtx (subsection{Handling \cs{cline}}):
 	Support for tagging \cline (tagging/134)
 
-=======================================================================
-This file lists changes to the LaTeX2e files in reverse chronological order.
-It is provided for convenience only.  It therefore makes no claims to
-completeness or accuracy and it contains some references to files that
-are not part of the distribution.
-=======================================================================
-
 2024-07-04  Ulrike Fischer  <Ulrike.Fischer at latex-project.org>
 
 	* longtable.dtx:

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/l3sys-query.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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/amsmath/amsmath.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -85,7 +85,7 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\ProvidesPackage{amsmath}[2024/05/23 v2.17q AMS math features]
+\ProvidesPackage{amsmath}[2024/08/11 v2.17r AMS math features]
 %    \end{macrocode}
 %
 % \section{Catcode defenses}
@@ -166,7 +166,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % \section{Flush-left equations [DMJ]}
 %
-%    The left margin of math enviroments is controlled by
+%    The left margin of math environments is controlled by
 %    \cs{@mathmargin}.  This can be set to \cs{@centering} to
 %    implement the default behaviour, i.e., centered equations, and to
 %    something else to implement the flushleft style.
@@ -208,7 +208,7 @@
 %
 %    The next question is what happens when amsmath is used with
 %    one of the standard classes.  Unfortunately, \latex/ implements
-%    \opt{fleqn} somewhat clumsily; instead of paramaterizing the
+%    \opt{fleqn} somewhat clumsily; instead of parameterizing the
 %    definitions of the math structures (as I've attempted to do
 %    here), \fn{fleqn.clo} declares a dimen \cn{mathindent} that is
 %    much like my \cs{@mathmargin} and then redefines \cn\[, \cn\],
@@ -653,7 +653,7 @@
 %
 %    the |withdelims| primitives do not work in xetex with OpenType
 %    fonts, and the relevant font dimen parameters are often not set
-%    in luatex as theer are no matching values in the OpenType Math
+%    in luatex as there are no matching values in the OpenType Math
 %    table, so here we use variants that use the font parameters if
 %    they are set, but scale using |\left\right| rather than the
 %    |withdelims| primitives.
@@ -1087,7 +1087,15 @@
   \ifx9#2 \@xp\@xp\@xp\zap at to@space\fi}}}
 \def\zap at to@space#1 {}
 %    \end{macrocode}
+%    
+% \changes{v2.17r}{2024/06/29}{macro added to strip \cs{protected} (gh/1265)}
 %    \begin{macrocode}
+{\uccode`9=`\p %
+  \uppercase{\gdef\stripprotected@#1#2#3\relax{%
+      \ifx9#2 \@xp\@xp\@xp\zap at to@space\fi}}}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \def\keybin@{\gtest at true
  \ifx\@let at token+\else\ifx\@let at token=\else
  \ifx\@let at token<\else\ifx\@let at token>\else
@@ -1139,16 +1147,38 @@
          \gdef\thedots@{\dotsb@}%
        \else
 %    \end{macrocode}
-% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway argument error}
+%    In case \cs{@let at token} is a robust \LaTeXe{} command, i.e.,
+%    expands to \cs{protect}
+%    \verb*=\somename =, we save the \cs{meaning} of
+%    \verb*=\somename = in \cs{meaning@} (possibly followed by some dots that have
+%    not been consumed as arguments during the expansion).
+%    Otherwise, we save the
+%    \cs{meaning} of \cs{@let at token} in \cs{meaning@}.  The dots at the end
+%    as well as the space are
+%    used in later parts of the checking (this could probably be cleaned up a bit).
+% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway
+%    argument error}
+% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
 %    \begin{macrocode}
-         \xdef\meaning@{\meaning\@let at token. .........}%
+       \begingroup
+         \def\protect{\protect}% % make it a quark
+         \xdef\meaning@{\@xp\stripprotect@\@let at token.........\stripprotect at . .........}%
+       \endgroup
 %    \end{macrocode}
-% In previous versions \verb|\long| macros were not seen by the lokkahead.
+% In previous versions \verb|\long| macros were not seen by the lookahead.
 % That was bad as this file uses \verb|\(re)newcommand| for \verb|\implies| etc.
 %    \begin{macrocode}
          \xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}%
 %    \end{macrocode}
+%    Until now \cs{protected} macros also stopped the lookahead, e.g.,
+%    $\cong$ wasn't recognized correctly for that reason.
+%         
+% \changes{v2.17r}{2024/06/29}{Handle \cs{protected} macros in
+%    lookahead for dots (gh/1265)}
 %    \begin{macrocode}
+         \xdef\meaning@@{\@xp\stripprotected@\meaning@@\relax\meaning@@}%
+%    \end{macrocode}
+%    \begin{macrocode}
          \@xp\math@\meaning@\math@
          \ifgtest@ % if \mathxxx test
            \@xp\mathch@\meaning@\mathch@
@@ -1208,6 +1238,15 @@
  \thedots@}
 %    \end{macrocode}
 %
+%    The helper to generate the meaning of \cs{\@let at token}, or of its
+%    first-level expansion with \cs{protect} removed.
+% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
+%    \begin{macrocode}
+\def\stripprotect@#1#2\stripprotect@{\ifx#1\protect
+  \meaning#2\else \meaning\@let at token \fi}
+
+%    \end{macrocode}
+%
 %    The \qc{\=} character is necessary in the two \cs{let} assignments
 %    in \cs{boldsymboldots@}, because the symbol we are making
 %    bold might be an \qc{\=} sign.
@@ -3363,7 +3402,7 @@
 % \end{macro}
 %
 %  \begin{macro}{\column at plus}
-%    \cs{\column at plus} is a useful abbreviation.
+%    \cs{column at plus} is a useful abbreviation.
 %    \begin{macrocode}
 \def\column at plus{%
     \global\advance\column@\@ne
@@ -3786,7 +3825,7 @@
 %    (In earlier versions of the code anything other than \texttt{b}
 %    or \texttt{t} was interpreted as \texttt{c} and the data was
 %    otherwise dropped.)
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
 %    optional argument is different (gh/5)}
 %    \begin{macrocode}
 \def\ams at start@box#1{%
@@ -3919,7 +3958,7 @@
 %    \end{macrocode}
 %    If we picked up a bracket group by mistake here is the place to
 %    return it for processing.
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
 %    optional argument is different (gh/5)}
 %    \begin{macrocode}
           \ams at return@opt at arg
@@ -4018,7 +4057,7 @@
             \crcr
 %    \end{macrocode}
 %    And put a mistaking picked up bracket group back:
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
 %    optional argument is different (gh/5)}
 %    \begin{macrocode}
     \ams at return@opt at arg
@@ -4592,7 +4631,7 @@
 %    \env{alignat} (i.e., the $n$th field of \cs{maxcolumn at widths}.)
 %    It expands to a \<dimen>, so it can be used as the right-hand
 %    side of a \<variable assignment> or \<arithmetic> statement.
-%    It's argument can be any \<number>, \<integer variable> or macro
+%    Its argument can be any \<number>, \<integer variable> or macro
 %    that expands to one of these.  [Check to make sure this is true.]
 %
 %    This is subtler than it looks.
@@ -5041,7 +5080,7 @@
 %    Next we consider the case when equations are flush-left, but tags
 %    are on the right.  This case is somewhat more complicated than
 %    the previous one, since we can adjust the right margin by varying
-%    the inter-align separatin. Thus, when a tag is found to be too
+%    the inter-align separation. Thus, when a tag is found to be too
 %    close to its equation, we first attempt to decrease
 %    \cs{alignsep@} enough to move the equation off to an acceptable
 %    distance.  Only if that would require a value of \cs{alignsep@}
@@ -5078,7 +5117,7 @@
 %    \cs{alignsep@} are both~0.  To get the number of align
 %    structures, we first count the number of columns by counting the
 %    number of entries in the \cs{fieldlengths@} for the current row.
-%    The effective length is calcuated by \cs{x at rcalc@width} and put
+%    The effective length is calculated by \cs{x at rcalc@width} and put
 %    in the temporary register \cs{@tempdimc}, using \cs{@tempdimb} as
 %    an auxiliary variable.
 %    \begin{macrocode}
@@ -5500,7 +5539,7 @@
 %    might occur at the beginning of the current line.  More
 %    specifically, we first set \cs{count@} equal to the number of
 %    interalign spaces preceding the current field (namely, $\lfloor
-%    (\cs{\column@}-1)/2 \rfloor$), and then subtract \cs{count@} from
+%    (\cs{column@}-1)/2 \rfloor$), and then subtract \cs{count@} from
 %    both \cs{@tempcnta} and \cs{@tempcntb}.  The rationale is that
 %    for the purposes of adjusting the spacing between the tag and the
 %    equation, the only flexible interalign spaces are those after
@@ -5523,7 +5562,7 @@
 %    \end{macro}
 %
 %  \begin{macro}{\place at tag}
-%    \cs{place at tag} takes care of the placment of tags in the
+%    \cs{place at tag} takes care of the placement of tags in the
 %    \env{align} environments.
 %    \begin{macrocode}
 \def\place at tag{%
@@ -6187,7 +6226,7 @@
 %    in his \fn{amstex.doc} Spivak indicates those commands should never
 %    be used on a first or last line. Perhaps better to leave the
 %    question open unless/until real-life examples turn up.
-% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trival)}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trivial)}
 %    \begin{macrocode}
 \iftagsleft@
     \protected\def\shoveright#1{%
@@ -6212,7 +6251,7 @@
     }
 \fi
 %    \end{macrocode}
-% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trival)}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trivial)}
 %    \begin{macrocode}
 \if at fleqn
     \def\shoveleft#1{#1}%
@@ -6576,7 +6615,7 @@
 \def\mathdisplay@@pop{\the\mathdisplay at stack}
 %    \end{macrocode}
 %\changes{v2.17k}{2021/08/24}{Move the counter inside the equation and guard
-% with a mathopen for better compability with hyperref, issue gh/652}
+% with a mathopen for better compatibility with hyperref, issue gh/652}
 % As with hyperref incrementing the counter creates a box to raise the anchor
 % it should be in a place where is doesn't affect spacing.
 % Currently the code from hyperref is used to avoid this problem:
@@ -6583,7 +6622,7 @@
 % If fleqn isn't active the counter is set inside the equation and the potential
 % box guarded by a mathopen to avoid side effects on following unary symbols.
 % If fleqn is activated it has to be outside to avoid problems with labels.
-% This solution is temporary and not necessarly the best.
+% This solution is temporary and not necessarily the best.
 %    \begin{macrocode}
 \if at fleqn
 \renewenvironment{equation}{%
@@ -6637,7 +6676,7 @@
 %
 % \section{Credits}
 %
-%    Much of the code for the \pkg{amsmath} package had its orgin in
+%    Much of the code for the \pkg{amsmath} package had its origin in
 %    \fn{amstex.tex}, written by Michael Spivak. The initial work of
 %    porting \fn{amstex.tex} to \fn{amstex.sty} was done in 1988--1989
 %    by Frank Mittelbach and Rainer Sch\"opf. In 1994 David M. Jones

Modified: trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -40,7 +40,7 @@
 %<driver, >\ProvidesFile{fontdef.drv}
 % \fi
 % \ProvidesFile{fontdef.dtx}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
 % \iffalse
 %<text,   >   (Text font setup)
 %<math,   >   (Math font setup)
@@ -403,9 +403,12 @@
 %    (nearly) every \TeX{} installation, while the amount of main memory
 %    is not a limiting factor at most installations.)
 %
+% \changes{v3.0k}{2024/09/03}{Load also t1cmss.fd and t1cmtt.fd}
 %    \begin{macrocode}
 \begingroup
 \nfss at catcodes
+\input {t1cmss.fd}
+\input {t1cmtt.fd}
 \input {ot1cmss.fd}
 \input {ot1cmtt.fd}
 \endgroup

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltclass.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltclass.dtx}
-             [2024/06/04 v1.5l LaTeX Kernel (Class & Package Interface)]
+             [2024/08/28 v1.5m LaTeX Kernel (Class & Package Interface)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltclass.dtx}
@@ -1111,7 +1111,7 @@
 %    \IfFormatAtLeastT,\IfFormatAtLeastF,
 %    \IfPackageLoadedWithOptionsT,\IfPackageLoadedWithOptionsF,
 %    \IfClassLoadedT,\IfClassLoadedF,
-%    \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionTF
+%    \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionsTF
 %   }
 %    A few more conditionals for convenience
 % \changes{v1.5k}{2024/04/10}{Provide T and F conditionals not just TF
@@ -1515,7 +1515,9 @@
 %<latexrelease>\IncludeInRelease{2021/06/01}%
 %<latexrelease>                 {\OptionNotUsed}{filter unused option list}%
 %<*2ekernel|latexrelease>
-\def\@remove at eq@value#1=#2\@nil{#1}
+\ExplSyntaxOn
+\def\@remove at eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}}
+\ExplSyntaxOff
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -3931,8 +3933,11 @@
 %    first line of the |\@@input|!
 % \changes{v1.2e}{2018/03/24}
 %         {Use full file name for old release}
+% \changes{v1.5m}{2024/08/03}
+%         {Add selected release to the file list (gh/1413)}
 %    \begin{macrocode}
    \pkgcls at targetdate\z@
+   \@addtofilelist{#1}%
    \@@input #1\relax
    \endinput
 }

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltcounts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltcounts.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltcounts.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltcounts.dtx}
-             [2021/11/08 v1.1n LaTeX Kernel (Counters)]
+             [2024/09/20 v1.1o LaTeX Kernel (Counters)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltcounts.dtx}
@@ -171,13 +171,15 @@
 %
 %    |\refstepcounter|\marg{foo}\\
 %         Same as |\stepcounter|, but it also defines
-%         |\@currentreference| so that a subsequent
+%         |\@currentlabel|, |\@currentHref| and |\@currentcounter|
+%          and so that a subsequent
 %         |\label|\marg{bar} command causes |\ref|\marg{bar} to
 %          generate the current value of counter \meta{foo}.
 %
 %    |\@definecounter|\marg{foo}\\
 %        Initializes counter \marg{foo} (with empty reset list), defines
-%        |\p at foo| and |\thefoo| to be null. Also adds \meta{foo}
+%        |\p at foo| and |\thefoo| to be null and |\theHfoo| to be
+%        |\number\value{foo}|. Also adds \meta{foo}
 %        to |\cl@@ckpt| --
 %          the reset list of a dummy counter |@ckpt| used for taking
 %          checkpoints for the |\include| system.
@@ -306,13 +308,18 @@
 %  \changes{v1.1b}{1995/05/20}{Streamlined code}
 %  \changes{v1.1c}{1995/05/20}{And do it right}
 %  \changes{v1.1n}{2023/11/07}{Do not change \cs{the...} if already defined (gh/823)}
-%
+%  \changes{v1.1o}{2024/09/20}{define theHfoo (used for internal links)}
 %    \begin{macrocode}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@definecounter}
+%<latexrelease>                             {provide theHfoo commands}%
+%<*2ekernel|latexrelease>
 \def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
      \setcounter{#1}\z@
      \global\expandafter\let\csname cl@#1\endcsname\@empty
      \@addtoreset{#1}{@ckpt}%
      \global\expandafter\let\csname p@#1\endcsname\@empty
+     \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%
 %    \end{macrocode}
 %    If \cs{the\#1} is undefined or \cs{relax} we define it with the
 %    standard definition for counters, otherwise we warn. This will
@@ -328,12 +335,51 @@
        \@latex at warning{Command `\string\the#1' already
                        defined -- not changed}%
      \fi}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@definecounter}
+%<latexrelease>                             {provide theHfoo commands}%%
+%<latexrelease>\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
+%<latexrelease>     \setcounter{#1}\z@
+%<latexrelease>     \global\expandafter\let\csname cl@#1\endcsname\@empty
+%<latexrelease>     \@addtoreset{#1}{@ckpt}%
+%<latexrelease>     \global\expandafter\let\csname p@#1\endcsname\@empty
+%<latexrelease>     \expandafter
+%<latexrelease>     \ifx\csname the#1\endcsname\relax
+%<latexrelease>       \expandafter
+%<latexrelease>     \gdef\csname the#1\expandafter\endcsname\expandafter
+%<latexrelease>          {\expandafter\@arabic\csname c@#1\endcsname}%
+%<latexrelease>     \else
+%<latexrelease>       \@latex at warning{Command `\string\the#1' already
+%<latexrelease>                       defined -- not changed}%
+%<latexrelease>     \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
 % \begin{macro}{\@addtoreset}
+%  \changes{v1.1o}{2024/09/20}{add the parent theHfoo if a counter is reset}
+%  If a counter is reset when a parent counter changes it no longer has an unique value
+%  across the document. As |\theH<counter>| should be unique
+%  this representation is changed to include also the
+%  representation of the parent. This is not 100\% guaranteed to work
+%  but has been used this way by hyperref for many years without causing problems.
 %    \begin{macrocode}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@addtoreset}
+%<latexrelease>                             {provide theHfoo commands}%
+%<*2ekernel|latexrelease>
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
+  \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
+}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@addtoreset}
+%<latexrelease>                             {provide theHfoo commands}%%
+%<latexrelease>\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -423,7 +469,7 @@
   }%
 }
 %    \end{macrocode}
-%    
+%
 %    \begin{macrocode}
 \NewDocumentCommand \counterwithin {sO{\arabic}mm}{%
   \@ifbothcounters{#3}{#4}{%

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltdefns.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltdefns.dtx}
-             [2024/04/17 v1.5t LaTeX Kernel (definition commands)]
+             [2024/09/06 v1.5t LaTeX Kernel (definition commands)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltdefns.dtx}
@@ -1772,11 +1772,11 @@
 %
 %   Most of the machinery defined for \cs{NewCommandCopy} can be used to show
 %   the definition of a robust command, in a similar fashion to \texttt{texdef}.
-%   The difference is that after the command's is detected to has a given type
+%   The difference is that after the command is detected to have a given type
 %   of robustness, rather than making a copy, we use a separate routine to show
 %   its definition.
 %
-%   With all the machinery in place, \cs{ShowCommand} itself is quite simple:
+%   With all the machinery in place, \cs{ShowCommand} itself is quite simple: we
 %   use \cs{robust at command@act} to iterate through the \cs{@showcommandlisthook}
 %   list, and if nothing is found, fallback to \cs{show}.
 %    \begin{macrocode}
@@ -1837,7 +1837,8 @@
 %   tests are heavily based on Heiko's \cs{LetLtxMacro}, but chopped into
 %   separate macros.
 %
-%   \cs{@if at DeclareRobustCommand} checks if a command \verb=\cmd= was defined by
+%   The command \cs{@if at DeclareRobustCommand} checks if a command
+%   \verb=\cmd= was defined by 
 %   \cs{DeclareRobustCommand}.  The test returns true if the expansion of
 %   \verb=\cmd= is exactly \verb*=\protect\cmd =.
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/base/lterror.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lterror.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lterror.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{lterror.dtx}
-             [2021/08/20 v1.2t LaTeX Kernel (errors)]
+             [2024/09/12 v1.2u LaTeX Kernel (errors)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{lterror.dtx}
@@ -766,6 +766,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@LRmoderr}
+% A command is not allowed in restricted horizontal mode, i.e., in LR-mode in \LaTeX{} terminology.
+% \changes{v1.2u}{2024/09/11}{Error message added}
+%    \begin{macrocode}
+\gdef\@LRmoderr{%
+  \@latex at error{Not allowed in LR mode}\@ehb}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@parmoderr}
 % Occurs in a float environment or a |\marginpar| when
 % encountered in inner vertical mode.

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -36,7 +36,7 @@
 %
 %
 \ProvidesFile{ltfssini.dtx}
-             [2024/02/08 v3.2i LaTeX Kernel (NFSS Initialisation)]
+             [2024/08/28 v3.2i LaTeX Kernel (NFSS Initialisation)]
 % \iffalse
 \documentclass{ltxdoc}
 \begin{document}
@@ -1397,7 +1397,7 @@
 %    \end{itemize}
 %    This allows you to define commands like \cs{IfBold}, e.g.,
 %\begin{verbatim}
-%    \newcommand\IfBold[2]{\IfSeriesContextTF{bf}{#1}{#2}}
+%    \NewDocumentCommand\IfBold{mm}{\IfFontSeriesContextTF{bf}{#1}{#2}}
 %\end{verbatim}
 %    and then do
 %\begin{verbatim}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lthooks.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{lthooks.dtx}
-             [2024/07/08 v1.1h LaTeX Kernel (hooks)]
+             [2024/08/09 v1.1i LaTeX Kernel (hooks)]
 % \iffalse
 %
 \documentclass{l3doc}
@@ -3298,21 +3298,26 @@
 %
 % \subsection{Parsing a label}
 %
-% \begin{macro}[EXP]{\@@_parse_label_default:n}
+% \begin{macro}[EXP]{\@@_parse_label_default:nN}
 %   This macro checks if a label was given (not \cs{c_novalue_tl}), and
 %   if so, tries to parse the label looking for a leading \verb|.| to
 %   replace by \cs{@@_currname_or_default:}.
+%   |#2| is a boolean representing if |#1| is a label name.
+% \changes{v1.1i}{2024/08/09}
+%         {Distinguish between empty label and empty hook (gh/1423)}
 %    \begin{macrocode}
-\cs_new:Npn \@@_parse_label_default:n #1
+\cs_new:Npn \@@_parse_label_default:nN #1#2
   {
     \tl_if_novalue:nTF {#1}
       { \@@_currname_or_default: }
-      { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:n }
+      { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:nN #2 }
   }
 %    \end{macrocode}
 % \end{macro}
 %
-% \begin{macro}[EXP]{\@@_parse_dot_label:n}
+% \begin{macro}[EXP]{\@@_parse_dot_label:nN}
+% \changes{v1.1i}{2024/08/09}
+%         {Distinguish between empty label and empty hook (gh/1423)}
 % \begin{macro}[EXP]{
 %     \@@_parse_dot_label:w,
 %     \@@_parse_dot_label_cleanup:w,
@@ -3325,12 +3330,15 @@
 %   If these requirements are fulfilled, the leading
 %   \verb|.| is replaced with \cs{@@_currname_or_default:}.  Otherwise
 %   the label is returned unchanged.
+%   |#2| is a boolean representing if |#1| is a label name.
 %    \begin{macrocode}
-\cs_new:Npn \@@_parse_dot_label:n #1
+\cs_new:Npn \@@_parse_dot_label:nN #1#2
   {
     \tl_if_empty:nTF {#1}
       {
-        \msg_expandable_error:nn { hooks } { empty-label }
+        \bool_if:NTF #2
+          { \msg_expandable_error:nn { hooks } { empty-label } }
+          { \msg_expandable_error:nn { hooks } { empty-hook } }
         \@@_currname_or_default:
       }
       {
@@ -3407,6 +3415,8 @@
 %   macro does the entire operation within a group so that csnames made
 %   by \cs{@@_make_name:n} are wiped off before continuing.  This means
 %   that this function cannot be used for \cs{hook_use:n}!
+% \changes{v1.1i}{2024/08/09}
+%         {Distinguish between empty label and empty hook (gh/1423)}
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_normalize_hook_args_aux:Nn #1 #2
   {
@@ -3420,14 +3430,14 @@
 \cs_new_protected:Npn \@@_normalize_hook_args:Nn #1 #2
   {
     \@@_normalize_hook_args_aux:Nn #1
-      { { \@@_parse_label_default:n {#2} } }
+      { { \@@_parse_label_default:nN {#2} \c_false_bool } }
   }
 \cs_new_protected:Npn \@@_normalize_hook_args:Nnn #1 #2 #3
   {
     \@@_normalize_hook_args_aux:Nn #1
       {
-        { \@@_parse_label_default:n {#2} }
-        { \@@_parse_label_default:n {#3} }
+        { \@@_parse_label_default:nN {#2} \c_false_bool }
+        { \@@_parse_label_default:nN {#3} \c_true_bool }
       }
   }
 \cs_new_protected:Npn \@@_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5
@@ -3434,10 +3444,10 @@
   {
     \@@_normalize_hook_args_aux:Nn #1
       {
-        { \@@_parse_label_default:n {#2} }
-        { \@@_parse_label_default:n {#3} }
+        { \@@_parse_label_default:nN {#2} \c_false_bool }
+        { \@@_parse_label_default:nN {#3} \c_true_bool }
         { \tl_trim_spaces:n {#4} }
-        { \@@_parse_label_default:n {#5} }
+        { \@@_parse_label_default:nN {#5} \c_true_bool }
       }
   }
 %    \end{macrocode}
@@ -7374,7 +7384,15 @@
   }
 %    \end{macrocode}
 %
+% \changes{v1.1i}{2024/08/09}{New message ``empty-hook'' (gh/1423).}
 %    \begin{macrocode}
+\msg_new:nnn { hooks } { empty-hook }
+  {
+    Empty~hook~name~\msg_line_context:.
+  }
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \msg_new:nnn { hooks } { no-default-label }
   {
     Missing~(empty)~default~label~\msg_line_context:. \\

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltlength.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltlength.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltlength.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltlength.dtx}
-             [2020/12/05 v1.1d LaTeX Kernel (Lengths)]
+             [2024/09/04 v1.1e LaTeX Kernel (Lengths)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltlength.dtx}
@@ -133,13 +133,31 @@
 % \begin{macro}{\@settodim}
 % \changes{LaTeX2e}{1993/11/22}{Macro added}
 % \changes{v1.0a}{1994/03/07}{(DPC) Extra group for colour}
+% \changes{v1.1e}{2024/09/04}{(UF) Suspend tagging} 
 %    The obvious analogs of |\settowidth|.
 %    \begin{macrocode}
-\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease>                 {\@settodim}{suspend tagging}%
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox
+  {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa
 %    \end{macrocode}
 %    Clear the memory afterwards (which might be a lot).
 %    \begin{macrocode}
-       \setbox\@tempboxa\box\voidb at x}
+       \setbox\@tempboxa\box\voidb at x}  
+%</2ekernel|latexrelease>     
+%<latexrelease>\EndIncludeInRelease  
+%    \end{macrocode}
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease>                 {\@settodim}{suspend tagging}%
+%<latexrelease>\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+%<latexrelease>       \setbox\@tempboxa\box\voidb at x}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+%    \end{macrocode}
+%    \begin{macrocode}
 \DeclareRobustCommand\settoheight{\@settodim\ht}
 \DeclareRobustCommand\settodepth {\@settodim\dp}
 \DeclareRobustCommand\settowidth {\@settodim\wd}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmeta.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,7 +16,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmeta.dtx}
-             [2024/05/16 v1.0b LaTeX Kernel (Document Metadata)]
+             [2024/09/21 v1.0c LaTeX Kernel (Document Metadata)]
 % \iffalse
 %
 \documentclass{l3doc}
@@ -152,11 +152,16 @@
 %   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}
+% \changes{v1.0c}{2024/09/21}{Added tagging support}
 %  \begin{macro}{\MakeLinkTarget}
 %  \begin{macro}{\LinkTargetOn}
 %  \begin{macro}{\LinkTargetOff}
 %  \begin{macro}{\NextLinkTarget}
 %    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease>                 {\MakeLinkTarget}{Record target name for tagging support}%
+\ExplSyntaxOn
+\int_new:N\g__kernel_target_int
 \NewDocumentCommand\MakeLinkTarget{sO{}m}{%
   \ifvmode
     \special{}%
@@ -164,8 +169,31 @@
     \@savsf\spacefactor
     \smash{}%
     \spacefactor\@savsf
-  \fi}
-\NewDocumentCommand\LinkTargetOn{}{}
+  \fi
+  \IfBooleanTF {#1}
+   {
+     \tl_gset:Ne \@currentHref {#3}
+   }
+   {
+     \int_gincr:N\g__kernel_target_int
+     \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+   }
+  \UseTaggingSocket{recordtarget} 
+   }
+\ExplSyntaxOff   
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\MakeLinkTarget}{Record target name for tagging support}%
+%<latexrelease>\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+%<latexrelease>  \ifvmode
+%<latexrelease>    \special{}%
+%<latexrelease>  \else
+%<latexrelease>    \@savsf\spacefactor
+%<latexrelease>    \smash{}%
+%<latexrelease>    \spacefactor\@savsf
+%<latexrelease>  \fi}
+%<latexrelease>\EndIncludeInRelease
+  \NewDocumentCommand\LinkTargetOn{}{}
 \NewDocumentCommand\LinkTargetOff{}{}
 \NewDocumentCommand\NextLinkTarget{m}{}
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmiscen.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmiscen.dtx}
-             [2024/07/10 v1.2e LaTeX Kernel (Misc. Environments)]
+             [2024/10/12 v1.2f LaTeX Kernel (Misc. Environments)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltmiscen.dtx}
@@ -748,12 +748,13 @@
 % \changes{v1.1p}{2019/08/27}{Make command robust}
 % \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions
 %     for individual rollback}
+% \changes{v1.2f}{2024/10/12}{Make \cs{begin} engine-protected}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\begin}{Use hook system}%
-\DeclareRobustCommand*\begin[1]{%
+\protected\def\begin#1{%
   \UseHook{env/#1/before}%
   \@ifundefined{#1}%
     {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -30,7 +30,7 @@
 %<*driver> 
 % \fi
 \ProvidesFile{ltproperties.dtx}
-             [2024/06/29 v1.0e LaTeX Kernel (Properties)]
+             [2024/09/25 v1.0g LaTeX Kernel (Properties)]
 % \iffalse
 %
 \documentclass[full]{l3doc}
@@ -560,6 +560,8 @@
 %   comma at the end of the list as that is easier to deal with than trying
 %   to tidy up, and there is no real downside.
 % \changes{v1.0d}{2024-01-17}{Use \cs{protected at write}}%   
+% \changes{v1.0f}{2024-09-05}{Remove \cs{if at filesw} test to be in line with \cs{label}, 
+%   tagging-project issue 696}%
 %    \begin{macrocode}
 \cs_new_protected:Npn \property_record:nN #1#2
   { \property_record:nV {#1} #2 }
@@ -568,14 +570,11 @@
 \cs_generate_variant:Nn \property_record:nn { nV , ee, oo }
 \cs_new_protected:Npn \@@_record:nn #1#2
   {
-    \legacy_if:nT { @filesw }
+    \protected at write \@auxout {}
       {
-        \protected at write \@auxout {}
-          {
-            \token_to_str:N \new at label@record 
-              {#1}
-              { \clist_map_function:nN {#2} \@@_record_value:n }
-          }
+        \token_to_str:N \new at label@record 
+          {#1}
+          { \clist_map_function:nN {#2} \@@_record_value:n }
       }
   }
 \cs_generate_variant:Nn \@@_record:nn { e }
@@ -777,11 +776,13 @@
 %
 % \begin{macro}{\IfLabelExistsTF,\IfLabelExistsT,\IfLabelExistsF}
 % \changes{v1.0e}{2024-04-17}{Renamed \cs{IfLabelExistTF} to
-%                             \cs{IfLabelExistsTF} (gh/1262)} 
+%                             \cs{IfLabelExistsTF} (gh/1262)}
+% \changes{v1.0g}{2024-09-25}{Fixed definitions of \cs{IfLabelExistsT}
+%                                              and \cs{IfLabelExistsF}}
 %    \begin{macrocode}
 \cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF  
-\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }  
-\cs_new:Npn   \IfLabelExistsF #1   {\property_if_exist:eTF {#1}{} }  
+\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }  
+\cs_new:Npn   \IfLabelExistsF #1   {\property_if_recorded:eTF {#1}{} }  
 %    \end{macrocode}
 % \end{macro} 
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltspace.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltspace.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -32,7 +32,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltspace.dtx}
-             [2024/02/08 v1.3r LaTeX Kernel (spacing)]
+             [2024/09/12 v1.3s LaTeX Kernel (spacing)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltspace.dtx}
@@ -833,25 +833,6 @@
 % heading commands to inhibit page breaking after a heading.)
 %
 %
-%\begin{verbatim}
-% \addvspace{SKIP} ==
-%  BEGIN
-%   if vmode
-%     then if @minipage
-%            else if \lastskip =0
-%                    then  \vskip SKIP
-%                    else  if \lastskip < SKIP
-%                             then  \vskip -\lastskip
-%                                   \vskip SKIP
-%                             else if SKIP < 0 and \lastskip >= 0
-%                                    then \vskip -\lastskip
-%                                         \vskip \lastskip + SKIP
-%          fi      fi       fi      fi
-%     else useful error message (CAR).
-%   fi
-%  END
-%\end{verbatim}
-%
 % \begin{macro}{\@xaddvskip}
 % Internal macro for |\vspace| handling the case that space has
 % previously been added.
@@ -880,25 +861,53 @@
 %  Add vertical space taking into account space already added, as
 %  described above.
 % \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and
+%    instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)}
 %    \begin{macrocode}
 %</2ekernel>
 %<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease>                 {\addvspace}{drop unnecessary no-item error}%
+\protected\def\addvspace#1{%
+%    \end{macrocode}
+%    When this is encountered in hmode, we check whether we are in an hbox and if so
+%    generate a \LaTeX{} error, as otherwise this would cause a bunch
+%    of low-level errors. In unrestricted hmode we simply switch to vmode by
+%    issuing a \cs{par}.
+%    \begin{macrocode}
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
+  \if at minipage\else
+    \ifdim \lastskip =\z@
+      \@vspace at calcify{#1}%
+    \else
+    \setlength\@tempskipb{#1}%
+      \@xaddvskip
+    \fi
+  \fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+%    
+%    \begin{macrocode}
 %<latexrelease>\IncludeInRelease{2020/10/01}%
 %<latexrelease>                 {\addvspace}{\addvspace calc support}%
-\def\addvspace#1{%
-  \ifvmode
-     \if at minipage\else
-       \ifdim \lastskip =\z@
-         \@vspace at calcify{#1}%
-       \else
-       \setlength\@tempskipb{#1}%
-         \@xaddvskip
-       \fi
-     \fi
-  \else
-    \@noitemerr
-  \fi}
-%</2ekernel|latexrelease>
+%<latexrelease>\def\addvspace#1{%
+%<latexrelease>  \ifvmode
+%<latexrelease>     \if at minipage\else
+%<latexrelease>       \ifdim \lastskip =\z@
+%<latexrelease>         \@vspace at calcify{#1}%
+%<latexrelease>       \else
+%<latexrelease>       \setlength\@tempskipb{#1}%
+%<latexrelease>         \@xaddvskip
+%<latexrelease>       \fi
+%<latexrelease>     \fi
+%<latexrelease>  \else
+%<latexrelease>    \@noitemerr
+%<latexrelease>  \fi}
 %<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %    
@@ -928,12 +937,22 @@
 % \changes{v1.2b}{1994/11/12}{Corrected error message}
 % \changes{v1.2c}{1994/11/13}{Recorrected error message}
 % \changes{v1.1h}{2015/01/09}{Donald Arseneau's fix from PR/377703 (latexrelease)}
+% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and
+%    instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)}
 %    \begin{macrocode}
 %</2ekernel>
-%<latexrelease>\IncludeInRelease{2015/01/01}%
-%<latexrelease>                 {\addpenalty}{\addpenalty}%
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease>                 {\addpenalty}{\addpenalty drop error}%
 %<*2ekernel|latexrelease>
 %    \end{macrocode}
+%    \begin{macrocode}
+\protected\def\addpenalty#1{%
+%    \end{macrocode}
+%    See description of \cs{addvspace} for documentation of the next
+%    line of code.
+%    \begin{macrocode}
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+%    \end{macrocode}
 %   Fix provided by Donald (though the original fix was not good
 %   enough).  In 2005 Plamen Tanovski discovered that this fix wasn't
 %   good enough either as the \cs{vskip} kept getting bigger if
@@ -940,61 +959,94 @@
 %   several \cs{addpenalty} commands followed each other. Donald
 %   kindly send a new fix.
 %    \begin{macrocode}
-\def\addpenalty#1{%
-  \ifvmode
-    \if at minipage
+  \if at minipage
+  \else
+    \if at nobreak
     \else
-      \if at nobreak
+      \ifdim\lastskip=\z@
+        \penalty#1\relax
       \else
-        \ifdim\lastskip=\z@
-          \penalty#1\relax
-        \else
-          \@tempskipb\lastskip
+        \@tempskipb\lastskip
 %    \end{macrocode}
 %    We have to make sure the final \cs{vskip} seen by \TeX\ is the
-%    correct one, namely \cs{@tempskipb}. However we may have to
-%    adjust for \cs{prevdepth} when placing the penalty but that
+%    correct one, namely \cs{@tempskipb}. However, we may have to
+%    adjust for \cs{prevdepth} when placing the penalty; that
 %    should not affect the skip we pass on to \TeX.
 % \changes{v1.3e}{2015/01/14}{Avoid adding redundant skips (DPC)}
 %    \begin{macrocode}
-          \begingroup
-            \@tempskipa\@tempskipb
-            \advance \@tempskipb
-              \ifdim\prevdepth>\maxdepth\maxdepth\else
+        \begingroup
+          \@tempskipa\@tempskipb
+          \advance \@tempskipb
+            \ifdim\prevdepth>\maxdepth\maxdepth\else
 %    \end{macrocode}
 %    If |\prevdepth| is -1000pt due to |\nointerlineskip| we better
 %    not add it!
 %    \begin{macrocode}
-                 \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
-               \fi
-             \vskip -\@tempskipb
-             \penalty#1%
-             \ifdim\@tempskipa=\@tempskipb
+               \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+             \fi
+           \vskip -\@tempskipb
+           \penalty#1%
+           \ifdim\@tempskipa=\@tempskipb
 %    \end{macrocode}
 % Do nothing if the |\prevdepth| check made no adjustment.
 %    \begin{macrocode}
-             \else
+           \else
 %    \end{macrocode}
 % Combine the prevdepth adjustment into a single skip.
 %    \begin{macrocode}
-               \advance\@tempskipb -\@tempskipa
-               \vskip \@tempskipb
-             \fi
+             \advance\@tempskipb -\@tempskipa
+             \vskip \@tempskipb
+           \fi
 %    \end{macrocode}
 % The final skip is always the specified length.
 %    \begin{macrocode}
-             \vskip \@tempskipa
-          \endgroup
-        \fi
+           \vskip \@tempskipa
+        \endgroup
       \fi
     \fi
-  \else
-    \@noitemerr
-  \fi}%
+  \fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease>                 {\addpenalty}{\addpenalty}%
+%<latexrelease>\def\addpenalty#1{%
+%<latexrelease>  \ifvmode
+%<latexrelease>    \if at minipage
+%<latexrelease>    \else
+%<latexrelease>      \if at nobreak
+%<latexrelease>      \else
+%<latexrelease>        \ifdim\lastskip=\z@
+%<latexrelease>          \penalty#1\relax
+%<latexrelease>        \else
+%<latexrelease>          \@tempskipb\lastskip
+%<latexrelease>          \begingroup
+%<latexrelease>            \@tempskipa\@tempskipb
+%<latexrelease>            \advance \@tempskipb
+%<latexrelease>              \ifdim\prevdepth>\maxdepth\maxdepth\else
+%<latexrelease>                 \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+%<latexrelease>               \fi
+%<latexrelease>             \vskip -\@tempskipb
+%<latexrelease>             \penalty#1%
+%<latexrelease>             \ifdim\@tempskipa=\@tempskipb
+%<latexrelease>             \else
+%<latexrelease>               \advance\@tempskipb -\@tempskipa
+%<latexrelease>               \vskip \@tempskipb
+%<latexrelease>             \fi
+%<latexrelease>             \vskip \@tempskipa
+%<latexrelease>          \endgroup
+%<latexrelease>        \fi
+%<latexrelease>      \fi
+%<latexrelease>    \fi
+%<latexrelease>  \else
+%<latexrelease>    \@noitemerr
+%<latexrelease>  \fi}%
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %<latexrelease>\EndIncludeInRelease
 %<latexrelease>\IncludeInRelease{0000/00/00}%
 %<latexrelease>                 {\addpenalty}{\addpenalty}%

Modified: trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{lttagging.dtx}
-             [2024/08/10 v1.0g LaTeX Kernel (tagging support)]
+             [2024/10/11 v1.0j LaTeX Kernel (tagging support)]
 % \iffalse
 \documentclass{l3doc}
 \GetFileInfo{lttagging.dtx}
@@ -75,24 +75,35 @@
 %
 %  \DescribeMacro\SuspendTagging
 %  \DescribeMacro\ResumeTagging
+%  \DescribeMacro\tag_suspend:n
+%  \DescribeMacro\tag_resume:n
+
 %  
 %  The are places in code where it is import top stop any tagging
 %  activities, e.g., when we are doing trial typesetting that it is
 %  done several times. In such a case one must tag only the final
 %  version that is actually used, otherwise tagging structures are
-%  allowed which then do not end up in the PDF and confuse the
+%  generated which then do not end up in the PDF and confuse the
 %  mechanism. For this we have two commands that can be used in
-%  packages: \cs{SuspendTagging} and \cs{ResumeTagging}. They are
+%  packages: \cs{SuspendTagging} and \cs{ResumeTagging} (with corresponding
+%  L3 programming layer commands). They are
 %  available as part of the \LaTeX{} kernel, so that they can be
-%  safely used in packages whether or not tagging is requested .They
-%  both take string argument that is used for debugging to easily
+%  safely used in packages whether or not tagging is requested. They
+%  all take a string argument that is used for debugging to easily
 %  identify why tagging was suspended or restarted, for example, in
 %  \pkg{tabularx} you find \verb=\SuspendTagging{tabularx}=. By default
-%  they two commands do nothing.
+%  these four commands do nothing.
 %
-%  TODO: the corresponding L3 layer commands should also have a dummy
-%  definition in the kernel!
+%  The argument is used literally (in \cs{typeout} messages) without any
+%  expansion when  debugging is turned on and otherwise it is not used at all.
+%  This means it is safe to write something like
+%  \verb=\SuspendTagging{\foo}= or even \verb=\SuspendTagging\foo=
+%  which means \LaTeX{} has to parse only
+%  a single token instead of putting a string of characters into the
+%  argument. This means a tiny speed improvement but with many such
+%  debugging strings\ldots
 %
+%
 % \DescribeMacro\UseTaggingSocket
 % \DescribeMacro\tag_socket_use:n
 % \DescribeMacro\tag_socket_use:nn
@@ -144,35 +155,17 @@
 %
 %
 %
-%  \begin{macro}{\SuspendTagging,\ResumeTagging}
+%  \begin{macro}{\tag_suspend:n,\tag_resume:n,\SuspendTagging,\ResumeTagging}
 %    
-%    In the kernel, these two commands get dummy definitions so that
+%    In the kernel, these commands get dummy definitions so that
 %    they can be used without harm in packages. The real definition is
 %    used when tagging gets enabled.
 %    \begin{macrocode}
-\cs_new_eq:NN \SuspendTagging \use_none:n  
-\cs_new_eq:NN \ResumeTagging  \use_none:n
+\cs_new_eq:NN \tag_suspend:n \use_none:n  
+\cs_new_eq:NN \tag_resume:n  \use_none:n
+\cs_new_protected:Npn \SuspendTagging #1 { \tag_suspend:n {#1} }
+\cs_new_protected:Npn \ResumeTagging #1  { \tag_resume:n {#1} }
 %    \end{macrocode}
-%
-%    A simplified version of this definition should move to
-%    \pkg{tagpdf} and dropped here, eventually.
-%    \begin{macrocode}
-\AddToHook{begindocument/before}{
-  \cs_if_exist:NT \tag_stop:n
-  { 
-    \cs_set:Npn \SuspendTagging #1 {
-%    \end{macrocode}%
-%    This stops tagging and also disables all tagging sockets so we are done.
-%    \begin{macrocode}
-      \tag_stop:n {#1} 
-    }
-%    \end{macrocode}
-%
-%    \begin{macrocode}
-    \cs_set:Npn \ResumeTagging #1 { \tag_start:n {#1} }
-  }
-}
-%    \end{macrocode}
 %  \end{macro}
 %
 %  \begin{macro}{\tag_socket_use:n,
@@ -249,6 +242,7 @@
 % \end{socketdecl}
 % 
 % \begin{plugdecl}{default}
+% \changes{v1.0i}{2024/10/10}{Restore also paratagging (tagging/723)}
 %    \begin{macrocode}
 \NewSocketPlug{tagsupport/para/restore}{default}
  {
@@ -256,12 +250,47 @@
    \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
    \bool_set_false:N\l__tag_para_flattened_bool
    \int_zero:N   \l__tag_block_flattened_level_int
+   \bool_set_true:N \l__tag_para_bool
  }
 \AssignSocketPlug{tagsupport/para/restore}{default}
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \begin{socketdecl}{tagsupport/para/begin,tagsupport/para/end}
+% These sockets are currently defined in tagpdf. They overwrite
+% definitions in the latex-lab-block code. There is also a simpler
+% definition that probably should be a general socket too.
+% TODO: move this into lttagging.
+% \end{socketdecl}
+
+% \subsubsection{Tagging socket for targets}
+
+% \begin{socketdecl}{tagsupport/refstepcounter}
+% When tagging is active we want to track the current structure number
+% when targets are set. This will be mostly used in \cs{refstepcounter}
+% but also if targets are set manually.
+%    \begin{macrocode}
+\NewSocket{tagsupport/recordtarget}{0}
+%    \end{macrocode}
+% \end{socketdecl}
+% 
+% \begin{plugdecl}{kernel (tagsupport/recordtarget)}
+%    \begin{macrocode}
+% 
+\NewSocketPlug{tagsupport/recordtarget}{kernel}
+  {
+    \tl_if_blank:VF \@currentHref
+    {
+      \prop_gput:Nee 
+        \g__tag_struct_dest_num_prop 
+        {\@currentHref}
+        {\tag_get:n{struct_num}}      
+    }
+  }
+\AssignSocketPlug{tagsupport/recordtarget}{kernel} 
 \ExplSyntaxOff 
 %    \end{macrocode}
 % \end{plugdecl}
-
 % \subsubsection{Tagging sockets for toc}
 
 % \begin{socketdecl}{tagsupport/toc/contentsline/before,
@@ -295,7 +324,7 @@
 %    \end{macrocode}
 % \end{socketdecl}
 % 
-% \subsection{Tagging support for table/tabular packages}
+% \subsubsection{Tagging support for table/tabular packages}
 %
 % The code uses a number of sockets to inject the tagging
 % commands. These can be easily set to a noop-plug in case the
@@ -433,10 +462,57 @@
 %    \end{macrocode}
 % \end{socketdecl}
 %
+% \subsubsection{Tagging Support for floats}
+% 
+% \begin{socketdecl}{tagsupport/float/hmode/begin,
+%                    tagsupport/float/hmode/end}
+%  These sockets are used if the float is called in 
+%  hmode.
+% \changes{v1.0h}{2024/09/13}{Sockets for floats added}
+%    \begin{macrocode}
+\NewSocket{tagsupport/float/hmode/begin}{0}
+\NewSocket{tagsupport/float/hmode/end}{0}
+%    \end{macrocode}
+% \end{socketdecl}
 %
+% \begin{socketdecl}{tagsupport/float/begin,
+%                    tagsupport/float/end}
+%  These sockets start and stop the float structure.
+%    \begin{macrocode}
+\NewSocket{tagsupport/float/begin}{0}
+\NewSocket{tagsupport/float/end}{0}
+%    \end{macrocode}
+% \end{socketdecl}
 %
-%
-%
+% 
+% \begin{socketdecl}{tagsupport/caption/begin,
+%                    tagsupport/caption/end}
+%  These sockets are used in \cs{@makecaption}.
+%  They open and close the \texttt{Caption} structure.
+%  Their default plugs assume that they are used in 
+%  vmode. The argument of the begin socket is
+%  the structure number of the parent float. If it is
+%  empty the current structure number is used. 
+%    \begin{macrocode}
+\NewSocket{tagsupport/caption/begin}{1}
+\NewSocket{tagsupport/caption/end}{0}
+%    \end{macrocode}
+% \end{socketdecl}
+% 
+% \begin{socketdecl}{tagsupport/caption/label/begin,
+%                    tagsupport/caption/label/end}
+%  These sockets are used in \cs{@makecaption} around the
+%  label. Their default plugs ensure that 
+%  the label is outside the paragraph and that 
+%  the rest of the caption uses flattened para mode. If the
+%  caption is not in a hbox, the \texttt{para/begin} 
+%  socket should follow to properly start the paragraph. 
+%    \begin{macrocode}
+\NewSocket{tagsupport/caption/label/begin}{0}
+\NewSocket{tagsupport/caption/label/end}{0} 
+%    \end{macrocode}
+% \end{socketdecl}
+% 
 % \section{For lttab.dtx parked here for now}
 %
 %    
@@ -849,14 +925,10 @@
 %<@@=>
 %    \end{macrocode}
 %
+% \changes{v1.0h}{2024/09/20}{moved \cs{@kernel at refstepcounter} into ltxref}
 %    This is needed for \pkg{longtable} because \cs{refstepcounter} is
 %    setting up a target when \pkg{hyperref} is loaded and we don't
-%    want that in \pkg{longtable}.
-%
-%    TODO: move to right .dtx file
-%    \begin{macrocode}
-\let\@kernel at refstepcounter\refstepcounter
-%    \end{macrocode}
+%    want that in \pkg{longtable}.%%    
 %    Prevent longtable patching by hyperref until hyperref does so automatically:
 %    \begin{macrocode}
 \def\hyper at nopatch@longtable{}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -36,7 +36,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{lttemplates.dtx}
-  [2024-06-04 v1.0c LaTeX Kernel (Prototype document functions)]
+  [2024-10-07 v1.0d LaTeX Kernel (Prototype document functions)]
 % \iffalse
 \documentclass{l3doc}
 \GetFileInfo{lttemplates.dtx}
@@ -471,7 +471,7 @@
 %   the general idea of fixing some settings.
 % \end{function}
 %
-% \begin{function}{\IfInstanceExistsT, \IfInstanceExisstF, \IfInstanceExistsTF}
+% \begin{function}{\IfInstanceExistsT, \IfInstanceExistsF, \IfInstanceExistsTF}
 %   \begin{syntax}
 %     \cs{IfInstanceExistsTF} \Arg{type} \Arg{instance} \Arg{true code} \Arg{false code}
 %   \end{syntax}
@@ -2098,30 +2098,44 @@
 % \end{macro}
 %
 % \begin{macro}{\@@_assign_variable:}
-% \begin{macro}{\@@_assign_variable:N, \@@_assign_variable:c}
+% \changes{2024-10-07}{v1.0d}{Correct passing of \cs{KeyValue} contents}
+% \begin{macro}{\@@_assign_variable:n}
 %   A general-purpose function for all of the other assignments.
 %   As long as the value is not coming from another variable, the stored
-%   value is simply transferred for output.
+%   value is simply transferred for output. We use \texttt{V}-type expansion
+%   for the \cs{KeyValue} case: for token lists this is essential, whilst
+%   for register-based variables, it does no harm and avoids needing a
+%   low-level test.
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_assign_variable:
   {
-    \@@_assign_variable:c
+    \exp_args:Ne \@@_assign_variable:n
       {
-        \@@_map_var_type: _
-        \bool_if:NT \l_@@_global_bool { g } set:Nn
+        \@@_map_var_type:
+        _
+        \bool_if:NT \l_@@_global_bool { g } 
+        set:N
       }
   }
-\cs_new_protected:Npn \@@_assign_variable:N #1
+\cs_new_protected:Npn \@@_assign_variable:n #1
   {
-    \@@_if_key_value:VT \l_@@_value_tl
-      { \@@_key_to_value: }
-    \tl_put_right:Ne \l_@@_assignments_tl
+    \@@_if_key_value:VTF \l_@@_value_tl
       {
-        #1 \exp_not:V \l_@@_var_tl
-         { \exp_not:V \l_@@_value_tl }
+        \@@_key_to_value:
+        \tl_put_right:Ne \l_@@_assignments_tl
+          {
+            \exp_not:c { #1 V } \exp_not:V \l_@@_var_tl
+             \exp_not:V \l_@@_value_tl
+          }
       }
+      {
+        \tl_put_right:Ne \l_@@_assignments_tl
+          {
+            \exp_not:c { #1 n } \exp_not:V \l_@@_var_tl
+             { \exp_not:V \l_@@_value_tl }
+          }
+      }
   }
-\cs_generate_variant:Nn \@@_assign_variable:N { c }
 %    \end{macrocode}
 % \end{macro}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -115,7 +115,7 @@
    {2024-11-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	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltxref.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,7 +33,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltxref.dtx}
-             [2023/05/16 v1.1q LaTeX Kernel (Cross Referencing)]
+             [2024/09/20 v1.1r LaTeX Kernel (Cross Referencing)]
 % \iffalse
 \documentclass{ltxdoc}
 \GetFileInfo{ltxref.dtx}
@@ -56,6 +56,9 @@
 %</driver>
 % \fi
 %
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
 %
 % \changes{v1.0c}{1994/03/29}
 %     {Create file ltcntlen from parts of ltmiscen and ltherest.}
@@ -413,18 +416,55 @@
 %    \end{macrocode}
 % \end{macro}
 %
-%    \begin{macrocode}
-%<latexrelease>\IncludeInRelease{2022/06/01}%
-%<latexrelease>                 {\Ref}{Add starred version}%
-%    \end{macrocode}
 %
 %  \begin{macro}{\refstepcounter}
 %     Step the counter and allow for labels to point to its current value.
 %  \changes{v1.1n}{2020/05/05}{record the counter name in \cs{@currentcounter}}
 %  \changes{v1.1o}{2020/08/23}{add default definition of \cs{@currentcounter}}
+%  \changes{v1.1r}{2024/09/20}{set also \@currentHref}
+%  \changes{v1.1r}{2024/09/20}{provide a kernel copy \@kernel at refstepcounter}
+%  \changes{v1.1r}{2024/09/20}{add sockets}
 %    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\Ref}{Add starred version}%
 \def\@currentcounter{}
-\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease>                 {\@currentHref}{set theHcounter representation}%
+%    \end{macrocode}
+% \begin{socketdecl}{refstepcounter}
+% This socket takes the whole code as argument.
+% The default kernel plug is identity. By changing
+% the plug hyperref can add a conditional and e.g.
+% suppress the processing in a PDF context. 
+%    \begin{macrocode}
+\NewSocket{refstepcounter}{1}
+%    \end{macrocode}
+% \end{socketdecl}
+% \begin{socketdecl}{refstepcounter/target}
+% This socket takes an argument, the counter name, and
+% should at least set from it the target name |\@currentHref|.
+% With hyperref it sets also the actual target. 
+% This is done with a socket so that the target name 
+% is not set more than once to (possibly) different names.
+% The socket is not used in |\@kernel at refstepcounter|.
+% The tagging code needs the target name so it is added after
+% this socket.
+%    \begin{macrocode}
+\NewSocket{refstepcounter/target}{1}
+%    \end{macrocode}
+% \end{socketdecl}
+% \begin{plugdecl}{kernel (refstepcounter/target)}
+%    \begin{macrocode}
+\NewSocketPlug{refstepcounter/target}{kernel}
+ {\xdef\@currentHref {#1.\csname theH#1\endcsname}}%
+\AssignSocketPlug{refstepcounter/target}{kernel} 
+%    \end{macrocode}
+% \end{plugdecl}
+%    \begin{macrocode}
+\def\refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \stepcounter{#1}%
     \edef\@currentcounter{#1}%
     \protected at edef\@currentlabel
 %    \end{macrocode}
@@ -449,10 +489,41 @@
 %          argument}
 %    \begin{macrocode}
        {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+     \UseSocket{refstepcounter/target}{#1}%         
+     \UseTaggingSocket{recordtarget}%
+   }%    
 }
 %    \end{macrocode}
+% \begin{macro}{\@kernel at refstepcounter}
+% This is a version of \cs{refstepcounter} which does not set and use
+% targets.
+%    \begin{macrocode}
+\def\@kernel at refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \stepcounter{#1}%
+    \edef\@currentcounter{#1}%
+    \protected at edef\@currentlabel
+       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}}%
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\@currentHref}{set theHcounter representation}%
+%<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>\let\@kernel at refstepcounter\refstepcounter
+%<latexrelease>\EndIncludeInRelease
+%    \end{macrocode}
+%
 %  \end{macro}
-%
+%    \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease>                 {\Ref}{Add starred version}%
+%    \end{macrocode}
 %  \begin{macro}{\labelformat}
 %    A shortcut to set the |\p at ...| macro for a counter. It will pick
 %    up the counter representation as an argument so that it can be

Modified: trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -111,8 +111,8 @@
 %    \end{macrocode}
 %
 %    \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/03/20}
-\def\LaTeXFirstAidVersion{v1.1e}
+\def\LaTeXFirstAidDate{2024/07/05}
+\def\LaTeXFirstAidVersion{v1.1f}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -343,7 +343,7 @@
 %    It will be replaced when the ``configuration points'' interface
 %    for \LaTeX{} becomes available. At that point the package will be
 %    able to set up a different strategy for doing shipouts and
-%    without the need to overrite a primitive (which it did in the
+%    without the need to overwrite a primitive (which it did in the
 %    past and which we do below) and then this code here can be taken
 %    out again.
 %    \begin{macrocode}
@@ -446,7 +446,7 @@
 %    the classic \TeX{} implementation but with the extended
 %    allocation possibilities of all modern engines is no longer the
 %    case and there is a point where the allocations take a ``jump''
-%    breaking the odering assumption. These days we are fairly close
+%    breaking the ordering assumption. These days we are fairly close
 %    to that point and depending on how many packages are loaded
 %    before \pkg{bigfoot} the package breaks.
 %
@@ -721,7 +721,30 @@
 }
 %    \end{macrocode}
 %
+% \subsection{The \pkg{arydshln} package first aid}
+%
+%    Making two internal commands robust to avoid expansion while constructing the array preamble.
 %    \begin{macrocode}
+\AddToHook{package/arydshln/after}[firstaid]{%
+  \FirstAidNeededT{arydshln}{sty}{2019/02/21 v1.76 }
+  {%
+% add \protected
+\protected\def\adl@@vlineL#1#2#3#4{\adl at ivline#4\@nil{#1}{#2}%
+        \xdef\adl at colsL{\adl at colsL
+                \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+                        {\adl at dashcolor}{\adl at gapcolor}}}%
+\protected\def\adl@@vlineR#1#2#3#4{\adl at ivline#4\@nil{#1}{#2}%
+        \xdef\adl at colsR{%
+                \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+                        {\adl at dashcolor}{\adl at gapcolor}%
+                \adl at colsR}}%
+\let\adl at act@@vlineL\adl@@vlineL
+\let\adl at act@@vlineR\adl@@vlineR
+  }%
+}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 %</kernel>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -18,8 +18,8 @@
 % for those people who are interested or want to report an issue.
 %
 %    \begin{macrocode}
-\def\documentmetadatasupportversion{1.0h}
-\def\documentmetadatasupportdate{2024-03-26}
+\def\documentmetadatasupportversion{1.0j}
+\def\documentmetadatasupportdate{2024-09-13}
 %    \end{macrocode}
 %
 %
@@ -314,6 +314,19 @@
  { \tl_new:N \g_@@_testphase_tl }
 %    \end{macrocode}
 % \end{variable}
+% 
+% \subsection{Kernel changes with \cs{DocumentMetadata}}
+% \begin{macro}{\@kernel at before@DocumentMetadata}
+%    \begin{macrocode}
+\cs_new_protected:Npn \@kernel at before@DocumentMetadata
+  {
+    \ifx\Umathcode\@undefined
+    \fontencoding{T1}
+    \renewcommand\encodingdefault{T1}
+    \fi
+  }
+%    \end{macrocode}
+% \end{macro}
 
 % \subsection{\cs{DocumentMetadata}}
 % 
@@ -330,6 +343,10 @@
       { \msg_error:nn { meta } { after-class } }
       {
 %    \end{macrocode}
+% Load general format changes
+%    \begin{macrocode}
+        \@kernel at before@DocumentMetadata
+%    \end{macrocode}
 %
 %    The wanted backend must be detected first, we read the init
 %    key and then force the loading of the backend.
@@ -481,7 +498,7 @@
       }         
     ,_pdfstandard / unknown .code:n =
       {
-        \msg_warning:nnn{pdf}{unknown-standard}{#1}
+        \msg_error:nnn{pdf}{unknown-standard}{#1}
       }
     ,testphase .multichoice:
     ,testphase / tagpdf .code:n =

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-amsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-amsmath.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-amsmath.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -66,7 +66,7 @@
 % \subsection{File declaration}
 %    \begin{macrocode}
 \ProvidesFile{latex-lab-amsmath.ltx}
-        [2024-07-05 v0.1b amsmath adaptions]
+        [2024-09-18 v0.1c amsmath adaptions]
 %    \end{macrocode}
 % \subsection{Tagpdf support}
 % To make the code independent from tagging being loaded and active
@@ -99,7 +99,7 @@
 %    \end{macrocode}
 % Stop tagging when measuring:
 %    \begin{macrocode}
-           \ifmeasuring@\tag_stop:\fi
+           \ifmeasuring@\tag_suspend:n{\measuring}\fi
            \normalbaselines
             \ifdim\linewidth=\columnwidth
             \else \parshape\@ne \@totalleftmargin \linewidth
@@ -174,7 +174,7 @@
          \def\text@#1
           {{
            \int_gincr:N\g__math_mathchoice_int
-           \tag_stop:
+           \tag_suspend:n{\text@}
            \mathchoice
             {
              \@@_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{0}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -9,8 +9,8 @@
 %
 %    https://www.latex-project.org/lppl.txt
 %
-\def\ltlabblockdate{2024-08-11}
-\def\ltlabblockversion{0.8p}
+\def\ltlabblockdate{2024-10-11}
+\def\ltlabblockversion{0.8v}
 %<*driver>
 \documentclass[kernel]{l3doc}
 \usepackage{amstext}
@@ -331,6 +331,8 @@
 %  \TemplateKey{par-skip}{skip}{}{\cs{parsep}}
 %  \TemplateKey{end-skip}{skip}{}{\valuefrom{beginsep}}
 %  \TemplateKey{end-par-skip}{skip}{}{\valuefrom{begin-par-skip}}
+%  \TemplateKey{item-skip}{skip}{The space in front of an item if the
+%    block is a list; if not the setting has no effect}{\cs{itemsep}}
 %  \TemplateKey{beginpenalty}{integer}{}{\cs{@beginparpenalty}}
 %  \TemplateKey{endpenalty}{integer}{}{\cs{@endparpenalty}}
 %  \TemplateKey{leftmargin}{length}{}{\cs{leftmargin}}
@@ -390,7 +392,7 @@
 %              {Instance of type \texttt{item} to be used to format
 %               the label string}{basic}
 %  \TemplateKey{item-skip}{skip}{The space in front of an item in the
-%               list.\fmi{May need to be on a different template level}}{\cs{itemsep}}
+%               list. If not specified the value specified in the block template instance is used}{}
 %  \TemplateKey{item-indent}{length}{Horizontal displacement of the item.}{0pt}
 %  \TemplateKey{item-penalty}{integer}
 %              {Penalty for breaking before an
@@ -756,8 +758,9 @@
 %
 %
 %
-%  \begin{macro}{\@doendpe}
+%  \begin{macro}{\@doendpe,\__kernel_displayblock_doendpe:}
 %    The original \LaTeXe{} command is augmented to allow for tagging.
+%    TODO: use sockets for this and move to the kernel eventually.
 %    \begin{macrocode}
 \def\@doendpe{\@endpetrue
   \def\par
@@ -792,61 +795,11 @@
 %    \begin{macrocode}
 \cs_new_eq:NN \__kernel_displayblock_doendpe: \prg_do_nothing:
 %    \end{macrocode}
-%    The flag itself should be set globally not locally.\fmi{verify
-%    that this claim is actually correct!}
-%    \begin{macrocode}
-\def\@endpetrue {%
-  \global\let\if at endpe\iftrue
-% if called inside a group propagate to the outside   
-   \ifnum\currentgrouplevel>\z@
-      \aftergroup\propagate at doendpe
-   \fi
-}
-%    \end{macrocode}
-%    
-%    If \cs{if at endpe} is still true run \cs{@doendpe}
-%    that in turn runs another \cs{@endpetrue} (besides other things),
-%    thus propagating further, if necessary
-%    However, if the endpe situation got resolved nothing further happens
-%    \begin{macrocode}
-\def\propagate at doendpe{%
-  \if at endpe
-     \@@_debug_typeout:n{run~ (another)~ @doendpe~ at~
-       group~ level~ \the\currentgrouplevel}%
-    \@doendpe
-  \else
-     \@@_debug_typeout:n{do~ not~ run~ (another)~ @doendpe}%
-  \fi
-}
-%    \end{macrocode}
-%    
-%    With the above approach we do not  need the propagation in
-%    \cs{end...} any longer 
-%    (since this is now handled by
-%    \cs{aftergroup}\cs{propagate at doendpe}) so
-%    here a simple \cs{endgroup} is enough. This replaces the
-%    definition in ...:
-%    \begin{macrocode}
-\@namedef{end }#1{%
-  \romannumeral
-    \IfHookEmptyTF{env/#1/end}%
-        {\expandafter\z@}%
-        {\z@\UseHook{env/#1/end}}%
-    \csname end#1\endcsname\@checkend{#1}%
-%    \expandafter\endgroup\if at endpe\@doendpe\fi
-    \endgroup
-    \UseHook{env/#1/after}%
-    \if at ignore\@ignorefalse\ignorespaces\fi
-}
-%    \end{macrocode}
-%    
-%    \begin{macrocode}
-\def\@endpefalse{\global\let\if at endpe\iffalse}
-%    \end{macrocode}
-%  \end{macro}
 %
 %
+% \end{macro}
 %
+%
 % \subsection{Object and template interfaces}
 %
 %
@@ -892,6 +845,7 @@
 %
 %  \begin{template}{block display}
 %    
+%  \changes{v0.8s}{2024/10/03}{Offer item-skip key also on block templates}
 %    \begin{macrocode}
 \DeclareTemplateInterface{block}{display}{1}    
 {
@@ -901,6 +855,7 @@
   par-skip       : skip = \parsep ,
   end-skip       : skip = \KeyValue{beginsep} ,                % conflict with name below
   end-par-skip   : skip = \KeyValue{begin-par-skip} ,
+  item-skip      : skip = \itemsep ,
   beginpenalty   : integer = \UseName{@beginparpenalty} ,
   endpenalty     : integer = \UseName{@endparpenalty} ,
   leftmargin     : length = \leftmargin ,
@@ -1314,9 +1269,15 @@
 %    We do this by storing them away and then call the list
 %    instance. Inside this instance the \texttt{setup-code} key
 %    contains \cs{legacylistsetupcode}, which makes use of the stored values.
+%  \changes{v0.8v}{2024/10/11}{Update \cs{@itemlabel} in
+%    \cs{l_@@_legacy_env_params_tl} and not at the start of the
+%    environment (tagging/730)}
 %    \begin{macrocode}
-      \tl_set:Nn \@itemlabel {#2}
-      \tl_set:Nn \l_@@_legacy_env_params_tl {#3}
+      \tl_set:Nn \l_@@_legacy_env_params_tl
+         {
+           \tl_set:Nn \@itemlabel {#2}
+           #3
+         }
 %    \end{macrocode}
 %
 %    \begin{macrocode}
@@ -1330,15 +1291,7 @@
 %
 %
 %
-% \begin{variable}{\l_@@_env_params_tl}
-%    Declare the variable for the parameter argument; \cs{@itemlabel}
-%    is already declared in \LaTeXe{}.
-%    \begin{macrocode}
-\tl_new:N \l_@@_env_params_tl
-%    \end{macrocode}
-% \end{variable}
 %
-%
 %  \begin{macro}{\legacylistsetupcode}
 %    
 %    And here is the extra code for use in the list instance setup
@@ -1353,10 +1306,14 @@
     \dim_zero:N \itemindent
 %    \end{macrocode}
 %    
-%    By default a \env{list} environment is not numbered:
+%    By default a \env{list} environment is not numbered, but this
+%    happens already in the block template.
+%  \changes{v0.8v}{2024/10/11}{Set the defaults for \cs{@itemlabel},
+%    \cs{@listctr} and \texttt{@nmbrlist} early in the block code
+%    before the setup code gets executed (tagging/730)}
 %    \begin{macrocode}
-    \tl_set:Nn \@listctr {}
-    \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested
+%    \tl_set:Nn \@listctr {}
+%    \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested
 %    \end{macrocode}
 %    By default there is a simple definition for \cs{makelabel}. It can be
 %    overwritten in the second mandatory argument to the list
@@ -1668,6 +1625,23 @@
 %    \begin{macrocode}
   \tag_if_active:T { \use:c { @@_recipe_ \l_@@_tagging_recipe_tl : } }
 %    \end{macrocode}
+%    The default for \env{list} environments is that they have an
+%    empty label and are not numbered (something that is then
+%    overwritting by the setup of a specific list). We ensure
+%    this here even for non-lists, because we need a defined state
+%    that then can be overwritting by the legacy setup code for
+%    the \env{list} environment in \cs{l_@@_setup_code_tl}.
+%    This is needed in case lists are nested as they otherwise would
+%    inherit outer values (and suddenly an \env{itemize} would start
+%    incrementing an outer \env{enumerate} counter, etc. 
+%  \changes{v0.8v}{2024/10/11}{Set the defaults for \cs{@itemlabel},
+%    \cs{@listctr} and \texttt{@nmbrlist} early in the block code
+%    before the setup code gets executed (tagging/730)}
+%    \begin{macrocode}
+  \tl_clear:N \@itemlabel
+  \tl_clear:N \@listctr
+  \legacy_if_set_false:n { @nmbrlist } 
+%    \end{macrocode}
 %    Then run the setup code if any is given in the instance.
 %    \begin{macrocode}
   \l_@@_setup_code_tl
@@ -1774,15 +1748,19 @@
       \legacy_if_gset_false:n { @inlabel }
     }
 %    \end{macrocode}
-%    In a pure ``displayblock'' scenario \texttt{@newlist} will be
-%    always false and the code bypassed, but we may have an outer list
-%    followed immediately by a displayblock (with the \cs{item} missing)
+%    If we are ending a list environment and we have not seen any
+%    \cs{item}, i.e., \texttt{@newlist} is still true, we raise an
+%    error. In basic a ``displayblock'' scenario \texttt{@newlist} will
+%    always be false, but if such an environment appears inside an outer
+%    list then \cs{noitemerr} could still be triggered and that is undesirable
+%    (as the missing item will be detected at the wrong point and again later,
+%    during the outer list processing). We
+%    therefore run it only if the current environment is a list.
+%  \changes{v0.8q}{2024/09/03}{Raise a \cs{@noitemerr} if appropriate}
 %    \begin{macrocode}
-  \legacy_if:nT { @newlist }
-    {
-      \@noitemerr
-      \legacy_if_gset_false:n { @newlist }
-    }
+  \@@_if_list:T { \legacy_if:nT { @newlist } { \@noitemerr } }
+%    \end{macrocode}
+%    \begin{macrocode}
   \mode_if_horizontal:TF
        { \@@_skip_remove_last: \@@_skip_remove_last: \par }
        { \@inmatherr{\end{\@currenvir}} }
@@ -1792,6 +1770,13 @@
 %    \begin{macrocode}
   \__kernel_displayblock_end:
 %    \end{macrocode}
+%    Resetting the \texttt{@newlist} switch is also only done if the
+%    current enviornment is a list and not unconditionally.
+%  \changes{v0.8q}{2024/09/03}{Setting \texttt{@newlist} to false
+%    moved after tagging code if in a list}
+%    \begin{macrocode}
+  \@@_if_list:T { \legacy_if_gset_false:n { @newlist } }
+%    \end{macrocode}
 %    What to do in terms of vertical spacing  in different situations
 %    is still somewhat open to debate, right now this is more or less
 %    implementing what \LaTeXe{} list environment have been
@@ -1838,6 +1823,19 @@
 %  \end{macro}
 %
 %
+%  \begin{macro}{\@@_if_list:T}
+%    The following code may need some redesigning, as there is no good test for \enquote{is
+%    this environment a \enquote{list} that has \cs{item}s}. For now
+%    this here does the trick well enough.\fmi{revisit}
+%  \changes{v0.8q}{2024/09/03}{Provide a test for: Am I in a list?}
+%    \begin{macrocode}
+\cs_new:Npn \@@_if_list:T
+   { \tl_if_eq:NnT \l_@@_block_instance_tl {list} }
+%    \end{macrocode}
+%  \end{macro}
+%
+%
+%      
 %  \begin{macro}{\__kernel_displayblock_end:}
 %    The kernel hook for tagging at the end of the block.
 %    \begin{macrocode}
@@ -1917,6 +1915,7 @@
 %
 % \begin{template}{block display}
 %    
+%  \changes{v0.8s}{2024/10/03}{Offer item-skip key also on block templates}
 %    \begin{macrocode}
 \DeclareTemplateCode{block}{display}{1}
 {
@@ -1926,6 +1925,7 @@
   par-skip        = \parsep ,
   end-skip        = \l_@@_botsep_skip ,
   end-par-skip    = \l_@@_parbotsep_skip ,
+  item-skip       = \itemsep ,
   beginpenalty    = \@beginparpenalty ,
   endpenalty      = \@endparpenalty ,
   rightmargin     = \rightmargin ,
@@ -2081,7 +2081,6 @@
 % \end{template}
 %
 %
-%
 %  \begin{macro}{\__kernel_displayblock_begin:,
 %                \__kernel_displayblock_beginpar_hmode:w,
 %                \__kernel_displayblock_beginpar_vmode:}
@@ -2126,6 +2125,40 @@
 %
 %
 %
+%  \begin{macro}{\@@_evaluate_saved_user_keys:nn}
+%    Keys set on individual list environments may be intended to alter
+%    the behavior of the template instance that defines the \cs{item}
+%    command. If meant to alter only a single \cs{item} command one
+%    would specify them in the optional argument of the \cs{item}, but
+%    if they should alter all items the right place would be the list
+%    environment. For this reason we need to store the values and then
+%    set them inside the \cs{item} template code using
+%    \cs{SetTemplateKeys} in the appropriate context (template type
+%    and template name). This is done in
+%    \cs{@@_evaluate_saved_user_keys:nn}. The context is provided in
+%    the two arguments (because different list environments may use
+%    different \cs{item} instances based on different templates. By
+%    default the command does
+%    nothing because most environments do not have user key settings.
+%  \changes{v0.8s}{2024/10/03}{Pass user keys on list to \cs{item} for
+%    evaluation}
+%    \begin{macrocode}
+\cs_new_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn
+%    \end{macrocode}
+%    Maybe something like this should become a public function, but
+%    for now this is a one-off for the \cs{item} command and therefore
+%    coded inline and internal to the block code.
+%    \begin{macrocode}
+%\cs_new:Npn \@@_save_user_keys:n #1 {
+%  \tl_if_empty:nTF {#1}
+%     { \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
+%     {
+%       \cs_set:Npe \@@_evaluate_saved_user_keys:nn ##1##2
+%          { \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
+%     }
+%}
+%    \end{macrocode}
+%  \end{macro}
 %
 %
 % \begin{template}{list std}
@@ -2151,25 +2184,41 @@
 {
   \@@_debug_typeout:n{template:list:std}
 %
-  \tl_if_empty:nF {#1} { \SetTemplateKeys{list}{std}{#1} }
 %    \end{macrocode}
+%    We start by looking at the user supplied keys in \texttt{\#1}. If
+%    there aren't any we reset \cs{@@_evaluate_saved_user_keys:nn} to
+%    do nothing. Otherwise we evaluate and set the keys in the contect
+%    of the current list template. In addition we prepare
+%    \cs{@@_evaluate_saved_user_keys:nn} for execution in the
+%    template for \cs{item}.
+%  \changes{v0.8s}{2024/10/03}{Prepare \cs{@@_evaluate_saved_user_keys:nn}
+%            for use in \cs{item}}
+%    \begin{macrocode}
+  \tl_if_empty:nTF {#1}
+     { \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
+     {
+       \SetTemplateKeys{list}{std}{#1}
+       \cs_set:Npe \@@_evaluate_saved_user_keys:nn ##1##2
+          { \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
+     }
+%    \end{macrocode}
 %    Has this list a counter name defined in the instance?
 %    \begin{macrocode}
   \tl_if_empty:NTF \l_@@_counter_tl
     {                                
 %    \end{macrocode}
-%    If not we check if \cs{@listctr} has a non-empty value to be used
-%    for the list counter.      
-%
-%    We better test for blank not empty in case somebody had defined
-%    \cs{@listctr} using \cs{renewcommand} or \cs{cs_set:Npn}.
+%    If not we check if \cs{@nmbrlist} is true which may be the case
+%    in legacy environments that used \cs{usecounter} in the argument
+%    to the \env{list} environment.
+%  \changes{v0.8v}{2024/10/11}{Correct logic for setting up the list
+%    counter  (tagging/730)}
 %    \begin{macrocode}
-     \tl_if_blank:oF \@listctr
-       {
+    \legacy_if:nT { @nmbrlist }
+        {
 %    \end{macrocode}
-%    In that case \texttt{@nmbrlist} should have been set too, for
-%    example, through \cs{usecounter}, so we do not set it
-%    explicitly. However, we check if we should resume a previous list.
+%    In that case we only check if we should resume a previous list
+%    (\cs{@listctr} should be set in that case through the legacy
+%    method as well so we should be able to use it).
 %    \begin{macrocode}
          \bool_if:NF \l_@@_resume_bool
            {
@@ -2176,11 +2225,7 @@
              \int_gset:cn{ c@ \@listctr }
                  { \l_@@_counter_start_int - 1 }
            } 
-       } 
-%    \end{macrocode}
-%    If \cs{@listctr} is not set then we have definitely an unnumbered list.
-%    \begin{macrocode}
-       { \@nmbrlistfalse } 
+        }
     }
 %    \end{macrocode}
 %    If a counter is set in the list instance we use that
@@ -2210,12 +2255,28 @@
       \tl_set_eq:NN \@itemlabel \l_@@_item_label_tl
     }
 %    \end{macrocode}
-%    finally, we signal that we are at the start of a new list (which
-%    effects how the first \cs{item} is handled and how \cs{par}
+%    Finally, we signal that we are at the start of a new list (which
+%    affects how the first \cs{item} is handled and how \cs{par}
 %    commands are interpreted.
 %    \begin{macrocode}
     \legacy_if_gset_true:n { @newlist }
 %    \end{macrocode}
+%    If we encounter horizontal material before the first \cs{item} we
+%    do want a \cs{@noitemerr} straight away, because afterwards we
+%    end up with tagging structure faults whose cause is the
+%    missing \cs{item}. So we setup up \cs{@@_item_everypar:} to test
+%    for this; when the first \cs{item} is encountered this will get
+%    reset. This is only relevant for vertical lists, when dealing with
+%    inline lists one would need to test for something else to
+%    identify that there is horizontal material between the start of the list and
+%    the first \cs{item} (maybe some \cs{spacefactor} trick could be
+%    used then, or the material is boxed first and the width is
+%    inspected as suggested by Joseph).\fmi{Think about a better
+%    implementation at some point.}
+%  \changes{v0.8q}{2024/09/02}{}
+%    \begin{macrocode}
+    \cs_set_eq:NN \@@_item_everypar: \@@_item_everypar_first:
+%    \end{macrocode}
 %    
 %    \begin{macrocode}
   \@@_debug_typeout:n{template:list:std~end}
@@ -2304,8 +2365,19 @@
 %    was given.
 %    \begin{macrocode}
     \tl_set_eq:NN \l_@@_label_given_tl \c_novalue_tl
+%    \end{macrocode}
+%    First we evaluate and set any keys specified on the list
+%    environment by calling
+%    \cs{@@_evaluate_saved_user_keys:nn}. Then we do the same
+%    with all keys specified on this \cs{item} command (which may
+%    overwrite one or the other setting just made).
+%  \changes{v0.8s}{2024/10/03}{Use \cs{@@_evaluate_saved_user_keys:nn}
+%            to make use of user keys on the list level}
+%    \begin{macrocode}
+    \@@_evaluate_saved_user_keys:nn {item}{std} 
     \tl_if_empty:nF{#1}{ \SetTemplateKeys{item}{std}{#1} }
 %    \end{macrocode}
+%    
 %    If no optional argument was given then \cs{l_@@_label_given_tl}
 %    is still equal to \cs{c_novalue_tl} and so we can distinuish
 %    that from \verb=\item[]=.
@@ -2457,16 +2529,16 @@
 %
 %
 %
-% \begin{macro}{\@@_item_everypar:, \@@_item_everypar_std:}
+% \begin{macro}{\@@_item_everypar:, \@@_item_everypar_std:, \@@_item_everypar_first:}
 %    The \cs{@@_item_everypar:} command is executed as part of \hook{para/begin}
 %    but most of the time does nothing, i.e., it has the following
-%    default definition.
+%    default definition outside of lists (and most of the time within lists).
 %    \begin{macrocode}
 \cs_new_eq:NN \@@_item_everypar: \prg_do_nothing:
 %    \end{macrocode}
-%
+%    
 %    \begin{macrocode}
-\AddToHook{para/begin}[lists]{\@@_item_everypar:}
+\AddToHook{para/begin}[items]{\@@_item_everypar:}
 %    \end{macrocode}
 %
 %    Note that we have to make sure that the above code is executed
@@ -2474,9 +2546,9 @@
 %    \texttt{@inlabel} to make a decision.
 %
 %    By the end of the day both should probably move into the kernel
-%    hook instead!
+%    hook instead or, better, into sockets.
 %    \begin{macrocode}
-\DeclareHookRule{para/begin}{lists}{after}{tagpdf}
+\DeclareHookRule{para/begin}{items}{after}{tagpdf}
 %    \end{macrocode}
 %
 %
@@ -2528,6 +2600,16 @@
 }
 %    \end{macrocode}
 %
+%    This is the definition of \cs{@@_item_everypar:} before the first
+%    \cs{item} is encountered.
+%  \changes{v0.8q}{2024/09/02}{Call \cs{@noitemerr} if hmode is
+%    started before the first item}
+%    \begin{macrocode}
+\cs_new:Npn \@@_item_everypar_first: {
+  \legacy_if:nT { @newlist }  { \@noitemerr }
+}
+%    \end{macrocode}
+%
 % \end{macro}
 %
 %
@@ -2594,9 +2676,17 @@
         }
         {
           \legacy_if:nTF { @newlist }
-            { \__kernel_list_item_begin: }
-            { \@@_inter_item:            }
+            {
+              \__kernel_list_item_begin:
 %    \end{macrocode}
+%    The first item of a list also has to change the \texttt{@newlist} switch.
+%  \changes{v0.8q}{2024/09/02}{Set \texttt{@newlist} to false after
+%    the first \cs{item}}
+%    \begin{macrocode}
+              \legacy_if_gset_false:n { @newlist }
+            }
+            { \@@_inter_item: }
+%    \end{macrocode}
 %    To avoid unnecessary key/val processing we make a quick check if
 %    there was an optional argument.
 %    \begin{macrocode}
@@ -3971,15 +4061,37 @@
 %    Finally, at the list end we have to close the open
 %    \texttt{LBody}, \texttt{LI}, \texttt{L}, and possibly a
 %    \struct{text} if the last item ends with a list.
+%    However, if the user forgot to add an \cs{item} then there will be no
+%    \texttt{LI} and \texttt{LBody} open, so we check for the status
+%    of \texttt{@newlist}. The corresponding no-item error was
+%    generated earlier outside the tagging code.
+%
+%    One could argue that it doesn't matter if the tagging is wrong
+%    after a \cs{@noitemerr} was issued. However, there is one case
+%    where it isn't an error: In the \texttt{thebibliography}
+%    environment (which is internally a list) it is often the case
+%    that documents start out with an empty environment, not
+%    containing any \cs{bibitem}s. For that reason \cs{@noitemerr} is
+%    redefined inside that environment to only produce a warning;
+%    hence we have to produce correct tag structures in that case.
+%  \changes{v0.8q}{2024/09/02}{Do not close LI and LBody if they
+%    never were opened.}
 %    \begin{macrocode}
 \cs_set:Npn \@@_list_end: {
-  \legacy_if:nT { @endpe }
+%    \end{macrocode}
+%    If \texttt{@newlist} is true (i.e., when we have an error or warning
+%    situation) there is not much to close.
+%    \begin{macrocode}
+  \legacy_if:nF { @newlist }
     {
-      \__tag_gincr_para_main_end_int:
-      \tagstructend                       % text-unit
-      \@@_debug_typeout:n{Structure-end~ P~ at~ list-end \on at line }
+      \legacy_if:nT { @endpe }
+        {
+          \__tag_gincr_para_main_end_int:
+          \tagstructend                       % text-unit
+          \@@_debug_typeout:n{Structure-end~ P~ at~ list-end \on at line }
+        }
+      \tagstructend\tagstructend  % end LBody, LI
     }
-  \tagstructend\tagstructend  % end LBody, LI
   \tagstructend               % end L
 }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabfirstaiddate{2024-08-11}
-\def\ltlabfirstaidversion{0.85e}
+\def\ltlabfirstaiddate{2024-10-04}
+\def\ltlabfirstaidversion{0.85g}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -53,7 +53,9 @@
 % 
 % Similar to the main firstaid package the goal is to remove the 
 % patches once the packages have been updated.
-
+%
+% \changes{v0.85g}{2024/10/04}{Removed firstaid for blindtext. No longer needed with new doenpe-code.}
+% \changes{v0.85g}{2024/10/04}{Added firstaid for fancyvrb.}
 % \section{Implementation}
 %
 %    \begin{macrocode}
@@ -87,7 +89,6 @@
       } }
   \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
 }
-\ExplSyntaxOff
 %    \end{macrocode}
 %  \end{macro}
 
@@ -105,7 +106,168 @@
  {\def\@author{\authors}}  
 %    \end{macrocode}
 %
+% \subsection{ams classes and amsthm}
+% The amsart, amsbook and amsproc classes redefine the theorem code
+% and this breaks the tagging added by the block code. The following
+% reenables tagging. It does \emph{not} give a completly identical output
+% (similar to the new theorem code, 
+%  see \url{https://github.com/latex3/tagging-project/issues/715}). 
+%  The code also does not try to use sockets yet, as the theorem definitions
+%  in the block code don't do that yet either.  
 %
+%    \begin{macrocode}
+\AddToHook{class/amsart/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+\AddToHook{class/amsbook/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+\AddToHook{class/amsproc/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}} 
+\AddToHook{package/amsthm/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}} 
+%    \end{macrocode}
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_firstaid_amsthm:
+  {
+%    \end{macrocode}
+%  \cs{@endtheorem} must use the endblock code
+%    \begin{macrocode}
+    \def\@endtheorem{\endblockenv}  
+%    \end{macrocode}
+% In \cs{@thm} we have to remove the \cs{trivlist}
+%    \begin{macrocode}
+    \RenewDocumentCommand\@thm{mmmO{}}{%
+      \ifhmode\unskip\unskip\par\fi
+      \normalfont
+      \let\thmheadnl\relax
+      \let\thm at swap\@gobble
+      \thm at notefont{\fontseries\mddefault\upshape}%
+      \thm at headpunct{.}% add period after heading
+      \thm at headsep 5\p@ plus\p@ minus\p@\relax
+      \thm at space@setup
+      ##1% style overrides
+      \@topsep \thm at preskip               % used by thm head
+      \@topsepadd \thm at postskip           % used by \@endparenv
+%    \end{macrocode}
+% We store the counter name so that the anchor can make use of it.
+%    \begin{macrocode}
+      \tl_set:Nn \l__block_thm_current_counter_tl{##2}
+      \tl_if_empty:nTF{##2}
+       {
+        \@begintheorem{##3}{}[##4] 
+       }
+       {
+         \@kernel at refstepcounter{##2}
+         \@begintheorem{##3}{\csname the##2\endcsname}[##4]
+       }
+      }
+%    \end{macrocode}
+% \cs{@begintheorem} has a larger number of changes
+%    \begin{macrocode}
+    \def\@begintheorem##1##2[##3]{%
+%    \end{macrocode}
+% We use the theorem instance.
+%    \begin{macrocode}
+      \UseInstance{blockenv}{theorem}{}
+%    \end{macrocode}
+% While create the caption/label we disable para-tagging.
+%    \begin{macrocode}
+      \tagpdfparaOff
+      \mode_leave_vertical:
+%    \end{macrocode}
+% The anchor for links
+%    \begin{macrocode}
+      \MakeLinkTarget{\l__block_thm_current_counter_tl}
+      \group_begin:
+      \normalfont
+      \the\thm at headfont \thm at indent
+        \@ifempty{##1}
+         {\let\thmname\@gobble}
+%    \end{macrocode}
+% we insert the MC and the Lbl structure into \cs{thmname},
+% \cs{thmnumber} and \cs{thmnote}. This will also work
+% with new theorem style as long as they use these command.
+%    \begin{macrocode}
+         {\def\thmname####1{\tag_mc_begin:n {}####1\tag_mc_end:}}%
+        \@ifempty{##2}
+         {\let\thmnumber\@gobble}
+         {\def\thmnumber####1
+           {\tag_struct_begin:n{tag=Lbl}\tag_mc_begin:n {}
+             ####1
+            \tag_mc_end:\tag_struct_end:}}%
+        \@ifempty{##3}
+         {\let\thmnote\@gobble}
+         {\def\thmnote####1{\tag_mc_begin:n{}####1\tag_mc_end:}}%
+        \thm at swap\swappedhead\thmhead{##1}{##2}{##3}%      
+        \thmheadnl % possibly a newline.
+        \hskip\thm at headsep
+      \group_end: 
+%    \end{macrocode}
+% Now we restart para tagging and start a paragraph. The socket
+% is currently defined in tagpdf, so the code should only
+% be used if tagging is active!
+%    \begin{macrocode}
+       \tagpdfparaOn
+       \UseTaggingSocket{para/begin}  %
+      \ignorespaces}  
+%    \end{macrocode}
+% This redefines the standard styles for the theorem heads.
+% \cs{thm at headpunct} has been moved into the head code
+% to make tagging more easier. 
+%    \begin{macrocode}
+    \def\thmhead at plain##1##2##3{%
+      \tag_struct_begin:n{tag=Caption}  
+      \thmname{##1}
+      \thmnumber{
+        \@ifnotempty{##1}{~}\@upn{##2}   
+       }%   
+      \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+      %moved for easier tagging
+      \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:  
+      \tag_struct_end:
+      }
+    \let\thmhead\thmhead at plain
+    \def\swappedhead##1##2##3{%
+      \tag_struct_begin:n{tag=Caption}
+      \thmnumber{##2}
+      \thmname{\@ifnotempty{##2}{\nobreakspace}##1}
+      \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+      \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:
+      \tag_struct_end:
+     }  
+    \let\swappedhead at plain=\swappedhead 
+%    \end{macrocode}
+% At last some adjustments for the proof environment.
+% The qed symbols use a drawn box by default. We add an actualtext.
+%    \begin{macrocode}
+    \renewcommand{\openbox}{\leavevmode
+      \hbox to.77778em{\pdf_bdc:nn{Span}{/ActualText<FEFF220E>}%
+      \pdffakespace\hfil\vrule
+      \vbox to.675em{\hrule width.6em\vfil\hrule}%
+      \vrule\hfil\pdf_emc:}}  
+%    \end{macrocode}
+% And redefine proof to no longer use a trivlist.
+%    \begin{macrocode}
+    \renewenvironment{proof}[1][\proofname]{\par
+      \pushQED{\qed}%
+      \UseInstance{blockenv}{theorem}{beginsep=6\p@\@plus6\p@}
+      \normalfont
+      \tagpdfparaOff 
+      \AddToHookNext{para/begin}
+       {\tag_struct_begin:n{tag=Caption}
+        \tag_mc_begin:n{}%
+         \textit{##1\@addpunct{.}}%
+        \tag_mc_end:
+        \tag_struct_end:
+        \tagpdfparaOn
+        \UseTaggingSocket{para/begin}
+        \pdffakespace\hspace{\labelsep}} 
+      \ignorespaces
+    }{%
+      \popQED\endblockenv\par
+     }
+  }
+\ExplSyntaxOff
+%    \end{macrocode}
 %
 % \subsection{verse}
 %
@@ -212,50 +374,6 @@
 %\end{verbatim}
 %
 %
-% \subsection{blindtext}
-%
-% The blindtext package generates lists with nested \cs{loop} command.
-% The inner loop introduces a group around the list which error when lists are tagged
-% as \cs{@doendpe} is lost.
-%    \begin{macrocode}
-\AddToHook{file/blindtext.sty/after}[latex-lab-firstaid]{%
-  \FirstAidNeededT{blindtext}{sty}{\blindfiledate\space\blindfileversion\space%
-                 blindtext-Package}%
-   {%
-    \renewcommand{\blind at items}{%
-       \setcounter{blind at listcount}{1}%
-      \loop
-      \ifblind at optional
-        \ifblind at long
-          \item[\blindtext at countitem] \blindtext at text
-        \else
-          \item[\blindtext at count] \blindtext at item
-        \fi
-        \else % \blind at optionalfalse
-          \ifblind at long
-            \item \blindtext at text
-          \else
-            \item \blindtext at countitem
-          \fi
-        \fi % \ifblind at optional
-        {%
-          \loop
-          \ifnum\value{blindlistlevel}>\value{blindlist at level}%
-            \stepcounter{blind at levelcount}%
-            \blind at list[\value{blindlist}]\relax
-            \addtocounter{blind at levelcount}{-1}%
-            \setcounter{blind at listcount}{1}%
-          \repeat
-        \expandafter}\if at endpe\@doendpe\fi % <----------changed
-      \ifnum\value{blind at listcount}<\value{blindlist}%
-        \stepcounter{blind at listcount}%
-      \repeat
-    }
-   }%
- }
-%    \end{macrocode}
-%
-%
 % \subsection{cleveref}
 %
 % The cleveref package redefines \cs{@makefntext} and this means that the patches in
@@ -292,6 +410,7 @@
 % See also issue \url{https://github.com/latex3/tagging-project/issues/69}
 % 
 % 
+%    \begin{macrocode}
 \ExplSyntaxOn
 \AddToHook{package/booktabs/after} 
  {
@@ -316,9 +435,146 @@
     \tag_mc_end: \int_gdecr:N \g__tbl_row_int 
     \cr} 
   }
-\ExplSyntaxOff 
+\ExplSyntaxOff   
+%    \end{macrocode}
+
 %
+% \subsection{fancyvrb}
+% The firstaid adds first partial tagging support to the environments 
+% of fancyvrb (inline verbatim is untested). 
+% This supports then also packages like minted which internally uses fancyvrb
+% and classes like l3doc (where currently the verbatim environment based on fancyvrb
+% is overwritten by the block code).
+% The environments are surrounded by a \texttt{verbatim} structure, 
+% every line by a \texttt{codeline} 
+% structure (this requires the block code, but firstaid should be used only with
+% phase-III anyway). Line numbers are tagged as Lbl, currently outside of the 
+% \texttt{codeline} structure. The frame lines are marked as artifact. 
+% 
+% \begin{macro}{\FV at LeaveVMode}
+% If we are in vmode we have to open a text-unit structure, if we are 
+% in hmode we have to set para mode to flattened before the fancyhdr code
+% issues the\cs{par}. The closing of the text-unit structure is handled by the
+% doendpe code in the block code.
 %    \begin{macrocode}
+\ExplSyntaxOn
+\AddToHook{package/fancyvrb/after}
+{
+    \def\FV at LeaveVMode{%
+      \if at noskipsec
+        \leavevmode
+      \else
+        \if at FV@ResetMargins\if at inlabel\leavevmode\fi\fi
+      \fi
+      \ifvmode
+        \@noparlisttrue
+        \__tag_gincr_para_main_begin_int:
+        \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl}    
+      \else
+        \bool_set_true:N\l__tag_para_flattened_bool
+        \@noparlistfalse
+        \unskip\par
+      \fi    
+      }
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\FV at List}
+% At the begin of the list code we have to tag the frame as artifact
+% and start the \texttt{verbatim} structure
+%    \begin{macrocode}
+    \def\FV at List#1{%
+      \begingroup
+      \FV at UseKeyValues
+      \FV at LeaveVMode
+      \if at inlabel\else\setbox\@labels=\box\voidb at x\fi
+      \FV at ListNesting{#1}%
+      \FV at ListParameterHook
+      \FV at ListVSpace
+      \FV at SetLineWidth
+      \FV at InterLinePenalty
+      \let\FV at ProcessLine\FV at ListProcessLine@i
+      \FV at CatCodes
+      \FV at FormattingPrep
+      \FV at ObeyTabsInit
+      \cs_if_exist:NT \FV at BeginListFrame
+        {
+         \tag_mc_begin:n{artifact}
+         \FV at BeginListFrame
+         \tag_mc_end:
+        } 
+      \tag_struct_begin:n{tag=verbatim}     
+      }
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\FV at EndList}
+% At the end of the list code we close the \texttt{verbatim} structure and
+% tag the frame as artifact.
+%    \begin{macrocode}
+    \def\FV at EndList{%
+      \FV at ListProcessLastLine
+      \tag_struct_end:
+      \cs_if_exist:NT \FV at EndListFrame
+        {
+         \tag_mc_begin:n{artifact}
+         \FV at EndListFrame
+         \tag_mc_end:
+        } 
+      \@endparenv    
+      \endgroup  
+      \@endpetrue
+      }  
+%    \end{macrocode}
+% \end{macro}
+% 
+% \begin{macro}{\FV at ListProcessLine}
+% At last the tagging of the code lines. Here we have to tag also
+% numbers and frame parts if they exist.
+%    \begin{macrocode}
+    \def\FV at ListProcessLine#1{%
+      \hbox to \hsize{%
+        \kern\leftmargin
+        \hbox to \linewidth{%
+          \cs_if_exist:NT \FV at LeftListNumber
+           {
+             \tag_struct_begin:n{tag=Lbl}
+             \tag_mc_begin:n{} 
+             \FV at LeftListNumber
+             \tag_mc_end:
+             \tag_struct_end:
+           }
+          \cs_if_exist:NT \FV at LeftListFrame
+           {
+             \tag_mc_begin:n{artifact}
+             \FV at LeftListFrame
+             \tag_mc_end:
+           }
+          \tag_struct_begin:n{tag=codeline}
+          \tag_mc_begin:n{}% 
+          \FancyVerbFormatLine{#1}%
+          \tag_mc_end:
+          \tag_struct_end:\hss
+          \cs_if_exist:NT \FV at RightListFrame
+           {
+             \tag_mc_begin:n{artifact}
+             \FV at RightListFrame
+             \tag_mc_end:
+           }
+          \cs_if_exist:NT \FV at RightListNumber
+           {
+             \tag_struct_begin:n{tag=Lbl}
+             \tag_mc_begin:n{} 
+             \FV at RightListNumber
+             \tag_mc_begin:n{}
+             \tag_struct_end:
+           }      
+          }
+          \hss}}
+  }          
+\ExplSyntaxOff  
+%    \end{macrocode}
+% \end{macro}
+%    \begin{macrocode}
 %</package>
 %    \end{macrocode}
 %

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabfloatdate{2024-07-05}
-\def\ltlabfloatversion{0.81e}
+\def\ltlabfloatdate{2024-09-20}
+\def\ltlabfloatversion{0.81f}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -43,6 +43,9 @@
 % customizations}}
 %
 % \providecommand\hook[1]{\texttt{#1}}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+% 
 % \begin{documentation}
 % \begin{abstract}
 % The following code implements a first draft for the tagging of float 
@@ -125,7 +128,10 @@
 % 
 % \section{Kernel commands}
 % \begin{function}{\@current at float@struct}
-% This variable holds the structure number of current float structure.
+% This variable holds the number of the current float structure. With tagging
+% this is the structure number, without tagging a unique counter. A float
+% can contain more than one float structure (e.g. if there is more than one
+% caption).
 % \end{function}
 % 
 % \begin{function}{\@makecaption}
@@ -146,16 +152,21 @@
   {Code related to the tagging of floats}
 %    \end{macrocode}
 % \subsection{Variables}
-% We rolemap to float to Aside, and float sections to Sect.
+% We rolemap floats to Aside, and float sections to Sect.
 %
 % \begin{variable}{
 %  \g_@@_float_sect_prop,
 %  \g_@@_float_types_seq,
-%  \@current at float@struct
+%  \@current at float@struct,
+%  \g_@@_float_int
 %   }
 % These variables will hold the structure number for the float container  
 % and the list of float types. Currently only figure and table are supported
 % TODO: interface to declare new float types.
+% To set the target for links we need also a unique counter.
+% With tagging we could use the structure number, but
+% the structure commands now are hidden inside tagging sockets 
+% so we use a dedicated counter.
 %    \begin{macrocode}
 \prop_new:N \g_@@_float_sect_prop
 \seq_new:N  \g_@@_float_types_seq
@@ -162,6 +173,7 @@
 \seq_gput_right:Nn \g_@@_float_types_seq {figure}
 \seq_gput_right:Nn \g_@@_float_types_seq {table}
 \tl_new:N\@current at float@struct
+\int_new:N\g_@@_float_int
 %    \end{macrocode}
 % \end{variable}
 % 
@@ -176,6 +188,19 @@
 %    \end{macrocode}
 % \end{variable}
 % 
+% \begin{macro}{\@@_float_init:}
+% To be able to set unique targets for links, we
+% need a counter outside the tagging sockets.
+% TODO: check if this command should be public or
+% a socket or a hook.  
+%    \begin{macrocode}
+\cs_new_protected:Npn \@@_float_init:
+ {
+   \int_gincr:N \g_@@_float_int
+   \tl_set:Ne \@current at float@struct { \int_use:N \g_@@_float_int}
+ }
+%    \end{macrocode}
+% \end{macro}
 % 
 %\subsection{Moving float structures}
 % 
@@ -260,15 +285,71 @@
   {
    split-float .code:n = 
     { 
-      \@@_float_end:
-      \@@_float_begin:
-      \MakeLinkTarget*{floatstructure.\int_use:N\c at g__tag_struct_abs_int}
+      \UseTaggingSocket{float/end}
+      \@@_float_init:     
+      \UseTaggingSocket{float/begin}
+      \MakeLinkTarget*{floatstructure.\@current at float@struct}
     }  
  }
 %    \end{macrocode}
 % \end{macro}
- 
-% \subsection{Patching}
+% 
+% \subsection{Tagging sockets}
+% For now we test if the sockets are already defined
+%    \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/float/begin_plug_str }
+  {
+    \NewSocket{tagsupport/float/hmode/begin}{0}
+    \NewSocket{tagsupport/float/hmode/end}{0}
+    \NewSocket{tagsupport/float/begin}{0}
+    \NewSocket{tagsupport/float/end}{0}
+  }
+%    \end{macrocode}
+%
+% \begin{plugdecl}{default  (tagsupport/float/hmode/begin)}
+% This plug should be used if a float is called in hmode.
+% In then closes the MC-chunks and starts the structure.
+%    \begin{macrocode}
+\NewSocketPlug {tagsupport/float/hmode/begin}{default}
+  {
+    \@@_float_stop_par:
+  }
+\AssignSocketPlug{tagsupport/float/hmode/begin}{default}  
+%    \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default  (tagsupport/float/hmode/end)}
+% This plug should be used if a float is called in hmode
+% and the end of the float it then restarts the MC.
+%    \begin{macrocode}
+\NewSocketPlug{tagsupport/float/hmode/end}{default}
+  {
+    \@@_float_start_par:
+  } 
+\AssignSocketPlug{tagsupport/float/hmode/end}{default}  
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \begin{plugdecl}{default  (tagsupport/float/begin)}
+%    \begin{macrocode}
+\NewSocketPlug{tagsupport/float/begin}{default}
+  {
+    \@@_float_begin:
+  }
+\AssignSocketPlug{tagsupport/float/begin}{default}   
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \begin{plugdecl}{default  (tagsupport/float/end)}
+%    \begin{macrocode}
+\NewSocketPlug{tagsupport/float/end}{default}
+  {
+    \@@_float_end:
+  } 
+\AssignSocketPlug{tagsupport/float/end}{default}   
+%    \end{macrocode}
+% \end{plugdecl}
+% 
 % \begin{macro}{\@@_float_stop_par:,\@@_float_start_par:}
 % if a float is in a par, we need commands to stop and restart the P-mc
 %    \begin{macrocode}
@@ -287,8 +368,7 @@
       \tag_struct_begin:n{tag=text}%
      }
    \tag_mc_begin:n{tag=P}    
-  }
- 
+  } 
 %    \end{macrocode}
 % \end{macro}
 % These commands are the main commands to start and end the float tagging.
@@ -315,6 +395,7 @@
 \cs_new_protected:Npn\@@_float_end:{\tag_struct_end:} %end Aside
 
 %    \end{macrocode}
+% \subsection{Patching}
 % This patches the main command \cs{@xfloat}.
 % There is a : in the code, so we disable expl3 syntax
 %    \begin{macrocode}
@@ -337,7 +418,7 @@
 %    \end{macrocode}
 % If the float is in hmode we have to interrupt the P 
 %    \begin{macrocode}
-     \@nameuse{@@_float_stop_par:}% <---end P
+     \UseTaggingSocket{float/hmode/begin}%
      \@floatpenalty -\@Mii
    \else
      \@floatpenalty-\@Miii
@@ -383,7 +464,8 @@
 %    \end{macrocode}
 % This starts the structure for the float.
 %    \begin{macrocode}
-  \@nameuse{@@_float_begin:}%
+  \csname @@_float_init:\endcsname
+  \UseTaggingSocket{float/begin}%
   \global \setbox\@currbox
     \color at vbox
       \normalcolor
@@ -394,7 +476,7 @@
 %    \end{macrocode}
 % We add a target for links. TODO: check that it doesn't affect spacing!!
 %    \begin{macrocode}
-        \MakeLinkTarget*{floatstructure.\number\value{g__tag_struct_abs_int}}%
+        \MakeLinkTarget*{\@captype.struct.\@current at float@struct}%
 }%
 %    \end{macrocode}
 %  The end code of the float ...
@@ -401,7 +483,7 @@
 %    \begin{macrocode}
 \def\end at float{%
   \@endfloatbox
-  \@nameuse{@@_float_end:}%
+  \UseTaggingSocket{float/end}%
   \ifnum\@floatpenalty <\z@
     \@largefloatcheck
     \@cons\@currlist\@currbox
@@ -413,7 +495,7 @@
       \penalty\@floatpenalty
     \else
       \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
-      \@nameuse{@@_float_start_par:}% restart P safe here??
+      \UseTaggingSocket{float/hmode/end}%
     \fi
   \fi
 }
@@ -423,7 +505,7 @@
 \def\end at dblfloat{%
   \if at twocolumn
     \@endfloatbox
-    \@nameuse{@@_float_end:}%
+    \UseTaggingSocket{float/end}%
     \ifnum\@floatpenalty <\z@
       \@largefloatcheck
       \global\dp\@currbox1sp %
@@ -436,7 +518,7 @@
         \penalty\@floatpenalty
       \else
         \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
-        \@nameuse{@@_float_start_par:}% restart P safe here??
+        \UseTaggingSocket{float/hmode/end}%
       \fi
     \fi
   \else
@@ -453,10 +535,113 @@
 \def\hyper at nopatch@caption{}
 %    \end{macrocode}
 %
+% \subsubsection{(Tagging) sockets}
+% 
+% First some temporary sockets. 
+% These sockets are in lttagging.
+%    \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/caption/begin_plug_str }
+ {
+  \NewSocket{tagsupport/caption/begin}{1}
+  \NewSocket{tagsupport/caption/end}{0}
+  \NewSocket{tagsupport/caption/label/begin}{0}
+  \NewSocket{tagsupport/caption/label/end}{0}
+ }
+%    \end{macrocode}
+% These socket are currently defined in tagpdf.
+%    \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str } 
+ {
+   \NewSocket{tagsupport/para/begin} 
+   \NewSocket{tagsupport/para/end} 
+ }
+%    \end{macrocode}
+%
+% \begin{socketdecl}{caption/label}
+% This socket is a lightweight start for 
+% some interface to format the label or add a font command. 
+% The argument is the label text. 
+% The default plug \texttt{kernel} adds a colon
+% and a space.
+% TODO: revisit after checking float and caption packages
+% to identify which sockets and hooks are needed.
+%    \begin{macrocode}
+\NewSocket{caption/label}{1}
+%    \end{macrocode}
+% \end{socketdecl}
+% 
+% \begin{plugdecl}{kernel (caption/label)}
+% The standard label formatting from the kernel.
+%    \begin{macrocode}
+\NewSocketPlug{caption/label}{kernel}
+ {
+   #1:~
+ }
+\AssignSocketPlug{caption/label}{kernel} 
+%    \end{macrocode}
+% \end{plugdecl}
+% \begin{plugdecl}{default}
+% The caption begin socket takes an argument: the structure number of
+% the parent float. If the argument is empty, the current structure is used.
+% TODO: a tagpdf key that moves a structure to the begin of the parent.
+% The caption is moved to the first position with the firstkid option.
+%    \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/begin}{default}
+  {
+     \tl_if_empty:eTF {#1}
+      {
+        \tag_struct_begin:n{tag=Caption,firstkid}
+      }
+      {
+        \tag_struct_begin:n{tag=Caption,parent=#1,firstkid}
+      } 
+     \bool_set_true:N \l__tag_para_flattened_bool     
+  }
+\AssignSocketPlug{tagsupport/caption/begin}{default}  
+%    \end{macrocode}
+% \end{plugdecl}
+% \begin{plugdecl}{default}
+%    \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/end}{default}
+  {
+    \tag_struct_end:
+  }
+\AssignSocketPlug{tagsupport/caption/end}{default}  
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \begin{plugdecl}{default (tagsupport/caption/label/begin)}
+%    \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/label/begin}{default}
+  {
+%    \end{macrocode}
+% suppress para tagging at the begin.
+%    \begin{macrocode}
+     \tagpdfparaOff
+     \tag_struct_begin:n{tag=Lbl}
+     \tag_mc_begin:n{}
+  }
+\AssignSocketPlug{tagsupport/caption/label/begin}{default}    
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \begin{plugdecl}{default (tagsupport/caption/label/end)}
+%    \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/label/end}{default}
+  {
+    \tag_mc_end:
+    \tag_struct_end:
+    \tagpdfparaOn
+  }
+\AssignSocketPlug{tagsupport/caption/label/end}{default}  
+%    \end{macrocode}
+% \end{plugdecl}
+% 
+% \subsubsection{Redefinitions}
+% 
 % With hyperref that means that the \cs{refstepcounter} now can affect spacing so we
 % change that to the kernel refstepcounter:
 %    \begin{macrocode}
-\let\@kernel at refstepcounter\refstepcounter %as long it is not in the kernel
 \def\caption{%
    \ifx\@captype\@undefined
      \@latex at error{\noexpand\caption\c_space_tl outside~float}\@ehd
@@ -474,8 +659,9 @@
         \@kernel at refstepcounter\@captype
 %    \end{macrocode}
 % we need to reset the target for \cs{addcontentsline}.
+% We use \cs{@captype} to support autoref.
 %    \begin{macrocode}
-        \xdef\@currentHref{floatstructure.\@current at float@struct}%
+        \xdef\@currentHref{\@captype.struct.\@current at float@struct}%
       }  
      \expandafter\@firstofone
    \fi
@@ -482,14 +668,7 @@
    {\@dblarg{\@caption\@captype}}%
 }
 %    \end{macrocode}
-% As we will use the structure number in the target, we need to provide a
-% theH-representation. (Once the kernel will create
-% theH-representation generally this will be provided automatically, as tagpdf uses
-% \cs{newcounter})
-%    \begin{macrocode}
-\providecommand\theHg__tag_struct_abs_int{\int_use:N\c at g__tag_struct_abs_int}
-%    \end{macrocode}
-
+%
 % \begin{macro}{\@makecaption}
 % \cs{@makecaption} is defined by the classes so we overwrite it for now
 % at begin document.
@@ -501,37 +680,21 @@
 %    \end{macrocode}
 % we don't want tagging when storing the caption for the singleline check
 %    \begin{macrocode}
-      \tag_stop:n{caption}
+      \SuspendTagging{\@makecaption}
       \sbox\@tempboxa{#1:~#2}%
-      \tag_start:n{caption} 
+      \ResumeTagging{\@makecaption} 
 %    \end{macrocode}
-% we stop paratagging. TODO: check 
+% We pass \cs{@current at float@struct} as parent structure
+% number. If that is empty the socket will use the parent structure and hope ...
 %    \begin{macrocode}
-      \tagtool{para=false}
-%    \end{macrocode}
-% if caption is used outside a float there is perhaps no number, then we use
-% the parent structure and hope ...
-%    \begin{macrocode}
-      \tl_if_empty:NT \@current at float@struct 
-       { \tl_set:Ne \@current at float@struct {\tag_get:n{struct_num}} }     
-      \tag_struct_begin:n{tag=Caption,parent=\@current at float@struct}  
-%    \end{macrocode}
-% move the caption to the begin of the float structure:
-%    \begin{macrocode}
-      \tag_if_active:T
-       {
-         \seq_gpop_right:cN {g__tag_struct_kids_\@current at float@struct _seq}\l_@@_tmpa_tl
-         \seq_gput_left:cV  {g__tag_struct_kids_\@current at float@struct _seq}\l_@@_tmpa_tl
-       }    
+      \UseTaggingSocket{caption/begin}{\@current at float@struct}
       \ifdim \wd\@tempboxa >\hsize
-        \tag_struct_begin:n{tag=Lbl}
-        \tag_mc_begin:n{}
-          #1:~ 
-        \tag_mc_end:
-        \tag_struct_end:
-        \tag_mc_begin:n{}  
-          #2\par
-        \tag_mc_end:  
+      \UseTaggingSocket{caption/label/begin}
+      \UseSocket{caption/label}{#1}
+      \UseTaggingSocket{caption/label/end}
+      \UseTaggingSocket{para/begin}
+          #2
+      \par        
       \else
 %    \end{macrocode}
 % we don't reuse the box as it doesn't contain tagging, but set the text explicitly.
@@ -538,16 +701,15 @@
 %    \begin{macrocode}
           \global \@minipagefalse
         \hb at xt@\hsize{\hfil
-         \tag_struct_begin:n{tag=Lbl}
-          \tag_mc_begin:n{}
-           #1:~ 
-          \tag_mc_end:
-         \tag_struct_end:
-         \tag_mc_begin:n{}  
+         \UseTaggingSocket{caption/label/begin}
+         \UseSocket{caption/label}{#1} 
+         \UseTaggingSocket{caption/label/end}
+         \UseTaggingSocket{para/begin} 
           #2
-         \tag_mc_end:\hfil}%
+         \UseTaggingSocket{para/end}
+         \hfil}%
        \fi
-       \tag_struct_end: %caption
+      \UseTaggingSocket{caption/end}
       \vskip\belowcaptionskip}
   }  
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-footnotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-footnotes.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-footnotes.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -17,8 +17,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabfootnotedate{2024-07-27}
-\def\ltlabfootnoteversion{0.8e}
+\def\ltlabfootnotedate{2024-09-30}
+\def\ltlabfootnoteversion{0.8g}
 
 %<*driver>
 \documentclass{l3doc}
@@ -228,7 +228,8 @@
 %
 %    To cater for different layout configurations there are four
 %    sockets that can be set by a package or 
-%    class but there should be only one per document setting them, i.e., if two packages/classes set them they are mutually
+%    class but there should be only one per document setting them, 
+%    i.e., if two packages/classes set them they are mutually
 %    incompatible (or rather the last one wins most likely).
 %    These are:
 %    \begin{description}
@@ -491,11 +492,21 @@
 % \subsection{Technical details for the tagging}
 %
 % The following sockets are set up for kernel use, when doing tagging:
+% There name and/or function will probably change as they currently
+% mix tagging with the link support.
+% 
+% TODO: review this sockets
 % \begin{description}
 %    \item[\socket{tagsupport/fnmark} (1 argument)]
 %
 %      \DescribeSocket[noprint]{tagsupport/fnmark}
-%
+% 
+%    The socket is used in \cs{@footnotemark}/\cs{fnote_footnotemark:} 
+%    and takes \cs{@makefnmark} as argument. It prints the mark in the text
+%    and surrounds it with a tagging structure and a link. As such it is 
+%    not solely for tagging and so should not be used with \cs{UseTaggingSocket}
+%    as this would swallow the argument and loose the link support. 
+%    
 %      \fmi{describe and decide on names}
 %
 %
@@ -503,31 +514,45 @@
 %
 %      \DescribeSocket[noprint]{tagsupport/fntext/begin}
 %
+%    This socket is used before the main processing socket 
+%    (so before the \cs{insert} command). It opens the FEnote structure.
+%    As it sets also the tl-var for the current structure and this is used
+%    in destinations it should not use as tagging socket.
+%    
 %
 %    \item[\socket{tagsupport/fntext/end} (no argument)]
 %
 %      \DescribeSocket[noprint]{tagsupport/fntext/end}
 %
+%    This socket is used after the main processing socket 
+%    (so after the \cs{insert} command). It closes the FEnote structure.
 %
 %    \item[\socket{tagsupport/fntext/mark} (1 argument)]
 %
 %      \DescribeSocket[noprint]{tagsupport/fntext/mark}
+%   
+%    This socket is used around the mark in the footnote text.   
+%    It adds tagging support but also link support, so like the other
+%    tagsupport sockets it should be always active.
 %
-%
 %    \item[\socket{tagsupport/fntext/text} (1 argument)]
 %
 %      \DescribeSocket[noprint]{tagsupport/fntext/text}
 %
+%    This socket handles mc-chunks around the text of the footnote. As it
+%    takes an argument (the text) is should not be use as tagging socket either.
 %
 % \end{description}
 %
 %
 % The \emph{footnotemark} should create a \texttt{/Lbl} structure\footnote{to make it easier
-% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}} that should contain a \texttt{/Ref} entry pointing
+% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}} 
+% that should contain a \texttt{/Ref} entry pointing
 % to the structure of the \emph{footnotetext}.
 %
-% The \emph{footnotetext} should create a \texttt{/FENote}\footnote{We tag it as \texttt{/footnote} and role map it.}
-%  structure with a \texttt{/Ref}
+% The \emph{footnotetext} should create a \texttt{/FENote}%
+% \footnote{We tag it as \texttt{/footnote} and role map it.}
+% structure with a \texttt{/Ref}
 % entry pointing to the structures of \emph{all} marks related to the note.
 % The mark at the begin of the
 % note is in a \texttt{/Lbl}\footnote{We tag it as \texttt{/footnotelabel}.}
@@ -582,8 +607,8 @@
 % with their own structure number as a key in a property.
 %
 % A following \cs{footnotetext} compares its own \cs{@thefnmark} with the values in
-% the prop. If there is a match it stores the structure numbers and removes the entries
-% from the properties (so in a normal document the property will never contain more than
+% the prop. If there is one or more match it stores the structure numbers and removes the entries
+% from the property (so in a normal document the property will never contain more than
 % a few entries).
 %
 % This works well as long as the \cs{footnotemark} commands are issued before the \cs{footnotetext} and
@@ -626,9 +651,9 @@
 %
 % \subsubsection{\cs{footref}}
 %
-% \cs{footref} use internally the same command to set the mark as \cs{footnotemark}, it only
+% \cs{footref} uses internally the same command to set the mark as \cs{footnotemark}, it only
 % defines \cs{@thefnmark} differently. This \cs{@thefnmark} is not suitable for the method described
-% above, as it contains a reference command it can't be used to match a note, also \cs{footref} can
+% above: as it contains a reference command it can't be used to match a note, also \cs{footref} can
 % be used after the note has already been set. \cs{footref} disables therefore the automatic detection.
 %
 % Instead the \cs{label} command is 
@@ -672,7 +697,7 @@
 %
 % A \cs{footnotetext} creates a bunch of destinations (in most cases this sums up to
 % two destinations): one for every structure number in the \texttt{/Ref} (used as target
-% by the mark commands) and one for the structure number of the footnotetest itself
+% by the mark commands) and one for the structure number of the footnotetext itself
 % (used as target by \cs{footref}s commands).
 %
 % \subsection{Implementation details regarding tagging}
@@ -899,8 +924,8 @@
 % This is used to pass the structure number of the note around, e.g.
 % to a label inside the note.
 %    \begin{macrocode}
-\tl_new:N  \l_@@_currentstruct_tl
-\tl_set:Nn \l_@@_currentstruct_tl {1}
+\tl_new:N  \l_@@_currentstruct_tl 
+\tl_set:Nn \l_@@_currentstruct_tl {2} 
 %    \end{macrocode}
 %
 %
@@ -1953,10 +1978,7 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2
   {
-    \tag_if_active:T
-      {
-        \tag_struct_gput:nne {#1}{ref}{\tag_struct_object_ref:e { #2 }}
-      }
+    \tag_struct_gput:nnn {#1}{ref_num}{#2}
   }
 \cs_new_protected:Npn \fnote_gput_refs:nn #1 #2 % pair of numbers
   {
@@ -1967,11 +1989,7 @@
 %    \end{macrocode}
 % \end{macro}
 %
-%    \begin{macrocode}
-\tl_new:N \l_@@_dflt_struct_tl
-\tl_set:Nn \l_@@_dflt_struct_tl {1}
-%    \end{macrocode}
-% kernel hooks for taggin
+% kernel hooks for tagging
 % this sets the structure around the whole text
 %
 %
@@ -1981,7 +1999,8 @@
   {
     \tag_mc_end_push:
 %    \end{macrocode}
-% test if a footnote is allowed, if not move up to the document structure.
+% test if a footnote is allowed, if not move up to the next sect or
+% the document structure.
 %    \begin{macrocode}
     \tag_check_child:nnTF {FENote}{pdf2}
       { 
@@ -1988,7 +2007,15 @@
         \tag_struct_begin:n { tag=footnote }
       }
       {  
-        \tag_struct_begin:n { tag=footnote,parent=\l_@@_dflt_struct_tl }
+        \tag_struct_begin:n 
+          { 
+            tag=footnote,
+%    \end{macrocode}
+% We add 0 for now to ensure to get a number even if the sec code is not loaded
+% or if the seq is empty (which it shouldn't unless there is an coding error) 
+%    \begin{macrocode}
+            parent=\int_max:nn{2}{\tag_get:n{current_Sect}+0} 
+          }
       }  
 %    \end{macrocode}
 % Store the current structure number for labels.
@@ -1995,11 +2022,7 @@
 %    \begin{macrocode}
     \tl_set:Ne \l_@@_currentstruct_tl { \tag_get:n{struct_num} }
 %    \end{macrocode}
-% We want to move the label structure here. So we provide a container
-% It number is |\l__fnote_currentstruct_tl| plus 1.
-%    \begin{macrocode}
-    \tag_struct_begin:n { tag=footnotelabel }\tag_struct_end:
-%    \end{macrocode}
+%
 % after we have opened the structure we can use the structure number to
 % try to detect the connected marks. As with the marks we assume that sometimes
 % no auto detection is done.
@@ -2082,12 +2105,9 @@
      \MakeLinkTarget*{footnote*.\l_@@_currentstruct_tl}
 %    \end{macrocode}
 %    Now we add the tagging commands. We move the structure of the label to
-%    to the container at the begin of the note.
-% \begin{NOTE}{UF}
-%   Check if the NonStruct is really needed. Perhaps we can simply move the mc.
-% \end{NOTE}
+%    the begin of the footnote structure.
 %    \begin{macrocode}
-     \tag_struct_begin:n { tag=NonStruct,parent=\l_@@_currentstruct_tl +1 }
+     \tag_struct_begin:n { tag=footnotelabel,parent=\l_@@_currentstruct_tl,firstkid }
       \tag_mc_begin:n { tag=Lbl }
        #1
       \tag_mc_end:

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-graphic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-graphic.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-graphic.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -15,8 +15,8 @@
 %    https://github.com/latex3/latex2e/required/latex-lab
 %
 % for those people who are interested or want to report an issue.
-\def\ltlabgraphicdate{2024-07-05}
-\def\ltlabgraphicversion{0.80d}
+\def\ltlabgraphicdate{2024-09-18}
+\def\ltlabgraphicversion{0.80e}
 %
 %<*driver>
 \documentclass{l3doc}
@@ -489,7 +489,7 @@
                \bool_set_true:N \l_@@_graphic_artifact_bool
                \bool_set_false:N \l_@@_graphic_BBox_bool
             }
-            {false}{\tag_stop:}
+            {false}{\tag_suspend:n{Gin}}
           }
           {\tl_set:Nn\l_@@_graphic_struct_tl{#1}}
       }  
@@ -528,7 +528,7 @@
                \bool_set_true:N \l_@@_graphic_artifact_bool
                \bool_set_false:N \l_@@_graphic_BBox_bool
             }
-            {false}{\tag_stop:}
+            {false}{\tag_suspend:n{picture}}
           }
           {\tl_set:Nn\l_@@_graphic_struct_tl{#1}}
       }     
@@ -1012,7 +1012,7 @@
   \@defaultunitsset\@tempdimc{#1}\unitlength
   \Gin at tag@struct at begin
   \setbox\@picbox\hb at xt@\@tempdimc\bgroup
-    \tag_stop: %do not tag inside the picture box
+    \tag_suspend:n{\@picture} %do not tag inside the picture box
     \@defaultunitsset\@tempdimc{#3}\unitlength
     \hskip -\@tempdimc
     \@defaultunitsset\@tempdimc{#4}\unitlength

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-marginpar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-marginpar.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-marginpar.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -18,8 +18,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabmarginpardate{2024-08-06}
-\def\ltlabmarginparversion{0.85c}
+\def\ltlabmarginpardate{2024-09-18}
+\def\ltlabmarginparversion{0.85d}
 
 %<*driver>
 \documentclass[kernel]{l3doc}
@@ -227,9 +227,9 @@
 \long\def\@ympar#1{%
   \@savemarbox\@marbox{#1}%
   \global\setbox\@currbox\copy\@marbox
-  \tag_stop:
+  \tag_suspend:n{\@ympar}
   \@xympar
-  \tag_start:}
+  \tag_resume:n{\@ympar}}
 %    \end{macrocode}
 % \end{macro}
 % 
@@ -248,9 +248,9 @@
        \property_record:ee 
          { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page} 
        }%
-     \tag_stop:
+     \tag_suspend:n{\@xmpar}
      \@savemarbox\@currbox{#2}%
-     \tag_start:
+     \tag_resume:n{\@xmpar}
     }
 %    \end{macrocode}
 % order matters! the tagged box should be first so that it can pick up 
@@ -258,15 +258,15 @@
 %    \begin{macrocode}
     {
      \@savemarbox\@currbox{#2}%         
-     \tag_stop:
+     \tag_suspend:n{\@xmpar}
      \@savemarbox\@marbox{#1
        \property_record:ee 
          { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}}
-     \tag_start: 
+     \tag_resume:n{\@xmpar}
     } 
-  \tag_stop:
+  \tag_suspend:n{\@xmpar}
   \@xympar
-  \tag_start:
+  \tag_resume:n{\@xmpar}
   }
 %</package>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -19,8 +19,8 @@
 % for those people who are interested or want to report an issue.
 %
 %
-\def\ltlabmathdate{2024-08-22}
-\def\ltlabmathversion{0.6c}
+\def\ltlabmathdate{2024-10-12}
+\def\ltlabmathversion{0.6h}
 %
 %<*driver>
 \documentclass{l3doc}
@@ -205,7 +205,9 @@
 %   \begin{itemize}
 %    \item |tagsupport/math/inline/formula/begin|
 %     This socket takes the math as argument and its code
-%     should output it for typesetting. Without tagging the 
+%     should output it for typesetting. 
+%     It is not \emph{used} as a tagging socket as the math argument should
+%     not be lost without tagging, so without tagging the 
 %     socket uses the identity plug.
 %     The |default| plug of the socket calls these three internal sockets
 %     for the tagging support:
@@ -1124,7 +1126,7 @@
    \int_set:Nn \l_@@_mathstyle_int {#2}
    \property_record:nn {#1} { mathstyle }
    \int_compare:nNnTF { \property_ref:nn {#1}{ mathstyle} } = { #2 }
-    { \tag_start: }{ \tag_stop: }
+    { \tag_resume:n{\mathchoice} }{ \tag_suspend:n{\mathchoice} }
  }
 \cs_generate_variant:Nn \@@_tag_if_mathstyle:nn {en} 
 %    \end{macrocode}
@@ -1190,16 +1192,19 @@
 \socket_new_plug:nnn
   {tagsupport/math/inline/formula/begin}
   {default}
-  {  
-    \socket_use:n{tagsupport/math/content}
-    \socket_use:n{tagsupport/math/struct/begin}
 %    \end{macrocode}
+% \changes{v0.6g}{2024-10-02}{disable paratagging, issue \#711}
+%    \begin{macrocode}
+  { \tagpdfparaOff 
+    \tag_socket_use:n{math/content}
+    \tag_socket_use:n{math/struct/begin}
+%    \end{macrocode}
 % TODO: does inline math need subformula handling?
 %    \begin{macrocode}
     % inner formula if multiple parts (not really implemented yet)
-    \socket_use:n{tagsupport/math/substruct/begin}
+    \tag_socket_use:n{math/substruct/begin}
     #1
-    \socket_use:n{tagsupport/math/end}
+    \tag_socket_use:n{math/end}
   }
 \socket_new_plug:nnn
   {tagsupport/math/inline/formula/end}
@@ -1226,7 +1231,10 @@
 %   The other two implement the actual formula structure. 
 %   The formula sockets are despite their naming not symmetric:
 %   the begin socket is issued after the math has started, while 
-%   the end socket is after the math!                
+%   the end socket is after the math!  
+%   The socket |tagsupport/math/display/formula/begin| should similar to
+%   the inline version not be used as tagging socket so that the argument, the math,
+%   is not lost.              
 %    \begin{macrocode}
 \socket_new:nn {tagsupport/math/display/begin}{0}
 \socket_new:nn {tagsupport/math/display/end}{0}
@@ -1256,11 +1264,11 @@
   {tagsupport/math/display/formula/begin}
   {default}
   { 
-    \socket_use:n{tagsupport/math/content}
-    \socket_use:n{tagsupport/math/struct/begin}
-    \socket_use:n{tagsupport/math/substruct/begin}
+    \tag_socket_use:n{math/content}
+    \tag_socket_use:n{math/struct/begin}
+    \tag_socket_use:n{math/substruct/begin}
     #1 
-    \socket_use:n{tagsupport/math/end}
+    \tag_socket_use:n{math/end}
   }
 \socket_new_plug:nnn
   {tagsupport/math/display/formula/end}
@@ -1670,7 +1678,11 @@
         }
         {
             \tag_socket_use:n  {math/inline/begin} %end P-MC  
-            \tag_socket_use:nn {math/inline/formula/begin}{#1}
+%    \end{macrocode}
+% We do no use a tagging socket here, so that the argument (the
+% math) is not lost, tagging-project issue 661.
+%    \begin{macrocode}
+            \socket_use:nn {tagsupport/math/inline/formula/begin}{#1}
             $ % $
             \tag_socket_use:n  {math/inline/formula/end}
             \tag_socket_use:n  {math/inline/end} % restart P-MC
@@ -1698,7 +1710,7 @@
     \tl_if_blank:nF {#1}
       {
         \@@_process:nn { equation* } {#1}
-        \socket_use:n {tagsupport/math/display/begin}
+        \tag_socket_use:n {math/display/begin}
         \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
       }
     $$
@@ -1717,15 +1729,30 @@
 % TODO why is that needed? where is para-tagging disabled?
 %    \begin{macrocode}
     \tagpdfparaOn
+%    \end{macrocode}
+%    The \cs{postdisplaypenalty} was temporarily set to 10000 inside
+%    the display and the \cs{belowdisplayskip} and the
+%    \cs{belowdisplayshortskip} was negated, so whatever was inserted
+%    it should have been a negative skip. Whatever skip was added we
+%    pick it ups value up here, so that we can correct the spacing
+%    after the tagging code was inserted.
+%    \begin{macrocode}
     \l_@@_tmpa_skip \lastskip
-    \socket_use:n{tagsupport/math/display/formula/end}    
-    \penalty \postdisplaypenalty
+    \tag_socket_use:n{math/display/formula/end}
 %    \end{macrocode}
-% This reinserts the below display skips. It must be doubled to
-% get the right amount:
+%    Now we add a skip without indroducing a page break possibility,
+%    that should bring the current vertical position back to the point
+%    where \TeX{} would add the penalty and the \enquote{below skip}.
+% \changes{v0.6f}{2024-09-30}{Correct logic for inserting below skips
+%                             after displays (tagging/721)}
 %    \begin{macrocode}
-  \skip_vertical:n { -\l_@@_tmpa_skip * 2 }
-%
+    \nobreak
+    \skip_vertical:n { -\l__math_tmpa_skip  } % remove the negative belowdisplayskip
+%    \end{macrocode}
+%    Then we finally add the real stuff:
+%    \begin{macrocode}
+    \penalty \postdisplaypenalty
+    \skip_vertical:n { -\l__math_tmpa_skip  } % insert the correct skip
   \@doendpe             % this has no \end{...} to take care of it
 }
 
@@ -1829,7 +1856,6 @@
 %      \@@_grab_loop_$:              ,
 %      \@@_grab_loop_\\:             ,
 %      \@@_grab_loop_\begin:         ,
-%      \@@_grab_loop_\begin :        ,
 %      \@@_grab_loop_\end:           ,
 %      \@@_grab_loop_\ignorespaces:  ,
 %      \@@_grab_loop_\unskip:        ,
@@ -1836,10 +1862,7 @@
 %      \@@_grab_loop_\textonly at unskip:
 %   }
 %   Filter out the special cases: for performance reasons, use a hash table
-%   approach rather than a loop (\emph{cf.}~\pkg{collcell}). The need to cover
-%   \verb*|begin | is that at the start of a cell, \TeX{} will expand \cs{begin}
-%   but the \LaTeX{} robust mechanism will mean this yields \verb*|begin |.
-%   If\cs{begin} were protected, that would not be needed.
+%   approach rather than a loop (\emph{cf.}~\pkg{collcell}).
 %    \begin{macrocode}
 \cs_new_protected:Npn \@@_grab_loop_token:N #1
   {
@@ -1868,8 +1891,6 @@
     \int_incr:N \l_@@_grab_env_int
     \@@_grab_loop_store:n { \begin }
   }
-\cs_new_eq:cc { @@_grab_loop_ \token_to_str:N \begin \c_space_tl : }
-  { @@_grab_loop_ \token_to_str:N \begin : }
 \cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \end : }
   {
     \int_compare:nNnTF \l_@@_grab_env_int = 0
@@ -2461,7 +2482,7 @@
 %    \end{macrocode}
 %    Also for "false?"
 %    \begin{macrocode}
-\def\measuring at true{\let\ifmeasuring@\iftrue\tag_stop:}
+\def\measuring at true{\let\ifmeasuring@\iftrue\tag_suspend:n{\measuring}}
 %    \end{macrocode}
 %
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-mathtools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-mathtools.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-mathtools.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -18,6 +18,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
+\def\ltlabmathtoolsdate{2024-09-18}
+\def\ltlabmathtoolsversion{0.80a}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -32,7 +34,7 @@
 %
 % \title{The \texttt{latex-lab-mathtools} code\thanks{}}
 % \author{\LaTeX{} Project}
-%
+% \date{v\ltlabmathtoolsversion\ \ltlabmathtoolsdate}
 % \maketitle
 %
 % \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
@@ -117,7 +119,7 @@
 %    \end{macrocode}
 % Stop tagging when measuring:
 %    \begin{macrocode}
-          \ifmeasuring@\tag_stop:\fi          
+          \ifmeasuring@\tag_suspend:n{\measuring}\fi          
           \normalbaselines
             \ifdim
               \ifdim\@totalleftmargin=\z@
@@ -156,7 +158,7 @@
       \noalign{%
         \penalty\postdisplaypenalty\vskip\abovedisplayshortskip
         \vbox{%
-          \ifmeasuring@\tag_stop:\fi    
+          \ifmeasuring@\tag_suspend:n{\measuring}\fi    
           \normalbaselines
           \MH_if_dim:w
             \MH_if_dim:w \@totalleftmargin=\z@
@@ -185,7 +187,7 @@
        \vskip\normallineskiplimit
        \vskip\l_MT_above_shortintertext_sep
        \vbox{%
-       \ifmeasuring@\tag_stop:\fi    
+       \ifmeasuring@\tag_suspend:n{\measuring}\fi    
        \normalbaselines
          \MH_if_dim:w
            \MH_if_dim:w \@totalleftmargin=\z@

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-minipage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-minipage.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-minipage.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -18,8 +18,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabminipagedate{2024-08-08}
-\def\ltlabminipageversion{0.81d}
+\def\ltlabminipagedate{2024-09-18}
+\def\ltlabminipageversion{0.81e}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -156,9 +156,9 @@
 %    As the parbox command is called, we must prevent that it adds its
 %    additional tagging commands:
 %    \begin{macrocode}
-  \tag_stop:n{minipage}
+  \tag_suspend:n{minipage}
   \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}%
-  \tag_start:n{minipage}
+  \tag_resume:n{minipage}
   \UseTaggingSocket{minipage/after} %new end ...
   }
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabsecdate{2024-07-05}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
 %<*driver>
 \documentclass[kernel]{l3doc}
 \EnableCrossrefs
@@ -198,28 +198,31 @@
 % We  must ensure that manual targets (e.g. in unnumbered sections)
 % correctly update \cs{@currentHref}. For this we extend the kernel definition of
 % \cs{MakeLinkTarget} 
-% 
+% TODO: remove after release 2024/11
 %    \begin{macrocode}
 %<*kernelchange>
 \ExplSyntaxOn
-\int_new:N\g__kernel_target_int
-\RenewDocumentCommand\MakeLinkTarget{sO{}m}
- {%
-  \ifvmode
-    \special{}%
-  \else
-    \@savsf\spacefactor
-    \smash{}%
-    \spacefactor\@savsf
-  \fi
-  \IfBooleanTF {#1}
-   {
-     \tl_gset:Ne \@currentHref {#3}
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
+ {
+  \int_new:N\g__kernel_target_int
+  \RenewDocumentCommand\MakeLinkTarget{sO{}m}
+   {%
+    \ifvmode
+      \special{}%
+    \else
+      \@savsf\spacefactor
+      \smash{}%
+      \spacefactor\@savsf
+    \fi
+    \IfBooleanTF {#1}
+     {
+       \tl_gset:Ne \@currentHref {#3}
+     }
+     {
+       \int_gincr:N\g__kernel_target_int
+       \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+     }  
    }
-   {
-     \int_gincr:N\g__kernel_target_int
-     \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
-   }  
  }
 \ExplSyntaxOff 
 %</kernelchange> 
@@ -227,33 +230,43 @@
 %
 %    \begin{macrocode}
 %<*package>
+%<@@=tag>
 %    \end{macrocode}
 % \subsubsection{Tagging commands}
 %
 %
-% \begin{variable}{\g__tag_sec_stack_seq}
-% The stack holds the tag and the level.
+% \begin{variable}{\g_@@_sec_stack_seq}
+% The stack holds the tag, the level and the structure number.
 %    \begin{macrocode}
-\seq_new:N   \g__tag_sec_stack_seq
-\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}}
+\seq_new:N   \g_@@_sec_stack_seq
+\seq_gpush:Nn\g_@@_sec_stack_seq {{Document}{-100}{2}}
 %    \end{macrocode}
 % \end{variable}
 % 
-% \begin{variable}{\l__tag_sec_Sect_bool}
+% \begin{macro}{\@@_get_data_current_Sect:}
+% This allows to retrieve the number of the current Sect structure (or
+% Document if we are outside any Sect) with |\tag_get:n{current_Sect}|
+%    \begin{macrocode}
+\cs_new:Npn \@@_get_data_current_Sect:
+ {
+   \exp_last_unbraced:Ne\use_iii:nnn{\seq_item:Nn\g_@@_sec_stack_seq{1}}
+ }
+%    \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_sec_Sect_bool}
 % This boolean controls if a Sect structure is opened. 
 %    \begin{macrocode}
-\bool_new:N     \l__tag_sec_Sect_bool
-\bool_set_true:N\l__tag_sec_Sect_bool
+\bool_new:N     \l_@@_sec_Sect_bool
+\bool_set_true:N\l_@@_sec_Sect_bool
 %    \end{macrocode}
 % \end{variable}
- 
-% 
-% \begin{macro}{\__tag_sec_begin:nn}
+%
+% \begin{macro}{\@@_sec_begin:nn}
 % This starts a sectioning structure. 
 % Currently the tag is fix, either Sect or Part, depending on the level,
 % but this will perhaps change. The second argument is currently unused.
 %    \begin{macrocode}
-\cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval
+\cs_new_protected:Npn\@@_sec_begin:nn #1 #2 %#1 level #2 keyval
   {
     \tag_struct_begin:n 
       {
@@ -260,12 +273,13 @@
          tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}}
         ,#2
       } 
-    \seq_gpush:Ne \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}}    
+    \seq_gpush:Ne \g_@@_sec_stack_seq 
+      {{\g_@@_struct_tag_tl}{\int_eval:n{#1}}{\g_@@_struct_stack_current_tl}}    
   }
 %    \end{macrocode}
 % \end{macro}
 % 
-% \begin{macro}{\__tag_sec_end:n}
+% \begin{macro}{\@@_sec_end:n}
 %    \begin{macrocode}
 \msg_new:nnn { tag } {wrong-sect-nesting}
   {
@@ -273,25 +287,25 @@
     It~is~not~equal~to~the~current~structure~#2~on~the~main~stack
   }
 
-\cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level
+\cs_new_protected:Npn\@@_sec_end:n #1 % #1 level
   {
-    \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
-    \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1}
+    \seq_get:NN \g_@@_sec_stack_seq \l_@@_tmpa_tl
+    \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nnn\l_@@_tmpa_tl+1}
       {
-        \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl
+        \seq_get:NN\g_@@_struct_tag_stack_seq \l_@@_tmpb_tl
         \exp_args:Nee
           \tl_if_eq:nnTF 
-            {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl}
-            {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl}
+            {\exp_last_unbraced:NV\use_i:nnn\l_@@_tmpa_tl}
+            {\exp_last_unbraced:NV\use_i:nn\l_@@_tmpb_tl}
             {
-              \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
+              \seq_gpop:NN \g_@@_sec_stack_seq \l_@@_tmpa_tl
               \tag_struct_end:
-              \__tag_sec_end:n {#1}        
+              \@@_sec_end:n {#1}        
             }
             { 
               \msg_warning:nnee {tag}{wrong-sect-nesting}
-               { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl }
-               { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl } 
+               { \exp_last_unbraced:NV\use_i:nnn \l_@@_tmpa_tl }
+               { \exp_last_unbraced:NV\use_i:nn \l_@@_tmpb_tl } 
             }
       }  
   } 
@@ -298,40 +312,40 @@
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{\__tag_tool_para_split:}
+% \begin{macro}{\@@_tool_para_split:}
 % Runin-sectioning command must separate the heading from the following text. 
 % 
 %    \begin{macrocode}
-\cs_new_protected:Npn \__tag_tool_para_split:
+\cs_new_protected:Npn \@@_tool_para_split:
   {
     \tag_mc_end:
     \tag_struct_end:        
-    \tag_struct_begin:n{tag=\l__tag_para_tag_default_tl}
+    \tag_struct_begin:n{tag=\l_@@_para_tag_default_tl}
     \tag_mc_begin:n{}
-    \__tag_setup_restore_para_default:
+    \@@_setup_restore_para_default:
   }
 %    \end{macrocode}
 % \end{macro}
 
-% \begin{macro}{\__tag_setup_restore_para_default:}
+% \begin{macro}{\@@_setup_restore_para_default:}
 % We change the para tagging in the sectioning code.
 % This here restores the default. Currently it only resets the 
 % the tag, but perhaps more will be needed later. 
 %    \begin{macrocode}
-\cs_new_protected:Npn \__tag_setup_restore_para_default:
+\cs_new_protected:Npn \@@_setup_restore_para_default:
   {
-    \tl_set:Nn \l__tag_para_main_tag_tl {text-unit}
-    \tl_set_eq:NN\l__tag_para_tag_tl\l__tag_para_tag_default_tl
+    \tl_set:Nn \l_@@_para_main_tag_tl {text-unit}
+    \tl_set_eq:NN\l_@@_para_tag_tl\l_@@_para_tag_default_tl
   }
 %    \end{macrocode}
 % \end{macro}
 % 
-% \begin{macro}{\__tag_sec_end_display:}
+% \begin{macro}{\@@_sec_end_display:}
 %    \begin{macrocode}
-\cs_new_protected:Npn \__tag_sec_end_display:
+\cs_new_protected:Npn \@@_sec_end_display:
   {
     \tag_struct_end: %P = Hn
-    \__tag_setup_restore_para_default:
+    \@@_setup_restore_para_default:
   }
 %    \end{macrocode}
 % \end{macro}
@@ -339,7 +353,7 @@
 % Open sec structures should be closed at the end of the document. This should
 % be done before tagpdf closes the Document structure.
 %    \begin{macrocode}
-\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\__tag_sec_end:n{-10}}
+\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\@@_sec_end:n{-10}}
 \hook_gset_rule:nnnn {tagpdf/finish/before}{tagpdf/sec}{before}{tagpdf}  
 %    \end{macrocode}
 %
@@ -346,10 +360,10 @@
 % The commands \cs{mainmatter}, \cs{backmatter}, \cs{frontmatter} and
 % \cs{appendix} close all \texttt{Sect} and \texttt{Part} structures.
 %    \begin{macrocode}
-\AddToHook{cmd/frontmatter/before}{\__tag_sec_end:n{-10}}
-\AddToHook{cmd/mainmatter/before} {\__tag_sec_end:n{-10}}
-\AddToHook{cmd/backmatter/before} {\__tag_sec_end:n{-10}}
-\AddToHook{cmd/appendix/before}   {\__tag_sec_end:n{-10}}
+\AddToHook{cmd/frontmatter/before}{\@@_sec_end:n{-10}}
+\AddToHook{cmd/mainmatter/before} {\@@_sec_end:n{-10}}
+\AddToHook{cmd/backmatter/before} {\@@_sec_end:n{-10}}
+\AddToHook{cmd/appendix/before}   {\@@_sec_end:n{-10}}
 %    \end{macrocode}
 %
 % \subsection{Tagging tools}
@@ -368,10 +382,10 @@
   {
     ,sec-start-part .code:n = 
       {
-        \bool_if:NT\l__tag_sec_Sect_bool
+        \bool_if:NT\l_@@_sec_Sect_bool
           {
-            \__tag_sec_end:n   {-1} 
-            \__tag_sec_begin:nn{-1}{tag=Part}
+            \@@_sec_end:n   {-1} 
+            \@@_sec_begin:nn{-1}{tag=Part}
           }  
          \tag_struct_begin:n{tag=part,title=#1}
 %    \end{macrocode}
@@ -382,43 +396,43 @@
 % all slightly different in the standard classes. So this is delayed 
 % to the time when sectioning commands are redefined with templates.
 %    \begin{macrocode}
-         \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct}
-         \tl_set:Nn\l__tag_para_tag_tl {Span}
+         \tl_set:Nn\l_@@_para_main_tag_tl {NonStruct}
+         \tl_set:Nn\l_@@_para_tag_tl {Span}
       }
-    ,sec-stop-part .code:n = {\__tag_sec_end_display:}
+    ,sec-stop-part .code:n = {\@@_sec_end_display:}
     ,sec-start-chapter .code:n =
      {
-       \bool_if:NT\l__tag_sec_Sect_bool
+       \bool_if:NT\l_@@_sec_Sect_bool
          {
-           \__tag_sec_end:n   {0} 
-           \__tag_sec_begin:nn{0}{tag=Sect}
+           \@@_sec_end:n   {0} 
+           \@@_sec_begin:nn{0}{tag=Sect}
          }  
         \tag_struct_begin:n{tag=chapter,title=#1}
 %    \end{macrocode}
 % similar to part we remap to NonStruct for now ...
 %    \begin{macrocode}
-        \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct}
-        \tl_set:Nn\l__tag_para_tag_tl {Span}
+        \tl_set:Nn\l_@@_para_main_tag_tl {NonStruct}
+        \tl_set:Nn\l_@@_para_tag_tl {Span}
      }
     ,sec-stop-chapter .meta:n = { sec-stop-part}  
     ,sec-start .code:n = % #1 is a name like "section" 
       {        
-        \bool_if:NT\l__tag_sec_Sect_bool
+        \bool_if:NT\l_@@_sec_Sect_bool
           {       
-            \__tag_sec_end:n    {\cs_if_exist_use:c{toclevel@#1}+0} 
-            \__tag_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect}
+            \@@_sec_end:n    {\cs_if_exist_use:c{toclevel@#1}+0} 
+            \@@_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect}
           }  
-        \tl_set:Nn\l__tag_para_tag_tl{#1}
+        \tl_set:Nn\l_@@_para_tag_tl{#1}
       } 
     ,sec-start .value_required:n = true     
-    ,sec-split-para .code:n = {\__tag_tool_para_split:}
-    ,restore-para .code:n = {\__tag_setup_restore_para_default:}
+    ,sec-split-para .code:n = {\@@_tool_para_split:}
+    ,restore-para .code:n = {\@@_setup_restore_para_default:}
     ,sec-stop .code:n = 
       {
-        \par\__tag_sec_end:n   {\cs_if_exist_use:c{toclevel@#1}+0}
+        \par\@@_sec_end:n   {\cs_if_exist_use:c{toclevel@#1}+0}
       }
     ,sec-stop .value_required:n = true  
-    ,sec-add-grouping .bool_set:N = \l__tag_sec_Sect_bool
+    ,sec-add-grouping .bool_set:N = \l_@@_sec_Sect_bool
   } 
 %    \end{macrocode}
 %
@@ -433,6 +447,7 @@
 % The tagging inside relies on the para tagging.
 % We do not yet use keyval in the optional argument, as this requires latex-dev
 % and the naming of the keys and their key family is unclear.
+% \changes{v0.84f}{2024/10/04}{Added braces around optional arg (tagging/725)}
 %    \begin{macrocode}
 \AddToHook{class/after}
  {
@@ -476,7 +491,7 @@
           \IfBooleanTF 
             {#1}
             { \@spart {#3} }
-            { \@part [#2]{#3} }
+            { \@part [{#2}]{#3} }
 %    \end{macrocode}
 % and now the closing command for the tagging of the title.
 %    \begin{macrocode}
@@ -528,7 +543,7 @@
         \IfBooleanTF 
           {#1}
           { \@schapter {#3} }
-          { \@chapter [#2]{#3} }
+          { \@chapter [{#2}]{#3} }
 %    \end{macrocode}
 % and now the closing command for the tagging of the title.
 %    \begin{macrocode}          
@@ -583,7 +598,7 @@
         \IfBooleanTF 
           {#1}
           { \@spart {#3} }
-          { \@part [#2]{#3} }
+          { \@part [{#2}]{#3} }
 %    \end{macrocode}
 % and now the closing command for the tagging of the title.
 %    \begin{macrocode}          
@@ -669,8 +684,8 @@
 %    \begin{macrocode}
 \cs_new_protected:Npn \@kernel at tag@hangfrom #1
   {
-     \tagstructbegin{tag=\l__tag_para_tag_tl}
-     \cs_if_exist_use:N \__tag_gincr_para_begin_int:
+     \tagstructbegin{tag=\l_@@_para_tag_tl}
+     \cs_if_exist_use:N \@@_gincr_para_begin_int:
      \tagstructbegin{tag=Lbl}
      \setbox\@tempboxa
        \hbox
@@ -680,7 +695,7 @@
 %    \begin{macrocode}
            \bool_lazy_and:nnT
             {\tag_if_active_p:}
-            {\g__tag_mode_lua_bool}
+            {\g_@@_mode_lua_bool}
             {\tagmcbegin{tag=Lbl}}
            {#1}
          }
@@ -689,12 +704,12 @@
 % the paratagging. We do not disable paratagging completely, to 
 % avoid that the numbering goes wrong.
 %    \begin{macrocode}
-   \tag_stop:n{hangfrom}
+   \tag_suspend:n{hangfrom}
    \hangindent \wd\@tempboxa\noindent
 %    \end{macrocode}
 % Restart tagging and insert the box.
 %    \begin{macrocode}
-   \tag_start:n{hangfrom}
+   \tag_resume:n{hangfrom}
    \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}}
 %    \end{macrocode}
 % This command is used to tag the numbers of runin. We do not try
@@ -715,6 +730,7 @@
 % \cs{@sect} is only changed to replace the hyperref patches
 % and to use the new \cs{@kernel at tag@hangfrom} and \cs{@kernel at tag@svsec}
 %    \begin{macrocode}
+%<@@=>
 \def\@sect#1#2#3#4#5#6[#7]#8{%  
   \ifnum #2>\c at secnumdepth
     \def\@svsec{\@hyp at section@target at nnn{[section]}{}{#3}}
@@ -727,7 +743,7 @@
   \@tempskipa #5\relax
   \ifdim \@tempskipa>\z@
     \begingroup
-    \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool
+    \tagtool{para-flattened=true} % or \bool_set_true\l_@@_para_flattened_bool
       #6{%
          \ifnum #2>\c at secnumdepth
           \@hangfrom {\hskip #3\relax\@svsec}%

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-table.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-table.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-table.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabtbldate{2024-08-10}
-\def\ltlabtblversion{0.85m}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -1425,9 +1425,9 @@
       }
     \hbox to\z@{\hss\parbox[t]\LTcapwidth{%
     \reset at font
-    \tag_stop:n{caption}
+    \tag_suspend:n{caption}
     \sbox\@tempboxa{#1{#2:~}#3}%
-    \tag_start:n{caption}
+    \tag_resume:n{caption}
     \ifdim\wd\@tempboxa>\hsize
       #1{#2:~}#3%
     \else

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabtextdate{2023-07-20}
-\def\ltlabtextversion{0.85a}
+\def\ltlabtextdate{2024-09-18}
+\def\ltlabtextversion{0.85b}
 
 %<*driver>
 \documentclass{l3doc}
@@ -78,11 +78,11 @@
     \tag_mc_end_push:
     \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
     \tag_mc_begin:n{}
-    \tag_stop:n{LaTeX}
+    \tag_suspend:n{LaTeX}
   }
 \AddToHook{cmd/LaTeX/after}
  { 
-   \tag_start:n{LaTeX}
+   \tag_resume:n{LaTeX}
    \tag_mc_end:
    \tag_struct_end:
    \tag_mc_begin_pop:n{}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -73,67 +73,14 @@
 %    \end{macrocode}
 %
 % \subsection{Providing the counter representation \cs{theHxx} generally}
-% [kernel?]
-%
-% The \cs{theHxx} representation allows to create a unique representation of a counter
-% that is for example used to create destination names. It will also be needed
-% to add |/Ref| keys to various tagging structures. It makes therefore sense
-% to provide it by default as soon as a counter is created. The |\@addtoreset| change
-% (taken also from hyperref) tries to ensure the counter stays unique if it is reset.
-%
-% At first we suppress the patches from hyperref:
+% 
+% This has been moved to base.
+% 
+% We still suppress the patches from hyperref:
 %    \begin{macrocode}
 \def\hyper at nopatch@counter{}
 %    \end{macrocode}
-%
-%    \begin{macrocode}
-\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
-     \setcounter{#1}\z@
-     \global\expandafter\let\csname cl@#1\endcsname\@empty
-     \@addtoreset{#1}{@ckpt}%
-     \global\expandafter\let\csname p@#1\endcsname\@empty
-     \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%new
-     \expandafter
-     \gdef\csname the#1\expandafter\endcsname\expandafter
-          {\expandafter\@arabic\csname c@#1\endcsname}}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
-  \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
-}
-%    \end{macrocode}
-% The following counters are defined in the kernel
-%    \begin{macrocode}
-\gdef\theHenumi{\the\value{enumi}}
-\gdef\theHenumii{\the\value{enumii}}
-\gdef\theHenumiii{\the\value{enumiii}}
-\gdef\theHenumiv{\the\value{enumiv}}
-\gdef\theHequation{\the\value{equation}}
-\gdef\theHfootnote{\the\value{footnote}}
-\gdef\theHmpfootnote{\the\value{mpfootnote}}
-%    \end{macrocode}
-%
-% \subsection{Providing and updating \cs{@currentHref}}
-% [kernel?]
-%
-%  \cs{@currentHref} contains the current unique representation of a counter.
-%  It is useful also without hyperref as it allows to connect with a |/Ref|
-%  key a toc entry with the heading it refers too. So \cs{refstepcounter}
-%  is extended to update the command. This is done at the begin so that the
-%  hyperref code can still adapt it later (using the cmd/refstepcounter/after hook
-%  would be too late, and could also break with cleverref.)
-%
-%  We also provide a kernel version that hyperref doesn't touch and so will never
-%  set a target.
-%    \begin{macrocode}
-\def\@currentHref{}
-\def\refstepcounter#1{\stepcounter{#1}%
-    \edef\@currentcounter{#1}%
-    \xdef\@currentHref {#1.\csname theH#1\endcsname}%
-    \protected at edef\@currentlabel
-       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
-}
-\let\@kernel at refstepcounter\refstepcounter
-%    \end{macrocode}
-%
+
 % \subsection{Assigning the headings level numbers}
 % [kernel?]
 %
@@ -165,17 +112,21 @@
 % catch as much as possible, see also tagging issue \#20. This should work also
 % without hyperref. The property is defined in tagpdf-base, so the code would 
 % work also without tagging but we add a test anyway, this is probably faster.
+% TODO: remove 
 %    \begin{macrocode}
 \ExplSyntaxOn
-\AddToHookWithArguments{cmd/MakeLinkTarget/after}
-  {
-    \tag_if_active:T
-      {    
-        \tl_if_blank:VF \@currentHref
-          {
-            \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
-          }
-      }    
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_str }
+ {
+  \AddToHookWithArguments{cmd/MakeLinkTarget/after}
+    {
+      \tag_if_active:T
+        {    
+          \tl_if_blank:VF \@currentHref
+            {
+              \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+            }
+        }    
+    }
   }
 \ExplSyntaxOff  
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -16,8 +16,8 @@
 %
 % for those people who are interested or want to report an issue.
 %
-\def\ltlabtocdate{2024-07-11}
-\def\ltlabtocversion{0.85c}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
 %<*driver>
 \documentclass{l3doc}
 \EnableCrossrefs
@@ -114,66 +114,32 @@
 % Defined by tagpdf.
 % \end{variable}
 %
-% \cs{refstepcounter} doesn't use \cs{MakeLinkTarget} (yet) so
-% we have to patch it too to store the relation between
-% destination names/\cs{@currentHref} and structure numbers
+% We have to to store the relation between
+% destination names/\cs{@currentHref} and structure numbers.
+% With a current kernel this is done in \cs{refstepcounter} 
+% through the |recordtarget| socket. If that doesn't exist yet
+% we patch:
 %
-% The property is set up in tagpdf-test so that one
-% doesn't has to check if the prop exists or not.
+% TODO remove after release 2024/11
 %    \begin{macrocode}
-\AddToHook{cmd/refstepcounter/after}
- {
-   \tl_if_blank:VF \@currentHref
-    {
-      \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}      
-    }
- }
-\AddToHook{cmd/H at refstepcounter/after}
- {
-   \tl_if_blank:VF \@currentHref
-    {
-      \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
-    }
- }
-%    \end{macrocode}
-% \begin{variable}{\g_@@_struct_ref_by_dest_prop}
-% This variable contains structures whose Ref key should be updated
-% at the end to point to structured related with this destination.
-% As this is probably need in other places too, it is not only a toc-variable.
-% Moved into tagpdf!
-% \end{variable}
-%
-% \begin{macro}{\g_@@_struct_ref_by_dest:}
-%  This command is executed and update the Ref keys
-%  of the structures listed in |\g_@@_struct_ref_by_dest_prop|.
-%  It is currently only relevant for the |TOCI|. But other structures
-%  could need that later too.
-%  The command is executed in the |tagpdf/finish/before| hook.
-%    \begin{macrocode}
-\msg_new:nnn { tag } {struct-dest-unknown}
- {
-   Destination~#1~has~no~related~structure.\\
-   /Ref~for~structure~#2~not~updated
- }
-
-\cs_new_protected:Npn \g_@@_struct_ref_by_dest:
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
   {
-    \prop_map_inline:Nn\g_@@_struct_ref_by_dest_prop
-      {
-        \prop_get:NnNTF \g_@@_struct_dest_num_prop {##2} \l_@@_tmpa_tl
-          {
-            \@@_struct_gput_data_ref:ee
-              { ##1 }
-              { \tag_struct_object_ref:e{ \l_@@_tmpa_tl }}
-          }
-          {
-            \msg_warning:nnnn {tag}{struct-dest-unknown}{##2}{ ##1}
-          }
-      }
-  }
-\hook_gput_code:nnn {tagpdf/finish/before}{tagpdf/struct/Ref}{\g_@@_struct_ref_by_dest:}
+    \AddToHook{cmd/refstepcounter/after}
+     {
+       \tl_if_blank:VF \@currentHref
+        {
+          \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}      
+        }
+     }
+    \AddToHook{cmd/H at refstepcounter/after}
+     {
+       \tl_if_blank:VF \@currentHref
+        {
+          \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+        }
+     }
+   }  
 %    \end{macrocode}
-% \end{macro}
 %
 % \section{Toc code}
 % \begin{variable}{\g_@@_toc_level_int,\g_@@_toc_stack_seq}
@@ -308,17 +274,17 @@
 %    \begin{macrocode}
           \group_begin:
            \text_declare_expand_equivalent:Nn \numberline \use_none:n
-           \exp_args:Ne \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
+           \exp_args:Ne 
+           \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}           
 %    \end{macrocode}
-% The TOCI structure should get a /Ref, so we put a request with its destination
-% name into the prop.
+% The TOCI structure should get a /Ref, we use a destination
+% to retrieve it.
 % \begin{NOTE}{UF}
 % This only works with hyperref currently. Without hyperref we
 % need to store fake names.
 % \end{NOTE}
 %    \begin{macrocode}
-           \prop_gput:Nee \g_@@_struct_ref_by_dest_prop
-             { \tag_get:n {struct_num} }{#4}
+           \tag_struct_gput:nnn { \tag_get:n {struct_num} }{ref_dest}{#4}
            \seq_gpush:Ne \g_@@_toc_stack_seq {{TOCI}\use:c{toclevel@#1}}
           \group_end:
        }

Modified: trunk/Master/texmf-dist/source/latex-dev/tools/array.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/array.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/array.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -39,7 +39,7 @@
 %    \begin{macrocode}
 %<+package>\NeedsTeXFormat{LaTeX2e}[2024/06/01]
 %<+package>\ProvidesPackage{array}
-%<+package>         [2024/07/13 v2.6e Tabular extension package (FMi)]
+%<+package>         [2024/10/12 v2.6g Tabular extension package (FMi)]
 %
 % \fi
 %
@@ -1373,6 +1373,7 @@
 % \begin{macro}{\insert at column}
 % \begin{macro}{\@sharp}
 % \begin{macro}{\textonly at unskip}
+% \begin{macro}{\@protected at firstofone}
 %    We now define the macro =\insert at column= which will do
 %    this work for us.
 %    \begin{macrocode}
@@ -1387,8 +1388,35 @@
 %    \end{macrocode}
 %    Here, we assume that the \textsf{count} register
 %    =\@tempcnta= has saved the value $=\count@= - 1$.
+%
+%    To keep \TeX{} happy if there is a look ahead in the tabular preamble
+%    which uses the Appendix~D trick (for example anything with a trailing
+%    optional argument defined by \pkg{ltcmd}), we wrap everything here in
+%    a protected version of \cs{@firstofone}.\footnote{The reason this
+%    works is not really clear: almost certainly there is a bug in \TeX{}
+%    here that we are simply avoiding, but as the master counter doesn't
+%    show up in a trace, a full understanding likely means working through
+%    the code that implements \cs{halign}!}
+%    \TeX{} otherwise can get
+%    confused about the value of the master counter, and we get some
+%    strange errors. (Quite possibly the underlying issue is a \TeX{}
+%    bug, but rather than try to fix in 2024 we accept it's there and
+%    work-around.) As an example, without this approach, something
+%    like
+%    \begin{verbatim}
+%\NewDocumentCommand\foo{o}{x}
+%\begin{tabular}{>{\foo}l}
+%  Foo 
+%\end{tabular}
+%    \end{verbatim}
+%    will fail; that can be fixed by adding a \cs{relax} after the \cs{@tempcnta},
+%    but that then leads to issues if you are collecting whole cells (tagging code
+%    or \\pkg{collcell}), where you can no longer alter the meaning of \cs{cr}
+%    as the master counter goes wrong.
+% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)}
+% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)}
 %    \begin{macrocode}
-   \the at toks \the \@tempcnta
+   \@protected at firstofone { \the at toks \the \@tempcnta \ignorespaces }
 %    \end{macrocode}
 %    Next follows the =#= sign which specifies the place
 %    where the text of the column shall be inserted. To avoid
@@ -1396,14 +1424,16 @@
 %    =\@addtopreamble= we hide this sign in the command
 %    =\@sharp= which is temporarily occupied with
 %    =\relax= during the build-up of the preamble.
-%    To remove unwanted spaces before and after the column text, we set
-%    an =\ignorespaces=  in front and a =\unskip= afterwards.
+%    To remove unwanted spaces before and after the column in text mode,
+%    we set an =\ignorespaces=  in front (see above) and a =\unskip=
+%    afterwards; in math mode, the latter is suppressed while the
+%    \cs{ignorespaces} makes no difference.
 % \changes{v2.0e}{1991/02/07}{Added \{\} around \cs{@sharp} for new ftsel}
 % \changes{v2.0h}{1992/06/22}{Removed \{\} again in favour of
 %                             \cs{d at llarbegin}}
 % \changes{v2.6b}{2024/04/08}{Do not \cs{unskip} if in math mode (gh/1323)}
 %    \begin{macrocode}
-   \ignorespaces \@sharp \textonly at unskip
+   \@sharp \textonly at unskip
 %    \end{macrocode}
 %    Then the second \textsf{token} register follows whose number should
 %    be saved in =\count@=.
@@ -1428,11 +1458,16 @@
 %    \begin{macrocode}
 \protected\def\textonly at unskip{\ifhmode\unskip\fi}
 %    \end{macrocode}
+% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)}
+%  We need an engine-protected function that is just \cs{@firstofone}:
+%    \begin{macrocode}
+\protected\long\def\@protected at firstofone#1{#1}
+%    \end{macrocode}
 % \end{macro}
 % \end{macro}
 % \end{macro}
+% \end{macro}
 %
-%
 %  \begin{macro}{\insert at pcolumn}
 %    Handling pcolumn-cells needs slightly different handling when
 %    doing tagging.  Rather than changing the plugs in
@@ -1442,7 +1477,10 @@
 %    \begin{macrocode}
 \def\insert at pcolumn{%
    \UseTaggingSocket{tbl/pcell/begin}%
-   \the at toks \the \@tempcnta
+%    \end{macrocode}
+% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)}
+%    \begin{macrocode}
+   \the at toks \the \@tempcnta \relax
    \ignorespaces \@sharp \unskip
    \the at toks \the \count@ \relax
    \UseTaggingSocket{tbl/pcell/end}%

Modified: trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -98,7 +98,7 @@
 %<driver> \ProvidesFile{multicol.drv}
 % \fi
 %         \ProvidesFile{multicol.dtx}
-          [2024/07/01 v1.9h  multicolumn formatting (FMi)]
+          [2024/09/14 v1.9i  multicolumn formatting (FMi)]
 %
 %
 %
@@ -3630,12 +3630,22 @@
 % \changes{v1.6g}{2006/02/23}{Added \cs{@minipagefalse}}
 % \changes{v1.6h}{2008/12/05}{Use \cs{@endfloatbox} to better support
 %   the modifications done by the float package}
+% \changes{v1.9i}{2024/09/14}{Added tagging support}   
 %    Even if this should be used as a hook we use a |@| in the
 %    name since it is more for experts.
+%  For now we test if the socket is already defined
 %    \begin{macrocode}
+\ExplSyntaxOn
+\str_if_exist:cF { l__socket_tagsupport/float/end_plug_str }
+  {
+    \NewSocket{tagsupport/float/end}{0}
+    \NewSocket{tagsupport/float/hmode/end}{0}
+  }
+\ExplSyntaxOff  
 \def\set at floatcmds{%
  \let\@dblfloat\@dbflt
  \def\end at dblfloat{\@endfloatbox
+   \UseTaggingSocket{float/end}%
    \@largefloatcheck
    \outer at nobreak
 %    \end{macrocode}
@@ -3657,6 +3667,7 @@
    \fi
    \ifnum\@floatpenalty=-\@Mii
      \@Esphack
+     \UseTaggingSocket{float/hmode/end}%
    \fi}}
 %    \end{macrocode}
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex-dev/tools/tools.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/tools.ins	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/tools.ins	2024-10-14 19:13:47 UTC (rev 72549)
@@ -195,7 +195,9 @@
   \file{r.tex}{\from{fileerr.dtx}{run}}
   \file{x.tex}{\from{fileerr.dtx}{exit}}}
 
+\generate{\file{rename-to-empty-base.tex}{\from{fileerr.dtx}{return}}}
 
+
 \Msg{***********************************************************}
 \Msg{*}
 \Msg{* To finish the installation you have to move the following}
@@ -202,8 +204,9 @@
 \Msg{* files into a directory searched by TeX:}
 \Msg{*}
 \Msg{* All the files with extension `.sty' and `.tex'}
-\Msg{* Note there also may be a file .tex which is `invisible'}
-\Msg{* on some operating systems.}
+\Msg{* TeX may be blocked from writing a file called `.tex',}
+\Msg{* so generated a file with name `rename-to-empty-base.tex'.}
+\Msg{* Rename that file to `.tex' after the docstrip generation.}
 \Msg{*}
 \Msg{* To produce the documentation run the .dtx files through LaTeX.}
 \Msg{*}
@@ -211,14 +214,4 @@
 \Msg{***********************************************************}
 
 
-\Msg{}
-\Msg{* Finally trying to make a file `.tex'.}
-\Msg{* (Placed at the end of this run, as this}
-\Msg{*  may fail on some operating systems.)}
-
-\let\oldopenout\openout
-\def\openout{\batchmode\immediate\oldopenout}
-
-\generate{\file{.tex}{\from{fileerr.dtx}{return}}}
-
 \endbatchfile

Modified: trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/amsmath/amsmath.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -26,7 +26,7 @@
 \DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
 \DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
 \DeclareCurrentRelease{}{2019-04-01}
-\ProvidesPackage{amsmath}[2024/05/23 v2.17q AMS math features]
+\ProvidesPackage{amsmath}[2024/08/11 v2.17r AMS math features]
 \edef\@temp{\catcode 96=\number\catcode 96 }
 \catcode\string `\`=12
 \def\do#1{\catcode\number`#1=\number\catcode`#1}
@@ -486,6 +486,9 @@
  \uppercase{\gdef\striplong@#1#2#3\relax{%
   \ifx9#2 \@xp\@xp\@xp\zap at to@space\fi}}}
 \def\zap at to@space#1 {}
+{\uccode`9=`\p %
+  \uppercase{\gdef\stripprotected@#1#2#3\relax{%
+      \ifx9#2 \@xp\@xp\@xp\zap at to@space\fi}}}
 \def\keybin@{\gtest at true
  \ifx\@let at token+\else\ifx\@let at token=\else
  \ifx\@let at token<\else\ifx\@let at token>\else
@@ -519,8 +522,12 @@
        \ifgtest@ % if \keybin@ test
          \gdef\thedots@{\dotsb@}%
        \else
-         \xdef\meaning@{\meaning\@let at token. .........}%
+       \begingroup
+         \def\protect{\protect}% % make it a quark
+         \xdef\meaning@{\@xp\stripprotect@\@let at token.........\stripprotect at . .........}%
+       \endgroup
          \xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}%
+         \xdef\meaning@@{\@xp\stripprotected@\meaning@@\relax\meaning@@}%
          \@xp\math@\meaning@\math@
          \ifgtest@ % if \mathxxx test
            \@xp\mathch@\meaning@\mathch@
@@ -568,6 +575,9 @@
    \fi % end if comma (no else)
  \fi % end if boldsymbol (no else)
  \thedots@}
+\def\stripprotect@#1#2\stripprotect@{\ifx#1\protect
+  \meaning#2\else \meaning\@let at token \fi}
+
 \def\boldsymboldots@#1{%
   \bold at true\let\@let at token=#1\let\delayed@=#1\mdots@@
   \boldsymbol#1\bold at false}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg	2024-10-14 19:13:47 UTC (rev 72549)
@@ -37,7 +37,7 @@
 %% 
 %%%   From File: fontdef.dtx
 \ProvidesFile{fontmath.cfg}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
    (Uncustomized math font setup)
 ]
 %%

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -37,7 +37,7 @@
 %% 
 %%%   From File: fontdef.dtx
 \ProvidesFile{fontmath.ltx}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
    (Math font setup)
 ]
 \typeout{=== Don't modify this file, use a .cfg file instead ===^^J}

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg	2024-10-14 19:13:47 UTC (rev 72549)
@@ -37,7 +37,7 @@
 %% 
 %%%   From File: fontdef.dtx
 \ProvidesFile{fonttext.cfg}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
    (Uncustomized text font setup)
 ]
 %%

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -37,7 +37,7 @@
 %% 
 %%%   From File: fontdef.dtx
 \ProvidesFile{fonttext.ltx}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
    (Text font setup)
 ]
 \typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
@@ -77,6 +77,8 @@
 \endgroup
 \begingroup
 \nfss at catcodes
+\input {t1cmss.fd}
+\input {t1cmtt.fd}
 \input {ot1cmss.fd}
 \input {ot1cmtt.fd}
 \endgroup

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -710,7 +710,7 @@
 \def\fmtname{LaTeX2e}
 \edef\fmtversion
    {2024-11-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{%
@@ -4864,17 +4864,19 @@
           }
       }
   }
-\cs_new:Npn \__hook_parse_label_default:n #1
+\cs_new:Npn \__hook_parse_label_default:nN #1#2
   {
     \tl_if_novalue:nTF {#1}
       { \__hook_currname_or_default: }
-      { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:n }
+      { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nN #2 }
   }
-\cs_new:Npn \__hook_parse_dot_label:n #1
+\cs_new:Npn \__hook_parse_dot_label:nN #1#2
   {
     \tl_if_empty:nTF {#1}
       {
-        \msg_expandable_error:nn { hooks } { empty-label }
+        \bool_if:NTF #2
+          { \msg_expandable_error:nn { hooks } { empty-label } }
+          { \msg_expandable_error:nn { hooks } { empty-hook } }
         \__hook_currname_or_default:
       }
       {
@@ -4929,14 +4931,14 @@
 \cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2
   {
     \__hook_normalize_hook_args_aux:Nn #1
-      { { \__hook_parse_label_default:n {#2} } }
+      { { \__hook_parse_label_default:nN {#2} \c_false_bool } }
   }
 \cs_new_protected:Npn \__hook_normalize_hook_args:Nnn #1 #2 #3
   {
     \__hook_normalize_hook_args_aux:Nn #1
       {
-        { \__hook_parse_label_default:n {#2} }
-        { \__hook_parse_label_default:n {#3} }
+        { \__hook_parse_label_default:nN {#2} \c_false_bool }
+        { \__hook_parse_label_default:nN {#3} \c_true_bool }
       }
   }
 \cs_new_protected:Npn \__hook_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5
@@ -4943,10 +4945,10 @@
   {
     \__hook_normalize_hook_args_aux:Nn #1
       {
-        { \__hook_parse_label_default:n {#2} }
-        { \__hook_parse_label_default:n {#3} }
+        { \__hook_parse_label_default:nN {#2} \c_false_bool }
+        { \__hook_parse_label_default:nN {#3} \c_true_bool }
         { \tl_trim_spaces:n {#4} }
-        { \__hook_parse_label_default:n {#5} }
+        { \__hook_parse_label_default:nN {#5} \c_true_bool }
       }
   }
 \tl_gset:Nn \g__hook_hook_curr_name_tl { top-level }
@@ -6242,6 +6244,10 @@
     Empty~code~label~\msg_line_context:.~
     Using~'\__hook_currname_or_default:'~instead.
   }
+\msg_new:nnn { hooks } { empty-hook }
+  {
+    Empty~hook~name~\msg_line_context:.
+  }
 \msg_new:nnn { hooks } { no-default-label }
   {
     Missing~(empty)~default~label~\msg_line_context:. \\
@@ -7912,23 +7918,33 @@
   }
 \cs_new_protected:Npn \__template_assign_variable:
   {
-    \__template_assign_variable:c
+    \exp_args:Ne \__template_assign_variable:n
       {
-        \__template_map_var_type: _
-        \bool_if:NT \l__template_global_bool { g } set:Nn
+        \__template_map_var_type:
+        _
+        \bool_if:NT \l__template_global_bool { g }
+        set:N
       }
   }
-\cs_new_protected:Npn \__template_assign_variable:N #1
+\cs_new_protected:Npn \__template_assign_variable:n #1
   {
-    \__template_if_key_value:VT \l__template_value_tl
-      { \__template_key_to_value: }
-    \tl_put_right:Ne \l__template_assignments_tl
+    \__template_if_key_value:VTF \l__template_value_tl
       {
-        #1 \exp_not:V \l__template_var_tl
-         { \exp_not:V \l__template_value_tl }
+        \__template_key_to_value:
+        \tl_put_right:Ne \l__template_assignments_tl
+          {
+            \exp_not:c { #1 V } \exp_not:V \l__template_var_tl
+             \exp_not:V \l__template_value_tl
+          }
       }
+      {
+        \tl_put_right:Ne \l__template_assignments_tl
+          {
+            \exp_not:c { #1 n } \exp_not:V \l__template_var_tl
+             { \exp_not:V \l__template_value_tl }
+          }
+      }
   }
-\cs_generate_variant:Nn \__template_assign_variable:N { c }
 \cs_new_protected:Npn \__template_key_to_value:
   { \exp_after:wN \__template_key_to_value_auxi:w \l__template_value_tl }
 \cs_new_protected:Npn \__template_key_to_value_auxi:w \KeyValue #1
@@ -8546,6 +8562,8 @@
   \@latex at error{%
        Bad \protect\line\space or \protect\vector
        \space argument}\@ehb}
+\gdef\@LRmoderr{%
+  \@latex at error{Not allowed in LR mode}\@ehb}
 \gdef\@parmoderr{%
   \@latex at error{Not in outer par mode}\@ehb}
 \gdef\@fltovf{%
@@ -8718,6 +8736,8 @@
   \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
+\ExplSyntaxOn
+\int_new:N\g__kernel_target_int
 \NewDocumentCommand\MakeLinkTarget{sO{}m}{%
   \ifvmode
     \special{}%
@@ -8725,8 +8745,19 @@
     \@savsf\spacefactor
     \smash{}%
     \spacefactor\@savsf
-  \fi}
-\NewDocumentCommand\LinkTargetOn{}{}
+  \fi
+  \IfBooleanTF {#1}
+   {
+     \tl_gset:Ne \@currentHref {#3}
+   }
+   {
+     \int_gincr:N\g__kernel_target_int
+     \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+   }
+  \UseTaggingSocket{recordtarget}
+   }
+\ExplSyntaxOff
+  \NewDocumentCommand\LinkTargetOn{}{}
 \NewDocumentCommand\LinkTargetOff{}{}
 \NewDocumentCommand\NextLinkTarget{m}{}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -8839,50 +8870,46 @@
       \fi
     \fi
   \fi}
-\def\addvspace#1{%
-  \ifvmode
-     \if at minipage\else
-       \ifdim \lastskip =\z@
-         \@vspace at calcify{#1}%
-       \else
-       \setlength\@tempskipb{#1}%
-         \@xaddvskip
-       \fi
-     \fi
+\protected\def\addvspace#1{%
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+  \if at minipage\else
+    \ifdim \lastskip =\z@
+      \@vspace at calcify{#1}%
+    \else
+    \setlength\@tempskipb{#1}%
+      \@xaddvskip
+    \fi
+  \fi
+}
+\protected\def\addpenalty#1{%
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+  \if at minipage
   \else
-    \@noitemerr
-  \fi}
-\def\addpenalty#1{%
-  \ifvmode
-    \if at minipage
+    \if at nobreak
     \else
-      \if at nobreak
+      \ifdim\lastskip=\z@
+        \penalty#1\relax
       \else
-        \ifdim\lastskip=\z@
-          \penalty#1\relax
-        \else
-          \@tempskipb\lastskip
-          \begingroup
-            \@tempskipa\@tempskipb
-            \advance \@tempskipb
-              \ifdim\prevdepth>\maxdepth\maxdepth\else
-                 \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
-               \fi
-             \vskip -\@tempskipb
-             \penalty#1%
-             \ifdim\@tempskipa=\@tempskipb
-             \else
-               \advance\@tempskipb -\@tempskipa
-               \vskip \@tempskipb
+        \@tempskipb\lastskip
+        \begingroup
+          \@tempskipa\@tempskipb
+          \advance \@tempskipb
+            \ifdim\prevdepth>\maxdepth\maxdepth\else
+               \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
              \fi
-             \vskip \@tempskipa
-          \endgroup
-        \fi
+           \vskip -\@tempskipb
+           \penalty#1%
+           \ifdim\@tempskipa=\@tempskipb
+           \else
+             \advance\@tempskipb -\@tempskipa
+             \vskip \@tempskipb
+           \fi
+           \vskip \@tempskipa
+        \endgroup
       \fi
     \fi
-  \else
-    \@noitemerr
-  \fi}%
+  \fi
+}
 \DeclareRobustCommand\vspace{\@ifstar\@vspacer\@vspace}
 \def\@vspace #1{%
   \ifvmode
@@ -9647,6 +9674,7 @@
      \global\expandafter\let\csname cl@#1\endcsname\@empty
      \@addtoreset{#1}{@ckpt}%
      \global\expandafter\let\csname p@#1\endcsname\@empty
+     \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%
      \expandafter
      \ifx\csname the#1\endcsname\relax
        \expandafter
@@ -9656,7 +9684,9 @@
        \@latex at warning{Command `\string\the#1' already
                        defined -- not changed}%
      \fi}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
+  \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
+}
 \def\@removefromreset#1#2{%
   \@ifundefined{c@#2}\relax
   {\begingroup
@@ -9750,7 +9780,8 @@
 \def\newlength#1{\@ifdefinable#1{\newskip#1}}
 \def\setlength#1#2{#1 #2\relax}
 \def\addtolength#1#2{\advance#1 #2\relax}
-\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox
+  {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa
        \setbox\@tempboxa\box\voidb at x}
 \DeclareRobustCommand\settoheight{\@settodim\ht}
 \DeclareRobustCommand\settodepth {\@settodim\dp}
@@ -13296,11 +13327,27 @@
   \endgroup
   \@esphack}
 \def\@currentcounter{}
-\def\refstepcounter#1{\stepcounter{#1}%
+\NewSocket{refstepcounter}{1}
+\NewSocket{refstepcounter/target}{1}
+\NewSocketPlug{refstepcounter/target}{kernel}
+ {\xdef\@currentHref {#1.\csname theH#1\endcsname}}%
+\AssignSocketPlug{refstepcounter/target}{kernel}
+\def\refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \stepcounter{#1}%
     \edef\@currentcounter{#1}%
     \protected at edef\@currentlabel
        {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+     \UseSocket{refstepcounter/target}{#1}%
+     \UseTaggingSocket{recordtarget}%
+   }%
 }
+\def\@kernel at refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \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}
@@ -13360,14 +13407,11 @@
 \cs_generate_variant:Nn \property_record:nn { nV , ee, oo }
 \cs_new_protected:Npn \__property_record:nn #1#2
   {
-    \legacy_if:nT { @filesw }
+    \protected at write \@auxout {}
       {
-        \protected at write \@auxout {}
-          {
-            \token_to_str:N \new at label@record
-              {#1}
-              { \clist_map_function:nN {#2} \__property_record_value:n }
-          }
+        \token_to_str:N \new at label@record
+          {#1}
+          { \clist_map_function:nN {#2} \__property_record_value:n }
       }
   }
 \cs_generate_variant:Nn \__property_record:nn { e }
@@ -13490,8 +13534,8 @@
   }
 \prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
 \cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
-\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
-\cs_new:Npn   \IfLabelExistsF #1   {\property_if_exist:eTF {#1}{} }
+\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }
+\cs_new:Npn   \IfLabelExistsF #1   {\property_if_recorded:eTF {#1}{} }
 \prg_new_conditional:Npnn \property_if_recorded:nn #1#2 { p , T , F,  TF }
   % #1 label #2 property
   {
@@ -13667,7 +13711,7 @@
 \def\stop{\clearpage\deadcycles\z@\let\par\@@par\@@end}
 \everypar{\@nodocument} %% To get an error if text appears before the
 \nullfont               %% \begin{document}
-\DeclareRobustCommand*\begin[1]{%
+\protected\def\begin#1{%
   \UseHook{env/#1/before}%
   \@ifundefined{#1}%
     {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
@@ -16815,7 +16859,9 @@
 \@onlypreamble\DeclareOption
 \@onlypreamble\@declareoption
 \@onlypreamble\@defdefault at ds
-\def\@remove at eq@value#1=#2\@nil{#1}
+\ExplSyntaxOn
+\def\@remove at eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}}
+\ExplSyntaxOff
 \def\OptionNotUsed{%
   \ifx\@currext\@clsextension
     \xdef\@unusedoptionlist{%
@@ -17480,6 +17526,7 @@
 \def\pkgcls at use@this at release#1#2{%
    \pkgcls at show@selection{#1}{#2}%
    \pkgcls at targetdate\z@
+   \@addtofilelist{#1}%
    \@@input #1\relax
    \endinput
 }
@@ -19617,17 +19664,11 @@
 \let\dblfigrule=\relax
 %%% From File: lttagging.dtx
 \ExplSyntaxOn
-\cs_new_eq:NN \SuspendTagging \use_none:n
-\cs_new_eq:NN \ResumeTagging  \use_none:n
-\AddToHook{begindocument/before}{
-  \cs_if_exist:NT \tag_stop:n
-  {
-    \cs_set:Npn \SuspendTagging #1 {
-      \tag_stop:n {#1}
-    }
-    \cs_set:Npn \ResumeTagging #1 { \tag_start:n {#1} }
-  }
-}
+
+\cs_new_eq:NN \tag_suspend:n \use_none:n
+\cs_new_eq:NN \tag_resume:n  \use_none:n
+\cs_new_protected:Npn \SuspendTagging #1 { \tag_suspend:n {#1} }
+\cs_new_protected:Npn \ResumeTagging #1  { \tag_resume:n {#1} }
 \AddToHook{begindocument}[kernel]{
   \cs_if_exist:NF \tag_if_active:T
      {
@@ -19655,11 +19696,25 @@
    \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
    \bool_set_false:N\l__tag_para_flattened_bool
    \int_zero:N   \l__tag_block_flattened_level_int
+   \bool_set_true:N \l__tag_para_bool
  }
 \AssignSocketPlug{tagsupport/para/restore}{default}
+
+
+\NewSocket{tagsupport/recordtarget}{0}
+\NewSocketPlug{tagsupport/recordtarget}{kernel}
+  {
+    \tl_if_blank:VF \@currentHref
+    {
+      \prop_gput:Nee
+        \g__tag_struct_dest_num_prop
+        {\@currentHref}
+        {\tag_get:n{struct_num}}
+    }
+  }
+\AssignSocketPlug{tagsupport/recordtarget}{kernel}
 \ExplSyntaxOff
 
-
 \NewSocket{tagsupport/toc/contentsline/before}{1}
 \NewSocket{tagsupport/toc/contentsline/after}{1}
 \NewSocket{tagsupport/toc/starttoc/before}{1}
@@ -19689,6 +19744,14 @@
 \NewSocket{tagsupport/tbl/longtable/foot}{0}
 \NewSocket{tagsupport/tbl/leaders/begin}{0}
 \NewSocket{tagsupport/tbl/leaders/end}{0}
+\NewSocket{tagsupport/float/hmode/begin}{0}
+\NewSocket{tagsupport/float/hmode/end}{0}
+\NewSocket{tagsupport/float/begin}{0}
+\NewSocket{tagsupport/float/end}{0}
+\NewSocket{tagsupport/caption/begin}{1}
+\NewSocket{tagsupport/caption/end}{0}
+\NewSocket{tagsupport/caption/label/begin}{0}
+\NewSocket{tagsupport/caption/label/end}{0}
 \ExplSyntaxOn
 \int_new:N \g__tbl_col_int
 \int_new:N \g__tbl_row_int
@@ -19829,7 +19892,6 @@
     \crcr
 }
 \ExplSyntaxOff
-\let\@kernel at refstepcounter\refstepcounter
 \def\hyper at nopatch@longtable{}
 %%% From File: ltfinal.dtx
 \tracingstats1

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -226,6 +226,7 @@
 \def\pkgcls at use@this at release#1#2{%
    \pkgcls at show@selection{#1}{#2}%
    \pkgcls at targetdate\z@
+   \@addtofilelist{#1}%
    \@@input #1\relax
    \endinput
 }
@@ -5330,17 +5331,19 @@
                  {Providing~hooks}
 \cs_gset_protected:Npn \hook_activate_generic:n #1 { }
 \EndIncludeInRelease
-\cs_new:Npn \__hook_parse_label_default:n #1
+\cs_new:Npn \__hook_parse_label_default:nN #1#2
   {
     \tl_if_novalue:nTF {#1}
       { \__hook_currname_or_default: }
-      { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:n }
+      { \tl_trim_spaces_apply:nN {#1} \__hook_parse_dot_label:nN #2 }
   }
-\cs_new:Npn \__hook_parse_dot_label:n #1
+\cs_new:Npn \__hook_parse_dot_label:nN #1#2
   {
     \tl_if_empty:nTF {#1}
       {
-        \msg_expandable_error:nn { hooks } { empty-label }
+        \bool_if:NTF #2
+          { \msg_expandable_error:nn { hooks } { empty-label } }
+          { \msg_expandable_error:nn { hooks } { empty-hook } }
         \__hook_currname_or_default:
       }
       {
@@ -5395,14 +5398,14 @@
 \cs_new_protected:Npn \__hook_normalize_hook_args:Nn #1 #2
   {
     \__hook_normalize_hook_args_aux:Nn #1
-      { { \__hook_parse_label_default:n {#2} } }
+      { { \__hook_parse_label_default:nN {#2} \c_false_bool } }
   }
 \cs_new_protected:Npn \__hook_normalize_hook_args:Nnn #1 #2 #3
   {
     \__hook_normalize_hook_args_aux:Nn #1
       {
-        { \__hook_parse_label_default:n {#2} }
-        { \__hook_parse_label_default:n {#3} }
+        { \__hook_parse_label_default:nN {#2} \c_false_bool }
+        { \__hook_parse_label_default:nN {#3} \c_true_bool }
       }
   }
 \cs_new_protected:Npn \__hook_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5
@@ -5409,10 +5412,10 @@
   {
     \__hook_normalize_hook_args_aux:Nn #1
       {
-        { \__hook_parse_label_default:n {#2} }
-        { \__hook_parse_label_default:n {#3} }
+        { \__hook_parse_label_default:nN {#2} \c_false_bool }
+        { \__hook_parse_label_default:nN {#3} \c_true_bool }
         { \tl_trim_spaces:n {#4} }
-        { \__hook_parse_label_default:n {#5} }
+        { \__hook_parse_label_default:nN {#5} \c_true_bool }
       }
   }
 \tl_gset:Nn \g__hook_hook_curr_name_tl { top-level }
@@ -7616,6 +7619,10 @@
     Empty~code~label~\msg_line_context:.~
     Using~'\__hook_currname_or_default:'~instead.
   }
+\msg_new:nnn { hooks } { empty-hook }
+  {
+    Empty~hook~name~\msg_line_context:.
+  }
 \msg_new:nnn { hooks } { no-default-label }
   {
     Missing~(empty)~default~label~\msg_line_context:. \\
@@ -9577,23 +9584,33 @@
   }
 \cs_new_protected:Npn \__template_assign_variable:
   {
-    \__template_assign_variable:c
+    \exp_args:Ne \__template_assign_variable:n
       {
-        \__template_map_var_type: _
-        \bool_if:NT \l__template_global_bool { g } set:Nn
+        \__template_map_var_type:
+        _
+        \bool_if:NT \l__template_global_bool { g }
+        set:N
       }
   }
-\cs_new_protected:Npn \__template_assign_variable:N #1
+\cs_new_protected:Npn \__template_assign_variable:n #1
   {
-    \__template_if_key_value:VT \l__template_value_tl
-      { \__template_key_to_value: }
-    \tl_put_right:Ne \l__template_assignments_tl
+    \__template_if_key_value:VTF \l__template_value_tl
       {
-        #1 \exp_not:V \l__template_var_tl
-         { \exp_not:V \l__template_value_tl }
+        \__template_key_to_value:
+        \tl_put_right:Ne \l__template_assignments_tl
+          {
+            \exp_not:c { #1 V } \exp_not:V \l__template_var_tl
+             \exp_not:V \l__template_value_tl
+          }
       }
+      {
+        \tl_put_right:Ne \l__template_assignments_tl
+          {
+            \exp_not:c { #1 n } \exp_not:V \l__template_var_tl
+             { \exp_not:V \l__template_value_tl }
+          }
+      }
   }
-\cs_generate_variant:Nn \__template_assign_variable:N { c }
 \cs_new_protected:Npn \__template_key_to_value:
   { \exp_after:wN \__template_key_to_value_auxi:w \l__template_value_tl }
 \cs_new_protected:Npn \__template_key_to_value_auxi:w \KeyValue #1
@@ -10178,6 +10195,10 @@
   \let \IfDocumentMetadataTF \@firstoftwo
   \DocumentMetadata
 }
+\IncludeInRelease{2024/11/01}%
+                 {\MakeLinkTarget}{Record target name for tagging support}%
+\ExplSyntaxOn
+\int_new:N\g__kernel_target_int
 \NewDocumentCommand\MakeLinkTarget{sO{}m}{%
   \ifvmode
     \special{}%
@@ -10185,8 +10206,31 @@
     \@savsf\spacefactor
     \smash{}%
     \spacefactor\@savsf
+  \fi
+  \IfBooleanTF {#1}
+   {
+     \tl_gset:Ne \@currentHref {#3}
+   }
+   {
+     \int_gincr:N\g__kernel_target_int
+     \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+   }
+  \UseTaggingSocket{recordtarget}
+   }
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {\MakeLinkTarget}{Record target name for tagging support}%
+\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+  \ifvmode
+    \special{}%
+  \else
+    \@savsf\spacefactor
+    \smash{}%
+    \spacefactor\@savsf
   \fi}
-\NewDocumentCommand\LinkTargetOn{}{}
+\EndIncludeInRelease
+  \NewDocumentCommand\LinkTargetOn{}{}
 \NewDocumentCommand\LinkTargetOff{}{}
 \NewDocumentCommand\NextLinkTarget{m}{}
 \IncludeInRelease{0000/00/00}{ltmeta}%
@@ -10346,6 +10390,20 @@
     \fi
    \fi}%
 \EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+                 {\addvspace}{drop unnecessary no-item error}%
+\protected\def\addvspace#1{%
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+  \if at minipage\else
+    \ifdim \lastskip =\z@
+      \@vspace at calcify{#1}%
+    \else
+    \setlength\@tempskipb{#1}%
+      \@xaddvskip
+    \fi
+  \fi
+}
+\EndIncludeInRelease
 \IncludeInRelease{2020/10/01}%
                  {\addvspace}{\addvspace calc support}%
 \def\addvspace#1{%
@@ -10379,6 +10437,38 @@
     \@noitemerr
   \fi}
 \EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+                 {\addpenalty}{\addpenalty drop error}%
+\protected\def\addpenalty#1{%
+  \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+  \if at minipage
+  \else
+    \if at nobreak
+    \else
+      \ifdim\lastskip=\z@
+        \penalty#1\relax
+      \else
+        \@tempskipb\lastskip
+        \begingroup
+          \@tempskipa\@tempskipb
+          \advance \@tempskipb
+            \ifdim\prevdepth>\maxdepth\maxdepth\else
+               \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+             \fi
+           \vskip -\@tempskipb
+           \penalty#1%
+           \ifdim\@tempskipa=\@tempskipb
+           \else
+             \advance\@tempskipb -\@tempskipa
+             \vskip \@tempskipb
+           \fi
+           \vskip \@tempskipa
+        \endgroup
+      \fi
+    \fi
+  \fi
+}
+\EndIncludeInRelease
 \IncludeInRelease{2015/01/01}%
                  {\addpenalty}{\addpenalty}%
 \def\addpenalty#1{%
@@ -11315,6 +11405,51 @@
                              {Reset nested counters}%%
 \def\@stpelt#1{\global\csname c@#1\endcsname \z@}%
 \EndIncludeInRelease
+\IncludeInRelease{2024/11/01}{\@definecounter}
+                             {provide theHfoo commands}%
+\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
+     \setcounter{#1}\z@
+     \global\expandafter\let\csname cl@#1\endcsname\@empty
+     \@addtoreset{#1}{@ckpt}%
+     \global\expandafter\let\csname p@#1\endcsname\@empty
+     \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%
+     \expandafter
+     \ifx\csname the#1\endcsname\relax
+       \expandafter
+       \gdef\csname the#1\expandafter\endcsname\expandafter
+              {\expandafter\@arabic\csname c@#1\endcsname}%
+     \else
+       \@latex at warning{Command `\string\the#1' already
+                       defined -- not changed}%
+     \fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{\@definecounter}
+                             {provide theHfoo commands}%%
+\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
+     \setcounter{#1}\z@
+     \global\expandafter\let\csname cl@#1\endcsname\@empty
+     \@addtoreset{#1}{@ckpt}%
+     \global\expandafter\let\csname p@#1\endcsname\@empty
+     \expandafter
+     \ifx\csname the#1\endcsname\relax
+       \expandafter
+     \gdef\csname the#1\expandafter\endcsname\expandafter
+          {\expandafter\@arabic\csname c@#1\endcsname}%
+     \else
+       \@latex at warning{Command `\string\the#1' already
+                       defined -- not changed}%
+     \fi}
+\EndIncludeInRelease
+\IncludeInRelease{2024/11/01}{\@addtoreset}
+                             {provide theHfoo commands}%
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
+  \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
+}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}{\@addtoreset}
+                             {provide theHfoo commands}%%
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+\EndIncludeInRelease
 \IncludeInRelease{2018-04-01}
                  {\@removefromreset}{Add interfaces}%
 \def\@removefromreset#1#2{%
@@ -11447,6 +11582,17 @@
                  {\setlength}{Using \setlength with \dimen0}%
 \def\setlength#1#2{#1#2\relax}
 \EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+                 {\@settodim}{suspend tagging}%
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox
+  {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa
+       \setbox\@tempboxa\box\voidb at x}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+                 {\@settodim}{suspend tagging}%
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+       \setbox\@tempboxa\box\voidb at x}
+\EndIncludeInRelease
 %%% From File: ltfssbas.dtx
 %% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf
 \IncludeInRelease{2020/02/02}%
@@ -14664,11 +14810,42 @@
 \IncludeInRelease{2022/06/01}%
                  {\Ref}{Add starred version}%
 \def\@currentcounter{}
-\def\refstepcounter#1{\stepcounter{#1}%
+\EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+                 {\@currentHref}{set theHcounter representation}%
+\NewSocket{refstepcounter}{1}
+\NewSocket{refstepcounter/target}{1}
+\NewSocketPlug{refstepcounter/target}{kernel}
+ {\xdef\@currentHref {#1.\csname theH#1\endcsname}}%
+\AssignSocketPlug{refstepcounter/target}{kernel}
+\def\refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \stepcounter{#1}%
     \edef\@currentcounter{#1}%
     \protected at edef\@currentlabel
        {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+     \UseSocket{refstepcounter/target}{#1}%
+     \UseTaggingSocket{recordtarget}%
+   }%
 }
+\def\@kernel at refstepcounter#1{%
+  \UseSocket{refstepcounter}{%
+    \stepcounter{#1}%
+    \edef\@currentcounter{#1}%
+    \protected at edef\@currentlabel
+       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}}%
+\EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {\@currentHref}{set theHcounter representation}%
+\def\refstepcounter#1{\stepcounter{#1}%
+    \edef\@currentcounter{#1}%
+    \protected at edef\@currentlabel
+      {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+}
+\let\@kernel at refstepcounter\refstepcounter
+\EndIncludeInRelease
+\IncludeInRelease{2022/06/01}%
+                 {\Ref}{Add starred version}%
 \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}
@@ -14774,14 +14951,11 @@
 \cs_generate_variant:Nn \property_record:nn { nV , ee, oo }
 \cs_new_protected:Npn \__property_record:nn #1#2
   {
-    \legacy_if:nT { @filesw }
+    \protected at write \@auxout {}
       {
-        \protected at write \@auxout {}
-          {
-            \token_to_str:N \new at label@record
-              {#1}
-              { \clist_map_function:nN {#2} \__property_record_value:n }
-          }
+        \token_to_str:N \new at label@record
+          {#1}
+          { \clist_map_function:nN {#2} \__property_record_value:n }
       }
   }
 \cs_generate_variant:Nn \__property_record:nn { e }
@@ -14904,8 +15078,8 @@
   }
 \prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
 \cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
-\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
-\cs_new:Npn   \IfLabelExistsF #1   {\property_if_exist:eTF {#1}{} }
+\cs_new:Npn   \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }
+\cs_new:Npn   \IfLabelExistsF #1   {\property_if_recorded:eTF {#1}{} }
 \prg_new_conditional:Npnn \property_if_recorded:nn #1#2 { p , T , F,  TF }
   % #1 label #2 property
   {
@@ -15222,7 +15396,7 @@
 \EndIncludeInRelease
 \IncludeInRelease{2020/10/01}%
                  {\begin}{Use hook system}%
-\DeclareRobustCommand*\begin[1]{%
+\protected\def\begin#1{%
   \UseHook{env/#1/before}%
   \@ifundefined{#1}%
     {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
@@ -18144,7 +18318,9 @@
 \EndIncludeInRelease
 \IncludeInRelease{2021/06/01}%
                  {\OptionNotUsed}{filter unused option list}%
-\def\@remove at eq@value#1=#2\@nil{#1}
+\ExplSyntaxOn
+\def\@remove at eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}}
+\ExplSyntaxOff
 \def\OptionNotUsed{%
   \ifx\@currext\@clsextension
     \xdef\@unusedoptionlist{%

Modified: trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg	2024-10-14 19:13:47 UTC (rev 72549)
@@ -37,7 +37,7 @@
 %% 
 %%%   From File: fontdef.dtx
 \ProvidesFile{preload.cfg}
-           [2024/07/08 v3.0j LaTeX Kernel
+           [2024/09/03 v3.0k LaTeX Kernel
    (Uncustomized preload font setup)
 ]
 %%

Modified: trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,8 +34,8 @@
 %%
 %% The LaTeX Project and any individual authors listed elsewhere
 %% in this file.
-\def\LaTeXFirstAidDate{2024/03/20}
-\def\LaTeXFirstAidVersion{v1.1e}
+\def\LaTeXFirstAidDate{2024/07/05}
+\def\LaTeXFirstAidVersion{v1.1f}
 \ProvidesFile{latex2e-first-aid-for-external-files.ltx}
              [\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
                LaTeX kernel fixes to external files and packages]
@@ -230,6 +230,22 @@
           }
       }%
 }
+\AddToHook{package/arydshln/after}[firstaid]{%
+  \FirstAidNeededT{arydshln}{sty}{2019/02/21 v1.76 }
+  {%
+\protected\def\adl@@vlineL#1#2#3#4{\adl at ivline#4\@nil{#1}{#2}%
+        \xdef\adl at colsL{\adl at colsL
+                \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+                        {\adl at dashcolor}{\adl at gapcolor}}}%
+\protected\def\adl@@vlineR#1#2#3#4{\adl at ivline#4\@nil{#1}{#2}%
+        \xdef\adl at colsR{%
+                \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+                        {\adl at dashcolor}{\adl at gapcolor}%
+                \adl at colsR}}%
+\let\adl at act@@vlineL\adl@@vlineL
+\let\adl at act@@vlineR\adl@@vlineR
+  }%
+}
 \endinput
 %%
 %% End of file `latex2e-first-aid-for-external-files.ltx'.

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-08-11}
-\def\ltlabblockversion{0.8p}
+\def\ltlabblockdate{2024-10-11}
+\def\ltlabblockversion{0.8v}
 \ProvidesFile{block-latex-lab-testphase.ltx}
         [\ltlabblockdate\space v\ltlabblockversion\space
                             blockenv implementation]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/documentmetadata-support.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/documentmetadata-support.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/documentmetadata-support.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: documentmetadata-support.dtx
-\def\documentmetadatasupportversion{1.0h}
-\def\documentmetadatasupportdate{2024-03-26}
+\def\documentmetadatasupportversion{1.0j}
+\def\documentmetadatasupportdate{2024-09-13}
 
 
 \RequirePackage{pdfmanagement-testphase}
@@ -44,6 +44,13 @@
   { \clist_new:N \g__pdfmanagement_firstaidoff_clist }
 \tl_if_exist:NF \g__pdfmanagement_testphase_tl
  { \tl_new:N \g__pdfmanagement_testphase_tl }
+\cs_new_protected:Npn \@kernel at before@DocumentMetadata
+  {
+    \ifx\Umathcode\@undefined
+    \fontencoding{T1}
+    \renewcommand\encodingdefault{T1}
+    \fi
+  }
 
 \cs_set_protected:Npn \DocumentMetadata #1
   {
@@ -50,6 +57,7 @@
     \cs_if_eq:NNTF \documentclass \@twoclasseserror
       { \msg_error:nn { meta } { after-class } }
       {
+        \@kernel at before@DocumentMetadata
         \bool_gset_true:N \g__pdfmanagement_active_bool
         \keys_set_groups:nnn { document / metadata} {init}{ #1 }
         %if no backend has been loaded force it now:
@@ -163,7 +171,7 @@
       }
     ,_pdfstandard / unknown .code:n =
       {
-        \msg_warning:nnn{pdf}{unknown-standard}{#1}
+        \msg_error:nnn{pdf}{unknown-standard}{#1}
       }
     ,testphase .multichoice:
     ,testphase / tagpdf .code:n =

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,9 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-08-11}
-\def\ltlabfirstaidversion{0.85e}
-
+\def\ltlabfirstaiddate{2024-10-04}
+\def\ltlabfirstaidversion{0.85g}
 \ProvidesFile{firstaid-latex-lab-testphase.ltx}
         [\ltlabfirstaiddate\space v\ltlabfirstaidversion\space
          latex-lab wrapper firstaid]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-07-05}
-\def\ltlabfloatversion{0.81e}
+\def\ltlabfloatdate{2024-09-20}
+\def\ltlabfloatversion{0.81f}
 
 \ProvidesFile{float-latex-lab-testphase.ltx}
         [\ltlabfloatdate\space v\ltlabfloatversion\space latex-lab wrapper float]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/graphic-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/graphic-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/graphic-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-graphic.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabgraphicdate{2024-07-05}
-\def\ltlabgraphicversion{0.80d}
+\def\ltlabgraphicdate{2024-09-18}
+\def\ltlabgraphicversion{0.80e}
 
 \ProvidesFile{graphic-latex-lab-testphase.ltx}
         [\ltlabgraphicdate\space v\ltlabgraphicversion\space latex-lab wrapper graphic]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-amsmath.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-amsmath.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-amsmath.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,7 +34,7 @@
 %% 
 %% File: latex-lab-amsmath.dtx
 \ProvidesFile{latex-lab-amsmath.ltx}
-        [2024-07-05 v0.1b amsmath adaptions]
+        [2024-09-18 v0.1c amsmath adaptions]
 \RequirePackage{tagpdf-base}
 \ExplSyntaxOn
 \AddToHook{package/amsmath/after}
@@ -45,7 +45,7 @@
         \noalign{%
           \penalty\postdisplaypenalty\vskip-\belowdisplayskip
           \vbox{
-           \ifmeasuring@\tag_stop:\fi
+           \ifmeasuring@\tag_suspend:n{\measuring}\fi
            \normalbaselines
             \ifdim\linewidth=\columnwidth
             \else \parshape\@ne \@totalleftmargin \linewidth
@@ -84,7 +84,7 @@
          \def\text@#1
           {{
            \int_gincr:N\g__math_mathchoice_int
-           \tag_stop:
+           \tag_suspend:n{\text@}
            \mathchoice
             {
              \__math_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{0}

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footmisc.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footmisc.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footmisc.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-footnotes.dtx
-\def\ltlabfootnotedate{2024-07-27}
-\def\ltlabfootnoteversion{0.8e}
+\def\ltlabfootnotedate{2024-09-30}
+\def\ltlabfootnoteversion{0.8g}
 
 %%
 %% Copyright (c) 1995-2011 Robin Fairbairns

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footnotes.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footnotes.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-footnotes.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-footnotes.dtx
-\def\ltlabfootnotedate{2024-07-27}
-\def\ltlabfootnoteversion{0.8e}
+\def\ltlabfootnotedate{2024-09-30}
+\def\ltlabfootnoteversion{0.8g}
 
 \ProvidesFile{latex-lab-footnotes.ltx}
              [\ltlabfootnotedate\space v\ltlabfootnoteversion\space
@@ -57,7 +57,7 @@
 \bool_new:N       \l__fnote_autodetect_bool
 \bool_set_true:N  \l__fnote_autodetect_bool
 \tl_new:N  \l__fnote_currentstruct_tl
-\tl_set:Nn \l__fnote_currentstruct_tl {1}
+\tl_set:Nn \l__fnote_currentstruct_tl {2}
 \cs_generate_variant:Nn \hook_gput_code:nnn{nne}
 \cs_generate_variant:Nn \tag_struct_use:n {e}
 \cs_new_protected:Npn \fnote_step_fnmark:nn #1#2 {
@@ -466,10 +466,7 @@
 
 \cs_new_protected:Npn \__fnote_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2
   {
-    \tag_if_active:T
-      {
-        \tag_struct_gput:nne {#1}{ref}{\tag_struct_object_ref:e { #2 }}
-      }
+    \tag_struct_gput:nnn {#1}{ref_num}{#2}
   }
 \cs_new_protected:Npn \fnote_gput_refs:nn #1 #2 % pair of numbers
   {
@@ -477,8 +474,6 @@
     \__fnote_gput_ref:nn {#2}{#1}
   }
 \cs_generate_variant:Nn \fnote_gput_refs:nn {ee}
-\tl_new:N \l__fnote_dflt_struct_tl
-\tl_set:Nn \l__fnote_dflt_struct_tl {1}
 \NewSocketPlug{tagsupport/fntext/begin}{FENote}
   {
     \tag_mc_end_push:
@@ -487,10 +482,13 @@
         \tag_struct_begin:n { tag=footnote }
       }
       {
-        \tag_struct_begin:n { tag=footnote,parent=\l__fnote_dflt_struct_tl }
+        \tag_struct_begin:n
+          {
+            tag=footnote,
+            parent=\int_max:nn{2}{\tag_get:n{current_Sect}+0}
+          }
       }
     \tl_set:Ne \l__fnote_currentstruct_tl { \tag_get:n{struct_num} }
-    \tag_struct_begin:n { tag=footnotelabel }\tag_struct_end:
     \bool_if:NTF \l__fnote_autodetect_bool
       {
         \fnote_mark_gpop_all:ooN { \@thefnmark }{ \l_fnote_type_tl } \l__fnote_currentrefs_seq
@@ -517,7 +515,7 @@
      %\seq_show:N\l__fnote_currentrefs_seq
      \seq_map_inline:Nn\l__fnote_currentrefs_seq {\MakeLinkTarget*{footnote*.##1}}
      \MakeLinkTarget*{footnote*.\l__fnote_currentstruct_tl}
-     \tag_struct_begin:n { tag=NonStruct,parent=\l__fnote_currentstruct_tl +1 }
+     \tag_struct_begin:n { tag=footnotelabel,parent=\l__fnote_currentstruct_tl,firstkid }
       \tag_mc_begin:n { tag=Lbl }
        #1
       \tag_mc_end:

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-kernel-changes.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -40,33 +40,7 @@
         [\ltlabkerneldate\space v\ltlabkernelversion\space
          General kernel and class changes]
 \def\hyper at nopatch@counter{}
-\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
-     \setcounter{#1}\z@
-     \global\expandafter\let\csname cl@#1\endcsname\@empty
-     \@addtoreset{#1}{@ckpt}%
-     \global\expandafter\let\csname p@#1\endcsname\@empty
-     \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%new
-     \expandafter
-     \gdef\csname the#1\expandafter\endcsname\expandafter
-          {\expandafter\@arabic\csname c@#1\endcsname}}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
-  \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
-}
-\gdef\theHenumi{\the\value{enumi}}
-\gdef\theHenumii{\the\value{enumii}}
-\gdef\theHenumiii{\the\value{enumiii}}
-\gdef\theHenumiv{\the\value{enumiv}}
-\gdef\theHequation{\the\value{equation}}
-\gdef\theHfootnote{\the\value{footnote}}
-\gdef\theHmpfootnote{\the\value{mpfootnote}}
-\def\@currentHref{}
-\def\refstepcounter#1{\stepcounter{#1}%
-    \edef\@currentcounter{#1}%
-    \xdef\@currentHref {#1.\csname theH#1\endcsname}%
-    \protected at edef\@currentlabel
-       {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
-}
-\let\@kernel at refstepcounter\refstepcounter
+
 \def\toclevel at document{-10}
 \def\toclevel at part{-1}
 \def\toclevel at chapter{0}
@@ -78,20 +52,23 @@
 \def\toclevel at figure{1}
 \def\toclevel at table{1}
 \ExplSyntaxOn
-\AddToHookWithArguments{cmd/MakeLinkTarget/after}
-  {
-    \tag_if_active:T
-      {
-        \tl_if_blank:VF \@currentHref
-          {
-            \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
-          }
-      }
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_str }
+ {
+  \AddToHookWithArguments{cmd/MakeLinkTarget/after}
+    {
+      \tag_if_active:T
+        {
+          \tl_if_blank:VF \@currentHref
+            {
+              \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+            }
+        }
+    }
   }
 \ExplSyntaxOff
 %% File: latex-lab-sec.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabsecdate{2024-07-05}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
 \ifdefined\directlua
  \ifnum\outputmode > 0
    \pdfvariable gentounicode =1
@@ -104,24 +81,27 @@
  \input{glyphtounicode-cmex}
 \fi
 \ExplSyntaxOn
-\int_new:N\g__kernel_target_int
-\RenewDocumentCommand\MakeLinkTarget{sO{}m}
- {%
-  \ifvmode
-    \special{}%
-  \else
-    \@savsf\spacefactor
-    \smash{}%
-    \spacefactor\@savsf
-  \fi
-  \IfBooleanTF {#1}
-   {
-     \tl_gset:Ne \@currentHref {#3}
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
+ {
+  \int_new:N\g__kernel_target_int
+  \RenewDocumentCommand\MakeLinkTarget{sO{}m}
+   {%
+    \ifvmode
+      \special{}%
+    \else
+      \@savsf\spacefactor
+      \smash{}%
+      \spacefactor\@savsf
+    \fi
+    \IfBooleanTF {#1}
+     {
+       \tl_gset:Ne \@currentHref {#3}
+     }
+     {
+       \int_gincr:N\g__kernel_target_int
+       \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+     }
    }
-   {
-     \int_gincr:N\g__kernel_target_int
-     \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
-   }
  }
 \ExplSyntaxOff
 

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-math.dtx
-\def\ltlabmathdate{2024-08-22}
-\def\ltlabmathversion{0.6c}
+\def\ltlabmathdate{2024-10-12}
+\def\ltlabmathversion{0.6h}
 \ProvidesFile{latex-lab-math.ltx}
              [\ltlabmathdate\space
               v\ltlabmathversion\space
@@ -425,7 +425,7 @@
    \int_set:Nn \l__math_mathstyle_int {#2}
    \property_record:nn {#1} { mathstyle }
    \int_compare:nNnTF { \property_ref:nn {#1}{ mathstyle} } = { #2 }
-    { \tag_start: }{ \tag_stop: }
+    { \tag_resume:n{\mathchoice} }{ \tag_suspend:n{\mathchoice} }
  }
 \cs_generate_variant:Nn \__math_tag_if_mathstyle:nn {en}
 \keys_define:nn { __tag / setup }
@@ -455,13 +455,13 @@
 \socket_new_plug:nnn
   {tagsupport/math/inline/formula/begin}
   {default}
-  {
-    \socket_use:n{tagsupport/math/content}
-    \socket_use:n{tagsupport/math/struct/begin}
+  { \tagpdfparaOff
+    \tag_socket_use:n{math/content}
+    \tag_socket_use:n{math/struct/begin}
     % inner formula if multiple parts (not really implemented yet)
-    \socket_use:n{tagsupport/math/substruct/begin}
+    \tag_socket_use:n{math/substruct/begin}
     #1
-    \socket_use:n{tagsupport/math/end}
+    \tag_socket_use:n{math/end}
   }
 \socket_new_plug:nnn
   {tagsupport/math/inline/formula/end}
@@ -489,11 +489,11 @@
   {tagsupport/math/display/formula/begin}
   {default}
   {
-    \socket_use:n{tagsupport/math/content}
-    \socket_use:n{tagsupport/math/struct/begin}
-    \socket_use:n{tagsupport/math/substruct/begin}
+    \tag_socket_use:n{math/content}
+    \tag_socket_use:n{math/struct/begin}
+    \tag_socket_use:n{math/substruct/begin}
     #1
-    \socket_use:n{tagsupport/math/end}
+    \tag_socket_use:n{math/end}
   }
 \socket_new_plug:nnn
   {tagsupport/math/display/formula/end}
@@ -737,7 +737,7 @@
         }
         {
             \tag_socket_use:n  {math/inline/begin} %end P-MC
-            \tag_socket_use:nn {math/inline/formula/begin}{#1}
+            \socket_use:nn {tagsupport/math/inline/formula/begin}{#1}
             $ % $
             \tag_socket_use:n  {math/inline/formula/end}
             \tag_socket_use:n  {math/inline/end} % restart P-MC
@@ -751,7 +751,7 @@
     \tl_if_blank:nF {#1}
       {
         \__math_process:nn { equation* } {#1}
-        \socket_use:n {tagsupport/math/display/begin}
+        \tag_socket_use:n {math/display/begin}
         \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
       }
     $$
@@ -763,9 +763,11 @@
     \para_raw_end:
     \tagpdfparaOn
     \l__math_tmpa_skip \lastskip
-    \socket_use:n{tagsupport/math/display/formula/end}
+    \tag_socket_use:n{math/display/formula/end}
+    \nobreak
+    \skip_vertical:n { -\l__math_tmpa_skip  } % remove the negative belowdisplayskip
     \penalty \postdisplaypenalty
-  \skip_vertical:n { -\l__math_tmpa_skip * 2 }
+    \skip_vertical:n { -\l__math_tmpa_skip  } % insert the correct skip
   \@doendpe             % this has no \end{...} to take care of it
 }
 
@@ -826,8 +828,6 @@
     \int_incr:N \l__math_grab_env_int
     \__math_grab_loop_store:n { \begin }
   }
-\cs_new_eq:cc { __math_grab_loop_ \token_to_str:N \begin \c_space_tl : }
-  { __math_grab_loop_ \token_to_str:N \begin : }
 \cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N \end : }
   {
     \int_compare:nNnTF \l__math_grab_env_int = 0
@@ -1159,7 +1159,7 @@
   \iftagsleft@ \@xp\lendmultline@ \else \@xp\rendmultline@ \fi
   \ignorespacesafterend
 }
-\def\measuring at true{\let\ifmeasuring@\iftrue\tag_stop:}
+\def\measuring at true{\let\ifmeasuring@\iftrue\tag_suspend:n{\measuring}}
   \math_register_halign_env:nn {align}{}
   \math_register_halign_env:nn {align*}{}
   \math_register_halign_env:nn {alignat}{}

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-mathtools.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-mathtools.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-mathtools.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,6 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-mathtools.dtx
+\def\ltlabmathtoolsdate{2024-09-18}
+\def\ltlabmathtoolsversion{0.80a}
 \ProvidesFile{latex-lab-mathtools.ltx}
         [2024-07-13 v0.1a mathtools adaptions]
 \RequirePackage{tagpdf-base}
@@ -65,7 +67,7 @@
          \vskip\normallineskiplimit % CCS
          \vskip\l_MT_above_intertext_sep
           \vbox{%
-          \ifmeasuring@\tag_stop:\fi
+          \ifmeasuring@\tag_suspend:n{\measuring}\fi
           \normalbaselines
             \ifdim
               \ifdim\@totalleftmargin=\z@
@@ -93,7 +95,7 @@
       \noalign{%
         \penalty\postdisplaypenalty\vskip\abovedisplayshortskip
         \vbox{%
-          \ifmeasuring@\tag_stop:\fi
+          \ifmeasuring@\tag_suspend:n{\measuring}\fi
           \normalbaselines
           \MH_if_dim:w
             \MH_if_dim:w \@totalleftmargin=\z@
@@ -122,7 +124,7 @@
        \vskip\normallineskiplimit
        \vskip\l_MT_above_shortintertext_sep
        \vbox{%
-       \ifmeasuring@\tag_stop:\fi
+       \ifmeasuring@\tag_suspend:n{\measuring}\fi
        \normalbaselines
          \MH_if_dim:w
            \MH_if_dim:w \@totalleftmargin=\z@

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-08-11}
-\def\ltlabblockversion{0.8p}
+\def\ltlabblockdate{2024-10-11}
+\def\ltlabblockversion{0.8v}
 \ProvidesPackage {latex-lab-testphase-block}
                  [\ltlabblockdate\space v\ltlabblockversion\space
                             blockenv implementation]
@@ -58,32 +58,6 @@
   }
 }
 \cs_new_eq:NN \__kernel_displayblock_doendpe: \prg_do_nothing:
-\def\@endpetrue {%
-  \global\let\if at endpe\iftrue
-   \ifnum\currentgrouplevel>\z@
-      \aftergroup\propagate at doendpe
-   \fi
-}
-\def\propagate at doendpe{%
-  \if at endpe
-     \__block_debug_typeout:n{run~ (another)~ @doendpe~ at~
-       group~ level~ \the\currentgrouplevel}%
-    \@doendpe
-  \else
-     \__block_debug_typeout:n{do~ not~ run~ (another)~ @doendpe}%
-  \fi
-}
-\@namedef{end }#1{%
-  \romannumeral
-    \IfHookEmptyTF{env/#1/end}%
-        {\expandafter\z@}%
-        {\z@\UseHook{env/#1/end}}%
-    \csname end#1\endcsname\@checkend{#1}%
-    \endgroup
-    \UseHook{env/#1/after}%
-    \if at ignore\@ignorefalse\ignorespaces\fi
-}
-\def\@endpefalse{\global\let\if at endpe\iffalse}
 \NewTemplateType{blockenv}{1}
 \NewTemplateType{block}{1}
 \NewTemplateType{para}{1}
@@ -114,6 +88,7 @@
   par-skip       : skip = \parsep ,
   end-skip       : skip = \KeyValue{beginsep} ,                % conflict with name below
   end-par-skip   : skip = \KeyValue{begin-par-skip} ,
+  item-skip      : skip = \itemsep ,
   beginpenalty   : integer = \UseName{@beginparpenalty} ,
   endpenalty     : integer = \UseName{@endparpenalty} ,
   leftmargin     : length = \leftmargin ,
@@ -281,19 +256,19 @@
 \AddToHook{begindocument/before}{
   \RenewDocumentEnvironment{list}{O{} m m }
     {
-      \tl_set:Nn \@itemlabel {#2}
-      \tl_set:Nn \l__block_legacy_env_params_tl {#3}
+      \tl_set:Nn \l__block_legacy_env_params_tl
+         {
+           \tl_set:Nn \@itemlabel {#2}
+           #3
+         }
       \UseInstance{blockenv}{list} {#1}
     }
     { \endblockenv }
 }
-\tl_new:N \l__block_env_params_tl
 \cs_new:Npn \legacylistsetupcode {
     \dim_zero:N \listparindent
     \dim_zero:N \rightmargin
     \dim_zero:N \itemindent
-    \tl_set:Nn \@listctr {}
-    \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested
    \let\makelabel\@mklab % TODO: customize
    \l__block_legacy_env_params_tl
     \legacy_if:nTF { @nmbrlist }
@@ -459,6 +434,9 @@
            }
      }
   \tag_if_active:T { \use:c { __block_recipe_ \l__block_tagging_recipe_tl : } }
+  \tl_clear:N \@itemlabel
+  \tl_clear:N \@listctr
+  \legacy_if_set_false:n { @nmbrlist }
   \l__block_setup_code_tl
   \__block_debug_typeout:n{use~ instance:~
            \l__block_block_instance_tl - \int_use:N \g_block_nesting_depth_int }
@@ -501,15 +479,12 @@
       \mode_leave_vertical:
       \legacy_if_gset_false:n { @inlabel }
     }
-  \legacy_if:nT { @newlist }
-    {
-      \@noitemerr
-      \legacy_if_gset_false:n { @newlist }
-    }
+  \__block_if_list:T { \legacy_if:nT { @newlist } { \@noitemerr } }
   \mode_if_horizontal:TF
        { \__block_skip_remove_last: \__block_skip_remove_last: \par }
        { \@inmatherr{\end{\@currenvir}} }
   \__kernel_displayblock_end:
+  \__block_if_list:T { \legacy_if_gset_false:n { @newlist } }
   \legacy_if:nF { @noparlist }
     {
       \__block_skip_set_to_last:N \l_tmpa_skip
@@ -523,6 +498,8 @@
     }
   \socket_use:n {tagsupport/block-endpe}
 }
+\cs_new:Npn \__block_if_list:T
+   { \tl_if_eq:NnT \l__block_block_instance_tl {list} }
 \cs_new:Npn \__kernel_displayblock_end: {
   \__block_debug_typeout:n{\detokenize{__kernel_displayblock_end:}}
 }
@@ -556,6 +533,7 @@
   par-skip        = \parsep ,
   end-skip        = \l__block_botsep_skip ,
   end-par-skip    = \l__block_parbotsep_skip ,
+  item-skip       = \itemsep ,
   beginpenalty    = \@beginparpenalty ,
   endpenalty      = \@endparpenalty ,
   rightmargin     = \rightmargin ,
@@ -656,6 +634,7 @@
 }
 \tl_new:N \@itemlabel         % should have a top-level definition
 \tl_new:N \@listctr           % should have a top-level definition
+\cs_new_eq:NN \__block_evaluate_saved_user_keys:nn \use_none:nn
 \DeclareTemplateCode{list}{std}{1}
 {
   counter         = \l__block_counter_tl,
@@ -672,18 +651,23 @@
 }
 {
   \__block_debug_typeout:n{template:list:std}
-  \tl_if_empty:nF {#1} { \SetTemplateKeys{list}{std}{#1} }
+  \tl_if_empty:nTF {#1}
+     { \cs_set_eq:NN \__block_evaluate_saved_user_keys:nn \use_none:nn }
+     {
+       \SetTemplateKeys{list}{std}{#1}
+       \cs_set:Npe \__block_evaluate_saved_user_keys:nn ##1##2
+          { \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
+     }
   \tl_if_empty:NTF \l__block_counter_tl
     {
-     \tl_if_blank:oF \@listctr
-       {
+    \legacy_if:nT { @nmbrlist }
+        {
          \bool_if:NF \l__block_resume_bool
            {
              \int_gset:cn{ c@ \@listctr }
                  { \l__block_counter_start_int - 1 }
            }
-       }
-       { \@nmbrlistfalse }
+        }
     }
     {
      \@nmbrlisttrue
@@ -699,6 +683,7 @@
       \tl_set_eq:NN \@itemlabel \l__block_item_label_tl
     }
     \legacy_if_gset_true:n { @newlist }
+    \cs_set_eq:NN \__block_item_everypar: \__block_item_everypar_first:
   \__block_debug_typeout:n{template:list:std~end}
 }
 \keys_define:nn { template/list/std }
@@ -735,6 +720,7 @@
   {
     \__block_debug_typeout:n{template:item:std}
     \tl_set_eq:NN \l__block_label_given_tl \c_novalue_tl
+    \__block_evaluate_saved_user_keys:nn {item}{std}
     \tl_if_empty:nF{#1}{ \SetTemplateKeys{item}{std}{#1} }
     \tl_if_novalue:oTF \l__block_label_given_tl
       {
@@ -806,8 +792,8 @@
 \cs_new_eq:NN \__kernel_list_label_begin: \prg_do_nothing:
 \cs_new_eq:NN \__kernel_list_label_end:   \prg_do_nothing:
 \cs_new_eq:NN \__block_item_everypar: \prg_do_nothing:
-\AddToHook{para/begin}[lists]{\__block_item_everypar:}
-\DeclareHookRule{para/begin}{lists}{after}{tagpdf}
+\AddToHook{para/begin}[items]{\__block_item_everypar:}
+\DeclareHookRule{para/begin}{items}{after}{tagpdf}
 \cs_new_protected:Npn \__block_item_everypar_std: {
     \__block_debug_typeout:n{item~ everypar \on at line }
     \legacy_if_set_false:n { @minipage }
@@ -831,6 +817,9 @@
          \cs_set_eq:NN \__block_item_everypar: \prg_do_nothing:
        }
 }
+\cs_new:Npn \__block_item_everypar_first: {
+  \legacy_if:nT { @newlist }  { \@noitemerr }
+}
 \cs_new_eq:NN \__kernel_list_label_after: \prg_do_nothing:
 \skip_new:N \l__block_tmpa_skip
 \skip_new:N \l__block_topsepadd_skip
@@ -846,8 +835,11 @@
         }
         {
           \legacy_if:nTF { @newlist }
-            { \__kernel_list_item_begin: }
-            { \__block_inter_item:            }
+            {
+              \__kernel_list_item_begin:
+              \legacy_if_gset_false:n { @newlist }
+            }
+            { \__block_inter_item: }
           \tl_if_novalue:nTF {#1}          % avoids reparsing label={}
             { \__block_item_instance:n { } }
             { \__block_item_instance:n {#1} }
@@ -1464,13 +1456,16 @@
   \tagstructend \tagstructend   % end LBody, LI
 }
 \cs_set:Npn \__block_list_end: {
-  \legacy_if:nT { @endpe }
+  \legacy_if:nF { @newlist }
     {
-      \__tag_gincr_para_main_end_int:
-      \tagstructend                       % text-unit
-      \__block_debug_typeout:n{Structure-end~ P~ at~ list-end \on at line }
+      \legacy_if:nT { @endpe }
+        {
+          \__tag_gincr_para_main_end_int:
+          \tagstructend                       % text-unit
+          \__block_debug_typeout:n{Structure-end~ P~ at~ list-end \on at line }
+        }
+      \tagstructend\tagstructend  % end LBody, LI
     }
-  \tagstructend\tagstructend  % end LBody, LI
   \tagstructend               % end L
 }
 }

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,9 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-08-11}
-\def\ltlabfirstaidversion{0.85e}
-
+\def\ltlabfirstaiddate{2024-10-04}
+\def\ltlabfirstaidversion{0.85g}
 \ProvidesPackage {latex-lab-testphase-firstaid} [%
    \ltlabfirstaiddate\space v\ltlabfirstaiddate\space
    Temporary patches to external packages needed for the tagging project]
@@ -51,7 +50,6 @@
       } }
   \exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
 }
-\ExplSyntaxOff
 
 \AddToHook{class/amsart/after}
  {\def\@author{\authors}}
@@ -59,6 +57,112 @@
  {\def\@author{\authors}}
 \AddToHook{class/amsproc/after}
  {\def\@author{\authors}}
+\AddToHook{class/amsart/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\__tag_firstaid_amsthm:}}
+\AddToHook{class/amsbook/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\__tag_firstaid_amsthm:}}
+\AddToHook{class/amsproc/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\__tag_firstaid_amsthm:}}
+\AddToHook{package/amsthm/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\__tag_firstaid_amsthm:}}
+\cs_new_protected:Npn \__tag_firstaid_amsthm:
+  {
+    \def\@endtheorem{\endblockenv}
+    \RenewDocumentCommand\@thm{mmmO{}}{%
+      \ifhmode\unskip\unskip\par\fi
+      \normalfont
+      \let\thmheadnl\relax
+      \let\thm at swap\@gobble
+      \thm at notefont{\fontseries\mddefault\upshape}%
+      \thm at headpunct{.}% add period after heading
+      \thm at headsep 5\p@ plus\p@ minus\p@\relax
+      \thm at space@setup
+      ##1% style overrides
+      \@topsep \thm at preskip               % used by thm head
+      \@topsepadd \thm at postskip           % used by \@endparenv
+      \tl_set:Nn \l__block_thm_current_counter_tl{##2}
+      \tl_if_empty:nTF{##2}
+       {
+        \@begintheorem{##3}{}[##4]
+       }
+       {
+         \@kernel at refstepcounter{##2}
+         \@begintheorem{##3}{\csname the##2\endcsname}[##4]
+       }
+      }
+    \def\@begintheorem##1##2[##3]{%
+      \UseInstance{blockenv}{theorem}{}
+      \tagpdfparaOff
+      \mode_leave_vertical:
+      \MakeLinkTarget{\l__block_thm_current_counter_tl}
+      \group_begin:
+      \normalfont
+      \the\thm at headfont \thm at indent
+        \@ifempty{##1}
+         {\let\thmname\@gobble}
+         {\def\thmname####1{\tag_mc_begin:n {}####1\tag_mc_end:}}%
+        \@ifempty{##2}
+         {\let\thmnumber\@gobble}
+         {\def\thmnumber####1
+           {\tag_struct_begin:n{tag=Lbl}\tag_mc_begin:n {}
+             ####1
+            \tag_mc_end:\tag_struct_end:}}%
+        \@ifempty{##3}
+         {\let\thmnote\@gobble}
+         {\def\thmnote####1{\tag_mc_begin:n{}####1\tag_mc_end:}}%
+        \thm at swap\swappedhead\thmhead{##1}{##2}{##3}%
+        \thmheadnl % possibly a newline.
+        \hskip\thm at headsep
+      \group_end:
+       \tagpdfparaOn
+       \UseTaggingSocket{para/begin}  %
+      \ignorespaces}
+    \def\thmhead at plain##1##2##3{%
+      \tag_struct_begin:n{tag=Caption}
+      \thmname{##1}
+      \thmnumber{
+        \@ifnotempty{##1}{~}\@upn{##2}
+       }%
+      \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+      %moved for easier tagging
+      \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:
+      \tag_struct_end:
+      }
+    \let\thmhead\thmhead at plain
+    \def\swappedhead##1##2##3{%
+      \tag_struct_begin:n{tag=Caption}
+      \thmnumber{##2}
+      \thmname{\@ifnotempty{##2}{\nobreakspace}##1}
+      \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+      \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:
+      \tag_struct_end:
+     }
+    \let\swappedhead at plain=\swappedhead
+    \renewcommand{\openbox}{\leavevmode
+      \hbox to.77778em{\pdf_bdc:nn{Span}{/ActualText<FEFF220E>}%
+      \pdffakespace\hfil\vrule
+      \vbox to.675em{\hrule width.6em\vfil\hrule}%
+      \vrule\hfil\pdf_emc:}}
+    \renewenvironment{proof}[1][\proofname]{\par
+      \pushQED{\qed}%
+      \UseInstance{blockenv}{theorem}{beginsep=6\p@\@plus6\p@}
+      \normalfont
+      \tagpdfparaOff
+      \AddToHookNext{para/begin}
+       {\tag_struct_begin:n{tag=Caption}
+        \tag_mc_begin:n{}%
+         \textit{##1\@addpunct{.}}%
+        \tag_mc_end:
+        \tag_struct_end:
+        \tagpdfparaOn
+        \UseTaggingSocket{para/begin}
+        \pdffakespace\hspace{\labelsep}}
+      \ignorespaces
+    }{%
+      \popQED\endblockenv\par
+     }
+  }
+\ExplSyntaxOff
 \AddToHook{package/verse/after}[latex-lab-firstaid]{%
   \FirstAidNeededT{verse}{sty}{2014/05/10 v2.4b verse typesetting}%
    {%
@@ -87,41 +191,6 @@
      }%
    }%
 }
-\AddToHook{file/blindtext.sty/after}[latex-lab-firstaid]{%
-  \FirstAidNeededT{blindtext}{sty}{\blindfiledate\space\blindfileversion\space%
-                 blindtext-Package}%
-   {%
-    \renewcommand{\blind at items}{%
-       \setcounter{blind at listcount}{1}%
-      \loop
-      \ifblind at optional
-        \ifblind at long
-          \item[\blindtext at countitem] \blindtext at text
-        \else
-          \item[\blindtext at count] \blindtext at item
-        \fi
-        \else % \blind at optionalfalse
-          \ifblind at long
-            \item \blindtext at text
-          \else
-            \item \blindtext at countitem
-          \fi
-        \fi % \ifblind at optional
-        {%
-          \loop
-          \ifnum\value{blindlistlevel}>\value{blindlist at level}%
-            \stepcounter{blind at levelcount}%
-            \blind at list[\value{blindlist}]\relax
-            \addtocounter{blind at levelcount}{-1}%
-            \setcounter{blind at listcount}{1}%
-          \repeat
-        \expandafter}\if at endpe\@doendpe\fi % <----------changed
-      \ifnum\value{blind at listcount}<\value{blindlist}%
-        \stepcounter{blind at listcount}%
-      \repeat
-    }
-   }%
- }
 \AddToHook{package/cleveref/after}
  {
    \let\@makefntext\cref at old@makefntext
@@ -161,6 +230,102 @@
     \cr}
   }
 \ExplSyntaxOff
+
+\ExplSyntaxOn
+\AddToHook{package/fancyvrb/after}
+{
+    \def\FV at LeaveVMode{%
+      \if at noskipsec
+        \leavevmode
+      \else
+        \if at FV@ResetMargins\if at inlabel\leavevmode\fi\fi
+      \fi
+      \ifvmode
+        \@noparlisttrue
+        \__tag_gincr_para_main_begin_int:
+        \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl}
+      \else
+        \bool_set_true:N\l__tag_para_flattened_bool
+        \@noparlistfalse
+        \unskip\par
+      \fi
+      }
+    \def\FV at List#1{%
+      \begingroup
+      \FV at UseKeyValues
+      \FV at LeaveVMode
+      \if at inlabel\else\setbox\@labels=\box\voidb at x\fi
+      \FV at ListNesting{#1}%
+      \FV at ListParameterHook
+      \FV at ListVSpace
+      \FV at SetLineWidth
+      \FV at InterLinePenalty
+      \let\FV at ProcessLine\FV at ListProcessLine@i
+      \FV at CatCodes
+      \FV at FormattingPrep
+      \FV at ObeyTabsInit
+      \cs_if_exist:NT \FV at BeginListFrame
+        {
+         \tag_mc_begin:n{artifact}
+         \FV at BeginListFrame
+         \tag_mc_end:
+        }
+      \tag_struct_begin:n{tag=verbatim}
+      }
+    \def\FV at EndList{%
+      \FV at ListProcessLastLine
+      \tag_struct_end:
+      \cs_if_exist:NT \FV at EndListFrame
+        {
+         \tag_mc_begin:n{artifact}
+         \FV at EndListFrame
+         \tag_mc_end:
+        }
+      \@endparenv
+      \endgroup
+      \@endpetrue
+      }
+    \def\FV at ListProcessLine#1{%
+      \hbox to \hsize{%
+        \kern\leftmargin
+        \hbox to \linewidth{%
+          \cs_if_exist:NT \FV at LeftListNumber
+           {
+             \tag_struct_begin:n{tag=Lbl}
+             \tag_mc_begin:n{}
+             \FV at LeftListNumber
+             \tag_mc_end:
+             \tag_struct_end:
+           }
+          \cs_if_exist:NT \FV at LeftListFrame
+           {
+             \tag_mc_begin:n{artifact}
+             \FV at LeftListFrame
+             \tag_mc_end:
+           }
+          \tag_struct_begin:n{tag=codeline}
+          \tag_mc_begin:n{}%
+          \FancyVerbFormatLine{#1}%
+          \tag_mc_end:
+          \tag_struct_end:\hss
+          \cs_if_exist:NT \FV at RightListFrame
+           {
+             \tag_mc_begin:n{artifact}
+             \FV at RightListFrame
+             \tag_mc_end:
+           }
+          \cs_if_exist:NT \FV at RightListNumber
+           {
+             \tag_struct_begin:n{tag=Lbl}
+             \tag_mc_begin:n{}
+             \FV at RightListNumber
+             \tag_mc_begin:n{}
+             \tag_struct_end:
+           }
+          }
+          \hss}}
+  }
+\ExplSyntaxOff
 \endinput
 %%
 %% End of file `latex-lab-testphase-firstaid.sty'.

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-07-05}
-\def\ltlabfloatversion{0.81e}
+\def\ltlabfloatdate{2024-09-20}
+\def\ltlabfloatversion{0.81f}
 \ProvidesExplPackage {latex-lab-testphase-float} {\ltlabfloatdate} {\ltlabfloatversion}
   {Code related to the tagging of floats}
 \prop_new:N \g__tag_float_sect_prop
@@ -42,8 +42,14 @@
 \seq_gput_right:Nn \g__tag_float_types_seq {figure}
 \seq_gput_right:Nn \g__tag_float_types_seq {table}
 \tl_new:N\@current at float@struct
+\int_new:N\g__tag_float_int
 \bool_new:N       \g__tag_float_sect_bool
 \bool_gset_true:N  \g__tag_float_sect_bool
+\cs_new_protected:Npn \__tag_float_init:
+ {
+   \int_gincr:N \g__tag_float_int
+   \tl_set:Ne \@current at float@struct { \int_use:N \g__tag_float_int}
+ }
 \cs_new_protected:Npn\__tag_float_init_collect:
   {
     \bool_if:NT\g__tag_float_sect_bool
@@ -91,12 +97,39 @@
   {
    split-float .code:n =
     {
-      \__tag_float_end:
-      \__tag_float_begin:
-      \MakeLinkTarget*{floatstructure.\int_use:N\c at g__tag_struct_abs_int}
+      \UseTaggingSocket{float/end}
+      \__tag_float_init:
+      \UseTaggingSocket{float/begin}
+      \MakeLinkTarget*{floatstructure.\@current at float@struct}
     }
  }
-
+\str_if_exist:cF { l__socket_tagsupport/float/begin_plug_str }
+  {
+    \NewSocket{tagsupport/float/hmode/begin}{0}
+    \NewSocket{tagsupport/float/hmode/end}{0}
+    \NewSocket{tagsupport/float/begin}{0}
+    \NewSocket{tagsupport/float/end}{0}
+  }
+\NewSocketPlug {tagsupport/float/hmode/begin}{default}
+  {
+    \__tag_float_stop_par:
+  }
+\AssignSocketPlug{tagsupport/float/hmode/begin}{default}
+\NewSocketPlug{tagsupport/float/hmode/end}{default}
+  {
+    \__tag_float_start_par:
+  }
+\AssignSocketPlug{tagsupport/float/hmode/end}{default}
+\NewSocketPlug{tagsupport/float/begin}{default}
+  {
+    \__tag_float_begin:
+  }
+\AssignSocketPlug{tagsupport/float/begin}{default}
+\NewSocketPlug{tagsupport/float/end}{default}
+  {
+    \__tag_float_end:
+  }
+\AssignSocketPlug{tagsupport/float/end}{default}
 \cs_new_protected:Npn \__tag_float_stop_par:
   {
     \tag_mc_end:
@@ -113,7 +146,6 @@
      }
    \tag_mc_begin:n{tag=P}
   }
-
 \cs_new_protected:Npn \__tag_float_begin:
  {%
   \bool_if:NTF\g__tag_float_sect_bool
@@ -147,7 +179,7 @@
    \fi
    \ifhmode
      \@bsphack
-     \@nameuse{__tag_float_stop_par:}% <---end P
+     \UseTaggingSocket{float/hmode/begin}%
      \@floatpenalty -\@Mii
    \else
      \@floatpenalty-\@Miii
@@ -190,7 +222,8 @@
        }%
     \@fltovf
   \fi
-  \@nameuse{__tag_float_begin:}%
+  \csname __tag_float_init:\endcsname
+  \UseTaggingSocket{float/begin}%
   \global \setbox\@currbox
     \color at vbox
       \normalcolor
@@ -198,11 +231,11 @@
         \hsize\columnwidth
         \@parboxrestore
         \@floatboxreset
-        \MakeLinkTarget*{floatstructure.\number\value{g__tag_struct_abs_int}}%
+        \MakeLinkTarget*{\@captype.struct.\@current at float@struct}%
 }%
 \def\end at float{%
   \@endfloatbox
-  \@nameuse{__tag_float_end:}%
+  \UseTaggingSocket{float/end}%
   \ifnum\@floatpenalty <\z@
     \@largefloatcheck
     \@cons\@currlist\@currbox
@@ -214,7 +247,7 @@
       \penalty\@floatpenalty
     \else
       \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
-      \@nameuse{__tag_float_start_par:}% restart P safe here??
+      \UseTaggingSocket{float/hmode/end}%
     \fi
   \fi
 }
@@ -221,7 +254,7 @@
 \def\end at dblfloat{%
   \if at twocolumn
     \@endfloatbox
-    \@nameuse{__tag_float_end:}%
+    \UseTaggingSocket{float/end}%
     \ifnum\@floatpenalty <\z@
       \@largefloatcheck
       \global\dp\@currbox1sp %
@@ -234,7 +267,7 @@
         \penalty\@floatpenalty
       \else
         \vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
-        \@nameuse{__tag_float_start_par:}% restart P safe here??
+        \UseTaggingSocket{float/hmode/end}%
       \fi
     \fi
   \else
@@ -243,7 +276,55 @@
 }%
 \ExplSyntaxOn
 \def\hyper at nopatch@caption{}
-\let\@kernel at refstepcounter\refstepcounter %as long it is not in the kernel
+\str_if_exist:cF { l__socket_tagsupport/caption/begin_plug_str }
+ {
+  \NewSocket{tagsupport/caption/begin}{1}
+  \NewSocket{tagsupport/caption/end}{0}
+  \NewSocket{tagsupport/caption/label/begin}{0}
+  \NewSocket{tagsupport/caption/label/end}{0}
+ }
+\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
+ {
+   \NewSocket{tagsupport/para/begin}
+   \NewSocket{tagsupport/para/end}
+ }
+\NewSocket{caption/label}{1}
+\NewSocketPlug{caption/label}{kernel}
+ {
+   #1:~
+ }
+\AssignSocketPlug{caption/label}{kernel}
+\NewSocketPlug {tagsupport/caption/begin}{default}
+  {
+     \tl_if_empty:eTF {#1}
+      {
+        \tag_struct_begin:n{tag=Caption,firstkid}
+      }
+      {
+        \tag_struct_begin:n{tag=Caption,parent=#1,firstkid}
+      }
+     \bool_set_true:N \l__tag_para_flattened_bool
+  }
+\AssignSocketPlug{tagsupport/caption/begin}{default}
+\NewSocketPlug {tagsupport/caption/end}{default}
+  {
+    \tag_struct_end:
+  }
+\AssignSocketPlug{tagsupport/caption/end}{default}
+\NewSocketPlug {tagsupport/caption/label/begin}{default}
+  {
+     \tagpdfparaOff
+     \tag_struct_begin:n{tag=Lbl}
+     \tag_mc_begin:n{}
+  }
+\AssignSocketPlug{tagsupport/caption/label/begin}{default}
+\NewSocketPlug {tagsupport/caption/label/end}{default}
+  {
+    \tag_mc_end:
+    \tag_struct_end:
+    \tagpdfparaOn
+  }
+\AssignSocketPlug{tagsupport/caption/label/end}{default}
 \def\caption{%
    \ifx\@captype\@undefined
      \@latex at error{\noexpand\caption\c_space_tl outside~float}\@ehd
@@ -255,52 +336,39 @@
       }
       {
         \@kernel at refstepcounter\@captype
-        \xdef\@currentHref{floatstructure.\@current at float@struct}%
+        \xdef\@currentHref{\@captype.struct.\@current at float@struct}%
       }
      \expandafter\@firstofone
    \fi
    {\@dblarg{\@caption\@captype}}%
 }
-\providecommand\theHg__tag_struct_abs_int{\int_use:N\c at g__tag_struct_abs_int}
-
 \AddToHook{begindocument}
   {
     \long\def\@makecaption#1#2{%
       \vskip\abovecaptionskip
-      \tag_stop:n{caption}
+      \SuspendTagging{\@makecaption}
       \sbox\@tempboxa{#1:~#2}%
-      \tag_start:n{caption}
-      \tagtool{para=false}
-      \tl_if_empty:NT \@current at float@struct
-       { \tl_set:Ne \@current at float@struct {\tag_get:n{struct_num}} }
-      \tag_struct_begin:n{tag=Caption,parent=\@current at float@struct}
-      \tag_if_active:T
-       {
-         \seq_gpop_right:cN {g__tag_struct_kids_\@current at float@struct _seq}\l__tag_tmpa_tl
-         \seq_gput_left:cV  {g__tag_struct_kids_\@current at float@struct _seq}\l__tag_tmpa_tl
-       }
+      \ResumeTagging{\@makecaption}
+      \UseTaggingSocket{caption/begin}{\@current at float@struct}
       \ifdim \wd\@tempboxa >\hsize
-        \tag_struct_begin:n{tag=Lbl}
-        \tag_mc_begin:n{}
-          #1:~
-        \tag_mc_end:
-        \tag_struct_end:
-        \tag_mc_begin:n{}
-          #2\par
-        \tag_mc_end:
+      \UseTaggingSocket{caption/label/begin}
+      \UseSocket{caption/label}{#1}
+      \UseTaggingSocket{caption/label/end}
+      \UseTaggingSocket{para/begin}
+          #2
+      \par
       \else
           \global \@minipagefalse
         \hb at xt@\hsize{\hfil
-         \tag_struct_begin:n{tag=Lbl}
-          \tag_mc_begin:n{}
-           #1:~
-          \tag_mc_end:
-         \tag_struct_end:
-         \tag_mc_begin:n{}
+         \UseTaggingSocket{caption/label/begin}
+         \UseSocket{caption/label}{#1}
+         \UseTaggingSocket{caption/label/end}
+         \UseTaggingSocket{para/begin}
           #2
-         \tag_mc_end:\hfil}%
+         \UseTaggingSocket{para/end}
+         \hfil}%
        \fi
-       \tag_struct_end: %caption
+      \UseTaggingSocket{caption/end}
       \vskip\belowcaptionskip}
   }
 

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-graphic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-graphic.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-graphic.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-graphic.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabgraphicdate{2024-07-05}
-\def\ltlabgraphicversion{0.80d}
+\def\ltlabgraphicdate{2024-09-18}
+\def\ltlabgraphicversion{0.80e}
 \ProvidesExplPackage {latex-lab-testphase-graphic} {\ltlabgraphicdate} {\ltlabgraphicversion}
   {Code related to the tagging of graphics}
 \RequirePackage{l3opacity}
@@ -222,7 +222,7 @@
                \bool_set_true:N \l__tag_graphic_artifact_bool
                \bool_set_false:N \l__tag_graphic_BBox_bool
             }
-            {false}{\tag_stop:}
+            {false}{\tag_suspend:n{Gin}}
           }
           {\tl_set:Nn\l__tag_graphic_struct_tl{#1}}
       }
@@ -257,7 +257,7 @@
                \bool_set_true:N \l__tag_graphic_artifact_bool
                \bool_set_false:N \l__tag_graphic_BBox_bool
             }
-            {false}{\tag_stop:}
+            {false}{\tag_suspend:n{picture}}
           }
           {\tl_set:Nn\l__tag_graphic_struct_tl{#1}}
       }
@@ -657,7 +657,7 @@
   \@defaultunitsset\@tempdimc{#1}\unitlength
   \Gin at tag@struct at begin
   \setbox\@picbox\hb at xt@\@tempdimc\bgroup
-    \tag_stop: %do not tag inside the picture box
+    \tag_suspend:n{\@picture} %do not tag inside the picture box
     \@defaultunitsset\@tempdimc{#3}\unitlength
     \hskip -\@tempdimc
     \@defaultunitsset\@tempdimc{#4}\unitlength

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-marginpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-marginpar.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-marginpar.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,8 +34,8 @@
 %% 
 %% File: latex-lab-marginpar.dtx
 %%
-\def\ltlabmarginpardate{2024-08-06}
-\def\ltlabmarginparversion{0.85c}
+\def\ltlabmarginpardate{2024-09-18}
+\def\ltlabmarginparversion{0.85d}
 
 \ProvidesExplPackage {latex-lab-testphase-marginpar} {\ltlabmarginpardate} {\ltlabmarginparversion}
   {Changes related to the tagging of the margin notes}
@@ -93,9 +93,9 @@
 \long\def\@ympar#1{%
   \@savemarbox\@marbox{#1}%
   \global\setbox\@currbox\copy\@marbox
-  \tag_stop:
+  \tag_suspend:n{\@ympar}
   \@xympar
-  \tag_start:}
+  \tag_resume:n{\@ympar}}
 \long\def\@xmpar[#1]#2{%
   \int_gincr:N\g__kernel_marginpar_int
   \property_if_recorded:eTF { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }
@@ -104,21 +104,21 @@
        \property_record:ee
          { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}
        }%
-     \tag_stop:
+     \tag_suspend:n{\@xmpar}
      \@savemarbox\@currbox{#2}%
-     \tag_start:
+     \tag_resume:n{\@xmpar}
     }
     {
      \@savemarbox\@currbox{#2}%
-     \tag_stop:
+     \tag_suspend:n{\@xmpar}
      \@savemarbox\@marbox{#1
        \property_record:ee
          { tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}}
-     \tag_start:
+     \tag_resume:n{\@xmpar}
     }
-  \tag_stop:
+  \tag_suspend:n{\@xmpar}
   \@xympar
-  \tag_start:
+  \tag_resume:n{\@xmpar}
   }
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-minipage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-minipage.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-minipage.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,8 +34,8 @@
 %% 
 %% File: latex-lab-minipage.dtx
 %%
-\def\ltlabminipagedate{2024-08-08}
-\def\ltlabminipageversion{0.81d}
+\def\ltlabminipagedate{2024-09-18}
+\def\ltlabminipageversion{0.81e}
 \ProvidesExplPackage {latex-lab-testphase-minipage}
   {\ltlabminipagedate} {\ltlabminipageversion}
   {Code related to the tagging of minipages and parboxes}
@@ -78,9 +78,9 @@
     \@minipagefalse   %% added 24 May 89
   \color at endgroup
   \egroup
-  \tag_stop:n{minipage}
+  \tag_suspend:n{minipage}
   \expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}%
-  \tag_start:n{minipage}
+  \tag_resume:n{minipage}
   \UseTaggingSocket{minipage/after} %new end ...
   }
 \long\def\@iiiparbox#1#2[#3]#4#5{%

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-sec.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,16 +33,19 @@
 %% 
 %% 
 %% File: latex-lab-sec.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabsecdate{2024-07-05}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
 \ProvidesExplPackage {latex-lab-testphase-sec} {\ltlabsecdate} {\ltlabsecversion}
   {Code related to the tagging of sectioning commands}
 \RequirePackage{latex-lab-kernel-changes}
 \seq_new:N   \g__tag_sec_stack_seq
-\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}}
+\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}{2}}
+\cs_new:Npn \__tag_get_data_current_Sect:
+ {
+   \exp_last_unbraced:Ne\use_iii:nnn{\seq_item:Nn\g__tag_sec_stack_seq{1}}
+ }
 \bool_new:N     \l__tag_sec_Sect_bool
 \bool_set_true:N\l__tag_sec_Sect_bool
-
 \cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval
   {
     \tag_struct_begin:n
@@ -50,7 +53,8 @@
          tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}}
         ,#2
       }
-    \seq_gpush:Ne \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}}
+    \seq_gpush:Ne \g__tag_sec_stack_seq
+      {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}{\g__tag_struct_stack_current_tl}}
   }
 \msg_new:nnn { tag } {wrong-sect-nesting}
   {
@@ -61,12 +65,12 @@
 \cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level
   {
     \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
-    \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1}
+    \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nnn\l__tag_tmpa_tl+1}
       {
         \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl
         \exp_args:Nee
           \tl_if_eq:nnTF
-            {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl}
+            {\exp_last_unbraced:NV\use_i:nnn\l__tag_tmpa_tl}
             {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl}
             {
               \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
@@ -75,7 +79,7 @@
             }
             {
               \msg_warning:nnee {tag}{wrong-sect-nesting}
-               { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl }
+               { \exp_last_unbraced:NV\use_i:nnn \l__tag_tmpa_tl }
                { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl }
             }
       }
@@ -187,7 +191,7 @@
           \IfBooleanTF
             {#1}
             { \@spart {#3} }
-            { \@part [#2]{#3} }
+            { \@part [{#2}]{#3} }
          \tag_tool:n {sec-stop-part}
          }
        }
@@ -219,7 +223,7 @@
         \IfBooleanTF
           {#1}
           { \@schapter {#3} }
-          { \@chapter [#2]{#3} }
+          { \@chapter [{#2}]{#3} }
         \tag_tool:n {sec-stop-chapter}
       }
      \RenewDocumentCommand\part{ s O{#3} m }
@@ -257,7 +261,7 @@
         \IfBooleanTF
           {#1}
           { \@spart {#3} }
-          { \@part [#2]{#3} }
+          { \@part [{#2}]{#3} }
         \tag_tool:n{sec-stop-part}
       }
     }
@@ -303,9 +307,9 @@
             {\tagmcbegin{tag=Lbl}}
            {#1}
          }
-   \tag_stop:n{hangfrom}
+   \tag_suspend:n{hangfrom}
    \hangindent \wd\@tempboxa\noindent
-   \tag_start:n{hangfrom}
+   \tag_resume:n{hangfrom}
    \tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}}
 \cs_new_protected:Npn \@kernel at tag@svsec
   {
@@ -329,7 +333,7 @@
   \@tempskipa #5\relax
   \ifdim \@tempskipa>\z@
     \begingroup
-    \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool
+    \tagtool{para-flattened=true} % or \bool_set_true\l_@@_para_flattened_bool
       #6{%
          \ifnum #2>\c at secnumdepth
           \@hangfrom {\hskip #3\relax\@svsec}%

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-table.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-table.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-table.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-08-10}
-\def\ltlabtblversion{0.85m}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
 \ProvidesExplPackage {latex-lab-testphase-table} {\ltlabtbldate} {\ltlabtblversion}
   {Code related to the tagging of tables}
 \RequirePackage{array}
@@ -647,9 +647,9 @@
       }
     \hbox to\z@{\hss\parbox[t]\LTcapwidth{%
     \reset at font
-    \tag_stop:n{caption}
+    \tag_suspend:n{caption}
     \sbox\@tempboxa{#1{#2:~}#3}%
-    \tag_start:n{caption}
+    \tag_resume:n{caption}
     \ifdim\wd\@tempboxa>\hsize
       #1{#2:~}#3%
     \else

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-text.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-text.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-text.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-text.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtextdate{2023-07-20}
-\def\ltlabtextversion{0.85a}
+\def\ltlabtextdate{2024-09-18}
+\def\ltlabtextversion{0.85b}
 
 \ProvidesExplPackage {latex-lab-testphase-text} {\ltlabtextdate} {\ltlabtextversion}
   {Code related to the tagging of various small text commands}
@@ -45,11 +45,11 @@
     \tag_mc_end_push:
     \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
     \tag_mc_begin:n{}
-    \tag_stop:n{LaTeX}
+    \tag_suspend:n{LaTeX}
   }
 \AddToHook{cmd/LaTeX/after}
  {
-   \tag_start:n{LaTeX}
+   \tag_resume:n{LaTeX}
    \tag_mc_end:
    \tag_struct_end:
    \tag_mc_begin_pop:n{}

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-toc.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -36,8 +36,8 @@
 %% 
 %% 
 %% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2024-07-11}
-\def\ltlabtocversion{0.85c}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
 \ProvidesExplPackage {latex-lab-testphase-toc} {\ltlabtocdate} {\ltlabtocversion}
   { Code related to the tagging of toc-like lists}
 %% File: latex-lab-toc-kernel-changes.dtx (C) Copyright 2022-2024 LaTeX Project
@@ -286,45 +286,26 @@
      \fi}
  }
 %% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2024-07-11}
-\def\ltlabtocversion{0.85c}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
 \tl_new:N \l__tag_toc_tmpa_tl
-\AddToHook{cmd/refstepcounter/after}
- {
-   \tl_if_blank:VF \@currentHref
-    {
-      \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
-    }
- }
-\AddToHook{cmd/H at refstepcounter/after}
- {
-   \tl_if_blank:VF \@currentHref
-    {
-      \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
-    }
- }
-\msg_new:nnn { tag } {struct-dest-unknown}
- {
-   Destination~#1~has~no~related~structure.\\
-   /Ref~for~structure~#2~not~updated
- }
-
-\cs_new_protected:Npn \g__tag_struct_ref_by_dest:
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
   {
-    \prop_map_inline:Nn\g__tag_struct_ref_by_dest_prop
-      {
-        \prop_get:NnNTF \g__tag_struct_dest_num_prop {##2} \l__tag_tmpa_tl
-          {
-            \__tag_struct_gput_data_ref:ee
-              { ##1 }
-              { \tag_struct_object_ref:e{ \l__tag_tmpa_tl }}
-          }
-          {
-            \msg_warning:nnnn {tag}{struct-dest-unknown}{##2}{ ##1}
-          }
-      }
-  }
-\hook_gput_code:nnn {tagpdf/finish/before}{tagpdf/struct/Ref}{\g__tag_struct_ref_by_dest:}
+    \AddToHook{cmd/refstepcounter/after}
+     {
+       \tl_if_blank:VF \@currentHref
+        {
+          \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+        }
+     }
+    \AddToHook{cmd/H at refstepcounter/after}
+     {
+       \tl_if_blank:VF \@currentHref
+        {
+          \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+        }
+     }
+   }
 \int_new:N \g__tag_toc_level_int
 \seq_new:N \g__tag_toc_stack_seq
 
@@ -395,9 +376,9 @@
           \int_gset:Nn \g__tag_toc_level_int { \use:c{toclevel@#1} }
           \group_begin:
            \text_declare_expand_equivalent:Nn \numberline \use_none:n
-           \exp_args:Ne \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
-           \prop_gput:Nee \g__tag_struct_ref_by_dest_prop
-             { \tag_get:n {struct_num} }{#4}
+           \exp_args:Ne
+           \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
+           \tag_struct_gput:nnn { \tag_get:n {struct_num} }{ref_dest}{#4}
            \seq_gpush:Ne \g__tag_toc_stack_seq {{TOCI}\use:c{toclevel@#1}}
           \group_end:
        }

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/marginpar-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/marginpar-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/marginpar-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,8 +34,8 @@
 %% 
 %% File: latex-lab-marginpar.dtx
 %%
-\def\ltlabmarginpardate{2024-08-06}
-\def\ltlabmarginparversion{0.85c}
+\def\ltlabmarginpardate{2024-09-18}
+\def\ltlabmarginparversion{0.85d}
 
 \ProvidesFile{marginpar-latex-lab-testphase.ltx}
         [\ltlabmarginpardate\space v\ltlabmarginparversion\space

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/minipage-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/minipage-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/minipage-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -34,8 +34,8 @@
 %% 
 %% File: latex-lab-minipage.dtx
 %%
-\def\ltlabminipagedate{2024-08-08}
-\def\ltlabminipageversion{0.81d}
+\def\ltlabminipagedate{2024-09-18}
+\def\ltlabminipageversion{0.81e}
 
 \ProvidesFile{minipage-latex-lab-testphase.ltx}
         [\ltlabminipagedate\space v\ltlabminipageversion

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/sec-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/sec-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/sec-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-sec.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabsecdate{2024-07-05}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
 
 \ProvidesFile{sec-latex-lab-testphase.ltx}
         [\ltlabsecdate\space v\ltlabsecversion\space latex-lab wrapper sec]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/table-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/table-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/table-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-08-10}
-\def\ltlabtblversion{0.85m}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
 \ProvidesFile{table-latex-lab-testphase.ltx}
         [\ltlabtbldate\space v\ltlabtblversion\space latex-lab wrapper table]
 \RequirePackage{latex-lab-testphase-table}

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/tabular-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/tabular-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/tabular-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-08-10}
-\def\ltlabtblversion{0.85m}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
 
 \ProvidesFile{tabular-latex-lab-testphase.ltx}
         [\ltlabtbldate\space v\ltlabtblversion\space latex-lab wrapper tabular]

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/text-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/text-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/text-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-text.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtextdate{2023-07-20}
-\def\ltlabtextversion{0.85a}
+\def\ltlabtextdate{2024-09-18}
+\def\ltlabtextversion{0.85b}
 
 \ProvidesFile{text-latex-lab-testphase.ltx}
         [\ltlabtextdate\space v\ltlabtextversion\space

Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/toc-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/toc-latex-lab-testphase.ltx	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/toc-latex-lab-testphase.ltx	2024-10-14 19:13:47 UTC (rev 72549)
@@ -33,8 +33,8 @@
 %% 
 %% 
 %% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2024-07-11}
-\def\ltlabtocversion{0.85c}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
 \ProvidesFile{toc-latex-lab-testphase.ltx}
         [\ltlabtocdate\space v\ltlabtocversion latex-lab wrapper toc]
 

Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/.tex	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/.tex	2024-10-14 19:13:47 UTC (rev 72549)
@@ -1,5 +1,5 @@
 %%
-%% This is file `.tex',
+%% This is file `rename-to-empty-base.tex',
 %% generated with the docstrip utility.
 %%
 %% The original source files were:
@@ -38,4 +38,4 @@
  \message{File ignored}
 \endinput
 %%
-%% End of file `.tex'.
+%% End of file `rename-to-empty-base.tex'.

Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/array.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/array.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/array.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -47,7 +47,7 @@
 
 \NeedsTeXFormat{LaTeX2e}[2024/06/01]
 \ProvidesPackage{array}
-         [2024/07/13 v2.6e Tabular extension package (FMi)]
+         [2024/10/12 v2.6g Tabular extension package (FMi)]
 %%
 
 \ExplSyntaxOn
@@ -96,15 +96,16 @@
 \def\save at decl{\toks\count@ \expandafter{\@nextchar}}
 \def\insert at column{%
   \UseTaggingSocket{tbl/cell/begin}%
-   \the at toks \the \@tempcnta
-   \ignorespaces \@sharp \textonly at unskip
+   \@protected at firstofone { \the at toks \the \@tempcnta \ignorespaces }
+   \@sharp \textonly at unskip
    \the at toks \the \count@ \relax
    \UseTaggingSocket{tbl/cell/end}%
 }
 \protected\def\textonly at unskip{\ifhmode\unskip\fi}
+\protected\long\def\@protected at firstofone#1{#1}
 \def\insert at pcolumn{%
    \UseTaggingSocket{tbl/pcell/begin}%
-   \the at toks \the \@tempcnta
+   \the at toks \the \@tempcnta \relax
    \ignorespaces \@sharp \unskip
    \the at toks \the \count@ \relax
    \UseTaggingSocket{tbl/pcell/end}%

Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty	2024-10-14 19:11:51 UTC (rev 72548)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty	2024-10-14 19:13:47 UTC (rev 72549)
@@ -105,7 +105,7 @@
 \DeclareCurrentRelease{}{2021-11-15}
 
 \ProvidesPackage{multicol}
-          [2024/07/01 v1.9h  multicolumn formatting (FMi)]
+          [2024/09/14 v1.9i  multicolumn formatting (FMi)]
 
 \DeclareOption{twocolumn}
    {\PackageWarning{multicol}{May not work
@@ -873,9 +873,17 @@
    \emergencystretch 4pt
    \multiply\emergencystretch#1}
 
+\ExplSyntaxOn
+\str_if_exist:cF { l__socket_tagsupport/float/end_plug_str }
+  {
+    \NewSocket{tagsupport/float/end}{0}
+    \NewSocket{tagsupport/float/hmode/end}{0}
+  }
+\ExplSyntaxOff
 \def\set at floatcmds{%
  \let\@dblfloat\@dbflt
  \def\end at dblfloat{\@endfloatbox
+   \UseTaggingSocket{float/end}%
    \@largefloatcheck
    \outer at nobreak
    \ifnum\@floatpenalty<\z@
@@ -883,6 +891,7 @@
    \fi
    \ifnum\@floatpenalty=-\@Mii
      \@Esphack
+     \UseTaggingSocket{float/hmode/end}%
    \fi}}
 \def\kept at topmark{{}{}}
 \let\kept at firstmark\@empty



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