texlive[72739] Master/texmf-dist: latex (1nov24)
commits+karl at tug.org
commits+karl at tug.org
Fri Nov 1 22:25:38 CET 2024
Revision: 72739
https://tug.org/svn/texlive?view=revision&revision=72739
Author: karl
Date: 2024-11-01 22:25:37 +0100 (Fri, 01 Nov 2024)
Log Message:
-----------
latex (1nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/amsmath/README.md
trunk/Master/texmf-dist/doc/latex/amsmath/amsbsy.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amscd.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amsgen.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amsldoc.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amsmath.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amsopn.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amstext.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/amsxtra.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/changes.txt
trunk/Master/texmf-dist/doc/latex/amsmath/subeqn.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/technote.pdf
trunk/Master/texmf-dist/doc/latex/amsmath/testmath.pdf
trunk/Master/texmf-dist/doc/latex/base/README.md
trunk/Master/texmf-dist/doc/latex/base/alltt.pdf
trunk/Master/texmf-dist/doc/latex/base/cfgguide.pdf
trunk/Master/texmf-dist/doc/latex/base/changes.txt
trunk/Master/texmf-dist/doc/latex/base/classes.pdf
trunk/Master/texmf-dist/doc/latex/base/clsguide-historic.pdf
trunk/Master/texmf-dist/doc/latex/base/clsguide.pdf
trunk/Master/texmf-dist/doc/latex/base/clsguide.tex
trunk/Master/texmf-dist/doc/latex/base/cmfonts.pdf
trunk/Master/texmf-dist/doc/latex/base/cyrguide.pdf
trunk/Master/texmf-dist/doc/latex/base/doc-code.pdf
trunk/Master/texmf-dist/doc/latex/base/doc.pdf
trunk/Master/texmf-dist/doc/latex/base/docstrip.pdf
trunk/Master/texmf-dist/doc/latex/base/encguide.pdf
trunk/Master/texmf-dist/doc/latex/base/exscale.pdf
trunk/Master/texmf-dist/doc/latex/base/fix-cm.pdf
trunk/Master/texmf-dist/doc/latex/base/fntguide.pdf
trunk/Master/texmf-dist/doc/latex/base/fntguide.tex
trunk/Master/texmf-dist/doc/latex/base/graphpap.pdf
trunk/Master/texmf-dist/doc/latex/base/ifthen.pdf
trunk/Master/texmf-dist/doc/latex/base/inputenc.pdf
trunk/Master/texmf-dist/doc/latex/base/lamport-manual.pdf
trunk/Master/texmf-dist/doc/latex/base/latexrelease.pdf
trunk/Master/texmf-dist/doc/latex/base/latexsym.pdf
trunk/Master/texmf-dist/doc/latex/base/lb2.pdf
trunk/Master/texmf-dist/doc/latex/base/letter.pdf
trunk/Master/texmf-dist/doc/latex/base/lgc2.pdf
trunk/Master/texmf-dist/doc/latex/base/lppl.pdf
trunk/Master/texmf-dist/doc/latex/base/ltcmdhooks-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltcmdhooks-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltfilehook-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltfilehook-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/lthooks-code.pdf
trunk/Master/texmf-dist/doc/latex/base/lthooks-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltluatex.pdf
trunk/Master/texmf-dist/doc/latex/base/ltmarks-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltmarks-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews.tex
trunk/Master/texmf-dist/doc/latex/base/ltnews01.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews02.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews03.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews04.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews05.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews06.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews07.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews08.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews09.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews10.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews11.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews12.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews13.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews14.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews15.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews16.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews17.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews18.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews19.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews20.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews21.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews22.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews23.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews24.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews25.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews26.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews27.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews28.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews29.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews30.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews31.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews32.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews33.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews34.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews35.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews36.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews37.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews38.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews39.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews39.tex
trunk/Master/texmf-dist/doc/latex/base/ltpara-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltpara-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltproperties-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltproperties-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltshipout-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltshipout-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltsockets-code.pdf
trunk/Master/texmf-dist/doc/latex/base/ltsockets-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/ltx3info.pdf
trunk/Master/texmf-dist/doc/latex/base/ltxdoc.pdf
trunk/Master/texmf-dist/doc/latex/base/makeindx.pdf
trunk/Master/texmf-dist/doc/latex/base/manifest.txt
trunk/Master/texmf-dist/doc/latex/base/modguide.pdf
trunk/Master/texmf-dist/doc/latex/base/nfssfont.pdf
trunk/Master/texmf-dist/doc/latex/base/proc.pdf
trunk/Master/texmf-dist/doc/latex/base/slides.pdf
trunk/Master/texmf-dist/doc/latex/base/slifonts.pdf
trunk/Master/texmf-dist/doc/latex/base/source2e.pdf
trunk/Master/texmf-dist/doc/latex/base/source2e.tex
trunk/Master/texmf-dist/doc/latex/base/syntonly.pdf
trunk/Master/texmf-dist/doc/latex/base/tlc2.pdf
trunk/Master/texmf-dist/doc/latex/base/tlc3.err
trunk/Master/texmf-dist/doc/latex/base/tlc3.pdf
trunk/Master/texmf-dist/doc/latex/base/tulm.pdf
trunk/Master/texmf-dist/doc/latex/base/usrguide-historic.pdf
trunk/Master/texmf-dist/doc/latex/base/usrguide.pdf
trunk/Master/texmf-dist/doc/latex/base/usrguide.tex
trunk/Master/texmf-dist/doc/latex/base/utf8ienc.pdf
trunk/Master/texmf-dist/doc/latex/base/webcomp.pdf
trunk/Master/texmf-dist/doc/latex/firstaid/changes.txt
trunk/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf
trunk/Master/texmf-dist/doc/latex/graphics/README.md
trunk/Master/texmf-dist/doc/latex/graphics/changes.txt
trunk/Master/texmf-dist/doc/latex/graphics/color.pdf
trunk/Master/texmf-dist/doc/latex/graphics/drivers.pdf
trunk/Master/texmf-dist/doc/latex/graphics/epsfig.pdf
trunk/Master/texmf-dist/doc/latex/graphics/graphics.pdf
trunk/Master/texmf-dist/doc/latex/graphics/graphicx.pdf
trunk/Master/texmf-dist/doc/latex/graphics/grfguide.pdf
trunk/Master/texmf-dist/doc/latex/graphics/keyval.pdf
trunk/Master/texmf-dist/doc/latex/graphics/lscape.pdf
trunk/Master/texmf-dist/doc/latex/graphics/mathcolor.pdf
trunk/Master/texmf-dist/doc/latex/graphics/rotating.pdf
trunk/Master/texmf-dist/doc/latex/graphics/rotex.pdf
trunk/Master/texmf-dist/doc/latex/graphics/trig.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/README.md
trunk/Master/texmf-dist/doc/latex/latex-lab/blocks-code.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/blocks-doc.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/changes.txt
trunk/Master/texmf-dist/doc/latex/latex-lab/documentmetadata-support-code.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/documentmetadata-support-doc.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-amsmath.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-bib.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-block.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-firstaid.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-float.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-footnotes.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-graphic.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-marginpar.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-math.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-mathpkg.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-mathtools.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-minipage.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-namespace.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-new-or-1.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-new-or-2.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-sec.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-table.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-testphase.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-text.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-title.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc-hyperref-changes.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc-kernel-changes.pdf
trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc.pdf
trunk/Master/texmf-dist/doc/latex/tools/README.md
trunk/Master/texmf-dist/doc/latex/tools/afterpage.pdf
trunk/Master/texmf-dist/doc/latex/tools/array.pdf
trunk/Master/texmf-dist/doc/latex/tools/bm.pdf
trunk/Master/texmf-dist/doc/latex/tools/calc.pdf
trunk/Master/texmf-dist/doc/latex/tools/changes.txt
trunk/Master/texmf-dist/doc/latex/tools/dcolumn.pdf
trunk/Master/texmf-dist/doc/latex/tools/delarray.pdf
trunk/Master/texmf-dist/doc/latex/tools/enumerate.pdf
trunk/Master/texmf-dist/doc/latex/tools/fileerr.pdf
trunk/Master/texmf-dist/doc/latex/tools/fontsmpl.pdf
trunk/Master/texmf-dist/doc/latex/tools/ftnright.pdf
trunk/Master/texmf-dist/doc/latex/tools/hhline.pdf
trunk/Master/texmf-dist/doc/latex/tools/indentfirst.pdf
trunk/Master/texmf-dist/doc/latex/tools/l3sys-query.pdf
trunk/Master/texmf-dist/doc/latex/tools/layout.pdf
trunk/Master/texmf-dist/doc/latex/tools/longtable.pdf
trunk/Master/texmf-dist/doc/latex/tools/manifest.txt
trunk/Master/texmf-dist/doc/latex/tools/multicol.pdf
trunk/Master/texmf-dist/doc/latex/tools/rawfonts.pdf
trunk/Master/texmf-dist/doc/latex/tools/shellesc.pdf
trunk/Master/texmf-dist/doc/latex/tools/showkeys.pdf
trunk/Master/texmf-dist/doc/latex/tools/somedefs.pdf
trunk/Master/texmf-dist/doc/latex/tools/tabularx.pdf
trunk/Master/texmf-dist/doc/latex/tools/theorem.pdf
trunk/Master/texmf-dist/doc/latex/tools/tools-overview.pdf
trunk/Master/texmf-dist/doc/latex/tools/tools-overview.tex
trunk/Master/texmf-dist/doc/latex/tools/trace.pdf
trunk/Master/texmf-dist/doc/latex/tools/varioref.pdf
trunk/Master/texmf-dist/doc/latex/tools/verbatim.pdf
trunk/Master/texmf-dist/doc/latex/tools/xr.pdf
trunk/Master/texmf-dist/doc/latex/tools/xspace.pdf
trunk/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
trunk/Master/texmf-dist/source/latex/base/alltt.dtx
trunk/Master/texmf-dist/source/latex/base/classes.dtx
trunk/Master/texmf-dist/source/latex/base/doc.dtx
trunk/Master/texmf-dist/source/latex/base/fontdef.dtx
trunk/Master/texmf-dist/source/latex/base/latexrelease.dtx
trunk/Master/texmf-dist/source/latex/base/letter.dtx
trunk/Master/texmf-dist/source/latex/base/ltboxes.dtx
trunk/Master/texmf-dist/source/latex/base/ltclass.dtx
trunk/Master/texmf-dist/source/latex/base/ltcmd.dtx
trunk/Master/texmf-dist/source/latex/base/ltcmdhooks.dtx
trunk/Master/texmf-dist/source/latex/base/ltcounts.dtx
trunk/Master/texmf-dist/source/latex/base/ltdefns.dtx
trunk/Master/texmf-dist/source/latex/base/lterror.dtx
trunk/Master/texmf-dist/source/latex/base/ltfinal.dtx
trunk/Master/texmf-dist/source/latex/base/ltfssbas.dtx
trunk/Master/texmf-dist/source/latex/base/ltfssini.dtx
trunk/Master/texmf-dist/source/latex/base/lthooks.dtx
trunk/Master/texmf-dist/source/latex/base/ltkeys.dtx
trunk/Master/texmf-dist/source/latex/base/ltlength.dtx
trunk/Master/texmf-dist/source/latex/base/ltlists.dtx
trunk/Master/texmf-dist/source/latex/base/ltluatex.dtx
trunk/Master/texmf-dist/source/latex/base/ltmarks.dtx
trunk/Master/texmf-dist/source/latex/base/ltmeta.dtx
trunk/Master/texmf-dist/source/latex/base/ltmiscen.dtx
trunk/Master/texmf-dist/source/latex/base/ltpara.dtx
trunk/Master/texmf-dist/source/latex/base/ltpictur.dtx
trunk/Master/texmf-dist/source/latex/base/ltproperties.dtx
trunk/Master/texmf-dist/source/latex/base/ltshipout.dtx
trunk/Master/texmf-dist/source/latex/base/ltsockets.dtx
trunk/Master/texmf-dist/source/latex/base/ltspace.dtx
trunk/Master/texmf-dist/source/latex/base/lttab.dtx
trunk/Master/texmf-dist/source/latex/base/lttagging.dtx
trunk/Master/texmf-dist/source/latex/base/lttemplates.dtx
trunk/Master/texmf-dist/source/latex/base/lttextcomp.dtx
trunk/Master/texmf-dist/source/latex/base/ltvers.dtx
trunk/Master/texmf-dist/source/latex/base/ltxref.dtx
trunk/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx
trunk/Master/texmf-dist/source/latex/graphics/color.dtx
trunk/Master/texmf-dist/source/latex/graphics/graphics.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/documentmetadata-support.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-amsmath.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-bib.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-block.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-firstaid.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-float.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-footnotes.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-graphic.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-marginpar.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-math.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-mathtools.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-minipage.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-namespace.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-sec.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-table.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-testphase.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-text.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc-kernel-changes.dtx
trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc.dtx
trunk/Master/texmf-dist/source/latex/tools/array.dtx
trunk/Master/texmf-dist/source/latex/tools/longtable.dtx
trunk/Master/texmf-dist/source/latex/tools/multicol.dtx
trunk/Master/texmf-dist/source/latex/tools/theorem.dtx
trunk/Master/texmf-dist/source/latex/tools/tools.ins
trunk/Master/texmf-dist/tex/latex/amsmath/amsmath.sty
trunk/Master/texmf-dist/tex/latex/base/alltt.sty
trunk/Master/texmf-dist/tex/latex/base/article.cls
trunk/Master/texmf-dist/tex/latex/base/bk10.clo
trunk/Master/texmf-dist/tex/latex/base/bk11.clo
trunk/Master/texmf-dist/tex/latex/base/bk12.clo
trunk/Master/texmf-dist/tex/latex/base/book.cls
trunk/Master/texmf-dist/tex/latex/base/checkencodingsubset.tex
trunk/Master/texmf-dist/tex/latex/base/doc.sty
trunk/Master/texmf-dist/tex/latex/base/fontmath.cfg
trunk/Master/texmf-dist/tex/latex/base/fontmath.ltx
trunk/Master/texmf-dist/tex/latex/base/fonttext.cfg
trunk/Master/texmf-dist/tex/latex/base/fonttext.ltx
trunk/Master/texmf-dist/tex/latex/base/latex.ltx
trunk/Master/texmf-dist/tex/latex/base/latexrelease.sty
trunk/Master/texmf-dist/tex/latex/base/letter.cls
trunk/Master/texmf-dist/tex/latex/base/ltluatex.lua
trunk/Master/texmf-dist/tex/latex/base/ltluatex.tex
trunk/Master/texmf-dist/tex/latex/base/preload.cfg
trunk/Master/texmf-dist/tex/latex/base/report.cls
trunk/Master/texmf-dist/tex/latex/base/shortvrb.sty
trunk/Master/texmf-dist/tex/latex/base/size10.clo
trunk/Master/texmf-dist/tex/latex/base/size11.clo
trunk/Master/texmf-dist/tex/latex/base/size12.clo
trunk/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx
trunk/Master/texmf-dist/tex/latex/graphics/color.sty
trunk/Master/texmf-dist/tex/latex/graphics/graphics.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/block-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-math.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-marginpar.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-table.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty
trunk/Master/texmf-dist/tex/latex/latex-lab/marginpar-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/sec-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/table-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/tabular-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/latex-lab/toc-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex/tools/.tex
trunk/Master/texmf-dist/tex/latex/tools/array.sty
trunk/Master/texmf-dist/tex/latex/tools/longtable.sty
trunk/Master/texmf-dist/tex/latex/tools/multicol.sty
trunk/Master/texmf-dist/tex/latex/tools/thb.sty
trunk/Master/texmf-dist/tex/latex/tools/thc.sty
trunk/Master/texmf-dist/tex/latex/tools/thcb.sty
trunk/Master/texmf-dist/tex/latex/tools/theorem.sty
trunk/Master/texmf-dist/tex/latex/tools/thm.sty
trunk/Master/texmf-dist/tex/latex/tools/thmb.sty
trunk/Master/texmf-dist/tex/latex/tools/thp.sty
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf
trunk/Master/texmf-dist/doc/latex/base/ltnews40.tex
trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.pdf
trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.tex
trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.pdf
trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.tex
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/amsmath/README.md 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/amsmath/README.md 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2024-06-01 patch level 0
+Release 2024-11-01
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsbsy.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amscd.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsgen.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsldoc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsmath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsopn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amstext.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/amsxtra.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/amsmath/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/amsmath/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -3,9 +3,19 @@
================================================================================
#########################
-# 2023-11-01 Release
+# 2024-11-01 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)
+
+#########################
+# 2024-06-01 Release
+#########################
+
2024-05-23 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* amsmath.dtx:
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/subeqn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/technote.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/amsmath/testmath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/README.md 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/README.md 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2024-06-01 patch level 2
+Release 2024-11-01
Overview
--------
@@ -29,8 +29,7 @@
Full documentation of the LaTeX system is provided by
- _LaTeX: A Document Preparation System_; Lamport, Addison-Wesley
-- _The LaTeX Companion_, 2ed; Mittelbach and Goossens with Braams, Carlisle
- and Rowley, Addison-Wesley
+- _The LaTeX Companion_, 3ed; Mittelbach and Fischer, Addison-Wesley
- _Guide to LaTeX_, 4ed; Kopka and Daly, Addison-Wesley
The distribution is described in files ending `.txt` or `.md`; briefly,
@@ -56,7 +55,7 @@
- `ltx3info.tex` gives you some historical information about the LaTeX3
project
- `lamport-manual.err` lists errata in _LaTeX: A Document Preparation System_ (Lamport)
-- `tlc2.err` lists errata in _The LaTeX Companion_ (Mittelbach et al.)
+- `tlc3.err` lists errata in _The LaTeX Companion, 3rd edition_ (Mittelbach and Fischer)
The files `ltnews*.tex` (part of the `doc` bundle) contain the LaTeX
newsletters, the highest number being the most recent.
@@ -87,6 +86,6 @@
-----
-<p>Copyright (C) 1989-2023 The LaTeX Project <br />
+<p>Copyright (C) 1989-2024 The LaTeX Project <br />
<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
All rights reserved.</p>
Modified: trunk/Master/texmf-dist/doc/latex/base/alltt.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/cfgguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -11,6 +11,235 @@
================================================================================
#########################
+# 2024-11-01 Release
+#########################
+
+2024-10-29 Yukai Chou <muzimuzhi at gmail.com>
+ * lthooks.dtx (subsection{Setting rules for hooks code}):
+ Skip mapping over undeclared \g__hook_<hook>_code_prop (gh/1513).
+
+2024-10-27 Marcel Krüger <Marcel.Krueger at latex-project.org>
+ * lttagging.dtx
+ Change tagging sockets with two arguments to drop the first argument
+ but return the second argument when the socket is disabled with \SuspendTagging.
+ Add expandable versions of tagging socket use commands.
+ * ltsocket.dtx
+ Add expandable versions of \socket_use_expandable:n.
+ Make internal plug definitions non-protected to allow expandable use.
+
+2024-10-26 Yukai Chou <muzimuzhi at gmail.com>
+ * ltcounts.dtx (subsection{Environment Counter Macros}):
+ Fully expand counter name in \theH<counter> commands (gh/1508)
+
+2024-10-23 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+ * doc.dtx:
+ A rollback comment leaked into the documentation (gh1418)
+
+2024-10-22 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+ * ltcmdhooks.dtx:
+ Some clarification why not all
+ commands allow generic cmd hooks (gh/1091, gh/1430 and gh/1501)
+
+2024-10-22 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * ltshipout.dtx: correct documentation (gh/1470).
+
+ 2024-10-21 Matthew Bertucci <bertucci at math.utah.edu>
+ * lthooks.dtx
+ Define \IfHookEmptyT, \IfHookEmptyF
+ * ltmarks.dtx
+ Define \IfMarksEqualT, \IfMarksEqualF
+ * ltproperties.dtx
+ Define \IfPropertyRecordedT, \IfPropertyRecordedF
+
+2024-10-18 Clea Rees <reesc21 at cf.ac.uk>
+ * lttextcomp.dtx
+ Fix typo in \ProvidesFile
+
+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}):
+ Alter sample address in documentation (gh/1439)
+
+2024-08-10 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * lttagging.dtx: reset flattened level in para/restore
+
+2024-07-27 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * lttagging.dtx: (subsection{Tagging support for table/tabular packages}):
+ Two sockets added to store and restore cell data when nesting tables to keep track
+ of multirow settings.
+
+2024-07-27 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * 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.
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lttagging.dtx (subsection{Tagging support for table/tabular packages}):
+ Sockets for \cs{cline} leaders added (tagging/134)
+
+2024-07-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Drop code chunks before adding them to avoid duplication in
+ rollback (gh/1407)
+
+2024-07-06 Yukai Chou <muzimuzhi at gmail.com>
+
+ * ltcmd.dtx (subsection{User functions}):
+ Trim spaces for envname before existence check (gh/1399)
+ (subsection{Declaring commands and environments}):
+ Simplify \__cmd_declare_env:nnnn, use space-trimmed envname directly
+
+2024-06-24 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltlists.dtx:
+ Changes to \@doendpe, \@endpefalse, and \@endpetrue for
+ new @endpe handling. \if at endpe is now a global switch and
+ migration out of groups is handled via \aftergroup
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Adjust \end<space> for new @endpe handling
+
+ * ltboxes.dtx (section{\LaTeX\ Box commands}):
+ Adjust \color at endgroup for new @endpe handling
+
+2024-06-19 David Carlisle <David.Carlisle at latex-project.org>
+
+ * fontdef.dtx:
+ preload ts1cmr.fd in Unicode engines
+
+2024-06-19 Joseph Wright <Joseph.Wright at latex-project.org>
+ * ltkeys.dtx, clsguide.tex
+ Ensure only key name is stored for option handling
+
+2024-06-19 Joseph Wright <Joseph.Wright at latex-project.org>
+ * ltkeys.dtx, clsguide.tex
+ Refactor class option code
+ Add mechanism to exclude class options from package processing
+
+2024-06-17 David Carlisle <David.Carlisle at latex-project.org>
+
+ * ltfssbas.dtx: set \tracinglostchars in \showhyphens. gh/1380
+
+2024-06-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lthooks.dtx:
+ Clarify syntax of hook names and behavior of hook rules and default
+ hook rules (gh/1227 & gh/1237)
+
+2024-06-04 Yukai Chou <muzimuzhi at gmail.com>
+
+ * ltclass.dtx (section{Package/class rollback mechanism}):
+ Add new argument \pkgcls at ext for use in warning message which might
+ be raised before the classic \@currext can be set and used (gh/870)
+
+ * ltclass.dtx:
+ Extend \@cls at pkg to expand to "file" if \@currext is neither "cls"
+ nor "pkg"
+
+2024-06-04 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * doc.dtx (section{Integrating hypdoc}):
+ Use hooks to save and restore definitions when hypdoc gets loaded.
+ This way the user can still alter \PrintDescribeMacro, etc. in the preamble
+ (gh/1000)
+
+2024-06-04 Joseph Wright <Joseph.Wright at latex-project.org>
+
+ * ltluatex.dtx:
+ Mark "v" in provides_module() when logging version string
+
+2024-06-04 Yukai Chou <muzimuzhi at gmail.com>
+
+ * source2e.tex:
+ Add new module lttemplates to the documentation.
+
+ * lttemplates.dtx:
+ Fix markup typos.
+
+#########################
# 2024-06-01 PL2 Release
#########################
@@ -69,7 +298,7 @@
2024-04-26 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* doc.dtx:
- Do not error with "suspicous date" when rolling back to
+ Do not error with "suspicious date" when rolling back to
early years of LaTeX2e (gh/1336)
2024-04-24 Yukai Chou <muzimuzhi at gmail.com>
Modified: trunk/Master/texmf-dist/doc/latex/base/classes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/clsguide-historic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/clsguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/clsguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/clsguide.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/clsguide.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
\texttt{clsguide.tex} for full details.}%
}
-\date{2024-05-24}
+\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.
@@ -841,6 +846,9 @@
\item \texttt{.code} --- execute arbitrary code
\item \texttt{.if} --- sets a \TeX{} |\if...| switch
\item \texttt{.ifnot} --- sets an inverted \TeX{} |\if...| switch
+ \item \texttt{.pass-to-packages} --- for class options, this specifies
+ whether the option should be treated \enquote{global} (read by packages
+ from the global list); for package options this property has no effect
\item \texttt{.store} --- stores a value in a macro
\item \texttt{.usage} -- defines whether the option can be given only
when loading (\texttt{load}), in the preamble (\texttt{preamble}) or
@@ -902,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.
@@ -929,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
@@ -974,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
@@ -1067,7 +1131,7 @@
automatically added.
\section{Miscellaneous commands, etc.}
-\label{Sec:commands.misc}
+\label{sec:commands.misc}
\subsection{Layout parameters}
@@ -1333,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
@@ -1428,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
@@ -1468,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
@@ -1485,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/base/cmfonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/cyrguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/doc-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/docstrip.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/encguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/exscale.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/fix-cm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/fntguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/fntguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/fntguide.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/fntguide.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/graphpap.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ifthen.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/inputenc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lamport-manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/latexrelease.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/latexsym.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lb2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/letter.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lgc2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lppl.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltcmdhooks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltcmdhooks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltfilehook-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltfilehook-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lthooks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/lthooks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltluatex.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltmarks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltmarks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/ltnews.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/ltnews.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -40,7 +40,7 @@
\ProvidesFile{ltnews.tex}%
[2022/06/10 v1.4e Master file for ltnews*.tex (LaTeX Project)]
-\providecommand*{\lastissue}{39}
+\providecommand*{\lastissue}{40}
\InputIfFileExists{ltnews-lastissue.cfg}{}{}
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews01.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews02.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews03.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews04.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews05.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews06.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews07.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews08.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews09.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews10.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews11.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews12.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews13.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews14.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews15.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews16.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews17.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews18.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews19.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews20.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews21.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews22.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews23.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews24.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews25.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews26.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews27.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews28.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews29.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews30.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews31.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews32.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews33.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews34.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews35.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews36.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews37.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews38.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews39.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltnews39.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/ltnews39.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/ltnews39.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -388,7 +388,7 @@
%
\cs{IfClassAtLeastTF},
\cs{IfClassLoadedTF},
-\cs{IfClassLoadedWithOptionsFF},
+\cs{IfClassLoadedWithOptionsTF},
\cs{IfFormatAtLeastTF},
\cs{IfPackageAtLeastTF},
\cs{IfPackageLoadedTF}, and
@@ -728,12 +728,15 @@
\subsection{Fix a ``missing \cs{item}'' rollback error}
If \LaTeX{} is rolled back to a date between 2023/06/01 (inclusive) and
-2024/06/01 (exclusive), any list-based environment would raise an error
+2024/06/01 (exclusive), any list-based environment would raise an
+error:
+%(shown on two lines for \textsl{TUGboat}):
\begin{verbatim}
-! LaTeX Error: Something's wrong--perhaps a missing \item.
+! LaTeX Error: Something's wrong--perhaps
+a missing \item.
\end{verbatim}
This has now been corrected as a hotfix in patch level 2, by enhancing
-a 2023/06/01 version rollback code of new paragraph mechanism.
+the 2023/06/01 version rollback code of the new paragraph mechanism.
%
\githubissue{1386}
@@ -825,6 +828,7 @@
%
\githubissue{1123}
+\tubcommand{\newpage}
\subsection{\pkg{xr}:\ Support links and properties}
%
The \pkg{xr} package implements a system for eXternal References.
Added: trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf 2024-11-01 21:25:37 UTC (rev 72739)
Property changes on: trunk/Master/texmf-dist/doc/latex/base/ltnews40.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/base/ltnews40.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/ltnews40.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/base/ltnews40.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -0,0 +1,758 @@
+% \iffalse meta-comment
+%
+% Copyright 2024
+% The LaTeX Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -——————————————
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews40.tex
+%
+% This is issue 40 of LaTeX News.
+
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+
+\documentclass{ltnews}
+
+%% Maybe needed only for Chris' inadequate system:
+\providecommand\Dash {\unskip \textemdash}
+
+%% NOTE: Chris' preferred hyphens!
+%% \showhyphens{parameters}
+%% \hyphenation{because}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+\usepackage{multicol}
+\usepackage{color}
+
+\providecommand\hook[1]{\texttt{#1}}
+
+\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
+\providecommand\option[1]{\texttt{#1}}
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
+
+
+\providecommand\eTeX{\hologo{eTeX}}
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+\providecommand\MiKTeX{\hologo{MiKTeX}}
+\providecommand\CTAN{\textsc{ctan}}
+\providecommand\TL{\TeX\,Live}
+
+
+\providecommand\githubissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+ {github issue#1 #2}%
+ )}%
+ \par\smallskip}
+
+
+% same for issues in the tagging repository:
+
+\providecommand\taggingissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/tagging-project/issues/\getfirstgithubissue#2 \relax}%
+ {github tagging issue#1 #2}%
+ )}%
+ \par\smallskip}
+
+%% But Chris has to mostly disable \href for his TEXPAD app:
+%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine
+
+% simple solution right now (just link to the first issue if there are several)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\providecommand\sxissue[1]{\ifhmode\unskip
+ \else
+ % githubissue preceding
+ \vskip-\smallskipamount
+ \vskip-\parskip
+ \fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
+ {gnats issue #1/#2}%
+ )}%
+ \par}
+
+
+
+\let\cls\pkg
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\acro[1]{\textsc{#1}}
+
+\vbadness=1400 % accept slightly empty columns
+
+
+\let\finalpagebreak\pagebreak % for TUB (if they use it)
+\let\finalvspace\vspace % for document layout fixes
+
+\makeatletter
+% maybe not the greatest design but normally we wouldn't have subsubsections
+\renewcommand{\subsubsection}{%
+ \@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
+ {-1em}{\@subheadingfont\colonize}%
+}
+\providecommand\colonize[1]{#1:}
+\makeatother
+
+
+% Undo ltnews's \verbatim at font with active < and >
+\makeatletter
+\def\verbatim at font{\normalsize\ttfamily}
+\makeatother
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand\tubcommand[1]{}
+\tubcommand{\input{tubltmac}}
+
+\publicationmonth{November}
+%\publicationyear{2024 --- DRAFT version for upcoming release}
+\publicationyear{2024}
+
+\publicationissue{40}
+
+\begin{document}
+
+\maketitle
+{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
+\tableofcontents}
+
+\setlength\rightskip{0pt plus 3em}
+
+\medskip
+
+
+\section{Thirty years of \LaTeXe{}}
+
+In summer 1994, i.e., thirty years ago, \LaTeXe{} saw its first public
+release. Back then it was meant to be an intermediate version (hence
+the $\epsilon$) on the way to a major new version (the mythical
+\LaTeX3) that we expected to take a couple of more years to reach
+maturity. It took much more than that in the end\Dash nominally,
+\LaTeXe{} is still with us today.
+
+However, under the hood, \LaTeXe{} changed a lot throughout these
+thirty years, as one can see, for example, when looking through the
+forty newsletters~\cite{40:ltnews} that accompanied the \LaTeX{}
+releases that happened in the meantime.
+
+During the first two decades, the \LaTeX{} kernel was kept largely
+stable with only minimal bug fix activities. During that period
+additional functionality was mostly provided through new or
+extended packages that could be loaded in the document preamble. This
+included many of the ideas targeted for \LaTeX3{}, e.g., \pkg{expl3}
+(\LaTeX3 programming language), \pkg{xparse} (new document command
+interface), \pkg{xtemplate} (a configuration mechanism), and many
+others.
+
+Initially, this approach worked well and provided good backward
+compatibility; however, over time it became apparent that keeping all
+developments confined to packages was more and more problematical.
+Features or bug fixes that should have been generally available, i.e.,
+part of the kernel, were only available in packages, so a lot of
+dependencies between packages were introduced and resulted in
+convoluted code that was difficult to manage. For example,
+\pkg{hyperref} had to rewrite a lot of kernel (and package) macros, so
+the code and behavior of other packages had to change depending on
+whether or not \pkg{hyperref} was loaded or not.
+
+Thus, in 2015 the \LaTeX{} team decided to change the policy and
+(re)start active kernel development, see~\cite{40:ltnews22}. To ensure
+continuous backward compatibility we introduced at the same time the
+\pkg{latexrelease} package that enables users to roll back changes to
+the \LaTeX{} kernel to an earlier release, in case this is necessary
+to successfully rerun a document produced at that time.
+
+As a consequence of this policy change the last decade saw a larger
+number of enhancements and corrections that were made part of the
+\LaTeX{} kernel. Overall, we can confidently say that the new
+approach has worked well and enabled us to modernize \LaTeX{} and ensure
+that it remains relevant without compromising one of the cornerstones
+of \LaTeX{}: its outstanding ability to reprocess old documents
+written many years ago.
+
+Being able to update and modernize the kernel sources allowed us to
+embark in 2019 on the multi-year \enquote{\LaTeX{} Tagged PDF} project
+with the goal of automatically providing accessible PDF documents with
+\LaTeX{}. While there are several more project phases to complete, the
+milestones already reached allow users to generate PDF/UA compliant
+documents if the input is restricted to a (growing) subset of packages
+and document classes; see next section and previous newsletters.
+
+ A big change happened with the 2020-02-02 release as part of the project activity,
+ albeit somewhat obfuscated by us as \enquote{Improved load-times for
+ \pkg{expl3}}. While technically correct, what it really meant is
+ that we had finally integrated the programming layer of \LaTeX3,
+ i.e., the ideas originally sketched out around 1992. Or saying it
+ differently: with that date the original ideas for \LaTeX3 became a
+ reality as part of the standard \LaTeX{} kernel.
+
+ With the programming layer available under the hood we were then able to
+ provide new concepts and extensions as part of \LaTeX{},
+ e.g., the hook management system, a new mark mechanism, core
+ functionality for tagging and PDF resource management, a consistent
+ key/value interface, and more recently the socket and plug mechanism.
+
+ More will follow while we continue to work on modernizing \LaTeX{} and
+ bringing the Tagged PDF project to a truly successful completion\Dash so
+ stay tuned and watch this space for future announcements in the next
+ newsletters.
+
+
+
+\section{News from the \enquote{\LaTeX{} Tagged PDF} project}
+
+\subsection{Engine support:\ An important update}
+
+As detailed below, work is progressing on the Tagged PDF
+project. There are many drivers for this work, including legal changes
+in many places which will increasingly require well-tagged PDFs
+including full support for mathematics. As part of the work on this,
+we are looking at the technical abilities of the \TeX{} engines.
+
+With \XeTeX{}, it is impossible to reliably produce tagged PDFs due to
+engine limitations. The increasing importance of tagged PDFs means
+that this requires a move away from \XeTeX{}. We will continue to
+address issues with \XeTeX{} support in team-maintained \LaTeX{} code
+on a best-effort basis. No \emph{new} functionality will be added for
+\XeTeX{} by the \LaTeX{} team. It is likely that over time
+functionality may become more restricted, and users are urged to
+migrate \XeTeX{} documents to \LuaTeX{}.
+
+For \pdfTeX{}, tagging is available and we are able to support
+mathematics by including relevant \TeX{} source or by using
+externally-generated MathML. Only \LuaTeX{} is capable of
+\emph{automatic} generation of MathML as part of a \LaTeX{} run. Thus
+\pdfTeX{} continues to be supported for existing material, but for new
+documents, moving to \LuaTeX{} is recommended.
+
+We cannot make statements about the support for other engines such as
+(u)p\TeX{}, as we don't use these programs nor have in depth knowledge
+of their functionalities. To the best of our knowledge, core \LaTeX{}
+works well with these engines, but if and to what extent tagging can
+be supported will remain to be seen. If relevant information becomes
+available to us we will provide an update in future editions of the
+\LaTeX{} newsletter.
+
+
+\subsection{Tagging support for external packages}
+
+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 several packages, including
+\pkg{amsthm} and \pkg{fancyvrb}, can now be used.
+
+
+\subsection{Improved table tagging}
+
+The tagging of tabulars has been extended: it is now possible to tag
+row headers and to create cells that span more than one row.
+
+The interface to this functionality is not finalized but can be
+accessed in the current release by specifying the row and columns to
+be treated as headers. For example
+%
+\begin{verbatim}
+ \tagpdfsetup{
+ table/header-rows={1,2},
+ table/header-columns={1} }
+\end{verbatim}
+would specify that in the following tables the first two rows and
+first column of each row should be tagged as heading entries.
+
+Similarly you may add a RowSpan attributes to tag a cell that spans
+two rows using:
+\begin{verbatim}
+ \tagpdfsetup{table/multirow={2}}
+\end{verbatim}
+
+
+\subsection{Automatic MathML tagging}
+
+When Lua\LaTeX{} is being used, and the \pkg{luamml} package is
+available, and if the document uses the \pkg{unicode-math} package,
+then the math module will automatically convert each math formula to
+MathML and use it to attach MathML associated files (or MathML
+Structure elements) to the tagged PDF. This new feature can be
+disabled with \verb+\tagpdfsetup{math/mathml/luamml/load=false}+. More
+options to configure MathML tagging can be found in the documentation
+of \pkg{latex-lab-math}.
+
+
+\subsection{Change behavior of tagging sockets with two arguments}
+
+When calling tagging sockets with two arguments using
+\cs{UseTaggingSocket} when tagging is suspended, previous versions of
+\LaTeXe{} dropped both arguments. This behavior has been changed to
+drop the first argument and preserve the second one instead, thereby
+allowing tagging sockets to be used to wrap existing content which
+should still appear in a non-tagging context.
+
+Since no tagging sockets currently provided by \LaTeX{} use two
+arguments we do not expect this change to affect any existing
+documents, but if a custom tagging socket has been defined outside of
+the kernel it might need to be adapted to be compatible with the new
+behavior.
+%
+\githubissue{1500}
+
+
+
+
+\section{Changes to the \LaTeX{} kernel}
+
+\subsection{Handling paragraph continuation}
+
+Already \LaTeX~2.09 offered some automation to detect whether or not
+text after a list or some other display environment is meant to be a
+continuation of the current paragraph or should start a new one. The
+document-level syntax for this is that a blank line after such an
+environment signals to \LaTeX{} that it should start a new paragraph;
+whilst no blank line signals that there should be no new paragraph and
+the text should be considered a continuation.
+
+Unfortunately, there were a number of cases where the original 2.09
+approach failed, e.g., with
+\begin{flushleft}
+ \ttfamily
+\ \ \{\meta{local customizations}\\
+\ \ \cs{begin}\{equation\} a<b \cs{end}\{equation\}\} \\
+\ \ \meta{some text}
+\end{flushleft}
+the \meta{some text} incorrectly started a new paragraph. Bug reports
+about this behavior can be traced back to the time \LaTeXe{} was
+developed, e.g., one test file from 1992 has a note that the above
+case was unfortunately not resolvable despite some improvements made
+back then. The main cause of the issue (as you probably guessed) is
+that the mechanism failed whenever the environment was executed within
+a group (\texttt{\{...\}}, \cs{begingroup}/\cs{endgroup}, or
+\cs{bgroup}/\cs{egroup} pair) that was closed before the next blank
+line was reached.
+
+While most of the time this could be visually corrected by adding some
+explicit \cs{noindent}, the situation got worse when we tried to
+implement tagged PDFs resulting in incorrect structures or worse.
+
+We therefore made a new attempt to resolve this problem in every
+situation and this new solution is rolled out in the current release.
+
+
+\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}
+
+
+\subsection[Switch to T1 as default encoding in documents
+ using \cs{DocumentMetadata}]
+ {Switch to T1 as default encoding in documents\\\mbox\qquad
+ 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 cannot 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 the 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{Code improvements}
+
+\subsection[Avoiding key--value option clashes between classes and packages]
+ {Avoiding key--value option clashes between classes\\\mbox\qquad and packages}
+
+In \LaTeX{} News~35~\cite{40:ltnews35} we introduced key--value option
+processing to the kernel. Following the standard for \LaTeXe{}
+options, keyval options given to the \cs{documentclass} line were
+treated as global and so parsed by every package. However, with
+keyvals, the likelihood of a name clash between a class-specific
+option and one used by a package is much higher than it is with simple
+strings. We have therefore refined the mechanism in the current
+release.
+
+When a class uses the kernel keyval processor, any options it
+recognizes are recorded and any packages using the keyval processor
+will then \emph{skip} these \enquote{global} options. To allow for the
+case where a class directly uses an option which should be global (for
+example \texttt{draft}), a new key property \texttt{.pass-to-packages}
+has been added. This can then be set to indicate that this key is not
+to be skipped. For example
+\begin{verbatim}
+ \DeclareKeys{
+ draft .if = {ifl at cls@draft},
+ draft .pass-to-packages = true,
+ mode .store = \cls at mode
+ }
+\end{verbatim}
+in a class would create two options, \texttt{draft} and
+\texttt{mode}. The \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{Improvement to \textup{\XeTeX}\ \cs{showhyphens}}
+
+When using \cs{showhyphens} with \XeTeX, missing character warnings
+would be generated for any character not in Latin Modern. This has
+been corrected and the warnings are suppressed.
+%
+\githubissue{1380}
+
+\subsection{Improved error raised by empty hook}
+
+When using the hook management, both hook and label names (if
+specified) should be non-empty. Before, empty hook and empty label names 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 an 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 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}}
+
+For many years, the package \pkg{hyperref} had been redefining
+\verb+\refstepcounter+ and adding 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}
+
+When \LaTeX{} is rolled back to date \meta{date1} and a class or
+package with minimum date requirement \meta{date2} is to be loaded, a
+rollback warning is raised if \meta{date2} is later than \meta{date1}:
+\begin{verbatim}
+LaTeX Warning: Suspicious rollback/min-date
+ date given.
+ A minimal date of YYYY-MM-DD has been
+ specified for package '<pkgname>'.
+ But this is in conflict with a rollback
+ request to YYYY-MM-DD.
+\end{verbatim}
+
+In some cases this message showed a wrong file type, i.e.,
+\verb|document class '<pkgname>'| or \verb|package '<clsname>'|. This
+has now been corrected.
+%
+\githubissue{870}
+
+\subsection*{Fix existence check of document environments}
+
+\cs{NewDocumentEnvironment} and friends define (or redefine) a
+document environment using the space-trimmed \meta{envname}, but the
+existence check for \meta{envname} was done without space
+trimming. Thus when the user-specified \meta{envname} consists of
+leading and/or trailing space(s), it may lead to erroneously silent
+environment declaration. For example, in
+\begin{flushleft}
+\ttfamily
+\ \ \verb=\NewDocumentEnvironment{myenv}{}{begin}{end}=\\
+\ \ \verb*=\NewDocumentEnvironment{ myenv }{}{begin}{end}=\kern-1cm
+\end{flushleft}
+the first line defines a new environment \env{myenv} but the second
+line would check existence for \verb*| myenv | (which is not yet
+defined), then redefine \env{myenv} environment without raising any
+errors. This has now been corrected.
+%
+\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. The first issue was corrected as
+a hotfix in patch level 1 of the November 2023 release (but
+unfortunately not mentioned in~\cite{40:ltnews38}) and the second in the current
+release.
+%
+\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 to alter the definition of
+\cs{PrintDescribeMacro} and similar commands in preamble. In version 3
+this stopped working because they were reset at the end of the
+preamble. This has now been implemented differently and changes in the
+preamble are possible again.
+%
+\githubissue{1000}
+
+
+\subsection{Avoid low-level error if \cs{ShowHooks} is used late}
+
+If \cs{ShowHooks} was used to examine a package hook after the
+package was loaded, a low level error resulted. This has now been
+corrected.
+%
+\githubissue{1513}
+
+\subsection{Avoid code duplication in rollback}
+
+When the kernel uses \cs{AddToHook} in a region that might be rolled
+back (which happens in a few places) and a document requests a
+rollback, then we have the situation that the hook already contains
+code to which we added the same (or slightly different) code during
+the rollback; this results in code duplication or, worse, in
+errors. This has now been corrected by dropping any such code chunk
+(if there is one) prior to adding the rollback code.
+%
+\githubissue{1407}
+
+
+\subsection{Passing template keys using \cs{KeyValue}}
+
+With the move of the template code to the kernel, internal
+functions were reviewed to improve efficiency. However, there
+was an oversight in how
+passing key values from one setting to another was implemented,
+such 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}
+
+\subsection{Extend support for \cs{dots}}
+
+The implementation of \cs{dots} in \pkg{amsmath} has the feature that
+it selects different dots depending on the symbol that follows: e.g.,
+dots between commas would normally be on the baseline, while dots
+between binary or relational symbols would be raised. However, when
+symbols such as \cs{cong} were protected from expansion in moving
+arguments (so that they worked in places such as headings) it had the
+unfortunate side-effect that the \cs{dots} magic stopped working for
+them. This has now been corrected.
+%
+\githubissue{1265}
+
+
+
+%\section{Changes to packages in the \pkg{graphics} category}
+
+\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 \TeX{}~Live 2025. The
+\texttt{build.lua} file for the \pkg{tools} 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}:\ 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}
+
+
+\subsection{\pkg{array}:\ Tagging support for \cs{cline}}
+
+In the last release we added tagging support for \pkg{array},
+\pkg{longtable} and other tabular packages, but we overlooked that the
+kernel definition for \cs{cline} also needs modification because the
+rule generated by the command needs to be tagged as an
+artifact. Furthermore, the processing of a \cs{cline} looks to the
+algorithm as if another row is added (which is technically what
+happens), thus it was also necessary to decrement the internal row
+counter to get a correct row count. This has now been corrected in
+\pkg{array}, which is automatically loaded for tagging, so that all
+these packages are now fully compatible with the tagging code if it is
+turned on.
+%
+\taggingissue{134}
+
+
+
+\subsection{\pkg{longtable}:\ Extend caption type}
+
+The \pkg{longtable} package has been extended and now provides the command
+\cs{LTcaptype} (stemming from the \pkg{ltcaption} package) to change
+the counter and caption type used by the \cs{caption} command from
+longtable. So with \verb+\renewcommand\LTcaptype{figure}+, a
+longtable will step the figure counter instead of the table counter
+and produce an entry in the list of figures. An empty definition,
+\verb+\renewcommand\LTcaptype{}+, will suppress increasing of the
+counter. This makes it easy to define an unnumbered variant of
+longtable:
+\begin{verbatim}
+ \newenvironment{longtable*}
+ {\renewcommand\LTcaptype{}\longtable}
+ {\endlongtable}
+\end{verbatim}
+
+\subsection{\pkg{longtable}:\ Prevent \cs{pagegoal} exceeding maximum value}
+
+An internal guard has been added to avoid \TeX\ errors if
+\verb=\pagegoal= is increased beyond the maximum value for a
+\TeX\ dimension.
+%
+\githubissue{1495}
+
+
+
+\section{Changes to \pkg{l3build}}
+
+To support third-party developers testing their code against pre-release
+\LaTeX{}, a new switch \verb|--dev| has been added to \pkg{l3build}.
+This allows the developer to run
+\begin{verbatim}
+ l3build check
+\end{verbatim}
+to run their test suite against the current release of \LaTeX{} and
+\begin{verbatim}
+ l3build check --dev
+\end{verbatim}
+to run exactly the same tests using the development release of
+\LaTeX{}.
+
+%\section{Changes to files in the \pkg{cyrillic} category}
+
+\begin{thebibliography}{9}\frenchspacing
+
+%\fontsize{9.3}{11.3}\selectfont
+
+\bibitem{40:Lamport}
+Leslie Lamport.
+\newblock \emph{{\LaTeX}: {A} Document Preparation System: User's Guide and Reference
+ Manual}.
+\newblock \mbox{Addison}-Wesley, Reading, MA, USA, 2nd edition, 1994.
+\newblock ISBN 0-201-52983-1.
+\newblock Reprinted with corrections in 1996.
+
+\bibitem{40:ltnews} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 1--39}. June 2024.
+ \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
+
+\bibitem{40:ltnews22} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 22}. January 2015.
+ \url{https://latex-project.org/news/latex2e-news/ltnews22.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}
+
+\end{thebibliography}
+
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/latex/base/ltnews40.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/latex/base/ltpara-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltpara-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltproperties-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltproperties-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltshipout-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltshipout-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltsockets-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltsockets-doc.pdf
===================================================================
(Binary files differ)
Added: trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.pdf 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.pdf 2024-11-01 21:25:37 UTC (rev 72739)
Property changes on: trunk/Master/texmf-dist/doc/latex/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/base/lttemplates-code.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/base/lttemplates-code.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{lttemplates.dtx}
Property changes on: trunk/Master/texmf-dist/doc/latex/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/base/lttemplates-doc.pdf
===================================================================
(Binary files differ)
Index: trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.pdf 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.pdf 2024-11-01 21:25:37 UTC (rev 72739)
Property changes on: trunk/Master/texmf-dist/doc/latex/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/base/lttemplates-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/base/lttemplates-doc.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/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/base/ltx3info.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/ltxdoc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/makeindx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/manifest.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/manifest.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/manifest.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -74,7 +74,9 @@
% ltnews35.tex -- What was new in the release dated 2022/06.
% ltnews36.tex -- What was new in the release dated 2022/11.
% ltnews37.tex -- What was new in the release dated 2023/06.
-
+% ltnews38.tex -- What was new in the release dated 2023/11.
+% ltnews39.tex -- What was new in the release dated 2024/06.
+% ltnews40.tex -- What was new in the release dated 2024/11.
%
% ltx3info.tex -- Information about the LaTeX3 project.
%
@@ -91,62 +93,70 @@
%
% cmfonts.fdd -- Font definitions for Computer modern fonts.
% fontdef.dtx -- Code for font definitions.
-% lthyphen.dtx -- Hyphenation support.
+% ltalloc.dtx -- Allocation of counters and others.
+% ltbibl.dtx -- Bibliography commands.
% ltboxes.dtx -- Code for making boxes.
% ltclass.dtx -- Class and option handling.
+% ltcntrl.dtx -- Program control macros.
% ltcounts.dtx -- Counters.
-% ltpageno.dtx -- Page numbering.
-% ltxref.dtx -- Cross referencing.
-% ltlength.dtx -- Lengths.
+% ltdefns.dtx -- Initial definitions.
% ltdirchk.dtx -- Support for search in current directory.
+% lterror.dtx -- Error handling.
% ltfiles.dtx -- File handling.
% ltfinal.dtx -- Code for debugging and final initialisations.
% ltfloat.dtx -- Float handling.
% ltfntcmd.dtx -- Various font switching commands.
+% ltfssaxes.dtx -- NFSS font axes
% ltfssbas.dtx -- NFSS Base macros
-% ltfsstrc.dtx -- NFSS Tracing (and tracefnt.sty)
+% ltfsscmp.dtx -- NFSS1 compatibility
% ltfssdcl.dtx -- NFSS Declarative interface
% ltfssini.dtx -- NFSS Initialisation
-% ltfsscmp.dtx -- NFSS1 compatibility
+% ltfsstrc.dtx -- NFSS Tracing (and tracefnt.sty)
+% lthyphen.dtx -- Hyphenation support.
% ltidxglo.dtx -- Index and glossary.
-% ltbibl.dtx -- Bibliography commands.
-% ltalloc.dtx -- Allocation of counters and others.
-% ltdefns.dtx -- Initial definitions.
-% ltcntrl.dtx -- Program control macros.
-% lterror.dtx -- Error handling.
-% ltpar.dtx -- Paragraphs.
-% ltspace.dtx -- Spacing, line and page breaking.
+% ltlength.dtx -- Lengths.
+% ltlists.dtx -- Code for lists and related environments.
% ltlogos.dtx -- Logos.
-% ltlists.dtx -- Code for lists and related environments.
% ltluatex.dtx -- LuaTeX engine related code.
% ltmath.dtx -- Code for math.
% ltmiscen.dtx -- Code for miscellaneous environments.
% ltoutenc.dtx -- Code for output encoding commands.
% ltoutput.dtx -- LaTeX page makeup (output routine).
+% ltpage.dtx -- Page styles and related commands.
+% ltpageno.dtx -- Page numbering.
+% ltpar.dtx -- Paragraphs.
% ltpictur.dtx -- The picture environment.
-% ltpage.dtx -- Page styles and related commands.
% ltplain.dtx -- Things borrowed from the plain format.
+% ltsect.dtx -- Sectioning and title commands.
+% ltspace.dtx -- Spacing, line and page breaking.
% lttab.dtx -- The tabbing, tabular and array environments.
% lttextcomp -- The text companion symbols
% ltthm.dtx -- The theorem-like environments.
-% ltsect.dtx -- Sectioning and title commands.
% ltvers.dtx -- Version identification code.
+% ltxref.dtx -- Cross referencing.
% preload.dtx -- Code for preloading fonts.
% tulm.fdd -- Font definitions for TU latin modern fonts.
%
+%
% L3 Programming layer:
% -----------------
%
-% ltexpl.dtx -- Basic support
-% ltcmd.dtx -- Document command definition
-% lthooks.dtx -- Hook management
-% ltfilehook.dtx -- Hook management for file loading
-% ltshipout.dtx -- Hook management for \shipout
-% ltcmdhooks.dtx -- Hook management (generic) for commands
-% ltpara.dtx -- Hook management for paragraphs
+% ltcmd.dtx -- Document command definitions
+% ltexpl.dtx -- Basic support (LaTeX3 kernel integration)
+% lthooks.dtx -- Hook management (core commands and core hooks)
+% ltfilehook.dtx -- Hook management for file loading
+% ltshipout.dtx -- Hook management for \shipout
+% ltcmdhooks.dtx -- Hook management (generic) for commands
+% ltpara.dtx -- Hook management for paragraphs
+% ltkeys.dtx -- Key/value options
% ltmarks.dtx -- Mark management
+% ltmeta.dtx -- Document metadata
+% ltproperties.dtx -- Properties mechanism
% ltsockets.dtx -- Sockets and plugs management
+% lttagging.dtx -- Tagging support
+% lttemplate.dtx -- Template management
%
+%
% Standard Classes:
% -----------------
%
@@ -168,7 +178,7 @@
%
% alltt.dtx -- Implements the alltt environment.
% fix-cm.dtx -- Implements modified font choices for cm fonts.
-% latexrelease.dtx -- Controls fixes to LaTeX.
+% latexrelease.dtx -- Rollback functionality to previous releases
% graphpap.dtx -- Implements programming \graphpaper command..
% inputenc.dtx -- Implements eight-bit input.
% utf8ienc.dtx -- Supplement for inputenc to implement UTF8 encoding.
@@ -248,4 +258,6 @@
% ltxcheck.tex -- Test file for checking the LaTeX installation.
%
%
+% (There are probably a few files missing)
+%
% ======================================================================
Modified: trunk/Master/texmf-dist/doc/latex/base/modguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/nfssfont.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/proc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/slides.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/slifonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/source2e.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/source2e.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/source2e.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/source2e.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -256,6 +256,8 @@
\DocInclude{ltsockets}% Socket and plug management (L3 module)
+ \DocInclude{lttemplates} % Prototype document functions (was xtemplate)
+
\DocInclude{ltalloc} % Allocation of counters and others.
\DocInclude{ltcntrl} % Program control macros.
@@ -266,7 +268,7 @@
\DocInclude{ltpara} % Paragraph hooks (L3 module)
- \DocInclude{ltmeta} % Document Metadara interface (L3 module)
+ \DocInclude{ltmeta} % Document Metadata interface (L3 module)
\DocInclude{ltspace} % Spacing, line and page breaking.
Modified: trunk/Master/texmf-dist/doc/latex/base/syntonly.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/tlc2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/tlc3.err
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/tlc3.err 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/tlc3.err 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,4 +1,4 @@
-\newcommand\erratafiledate{2024/05/31} % needs / and not -
+\newcommand\erratafiledate{2024/08/07} % needs / and not -
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To produce a printed version of this errata file run this file through
@@ -469,7 +469,11 @@
\erroronpage{I-xx\ldots I-xxi}{}{FMi}{2023/04/04}{s}
Dot leaders have been changed on all sections.
+\erroronpage{xxv}{footnote}{FMi}{2024/07/11}{s}
+The package implementing the Silly Walk is called \u{\texttt{sillypage}}
+not \u{\texttt{sillywalk}} as claimed in the footnote.
+
\CHAPTER{Bibliography (Part I)}
\erroronpage{I-779}{[24], l.-1}{FMi}{2023/10/28}{s}
@@ -558,8 +562,13 @@
%\CHAPTER{General}
%
-%\CHAPTER{Front matter}
+\CHAPTER{Front matter}
+
+\erroronpage{I-xli}{footnote}{FMi}{2024/07/11}{s}
+The package implementing the Silly Walk is called \u{\texttt{sillypage}}
+not \u{\texttt{sillywalk}} as claimed in the footnote.
+
\CHAPTER{Bibliography}
\erroronpage{II-800}{[50], l.-1}{FMi}{2023/10/28}{s}
@@ -606,13 +615,25 @@
\erroronpage{I-5}{para 4, l.4}{kb}{2023/04/04}{s}
\u{of} the bugs \> \u{with} the bugs
-
-
\erroronpage{I-5}{para 5, l.5}{kb}{2023/04/04}{s}
not least \> \u{but} not least
+\erroronpage{I-10}{para -1, l.2}{ACa}{2024/06/05}{s}
+The value should have been shown with an upright mu, using
+\verb=\qty{0.01}{\micro\metre}= from the \pkg{siunitx} package.
+
+\erroronpage{I-18}{before 1.3.3}{ACa/FMi}{2024/06/05}{s}
+
+Add paragraph:\\
+%
+There are also two sections (2.2.8 and 2.3.4) providing low-level
+background information for reference---useful when looking at existing
+code in older document class files. They are set in a slightly smaller
+typeface to save space and to indicate their special nature as
+reference material, rather than material for daily use.
+
\CHAPTER{Chapter 2 --- The Structure of a \LaTeX{} Document}
\erroronpage{I-31}{para-1,l.-1}{BeB}{2024/03/17}{s}
@@ -627,6 +648,11 @@
Moved first line of page 35 to 34.
+\erroronpage{I-70}{section 2.3.4}{FMi}{2023/06/05}{s}
+
+Add footnote: The whole section is set in a smaller font to indicate
+that is more a reference — helpful mainly when studying existing code.
+
\erroronpage{I-113}{listing}{FMi}{2023/05/14}{s}
Situation is the same in the 2023 distributions; listing output updated.
@@ -672,6 +698,14 @@
\erroronpage{I-182}{para 4}{BeB}{2024/03/17}{s}
Add sentence: The command \verb+\textcquote+ is used in Example 16-5-50 on page II-535.
+\erroronpage{I-195}{para 2}{FMi}{2024/07/20}{s}
+Replace the whole paragraph with:\\
+For the same reason \texttt{soul} was unable to cope with UTF-8 input
+characters if they are internally represented by several bytes. If you
+used such characters, you had to load \texttt{soulutf8} (by Heiko Oberdiek)
+instead of \texttt{soul} — since 2023, both packages are equivalent, thus you may
+always use the \texttt{soul} package.
+
\CHAPTER{Chapter 4 --- Basic Formatting Tools -- Larger \ldots}
\erroronpage{I-253}{para 2, l.-3}{YEi}{2023/11/27}{s}
@@ -679,7 +713,18 @@
and \textsf{thmtools} packages and \textsf{typed-checklist}\u{,} helps you write \> \\
and \textsf{thmtools} packages\u{,} and \textsf{typed-checklist} helps you write
+\erroronpage{I-286}{para 1, l.3}{DPC}{2024/07/15}{s}
+in this case \texttt{shade\u{d}thm} \> in this case \texttt{shadethm}
+\erroronpage{I-322}{para -1, l.-2}{MBe/FMi}{2024/08/07}{s}
+
+Change: \texttt{algorithm\u{s}} \> \texttt{algorithm\u{ic}}
+
+\textit{Reason: The package is called \texttt{algorithmic} and there
+is also \texttt{algorithm} to make floats, but the CTAN bundle (and
+its documentation) calls it \texttt{algorithms}.}
+
+
\erroronpage{I-323}{Table 4.4, left column}{BeB}{2023/07/25}{s}
Typo: Assembler (\u{N}otorola68k, x86masm) \> \\ Assembler (\u{M}otorola68k, x86masm)
% Matlab \> Matlab \u{(empty, 5.1)}
@@ -745,9 +790,10 @@
is not really an error, but it looks better---and is consistent with the
`actual' item of `profit' for Booklet 113.)
+\erroronpage{I-492}{footnote}{DPC}{2024/07/15}{s}
+called \u{\texttt{threetableex}} \> called \u{\texttt{threeparttablex}}
\erroronpage{I-494}{para -2, l.3}{MRu}{2024/03/16}{s}
-
Use plural: The allowed key\u{s} are \ldots
@@ -785,6 +831,10 @@
\CHAPTER{Chapter 9 --- Font Selection and Encodings}
+\erroronpage{I-687}{table 9.6, l.21}{YvH}{2024/06/19}{s}
+ cmdh \> lmdh
+
+
\erroronpage{I-688}{para -2, l. 1}{BeB}{2023/08/13}{s}
acronym PSNFSS not explained: PSNFSS \> PostScript New Font Selection Scheme (PSNFSS)
@@ -848,6 +898,9 @@
There are no italic blackletters (so it should be in blue): \\
\textit{phœnix's official rôle} \> \textit{\bl phœnix's official rôle}
+\erroronpage{II-27}{para 1, l.1}{MBe/FMi}{2024/08/02}{s}
+Package was renamed: \texttt{droidmono} \> \texttt{droid\u{sans}mono}
+
\erroronpage{II-28}{table 10.14, l. 3}{BeB}{2023/08/13}{s}
Inconsistent order: sl, l \> l, sl
@@ -1169,6 +1222,10 @@
longer honored.
+\erroronpage{II-149}{para 2, l.4}{DPC}{2024/07/15}{s}
+package \texttt{flex\u{y}sym} \>
+package \texttt{flex\u{i}sym}
+
\erroronpage{II-167}{para. 3, l. -2}{BeB}{2023/08/13}{s}
option\u e \> option\u{s}
@@ -1179,9 +1236,10 @@
\erroronpage{II-178}{Tab. 11.3, l.10}{BeB}{2023/08/13}{s}
in the description column: \u{array}-symbol-arrow \> \u{arrow}-symbol-arrow
+\erroronpage{II-189}{footnote}{DPC}{2024/07/15}{s}
+\texttt{oubrace} package \> \texttt{oubrace\u{s}} package
-
\CHAPTER{Chapter 12 --- Fonts in Formulas}
@@ -1346,6 +1404,10 @@
\texttt{Harf\u{B}uzz}. Both names are supported, but the recommended
spelling is \texttt{HarfBuzz}.
+\erroronpage{II-341}{para -4, l.4}{DPC/FMi}{2024/07/15}{s}
+\texttt{devnag} \u{package} \> \texttt{devnag} \u{program}
+
+
\CHAPTER{Chapter 14 --- Index Generation}
% Das Beispiel von S. II-352 als File wäre schön, dann könnte man das mit
@@ -1382,6 +1444,8 @@
the \cs{MakeUpper}\texttt{\u{C}ase} trick \>
the \cs{MakeUpper}\texttt{\u{c}ase} trick
+\erroronpage{II-423}{table 15.9}{MBe/FMi}{2024/08/04}{s}
+Drop \texttt{nature.bst} line. Style no longer supported.
\erroronpage{II-435}{code}{FMi}{2023/05/26}{s}
\verb=\textcolor{See= \> \cs{textcolor}\u{\texttt{\{blue\}}}\texttt{\{See}
@@ -1494,13 +1558,16 @@
\begin{multicols}{3}[Thanks to all who have found errors or
omissions. Listed are the people who found an errata entry first.]
+\contributor{ACa}{Alfredo Canziani}
\contributor{BeB}{Bernd Burghardt}
\contributor{BYu}{Boshi Yuan}
\contributor{CAR}{Chris Rowley}
+\contributor{DPC}{David Carlisle}
\contributor{DC}{Davide Campagnari}
\contributor{DFl}{Daniel Flipo}
\contributor{EOl}{Edgar Olthof}
\contributor{FMi}{Frank Mittelbach}
+\contributor{MBe}{Matthew Bertucci}
\contributor{MJo}{Maciej Jończyk}
\contributor{MRu}{Mark Rudolph}
\contributor{YFu}{FUJIMURA Yukitoshi}
Modified: trunk/Master/texmf-dist/doc/latex/base/tlc3.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/tulm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/usrguide-historic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/usrguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/usrguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/base/usrguide.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/base/usrguide.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
\texttt{usrguide.tex} for full details.}%
}
-\date{2024-05-24}
+\date{2024-10-22}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -265,7 +265,16 @@
create environments (\cs{begin}\arg{env} \ldots{}
\cs{end}\arg{env}). Both the \meta{beg-code} and \meta{end-code}
may access the arguments as defined by \meta{arg spec}. The arguments will be
-given following \cs{begin}\arg{env}.
+given following \cs{begin}\arg{env}. Any spaces at the start and end of the
+\arg{env} are removed before the definition takes place, thus
+\begin{verbatim}
+\NewDocumentEnvironment{foo}
+\end{verbatim}
+and
+\begin{verbatim}
+\NewDocumentEnvironment{ foo }
+\end{verbatim}
+both create the same \enquote{\texttt{foo}} environment.
\subsection{Optional arguments}
\label{sec:cmd:opt}
Modified: trunk/Master/texmf-dist/doc/latex/base/utf8ienc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/base/webcomp.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/firstaid/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/firstaid/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/firstaid/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,3 +1,8 @@
+2024-10-16 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: extend firstaid for cleveref
+ for issue #1393 and longtable.
+
2024-06-25 David Carlisle <David.Carlisle at latex-project.org>
* latex2e-first-aid-for-external-files.dtx: add firstaid for arydshln
Modified: trunk/Master/texmf-dist/doc/latex/firstaid/latex2e-first-aid-for-external-files.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphics/README.md 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/graphics/README.md 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,7 +1,7 @@
The LaTeX `graphics` bundle
===========================
-Release 2024-06-01 patch level 0
+Release 2024-11-01
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex/graphics/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/graphics/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/graphics/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -9,9 +9,18 @@
================================================================================
#########################
-# 2023-11-01 Release
+# 2024-11-01 Release
#########################
+2024-06-24 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * color.dtx (section{Extra Groups}):
+ Support new @endpe mechanism
+
+#########################
+# 2024-06-01 Release
+#########################
+
2024-05-23 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
* graphics.dtx:
Modified: trunk/Master/texmf-dist/doc/latex/graphics/color.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/drivers.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/epsfig.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/graphics.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/graphicx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/grfguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/keyval.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/lscape.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/mathcolor.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/rotating.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/rotex.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/graphics/trig.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/latex-lab/README.md 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/latex-lab/README.md 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,6 +1,6 @@
# LaTeX laboratory
-Release 2024-06-01 patch level 0
+Release 2024-11-01
## Overview
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/blocks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/blocks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/latex-lab/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/latex-lab/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,12 +1,154 @@
+2024-10-25 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-math.dtx: reorganized luamml and mathml options
+ to support also structure elements and extended the documentation. Corrected
+ handling of alt-texts. Added examples for the various options.
+
+2024-10-16 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-firstaid.dtx: correct amsthm firstaid (tagging/733),
+ remove now unneeded code for cleveref.
+
+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
+
+2024-08-21 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-math.dtx: correct luamml patches for array,
+ allow to use luamml without unicode-math
+
+2024-08-14 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-math.dtx: add luamml support for automatic mathml generation
+
+2024-08-12 Joseph Wright <Joseph.Wright at latex-project.org>
+ * latex-lab-math.dtx: add support for math in tabulars
+
+2024-08-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-firstaid.dtx: amsproc support, discussion in PR #517
+
+2024-08-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-block.dtx: preset verbatim para-instance, issue #119
+
+2024-08-10 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * 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.
+ handle issue #37
+
+2024-08-06 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-table.dtx: add support for header-columns
+ * latex-lab-table.dtx: add support for multirows
+ * latex-lab-table.dtx: handle issue #432
+ * latex-lab-marginpar.dtx: handle issue #444
+
+2024-07-11 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-footnote.dtx: restore paragraph defaults at the begin of the footnote
+ tagging-project#262
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * latex-lab-table.dtx (subsection{Tagging support sockets}):
+ add plugs for tbl/leaders/begin and /end
+ (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
+ to sockets.
+
2024-05-25 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* latex-lab-table.dtx: disable table headers in presentation tables.
2024-05-25 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
- * latex-lab-firstaid.dtx: add firstaid for booktabs cmidrules,
+ * latex-lab-firstaid.dtx: add firstaid for booktabs cmidrules,
see tagging-issue 69.
2024-04-18 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
- * documentmetadata-support.dtx: change handling of default language.
+ * documentmetadata-support.dtx: change handling of default language.
The code now tries to detect languages set by babel/polyglossia.
2024-04-16 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/documentmetadata-support-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/documentmetadata-support-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-amsmath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-bib.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-block.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-firstaid.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-float.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-footnotes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-graphic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-marginpar.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-math.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-mathpkg.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-mathtools.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-minipage.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-namespace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-new-or-1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-new-or-2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-sec.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-table.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-testphase.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-text.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-title.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc-hyperref-changes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc-kernel-changes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/latex-lab/latex-lab-toc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tools/README.md 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/tools/README.md 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2024-06-01a
+Release 2024-11-01
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex/tools/afterpage.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/array.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/bm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/calc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tools/changes.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/tools/changes.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -9,6 +9,67 @@
All changes above are only part of the development branch for the next release.
================================================================================
+#########################
+# 2024-11-01 Release
+#########################
+
+2024-10-30 David Carlisle <David.Carlisle at latex-project.org>
+
+ * amsmath.dtx: Guard the \protect tests from primitive if tokens
+ in the definition (gh/1448)
+
+2024-10-27 David Carlisle <David.Carlisle at latex-project.org>
+
+ * longtable.dtx Guard against increasing \pagegoal past \maxdimen (gh/1495)
+
+
+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:
+ store row number of head also if it ends with a \cr
+ (tagging-project-gh/554).
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * array.dtx (subsection{Handling \cs{cline}}):
+ Support for tagging \cline (tagging/134)
+
+2024-07-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * longtable.dtx:
+ Added \LTcaptype (from package ltcaption) to support other types
+ beside table and to support unnumbered longtables (gh/1377).
+
+
+2024-06-28 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * multicol.dtx:
+ Update documentation to reflect that \sloppy isn't using
+ \tolerance=10000 any longer (it did in the early days of LaTeX)
+ (gh/1385)
+
2024-06-14 David Carlisle <David.Carlisle at latex-project.org>
* array.dtx move \ExplSyntaxOff earlier so error message spaces preserved gh/1378
Modified: trunk/Master/texmf-dist/doc/latex/tools/dcolumn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/delarray.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/enumerate.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/fileerr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/fontsmpl.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/ftnright.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/hhline.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/indentfirst.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/l3sys-query.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/layout.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/longtable.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/manifest.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tools/manifest.txt 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/tools/manifest.txt 2024-11-01 21:25:37 UTC (rev 72739)
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2024
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -49,7 +49,7 @@
Access bold math symbols.
calc.dtx
- Infix arithmetic expresions. Contributed to the distribution by
+ Infix arithmetic expressions. Contributed to the distribution by
Kresten Krab Thorup and Frank Jensen.
enumerate.dtx
@@ -60,7 +60,7 @@
missing file error loop.
fontsmpl.dtx
- Package and test file for producing `font samples'
+ Package and test file for producing `font samples'.
ftnright.dtx
Place footnotes in the right hand column in two-column mode.
@@ -77,7 +77,7 @@
rawfonts.dtx
Preload fonts under the old internal font names of LaTeX2.09.
- Not recomended for new packages, but may help when updating old
+ Not recommended for new packages, but may help when updating old
files.
shellesc.dtx
@@ -103,7 +103,7 @@
Flexible version of verbatim environment.
xr.dtx
- eXternall References. Extend \ref to access \label commands in
+ eXternal References. Extend \ref to access \label commands in
other documents.
xspace.dtx
Modified: trunk/Master/texmf-dist/doc/latex/tools/multicol.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/rawfonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/shellesc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/showkeys.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/somedefs.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/tabularx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/theorem.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/tools-overview.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/tools-overview.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/tools/tools-overview.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/doc/latex/tools/tools-overview.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -132,7 +132,7 @@
Access bold math symbols.
}%
\entry{calc}{%
- Infix arithmetic expresions. Contributed to the distribution by
+ Infix arithmetic expressions. Contributed to the distribution by
Kresten Krab Thorup and Frank Jensen.
}%
\entry{dcolumn}{%
@@ -149,7 +149,7 @@
missing file error loop.
}%
\entry{fontsmpl}{%
- Package and test file for producing \emph{font samples}
+ Package and test file for producing \emph{font samples}.
}%
\entry{ftnright}{%
Place footnotes in the right hand column in two-column mode.
@@ -173,7 +173,7 @@
}%
\entry{rawfonts}{%
Preload fonts under the old internal font names of \LaTeX{}2.09.
- Not recomended for new packages, but may help when updating old
+ Not recommended for new packages, but may help when updating old
files.
}%
\entry{shellesc}{%
@@ -206,7 +206,7 @@
Flexible version of verbatim environment.
}%
\entry{xr}{%
- eXternall References. Extend \cs{ref} to access \cs{label} commands in
+ eXternal References. Extend \cs{ref} to access \cs{label} commands in
other documents.
}%
\entry{xspace}{%
Modified: trunk/Master/texmf-dist/doc/latex/tools/trace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/varioref.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/verbatim.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/xr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/tools/xspace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/amsmath/amsmath.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/amsmath/amsmath.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -81,11 +81,11 @@
% \begin{macrocode}
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
-\DeclareCurrentRelease{}{2019-04-01}
+\DeclareCurrentRelease{}{2024-10-30}
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2024/05/23 v2.17q AMS math features]
+\ProvidesPackage{amsmath}[2024/10/30 v2.17s 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.
@@ -1002,6 +1002,10 @@
\let\DOTSI\relax
\let\DOTSB\relax
\let\DOTSX\relax
+% \end{macrocode}
+% In the definitions below, special \cs{uccode}s are used to generate macros
+% with arguments delimited by catcode 12 letters as returned by \cs{meaning}.
+% \begin{macrocode}
{\uccode`7=`\\ \uccode`8=`m \uccode`9=`a \uccode`0=`t \uccode`!=`h
\uppercase{%
\gdef\math@#1#2#3#4#5#6\math@{\gtest at false\ifx 7#1\ifx 8#2%
@@ -1039,7 +1043,14 @@
}
\fi
% \end{macrocode}
+% \changes{v2.17s}{2024/10/30}{guard against primitive if (gh/1448)}
% \begin{macrocode}
+{\uccode`7=`\\ \uccode`(=`i \uccode`)=`f
+ \uppercase{\gdef\testif@#1#2#3#4\testif@{%
+ \ifx7#1\ifx(#2\ifx)#3\@tempswafalse\fi\fi\fi}
+}}
+% \end{macrocode}
+% \begin{macrocode}
\newcount\classnum@
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum at 4096
\ifcase\number\classnum@\or\or\gdef\thedots@{\dotsb@}\or
@@ -1087,7 +1098,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 +1158,44 @@
\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)}
+% \changes{v2.17s}{2024/10/30}{skip protect testif detect primitive if (gh/1448)}
% \begin{macrocode}
\xdef\meaning@{\meaning\@let at token. .........}%
+ \@tempswatrue
+ \@xp\testif@\meaning at ....\testif@
+ \if at tempswa
+ \begingroup
+ \def\protect{\protect}% % make it a quark
+ \xdef\meaning@{\@xp\stripprotect@\@let at token.........\stripprotect at . .........}%
+ \endgroup
+ \fi
% \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 +1255,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 +3419,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 +3842,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 +3975,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 +4074,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 +4648,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 +5097,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 +5134,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 +5556,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 +5579,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 +6243,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 +6268,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 +6632,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 +6639,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 +6693,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/base/alltt.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/alltt.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/alltt.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -40,7 +40,7 @@
%<package>\ProvidesPackage{alltt}
%<driver>\ProvidesFile{alltt.drv}
%\ProvidesFile{alltt.dtx}
- [2024/02/08 v2.0g defines alltt environment]
+ [2024/07/07 v2.0g defines alltt environment]
%
%<*driver>
\documentclass{ltxdoc}
@@ -83,7 +83,7 @@
% Here are some things you may want to do in an \Lenv{alltt}
% environment:
% \begin{itemize}
-% \item Change fonts--e.g., by typing |{\em emphasized text\/}|
+% \item Change fonts--e.g., by typing |\emph{emphasized text}|
%
% \item Insert text from a file \file{foo.tex} by typing
% |\input{foo}|. Beware that each |<return>| starts a new line, so
Modified: trunk/Master/texmf-dist/source/latex/base/classes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/classes.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/classes.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
@@ -257,7 +257,7 @@
%
% \begin{macro}{\@ptsize}
% This control sequence is used to store the second digit of the
-% pointsize we are typesetting in. So, normally, it's value is one
+% pointsize we are typesetting in. So, normally, its value is one
% of 0, 1 or 2.
% \begin{macrocode}
%<*article|report|book>
@@ -362,7 +362,7 @@
% with other packages that use the |\@ptsize| variable to select
% special actions. It makes the declarations of size options less
% than 10pt difficult, although one can probably use \texttt{9}
-% and \texttt{8} assuming that a class wont define both
+% and \texttt{8} assuming that a class won't define both
% \Lopt{8pt} and \Lopt{18pt} options.
%
% \begin{macrocode}
@@ -3122,7 +3122,7 @@
%
% \subsubsection{Theorem}
%
-% This document class does not define it's own theorem environments,
+% This document class does not define its own theorem environments,
% the defaults, supplied by the \LaTeX{} format are available.
%
% \subsubsection{Titlepage}
@@ -3130,12 +3130,12 @@
% \begin{environment}{titlepage}
% In the normal environments, the titlepage environment does nothing
% but start and end a page, and inhibit page numbers. When \LaTeX\ is
-% in two-column mode, the environmont temporarily switches to
+% in two-column mode, the environment temporarily switches to
% one-column mode.
% In the report class, it also resets the page number to one, and
% then, in two-column mode, sets it back to one at the end.
% For the book class the environment makes sure that the title page
-% is on a recto page by issueing a \cs{cleardouplepage}-command.
+% is on a recto page by issuing a \cs{cleardoublepage}-command.
% In compatibility mode, it sets the page number to zero. This is
% incorrect since it results in using the page parameters for a
% right-hand page but it is the way it was.
Modified: trunk/Master/texmf-dist/source/latex/base/doc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/doc.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/doc.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,7 +34,7 @@
%\catcode`\<=14
%<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%<+package>
-% Any rollback request before 2016-02-15 we try to fullfil with the 2016 version:
+% ^^A Any rollback request before 2016-02-15 we try to fulfill with the 2016 version:
%<+package>\DeclareRelease{}{1994-06-01}
%<+package> {doc-2016-02-15.sty}
%<+package>\DeclareRelease{v2.1g}{2016-02-15}
@@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2024/04/26 v3.0p
+%<+package|shortvrb> [2024/10/23 v3.0q
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -836,7 +836,7 @@
%
% All three above declarations are local to the current group.
%
-% Production (or not) of the index (via the |\makeindex| commend) is
+% Production (or not) of the index (via the |\makeindex| command) is
% controlled by using or omitting the following declarations in the
% driver file preamble; if neither is used, no index is produced.
% \DescribeInterfaceMacro\PageIndex Using |\PageIndex| makes all index
@@ -5463,26 +5463,14 @@
% \end{macrocode}
% We require the package without any option so if it was already
% loaded there is no option clash.
+% \changes{v3.0q}{2024/06/04}{Use hooks to save and restore
+% definitions when hypdoc gets loaded (gh/1000)}
% \begin{macrocode}
\RequirePackage{hypdoc}
\expandafter\let\csname doc.sty-h@@k\endcsname\doc at eoph@@k
% \end{macrocode}
-% After \pkg{hypdoc} got loaded we need to undefine those macros
-% again so that later on \texttt{Macro} and \texttt{Env} \DOC items
-% appear to be undefined.
-% \begin{macrocode}
- \let\PrintDescribeMacro \@@PrintDescribeMacro
- \let\PrintDescribeEnv \@@PrintDescribeEnv
- \let\PrintMacroName \@@PrintMacroName
- \let\PrintEnvName \@@PrintEnvName
- \let\SpecialUsageIndex \@@SpecialUsageIndex
- \let\SpecialEnvIndex \@@SpecialEnvIndex
- \let\SortIndex \@@SortIndex
- \let\DescribeMacro \@@DescribeMacro
- \let\DescribeEnv \@@DescribeEnv
-% \end{macrocode}
% The package adds new definitions for \cs{special at index} into
-% \cs{CodelineIndex} and \cs{PageIndex} but since we are loading it
+% \cs{CodelineIndex} and \cs{PageIndex} but since we might be loading it
% very late we are already past them (in the preamble). So we test
% the final state and do it here, if necessary.
% \begin{macrocode}
@@ -5577,7 +5565,7 @@
% Since version 2.1g, \texttt{doc} creates a \cs{saved at indexname} command
% which in used by \cs{changes}. We now support that as well. The expansion of
% this command depends on whether the documented item is macrolike or not,
-% which we don't know here (it's only know by \cs{NewDocElement}). That's why we
+% which we don't know here (it's only known by \cs{NewDocElement}). That's why we
% need one specific command generating \cs{saved at indexname} the right way for
% every single item. These commands are
% named\cs{@Save\meta{item}IndexName};
@@ -6203,10 +6191,16 @@
%
%
% To be able to restore the definition after \pkg{hypdoc} is loaded
-% we better save them here. We only load the package at the end of
+% we better save them beforehand. We only load the package at the end of
% the preamble, but the user might do this earlier and then chaos
-% is ensured.
+% is ensured. Thus, to support this generally we save them directly
+% before the package is loaded.
+% In this way the user can still alter the definition for
+% \cs{PrintDescribeMacro} and friends in the preamble.
+% \changes{v3.0q}{2024/06/04}{Use hooks to save and restore
+% definitions when hypdoc gets loaded (gh/1000)}
% \begin{macrocode}
+\AddToHook{package/hypdoc/before}{%
\let\@@PrintDescribeMacro \PrintDescribeMacro
\let\@@PrintDescribeEnv \PrintDescribeEnv
\let\@@PrintMacroName \PrintMacroName
@@ -6216,7 +6210,24 @@
\let\@@SortIndex \SortIndex
\let\@@DescribeMacro \DescribeMacro
\let\@@DescribeEnv \DescribeEnv
+}
% \end{macrocode}
+% After \pkg{hypdoc} got loaded we need to reset those macros
+% again. This is done in the generic hook
+% \texttt{package/hypdoc/after}.
+% \begin{macrocode}
+\AddToHook{package/hypdoc/after}{%
+ \let\PrintDescribeMacro \@@PrintDescribeMacro
+ \let\PrintDescribeEnv \@@PrintDescribeEnv
+ \let\PrintMacroName \@@PrintMacroName
+ \let\PrintEnvName \@@PrintEnvName
+ \let\SpecialUsageIndex \@@SpecialUsageIndex
+ \let\SpecialEnvIndex \@@SpecialEnvIndex
+ \let\SortIndex \@@SortIndex
+ \let\DescribeMacro \@@DescribeMacro
+ \let\DescribeEnv \@@DescribeEnv
+}
+% \end{macrocode}
%
%
% \section{Misc additions}
Modified: trunk/Master/texmf-dist/source/latex/base/fontdef.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/fontdef.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/fontdef.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -40,7 +40,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
- [2024/02/09 v3.0i LaTeX Kernel
+ [2024/09/03 v3.0k LaTeX Kernel
% \iffalse
%<text, > (Text font setup)
%<math, > (Math font setup)
@@ -403,14 +403,29 @@
% (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
% \end{macrocode}
%
+% \changes{v3.0j}{2024/06/24}{load ts1 cmr fd file in Unicode engines}
+% Even though Unicode engines default to |lm| load |ts1cmr|
+% as this may be used for fallback for TS1 encoding.
+% \begin{macrocode}
+\ifx\Umathcode\@undefined\else
+\begingroup
+\nfss at catcodes
+\input {ts1cmr.fd}
+\endgroup
+\fi
+% \end{macrocode}
+%
% Even with all the precautions it is still possible that NFSS will
% run into problems, for example, when a |.fd| file contains
% corrupted data. To guard against such cases NFSS has a very
@@ -527,7 +542,6 @@
%<*text|latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\updefault}{font defaults change}%
-% \begin{macrocode}
\renewcommand\updefault{up}
% \end{macrocode}
% We append \cs{@empty} to the series value so that we can detect
Modified: trunk/Master/texmf-dist/source/latex/base/latexrelease.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/latexrelease.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/latexrelease.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -40,7 +40,7 @@
%<*latexrelease>
% \fi
% \ProvidesFile{latexrelease.dtx}
- [2022/11/14 v1.0p LaTeX release emulation and tests
+ [2024/08/11 v1.0p LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
% \iffalse
%</latexrelease>
@@ -507,7 +507,7 @@
% \end{macro}
%
% \changes{v1.0c}{2015/02/19}{Swap argument order}
-% \changes{v1.0k}{2018/05/08}{reset \cs{\requestedLaTeXdate} for current
+% \changes{v1.0k}{2018/05/08}{reset \cs{requestedLaTeXdate} for current
% and latest options, github issue 43}
% \begin{macrocode}
\DeclareOption*{%
Modified: trunk/Master/texmf-dist/source/latex/base/letter.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/letter.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/letter.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2021/12/07 v1.3c
+ [2024/08/12 v1.3c
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -838,9 +838,10 @@
% $1$, with footnotes starting from $1$ as well.
% (The first page is unnumbered.) It has a single argument, which
% is the addressee and his address, as in
+% \changes{v1.3c}{2024/08/12}{Alter sample address (gh/1439)}
%\begin{verbatim}
% \begin{letter}{Sam Jones \\
-% Institute for Retarded Study\\
+% Institute for Trivial Study\\
% Princeton, N.J.}
%\end{verbatim}
% Local declarations, such as |\address|, can follow the
Modified: trunk/Master/texmf-dist/source/latex/base/ltboxes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltboxes.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltboxes.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltboxes.dtx}
- [2024/06/10 v1.4g LaTeX Kernel (Box Commands)]
+ [2024/06/23 v1.4h LaTeX Kernel (Box Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltboxes.dtx}
@@ -456,9 +456,6 @@
% \begin{macro}{\color at begingroup}
% \changes{v1.0b}{1994/03/14}
% {macro added for color support}
-% \begin{macro}{\color at endgroup}
-% \changes{v1.0b}{1994/03/14}
-% {macro added for color support}
% \begin{macro}{\color at setgroup}
% \changes{v1.0f}{1994/05/11}
% {macro added for color support}
@@ -491,7 +488,6 @@
%<latexrelease>\IncludeInRelease{2021/06/01}%
%<latexrelease> {\color at begingroup}{color group settings}%
\let\color at begingroup\begingroup
-\def\color at endgroup{\endgraf\endgroup}
\def\color at setgroup{\color at begingroup} % changed further in color package
\let\normalcolor\relax % remains untouched; only changed in a color package
\def\color at hbox{\hbox\bgroup\color at begingroup}
@@ -506,7 +502,6 @@
%<latexrelease> {\color at begingroup}{color group settings}%
%<latexrelease>
%<latexrelease>\let\color at begingroup\relax
-%<latexrelease>\let\color at endgroup\relax
%<latexrelease>\let\color at setgroup\relax
%<latexrelease>\let\normalcolor\relax
%<latexrelease>\let\color at hbox\relax
@@ -522,7 +517,51 @@
% \end{macro}
% \end{macro}
% \end{macro}
+
+
+
+% \begin{macro}{\color at endgroup}
+% This macro is separated out because it received an update in 2024,
+% so requires its own rollback.
+% \changes{v1.0b}{1994/03/14}
+% {macro added for color support}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\color at endgroup}{color group settings}%
+% \end{macrocode}
+% Beside \cs{endgraf} for handling vertical boxes we also reset
+% \cs{if at endpe} as we are leaving the context.
+% \changes{v1.4h}{2024/06/23}{Adjust for new \texttt{@endpe} handling}
+% \begin{macrocode}
+\def\color at endgroup{\endgraf\@endpefalse\endgroup}
+%<latexrelease>
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2021/06/01}%
+%<latexrelease> {\color at endgroup}{color group settings}%
+%<latexrelease>\def\color at endgroup{\endgraf\endgroup}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\color at endgroup}{color group settings}%
+%<latexrelease>
+%<latexrelease>\let\color at endgroup\relax
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
+
+
+
%
% \begin{macro}{\newsavebox}
% \changes{v0.1a}{1993/12/03}
Modified: trunk/Master/texmf-dist/source/latex/base/ltclass.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltclass.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltclass.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2024/04/10 v1.5k 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}
@@ -2819,13 +2821,42 @@
% The current file type.
% \changes{v0.2i}{1993/12/03}
% {Name changed to avoid clash with output routine.}
+% \changes{v1.5l}{2024/06/04}
+% {Allow for extensions other than "cls" and "pkg"}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\@cls at pkg}{Allow for more extensions}%
\def\@cls at pkg{%
\ifx\@currext\@clsextension
document class%
\else
- package%
+ \ifx\@currext\@pkgextension
+ package%
+ \else
+ file%
+ \fi
\fi}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@cls at pkg}{Allow for more extensions}%
+%<latexrelease>
+%<latexrelease>\def\@cls at pkg{%
+%<latexrelease> \ifx\@currext\@clsextension
+%<latexrelease> document class%
+%<latexrelease> \else
+%<latexrelease> package%
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
\@onlypreamble\@cls at pkg
% \end{macrocode}
% \end{macro}
@@ -3569,11 +3600,20 @@
\pkgcls at debug{\@spaces 4: #4}%
%</tracerollback>
% \end{macrocode}
-% Two of the arguments are needed later on in error/warning
+% Three of the arguments are needed later on in error/warning
% messages so we save them.
+% \changes{v1.5l}{2024/06/04}
+% {New argument \cs{pkgcls at ext} (gh/870)}
% \begin{macrocode}
\def\pkgcls at name{#1}% % for info message
\def\pkgcls at arg {#3}% % for info message
+ \edef\pkgcls at ext{%
+ \ifx#4\@clsextension document class\else
+ \ifx#4\@pkgextension package\else
+ file
+ \fi
+ \fi
+ }% % for info message
% \end{macrocode}
% then we parse the final optional argument to determine if there
% is a specific rollback request for the current file. This will
@@ -3737,12 +3777,14 @@
% therefore issue a warning.
% \changes{v1.2i}{2018/05/08}
% {Make suspicious rollback a warning not error: github issue 43}
+% \changes{v1.5l}{2024/06/04}
+% {New argument \cs{pkgcls at ext} (gh/870)}
% \begin{macrocode}
\ifnum \pkgcls at targetdate > \z@
\ifnum \@parse at version0#1//00\@nil > \pkgcls at targetdate
\@latex at warning@no at line{Suspicious rollback/min-date date given\MessageBreak
A minimal date of #1 has been specified for
- \@cls at pkg\MessageBreak '\pkgcls at name'.\MessageBreak
+ \pkgcls at ext\MessageBreak '\pkgcls at name'.\MessageBreak
But this is in conflict
with a rollback request to \requestedpatchdate}
\fi
@@ -3891,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/base/ltcmd.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltcmd.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltcmd.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%% From File: ltcmd.dtx
%
% \begin{macrocode}
-\def\ltcmdversion{v1.2e}
-\def\ltcmddate{2024-04-17}
+\def\ltcmdversion{v1.2f}
+\def\ltcmddate{2024-07-06}
% \end{macrocode}
%
%<*driver>
@@ -620,31 +620,51 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_declare_env:nnnn}
+% \begin{macro}{\@@_declare_env:nnnn, \@@_declare_env:ennn}
+% \changes{v1.2f}{2024/07/06}{Use space-trimmed envname directly (gh/1399)}
% \begin{macro}{\@@_declare_env_internal:nnnn}
+% \begin{macro}{\@@_set_environment_end:n}
% The lead-off to creating an environment is much the same as that for
% creating a command: issue the appropriate message, store the argument
% specification then hand off to an internal function.
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@@_declare_env:nnnn}%
+%<latexrelease> {Use~space-trimmed~envname~directly}
\cs_new_protected:Npn \@@_declare_env:nnnn #1#2
{
- \str_set:Nx \l_@@_environment_str {#1}
- \str_set:Nx \l_@@_environment_str
- { \tl_trim_spaces:o { \l_@@_environment_str } }
- \cs_if_exist:cTF { \l_@@_environment_str }
- {
- \msg_info:nnxx { cmd } { redefine-env }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
- {
- \msg_info:nnxx { cmd } { define-env }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
+ \str_set:Nn \l_@@_environment_str {#1}
+ \cs_if_exist:cTF { #1 }
+ { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } }
+ { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } }
\bool_set_false:N \l_@@_expandable_bool
\bool_set_true:N \l_@@_environment_bool
- \exp_args:NV \@@_declare_env_internal:nnnn
- \l_@@_environment_str {#2}
+ \@@_declare_env_internal:nnnn {#1} {#2}
}
+\cs_generate_variant:Nn \@@_declare_env:nnnn { e }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/06/01}{\@@_declare_env:nnnn}%
+%<latexrelease> {Use~space-trimmed~envname~directly}
+%<latexrelease>\cs_new_protected:Npn \@@_declare_env:nnnn #1#2
+%<latexrelease> {
+%<latexrelease> \str_set:Nx \l_@@_environment_str {#1}
+%<latexrelease> \str_set:Nx \l_@@_environment_str
+%<latexrelease> { \tl_trim_spaces:o { \l_@@_environment_str } }
+%<latexrelease> \cs_if_exist:cTF { \l_@@_environment_str }
+%<latexrelease> {
+%<latexrelease> \msg_info:nnxx { cmd } { redefine-env }
+%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} }
+%<latexrelease> }
+%<latexrelease> {
+%<latexrelease> \msg_info:nnxx { cmd } { define-env }
+%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} }
+%<latexrelease> }
+%<latexrelease> \bool_set_false:N \l_@@_expandable_bool
+%<latexrelease> \bool_set_true:N \l_@@_environment_bool
+%<latexrelease> \exp_args:NV \@@_declare_env_internal:nnnn
+%<latexrelease> \l_@@_environment_str {#2}
+%<latexrelease> }
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% Creating a document environment requires a few more steps than creating
% a single command. In order to pass the arguments of the command to the
@@ -685,6 +705,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Structure of \pkg{xparse} commands}
%
@@ -5022,36 +5043,109 @@
%
% \begin{macro}{\NewDocumentEnvironment}
% \changes{v1.0h}{2021/08/27}{Check for end-of-environment command}
+% \changes{v1.2f}{2024/07/06}{Trim spaces from envname first (gh/1399)}
% \begin{macro}{\RenewDocumentEnvironment}
% \begin{macro}{\ProvideDocumentEnvironment}
% \begin{macro}{\DeclareDocumentEnvironment}
-% Very similar for environments.
+% \begin{macro}{\@@_new_env:nnnn, \@@_renew_env:nnnn, \@@_provide_env:nnnn}
+% \begin{macro}{\@@_new_env:ennn, \@@_renew_env:ennn, \@@_provide_env:ennn}
+% Very similar for environments. Trim spaces from user-specified
+% \meta{envname}, do existence check then hand off to
+% \cs{@@_declare_env:nnnn}.
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}{\NewDocumentEnvironment}%
+%<latexrelease> {Trim~spaces~from~envname~first}
\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
{
+ \@@_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \@@_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ {
+ \@@_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ {
+ \@@_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+% \end{macrocode}
+% Each of \cs[no-index]{@@_(new|renew|provide)_env:nnnn} is curried.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_new_env:nnnn #1
+ {
\cs_if_exist:cTF {#1}
- { \msg_error:nnx { cmd } { env-already-defined } {#1} }
{
+ \msg_error:nnx { cmd } { env-already-defined } {#1}
+ \use_none:nnn
+ }
+ {
\cs_if_exist:cTF { end #1 }
- { \msg_error:nnx { cmd } { env-end-already-defined } {#1} }
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ {
+ \msg_error:nnx { cmd } { env-end-already-defined } {#1}
+ \use_none:nnn
+ }
+ { \@@_declare_env:nnnn {#1} }
}
}
-\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+\cs_new_protected:Npn \@@_renew_env:nnnn #1
{
\cs_if_exist:cTF {#1}
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
- { \msg_error:nnx { cmd } { env-undefined } {#1} }
+ { \@@_declare_env:nnnn {#1} }
+ {
+ \msg_error:nnx { cmd } { env-undefined } {#1}
+ \use_none:nnn
+ }
}
-\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
- { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
-\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \@@_provide_env:nnnn #1
+ {
+ \cs_if_exist:cTF {#1}
+ { \use_none:nnn }
+ { \@@_declare_env:nnnn {#1} }
+ }
+\cs_generate_variant:Nn \@@_new_env:nnnn { e }
+\cs_generate_variant:Nn \@@_renew_env:nnnn { e }
+\cs_generate_variant:Nn \@@_provide_env:nnnn { e }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/06/01}{\NewDocumentEnvironment}%
+%<latexrelease> {Trim~spaces~from~envname~first}
+%<latexrelease>\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF {#1}
+%<latexrelease> { \msg_error:nnx { cmd } { env-already-defined } {#1} }
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF { end #1 }
+%<latexrelease> { \msg_error:nnx { cmd } { env-end-already-defined } {#1} }
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease> }
+%<latexrelease> }
+%<latexrelease>\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF {#1}
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease> { \msg_error:nnx { cmd } { env-undefined } {#1} }
+%<latexrelease> }
+%<latexrelease>\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+%<latexrelease> { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+%<latexrelease>\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease>\cs_undefine:N \@@_new_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_new_env:ennn
+%<latexrelease>\cs_undefine:N \@@_renew_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_renew_env:ennn
+%<latexrelease>\cs_undefine:N \@@_provide_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_provide_env:ennn
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\NewExpandableDocumentCommand}
% \begin{macro}{\RenewExpandableDocumentCommand}
Modified: trunk/Master/texmf-dist/source/latex/base/ltcmdhooks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltcmdhooks.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltcmdhooks.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -20,7 +20,7 @@
%<*driver>
% \fi
\ProvidesFile{ltcmdhooks.dtx}
- [2024/04/17 v1.0j LaTeX Kernel (Command hooks)]
+ [2024/10/22 v1.0j LaTeX Kernel (Command hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -68,7 +68,15 @@
% supported
% for all types of commands, see section~\ref{sec:look-ahead} for
% the restrictions that apply and what happens if one tries to use
-% this with commands for which this is not supported.} These are:
+% this with commands for which this is not supported.}
+%
+% However, this is only true \enquote{in theory}. In practice there
+% are a number of restrictions that makes it impossible to use such
+% generic command hooks in a number of cases, so please read all
+% of section~\ref{sec:restrictions} to understand what may prevent
+% you from using them successfully.
+%
+% The generic command hooks are:
% \begin{description}
% \item[\hook{cmd/\meta{name}/before}]
%
@@ -152,8 +160,56 @@
% and \TeX{} doesn't have a reliable way to see that, so some guesswork
% has to be employed.
%
-% \subsection{Patching}
+% We can do this in most cases when commands are defined using
+% \cs{NewDocumentCommand} or \cs{newcommand} (with a few exceptions).
+% For commands defined with \tn{def} the situation is less good.
+% Common cases where the command hooks will not work are:
+% \begin{itemize}
+% \item
%
+% Commands that use special catcode settings within their
+% definition. In that case it is usually not possible to augment the
+% definition (see~\ref{sec:patching}).
+%
+% \item
+%
+% If a command is defined while \cs{ExplSyntaxOn} is in force
+% \textbf{and} the command contains \verb=~= characters to represent
+% spaces, then it can't be patched to include the command hooks. In
+% fact in some very special circumstances you might even get a
+% low-level error rather than the information that the command can't
+% be patched (see, for example,
+% \url{https://github.com/latex3/latex2e/issues/1430}.
+%
+% \item
+%
+% Commands that have arguments as far as the user is concerned
+% (e.g., \cs{section} or \cs{caption}), but are defined in a way that these
+% arguments are not read by the user level command but only later
+% during the processing. In that case the \texttt{after} hook
+% doesn't work at all. The \text{before} hook only works with
+% \cs{AddToHook} but not with \cs{AddToHookWithArguments} because the
+% arguments haven't been read at that point where the hook is
+% patched in. See
+% section~\ref{sec:look-ahead}.
+%
+%
+% \item
+% Adding a specific generic command hook is only attempted once per
+% command, thus after redefining a command such hooks will no longer
+% be there and will also not being re-added, see section~\ref{sec:timing}.
+%
+% \end{itemize}
+% All this means that you have to have a good understanding of how
+% commands are defined when you attempt to make use of such hooks and
+% something goes wrong.
+% What can help in that case is to turn on \cs{DebugHooksOn} in which
+% case you get much more (low-level) details on why something fails and
+% what was tried to enable the hooks.
+%
+%
+% \subsection{Patching}\label{sec:patching}
+%
% The code here tries to find out if a command was defined with
% \tn{newcommand} or \tn{DeclareRobustCommand} or
% \tn{NewDocumentCommand}, and if so it \emph{assumes} that the argument
@@ -172,7 +228,7 @@
% catcode settings are not the same as the ones at the time of command's
% definition, so not always adding a hook to a command will work.
%
-% \subsubsection{Timing}
+% \subsubsection{Timing}\label{sec:timing}
%
% When \cs{AddToHook} (or its \pkg{expl3} equivalent) is called with
% a generic |cmd| hook, say, \hook{cmd/foo/before}, for the first time
@@ -211,12 +267,14 @@
% hooks attached to them.
%
% One good example is the \tn{section} command. You can add something
-% to the \hook{cmd/section/before} hook, but if you try to add something
-% to the \hook{cmd/section/after} hook, \tn{section} will no longer
-% work. That happens because the \tn{section} macro takes no argument,
-% but instead calls a few internal \LaTeX{} macros to look for the
-% optional and mandatory arguments. By adding code to the
-% \hook{cmd/section/after} hook, you get in the way of that scanning.
+% to the \hook{cmd/section/before} hook (but only with \cs{AddToHook}
+% not \cs{AddToHookWithArguments}),
+% but if you try to add anything to the \hook{cmd/section/after}
+% hook, \tn{section} will no longer work at all. That happens because the
+% \tn{section} macro takes no argument, but instead calls a few
+% internal \LaTeX{} macros to look for the optional and mandatory
+% arguments. By adding code to the \hook{cmd/section/after} hook, you
+% get in the way of that scanning.
%
% In such a case, where it is known that a specific generic command
% hook does not work if code is added to it, the package author can
@@ -1530,6 +1588,7 @@
%<latexrelease> {cmd~hooks~with~args}
\cs_new_protected:Npn \@@_patch_retokenize:Nnnn #1 #2 #3 #4
{
+% \end{macrocode}
% Here, when patching by retokenization, we can only guess the number
% of arguments of the macro.
% \changes{v1.0h}{2023/05/21}
Modified: trunk/Master/texmf-dist/source/latex/base/ltcounts.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltcounts.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltcounts.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltcounts.dtx}
- [2021/11/08 v1.1n LaTeX Kernel (Counters)]
+ [2024/10/26 v1.1p 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,20 @@
% \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}
+% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)}
+%</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\xdef\csname theH#1\endcsname{%
+ \noexpand\the\noexpand\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 +337,54 @@
\@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}
+% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)}
+% 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\xdef\csname theH#1\endcsname{%
+ \expandafter\noexpand\csname theH#2\endcsname.%
+ \noexpand\the\noexpand\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 +474,7 @@
}%
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\NewDocumentCommand \counterwithin {sO{\arabic}mm}{%
\@ifbothcounters{#3}{#4}{%
Modified: trunk/Master/texmf-dist/source/latex/base/ltdefns.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltdefns.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltdefns.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/lterror.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lterror.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lterror.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/ltfinal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltfinal.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltfinal.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2024/02/08 v2.3c LaTeX Kernel (Final Settings)]
+ [2024/07/08 v2.3c LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -930,7 +930,7 @@
%
% \begin{macrocode}
%<*2ekernel>
-% \begin{macrocode}
+% \end{macrocode}
%
% We temporarily define |\reserved at a| to apply |\reserved at c| to all the
% numbers in the range of its arguments.
Modified: trunk/Master/texmf-dist/source/latex/base/ltfssbas.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltfssbas.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltfssbas.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssbas.dtx}
- [2024/02/08 v3.2l LaTeX Kernel (NFSS Basic Macros)]
+ [2024/06/17 v3.2m LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -2111,6 +2111,8 @@
% {Suppress unnecessary error when used in preamble}
% \changes{v3.2a}{2017/01/10}
% {Add version of \cs{showhyphens} that works with Xe\TeX.}
+% \changes{v3.2m}{2024/06/17}
+% {set \cs{tracinglostchars} to 0 in \cs{showhyphens}}
% The |\showhyphens| command must be redefined since the version in
% \texttt{plain.tex} uses |\tenrm|. We have also made some further
% adjustments for its use in \LaTeX.
@@ -2142,10 +2144,10 @@
% horizontal list with explicit hyphens to generate the display. Note
% that the |lmr| OpenType font is forced, this works even if the
% characters are not in the font as hyphenation is attempted due to
-% the width of the space and hyphen character. It may generate
+% the width of the space and hyphen character. It would generate
% spurious Missing Character warnings in the log, these are however
-% suppressed from the terminal output by ensuring that
-% |\tracingonline| is locally zero.
+% suppressed from the terminal and log output by ensuring that
+% |\tracinglostchars| is locally zero.
% \begin{macrocode}
\DeclareRobustCommand\showhyphens[1]{%
\setbox0\vbox{%
@@ -2154,6 +2156,7 @@
\hbadness\@M
\hfuzz\maxdimen
\tracingonline\z@
+ \tracinglostchars\z@
\everypar={}%
\leftskip\z at skip
\rightskip\z at skip
Modified: trunk/Master/texmf-dist/source/latex/base/ltfssini.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltfssini.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltfssini.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/lthooks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lthooks.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lthooks.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{lthooks.dtx}
- [2024/04/22 v1.1h LaTeX Kernel (hooks)]
+ [2024/10/29 v1.1k LaTeX Kernel (hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -130,6 +130,9 @@
%
% The \meta{hook} can be specified using the dot-syntax to denote
% the current package name. See section~\ref{sec:default-label}.
+% The string \texttt{??} can't be used as a hook name because it
+% has a special significance as a placeholder in hook rules.
+%
% \end{function}
%
% \begin{function}{\NewReversedHook}
@@ -402,11 +405,17 @@
% Removes any code labeled by \meta{label} from the \meta{hook}.
% When the optional argument \meta{label} is not provided, the
% \meta{default label} is used (see section~\ref{sec:default-label}).
+% \end{function}
%
% If there is no code under the \meta{label} in the \meta{hook},
% or if the \meta{hook} does not exist, a warning is issued when
% you attempt to \cs{RemoveFromHook}, and the command is ignored.
-% \cs{RemoveFromHook} should be used only when you know exactly what
+% \cs{RemoveFromHook}\marginpar{\raggedleft\rightskip5pt\itshape
+% \textbf{Important:}\break The \cs{RemoveFromHook} command should be
+% only used if one has full control over the code chunk to be removed.
+% In particular it should not be used to remove code chunks from other
+% packages! For this the \texttt{voids} relation is provided.}
+% should be used only when you know exactly what
% labels are in a hook. Typically this will be when some code gets added to a hook
% by a package, then later this code is removed by that same package.
% If you want to prevent the execution of code from another
@@ -420,16 +429,15 @@
% The \meta{hook} and \meta{label} can be specified using the
% dot-syntax to denote the current package name.
% See section~\ref{sec:default-label}.
-% \end{function}
%
-% \medskip
-%
-% In contrast to the \texttt{voids} relationship between two labels
+% In contrast to the \texttt {voids} relationship between two labels
% in a \cs{DeclareHookRule} this is a destructive operation as the
% labeled code is removed from the hook data structure, whereas the
% relationship setting can be undone by providing a different
% relationship later.
%
+% \medskip
+%
% A useful application for this declaration inside the document body
% is when one wants to temporarily add code to hooks and later remove
% it again, e.g.,
@@ -535,7 +543,6 @@
%
%
%
-%
% \subsubsection{Hook names and default labels}
% \label{sec:default-label}
%
@@ -751,8 +758,6 @@
% given \meta{hook}. If \meta{hook} is \texttt{??} this defines a default
% relation for all hooks that use the two labels, i.e., that have
% chunks of code labeled with \meta{label1} and \meta{label2}.
-% Rules specific to a given hook take precedence over default
-% rules that use \texttt{??} as the \meta{hook}.
%
% Currently, the supported relations are the following:
% \begin{itemize}
@@ -793,10 +798,18 @@
%
% \end{itemize}
% There can only be a single relation between two labels for a
-% given hook,
-% i.e., a later \cs{DeclareHookRule} overwrites any previous
-% declaration.
+% given hook, i.e., a later \cs{DeclareHookRule} overwrites any
+% previous declaration. In all cases rules specific to a given
+% hook take precedence over default rules that use \texttt{??} as
+% the \meta{hook}.
%
+% If a default rule is applied, it is done before reversing the
+% label order in a reversed hook, e.g., \texttt{before} in a
+% default rule effectively becomes \texttt{after} in such a hook.
+% In contrast, a rule for a specific hook is always applied to the
+% state after any reversal (i.e., the state you see when using
+% \cs{ShowHook} on that hook).
+%
% The \meta{hook} and \meta{label} can be specified using the
% dot-syntax to denote the current package name.
% See section~\ref{sec:default-label}.
@@ -826,6 +839,16 @@
% (Technically it is just a shorthand for using \cs{DeclareHookRule}
% with \texttt{??} as the hook name.)
%
+% If such a rule is applied to a reversed
+% hook it behaves as if the rule is reversed (e.g.,
+% \texttt{after} becomes \texttt{before})
+% because those rules are applied first and then the order is reversed.
+% The rationale is that in hook pairs (in which the ordering in one
+% is reversed) default rules have to be reversed too in nearly all
+% scenarios. If this is not the case, a default rule can't be used
+% or has to be overwritten with an explicit \cs{DeclareHookRule}
+% for that specific hook.
+%
% Declaring default rules is only supported in the document
% preamble.\footnotemark{}
%
@@ -875,7 +898,7 @@
% some variant thereof. Generic hooks such as \hook{file} and \hook{env} hooks are
% automatically declared when code is added to them.
%
-% \begin{function}[EXP]{\IfHookEmptyTF}
+% \begin{function}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF}
% \begin{syntax}
% \cs{IfHookEmptyTF} \Arg{hook} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -1411,7 +1434,7 @@
% This is helpful if you have a pair of hooks where you expect to see
% code added that involves grouping, e.g., starting an environment
% in the first and closing that environment in the second hook.
-% To give a somewhat contrived example\footnote{there are simpler
+% To give a somewhat contrived example\footnote{There are simpler
% ways to achieve the same effect.}, suppose there is a package
% adding the following:
%\begin{verbatim}
@@ -1457,9 +1480,14 @@
% > package-too, package-1.
%\end{verbatim}
%
-% The reversal of the execution order happens before applying any
-% rules, so if you alter the order you will probably have to alter
-% it in both hooks, not just in one, but that depends on the use case.
+% If there is a matching default rule (done with
+% \cs{DeclareDefaultHookRule} or with \texttt{??} for the hook
+% name) then this default rule is applied before the reversal so that the order
+% in the reversed hook mirrors the one in the normal hook. However,
+% all rules specific to a hook happen always after the reversal of the
+% execution order, so if you alter the order you will probably have
+% to alter it in both hooks, not just in one, but that depends on
+% the use case.
%
%
%
@@ -1910,6 +1938,14 @@
% right sequence.
%
% \end{description}
+%
+% Given that these generic hook names involve \texttt{/} as part of
+% their name they would not work if one tries to define an
+% environment using a name that involves a
+% \texttt{/}.\footnote{Officially, \LaTeX{} names for environments
+% should only consist of a sequence of letters, numbers, and the
+% character \texttt{*}, i.e., this is not a new restriction.}
+%
% Generic environment hooks are never one-time hooks even with
% environments that are supposed to appear only once in a
% document.\footnote{Thus if one adds code to such hooks after the
@@ -3266,21 +3302,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,
@@ -3293,12 +3334,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:
}
{
@@ -3375,6 +3419,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
{
@@ -3388,14 +3434,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
@@ -3402,10 +3448,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}
@@ -6132,6 +6178,8 @@
}
% \end{macrocode}
%
+% \changes{v1.1k}{2024/10/29}
+% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)}
% \begin{macrocode}
\@@_if_usable:nF {#1}
{ \@@_log_line:x { The~hook~is~not~declared. } }
@@ -6141,7 +6189,9 @@
{ #2 { The~hook~is~empty } }
{
\@@_log_line:x { Code~chunks: }
- \prop_if_empty:cTF { g_@@_#1_code_prop }
+ \bool_lazy_or:nnTF
+ { ! \prop_if_exist_p:c { g_@@_#1_code_prop } }
+ { \prop_if_empty_p:c { g_@@_#1_code_prop } }
{ \@@_log_line_indent:x { --- } }
{
\prop_map_inline:cn { g_@@_#1_code_prop }
@@ -6403,19 +6453,24 @@
% |#2|${}={}$\meta{label_1}\verb=|=\meta{label_2},
% and |#3|${}={}$\meta{hook} (the latter may be the argument |#1| to
% \cs{@@_list_rules:nn}, or \texttt{??} if it is a default rule).
+% \changes{v1.1k}{2024/10/29}
+% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)}
% \begin{macrocode}
\cs_new_protected:Npn \@@_list_rules:nn #1 #2
{
- \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2}
- \prop_map_inline:cn { g_@@_#1_code_prop }
+ \prop_if_exist:cT { g_@@_#1_code_prop }
{
+ \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2}
\prop_map_inline:cn { g_@@_#1_code_prop }
{
- \@@_if_label_case:nnnnn {##1} {####1}
- { \prop_map_break: }
- { \@@_list_one_rule:nnn {##1} {####1} }
- { \@@_list_one_rule:nnn {####1} {##1} }
- {#1}
+ \prop_map_inline:cn { g_@@_#1_code_prop }
+ {
+ \@@_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \@@_list_one_rule:nnn {##1} {####1} }
+ { \@@_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
}
}
}
@@ -7342,7 +7397,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:. \\
@@ -7601,6 +7664,7 @@
% \begin{macrocode}
\NewDocumentCommand \SetDefaultHookLabel { m }
{ \@@_set_default_hook_label:n {#1} }
+% \end{macrocode}
%
% The label is only automatically updated with \cs{@onefilewithoptions}
% (\cs{usepackage} and \cs{documentclass}), but some packages, like
@@ -7713,7 +7777,8 @@
% \end{macro}
%
%
-% \begin{macro}[EXP]{\IfHookEmptyTF}
+% \begin{macro}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF}
+% \changes{v1.1j}{2024/10/21}{Define \cs{IfHookEmptyT}, \cs{IfHookEmptyF}}
% Here we avoid the overhead of \pkg{xparse}, since \cs{IfHookEmptyTF}
% is used in \cs{end} (that is, every \LaTeX{} environment). As a
% further optimization, use \cs{let} rather than \cs{def} to avoid one
@@ -7720,6 +7785,8 @@
% expansion step.
% \begin{macrocode}
\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF
+\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT
+\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/base/ltkeys.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltkeys.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltkeys.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltkeys.dtx}
- [2024/01/13 v1.0m LaTeX Kernel (Keyval options)]
+ [2024/06/20 v1.0o LaTeX Kernel (Keyval options)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{ltkeys.dtx}
@@ -73,6 +73,9 @@
% \item \texttt{.code} --- execute arbitrary code
% \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch
% \item \texttt{.ifnot} --- sets an inverted \TeX{} \cs{if...} switch
+% \item \texttt{.pass-to-packages} --- for class options, this specifies
+% whether the option should be treated \enquote{global} (read by packages
+% from the global list); for package options this property has no effect
% \item \texttt{.store} --- stores a value in a macro
% \item \texttt{.usage} -- defines whether the option can be given only
% when loading (\texttt{load}), in the preamble (\texttt{preamble}) or
@@ -182,12 +185,74 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{.pass-to-packages}
+% \changes{v1.0n}{2024/06/19}{New key property}
+% \begin{macro}{\@@_scope:n}
+% \changes{v1.0n}{2024/06/19}{New function}
+% \begin{macro}{\@@_scope:N}
+% \changes{v1.0n}{2024/06/19}{New function}
+% \changes{v1.0o}{2024/06/20}{Ensure only key name is stored}
+% Used to force options to be global: as this property (uniquely) has
+% an \emph{optional} value, there is a bit of work to do.
+% \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_str .pass-to-packages }
+ {
+ \bool_if:NTF \l_@@_no_value_bool
+ { \@@_scope:n { true } }
+ { \@@_scope:n }
+ }
+\cs_new_protected:Npn \@@_scope:n #1
+ {
+ \str_case:nnF {#1}
+ {
+ { true }
+ { \@@_scope:N \clist_put_right:NV }
+ { false }
+ { \@@_scope:N \clist_remove_all:NV }
+ }
+ {
+ \msg_error:nnnn { keys }
+ { choice-unknown }
+ { .pass-to-packages }
+ {#1}
+ }
+ }
+\cs_new_protected:Npn \@@_scope:N #1
+ {
+ \exp_after:wN \@@_find_key_module:wNN
+ \l_keys_path_str \s_@@_stop
+ \l_keys_key_tl \l_keys_key_str
+ #1 \l_@@_forced_global_clist \l_keys_key_str
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Main mechanism}
%
% \begin{macrocode}
+\cs_generate_variant:Nn \clist_if_in:NnT { Ne }
+\cs_generate_variant:Nn \clist_if_in:NnTF { Ne }
\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
% \end{macrocode}
%
+% \begin{macro}{\l_@@_class_only_clist}
+% \changes{v1.0n}{2024/06/19}{New variable}
+% Used to track class-only options.
+% \begin{macrocode}
+\clist_new:N \l_@@_class_only_clist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_forced_global_clist}
+% \changes{v1.0n}{2024/06/19}{New variable}
+% Used to force options to be global.
+% \begin{macrocode}
+\clist_new:N \l_@@_forced_global_clist
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\l_@@_options_clist}
% A single list is used for all options, into which they are collected
% before processing.
@@ -295,34 +360,35 @@
% \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
% \changes{v1.0h}{2022/06/20}{Use raw options data}
% \changes{v1.0m}{2024/01/13}{Trim spaces off key names}
+% \changes{v1.0n}{2024/06/19}{Refactor function}
% \begin{macro}{\@@_options_class:nnn}
% \changes{v1.0h}{2022/06/20}{New function}
% \changes{v1.0i}{2022/07/05}{Correct naming of raw class options storage}
% \changes{v1.0l}{2022/10/22}{Correct handling of unused option list}
+% \changes{v1.0n}{2024/06/19}{Refactor function}
+% \changes{v1.0n}{2024/06/19}{Track options used by classes}
+% \begin{macro}{\@@_options_class:nn}
+% \changes{v1.0n}{2024/06/19}{New function}
% For classes, each option (stripped of any content after |=|)
% is checked for existence as a key. If found, the option is added to
% the combined list for processing. On the other hand, unused options
-% are stored up in \cs{@unusedoptionlist}. Before any of that, though,
-% there is a simple check to see if there is an |unknown| key. If there
-% is, then \emph{everything} will match and the mapping can be skipped.
+% are stored up in \cs{@unusedoptionlist}. An earlier version of
+% this code checked for the \texttt{unknown} key just once and
+% if found short-cutted the loop: that though makes handling more
+% complex situations harder, so we take the performance hit instead.
+% Options used by classes are tracked but the catch-all \texttt{unknown}
+% is excluded (hence not using a lazy evaluation for the key testing).
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_class:n #1
{
\cs_if_free:cF { @raw at opt@ \@currname . \@currext }
{
- \keys_if_exist:nnTF {#1} { unknown }
+ \clist_map_inline:cn { @raw at opt@ \@currname . \@currext }
{
- \clist_put_right:Nv \l_@@_options_clist
- { @raw at opt@ \@currname . \@currext }
+ \exp_args:Ne \@@_options_class:nnn
+ { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } }
+ {##1} {#1}
}
- {
- \clist_map_inline:cn { @raw at opt@ \@currname . \@currext }
- {
- \exp_args:Ne \@@_options_class:nnn
- { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } }
- {##1} {#1}
- }
- }
}
}
\cs_new_protected:Npn \@@_options_class:nnn #1#2#3
@@ -329,17 +395,27 @@
{
\keys_if_exist:nnTF {#3} {#1}
{
- \clist_put_right:Nn \l_@@_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \@@_options_class:nn {#1} {#2}
+ \clist_put_right:Ne \l_@@_class_only_clist { \tl_to_str:n {#1} }
}
{
- \clist_if_in:NnF \@unusedoptionlist {#1}
- { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ \keys_if_exist:nnTF {#3} { unknown }
+ { \@@_options_class:nn {#1} {#2} }
+ {
+ \clist_if_in:NnF \@unusedoptionlist {#1}
+ { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ }
}
}
+\cs_new_protected:Npn \@@_options_class:nn #1#2
+ {
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_package:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
@@ -348,6 +424,9 @@
% \changes{v1.0m}{2024/01/13}{Trim spaces off key names}
% \begin{macro}{\@@_options_package:nnn}
% \changes{v1.0h}{2022/06/19}{New function}
+% \changes{v1.0n}{2024/06/19}{Skip options given to packages}
+% \begin{macro}{\@@_options_package:nn}
+% \changes{v1.0n}{2024/06/19}{New functions}
% For global options when processing a package, the tasks are slightly
% different from those for a class. The check is the same, but here
% there is nothing to do if the option is not applicable. Each valid
@@ -362,17 +441,31 @@
{##1} {#1}
}
}
+% \end{macrocode}
+% The forced-global test here needs to use \cs{tl_to_str:n} as the data come
+% from a key name, which is always a string.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_options_package:nnn #1#2#3
{
\keys_if_exist:nnT {#3} {#1}
{
- \clist_put_right:Nn \l_@@_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_if_in:NeTF \l_@@_class_only_clist { \tl_to_str:n {#1} }
+ {
+ \clist_if_in:NeT \l_@@_forced_global_clist { \tl_to_str:n {#1} }
+ { \@@_options_package:nn {#1} {#2} }
+ }
+ { \@@_options_package:nn {#1} {#2} }
}
}
+\cs_new_protected:Npn \@@_options_package:nn #1#2
+ {
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_local:}
% \changes{v1.0h}{2022/06/20}{Use raw options data}
Modified: trunk/Master/texmf-dist/source/latex/base/ltlength.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltlength.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltlength.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/ltlists.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltlists.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltlists.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -31,7 +31,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlists.dtx}
- [2023/05/17 v1.0t LaTeX Kernel (List Environments)]
+ [2024/06/23 v1.0u LaTeX Kernel (List Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlists.dtx}
@@ -428,13 +428,13 @@
%
% DEFINE \dimen's and \count
% \end{oldcomments}
-% \begin{macro}{\topskip}
+% \begin{macro}{\topsep}
% \begin{macro}{\partopsep}
% \begin{macro}{\itemsep}
% \begin{macro}{\parsep}
% \begin{macro}{\@topsep}
% \begin{macro}{\@topsepadd}
-% \begin{macro}{\outerparskip}
+% \begin{macro}{\@outerparskip}
% \begin{macrocode}
%<*2ekernel>
\newskip\topsep
@@ -450,6 +450,7 @@
% \begin{macro}{\leftmargin}\begin{macro}{\rightmargin}
% \begin{macro}{\listparindent}\begin{macro}{\itemindent}
% \begin{macro}{\labelwidth}\begin{macro}{\labelsep}
+% \begin{macro}{\linewidth}
% \begin{macro}{\@totalleftmargin}
% \begin{macrocode}
\newdimen\leftmargin
@@ -462,7 +463,7 @@
\newdimen\@totalleftmargin \@totalleftmargin=\z@
% \end{macrocode}
% \end{macro}\end{macro}\end{macro}\end{macro}\end{macro}
-% \end{macro}\end{macro}
+% \end{macro}\end{macro}\end{macro}
%
% \begin{macro}{\leftmargini}
% \begin{macro}{\leftmarginii}
@@ -715,6 +716,66 @@
%
% This allows paragraph-making environments to work right when called
% by other environments. (Changed 27 Oct 86)
+%
+% In 2024 this logic was partially replaced with a new algorithm:
+% \begin{itemize}
+% \item
+% \cs{if at endpe} is now set globally to \texttt{true} or \texttt{false}.
+% \item
+% In addition \cs{@endpetrue} initiates an \cs{aftergroup} call
+% to \cs{propagate at doendpe} if it is used inside a group.
+% \item
+% \cs{propagate at doendpe} in turn checks the status of \cs{if at endpe}
+% and if that is \texttt{true} it calls \cs{@doendpe} otherwise it
+% does nothing.
+% \item
+% \cs{@doendpe} in turn calls \cs{@endpetrue} and also makes the
+% necessary changes to
+% \cs{par} and \cs{everypar} so that they handle as before any
+% empty line that follows the environment.
+% \item
+% Because of the \cs{@endpetrue} we get another \cs{aftergroup}, so the
+% mechanisnm slowly migrates out of several groups if those follow
+% immediately after the end of the environment. If, however, there is a new
+% paragraph started or an explicit \cs{par} before the next group ends then this will
+% result in a call to \cs{@endpefalse} and the migration stops
+% (note that \cs{propagate at doendpe} is still called once after the group but does nothing).
+% \item
+% Using this approach something like
+%\begin{verbatim}
+% {% some customization here
+% \begin{equation}
+% x=y
+% \end{equation}}
+% some text
+%\end{verbatim}
+% is still correctly identified as a paragraph continuation so that
+% there is no indentation before \texttt{some text}.
+% \item
+% We can get away with using global settings of \cs{if at endpe} even
+% in nested situations (without keeping track of the status in a
+% stack), because the switch change is made only at
+% the very end of such environments, basically directly before the
+% \cs{endgroup} in \cs{end}, and it is later set back to \texttt{false} by
+% the next \cs{everypar} or the next \cs{par}. Even if the
+% environment is called without using \cs{begin} \cs{end}, the
+% situation doesn't change (or rather cause a problem).
+% \item
+% However, there is one scenario where the new approach would
+% change the behavior. If a box is being built, e.g., with
+% \cs{setbox}, we have now the case that a \cs{@endpetrue}
+% inside would migrate out into a context in which it should not be
+% true (because the box might get used elsewhere, e.g., a float).
+% In the past, due to local switch changes, that didn't happen, i.e.,
+% \cs{if at endpe} would revert to \texttt{false} at the end of the box
+% definition.
+% \item
+% Thus, to avoid that one has to explicitly set it back to false at
+% the end of such constructions, just as we also need to prevent
+% colors from
+% migrating out. Thus the correct place to do this is
+% in \cs{color at endgroup} because that is always called at that point.
+% \end{itemize}
% \begin{macrocode}
\def\@endparenv{%
\addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue}
@@ -732,9 +793,12 @@
% |\clubpenalty| back to its default.
% \changes{v1.0t}{2015/05/10}{Explicitly reset \cs{clubpenalty} before
% clearing \cs{everypar}; see also pr/0462 and pr/4065}
+% \changes{v1.0u}{2024/06/23}{Set \cs{if at endpe} to \texttt{false}
+% before calling \cs{par} (needed for tagging)}
% \begin{macrocode}
\clubpenalty\@clubpenalty
- \everypar{}\par\@endpefalse}\everypar
+ \@endpefalse
+ \everypar{}\par}%
% \end{macrocode}
%
% Use |\setbox0=\lastbox| instead of |\hskip -\parindent|
@@ -743,8 +807,9 @@
% \changes{v1.0k}{1995/11/07}{Enclosed \cs{setbox0} assignment by a
% group so that it leaves the contents of box $0$ intact.}
% \begin{macrocode}
- {{\setbox\z@\lastbox}%
- \everypar{}\@endpefalse}}
+ \everypar
+ {{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
@@ -761,14 +826,62 @@
%
% \begin{macro}{\if at endpe}
% \begin{macro}{\@endpefalse}
-% \begin{macro}{\@endpeltrue}
+% \begin{macro}{\@endpetrue}
+% \begin{macro}{\propagate at doendpe}
+% As outlined above these are no longer simple switches, but we
+% keep the name because it is used all over the place.
% \begin{macrocode}
\newif\if at endpe
-\@endpefalse
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}
+%
+% \changes{v1.0u}{2024/06/23}{Set \cs{if at endpe} globally and also set
+% up migration to the outside}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\@endpetrue}{New @endpe handling}%
+% \end{macrocode}
%
+% \begin{macrocode}
+\def\@endpefalse{\global\let\if at endpe\iffalse}
+% \end{macrocode}
%
+% \begin{macrocode}
+\def\@endpetrue {%
+ \global\let\if at endpe\iftrue
+% \end{macrocode}
+% If we are inside a group then propagate to the outside:
+% \begin{macrocode}
+ \ifnum\currentgrouplevel>\z@
+ \aftergroup\propagate at doendpe
+ \fi
+}
+% \end{macrocode}
+% If \cs{if at endpe} is still true after the group ends, we 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 and \cs{if at endpe} is \texttt{false}
+% then nothing further happens.
+% \begin{macrocode}
+\def\propagate at doendpe{\if at endpe \@doendpe \fi}
+% \end{macrocode}
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@endpetrue}{New @endpe handling}%
+%<latexrelease>
+%<latexrelease>
+%<latexrelease>\def\@endpefalse{\let\if at endpe\iffalse}
+%<latexrelease>\def\@endpetrue{\let\if at endpe\iftrue}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
+%
+%
% \begin{macro}{\@mklab}
% \begin{macrocode}
\def\@mklab#1{\hfil #1}
Modified: trunk/Master/texmf-dist/source/latex/base/ltluatex.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltluatex.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltluatex.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -30,7 +30,7 @@
%<*plain>
% \fi
% \ProvidesFile{ltluatex.dtx}
-[2024/02/11 v1.2c
+[2024/08/16 v1.2e
% LaTeX Kernel (LuaTeX support)^^A
%\iffalse
%<plain> LuaTeX support for plain TeX (core)%
@@ -330,6 +330,8 @@
% field |date| in the usual \LaTeX{} format |yyyy/mm/dd|. Optional fields
% |version| (a string) and |description| may be used if present. This
% information will be recorded in the log. Other fields are ignored.
+% If the |version| begins with a digit, a \texttt{v} will be added at the
+% start in the log.
%
% \noindent
% \DescribeMacro{module_info}
@@ -420,7 +422,7 @@
% same callback and descriptions.
%
% The callback functions do not have to be registered yet when the functions is called.
-% Ony the constraints for which both callback descriptions refer to callbacks
+% Only the constraints for which both callback descriptions refer to callbacks
% registered at the time the callback is called will have an effect.
%
% \endgroup
@@ -1004,6 +1006,8 @@
% \begin{macro}{provides_module}
% \changes{v1.0a}{2015/09/24}{Function added}
% \changes{v1.0f}{2015/10/03}{use luatexbase\_log}
+% \changes{v1.2d}{2024/06/04}{Add \texttt{v} to version string if required (gh/1364)}
+% \changes{v1.2e}{2024/08/16}{Support missing version string (gh/1443)}
% Local function to write to the log.
% \begin{macrocode}
local function luatexbase_log(text)
@@ -1024,7 +1028,7 @@
luatexbase_log(
"Lua module: " .. info.name
.. spaced(info.date)
- .. spaced(info.version)
+ .. spaced(info.version and string_gsub(info.version or "","^(%d)","v%1"))
.. spaced(info.description)
)
modules[info.name] = info
@@ -1336,7 +1340,7 @@
% Additionally |callbackrules| describes the ordering constraints: It contains two
% element tables with the descriptions of the constrained callback implementations.
% It can additionally contain a |type| entry indicating the kind of rule. A missing
-% value indicates a normal ordering contraint.
+% value indicates a normal ordering constraint.
%
% \changes{v1.2a}{2022/10/03}{Add rules for callback ordering}
% \begin{macrocode}
@@ -1398,7 +1402,7 @@
end
list[i] = current.value
else
- -- Cycle occured. TODO: Show cycle for debugging
+ -- Cycle occurred. TODO: Show cycle for debugging
-- list[i] = ...
local remaining = {}
for name, entry in next, meta do
@@ -1432,7 +1436,7 @@
for i=2, length//2 do
cycle[i], cycle[length + 1 - i] = cycle[length + 1 - i], cycle[i]
end
- error('Cycle occured at ' .. table.concat(cycle, ' -> ', 1, length))
+ error('Cycle occurred at ' .. table.concat(cycle, ' -> ', 1, length))
end
end
end
Modified: trunk/Master/texmf-dist/source/latex/base/ltmarks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltmarks.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltmarks.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmarks.dtx}
- [2024/05/31 v1.0g LaTeX Kernel (Marks)]
+ [2024/10/22 v1.0h LaTeX Kernel (Marks)]
% \iffalse
%
\documentclass{l3doc}
@@ -211,7 +211,7 @@
% The commands are only meaningful inside the output routine, in
% other places their result is (while not random) unpredictable due
% to the way \LaTeX{} cuts text material into pages.
-%% \end{function}
+% \end{function}
%
%
%
@@ -257,7 +257,7 @@
% running headers and footers and shipout out both in one
% go.\footnote{As of now that scenario is not yet officially supported.}
%
-% \begin{function}[EXP]{\IfMarksEqualTF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
+% \begin{function}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
% \begin{syntax}
% \cs{IfMarksEqualTF} \oarg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
% \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
@@ -676,7 +676,8 @@
% and adds suitable \cs{mark_insert:nn} in the two token
% lists. These token lists can then be executed at the right place
% to reinsert the marks, e.g., directly after the box. This is, for
-% example, used by \pkg{multicol} when a short balanced
+% example, going to be used\footnote{Probably not before 2025, though.}
+% by \pkg{multicol} when a short balanced
% \env{multicols} is returned to the galley for typesetting.
%
% If the \meta{source} consists of a single vertical box (plus
@@ -806,7 +807,7 @@
\tl_new:c { g_@@_last-column_first_ #1 _tl }
\tl_new:c { g_@@_last-column_last_ #1 _tl }
% \end{macrocode}
-% All marks will have an identication at the beginning of the form
+% All marks will have an identification at the beginning of the form
% \cs{@@_id:n}\texttt\{\meta{number}\texttt\} and therefore the
% initial empty values should have that too, so that data extraction
% is going to be uniform.
@@ -1027,7 +1028,7 @@
%
% We disguise \cs{c_max_dim} in an odd looking csname, which then
% shows up as part of the display of an error message if that error
-% happens. This csname forms part of the error diplay so what
+% happens. This csname forms part of the error display so what
% you get is something like
%\begin{verbatim}
% ! Infinite glue shrinkage found in box being split.
@@ -1799,8 +1800,9 @@
%
%
%
-% \begin{macro}[EXP]{\IfMarksEqualTF}
-% We only provide a CamelCase command for the case with one region
+% \begin{macro}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF}
+% \changes{v1.0h}{2024/10/21}{Define \cs{IfMarksEqualT}, \cs{IfMarksEqualF}}
+% We only provide CamelCase commands for the case with one region
% (optional) and one class. One could think of also providing a
% version for the general case with several optional arguments, but
% use cases for this are most likely rare, so not done yet.
@@ -1808,6 +1810,12 @@
\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
\mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
}
+\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} {
+ \mark_if_eq:nnnnT {#1}{#2}{#3}{#4}
+}
+\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} {
+ \mark_if_eq:nnnnF {#1}{#2}{#3}{#4}
+}
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/base/ltmeta.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltmeta.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltmeta.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/ltmiscen.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltmiscen.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltmiscen.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2024/02/08 v1.2c LaTeX Kernel (Misc. Environments)]
+ [2024/10/12 v1.2f LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -276,6 +276,21 @@
% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
% \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)}
% \begin{macrocode}
+% \end{macrocode}
+% If we roll back we have to drop stuff before adding chunks,
+% otherwise the code will just be appended, and thus doubled.
+% This would result in a harmless warning during the format
+% generation, because in that case the code chunk label doesn't
+% exist, and therefore can't be dropped.
+% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
+% avoid duplication in rollback (gh/1407)}
+% \begin{macrocode}
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
+% \end{macrocode}
+%
+% \begin{macrocode}
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
\AddToHook{enddocument/info}[kernel/release]{%
@@ -389,6 +404,18 @@
%<latexrelease>\NewHook{enddocument/afteraux}
%<latexrelease>\NewHook{enddocument/info}
%<latexrelease>\NewHook{enddocument/end}
+% \end{macrocode}
+% If we roll back we have to drop stuff before adding chunks,
+% otherwise the code will just be appended, and thus doubled.
+% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
+% avoid duplication in rollback (gh/1407)}
+% \begin{macrocode}
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
%<latexrelease>\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
%<latexrelease>\AddToHook{enddocument/info}[kernel/release]{%
@@ -719,12 +746,15 @@
% position of non-matching \cs{begin}.}
% \changes{v1.1e}{1996/07/26}{remove \cs{global} before \cs{@ignore...}}
% \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}}%
@@ -758,55 +788,7 @@
}
% \end{macrocode}
%
-% The top level definition for \cs{end}. for an explanation see
-% below (this is the same as the 2019 version where it was
-% introduced, but for rollback we have to repeat it).
% \begin{macrocode}
-\edef\end
- {\unexpanded{%
- \romannumeral
- \ifx\protect\@typeset at protect
- \expandafter %1
- \expandafter %2
- \expandafter %1
- \expandafter %3 expands the \csname inside \end<space>
- \expandafter %1
- \expandafter %2 expands \end<space>
- \expandafter %1 expands the \else
- \z@
- \else
- \expandafter\z@\expandafter\protect
- \fi
- }%
- \expandafter\noexpand\csname end \endcsname
- }
-% \end{macrocode}
-% Version that adds hooks (so different from the 2019 version). It
-% fixes tlb3722 but the change should perhaps be made in
-% \texttt{tabularx} instead.
-% \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
- \UseHook{env/#1/after}%
- \if at ignore\@ignorefalse\ignorespaces\fi
-}
-% \end{macrocode}
-% Version without the fix for tlb3722 for the record:
-% \begin{macrocode}
-%\@namedef{end }#1{%
-% \UseHook{env/#1/end}%
-% \csname end#1\endcsname\@checkend{#1}%
-% \expandafter\endgroup\if at endpe\@doendpe\fi
-% \UseHook{env/#1/after}%
-% \if at ignore\@ignorefalse\ignorespaces\fi}%
-% \end{macrocode}
-%
-% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
@@ -822,6 +804,7 @@
%<latexrelease> \csname #1\endcsname}}%
%<latexrelease> \@ignorefalse
%<latexrelease> \begingroup\@endpefalse\reserved at a}
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% A version that doesn't start out with \cs{relax} when in
% typesetting mode would be the following, but since \cs{begin}
@@ -847,7 +830,45 @@
% \begingroup\@endpefalse\reserved at a}
% \end{macrocode}
%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\begin}{Making \begin/\end robust}%
+%<latexrelease>\def\begin#1{%
+%<latexrelease> \@ifundefined{#1}%
+%<latexrelease> {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
+%<latexrelease> {\def\reserved at a{\def\@currenvir{#1}%
+%<latexrelease> \edef\@currenvline{\on at line}%
+%<latexrelease> \csname #1\endcsname}}%
+%<latexrelease> \@ignorefalse
+%<latexrelease> \begingroup\@endpefalse\reserved at a}
+%<latexrelease>
+% \end{macrocode}
+% Also undo the internal commands as some packages unfortunately test
+% for their existence instead of using \cs{IfFormatAtLeastTF}.
+% \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin}
+% and \cs{end} in rollback (gh/494)}
+% \begin{macrocode}
+%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+
+
+
+
% \begin{macro}{\end}
+% The top level definition for \cs{end}.
+% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions
+% for individual rollback}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\end}{Making \begin/\end robust}%
+% \end{macrocode}
% While \cs{begin} was made robust simply by using
% \cs{DeclareRobustCommand} we need to be a bit more subtle with
% \cs{end} as there are packages out there that try to look into
@@ -895,58 +916,123 @@
% \changes{v1.1p}{2019/08/27}{Make command robust}
%
% \begin{macrocode}
-%<latexrelease>\edef\end
-%<latexrelease> {\unexpanded{%
-%<latexrelease> \romannumeral
-%<latexrelease> \ifx\protect\@typeset at protect
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %2
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %3 expands the \csname inside \end<space>
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %2 expands \end<space>
-%<latexrelease> \expandafter %1 expands the \else
-%<latexrelease> \z@
-%<latexrelease> \else
-%<latexrelease> \expandafter\z@\expandafter\protect
-%<latexrelease> \fi
-%<latexrelease> }%
-%<latexrelease> \expandafter\noexpand\csname end \endcsname
-%<latexrelease> }
+\edef\end
+ {\unexpanded{%
+ \romannumeral
+ \ifx\protect\@typeset at protect
+ \expandafter %1
+ \expandafter %2
+ \expandafter %1
+ \expandafter %3 expands the \csname inside \end<space>
+ \expandafter %1
+ \expandafter %2 expands \end<space>
+ \expandafter %1 expands the \else
+ \z@
+ \else
+ \expandafter\z@\expandafter\protect
+ \fi
+ }%
+ \expandafter\noexpand\csname end \endcsname
+ }
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% And here is the original definition of \cs{end} the way it was in
% \LaTeX{} for several decades now hidden in \verb*=\end =.
% \begin{macrocode}
-%<latexrelease>\@namedef{end }#1{%
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\end}{Making \begin/\end robust}%
+%<latexrelease>\def\end#1{%
%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
%<latexrelease> \expandafter\endgroup\if at endpe\@doendpe\fi
%<latexrelease> \if at ignore\@ignorefalse\ignorespaces\fi}
+%<latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
-% An here the rollback in case that is ever needed.
+% \end{macro}
+
+
+
+% \begin{macro}{\end\verbvisiblespace}
+% The internal version with a space at the end.
% \begin{macrocode}
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\begin}{Making \begin/\end robust}%
-%<latexrelease>\def\begin#1{%
-%<latexrelease> \@ifundefined{#1}%
-%<latexrelease> {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
-%<latexrelease> {\def\reserved at a{\def\@currenvir{#1}%
-%<latexrelease> \edef\@currenvline{\on at line}%
-%<latexrelease> \csname #1\endcsname}}%
-%<latexrelease> \@ignorefalse
-%<latexrelease> \begingroup\@endpefalse\reserved at a}
-%<latexrelease>\def\end#1{%
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\end!space}{New @endpe handling}%
+\@namedef{end }#1{%
+ \romannumeral
+ \IfHookEmptyTF{env/#1/end}%
+ {\expandafter\z@}%
+ {\z@\UseHook{env/#1/end}}%
+ \csname end#1\endcsname\@checkend{#1}%
+% \end{macrocode}
+% We can now close the environment group and due to the new
+% \cs{if at endpe} handling we no longer need to \cs{expandafter}
+% out of the group.
+% \changes{v1.2d}{2024/06/23}{Adjust for new \texttt{@endpe} handling}
+% \begin{macrocode}
+% \expandafter\endgroup\if at endpe\@doendpe\fi
+ \endgroup
+ \UseHook{env/#1/after}%
+ \if at ignore\@ignorefalse\ignorespaces\fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% Version that adds hooks (so different from the 2019 version). It
+% fixes tlb3722 but the change should perhaps be made in
+% \texttt{tabularx} instead.
+% \begin{macrocode}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\end!space}{Use hook system}%
+%<latexrelease>
+%<latexrelease>\@namedef{end }#1{%
+%<latexrelease> \romannumeral
+%<latexrelease> \IfHookEmptyTF{env/#1/end}%
+%<latexrelease> {\expandafter\z@}%
+%<latexrelease> {\z@\UseHook{env/#1/end}}%
+%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
+%<latexrelease> \expandafter\endgroup\if at endpe\@doendpe\fi
+%<latexrelease> \UseHook{env/#1/after}%
+%<latexrelease> \if at ignore\@ignorefalse\ignorespaces\fi
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% Version without the fix for tlb3722 for the record:
+%\begin{verbatim}
+%\@namedef{end }#1{%
+% \UseHook{env/#1/end}%
+% \csname end#1\endcsname\@checkend{#1}%
+% \expandafter\endgroup\if at endpe\@doendpe\fi
+% \UseHook{env/#1/after}%
+% \if at ignore\@ignorefalse\ignorespaces\fi}%
+% \end{verbatim}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\end!space}{Making \begin/\end robust}%
+%<latexrelease>
+%<latexrelease>\@namedef{end }#1{%
%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
%<latexrelease> \expandafter\endgroup\if at endpe\@doendpe\fi
%<latexrelease> \if at ignore\@ignorefalse\ignorespaces\fi}
-%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
-% Also undo the internal commands as some packages unfortunately test
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\end!space}{Making \begin/\end robust}%
+% \end{macrocode}
+% Undo the internal command as some packages unfortunately test
% for their existence instead of using \cs{IfFormatAtLeastTF}.
% \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin}
% and \cs{end} in rollback (gh/494)}
% \begin{macrocode}
-%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined
%<latexrelease>\expandafter\let\csname end \endcsname\@undefined
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
@@ -953,7 +1039,6 @@
%<*2ekernel>
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
%
Modified: trunk/Master/texmf-dist/source/latex/base/ltpara.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltpara.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltpara.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpara.dtx}
- [2024/06/23 v1.0n LaTeX Kernel (paragraph hooks)]
+ [2024/06/29 v1.0n LaTeX Kernel (paragraph hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -480,7 +480,7 @@
% ended by \cs{RawParEnd}\footnote{Technical note for those who
% know their \textit{\TeX book\/}: the \cs{RawParEnd} command
% invokes the original \TeX{} engine definition of \cs{par} that
-% (soley) triggers the paragraph builder in \TeX{} when found
+% (solely) triggers the paragraph builder in \TeX{} when found
% inside unrestricted horizontal mode and does nothing in other
% processing modes.}
% and not by \cs{par} (or a blank line), because the latter will execute
@@ -634,7 +634,7 @@
% \glue(\parskip) 0.0 plus 1.0
% \glue(\baselineskip) 5.16669
%\end{verbatim}
-% but now there is anothe \cs{parskip} glue (that is always 0pt):
+% but now there is another \cs{parskip} glue (that is always 0pt):
%\begin{verbatim}
% \glue(\parskip) 0.0 plus 1.0
% \glue(\parskip) 0.0
@@ -1087,7 +1087,7 @@
% it should get removed before the hook code gets added so we have
% to arrange for this removal.
%
-% As in other simular cases, it maybe best to add here
+% As in other similar cases, it may be best to add here
% a \cs{nobreak} in case the hook itself adds glue and thus
% creates a non-explicit and unwanted potential breakpoont.
% On the other hand (as has been argued) the code in the hook
Modified: trunk/Master/texmf-dist/source/latex/base/ltpictur.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltpictur.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltpictur.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpictur.dtx}
- [2021/04/20 v1.2b LaTeX Kernel (Picture Mode)]
+ [2024/07/08 v1.2b LaTeX Kernel (Picture Mode)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpictur.dtx}
@@ -1413,7 +1413,6 @@
% \begin{macrocode}
\newif\if at ovvline \@ovvlinetrue
\newif\if at ovhline \@ovhlinetrue
-% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
Modified: trunk/Master/texmf-dist/source/latex/base/ltproperties.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltproperties.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltproperties.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -30,7 +30,7 @@
%<*driver>
% \fi
\ProvidesFile{ltproperties.dtx}
- [2024/04/17 v1.0e LaTeX Kernel (Properties)]
+ [2024/10/21 v1.0h LaTeX Kernel (Properties)]
% \iffalse
%
\documentclass[full]{l3doc}
@@ -94,7 +94,7 @@
% and labels which consist of lists of these properties. The reason for the
% split is that individual labels will want to record some but not all
% properties. For examples, a label concerned with position would track
-% the $x$ and $y$ co-ordinates of the current point, but not for example
+% the $x$ and $y$ coordinates of the current point, but not for example
% the page number.
%
% In the current implementation, properties share a single namespace. This
@@ -363,7 +363,7 @@
% has been set with the standard \cs{label} command.
% \end{function}
%
-% \begin{function}{\IfPropertyRecordedTF}
+% \begin{function}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF}
% \begin{syntax}
% \cs{IfPropertyRecordedTF} \Arg{label} \Arg{property} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -404,7 +404,7 @@
%
% \begin{variable}{pagenum}
% (shipout) The current page as arabic number. This is suitable for integer operations and
-% comparisions.
+% comparisons.
% \end{variable}
%
% \begin{variable}{label}
@@ -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}
%
@@ -804,9 +805,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfPropertyRecordedTF}
+% \begin{macro}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF}
+% \changes{v1.0h}{2024-10-21}{Define \cs{IfPropertyRecordedT}, \cs{IfPropertyRecordedF}}
% \begin{macrocode}
-\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} }
+\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/base/ltshipout.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltshipout.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltshipout.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,7 +34,7 @@
%<*driver>
% \fi
\ProvidesFile{ltshipout.dtx}
- [2024/02/11 v1.0n LaTeX Kernel (Shipout)]
+ [2024/10/22 v1.0n LaTeX Kernel (Shipout)]
% \iffalse
%
\documentclass{l3doc}
@@ -469,7 +469,7 @@
%
% \begin{variable}{\PreviousTotalPages}
% \begin{syntax}
-% \cs{thetotalpages}/\cs{PreviousTotalPages}
+% \cs{PreviousTotalPages}
% \end{syntax}
% Command that expands to the number of total pages from the
% previous run. If there was no previous run or if used in the
Modified: trunk/Master/texmf-dist/source/latex/base/ltsockets.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltsockets.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltsockets.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltsockets.dtx}
- [2024/02/11 v0.9a LaTeX Kernel (Sockets)]
+ [2024/10/27 v0.9b LaTeX Kernel (Sockets)]
% \iffalse
%
\documentclass{l3doc}
@@ -87,7 +87,7 @@
% executing code for each command or environment in the document
% source. Through various steps this code transforms the input and
% eventually generates typeset output appearing in a \enquote{galley}
-% from which individual pages are cut off in an asyncronous way. This
+% from which individual pages are cut off in an asynchronous way. This
% page generating process is normally not directly associated with
% commands in the input\footnote{Excepts for directives such as
% \cs{newpage}.} but is triggered whenever the galley has received
@@ -208,7 +208,7 @@
% simply calls some instance that implements the logic and that instance
% is altered by selecting a different templates and/or adjusting their
% parameters. However, in many cases customization through parameters is
-% overkill in such a case (or otherwise awkward, because paramerization
+% overkill in such a case (or otherwise awkward, because parameterization
% is better done on a higher level instead of individually for small
% blocks of code) and using the template mechanism just to replace one
% block of code with a different one results in a fairly high
@@ -371,7 +371,7 @@
% number of inputs = 2
% available plugs = noop, plug-A, plug-B
% current plug = plug-B
-% definition = \protected\long macro:#1#2->\begin {quote}\sffamily
+% definition = \long macro:#1#2->\begin {quote}\sffamily
% foo-B: #2\textsuperscript {2}\end {quote}
% \end{verbatim}
% \LogSocket{foo}
@@ -400,7 +400,7 @@
%
% However, there is no requirement that sockets and
% hook names have to be different. In fact, if a certain action that
-% could overwise be specified as hook code has to be executed always
+% could otherwise be specified as hook code has to be executed always
% last (or first) one could ensure this by placing a socket (single
% action) after a hook (or vice versa) and using the same name to
% indicate the relationship, e.g.,
@@ -617,6 +617,22 @@
% \end{function}
%
%
+% \begin{function}[EXP]{\socket_use_expandable:nw,\socket_use_expandable:n}
+% \begin{syntax}
+% \cs{socket_use_expandable:n} \Arg{socket-name}
+% \end{syntax}
+% Fully expandable variant of \cs{socket_use:n}. This can be used in macro code
+% to retrieve code from sockets which need to appear in an expandable context.
+%
+% This usually requires the plug to only contain expandable code and should therefore
+% only be used for sockets which are clearly documented to be used in an expandable context.
+% This command does not print any debugging info when \cs{DebugSocketsOn} is active
+% and should therefore be avoided whenever possible.
+%
+% For performance reasons there is no explicit check that the socket was declared!
+% \end{function}
+%
+%
% \begin{function}{\ShowSocket,\LogSocket,\socket_show:n,\socket_log:n}
% \begin{syntax}
% \cs{ShowSocket} \Arg{socket-name}
@@ -820,6 +836,7 @@
%
%
% \begin{macro}{\socket_new_plug:nnn,\socket_set_plug:nnn}
+% \changes{v0.9b}{2024/10/27}{Make plug definition non-protected}
%
% Declaring a code for a socket is just making a definition, taking
% the number of arguments from the saved int.
@@ -834,7 +851,7 @@
{
\cs_generate_from_arg_count:cNnn
{ @@_#1_plug_#2:w }
- \cs_new_protected:Npn
+ \cs_new:Npn
{ \int_use:c { c_@@_#1_args_int } }
{#3}
% \end{macrocode}
@@ -862,7 +879,7 @@
{
\cs_generate_from_arg_count:cNnn
{ @@_#1_plug_#2:w }
- \cs_set_protected:Npn
+ \cs_set:Npn
{ \int_use:c { c_@@_#1_args_int } }
{#3}
\@@_debug_term:n
@@ -942,11 +959,22 @@
% \fmi{Implement?}
% \end{macro}
%
+% \begin{macro}{\socket_use_expandable:nw,\socket_use_expandable:n}
+% \changes{v0.9b}{2024/10/27}{Added \cs{socket_use_expandable:n}}
+% The same as the non-expandable code, except for the missing debug output.
+% \begin{macrocode}
+\cs_new:Npn \socket_use_expandable:nw #1 {
+ \use:c { @@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w }
+}
+\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs
+% \end{macrocode}
+% \end{macro}
%
%
%
%
%
+%
%
% \subsection{Error messages}
%
Modified: trunk/Master/texmf-dist/source/latex/base/ltspace.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltspace.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltspace.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/base/lttab.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lttab.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lttab.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -31,7 +31,7 @@
%%% From File: lttab.dtx
%<*driver>
% \fi
-\ProvidesFile{lttab.dtx}[2021/04/20 v1.1s LaTeX Kernel (Columns)]
+\ProvidesFile{lttab.dtx}[2024/06/23 v1.1s LaTeX Kernel (Columns)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{lttab.dtx}
@@ -1499,7 +1499,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@testpatch}
+% \begin{macro}{\@testpach}
% \begin{macrocode}
\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
\ifnum \@lastchclass=3 5 \else
Modified: trunk/Master/texmf-dist/source/latex/base/lttagging.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lttagging.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lttagging.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{lttagging.dtx}
- [2024/06/10 v1.0b LaTeX Kernel (tagging support)]
+ [2024/10/21 v1.0k LaTeX Kernel (tagging support)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttagging.dtx}
@@ -56,19 +56,12 @@
% \providecommand\socket[1]{\texttt{#1\DescribeSocket[noprint]{#1}}}
% \providecommand\plug[1]{\texttt{#1\DescribePlug[noprint]{#1}}}
%
-% \let\ProvideDocElement\NewDocElement
-%
% \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}
%
%
-% \section{}
%
-%
-%
-% \MaybeStop{}
-%
% \begin{macrocode}
%<*2ekernel|latexrelease>
% \end{macrocode}
@@ -82,97 +75,110 @@
%
% \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
-% To support tagging in packages we use sockets with names starting
-% with \texttt{tagsupport/}. Usually, these sockets have exactly two
-% plugs defined:
-% \plug{noop} (when no tagging is requested or tagging is not wanted
-% for some reason) and a second plug that enables the tagging. There
-% may be more, e.g., tagging with special debugging, etc., but right
-% now it is usually just on or off.
-%
-% Given that we sometimes have to suspend tagging, it would be fairly
-% inefficient to put different plugs into these sockets whenever that
-% happens. We therefore offer \cs{UseTaggingSocket} which is like
-% \cs{UseSocket} except that the socket name is specified without
-% \texttt{tagsupport/}, i.e.,
+% \DescribeMacro\tag_socket_use:nnn
+% Given that we sometimes have to suspend tagging, it would be fairly
+% inefficient to put different plugs into these sockets whenever that
+% happens. We therefore offer \cs{UseTaggingSocket} which is like
+% \cs{UseSocket} except that is expects a socket starting with
+% \texttt{tagsupport/} but the socket name is specified without
+% this prefix, i.e.,
% \begin{quote}
% \verb=\UseTaggingSocket{foo}= $\to$
% \verb=\UseSocket{tagsupport/foo}=
-% \end{quote}
-% Beside being slightly shorter, the big advantage is that this way
-% we can change \cs{UseTaggingSocket} to do nothing when tagging is
-% suspended with \cs{SuspendTagging} instead of changing the plugs of
-% the tagging support sockets back and forth.
+% \end{quote}.
%
-% It is possible to use the tagging support sockets with
-% \cs{UseSocket} directly, but in this case the socket remains active
-% if \cs{SuspendTagging} is in force. There my be reasons for doing
-% that but in general we expect to always use \cs{UseTaggingSocket}.
+% Beside being slightly shorter, the big advantage is that this way
+% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean
+% instead of changing the plugs of the tagging support sockets back and forth.
%
-% The L3 programming layer versions \cs{tag_socket_use:n} and
-% \cs{tag_socket_use:nn} are slightly more efficient than
+% Usually, these sockets have (beside the default plug defined for every socket)
+% one additional plug defined and directly assigned. This plug is used when
+% tagging is active.
+% There may be more plugs, e.g., tagging with special debugging or special behaviour
+% depending on the class or PDF version etc., but right now it is usually just on or off.
+%
+% When tagging is suspended they all have the same predefined behaviour:
+% The sockets with zero arguments do nothing. The sockets with one argument
+% gobble their argument. The sockets with two arguments
+% will drop their first argument and pass the second unchanged.
+%
+% It is possible to use the tagging support sockets with
+% \cs{UseSocket} directly, but in this case the socket remains active
+% if \cs{SuspendTagging} is in force. There may be reasons for doing
+% that but in general we expect to always use \cs{UseTaggingSocket}.
+%
+% \DescribeMacro\UseExpandableTaggingSocket
+% \DescribeMacro\tag_socket_use_expandable:n
+% For special cases like in some \cs{halign} contexts we need a fully expandable
+% version of the commend. For these cases, \cs{UseExpandableTaggingSocket} can be
+% used. To allow being expandable, it does not output any debugging information
+% if \cs{DebugSocketsOn} is in effect and therefore should be avoided whenever possible.
+%
+% The L3 programming layer versions \cs{tag_socket_use_expandable:n},
+% \cs{tag_socket_use:n}, \cs{tag_socket_use:nn}, and \cs{tag_socket_use:nnn}
+% are slightly more efficient than
% \cs{UseTaggingSocket} because they do not have to determine how
-% many arguments the socket takes when disabling it, so in code that
-% is using the L3 programming layer we recommend to use them instead
-% of the CamelCase command.
-%
+% many arguments the socket takes when disabling it.
%
%
-% \begin{macro}{\SuspendTagging,\ResumeTagging}
-%
-% In the kernel, these two commands get dummy definitions so that
+% \MaybeStop{}
+%
+%
+% \section{Implementation}
+%
+%
+%
+% \begin{macro}{\tag_suspend:n,\tag_resume:n,\SuspendTagging,\ResumeTagging}
+%
+% 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 defnition 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,
% \tag_socket_use:nn,
+% \tag_socket_use:nnn,
+% \tag_socket_use_expandable:n,
% \UseTaggingSocket,
+% \UseExpandableTaggingSocket,
% }
% Again this is not the final definition for the kernel; it is just
% a version to get going while some parts of the kernel support are
@@ -189,12 +195,14 @@
%
% Dummy definitions in the kernel.
% These definitions will get updated in \pkg{tagpdf}.
+% The default in the kernel is just to get rid of the first argument, the second is preserved if present:
+% \changes{v1.0k}{2024/10/21}{Changed behavior of two argument tagging sockets when disabled.}
+% \changes{v1.0k}{2024/10/21}{Added expandable variants}
% \begin{macrocode}
+\cs_new:Npn \tag_socket_use_expandable:n #1 { }
\cs_new_protected:Npn \tag_socket_use:n #1 { }
\cs_new_protected:Npn \tag_socket_use:nn #1#2 { }
-% \end{macrocode}
-% The default in the kernel is just to get rid of the argument:
-% \begin{macrocode}
+\cs_new_protected:Npn \tag_socket_use:nnn #1#2#3 { #3 }
\cs_new_protected:Npn \UseTaggingSocket #1 {
\int_case:nnF
{ \int_use:c { c__socket_tagsupport/#1_args_int } }
@@ -201,7 +209,7 @@
{
0 \prg_do_nothing:
1 \use_none:n
- 2 \use_none:nn
+ 2 \use_ii:nn
% \end{macrocode}
% We do not expect tagging sockets with more than one or two
% arguments, so for now we only provide those.
@@ -209,21 +217,141 @@
}
\ERRORusetaggingsocket % that should get a proper error message
}
-\ExplSyntaxOff
% \end{macrocode}
+% The same as an expandable command:
+% \begin{macrocode}
+\cs_new:Npn \UseExpandableTaggingSocket #1 {
+ \int_case:nnF
+ { \int_use:c { c__socket_tagsupport/#1_args_int } }
+ {
+ 0 \prg_do_nothing:
+ 1 \use_none:n
+ 2 \use_ii:nn
+ }
+ \ERRORusetaggingsocket % that should get a proper error message
+}
+% \end{macrocode}
%
% \end{macro}
%
+% \subsection{Tagging sockets}
+% This collects tagging sockets that should be generally available
+% so that they can also be used even if the tagging code is not loaded.
%
+% \subsubsection{Tagging support for paragraph setup}
%
+% Paragraphs are tagged through the code in the para/hooks. This code is sometimes
+% adjusted, e.g. to produce a \enquote{flattened} paragraph or to use a different tag.
+% Sockets related to such code parts are collected here.
%
+% \begin{macro}{\l__tag_block_flattened_level_int}
+% The block code needs to know if they are nested blockenvs inside
+% a flattened environment. For this it uses a counter. Inside some contexts,
+% e.g. at the begin of a minipage or a footnote this counter must be reset.
+% We therefore define the counter here so that we can use it in the following
+% socket.
+% \begin{macrocode}
+\int_new:N \l__tag_block_flattened_level_int
+% \end{macrocode}
+% \end{macro}
%
+% \begin{socketdecl}{tagsupport/para/restore}
+% This socket restores the para related settings to their default. It
+% should be used in places where ``normal'' paragraph tagging must be ensured, for example
+% at the begin of a footnote.
+% \begin{macrocode}
+\NewSocket{tagsupport/para/restore}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
-% \subsection{Tagging support for table/tabular packages}
+% \begin{plugdecl}{default}
+% \changes{v1.0i}{2024/10/10}{Restore also paratagging (tagging/723)}
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/para/restore}{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
+ \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,
+% tagsupport/toc/contentsline/after}
+% Tagging sockets at the begin and end of contentsline.
+% They receive \emph{all} contentsline arguments as one argument
+% in four brace groups. The socket code should then use the parts it needs.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/contentsline/before}{1}
+\NewSocket{tagsupport/toc/contentsline/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/toc/starttoc/before,
+% tagsupport/toc/starttoc/after}
+% Tagging sockets for the begin and end of start of \cs{@starttoc}.
+% They take one argument, the extension.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/starttoc/before}{1}
+\NewSocket{tagsupport/toc/starttoc/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/toc/leaders/before,
+% tagsupport/toc/leaders/after}
+% Tagging sockets to make the dot leaders an artifact.
+% They do not take an argument.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/leaders/before}{0}
+\NewSocket{tagsupport/toc/leaders/after}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \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
-% automated tagging is not wanted.
+% automated tagging is not wanted.
%
% \begin{socketdecl}{tagsupport/tbl/cell/begin,
% tagsupport/tbl/cell/end,
@@ -260,6 +388,14 @@
% \end{macrocode}
% \end{socketdecl}
%
+% \begin{socketdecl}{tagsupport/tbl/init/celldata}
+% This socket is used in \cs{tbl_init_cell_data_for_table}, the command
+% that stores and initialize cell data to handle nested tables.
+% It can be used to restore similar tagging related values
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/init/celldata}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
% \begin{socketdecl}{tagsupport/tbl/finalize}
% To fine tune the structure (change cells to header cells, remove
@@ -273,8 +409,15 @@
% \end{macrocode}
% \end{socketdecl}
%
+% \begin{socketdecl}{tagsupport/tbl/restore/celldata}
+% This socket is used in \cs{tbl_restore_outer_cell_data:}, the command
+% that restores cell data when quitting a nested table. It can be used to restore
+% similar tagging related values
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/restore/celldata}{0}
+% \end{macrocode}
+% \end{socketdecl}
-
% \begin{socketdecl}{tagsupport/tbl/colspan}
% This socket is used to manage spanning cells, e.g., a
% \cs{multicolumn}. It expects one argument (the number of cells
@@ -331,12 +474,71 @@
% \end{socketdecl}
%
%
+% \begin{socketdecl}{tagsupport/tbl/leaders/begin,
+% tagsupport/tbl/leaders/end}
+% Sockets around leaders such as rules or dotted lines, that should
+% be tagged as artifacts, used, for example, in \cs{cline}.
+% \changes{v1.0c}{2024/07/13}{Sockets for \cs{cline} leaders added (tagging/134)}
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/leaders/begin}{0}
+\NewSocket{tagsupport/tbl/leaders/end}{0}
+% \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}
%
-%
+%
% \begin{macrocode}
%<@@=tbl>
\ExplSyntaxOn
@@ -357,7 +559,7 @@
% \g_@@_row_int,
% \g_@@_span_tl,
% \g_@@_table_cols_tl}
-%
+%
% \cs{g_@@_row_int} holds the current row number in the table. The
% value \texttt{0} means we haven't yet processed the table
% preamble (or in case of longtable are just in front of the next
@@ -427,14 +629,14 @@
% \subsection{Tracing/debugging}
%
% \begin{macro}{\DebugTablesOn,\DebugTablesOff}
-%
+%
% \begin{macrocode}
\def\DebugTablesOn{
\cs_set_eq:NN \@@_trace:n \typeout
-}
+}
\def\DebugTablesOff{
\cs_set_eq:NN \@@_trace:n \use_none:n
-}
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -484,7 +686,7 @@
%
%
% \begin{macro}{\l_@@_tmpa_seq}
-%
+%
% \begin{macrocode}
\seq_new:N \l_@@_tmpa_seq
% \end{macrocode}
@@ -493,7 +695,7 @@
%
%
% \begin{macro}{\tbl_count_missing_cells:n}
-%
+%
% We might have the situation that some table package has not
% implemented the \cs{tbl_count_table_cols:} in which case
% \cs{g_@@_table_cols_tl} would always be zero and we would get an
@@ -529,7 +731,7 @@
%
%
% \begin{macro}{\tbl_save_outer_table_cols:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_save_outer_table_cols: {
\tl_set_eq:NN \l_@@_saved_table_cols_tl \g_@@_table_cols_tl
@@ -539,7 +741,7 @@
%
%
% \begin{macro}{\tbl_init_cell_data_for_table:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_init_cell_data_for_table: {
\tl_set:No \l_@@_saved_col_tl {\int_use:N \g_@@_col_int }
@@ -557,6 +759,10 @@
)
}
% \end{macrocode}
+% Tagging has to initialize cell data too.
+% \begin{macrocode}
+ \UseTaggingSocket{tbl/init/celldata}
+% \end{macrocode}
% These are the initial values when starting a table:
% \begin{macrocode}
\int_gzero:N \g_@@_row_int
@@ -649,7 +855,7 @@
%
%
% \begin{macro}{\tbl_restore_outer_cell_data:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_restore_outer_cell_data: {
\int_gset:Nn \g_@@_col_int { \l_@@_saved_col_tl }
@@ -656,6 +862,7 @@
\int_gset:Nn \g_@@_row_int { \l_@@_saved_row_tl }
\tl_gset_eq:NN \g_@@_span_tl \l_@@_saved_span_tl
\tl_gset_eq:NN \g_@@_table_cols_tl \l_@@_saved_table_cols_tl
+ \UseTaggingSocket{tbl/restore/celldata}
\@@_trace:n { ==>~ restored~cell~data:~
\int_use:N \g_@@_row_int,
\int_use:N \g_@@_col_int,
@@ -717,7 +924,7 @@
% the macro \cs{tbl_count_missing_cells:n} is executed and
% then the row is finished with a final \cs{cr}.
% \begin{macrocode}
-\cs_new:Npn \tbl_crcr:n #1 {
+\cs_new:Npn \tbl_crcr:n #1 {
\int_compare:nNnT \g_@@_col_int > 0
{
\tbl_count_missing_cells:n {#1}
@@ -725,7 +932,7 @@
% \end{macrocode}
% Even if we are at the start of a row we my have to do a \cs{cr},
% so we do a \cs{crcr} always at the end.
-% \changes{v1.ob}{2024/06/10}
+% \changes{v1.0b}{2024/06/10}
% {Always issue a \cs{crcr} even if we are at the start of a
% row to avoid problems with tabulary and similar code}
% \begin{macrocode}
@@ -741,14 +948,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/base/lttemplates.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lttemplates.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lttemplates.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%<*driver>
% \fi
\ProvidesFile{lttemplates.dtx}
- [2024-04-17 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}
@@ -730,13 +730,13 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\l_@@_default_tl}
+% \begin{variable}{\l_@@_default_tl}
% The default value for a key is recovered here from the property list
% in which it is stored.
% \begin{macrocode}
\tl_new:N \l_@@_default_tl
% \end{macrocode}
-%\ end{macro}
+% \end{variable}
%
% \begin{variable}{\l_@@_error_bool}
% A flag for errors to be carried forward.
@@ -1322,7 +1322,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \subsubsection{Storing values}
%
@@ -1926,7 +1925,6 @@
% \end{macro}
% \end{macro}
% \end{macro}
-% \end{macro}
%
% \begin{macro}{\@@_find_global:}
% \begin{macro}{\@@_find_global_aux:w}
@@ -2100,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/base/lttextcomp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/lttextcomp.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/lttextcomp.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -2357,8 +2357,8 @@
% \changes{v1.1a}{2024/01/27}{Added check file for encoding subset}
% \begin{macrocode}
%<*TS1check>
-\Providesfile{checkencodingsubset.tex}
- [2024/01/27 v0.5a Figure out safe TS1 encoding subsets]
+\ProvidesFile{checkencodingsubset.tex}
+ [2024/10/18 v0.5b Figure out safe TS1 encoding subsets]
% \end{macrocode}
%
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/base/ltvers.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltvers.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltvers.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2024-06-01}
+ {2024-11-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch at level{2}
+\def\patch at level{0}
% \end{macrocode}
%
% \begin{macro}{\development at branch@name}
Modified: trunk/Master/texmf-dist/source/latex/base/ltxref.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/base/ltxref.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/base/ltxref.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/firstaid/latex2e-first-aid-for-external-files.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/firstaid/latex2e-first-aid-for-external-files.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/06/25}
-\def\LaTeXFirstAidVersion{v1.1f}
+\def\LaTeXFirstAidDate{2024/10/16}
+\def\LaTeXFirstAidVersion{v1.1g}
% \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.
%
@@ -717,6 +717,34 @@
{[\@tempb][\arabic{page}][\cref at result]\thepage}{}{}{}}}% <------- five
\@esphack}%
}
+% \end{macrocode}
+% \changes{v1.1g}{2024/10/16}{update cleveref data in label hook}
+% cleveref patches and redefines \cs{refstepcounter} so that a call updates its data.
+% This fails if like e.g. in \pkg{longtable} the counter is stepped with
+% \cs{@kernel at refstepcounter}. We therefore move the data setup into the label hook.
+% As the hook is in a group we have to smuggle the data out of it.
+% \url{https://tex.stackexchange.com/a/722909/2388} and issue \#1393
+% \begin{macrocode}
+ \newcommand\firstaid at cref@smugglelabel{\let\cref at currentlabel\cref at gcurrentlabel@temp}
+ \newcommand\firstaid at cref@updatelabeldata[1]{%
+ \cref at constructprefix{#1}{\cref at result}%
+ \@ifundefined{cref@#1 at alias}%
+ {\def\@tempa{#1}}%
+ {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
+ \protected at xdef\cref at gcurrentlabel@temp{%
+ [\@tempa][\arabic{#1}][\cref at result]%
+ \csname p@#1\endcsname\csname the#1\endcsname}%
+ \aftergroup\firstaid at cref@smugglelabel
+ }
+% \end{macrocode}
+% we test if \cs{@currentcounter} is empty for unnumbered sections
+% \begin{macrocode}
+ \AddToHook{label}[firstaid/cleveref]
+ {\ifx
+ \@currentcounter\@empty
+ \else
+ \firstaid at cref@updatelabeldata{\@currentcounter}
+ \fi}
}%
}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/graphics/color.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/graphics/color.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/graphics/color.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -21,7 +21,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2024/01/14 v1.3d Standard LaTeX Color (DPC)]
+ [2024/06/23 v1.3e Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -877,10 +877,15 @@
% commands. The |\endgraf| in its definition is required in the case
% of groups of text in vertical `par' mode, but doesn't do any harm in
% horizontal `LR' contexts.
+% The |\@endpefalse| is required for the newer \texttt{@endpe}
+% handling, again it is harmless if an older kernel is used
+% (because there it was a local assignment).
% \changes{v0.2d}{1994/05/13}
% {New definition, was previously just \cs{endgroup}}
+% \changes{v1.3e}{2024/06/23}
+% {Support new \texttt{@endpe} mechanism}
% \begin{macrocode}
-\def\color at endgroup{\endgraf\endgroup}
+\def\color at endgroup{\endgraf\@endpefalse\endgroup}
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex/graphics/graphics.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/graphics/graphics.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/graphics/graphics.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -27,7 +27,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
+ [2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1050,8 +1050,9 @@
%
% \begin{macrocode}
\edef\Gin at gzext{\detokenize{gz}}
-% \edef{macrocode}
+% \end{macrocode}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\Gin at set@curr at file}
% \begin{macro}{\quote at name}
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/documentmetadata-support.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/documentmetadata-support.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/documentmetadata-support.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/latex-lab/latex-lab-amsmath.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-amsmath.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-amsmath.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -66,7 +66,7 @@
% \subsection{File declaration}
% \begin{macrocode}
\ProvidesFile{latex-lab-amsmath.ltx}
- [2024-02-12 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}
@@ -200,8 +200,8 @@
% \end{macrocode}
%
% \subsection{\cs{pmb}}
-% \cs{pmb} prints is argument three times. For tagging we must mark
-% two of occurences as artifact.
+% \cs{pmb} prints its argument three times. For tagging we must mark
+% two of occurrences as artifact.
% For luatex the attributes in the box must be reset, for this
% we switch to expl3-boxes.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-bib.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-bib.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-bib.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,7 +16,7 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabbibdate{2024-02-12}
+\def\ltlabbibdate{2024-07-05}
\def\ltlabbibversion{0.81b}
%<*driver>
\documentclass{l3doc}
@@ -128,7 +128,7 @@
%
% \begin{function}{\@extra at binfo,\@extra at b@citeb}
%
-% These are taken from hyperref, they are for chapterbib compability (and also
+% These are taken from hyperref, they are for chapterbib compatibility (and also
% signal to chapterbib not to change the citation commands)
% \end{function}
%
@@ -157,7 +157,7 @@
% \end{macrocode}
% \begin{macro}{\@extra at binfo,\@extra at b@citeb}
-% These are taken from hyperref, they are for chapterbib compability (and also
+% These are taken from hyperref, they are for chapterbib compatibility (and also
% signal to chapterbib not to change the citation commands)
% \begin{macrocode}
\providecommand*\@extra at binfo{}%
@@ -270,7 +270,7 @@
% \end{macrocode}
% Now we add the tagging structure.
% TODO: with the next tagpdf version it should no longer be
-% needed to exand the ref key.
+% needed to expand the ref key.
% \begin{macrocode}
\AddToHookWithArguments{bibcite/before}
{
@@ -305,7 +305,7 @@
% We need in part different code for both systems:
% with biblatex we have to take care that only the first
% structure sets a label, and if
-% hyperref is not loaded (or deactived) we will need additional code
+% hyperref is not loaded (or deactivated) we will need additional code
% but this currently doesn't exist.
% We assume that no document loads both package -- that will probably break.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-block.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-block.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-block.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -9,8 +9,8 @@
%
% https://www.latex-project.org/lppl.txt
%
-\def\ltlabblockdate{2024-03-23}
-\def\ltlabblockversion{0.8n}
+\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}}
@@ -341,7 +343,7 @@
%
% The idea of a \key{heading} key needs some further
% thoughts. Maybe instead the object type should accept a second
-% argument and receive input for such a headding from the document
+% argument and receive input for such a heading from the document
% level instead.
%
% The names of the keys need further thoughts and some
@@ -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
@@ -474,7 +476,7 @@
% \>\>\> The paragraph text before the display element \ldots\\
% \>\> \struct{/text}\\
% \>\> \struct{display element structure}\\
-% \>\>\> Content of the display structure possiblly involving inner \struct{text-unit} tags\\
+% \>\>\> Content of the display structure possibly involving inner \struct{text-unit} tags\\
% \>\> \struct{/display element structure}\\
% \>\> \struct{text}\\
% \>\>\> \ldots{} continuing the outer paragraph text\\
@@ -722,7 +724,7 @@
blockenv implementation]
% \end{macrocode}
%
-% Generell kernel changes, also loaded by the sec and toc code.
+% General kernel changes, also loaded by the sec and toc code.
% \begin{macrocode}
\RequirePackage{latex-lab-kernel-changes}
% \end{macrocode}
@@ -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,16 +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}
-\def\@endpefalse{\global\let\if at endpe\iffalse}
-% \end{macrocode}
-% \end{macro}
%
%
+% \end{macro}
%
+%
% \subsection{Object and template interfaces}
%
%
@@ -847,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}
{
@@ -856,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 ,
@@ -1269,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}
@@ -1285,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
@@ -1308,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
@@ -1569,7 +1571,7 @@
% \end{macrocode}
% We need to know later if we have nested blockenvs inside
% a flattened environment. Whenever we start a new blockenv we
-% increment \cs{\l_@@_flattened_level_int} if it is already
+% increment \cs{l__tag_block_flattened_level_int} if it is already
% different from zero. If it is zero we increment it if flattening
% is requested.
% Thus a value of \texttt{0} means no flattening requested so far
@@ -1578,14 +1580,14 @@
% is surrounded by a \texttt{text-unit} tag, while for any value above
% \texttt{1} we have to omit the \texttt{text-unit}.
% \begin{macrocode}
- \int_compare:nNnTF \l_@@_flattened_level_int > 0
+ \int_compare:nNnTF \l__tag_block_flattened_level_int > 0
{
- \int_incr:N \l_@@_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
{
\bool_if:NT \l__tag_para_flattened_bool
{
- \int_incr:N \l_@@_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
}
%
@@ -1623,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
@@ -1681,11 +1700,15 @@
% \end{template}
%
%
-% \begin{macro}{\l_@@_flattened_level_int}
+% \begin{macro}{\l__tag_block_flattened_level_int}
% Count the levels of nested blockenvs starting with the first that
-% is \enquote{flattened}.
+% is \enquote{flattened}. The counter is defined in lttagging.dtx,
+% but until the next release 11/24 we set it up here too
% \begin{macrocode}
-\int_new:N \l_@@_flattened_level_int
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1725,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}} }
@@ -1743,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
@@ -1789,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}
@@ -1814,9 +1861,13 @@
% and should not inherit the setting from the outer environment.
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/block-endpe}{on}
- { \legacy_if_gset_true:n { @endpe } }
+% \end{macrocode}
+% We can't use \cs{legacy_if_gset_true:n} because this is now doing
+% more than setting the legacy switch
+% \begin{macrocode}
+ { \@endpetrue }
\socket_new_plug:nnn{tagsupport/block-endpe}{off}
- { \legacy_if_gset_false:n { @endpe } }
+ { \@endpefalse }
% \end{macrocode}
%
% \begin{macrocode}
@@ -1864,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}
{
@@ -1873,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 ,
@@ -1981,7 +2034,7 @@
% \cs{parskip} and some other housekeeping, unless this block is inside a list and the list
% \cs{item} has not yet placed. In that case the vertical
% space and penalty us suppressed. This
-% is controled through the legacy switches \texttt{@noparitem},
+% is controlled through the legacy switches \texttt{@noparitem},
% \texttt{minipage}, and \texttt{@nobreak}.
% \begin{macrocode}
\legacy_if:nTF { @noparitem }
@@ -2028,7 +2081,6 @@
% \end{template}
%
%
-%
% \begin{macro}{\__kernel_displayblock_begin:,
% \__kernel_displayblock_beginpar_hmode:w,
% \__kernel_displayblock_beginpar_vmode:}
@@ -2073,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}
@@ -2098,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
{
@@ -2123,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
@@ -2157,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}
@@ -2251,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[]=.
@@ -2404,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
@@ -2421,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}
%
%
@@ -2475,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}
%
%
@@ -2520,7 +2655,7 @@
%
% \begin{macro}{\item}
% Here we already have all the building blocks. Complain in math
-% mode. Distingusih between first item (do necessary tagging) and
+% mode. Distinguish between first item (do necessary tagging) and
% later items \cs{@@_inter_item:} to
% cleanly close what's before, then call \cs{@@_item_instance:n} (which
% calls \cs{UseInstance}\{item\}\marg{instance}) to prepare the
@@ -2541,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}
@@ -2751,7 +2894,7 @@
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
% \end{macrocode}
%
-% Handle the tag name and attribute classess using the key values
+% Handle the tag name and attribute classes using the key values
% from the current list instance.
% \begin{macrocode}
\tl_if_empty:NTF \l_@@_tag_name_tl
@@ -2994,6 +3137,7 @@
block-instance = verbatimblock ,
inner-instance = ,
final-code = \legacyverbatimsetup ,
+ para-instance = justify
}
% \end{macrocode}
% \end{instance}
@@ -3173,7 +3317,7 @@
% block quoteblock-4,
% block quoteblock-5,
% block quoteblock-6 }
-% Default layout is to indent equaly from both side.
+% Default layout is to indent equally from both sides.
% \begin{macrocode}
\DeclareInstance{block}{quoteblock-1}{display}
{ rightmargin = \KeyValue{leftmargin} }
@@ -3468,7 +3612,7 @@
% then have to avoid adding another \texttt{text-unit}.
% \begin{macrocode}
{
- \int_compare:nNnT \l_@@_flattened_level_int < 2
+ \int_compare:nNnT \l__tag_block_flattened_level_int < 2
{
\__tag_gincr_para_main_begin_int:
\tag_struct_begin:n
@@ -3917,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/latex-lab/latex-lab-firstaid.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-firstaid.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-firstaid.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfirstaiddate{2024-05-25}
-\def\ltlabfirstaidversion{0.85d}
+\def\ltlabfirstaiddate{2024-10-16}
+\def\ltlabfirstaidversion{0.85h}
%<*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,12 +89,11 @@
} }
\exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
-\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \subsection{ams classes}
-% The amsart and amsbook classes do not use \cs{@author} to store the author list
+% The amsart, amsbook and amsproc classes do not use \cs{@author} to store the author list
% but a command \cs{authors}. To be able to nevertheless use the authors in the
% xmp-metadata we map \cs{@author} to this new command.
%
@@ -101,9 +102,179 @@
{\def\@author{\authors}}
\AddToHook{class/amsbook/after}
{\def\@author{\authors}}
+\AddToHook{class/amsproc/after}
+ {\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}
+% \changes{v0.85h}{2024/10/16}{moved Caption tag into \@begintheorem, tagging issue\#733}
+% \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.
+% \changes{v0.85h}{2024/10/16}{Added pre and post skips tagging/733}
+% \begin{macrocode}
+ \UseInstance{blockenv}{theorem}{beginsep=\thm at preskip}
+% \end{macrocode}
+% There is no working key to set the endskip, so we set the skip directly
+% similar to what amsthm is doing after the \cs{trivlist}.
+% \begin{macrocode}
+ \skip_set:Nn\l__block_topsepadd_skip { \thm at postskip }
+% \end{macrocode}
+% While create the caption/label we disable para-tagging.
+% \begin{macrocode}
+ \tagpdfparaOff
+ \mode_leave_vertical:
+% \end{macrocode}
+% The anchor for links. amsthm allows for unnumbered theorems so we have to test
+% for an empty counter.
+% \changes{v0.85h}{2024/10/16}{add test if counter is empty tagging/736}
+% \begin{macrocode}
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\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:}}%
+ \tag_struct_begin:n{tag=Caption}
+ \thm at swap\swappedhead\thmhead{##1}{##2}{##3}%
+ \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:
+ \tag_struct_end:
+ \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{%
+ \thmname{##1}
+ \thmnumber{
+ \@ifnotempty{##1}{~}\@upn{##2}
+ }%
+ \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+ }
+ \let\thmhead\thmhead at plain
+ \def\swappedhead##1##2##3{%
+ \thmnumber{##2}
+ \thmname{\@ifnotempty{##2}{\nobreakspace}##1}
+ \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+ }
+ \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}
%
@@ -210,54 +381,12 @@
%\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
-% the new footnote code fails. We use a hook instead
+% the new footnote code fails. We use a hook instead.
+% \changes{v0.85h}{2024/10/16}{Remove redefinition of refstepcounter. It no longer uses
+% the hook.}
% \begin{macrocode}
\AddToHook{package/cleveref/after}
{
@@ -267,16 +396,6 @@
\protected at edef\cref at currentlabel{%
[footnote][\arabic{footnote}][\cref at result]%
\p at footnote\@thefnmark}}
-% \end{macrocode}
-% The second problem is that it redefines \cs{refstepcounter} to use an argument.
-% In itself this isn't a problem but as the new definition doesn't grab the arguments
-% directly it fails over the generic hook inserted at the end of the definition
-% \begin{macrocode}
- \RenewDocumentCommand\refstepcounter{om}{%
- \IfNoValueTF{#1}%
- {\refstepcounter at noarg{#2}}%
- {\refstepcounter at optarg[#1]{#2}}%
- }%
}
% \end{macrocode}
%
@@ -290,6 +409,7 @@
% See also issue \url{https://github.com/latex3/tagging-project/issues/69}
%
%
+% \begin{macrocode}
\ExplSyntaxOn
\AddToHook{package/booktabs/after}
{
@@ -314,9 +434,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/latex-lab/latex-lab-float.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-float.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-float.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfloatdate{2024-03-23}
-\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
@@ -64,7 +67,7 @@
%
% A special type, called a H-float, (provided by the float package)
% is always placed in the main text stream and does not
-% necessarly preserve the order with normal floats of the same type: It is basically
+% necessarily preserve the order with normal floats of the same type: It is basically
% a minipage with a caption.
%
% Floats typically contain a figure (or a table, etc.) and a caption,
@@ -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/latex-lab/latex-lab-footnotes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-footnotes.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-footnotes.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -17,8 +17,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfootnotedate{2024-03-12}
-\def\ltlabfootnoteversion{0.8d}
+\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
@@ -636,7 +661,7 @@
% number to setup the reference and the link.
%
% The structure related to the \cs{footref} is added to the end of the \texttt{/Ref} array of the note and so the
-% \texttt{/Ref} array doesn't necessarly reflect the order of the marks in the document. It would probably
+% \texttt{/Ref} array doesn't necessarily reflect the order of the marks in the document. It would probably
% be possible to change this, but it is not clear if it actually matters and so it worth the additional coding
% and processing.
%
@@ -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}
%
%
@@ -1150,7 +1175,22 @@
%
%
% \begin{macro}{\fnote_footnotetext:n}
+% We temporarily test for the tagging socket until it is in the next release:
% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/para/restore_plug_str }
+ {
+ \NewSocket{tagsupport/para/restore}{0}
+ \NewSocketPlug{tagsupport/para/restore}{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
+ \bool_set_false:N\l__tag_para_flattened_bool
+ }
+ \AssignSocketPlug{tagsupport/para/restore}{default}
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_new_protected:Npn \fnote_footnotetext:n #1 {
\@@_debug_footnotetext:
%-------
@@ -1191,6 +1231,7 @@
\floatingpenalty \@MM
\hsize\columnwidth
\@parboxrestore
+ \UseTaggingSocket{para/restore}
\parindent 1em % typical default used in \@makefntext moved up here
\def\@currentcounter{footnote}
\protected at edef \@currentlabel { \p at footnote \@thefnmark }
@@ -1673,7 +1714,7 @@
%
% \subsubsection{\pkg{memoir}}
% The \pkg{memoir} class redefines various internal commands to inject its
-% hooks and addtional code. The following reinstates the kernel command and
+% hooks and additional code. The following reinstates the kernel command and
% so probably breaks various options of \pkg{memoir}, but without the
% changes it errors anyway. The \pkg{footmisc} package should be used to change
% for example to para footnotes.
@@ -1937,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
{
@@ -1951,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
%
%
@@ -1965,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}
{
@@ -1972,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.
@@ -1979,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.
@@ -2066,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:
@@ -2446,7 +2482,7 @@
% This can use the default interface, except that a negative value for
% \footnotemargin makes little sense, so we test for this and warn if
-% necessary. But -\maxdimen is ok again, so would need to be a litte bit more elaborate.
+% necessary. But -\maxdimen is ok again, so would need to be a little bit more elaborate.
%
%\AddToHook{fntext/para}{
@@ -2483,7 +2519,7 @@
\leavevmode
% \end{macrocode}
% Typesetting the mark twice means that one can't have any material
-% inside that gets unhappy in that case. Tha shouldn't be a
+% inside that gets unhappy in that case. That shouldn't be a
% problem, but perhaps we have to come up with a more elaborate
% solution in the end.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-graphic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-graphic.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-graphic.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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-03-13}
-\def\ltlabgraphicversion{0.80d}
+\def\ltlabgraphicdate{2024-09-18}
+\def\ltlabgraphicversion{0.80e}
%
%<*driver>
\documentclass{l3doc}
@@ -78,7 +78,7 @@
% The value of a \texttt{BBox} is an array of four numbers that gives the
% coordinates of the left, bottom, right, and top edges
% of the structure element’s bounding box. That is the rectangle that completely encloses
-% its \emph{visible} content so not necessarly the TeX bounding box:
+% its \emph{visible} content so not necessarily the TeX bounding box:
% if \texttt{viewport} or \texttt{trim} is used and the
% graphic is not clipped, the visible content can be larger.
%
@@ -146,8 +146,8 @@
% \item[\texttt{artifact}] When used the graphic will be tagged as artifact. This doesn't
% require a \texttt{BBox} and so works also in some of the not yet supported cases described
% above.
-% \item[\texttt{false}] When used tagging will be stopped completly. It is then the
-% responsability of the surrounding code to add appropriate tagging commands.
+% \item[\texttt{false}] When used tagging will be stopped completely. It is then the
+% responsibility of the surrounding code to add appropriate tagging commands.
% \item[\meta{name}] Other values will be used as tag names in the structure. If the tag is not
% known as a structure tag you will get an warning from tagpdf. The default name is currently
% \texttt{Figure}
@@ -291,7 +291,7 @@
% ,\l_@@_graphic_trim_uy_fp
% }
% A bunch of fp-variables (we don't use tl-vars,
-% to avoid to have to take care about minus signs everwhere)
+% to avoid to have to take care about minus signs everywhere)
% \begin{macrocode}
\fp_new:N\l_@@_graphic_sin_fp
\fp_new:N\l_@@_graphic_cos_fp
@@ -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/latex-lab/latex-lab-marginpar.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-marginpar.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-marginpar.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -18,8 +18,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabmarginpardate{2024-02-12}
-\def\ltlabmarginparversion{0.85b}
+\def\ltlabmarginpardate{2024-09-18}
+\def\ltlabmarginparversion{0.85d}
%<*driver>
\documentclass[kernel]{l3doc}
@@ -72,7 +72,7 @@
% They can be tagged either as artifacts (if they are merely distracting decoration),
% as small headings before the paragraph, or as |Aside|. Unlike the PDF 1.7 fallback |Note|
% the structure |Aside| is not allowed inside |P|,
-% so if |Aside| is used, it must be placed before or after the current |P| in the surounding |text-unit|,
+% so if |Aside| is used, it must be placed before or after the current |P| in the surrounding |text-unit|,
% or it must split the |P|. Splitting is probably not so good as
% |\marginpar| is often used somewhere in the middle of sentence.
% The best default is probably to use |Aside|, find the parent |text-unit| and add it there.
@@ -153,13 +153,38 @@
\socket_new:nn {tagsupport/marginpar/end}{0}
% \end{macrocode}
% \end{socketdecl}
+%
+% \begin{macro}{\@@_get_marginpar_parent:N,\@@_get_marginpar_parent_aux:nn}
+% In a paragraph we must retrieve
+% the structure number of the surrounding Part structure
+% TODO: if this is needed in more places this should
+% go into tagpdf.
+% \begin{macrocode}
+\cs_new_protected:Npn\@@_get_marginpar_parent_aux:nn #1 #2
+ {
+ \str_if_eq:eeT{\use_ii:nn #1}{Part}{\seq_put_right:Nn\l_@@_tmpa_seq {#2}}
+ }
+\cs_new_protected:Npn \@@_get_marginpar_parent:N #1
+ {
+ \seq_clear:N\l_@@_tmpa_seq
+ \seq_map_pairwise_function:NNN
+ \g_@@_struct_tag_stack_seq
+ \g_@@_struct_stack_seq
+ \@@_get_marginpar_parent_aux:nn
+ \seq_put_right:Nn\l_@@_tmpa_seq {2}
+ \seq_get_left:NN \l_@@_tmpa_seq #1
+ }
+\cs_generate_variant:Nn \tag_struct_begin:n {e}
+% \end{macrocode}
+% \end{macro}
% \begin{plugdecl}{tagsupport/marginpar/begin,tagsupport/marginpar/end}
% \begin{macrocode}
\socket_new_plug:nnn {tagsupport/marginpar/begin}{default}
{
\if_mode_horizontal:
- \tag_mc_end:
- \tag_struct_begin:n{tag=Aside,parent=\g__tag_para_main_struct_tl}%
+ \tag_mc_end:
+ \@@_get_marginpar_parent:N \l_@@_tmpa_tl
+ \tag_struct_begin:e{tag=Aside,parent=\l_@@_tmpa_tl}%
\else:
\tag_struct_begin:n{tag=Aside}%
\fi:
@@ -202,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}
%
@@ -223,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
@@ -233,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/latex-lab/latex-lab-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-math.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-math.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -19,13 +19,13 @@
% for those people who are interested or want to report an issue.
%
%
-\def\ltlabmathdate{2024-04-16}
-\def\ltlabmathversion{0.5j}
+\def\ltlabmathdate{2024-10-25}
+\def\ltlabmathversion{0.6i}
%
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
-\CodelineIndex
+\CodelineIndex
\usepackage{todonotes}
@@ -40,7 +40,7 @@
% \title{The \texttt{latex-lab-math} code\thanks{}}
% \author{Frank Mittelbach, Joseph Wright, \LaTeX{} Project}
% \date{v\ltlabmathversion\ \ltlabmathdate}
-%
+%
% \maketitle
%
% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
@@ -77,21 +77,21 @@
% \tableofcontents
%
% \section{Introduction}
-% \car*{Todo: update all the documentation! Both here and
+% \car*{Todo: update all the documentation! Both here and
% (what little there is!) in the implementation section.}
%
% Tagging math involves a variety of tasks that require that math is captured before the
% typesetting
-% \begin{itemize}
-% \item When typesetting the math MC-tags and structure commands must
-% be inserted at the begin and the end, and perhaps also around lines
-% or other subparts of the equation.
+% \begin{itemize}
+% \item When typesetting the math MC-tags and structure commands must
+% be inserted at the begin and the end, and perhaps also around lines
+% or other subparts of the equation.
% \item The source and/or a mathml-representation of the source must be available
% so that it can be (perhaps after some preprocessing) be used in an associated file
% or in an alternate text
-% \item It must be possible to measure the math for e.g. a bbox setting.
+% \item It must be possible to measure the math for, e.g., a bbox setting.
% \end{itemize}
-%
+%
% This file implements capture of all math mode material at the outer
% level, i.e., a formula is captured in its entirety with inner text
% blocks (possibly containing further math) absorbed as part of the
@@ -101,24 +101,24 @@
%\end{verbatim}
% would only result in a single capture of the tokens
% ``\verb*/a \in A \text{ for all $a<5$}/''.
-%
%
+%
% \section{Math capture} \label{sec:mathcapture}
-% In the current setup
+% In the current setup
% \begin{itemize}
% \item |$|, |\(...\)| and |$$| grab (through a command in \cs{everymath}/cs{everydisplay})
% if the boolean \cs{l_@@_collected_bool} is false.
% If the boolean is true they behave normally and can for example contain verbatim.
-%
-% \item All (registered) environments grab their body
+%
+% \item All (registered) environments grab their body
% regardless of the state of the boolean. For
-% |equation|, |equation*| and |math| this is a change as they no longer can
+% |equation|, |equation*| and |math| this is a change as they no longer can
% contain verbatim.
-%
+%
% \item BUG: |\[...\]| grabs if \cs{l_@@_collected_bool} is false. If it is
-% true it falls back to |equation*| and then errors because this can't find the end.
-% \end{itemize}
-%
+% true it falls back to |equation*| and then errors because this can't find the end.
+% \end{itemize}
+%
% \subsection{Code level interfaces}
%
% \begin{function}{\math_register_env:n, \math_register_env:nn}
@@ -163,14 +163,15 @@
% material.
% \end{itemize}
% \end{function}
-%
+%
% \section{Math tagging}
-%
-% The tagging code has to handle
+%
+% \subsection{Code requirements}
+% The tagging code has to handle
% \begin{itemize}
-% \item the embedding into the surrounding. This means
-% \begin{itemize}
-% \item closing and reopening MC-chunks
+% \item the embedding into the surrounding. This means
+% \begin{itemize}
+% \item closing and reopening MC-chunks
% \item closing and reopening text/P-structures
% \item handling interferences of the tagging code with penalties and spacing.
% \end{itemize}
@@ -177,35 +178,37 @@
% \item the actual tagging which means to do some or all of the following tasks:
% \begin{itemize}
% \item setup content for an associated source file
-% \item setup content for an associated mathml file
+% \item setup content for an associated mathml file
% \item setup content for the /Alt key
% \item setup content for the /ActualText key
% \item setup attributes
-% \item add associated files
+% \item add associated files
% \item add a Formula structure
-% \item surround subparts (e.g. lines) with Formula sub structures
+% \item surround subparts (e.g., lines) with Formula sub structures
% (perhaps with their own set of additional content)
-% \item surround elements of the equation with mathml structure elements
+% \item surround elements of the equation with mathml structure elements
% (currently only luatex with luamml)
% \end{itemize}
% \end{itemize}
-%
+%
% \subsection{Inline math}
-%
+%
% The embedding code is added through
-% the sockets
+% the sockets
% \begin{itemize}
-% \item |tagsupport/math/inline/begin|
+% \item |tagsupport/math/inline/begin|
% \item |tagsupport/math/inline/end|
-% \end{itemize}
+% \end{itemize}
% The sockets simply push and pop the MC currently. Without
-% tagging they use the noop-plug.
-%
+% tagging they use the noop-plug.
+%
% The actual tagging is in done through the sockets
% \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:
@@ -216,7 +219,7 @@
% \item |tagsupport/math/struct/begin| This calls \cs{tag_struct_begin:n}.
% It should also write the associated files if needed.
% \item |tagsupport/math/substruct/begin| this handles subparts.
-% TODO: does it really make sense in inline math to have that??
+% TODO: does it really make sense in inline math to have that??
% \end{itemize}
% \item |tagsupport/math/inline/formula/end|
% This socket ends the formula structure(s). The |default|
@@ -223,48 +226,55 @@
% plug calls these internal sockets:
% \begin{itemize}
% \item |tagsupport/math/substruct/end|
-% \item |tagsupport/math/struct/end|
+% \item |tagsupport/math/struct/end|
% \end{itemize}
-% \end{itemize}
-%
+% \end{itemize}
+%
% \subsection{Display math}
-%
+%
% \textit{to be written}
-%
+%
% \subsection{Associated Files}
-%
+%
% The current code allows the attachment of two types of associated file to the
% Formula structure:
-% the \LaTeX\ source and a MathML representation.
+% the \LaTeX\ source and a MathML representation.
% Technically both can be attached---AF is an array
-% of file references---practically there can be problems with PDF consumers:
-% e.g. ngpdf used both and so showed the equation twice
-% (this has been corrected in the newest version) and
+% of file references-----in practice there can be problems with PDF consumers:
+% e.g., ngpdf used both and so showed the equation twice
+% (this has been corrected in the newest version) and
% Foxit seems to see only the first AF in the array (so we attach the
% mathml as first file).
-%
-% The \LaTeX\ source can be (and is) attached automatically.
+%
+% The \LaTeX\ source can be (and is) attached automatically.
% It can be suppressed by an option with
-% \texttt{math/tex/AF=false}, see below.
-%
-% The MathML is attached if a file |\jobname-mathml.html| is found and
-% if it contains a suitable MathML snippet for the current formula.
+% \texttt{math/tex/AF=false}, see below.
+%
+% The MathML is attached if the files |\jobname-mathml.html| and/or
+% |\jobname-luamml-mathml.html| are found
+% and if they contains a suitable MathML snippet for the current formula.
+% If the files contain more than one suitable snippet (as identified by the hash)
+% the first one is used.
+% |\jobname-luamml-mathml.html| is automatically generated (see below section~\ref{sec:luamml})
+% and read after |\jobname-mathml.html|. This means that |\jobname-mathml.html| can contain
+% improved versions of a formula.
+%
% The MathML processing can be suppressed globally by emptying the list of
% mathml files with |math/mathml/sources=|. Locally for a formula |math/mathml/AF=false|
-% can be used.
-%
-% For a MathML representation a file with such representations must be provided.
-% If the equation is numbered the numbering should be part of the MathML as
+% can be used.
+%
+% For a MathML representation a file with such representations must be provided.
+% If the equation is numbered the numbering should be part of the MathML as
% the |Lbl| substructure is ignored if an MathML is used (see https://github.com/foxitsoftware/PDF_UA-2).
-%
-% The MathML representation is given in a special format.
+%
+% The MathML representation is given in a special format.
% It is meant to be a valid html file
% that can be viewed in a browser.
% For this it can start with |<!DOCTYPE html><html>| and end with |</html>|
-% It should have the extension \texttt{.html}. The \meta{mathml} content
+% It should have the extension \texttt{.html}. The \meta{mathml} content
% is read with special catcodes, so can contain ambersands, hashes, comment chars
% and unmatched braces such as |<mo>{</mo>|
-%
+%
% The file should contain a number of representations in this format:
% \begin{quote}
% |<div>| \\
@@ -278,12 +288,12 @@
% \end{quote}
% The keywords |<div>|, |<h2>\mml|, |<p>|, |<math|, |</math>| |</div>| are required as
% they are used to delimit the arguments by the \LaTeX{} code.
-%
+%
% \meta{key} and \meta{source} are only used for debugging, they help to identify
% the equation referred by this representation. The source should be used correctly escaped
% |&| and |<| so that if gives valid html!
-%
-% \meta{attributes} is not required either, but can e.g. contain attributes
+%
+% \meta{attributes} is not required either, but can, e.g., contain attributes
% to improve the display in a browser:
% \begin{verbatim}
% <math alttext="\mathbf{G}" class="ltx_Math" display="inline">
@@ -290,45 +300,206 @@
% \end{verbatim}
% It can also contain the name space declaration: |xmlns="http://www.w3.org/1998/Math/MathML"|%
% \footnote{But it is probably not needed and only blows up the PDF.}
-%
-%
-% By default the code tries at the begin of the document
-% to read a file |\jobname-mathml.html| in the |html|-format.
-% The file name can be changed with |mathml/setfiles={filename1,filename2}|
-% (without extension, |html| is added automatically).
-% If there is a list, all files are loaded.
+%
+%
+% By default the code tries at the begin of the document
+% to read a file |\jobname-mathml.html| in the |html|-format.
+% The file name can be changed with |mathml/setfiles={filename1,filename2}|
+% (without extension, |html| is added automatically).
+% If there is a list, all files are loaded.
% If a file doesn't exist it is ignored, only an info is written to the log.
-%
-% Currently every MathML-snippet from a file is embedded into the PDF,
-% it is not checked first if it is actually used (simply writing everything to the PDF
-% is a bit easier than keeping everything in memory and also means that
-% the snippets are one after the other in the PDF).
-%
-% As mentioned above the MathML-AF can be suppressed for the equations in a group with
+%
+% Currently every MathML-snippet from a file is embedded into the PDF,
+% it is not checked first if it is actually used (simply writing everything to the PDF
+% is a bit easier than keeping everything in memory and also means that
+% the snippets are one after the other in the PDF).
+%
+% As mentioned above the MathML-AF can be suppressed for the equations in a group with
% |math/mathml/AF=false|, or
-% completly by setting |math/mathml/sources=| in the preamble.
-%
+% completely by setting |math/mathml/sources=| in the preamble.
+%
% Files embedded in a PDF can be listed in the attachments panel of a PDF viewer.
% This is probably not so useful for lots of small files (but one could create
-% collections), but as long as PDF editors or viewers don't offer
+% collections), but as long as PDF editors or viewers don't offer
% proper support to access the AF it can help so have them there. The MathML are
% added by default, but the \LaTeX{} source not. This can be changed with
% |viewer/pane/mathsource=true| (anywhere in the document) and |viewer/pane/mathml=false| (in the
-% preamble, before the external file is read).
+% preamble, before the external file is read).
+%
+%
+% \subsection{Automatic mathml creation with luamml}\label{sec:luamml}
+%
+% If lualatex and the package \pkg{unicode-math} is used
+% the package \texttt{luamml} is loaded and
+% will automatically generate the file |\jobname-luamml-mathml.html|
+% with mathml representations of all math formulas.
+% This file is then used in subsequent compilations and works also with
+% pdflatex.
%
-% \subsection{Options}
-%
-%
+% The generation of the file can be suppressed (in the preamble)
+% with |math/mathml/luamml/write=false|.
+%
+% If the package \pkg{unicode-math} is not used,
+% the loading of \pkg{luamml} and with it the generation of the file can be forced
+% with |math/mathml/luamml/load=true| or |math/mathml/luamml/write=true|
+% but be aware that it is then possible that various symbols
+% are mapped to the wrong Unicode code points.
+%
+% The package \pkg{luamml} is still quite experimental and the output should be checked.
+% The |\jobname-luamml-mathml.html| file may be previewed in a browser although
+% you may need to add additional css or javascript declarations
+% to enable browser support for all mathml constructs.
+%
+%
+% \subsection{Summary of math options}
+% The following options exist to make math more accessible:
+% \begin{description}
+% \item[ActualText] An \texttt{ActualText} can be placed on structure elements,
+% but can also be added in the stream on a \texttt{BDC} marker with a \texttt{Span}
+% tag (normally an independant marker without an MCID number, it is not clear yet
+% if it can be used on a MC-chunk).
+% The content is a text string, typically one or a few Unicode characters.
+% \texttt{ActualText} is meant to replaces the content
+% and should only be used on small entities,
+% e.g., to define the semantic or the Unicode code point of a symbol.
+% \texttt{ActualText} is not supported by all PDF reader.
+% It is also unknown where it should be used at best (in a structure element,
+% or on an independent Span-BDC) and what happens if it is used in more than
+% one place.
+% \begin{description}
+% \item[enabled by default?] False
+% \item[how to enable/disable] No interface yet.
+% \texttt{ActualText} can only be added on the Formula structure element by
+% changing the \texttt{tagsupport/math/content} or some other socket.
+% For a BDC marker one can, e.g., use
+% \begin{verbatim}
+% \pdf_string_from_unicode:nnN{utf16/hex}{€}\l_tmpa_tl
+% \pdf_bdc:ee{Span}{/ActualText\l_tmpa_tl}content\pdf_emc:
+% \end{verbatim}
+% There should be no pagebreak in the \meta{content} and the BDC should be correctly
+% nested into tagging, so, e.g., a \cs{leavevmode} should be issued before the bdc command.
+% \item[Consumer support] in part and in part buggy, needs tests \ldots
+% \end{description}
+%
+% \item[Alt] Like \texttt{ActualText} the \texttt{Alt} key can be used on
+% structure elements and on \texttt{Span} in the stream. It should contain a description
+% of the content and is mainly meant for images. PDF/UA-1,
+% which views math formulas as illustrations, mandates the key
+% also for \texttt{Formula} structure elements.
+% \begin{description}
+% \item[enabled by default?] false unless PDF/UA-1 is detected,
+% then it is enabled in the begindocument/end hook
+% (this will reconsidered when it is clear, that
+% the use of \texttt{Alt} does not shadow mathml). It can be enabled for
+% all engines and PDF versions.
+% \item[enable/disable] \verb+\tagpdfsetup{math/alt/use}+ (local boolean,
+% so can be used on individual equations)
+% \item[default value] A template text (stored in \cs{l_@@_content_template_tl})
+% starting with \texttt{LaTeX formula starts}.
+% \item[user value] No interface currently provided. This needs optional arguments
+% or an external setup command.
+% See \url{https://github.com/latex3/tagging-project/discussions/717}.
+%
+% \end{description}
+%
+% \item[source-AF] The \LaTeX{}-source of the equation can
+% be attached as an associated file with mime-type
+% application/Fx-tex. The \texttt{AFRelationship} is \texttt{Source}.
+% The source is embedded without expansion. This means that targets of
+% references and macros are not resolved.
+% The files are by default not shown in the EmbeddedFiles pane,
+% this can be enabled with |viewer/pane/mathsource=true|.
+% If an A-standard is used, it must be one that allows embedded files, e.g., A-4f.
+%
+% \begin{description}
+% \item[enabled by default?] true for all engines and PDF versions
+% \item[enable/disable] \verb+\tagpdfsetup{math/tex/AF}+ (local boolean, so can
+% be used on individual equations)
+% \item[default value] source code including dollars or environment name.
+% \item[consumer support] Currently only ngpdf makes
+% use of it: if there is no mathml it passes the source to mathjax.
+% \end{description}
+%
+% \item[luamml] The following options make (with lualatex) use
+% of the \pkg{luamml} package. \pkg{luamml} is currently automatically
+% loaded (at the end of the preamble) if \pkg{unicode-math} has been detected.
+% The loading can be forced or suppressed
+% with \verb+\tagpdfsetup{math/mathml/luamml/load=true/false}+.
+%
+% \pkg{luamml} affects all math, locally it can be stopped with |math/mathml/ignore|,
+% or by using the commands described in the package.
+%
+% \item[mathml-AF] A mathml representation of the equation can be attached
+% to the structure. The configuration possibilities are rather complex as the
+% keys have to control three different tasks:
+% The \emph{generation} of the file with the mathml fragments,
+% the \emph{reading} and \emph{embedding} of the mathml fragments,
+% and the \emph{association} of a mathml fragment to a specific equation.
+%
+% \begin{description}
+% \item[generation]
+% With pdf\LaTeX{} mathml fragments can not be generated automatically,
+% but a file with dummy fragments for every equation will be written if
+% \verb+\tagpdfsetup{math/mathml/write-dummy}+ is issued in the preamble.
+%
+% With lua\LaTeX{} a file with mathml fragments will be created automatically
+% if the package \pkg{luamml} has been loaded (see above).
+%
+% \item[reading and embedding]
+% By default the code will read and embed
+% mathml from |\jobname-mathml.html| and |\jobname-luamml-mathml.html| in this order and
+% the first fragment with a new hash value will be inserted.%
+% The list of sources and their order can be changed with the key
+% |math/mathml/sources|, setting that to an empty value suppresses
+% the loading mathml associated files completely. For efficiency reasons
+% it embeds math fragments directly, there is no check yet if the fragment is
+% actually used.
+%
+% The files are by default shown in the EmbeddedFiles pane,
+% this can be disabled with |viewer/pane/mathml=false|.
+%
+% \item[attaching] A mathml fragment is currently
+% attached as an associated file to an Formula if the hash of
+% the source matches the hash of the fragment. This is not a perfect test:
+% equations with the same source and so the same hash
+% can have different mathml representation, e.g.,
+% if there are references or commands or counters in the equation. This
+% will change in a feature version.
+% The attachment can be suppressed locally with |math/mathml/AF=false|.
+% The mathml fragment will still be embedded in the PDF!
+%
+% % TODO: adapt test
+% \end{description}
+%
+% \item[mathml structure elements]
+% Mathml structure elements can be used in PDF~2.0 directly.
+% In PDF~1.7. one could theoretically
+% use them if one declares a role mapping first,
+% (this can be done with \verb+\tagpdfsetup{role/mathml-tags}+)
+% which maps all to \texttt{Span}. But such a role mapping currently breaks reading,
+% e.g. in Adobe, and so it is not recommended.
+%
+% Automatic generation of structure elements is only possible with
+% lualatex. It requires that the packages \pkg{luamml} and \pkg{tagpdf}
+% have been loaded.
+% \begin{description}
+% \item[enabled by default?] false
+% \item[enable/disable] \verb+\tagpdfsetup{math/mathml/structelem}+
+% (local setting, so can be used with grouping on individual equations).
+% \item[consumer support] Needs more tests.
+% \end{description}
+%
+% \end{description}
+%
+%
+%
% \section{Known current bugs, etc.}
-% \car*{New Section, now with subsections.\\
-% As indicated, these lists are probably incomplete.\\
-% Some of these have been addressed in a more recent branch.}
%
% \subsection{Capture/grabbing problems}
-%
+%
% \begin{enumerate}
-% \item Incorrect grabbing of |$|-math when there is also
-% explicit |$|-math within a \textit{text environment}
+% \item Incorrect grabbing of |$|-math when there is also
+% explicit |$|-math within a \textit{text environment}
% that is itself within the math that should all be grabbed.
% For example,
% \begin{verbatim}
@@ -335,39 +506,39 @@
% $a\begin{minipage}{1cm}$b$\end{minipage}$
% \end{verbatim}
% would only result in the capture of the tokens
-% ``\verb*/a\begin {minipage}{1cm}/''.
+% ``\verb*/a\begin {minipage}{1cm}/''.
% This can be avoided by an additional brace group:
% \begin{verbatim}
% $a{\begin{minipage}{1cm}$b$\end{minipage}}$
-% \end{verbatim}
-%
+% \end{verbatim}
+%
% \item Similar incorrect grabbing with |$$| also.
-%
+%
% \item The grabbing, for all the display environments (and |\) \]|), needs
-% to deal with nesting: \pkg{amsmath} contains code for this.
-%
-% \item The math can't contain verbatim and verbatim-like commands. This is
+% to deal with nesting: \pkg{amsmath} contains code for this.
+%
+% \item The math can't contain verbatim and verbatim-like commands. This is
% nothing new for the \pkg{amsmath} environments but changes |$| and |\[\]|
-% and |equation*| (see e.g. tagging-project issue \#30).
-%
+% and |equation*| (see, e.g., tagging-project issue \#30).
+%
% \item Begin and end of the math or math environment can not be hidden in commands.
-% For example \verb+>{$}l<{$}+ in a tabular would lead to errors.
-% Defining |\[| to fall back to |equation*| doesn't work if |equation*| is
+% For example \verb+>{$}l<{$}+ in a tabular would lead to errors.
+% Defining |\[| to fall back to |equation*| doesn't work if |equation*| is
% a grabbing environment.
-%
+%
% \item The behaviour of |\[...\]| is faulty. See above.
-% \end{enumerate}
+% \end{enumerate}
%
% \subsection{Fake math}
-% In a number of places in \LaTeX{} math commands (mainly |$|) is used
-% only for technical reason, e.g. to access a math font, to setup a symbol
-% or to use \cs{vcenter}.
-%
+% In a number of places in \LaTeX{} math commands (mainly |$|) is used
+% only for technical reason, e.g., to access a math font, to setup a symbol
+% or to use \cs{vcenter}.
+%
% The code identifies such fake math mostly by making use of the \cs{m at th} command
% where two methods are used for the automatic detection:
-%
+%
% \begin{itemize}
-% \item After grabbing math content the code checks if the content contains the token
+% \item After grabbing math content the code checks if the content contains the token
% \cs{m at th} and if yes it doesn't call the processor before reinserting
% the content and perhaps adding tagging code.
% This method requires that the math can be grabbed (e.g. that the end dollar is visible)
@@ -374,11 +545,11 @@
% and that the \cs{m at th} is visible. It applies for example in \cs{@iiiparbox} where the
% code from |$\vcenter| to |\m at th$| is grabbed an put back. It does not work for
% example for |tabular| where the dollars and the \cs{m at th} token are spread around
-% over three commands. |tabular| needs therefore manual intervention.
-%
+% over three commands. |tabular| needs therefore manual intervention.
+%
% A look in the list of usages (in \texttt{usage-of-m at th.md}) justifies this approach.
% All usages are either not math at all, or related to small elements that probably
-% shouldn't be grabbed and processed on their own.
+% shouldn't be grabbed and processed on their own.
%
% \item \cs{m at th} is redefined so that it sets the boolean \cs{l_@@_collected_bool}
% to true. If \cs{m at th} is used inside math that has been grabbed
@@ -385,69 +556,70 @@
% this doesn't change much as the boolean is set by the grabbing anyway. For usages
% outside math the benefit is not so clear: The setting avoids that in \cs{LaTeXe}
% the epsilon is processed as math, but it also prevents that the content of the amsmath
-% command \cs{boxed} is processed as math.
+% command \cs{boxed} is processed as math.
% It means that if one wants to reenable math processing inside some (fake) math
% one has to do it after \cs{m at th} calls.
% \end{itemize}
-%
-% Open problems
+%
+% \subsubsection{Open problems}
+%
% \begin{enumerate}
% \item The grabbing code doesn't pass the info that it detected a \cs{m at th} token.
% This means that the tagging code has to do the same check (and doesn't do this
% in all cases yet).
-%
-% \item Commands are missing to locally disable the grabbing and processing, e.g.
+%
+% \item Commands are missing to locally disable the grabbing and processing, e.g.,
% to handle |tabular|.
-%
+%
% \item It must be checked if setting the boolean in \cs{m at th} really makes sense
-% or if commands like \cs{LaTeXe} should be handled manually.
-%
+% or if commands like \cs{LaTeXe} should be handled manually.
+%
% \end{enumerate}
-%
+%
% \subsection{Processor}
-%
+%
% The grabbed math is at first passed to the processor. The processor is not called
-% in a measuring phase (from the amsmath \cs{ifmeasuring@}) and if the \cs{m at th}
-% token is detected.
+% in a measuring phase (from the amsmath \cs{ifmeasuring@}) and if the \cs{m at th}
+% token is detected.
% It is not quite clear what purpose the processor has. As it is a public interface
% it can't be used for internal code. And typesetting happens later and the processor
% can't really change this. Currently it is mostly used for debugging and messages.
% If the \cs{m at th} is found the \cs{l_@@_fakemath_bool} is set, so if the code
% is changed this must be preserved.
-%
+%
% \subsection{Other problems}
-%
-% \begin{enumerate}
-% \item
+%
+% \begin{enumerate}
+% \item
% The presence of \cs{m at th} in association with \cs{ensuremath}
-% does not necessarily indicate fakemath. This is because
-% wanting mathsurround to be zero is very reasonable and common,
+% does not necessarily indicate fakemath. This is because
+% wanting mathsurround to be zero is very reasonable and common,
% \emph{even when the math is genuine} (and hence needs to be collected).
-%
-% TODO: this claim needs some examples.
-%
-% \item User-defined environments can create problems; but this area, of
-% new, copied and changed environments, has not yet been developed.
-%
+%
+% TODO: this claim needs some examples.
+%
+% \item User-defined environments can create problems; but this area, of
+% new, copied and changed environments, has not yet been developed.
+%
% \car*{Joseph wrote, inter alia:\\
% My thinking [regarding] \cs{RegisterMathEnvironment}\\
% - (New) Math environments should not be created-then-patched, but only
-% generated by a [(future)] dedicated command (\cs{DeclareMathEnvironment},
+% generated by a [(future)] dedicated command (\cs{DeclareMathEnvironment},
% presumably)\\
% - Math environments created with \pkg{ltcmd} [commands] should not be copied, . . .\\
% - Package authors should be able to manually set up math environments with a public boolean.}
-% \end{enumerate}
+% \end{enumerate}
%
%
% \subsection{Other ToDos}
%
% \begin{enumerate}
-% \item Add (some of) the math display commands that were \enquote{lifted from
+% \item Add (some of) the math display commands that were \enquote{lifted from
% plain}, e.g., \cs{displaylines} \cs{eqalign}(??).
% \item The breqn packages changes catcodes and that isn't yet covered
% by our mechanism.
% \item \cs{intertext} is not correctly taken into account by the
-% code splitting multiline math into subformulas.
+% code splitting multiline math into subformulas.
% \end{enumerate}
%
%
@@ -494,7 +666,7 @@
% neatly.
% \begin{macrocode}
\AddToHook{begindocument/before}{ \RequirePackage { amsmath } }
-% \end{macrocode}
+% \end{macrocode}
%
%
% \subsection{Data structures}
@@ -502,7 +674,7 @@
% \begin{variable}{\l_@@_collected_bool}
% Tracks whether math mode material has been collected, which happens inside
% \pkg{amsmath} environments as well as those handled directly here.
-% If true following math will not grab and/or process.
+% If true following math will not grab and/or process.
% See \ref{sec:mathcapture} for details.
% \begin{macrocode}
\bool_new:N \l_@@_collected_bool
@@ -511,7 +683,7 @@
%
% \begin{variable}{\l_@@_fakemath_bool}
% Tracks whether math mode material has been identified as fake math during
-% the grabbing phase, which happens currently if the
+% the grabbing phase, which happens currently if the
% grabbed contents contains the \cs{m at th} token.
%
% \begin{macrocode}
@@ -532,12 +704,13 @@
\tl_new:N \g_@@_grabbed_math_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_tmpa_tl,\l_@@_tmpa_skip,\l_@@_tmpa_str}
% Temporary variables
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
\skip_new:N \l_@@_tmpa_skip
+\str_new:N \l_@@_tmpa_str
% \end{macrocode}
% \end{variable}
%
@@ -544,8 +717,8 @@
% \begin{variable}{\l_@@_content_alt_tl,
% \l_@@_content_actual_tl,
% \l_@@_content_AF_tl}
-% Temporary variables to hold math content that should
-% be used in actual or alt text and stored as AF.
+% Temporary variables to hold math content that should
+% be used in actual or alt text and stored as AF.
% \begin{macrocode}
\tl_new:N \l_@@_content_alt_tl
\tl_new:N \l_@@_content_actual_tl
@@ -554,15 +727,15 @@
\tl_new:N \l_@@_content_AF_mathml_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \subsection{Tagging tools}
-% The following commands implement small tagging code chunks.
+% The following commands implement small tagging code chunks.
% This should probably be collected and moved into tagpdf later.
% \begin{macro}{\__tag_tool_close_P:}
% This closes a P/text-chunk, both the MC and the structure and
% increases the counter manually.
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_tool_close_P:
+\cs_new_protected:Npn \__tag_tool_close_P:
{
\tag_if_active:T
{
@@ -574,14 +747,14 @@
}
% \end{macrocode}
% \end{macro}
-%
-% We add also an attribute.
-% \begin{macrocode}
+%
+% We add also an attribute.
+% \begin{macrocode}
\tl_new:N\l_@@_attribute_class_tl
\tagpdfsetup
{role/new-attribute = {inline} {/O /Layout /Placement/Inline},
role/new-attribute = {display} {/O /Layout /Placement/Block},
- }
+ }
% \end{macrocode}
%
% \subsection{Code related to AF}
@@ -592,8 +765,12 @@
% \l__tag_math_mathml_AF_bool,
% \g__tag_math_mathml_AF_bool,
% \l__tag_math_mathml_pane_bool,
-% \l__tag_math_alt_bool
+% \l__tag_math_alt_bool,
+% \g__tag_math_luamml_tl,
% }
+% The variable \cs{g__tag_math_luamml_tl} is initially 0 and
+% the user key can set it to -1 or 1. This allows to distinguish
+% the unset case from a value set by the user.
% \begin{macrocode}
\bool_new:N\l__tag_math_texsource_AF_bool
\bool_new:N\l__tag_math_texsource_pane_bool
@@ -601,9 +778,11 @@
\bool_new:N\g__tag_math_mathml_AF_bool
\bool_new:N\l__tag_math_mathml_pane_bool
\bool_new:N\l__tag_math_alt_bool
+\tl_new:N\g__tag_math_luamml_tl
+\tl_gset:Nn\g__tag_math_luamml_tl {0}
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{
% \g_@@_mathml_total_int,
% \g_@@_mathml_int,
@@ -613,13 +792,13 @@
% }
% \cs{g_@@_mml_total_int} records the mathml fragments read in.
% \cs{g_@@_mml_int} records the mathml fragments read in with a different hash.
-% \cs{g_@@_AF_total_int} records the number of math structures that try to
-% attach a mathml AF.
+% \cs{g_@@_AF_total_int} records the number of math structures that try to
+% attach a mathml AF.
% \cs{g_@@_AF_found_int} records the number of math structures for which a fitting
-% mathml is found.
+% mathml is found.
% \cs{g_@@_AF_attached_int} records the number of math structures which got a mathml fragment
% (if mathml-AF are not disabled locally this should be the equal to the previous number.
-%
+%
% \begin{macrocode}
\int_new:N\g_@@_mathml_total_int
\int_new:N\g_@@_mathml_int
@@ -631,13 +810,15 @@
%
% \begin{variable}{\l__tag_math_mathml_files_clist}
% A sequence to store the file list for the mathml.
+% We also check the luamml file.
% \begin{macrocode}
\clist_new:N\l__tag_math_mathml_files_clist
-\clist_put_right:Ne\l__tag_math_mathml_files_clist {\c_sys_jobname_str-mathml}
+\clist_put_right:Ne\l__tag_math_mathml_files_clist
+ {\c_sys_jobname_str-mathml,\c_sys_jobname_str-luamml-mathml}
% \end{macrocode}
% \end{variable}
-
-% This is the internal variant of the \cs{mml} command.
+%
+% This is the internal variant of the \cs{mml} command.
% \begin{macro}{\@@_AF_mml:nnnn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_AF_mml:nnnn #1 #2 #3 #4
@@ -653,22 +834,22 @@
% \end{macrocode}
% a simple Desc key, take care that it is a valid string!
% \begin{macrocode}
- \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(mathml-#1)}
+ \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(mathml-#1)}
\pdffile_embed_stream:nnN {#4}{mathml-#1.xml}\l_@@_tmpa_tl
% \end{macrocode}
-% not strictly necessary but makes the files visible in the file attachment
-% page
+% not strictly necessary but makes the files visible in the file attachment
+% page
% \begin{macrocode}
\bool_if:NT \l__tag_math_mathml_pane_bool
{\pdfmanagement_add:nne {Catalog/Names}{EmbeddedFiles}{\l_@@_tmpa_tl}}
\tl_new:c{g_@@_mathml_#3_tl}
- \tl_gset_eq:cN{g_@@_mathml_#3_tl}\l_@@_tmpa_tl
+ \tl_gset_eq:cN{g_@@_mathml_#3_tl}\l_@@_tmpa_tl
}
- }
+ }
% \end{macrocode}
% \end{macro}
%
-% The html reader.
+% The html reader.
% \begin{macrocode}
\cs_new_protected:Npn \@@_AF_html_reader:w#1</h2>#2<p>#3</p>#4<p>#5</p>#6<math{
\begingroup
@@ -685,39 +866,382 @@
\@@_AF_mml:nnnn{#1}{#2}{#3}{#4}
}
% \end{macrocode}
+%
+% As with luatex we write two files we define a few constants for
+% the shared texts.
+%
+% \begin{macro}
+% {\c_@@_mathml_write_init_tl,\l_@@_mathml_write_before_tl,
+% \c_@@_mathml_write_after_tl,\c_@@_mathml_write_final_tl}
+% \begin{macrocode}
+\tl_const:Nn \c_@@_mathml_write_init_tl
+ {
+ <!DOCTYPE~html>
+ \iow_newline:
+ <html>
+ \iow_newline:
+ }
+\tl_new:N \l_@@_mathml_write_before_tl
+\tl_const:Nn \c_@@_mathml_write_after_tl
+ {
+ \iow_newline:
+ </div>
+ \iow_newline:
+ }
+\tl_const:Nn \c_@@_mathml_write_final_tl
+ {
+ </html>
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{socketdecl}{tagsupport/math/mathml/write/prepare}
+% To prepare the hash and the starting command we use a socket, so
+% that both the dummy and luamml can make use of it.
+% \begin{macrocode}
+\socket_new:nn {tagsupport/math/mathml/write/prepare}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
+% \begin{plugdecl}{On}
+% \begin{macrocode}
+\socket_new_plug:nnn{tagsupport/math/mathml/write/prepare}{On}
+ {
+ \str_set:NV\l_@@_tmpa_str\l_@@_content_AF_source_tl
+ \str_replace_all:Nnn\l_@@_tmpa_str{&}{&}
+ \str_replace_all:Nnn\l_@@_tmpa_str{<}{<}
+ \tl_set:Nn \l_@@_mathml_write_before_tl
+ {
+ <div>
+ \iow_newline:
+ <h2>\c_backslash_str mml\c_space_tl \int_use:N \g_@@_math_total_int </h2>
+ \iow_newline:
+ <p>\l_@@_tmpa_str</p>
+ \iow_newline:
+ <p>\l_@@_content_hash_tl </p>
+ \iow_newline:
+ }
+ }
+% \end{macrocode}
+% \end{plugdecl}
+%
+% With luatex we automatically generate mathml with \pkg{luamml} if the package
+% can be loaded and \pkg{unicode-math} is detected.
+% We start the process in the begindocument/end hook
+% so that the reading from a previous compilation can happen before!
+%
+% For other engines, for future name changes
+% and in case luamml is not loaded we provide
+% some commands
+% \begin{macrocode}
+\cs_new_protected:Npn\@@_provide_luamml_commands:
+ {
+ \providecommand\luamml_flag_structelem:{}
+ \cs_if_free:NT \luamml_structelem:
+ {
+ \cs_set_eq:NN\luamml_structelem:\luamml_flag_structelem:
+ }
+ \providecommand\luamml_flag_process:{}
+ \cs_if_free:NT \luamml_process:
+ {
+ \cs_set_eq:NN\luamml_process:\luamml_flag_process:
+ }
+ \providecommand\luamml_flag_ignore:{}
+ \cs_if_free:NT \luamml_ignore:
+ {
+ \cs_set_eq:NN\luamml_ignore:\luamml_flag_ignore:
+ }
+ }
+% \end{macrocode}
+% \begin{macrocode}
+\sys_if_engine_luatex:TF
+ {
+% \end{macrocode}
+% Temporary (!) fixes for endarray
+% \begin{macrocode}
+ \cs_new_protected:Npn \@@_correct_luamml_array_patches:
+ {
+ \AddToHook{package/array/after}
+ {
+ \cs_set:Npn \endarray
+ {
+ \tbl_crcr:n{endarray}
+ \__luamml_array_save_array:
+ \egroup
+ \UseTaggingSocket{tbl/finalize}
+ \tbl_restore_outer_cell_data:
+ \egroup
+ \mode_if_math:T { \__luamml_array_finalize_array: }
+ \@arrayright
+ \gdef \@preamble {}
+ }
+ \cs_set:Npn \@classz
+ {
+ \@classx
+ \@tempcnta \count@
+ \prepnext at tok
+ \@addtopreamble {
+ \ifcase \@chnum
+ \hfil
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 0~
+ }
+ \do at row@strut
+ \hfil
+ \or
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 1~
+ }
+ \do at row@strut
+ \hfil
+ \or
+ \hfil
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 2~
+ }
+ \do at row@strut
+ \or
+ \setbox \ar at mcellbox \vbox \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \ar at align@mcell
+ \do at row@strut
+ \or
+ \vtop \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \do at row@strut
+ \or
+ \vbox \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \do at row@strut
+ \fi
+ }
+ \prepnext at tok
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \AddToHook{begindocument/before}
+ {
+ \str_case:on \g_@@_luamml_load_tl
+ {
+ { 1 } {
+ \RequirePackage { luamml }
+ \@@_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \@@_luamml_activate_write:
+ }
+ }
+ {-1 } {
+ \AddToHook{begindocument/end}
+ {
+ \msg_note:nnnn { tag }
+ { luamml-status }{ disabled }{ not~create }
+ }
+ }
+ { 0 }
+ {
+ \@ifpackageloaded { unicode-math }
+ {
+ \RequirePackage { luamml }
+ \@@_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \@@_luamml_activate_write:
+ }
+ }
+ { \msg_warning:nn { tag }{ unicode-math-missing } }
+ }
+ }
+ \@@_provide_luamml_commands:
+ }
+ }
+ {
+ \@@_provide_luamml_commands:
+ }
+\msg_new:nnn { tag }{ luamml-status }
+ {
+ luamml~has~been~#1~and~will~#2~an~MathML~file.
+ }
+
+\msg_new:nnn { tag }{ unicode-math-missing }
+ {
+ The~package~unicode-math~is~missing\\
+ luamml~will~not~create~an~MathML~file.\\
+ To~avoid~this~warning~load~unicode-math~\\
+ or~disable~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=false}}\\
+ or~force~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=true}}
+ }
+\cs_new_protected:Npn \@@_luamml_activate_write:
+ {
+ \bool_if:NT \g_@@_luamml_write_bool
+ {
+% \end{macrocode}
+% to avoid that nothing is written in the first run, we must activate the sockets:
+% \begin{macrocode}
+ \bool_gset_true:N\g__tag_math_mathml_AF_bool
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/substruct/begin}{single}
+ \AssignSocketPlug{tagsupport/math/substruct/end}{single}
+ \int_set:Nn \l__luamml_pretty_int { 7 }
+ \RegisterFamilyMapping\symsymbols{oms}
+ \RegisterFamilyMapping\symletters{oml}
+ \AssignSocketPlug{tagsupport/math/mathml/write/prepare}{On}
+ \iow_new:N \g_@@_luamml_iow
+ \iow_open:Nn \g_@@_luamml_iow {\c_sys_jobname_str-luamml-mathml.html}
+ \iow_now:Ne \g_@@_luamml_iow { \c_@@_mathml_write_init_tl }
+ \cs_new:Npn \@@_luamml_output_hook:n ##1
+ {
+ \tl_if_empty:NF \l_@@_mathml_write_before_tl
+ {
+ \iow_now:Ne \g_@@_luamml_iow
+ {
+ \l_@@_mathml_write_before_tl
+ ##1
+ \c_@@_mathml_write_after_tl
+ }
+ }
+ }
+ \__luamml_register_output_hook:N \@@_luamml_output_hook:n
+% \end{macrocode}
+% At the end of the document we must finish and close the file:
+% \begin{macrocode}
+ \AddToHook{enddocument/afterlastpage}
+ {
+ \iow_now:Ne \g_@@_luamml_iow
+ { \c_@@_mathml_write_final_tl }
+ \iow_close:N \g_@@_luamml_iow
+ }
+ \msg_note:nnnn { tag }
+ { luamml-status }{ enabled }{ create }
+ }
+ }
+% \end{macrocode}
+% And now keys to activate/deactivate luamml feature
+% \begin{variable}{\g_@@_luamml_load_tl}
+% This variable will be used to suppress the loading of luamml
+% altogether.
+% \begin{macrocode}
+\tl_new:N \g_@@_luamml_load_tl
+\tl_gset:Nn \g_@@_luamml_load_tl {0}
+% \end{macrocode}
+% \end{variable}
+% \begin{variable}{\g_@@_luamml_write_bool}
+% This variable decides if luamml writes a mathml
+% altogether.
+% \begin{macrocode}
+\bool_new:N \g_@@_luamml_write_bool
+\bool_gset_true:N \g_@@_luamml_write_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+\msg_new:nnn { tag }{ PDF-2.0-recommended }
+ {
+ The~key~#1~will~not~work~properly~with~PDF~#2.\\
+ Switching~to~PDF~2.0~is~recommended.
+ }
+\keys_define:nn { __tag / setup }
+ {
+% \end{macrocode}
+% At first a key to suppress the loading altogether
+% \begin{macrocode}
+ math/mathml/luamml/load .choice: ,
+ math/mathml/luamml/load/true .code:n = {\tl_gset:Nn \g_@@_luamml_load_tl{1}},
+ math/mathml/luamml/load/false .code:n = {\tl_gset:Nn \g_@@_luamml_load_tl{-1}},
+ math/mathml/luamml/load .default:n = true,
+ math/mathml/luamml/load .usage:n=preamble,
+% \end{macrocode}
+% A key to activate math structure elements. It shouldn't
+% be issued in the preamble as luamml is not yet loaded.
+% \begin{macrocode}
+ math/mathml/structelem .code:n =
+ {
+ \pdf_version_compare:NnT < {2.0}
+ {
+ \msg_warning:nnne { tag }{ PDF-2.0-recommended }
+ { math/mathml/structelem }{ \pdf_version: }
+ }
+ \AddToHook{begindocument/end}{\luamml_structelem:}
+ },
+% \end{macrocode}
+% and a key to call the ignore flag. This should only be used locally.
+% \begin{macrocode}
+ math/mathml/ignore .code:n = {\luamml_ignore:},
+% \end{macrocode}
+% \begin{macrocode}
+ math/mathml/luamml/write .choice:,
+ math/mathml/luamml/write/true .code:n =
+ {
+ \tl_gset:Nn \g_@@_luamml_load_tl{1}
+ \bool_gset_true:N \g_@@_luamml_write_bool
+ },
+ math/mathml/luamml/write/false .code:n =
+ {
+ \bool_gset_false:N \g_@@_luamml_write_bool
+ },
+ math/mathml/luamml/write .default:n = true,
+ math/mathml/luamml/write .usage:n=preamble,
+% \end{macrocode}
+% alias keys for compatibility
+% \begin{macrocode}
+ math/mathml/luamml .bool_gset:N = \g_@@_luamml_write_bool,
+ math/mathml/luamml .usage:n=preamble
+ }
+% \end{macrocode}
% \begin{socketdecl}{tagsupport/math/mathml/write}
% This writes a html-dummy with the hash and the math content.
% This should be optional, so it uses a socket that can be disabled
-%
+%
% \begin{macrocode}
\socket_new:nn {tagsupport/math/mathml/write}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% \begin{plugdecl}{On}
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/math/mathml/write}{On}
{
- \str_set:NV\l_@@_tmpa_str\l_@@_content_AF_source_tl
- \str_replace_all:Nnn\l_@@_tmpa_str{&}{&}
- \str_replace_all:Nnn\l_@@_tmpa_str{<}{<}
- \iow_now:Ne \g_@@_writedummy_iow
+ \iow_now:Ne \g_@@_writedummy_iow
{
- \iow_newline:
- <div>
- \iow_newline:
- <h2>\c_backslash_str mml\c_space_tl \int_use:N \g_@@_math_total_int </h2>
- \iow_newline:
- <p>\l_@@_tmpa_str</p>
- \iow_newline:
- <p>\l_@@_content_hash_tl </p>
- \iow_newline:
+ \l_@@_mathml_write_before_tl
<math></math>
- \iow_newline:
- </div>
- \iow_newline:
+ \c_@@_mathml_write_after_tl
}
}
% \end{macrocode}
@@ -727,32 +1251,32 @@
\keys_define:nn { __tag / setup }
{
- math/mathml/write-dummy .code:n =
+ math/mathml/write-dummy .code:n =
{
\bool_gset_true:N \g__tag_math_mathml_AF_bool
- \tl_if_exist:NF\g_@@_writedummy_iow
+ \tl_if_exist:NF\g_@@_writedummy_iow
{
\iow_new:N \g_@@_writedummy_iow
- \iow_open:Nn \g_@@_writedummy_iow
- {
+ \iow_open:Nn \g_@@_writedummy_iow
+ {
\c_sys_jobname_str-mathml-dummy.html
}
\iow_now:Ne \g_@@_writedummy_iow
{
- <!DOCTYPE~html>
- \iow_newline:
- <html>
+ \c_@@_mathml_write_init_tl
}
+ \AssignSocketPlug {tagsupport/math/mathml/write/prepare}{On}
\AssignSocketPlug {tagsupport/math/mathml/write}{On}
\AddToHook{enddocument/afterlastpage}
{
- \iow_now:Nn \g_@@_writedummy_iow {</html>}
+ \iow_now:Ne \g_@@_writedummy_iow
+ { \c_@@_mathml_write_final_tl }
\iow_close:N \g_@@_writedummy_iow
}
- }
+ }
},
- math/mathml/write-dummy .usage:n=preamble
- }
+ math/mathml/write-dummy .usage:n=preamble
+ }
% \end{macrocode}
%
% \begin{macro}{\@@_AF_process_mathml_files:}
@@ -763,9 +1287,9 @@
\hbox_set:Nn \l_@@_tmpa_box
{
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Supplement }
- \pdfdict_put:nne
- { l_pdffile }{Subtype}
- { \pdf_name_from_unicode_e:n{application/mathml+xml} }
+ \pdfdict_put:nne
+ { l_pdffile }{Subtype}
+ { \pdf_name_from_unicode_e:n{application/mathml+xml} }
\char_set_catcode_other:N \#
\cs_set_eq:NN\mml \@@_AF_html_reader:w
\clist_map_inline:Nn \l__tag_math_mathml_files_clist
@@ -779,13 +1303,13 @@
{
\typeout{Info:~mathml~file~##1~does~not~exist}%info message
}
- }
+ }
}
\bool_if:NT\g__tag_math_mathml_AF_bool
{
\typeout{Info:~Activating~mathml~support}
- \AssignSocketPlug{tagsupport/math/struct/begin}{test-mathml}
- \AssignSocketPlug{tagsupport/math/struct/end}{test-mathml}
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
% \end{macrocode}
% mathml handling doesn't like subparts, so we disable them for now:
% \begin{macrocode}
@@ -795,29 +1319,29 @@
{
\iow_term:n{MathML~statistic}
\iow_term:n{================}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_total_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_total_int\c_space_tl
MathML~fragments~read}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_int\c_space_tl
different~MathML~fragments}
- \iow_term:e{==>~\int_use:N\g_@@_math_total_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_math_total_int\c_space_tl
math~fragments~found}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_found_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_found_int\c_space_tl
fitting~MathML~AF~found}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_attached_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_attached_int\c_space_tl
MathML~AF~attached}
}
- }
+ }
}
-\AddToHook{begindocument}{\@@_AF_process_mathml_files:}
+\AddToHook{begindocument}{\@@_AF_process_mathml_files:}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Mathstyle detection}
% In some cases we need to detect the mathstyle used in a \cs{mathchoice}
-% command and to disable/enable tagging in the unused branches.
+% command and to disable/enable tagging in the unused branches.
% This is currently only used in the amstext command \cs{text}
% but is perhaps also needed in other cases, so we create a general command.
-%
+%
%\begin{macro}{\l_@@_mathstyle_int,\g_@@_mathchoice_int,mathstyle}
% \begin{macrocode}
\int_new:N \l_@@_mathstyle_int
@@ -828,12 +1352,12 @@
% For now internal, but perhaps will need a public version.
% The command should be used in every branch of a \cs{mathchoice}
% (with the correct mathstyle number) and with an unique label (which should
-% be the same in every branch).
-% \cs{g_@@_mathchoice_int} can be e.g. increased before the mathchoice and
+% be the same in every branch).
+% \cs{g_@@_mathchoice_int} can be, e.g., increased before the mathchoice and
% then used.
% \begin{macro}{\@@_tag_if_mathstyle:nn}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tag_if_mathstyle:nn #1 #2
+\cs_new_protected:Npn \@@_tag_if_mathstyle:nn #1 #2
%#1 refers to label
%#2 is a number for the mathstyle (typically 0,2,4,6)
{
@@ -840,31 +1364,52 @@
\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}
+\cs_generate_variant:Nn \@@_tag_if_mathstyle:nn {en}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Tagging options}
% \begin{macrocode}
\keys_define:nn { __tag / setup }
{
math/mathml/sources .clist_set:N = \l__tag_math_mathml_files_clist,
- math/alt/use .bool_set:N = \l__tag_math_alt_bool,
+ math/alt/use .bool_set:N = \l__tag_math_alt_bool,
viewer/pane/mathml .bool_set:N = \l__tag_math_mathml_pane_bool,
viewer/pane/mathml .initial:n = true,
- viewer/pane/mathsource .bool_set:N = \l__tag_math_texsource_pane_bool,
+ viewer/pane/mathsource .bool_set:N = \l__tag_math_texsource_pane_bool,
math/mathml/AF .bool_set:N = \l__tag_math_mathml_AF_bool,
math/mathml/AF .initial:n = true,
math/tex/AF .bool_set:N = \l__tag_math_texsource_AF_bool,
math/tex/AF .initial:n = true
- }
+ }
% \end{macrocode}
+% alt is required for pdf/UA-1.
+% TODO: l3pdfmeta should support this test.
+% \begin{macrocode}
+\AddToHook{begindocument/end}
+ {
+ \str_if_eq:eeT
+ {1}
+ {
+ \exp_last_unbraced:Ne\use_i:nn
+ {\GetDocumentProperties{document/pdfstandard-UA}}
+ \c_empty_tl\c_empty_tl
+ }
+ {
+ \bool_if:NF \l__tag_math_alt_bool
+ {
+ \typeout{PDF/UA-1~detected.~Enabling~alt~text~on~Formula}
+ }
+ \bool_set_true:N\l__tag_math_alt_bool
+ }
+ }
+% \end{macrocode}
%
% \subsection{Sockets}
% \subsubsection{Main inline math sockets}
-%
+%
% \begin{socketdecl}
% {
% tagsupport/math/inline/begin,
@@ -873,11 +1418,11 @@
% tagsupport/math/inline/formula/end,
% }
% The first two sockets are meant to embed inline
-% math into the surrounding (so to close/reopen e.g. MC-chunks).
-% The other two implement the actual formula structure.
+% math into the surrounding (so to close/reopen, e.g., MC-chunks).
+% 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 begin socket is issued after the math has started, while
+% the end socket is after the math!
% \begin{macrocode}
\socket_new:nn {tagsupport/math/inline/begin}{0}
\socket_new:nn {tagsupport/math/inline/end}{0}
@@ -885,8 +1430,8 @@
\socket_new:nn {tagsupport/math/inline/formula/end}{0}
% \end{macrocode}
%\end{socketdecl}
-%
-%
+%
+%
% \begin{plugdecl}{MC}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -896,39 +1441,42 @@
\socket_new_plug:nnn
{tagsupport/math/inline/end}
{MC}
- {\tag_mc_begin_pop:n{}}
+ {\tag_mc_begin_pop:n{}}
% \end{macrocode}
% \end{plugdecl}
-%
-% We probably will want to test different tagging receipes.
+%
+% We probably will want to test different tagging recipes.
% \begin{plugdecl}{default}
% \begin{macrocode}
\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}
{default}
- {
+ {
\socket_use:n{tagsupport/math/substruct/end}
\socket_use:n{tagsupport/math/struct/end}
- }
+ }
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \subsubsection{Main display math sockets}
-%
+%
% \begin{socketdecl}
% {
% tagsupport/math/display/begin,
@@ -937,12 +1485,15 @@
% tagsupport/math/display/formula/end,
% }
% The first two sockets are meant to embed display
-% math into the surrounding (so to close/reopen e.g. MC-chunks and
+% math into the surrounding (so to close/reopen, e.g., MC-chunks and
% P-structure).
-% The other two implement the actual formula structure.
+% 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 begin socket is issued after the math has started, while
+% 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}
@@ -961,7 +1512,7 @@
{tagsupport/math/display/end}
{default}
{
- }
+ }
% \end{macrocode}
% \end{plugdecl}
@@ -971,25 +1522,25 @@
\socket_new_plug:nnn
{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}
- #1
- \socket_use:n{tagsupport/math/end}
+ {
+ \tag_socket_use:n{math/content}
+ \tag_socket_use:n{math/struct/begin}
+ \tag_socket_use:n{math/substruct/begin}
+ #1
+ \tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
{tagsupport/math/display/formula/end}
{default}
- {
+ {
\socket_use:n{tagsupport/math/substruct/end}
\socket_use:n{tagsupport/math/struct/end}
- }
+ }
% \end{macrocode}
% \end{plugdecl}
%
% \subsubsection{Internal sockets}
-%
+%
% \begin{variable}{\l_@@_content_template_tl}
% The default text used as alt or actual text.
% \begin{macrocode}
@@ -1003,7 +1554,7 @@
\c_space_tl
\exp_not:N\end{\g_@@_grabbed_env_tl}
\c_space_tl LaTeX~ formula~ ends~
- }
+ }
% \end{macrocode}
% \end{variable}
@@ -1013,7 +1564,7 @@
\tl_new:N\l_@@_texsource_template_tl
\tl_const:Nn\c_@@_inline_env_tl {math}
\tl_set:Nn \l_@@_texsource_template_tl
- {
+ {
\tl_if_eq:NNTF\g_@@_grabbed_env_tl\c_@@_inline_env_tl
{
$
@@ -1024,29 +1575,29 @@
\exp_not:N\begin{\g_@@_grabbed_env_tl}
\exp_not:V\g_@@_grabbed_math_tl
\exp_not:N\end{\g_@@_grabbed_env_tl}
- }
- }
+ }
+ }
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{socketdecl}{tagsupport/math/content}
-% The math content is stored in associated files and used for
+% The math content is stored in associated files and used for
% actual and alternative text. As the exact text is still
% unclear we use a socket to be able to test variants.
% The socket should set all four tl vars above, if needed
-% to identical values. It can use the two variables
+% to identical values. It can use the two variables
% \cs{g_@@_grabbed_env_tl} and \cs{g_@@_grabbed_math_tl}
% \begin{macrocode}
\socket_new:nn {tagsupport/math/content}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% Some default sockets to set the contents.
-% TODO: think about naming convention.
+% TODO: think about naming convention.
% TODO: think how this should organized so that one
% has options to change from the outside and so that
-% there are less repetitions.
+% there are less repetitions.
% \begin{plugdecl}{actual+source}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1056,17 +1607,17 @@
\tl_set:Ne\l_@@_content_actual_tl
{
\l_@@_content_template_tl
- }
- \tl_set:Ne \l_@@_content_AF_source_tl
+ }
+ \tl_set:Ne \l_@@_content_AF_source_tl
{
\l_@@_texsource_template_tl
- }
+ }
\tl_set:Nn \l_@@_content_AF_mathml_tl {}
\tl_set:Nn \l_@@_content_alt_tl {}
}
% \end{macrocode}
-% \end{plugdecl}
-%
+% \end{plugdecl}
+%
% \begin{plugdecl}{alt+source}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1076,11 +1627,11 @@
\tl_set:Ne\l_@@_content_alt_tl
{
\l_@@_content_template_tl
- }
- \tl_set:Ne \l_@@_content_AF_source_tl
+ }
+ \tl_set:Ne \l_@@_content_AF_source_tl
{
\l_@@_texsource_template_tl
- }
+ }
\tl_set:Nn \l_@@_content_AF_mathml_tl {}
\tl_set:Nn \l_@@_content_actual_tl {}
}
@@ -1087,15 +1638,15 @@
% \end{macrocode}
% \end{plugdecl}
% \begin{macrocode}
-\socket_assign_plug:nn {tagsupport/math/content}{alt+source}
+\socket_assign_plug:nn {tagsupport/math/content}{alt+source}
% \end{macrocode}
%
% \begin{socketdecl}{tagsupport/math/struct/begin,
% tagsupport/math/struct/end}
-% For the main structure we use a socket too.
-% This allow e.g. to create a special one for luamml
-% which setups additional objects.
-% The begin socket can use the two variables
+% For the main structure we use a socket too.
+% This allows, e.g., to create a special one for luamml
+% which setups additional objects.
+% The begin socket can use the two variables
% \cs{g_@@_grabbed_env_tl} and \cs{g_@@_grabbed_math_tl}
% \begin{macrocode}
\socket_new:nn {tagsupport/math/struct/begin}{0}
@@ -1110,12 +1661,22 @@
{tagsupport/math/struct/begin}
{default}
{
- \bool_if:NTF\l__tag_math_texsource_AF_bool
+ \bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
{ \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
+ \tl_if_eq:NnTF\g_@@_grabbed_env_tl {math}
+ {
+ \tl_set:Nn\l_@@_attribute_class_tl{inline}
+ }
+ {
+ \tl_set:Nn\l_@@_attribute_class_tl{display}
+ }
+ \bool_if:NF\l__tag_math_alt_bool
+ { \tl_set:Nn \l_@@_content_alt_tl{} }
\tag_struct_begin:n
{
tag=Formula,
+ attribute-class=\l_@@_attribute_class_tl,
texsource = \l_@@_content_AF_source_tmpa_tl,
title-o = \g_@@_grabbed_env_tl,
actualtext = \l_@@_content_actual_tl,
@@ -1126,19 +1687,18 @@
{tagsupport/math/struct/end}
{default}
{ \tag_struct_end: }
-
-\socket_assign_plug:nn {tagsupport/math/struct/begin}{default}
-\socket_assign_plug:nn {tagsupport/math/struct/end}{default}
-% \end{macrocode}
-% \end{plugdecl}
-%
-% \begin{plugdecl}{test-mathml}
-% This (test-)socket tries to add a mathml-AF to formula.
-% It is activated if a mathml.html has been found and loaded.
-% Additionally it also sets an attribute
-% (this can perhaps be done by default anyway.)
-% As it disturbs the reading of the AF it currently deactivates the /Alt key,
-% unless it has been reenabled with |math/alt/use=true|
+
+\socket_assign_plug:nn {tagsupport/math/struct/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/struct/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{mathml-AF}
+% This socket tries to add a mathml-AF to formula.
+% It is activated if a mathml.html has been found and loaded.
+% As it disturbs the reading of the AF
+% it currently deactivates the /Alt key,
+% unless it has been reenabled with |math/alt/use=true|
% \begin{macrocode}
\cs_generate_variant:Nn \str_mdfive_hash:n {o}
\tl_new:N\l_@@_content_hash_tl
@@ -1151,48 +1711,52 @@
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/struct/begin}
- {test-mathml}
- {
- \int_gincr:N\g_@@_math_total_int
- \tl_set:Ne\l_@@_content_hash_tl
- {\str_mdfive_hash:o { \l_@@_content_AF_source_tl }}
- \tl_set_eq:NN\l_@@_grabbed_math_tl\g_@@_grabbed_math_tl
+ {mathml-AF}
+ {
+ \int_gincr:N\g_@@_math_total_int
+ \tl_set:Ne\l_@@_content_hash_tl
+ {\str_mdfive_hash:o { \l_@@_content_AF_source_tl }}
+ \tl_set_eq:NN\l_@@_grabbed_math_tl\g_@@_grabbed_math_tl
\tl_if_eq:NnTF\g_@@_grabbed_env_tl {math}
{
- \tl_set:Nn\l_@@_attribute_class_tl{inline}
+ \tl_set:Nn\l_@@_attribute_class_tl{inline}
}
{
\tl_set:Nn\l_@@_attribute_class_tl{display}
}
\bool_if:NF\l__tag_math_alt_bool
- { \tl_set:Nn \l_@@_content_alt_tl{} }
+ { \tl_set:Nn \l_@@_content_alt_tl{} }
% \end{macrocode}
% debugging option. TODO: hide in debug key.
% \begin{macrocode}
\tl_if_exist:cTF { g_@@_mathml_ \l_@@_content_hash_tl _tl }
- {
- \int_gincr:N\g_@@_mathml_AF_found_int
- \bool_if:NTF \l__tag_math_mathml_AF_bool
- {
- \int_gincr:N\g_@@_mathml_AF_attached_int
- \typeout {Inserting~mathml~with~Hash~\l_@@_content_hash_tl}
- }
- {
- \typeout {Ignoring~mathml~with~Hash~\l_@@_content_hash_tl}
- }
- }
- {
- \typeout{WARNING:~mathml~missing~for~hash~\l_@@_content_hash_tl}
- }
- \socket_use:n {tagsupport/math/mathml/write} % write hash if request
- \bool_if:NTF\l__tag_math_texsource_AF_bool
+ {
+ \int_gincr:N\g_@@_mathml_AF_found_int
+ \bool_if:NTF \l__tag_math_mathml_AF_bool
+ {
+ \int_gincr:N\g_@@_mathml_AF_attached_int
+ \typeout {Inserting~mathml~with~Hash~\l_@@_content_hash_tl}
+ }
+ {
+ \typeout {Ignoring~mathml~with~Hash~\l_@@_content_hash_tl}
+ }
+ }
+ {
+ \bool_if:NT \l__tag_math_mathml_AF_bool
+ {
+ \typeout {WARNING:~mathml~missing~for~hash~\l_@@_content_hash_tl}
+ }
+ }
+ \socket_use:n {tagsupport/math/mathml/write/prepare}
+ \socket_use:n {tagsupport/math/mathml/write} % write hash if request
+ \bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
- { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
+ { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
\tag_struct_begin:n
{
tag=Formula,
attribute-class=\l_@@_attribute_class_tl, %
- AFref =
+ AFref =
\bool_if:NT\l__tag_math_mathml_AF_bool
{
\cs_if_exist_use:c {g_@@_mathml_ \l_@@_content_hash_tl _tl}
@@ -1207,13 +1771,13 @@
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/struct/end}
- {test-mathml}
+ {mathml-AF}
{
\tag_struct_end:
- }
+ }
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \begin{socketdecl}{tagsupport/math/substruct/begin,
% tagsupport/math/substruct/end}
% This holds the code to handle subparts of the formula.
@@ -1222,7 +1786,7 @@
\socket_new:nn {tagsupport/math/substruct/end}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% \begin{plugdecl}{default}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1232,16 +1796,16 @@
\socket_new_plug:nnn
{tagsupport/math/substruct/end}
{default}
- {
+ {
\tagmcend
\if at subformulas
\tagstructend
\fi
- }
-\socket_assign_plug:nn {tagsupport/math/substruct/begin}{default}
-\socket_assign_plug:nn {tagsupport/math/substruct/end}{default}
-% \end{macrocode}
-% \end{plugdecl}
+ }
+\socket_assign_plug:nn {tagsupport/math/substruct/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/substruct/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
% \begin{plugdecl}{single}
% We need an option to disable subparts as it is unclear
@@ -1253,7 +1817,7 @@
{
\typeout{====>subpart~splitting~deactivated}
\typeout{====>grabbed~math=\meaning\g_@@_grabbed_math_tl}
- \tag_mc_begin:n{}
+ \tag_mc_begin:n{}
}
\socket_new_plug:nnn
{tagsupport/math/substruct/end}
@@ -1261,21 +1825,21 @@
{ \tag_mc_end:}
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \begin{socketdecl}{tagsupport/math/end}
% A socket used at the end of the math (before the closing dollar(s))
-% which can e.g. set a flag for luamml.
+% which can, e.g., set a flag for luamml.
% \begin{macrocode}
\socket_new:nn {tagsupport/math/end}{0}
% \end{macrocode}
% \end{socketdecl}
-
-%
+
+%
% \begin{macro}{\__tag_math_disable:}
% Similar to the table code we collect the plugs that should be
% assigned to do nothing if we don't want tagging
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_math_disable:
+\cs_new_protected:Npn \__tag_math_disable:
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{noop}
\socket_assign_plug:nn {tagsupport/math/inline/end}{noop}
@@ -1284,16 +1848,16 @@
\socket_assign_plug:nn {tagsupport/math/display/begin}{noop}
\socket_assign_plug:nn {tagsupport/math/display/end}{noop}
\socket_assign_plug:nn {tagsupport/math/display/formula/begin}{identity}
- \socket_assign_plug:nn {tagsupport/math/display/formula/end}{noop}
- }
+ \socket_assign_plug:nn {tagsupport/math/display/formula/end}{noop}
+ }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\__tag_math_enable:}
% Similar to the table code we collect the default plugs that should be
% assigned if we want tagging
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_math_enable:
+\cs_new_protected:Npn \__tag_math_enable:
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{MC}
\socket_assign_plug:nn {tagsupport/math/inline/end}{MC}
@@ -1303,7 +1867,7 @@
\socket_assign_plug:nn {tagsupport/math/display/end}{default}
\socket_assign_plug:nn {tagsupport/math/display/formula/begin}{default}
\socket_assign_plug:nn {tagsupport/math/display/formula/end}{default}
- }
+ }
% \end{macrocode}
% \end{macro}
% At begin document we can activate:
@@ -1349,49 +1913,65 @@
% \subsection{Content grabbing}
%
% \begin{macro}{\@@_grab_dollar:w}
-% Grab up to a single |$|, for inline math mode, suppressing
-% any processing if the token is \tn{m at th} found in the content.
-%
-% \fmi{what's that test doing?}
-%
-% \car{It is some kind of fix, to avoid the remote
-% possibility that the math is empty, making the code
-% produce an unwanted \texttt{\$\$}.}
-%
-%\car{cf.~the code for this in \cs{@ensuredmath}}
-%
-%\car{It is harmless but unnecessary in the dollardollar grabbing below.}
-%
+% \begin{macro}{\@@_grab_dollar:n}
+% \changes{v0.6c}{2024-08-22}{Correct handling of empty math segments}
+% Top-level function to handle grabbing of inline math mode delimited by
+% |$| tokens. We provide two different ways to do that: a token-by-token
+% one that can be used everywhere, and a fast delimited one that does not
+% work anywhere that the end |$| token may be hidden, most obviously in
+% tabulars. The function here is therefore set up as a variable starting
+% point.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_dollar:w % $
- #1 $
+\cs_new_protected:Npn \@@_grab_dollar:w { \@@_grab_dollar_delim:w }
+% \end{macrocode}
+% After grabbing inline math material, there is again common processing
+% independent of mechanism of collection.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar:n #1
{
% \end{macrocode}
-% \fmi{what's that test doing?}
+% We need to do processing first as this picks up \enquote{fake} math mode:
+% that information is needed below.
% \begin{macrocode}
- \tl_if_blank:nF {#1}
- {
- \@@_process:nn { math } {#1} % $
+ \@@_process:nn { math } {#1}
% \end{macrocode}
% We do not want math tagging in fakemath or when measuring,
% We also do not want math tagging if tagging has been suspended.
% \begin{macrocode}
- \bool_lazy_or:nnTF
- {\legacy_if_p:n { measuring@ }}
- { \l_@@_fakemath_bool }
- { #1 $ }
+ \bool_lazy_any:nTF
{
- \tag_socket_use:n {math/inline/begin} %end P-MC
- \tag_socket_use:nn {math/inline/formula/begin}{#1}
- $
+ {\legacy_if_p:n { measuring@ }}
+ { \l_@@_fakemath_bool }
+ { \tl_if_blank_p:n {#1} }
+ }
+ {
+ #1 $ % $
+ }
+ {
+ \tag_socket_use:n {math/inline/begin} %end P-MC
+% \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
- }
- }
+ }
}
% \end{macrocode}
% \end{macro}
-%
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_dollar_delim:w}
+% Grab up to a single |$|, for inline math mode, suppressing
+% any processing if the token is \tn{m at th} found in the content.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar_delim:w #1 $ % $
+ { \@@_grab_dollar:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_grab_dollardollar:w}
% And for the classical \TeX{} display structure.
% \begin{macrocode}
@@ -1401,17 +1981,17 @@
\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}
- $$
}
+ $$
}
% \end{macrocode}
-%
+%
% The end code is added through a \cs{aftergroup} so we
% store it inside a command.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tag_dollardollar_display_end:
+\cs_new_protected:Npn \@@_tag_dollardollar_display_end:
{
% \typeout{== tag dollarldollar display end}
% \ShowTagging{struct-stack}
@@ -1420,15 +2000,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
}
@@ -1463,6 +2058,164 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Token-by-token inline grabbing}
+%
+% Grabbing inline math token-by-token is more involved. The mechanism here
+% is essentially a simplified version of that originally seen in
+% \pkg{collcell} and refined in \pkg{siunitx}. We make use of the fact that
+% in math mode spaces are ignored, so we have to deal with only \texttt{N}-type
+% tokens and groups. Furthermore, there is no need to look inside groups, so
+% the only special cases are a small selection of \texttt{N}-type tokens.
+%
+% \begin{variable}{\l_@@_grabbed_tl}
+% For collection of the material piecewise.
+% \begin{macrocode}
+\tl_new:N \l_@@_grabbed_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_grab_env_int}
+% Needed to count up the number of nested environments encountered.
+% \begin{macrocode}
+\int_new:N \l_@@_grab_env_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_grab_dollar_loop:}
+% \begin{macro}{\@@_grab_loop:}
+% The lead-off here establishes a group: we need that as we will have to
+% be careful in the way \tn{cr} is handled and ensure this is only
+% manipulated whilst grabbing. The main loop is then started.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar_loop:
+ {
+ \group_begin:
+ \tl_clear:N \l_@@_grabbed_tl
+ \@@_grab_loop:
+ }
+\cs_new_protected:Npn \@@_grab_loop:
+ {
+ \peek_remove_spaces:n
+ {
+ \peek_meaning:NTF \c_group_begin_token
+ { \@@_grab_loop_group:n }
+ { \@@_grab_loop_token:N }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_group:n}
+% \begin{macro}{\@@_grab_loop_store:n}
+% Handling of grabbed groups is pretty easy.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_group:n #1
+ { \@@_grab_loop_store:n { {#1} } }
+\cs_new_protected:Npn \@@_grab_loop_store:n #1
+ {
+ \tl_put_right:Nn \l_@@_grabbed_tl {#1}
+ \@@_grab_loop:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_token:N}
+% \begin{macro}
+% {
+% \@@_grab_loop_$: ,
+% \@@_grab_loop_\\: ,
+% \@@_grab_loop_\begin: ,
+% \@@_grab_loop_\end: ,
+% \@@_grab_loop_\ignorespaces: ,
+% \@@_grab_loop_\unskip: ,
+% \@@_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}).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_token:N #1
+ {
+ \cs_if_exist_use:cF
+ { @@_grab_loop_ \token_to_str:N #1 : }
+ { \@@_grab_loop_store:n {#1} }
+ }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N $ : }
+ { \@@_grab_loop_end: }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \\ : }
+ {
+ \int_compare:nNnTF \l_@@_grab_env_int = 0
+ { \@@_grab_loop_newline: }
+ { \@@_grab_loop_store:n { \\ } }
+ }
+% \end{macrocode}
+% In contrast to \pkg{collcell}, nesting is tracked by counting
+% \cs{begin}/\cs{end} pairs: this is needed in case there is a tabular-like
+% construct containing |\\| inside a cell. As a result, the end-of-tabular
+% can be detected without checking the name argument: if \cs{end} is
+% encountered at nesting level~0, we've hit the end of a cell. In that case,
+% end the row and leave the environment to clean up.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \begin : }
+ {
+ \int_incr:N \l_@@_grab_env_int
+ \@@_grab_loop_store:n { \begin }
+ }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \end : }
+ {
+ \int_compare:nNnTF \l_@@_grab_env_int = 0
+ {
+ \@@_grab_loop_newline:
+ \end
+ }
+ {
+ \int_decr:N \l_@@_grab_env_int
+ \@@_grab_loop_store:n { \end }
+ }
+ }
+\tl_map_inline:nn { \ignorespaces \unskip \textonly at unskip }
+ {
+ \cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N #1 : }
+ { \@@_grab_loop: }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_newline:}
+% To allow collection of tokens in the part of the \tn{halign} template after
+% |#|, we need \TeX{} to see the primitive with the loop token in the right
+% place. That is done by re-defining \tn{cr} at present. Ideally there would
+% be a socket in the definition of \texttt{tabular}, etc., to handle this:
+% there is also the need to examine in interaction with \pkg{longtable}, which
+% also redefines \tn{cr}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_newline:
+ {
+ \if_false: { \fi:
+ \cs_set_protected:Npn \cr
+ {
+ \@@_grab_loop:
+ \tex_cr:D
+ }
+ \if_false: } \fi:
+ \\
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_end:}
+% Clean up and pass on.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_end:
+ {
+ \exp_args:NNV \group_end:
+ \@@_grab_dollar:n \l_@@_grabbed_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Marking math environments}
%
% A general mechanism for math mode environments that do not grab their
@@ -1644,7 +2397,7 @@
}
{
% \typeout{==>A3}
- \__tag_tool_close_P:
+ \__tag_tool_close_P:
}
\socket_use:nn{tagsupport/math/display/formula/begin}{}
\tagpdfparaOff
@@ -1662,7 +2415,7 @@
\cs_new_protected:Npn \math_register_env:n #1
{ \math_register_env:nn {#1} { } }
-
+
\NewDocumentCommand \RegisterMathEnvironment { O{} m }
{ \math_register_env:nn {#2} {#1} }
% \end{macrocode}
@@ -1749,7 +2502,7 @@
{
\cs_gset_protected:Npn \[ % \]
{
- \@@_grab_eqn:w
+ \@@_grab_eqn:w
% \bool_if:NTF \l_@@_collected_bool
% { \begin { equation* } }
% { \@@_grab_eqn:w }
@@ -1847,7 +2600,7 @@
% \end{macrocode}
%
% Tabulars currently contain a \$ that shouldn't trigger math
-% tagging.
+% tagging.
% \begin{macrocode}
\RequirePackage{array}
\tl_if_in:NnT\@tabular{$}
@@ -1856,11 +2609,15 @@
\leavevmode
\UseTaggingSocket{tbl/hmode/begin}%
\hbox \bgroup
- \bool_set_true:N \l_@@_collected_bool
+ \bool_set_true:N \l_@@_collected_bool
$
\bool_set_false:N \l_@@_collected_bool
\col at sep\tabcolsep \let\d at llarbegin\begingroup
\let\d at llarend\endgroup
+% \end{macrocode}
+% A proper switching mechanism is needed: for the present, do directly.
+% \begin{macrocode}
+ \cs_set_protected:Npn \@@_grab_dollar:w { \@@_grab_dollar_loop: }
\@tabarray}
}
% \end{macrocode}
@@ -1877,10 +2634,10 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Disable math grabbing in the begindocument hook}
% For example amsart uses math to measure text there.
-%
+%
% \begin{macrocode}
\tl_gput_right:Nn\@kernel at before@begindocument
{
@@ -1996,7 +2753,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}
@@ -2004,7 +2761,7 @@
\math_register_halign_env:nn {align}{}
\math_register_halign_env:nn {align*}{}
\math_register_halign_env:nn {alignat}{}
- \math_register_halign_env:nn {alignat*}{}
+ \math_register_halign_env:nn {alignat*}{}
\math_register_halign_env:nn {flalign}{}
\math_register_halign_env:nn {flalign*}{}
\math_register_halign_env:nn {gather}{}
@@ -2085,8 +2842,8 @@
%
% \begin{macro}{\@@_split_at_nl:NN}
-% This splits grabbed math at newlines.
-%
+% This splits grabbed math at newlines.
+%
% \begin{macrocode}
\cs_new:Npn \@@_split_at_nl:NN #1#2 {
\tl_set:Nf \l_@@_tmpa_tl {
@@ -2105,7 +2862,7 @@
#2 \\ #3 \s_stop
}
}
-
+
\cs_new_protected:Npn \@@_split_at_nl_aux:nnNN #1 #2 #3 #4
{
\tl_gset:Nn #4 {#1}
@@ -2112,7 +2869,7 @@
\tl_gset:Nn #3 {#2}
}
-\cs_new:Npn \@@_split_chk_if_begin:ww
+\cs_new:Npn \@@_split_chk_if_begin:ww
#1 \begin #2 #3 \s_mark #4 \\ \q_nil \\ \s_stop
{
\quark_if_nil:nTF {#2}
@@ -2163,11 +2920,11 @@
{ \exp_end: { #4 #1 } }
{ \@@_split_final_cleanup:w #3 \s_mark { #4 #1 #2 } }
}
-
+
\cs_new:Npn \@@_split:n #1 {
\@@_split_at_nl_first:w #1 \\ \q_nil \\ \s_stop }
-
-% this looks unused.
+
+% this looks unused.
%\NewDocumentCommand \splitnl { mm +m }
% {
% \tl_set:Nf \l_@@_tmpa_tl { \split:n {#3} }
@@ -2179,12 +2936,12 @@
%
%
% \begin{macro}{\maybestartnewformulatag}
-%
+%
% \begin{macrocode}
\newif\if at subformulas
-\tl_new:N \result
-
+\tl_new:N \result
+
\cs_new_protected:Npn\grabaformulapartandstart {
\@@_split_at_nl:NN \g_@@_grabbed_math_tl \result
\typeout{====>first-result=\meaning\result}
@@ -2204,7 +2961,7 @@
% but we add a short text to satisfy the pdf/ua-2 validator
% \begin{macrocode}
% alt=\result,
- alt = subformula,
+ alt = subformula,
title-o=\resulttitle
}
}
@@ -2242,7 +2999,7 @@
%
\tl_if_empty:NF \g_@@_grabbed_math_tl
{
- \tagmcend
+ \tagmcend
\tagstructend
\grabaformulapartandmayberestart
}
@@ -2258,17 +3015,17 @@
% \typeout{===>~ in~ hook}
% \math_register_halign_env:nn {dmath}{}
% \math_register_halign_env:nn {dgroup*}{}
-%}
+%}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\ExplSyntaxOff
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
@@ -2275,4 +3032,4 @@
%
% \Finale
%
-%
+%
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-mathtools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-mathtools.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-mathtools.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -18,12 +18,14 @@
%
% 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
\CodelineIndex
\begin{document}
- \DocInput{latex-lab-amsmath.dtx}
+ \DocInput{latex-lab-mathtools.dtx}
\end{document}
%</driver>
%
@@ -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}}
@@ -66,7 +68,7 @@
% \subsection{File declaration}
% \begin{macrocode}
\ProvidesFile{latex-lab-mathtools.ltx}
- [2023-01-05 v0.1a mathtools adaptions]
+ [2024-07-13 v0.1a mathtools adaptions]
% \end{macrocode}
% \subsection{Tagpdf support}
% To make the code independent from tagging being loaded and active
@@ -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/latex-lab/latex-lab-minipage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-minipage.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-minipage.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -18,8 +18,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabminipagedate{2023-10-30}
-\def\ltlabminipageversion{0.81c}
+\def\ltlabminipagedate{2024-09-18}
+\def\ltlabminipageversion{0.81e}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -120,12 +120,18 @@
% \end{macrocode}
% insert the socket
% \begin{macrocode}
- \socket_use:n{tagsupport/minipage/before}% new
+ \UseTaggingSocket{minipage/before}% new
\setbox\@tempboxa\vbox\bgroup
\color at begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
+% \end{macrocode}
+% minipages are perhaps used in environments where the tagging of paragraphs
+% has been altered. So we try to restore this. TODO: this should
+% perhaps be done in \cs{@parboxrestore} directly.
+% \begin{macrocode}
+ \UseTaggingSocket{para/restore}
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c at mpfootnote\z@
\socket_assign_plug:nn{fntext/process}{mp}%
\let\@listdepth\@mplistdepth \@mplistdepth\z@
@@ -150,10 +156,10 @@
% 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}
- \socket_use:n{tagsupport/minipage/after} %new end ...
+ \tag_resume:n{minipage}
+ \UseTaggingSocket{minipage/after} %new end ...
}
% \end{macrocode}
%
@@ -164,8 +170,15 @@
\leavevmode
\@pboxswfalse
\setlength\@tempdima{#4}%
- \socket_use:n{tagsupport/parbox/before}
- \@begin at tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
+ \UseTaggingSocket{parbox/before}
+ \@begin at tempboxa\vbox{\hsize\@tempdima\@parboxrestore
+% \end{macrocode}
+% parbox are perhaps used in environments where the tagging of paragraphs
+% has been altered. So we try to restore this. TODO: this should
+% perhaps be done in \cs{@parboxrestore} directly.
+% \begin{macrocode}
+ \UseTaggingSocket{para/restore}
+ #5\@@par}%
\ifx\relax#2\else
\setlength\@tempdimb{#2}%
\edef\@parboxto{to\the\@tempdimb}%
@@ -179,7 +192,7 @@
\csname bm@#3\endcsname}%
\if at pboxsw \m at th$\fi
\@end at tempboxa%
- \socket_use:n{tagsupport/parbox/after}
+ \UseTaggingSocket{parbox/after}
}
% \end{macrocode}
%
@@ -191,9 +204,11 @@
\socket_new_plug:nnn{tagsupport/minipage/before}{tag/dflt}
{
% \end{macrocode}
-% As there was a \cs{leavevmode} before that is a P/text open that we have to close.
+% As there was a \cs{leavevmode} before that is a P/text open that we have to close
+% if para tagging is active:
% \begin{macrocode}
- \tag_mc_end_push:\tag_struct_end:
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
% \end{macrocode}
% TODO: the P can be further up, we need a proper method to test and handle this.
% \begin{macrocode}
@@ -203,13 +218,25 @@
% similar for the other sockets:
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/minipage/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
\socket_new_plug:nnn{tagsupport/parbox/before}{tag/dflt}
- {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}}
+ {
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
+ \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
+ }
\socket_new_plug:nnn{tagsupport/parbox/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
% \end{macrocode}
% Activate the default tagging plug
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-namespace.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-namespace.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-namespace.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -26,7 +26,7 @@
% \fi
% \title{Prototype reimplementation of \LaTeXe{}'s role mapping}
% \author{\LaTeX{} Project, initial implementation Ulrike Fischer}
-% \date{v0.8b 2024-03-24}
+% \date{v0.8b 2024-07-05}
%
% \maketitle
%
@@ -37,7 +37,7 @@
% \section{Introduction}
%
% This short file collects tag names from the \LaTeX{} namespace and their role mapping used
-% in the latex-lab files. The names and the roles are not necessarly the final ones!
+% in the latex-lab files. The names and the roles are not necessarily the final ones!
%
% Later settings of the same tag overwrite previous settings.
% The syntax of a line is a list of three strings ending with commas:
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-sec.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-sec.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-sec.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabsecdate{2024-02-12}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
%<*driver>
\documentclass[kernel]{l3doc}
\EnableCrossrefs
@@ -121,7 +121,7 @@
% commands must be at the right grouping level.
% \end{itemize}
%
-% \subsection{Funktions and keys}
+% \subsection{Functions and keys}
%
% \begin{function}{\tag_tool:n,\tagtool}
%
@@ -138,7 +138,7 @@
% to allow e.g. to put an epigraph or similar in front.
%
% \item The number in \cs{part} and \cs{chapter} is currently not correctly
-% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependant)
+% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependent)
% commands too.
%
% \end{itemize}
@@ -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,57 +382,57 @@
{
,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}
% We remap here the text-unit from the paragraph to NonStruct.
-% It would be better to suppress it completly as with the other
+% It would be better to suppress it completely as with the other
% sectioning commands, but this would require to redefine \cs{@spart}
% and \cs{@part}, as there is the grouping, and these commands are
% 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/latex-lab/latex-lab-table.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-table.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-table.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabtbldate{2024-05-25}
-\def\ltlabtblversion{0.85i}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -100,6 +100,7 @@
% support for the tagging of tables. A list of the known limitations
% is shown below.
%
+% \subsection{Loading}
% The module is not loaded automatically (i.e., not yet integrated
% into any \texttt{phase-XX}) and by itself it doesn't activate
% tagging. For experimenting with table tagging it is therefore best
@@ -113,7 +114,26 @@
% It will then automatically tag all table environments it already supports with
% the exception of tables in the header and footer of the page (where tagging is disabled).
% Such tables can be nested.
+%
+% Inside cells the automatic tagging of paragraphs is disabled with the exception of
+% p/m/b-type cells.
%
+% Rows do not need to contain a full number of \&, missing cells are automatically
+% added with an empty TD-structure.
+%
+% You should not insert meaningful text with \verb+!{...}+ or \verb+@{...}+ or \cs{noalign}
+% between the rows or columns of the table.
+% With pdflatex such text will be unmarked, with lualatex it will be marked as artifact.
+% Either case means that it will be currently ignored in the
+% structure.\footnote{While it is theoretically possible
+% to collect such text and move it into a structure it would require manual markup
+% from the author to clarify where this text belongs too.}
+%
+% As mentioned below the \pkg{colortbl} doesn't work fully with the tagging,
+% but when it does, colors inside the table are currently ignored. If such a color
+% has a semantic meaning (like \enquote{important value}) this meaning will be lost.
+%
+% \subsection{Untagged and presentation tables}
% If a table should not be tagged as table, for example because it is merely used
% as a layout to ensure that the content is properly aligned
% or because it is a not yet (fully) supported table structure,
@@ -130,42 +150,44 @@
% The key should currently only be used in a group as there is no key (yet) to reset to the default
% tag names.
%
-% Inside cells the automatic tagging of paragraphs is disabled with the exception of
-% p/m/b-type cells.
-%
-% Rows do not need to contain a full number of \&, missing cells are automatically
-% added with an empty TD-structure.
-%
+% \subsection{Header rows and columns}
% There is some basic support\footnote{This is not meant to be the
% final interface, though.} for headers. With\footnote{The old key name \texttt{table-header-rows} still
% works but is deprecated.}
% \begin{quote}
% \verb|\tagpdfsetup{table/header-rows={|\meta{list of row numbers}\verb|}|
+% \verb|\tagpdfsetup{table/header-columns={|\meta{list of column numbers}\verb|}|
% \end{quote}
% you can
-% declare which (absolute) row numbers should be tagged as header rows.
-% It applies to all tables until it is changed to a different list of row numbers or undone by setting
-% the key to \meta{empty}.
-% A row number can be
-% negative, then the counting starts from the end of the table. There is no support
-% for header columns yet. In a \env{longtable} the code will currently use the \cs{endhead} or
+% declare which (absolute) row and column numbers should be tagged as header rows and header columns.
+% It applies to all tables until it is changed to a different list of row or
+% columns numbers or undone by setting
+% the keys to \meta{empty}.
+% A row or column number can be
+% negative, then the counting starts from the end of the table.
+% In a \env{longtable} the code will currently use the \cs{endhead} or
% \cs{endfirsthead} rows as header if one of these commands has been
% used and in that case the code
% ignores a \texttt{table/header-rows} setting.
%
-% You should not insert meaningful text with \verb+!{...}+ or \verb+@{...}+ or \cs{noalign}
-% between the rows or columns of the table.
-% With pdflatex such text will be unmarked, with lualatex it will be marked as artifact.
-% Either case means that it will be currently ignored in the
-% structure.\footnote{While it is theoretically possible
-% to collect such text and move it into a structure it would require manual markup
-% from the author to clarify where this text belongs too.}
+% \subsection{Spanning of cells}
%
-% As mentioned below the \pkg{colortbl} doesn't yet work properly with the tagging,
-% but once it does, then colors inside the table will probably be
-% simply ignored (at least initially). If such a color
-% has a semantic meaning (like \enquote{important value}) this meaning will be lost.
+% \cs{multicolumn} is supported out of the box and will create a structure with a
+% suitable \texttt{ColSpan} attribute\footnote{The code uses actually an attribute \emph{class}.
+% The validator PAC doesn't handle this correctly currently and complains about a missing attribute.}
%
+% For cells spanning rows some preliminary support exists\footnote{The interface is bound to change!}:
+% If you add
+% \begin{quote}
+% \verb|\tagpdfsetup{table/multirow={|\meta{number of rows}\verb|}|
+% \end{quote}
+% to a cell the code will add the suitable \texttt{RowSpan} attribute and suppress the tagging of affected
+% cells in the following rows. This will also work if the current cell is a \cs{multicolumn}, then
+% the cell will span both rows and columns. It is the duty of the author to
+% ensure that all cells below and covered by a \texttt{RowSpan} are empty!
+% The code neither checks that nor does
+% it tries to suppress content.
+%
% Feedback and problems with the code can be reported at
% \url{https://github.com/latex3/tagging-project} either in form of
% explicit issues or as a \enquote{discussion topic}, whatever works best.
@@ -183,10 +205,9 @@
% \item the \env{array} environment is assumed to be part of math and tagging as a table is disabled for
% it.
%
-% \item Row spans are not yet supported (and the \pkg{multirow} package is untested).
+% \item Row spans can only be added manually (the \pkg{multirow} package is untested).
%
-% \item The \pkg{colortbl} package breaks tagging if there are nested tables. It also breaks
-% the filling up of incomplete rows.
+% \item The \pkg{colortbl} package breaks tagging if there are nested tables.
%
% \item The \pkg{tabularray} package use a completed different
% method to create tables and will not be supported by this code.
@@ -193,9 +214,10 @@
%
% \item The \pkg{nicematrix} package is currently incompatible.
%
-% \item Most other packages related to tables in \LaTeX{} are not yet tested,
+% \item Most other packages related to tables in \LaTeX{} are not fully tested,
% that includes packages that change rules like \pkg{booktabs}, \pkg{hhline},
-% \pkg{arydshln}, \pkg{hvdashln}.
+% \pkg{arydshln}, \pkg{hvdashln}. Some problems have been resolved, either
+% in the packages or through a firstaid which can be loaded the \verb+testphase=firstaid+.
%
% \item \env{longtable} currently only works with lualatex.
% With other engines it breaks as its output
@@ -208,9 +230,9 @@
% the tagging of the table must be deactivated with \verb|\tagpdfsetup{table/tagging=false}|
% or \verb|\tagpdfsetup{table/tagging=presentation}|.
%
-% \item Only simple header rows are currently supported. Columns and complex headers with
+% \item Only simple header rows and columns are currently supported. Complex headers with
% subheaders will be handled later as that needs some syntax changes. Tables
-% with more than one header row are probably not pdf/UA as the headers array in
+% with more than one header row or column are probably not pdf/UA as the headers array in
% the cells is missing.
%
% \item A \pkg{longtable} \cs{caption} is currently simply formatted as a multicolumn and
@@ -259,9 +281,6 @@
%
% \item Longtable captions should be properly supported.
%
-% \item Handle p-cells better. para-tagging should probably be enabled,
-% but Part can't be a child of TD, so this should probably be changed to Div here.
-% Also there is a stray MC somewhere.
%
% \item More packages must be tested.
% \end{itemize}
@@ -292,8 +311,8 @@
% ,\l_@@_cellattribute_tl
% ,\l_@@_rowattribute_tl
% ,\l_@@_tmpa_clist
-% ,\l_@@_tmpa_seq
% ,\l_@@_tmpa_tl
+% ,\l_@@_tmpa_str
% }
% This is for the celltag, e.g. TD or TH:
% \begin{macrocode}
@@ -319,10 +338,16 @@
\tl_new:N \l_@@_rowattribute_tl
\tl_set:Nn \l_@@_rowattribute_tl {}
% \end{macrocode}
+% Variable to store cell info like which cell must be skipped when tagging multirows.
+% \begin{macrocode}
+\prop_new:N\g_@@_untagged_cells_prop
+\prop_new:N\l_@@_saved_untagged_cells_prop
+% \end{macrocode}
% Temp variables
% \begin{macrocode}
\clist_new:N \l_@@_tmpa_clist
\tl_new:N \l_@@_tmpa_tl
+\str_new:N \l_@@_tmpa_str
% \end{macrocode}
% \end{macro}
%
@@ -330,7 +355,41 @@
%
%
% This are the standard plugs for tagging of cells and rows.
-%
+%
+% The following two sockets are defined in lttagging, but we check
+% for their existence until the release 11/2024.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/tbl/init/celldata_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/init/celldata}{0}
+ \NewSocket{tagsupport/tbl/restore/celldata}{0}
+ }
+% \end{macrocode}
+% \begin{plugdecl}{default}
+% This socket is used inside \cs{tbl_init_cell_data_for_table} for the
+% case that this a nested table in a cell.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/tbl/init/celldata}{default}
+ {
+ \prop_set_eq:NN\l_@@_saved_untagged_cells_prop \g_@@_untagged_cells_prop
+ \prop_gclear:N \g_@@_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/init/celldata}{default}
+% \end{macrocode}
+% \end{plugdecl}
+
+% \begin{plugdecl}{default}
+% This socket is used inside \cs{tbl_restore_outer_cell_data:} and restores
+% values when a nested table is ended.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/tbl/restore/celldata}{default}
+ {
+ \prop_gset_eq:NN\g_@@_untagged_cells_prop \l_@@_saved_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/restore/celldata}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
% \begin{plugdecl}{TD}
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/cell/begin}{TD}
@@ -340,21 +399,44 @@
% always even if the noop plug is in force this needs a different solution.
% \begin{macrocode}
\@@_show_curr_cell_data:
- \tag_struct_begin:n
+% \end{macrocode}
+% We test if the cell should be tagged at all.
+% \begin{macrocode}
+ \@@_if_tag_cell:nnT {\g_@@_row_int } { \g_@@_col_int }
{
- tag =\l_@@_celltag_tl,
- attribute-class =\l_@@_cellattribute_tl
- }
- \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
% \end{macrocode}
+% this sets row headers
+% \begin{macrocode}
+ \clist_if_in:NVT \l_@@_header_columns_clist\g_@@_col_int
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+% \end{macrocode}
+% Here we handle negative value for row headers:
+% \begin{macrocode}
+ \tl_set:Ne \l_@@_tmpa_tl {\int_eval:n { \g_@@_col_int - 1 - \g_@@_table_cols_tl }}
+ \clist_if_in:NoT \l_@@_header_columns_clist { \l_@@_tmpa_tl }
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l_@@_celltag_tl,
+ attribute-class ={\l_@@_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
+% \end{macrocode}
% we store the cells of multicolumns as negative number. This allow to skip them
% or to use them as needed.
% \begin{macrocode}
- \int_step_inline:nn { \g_@@_span_tl - 1 }
- {
- \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tag_mc_begin:n{}
+ \int_step_inline:nn { \g_@@_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tag_mc_begin:n{}
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -363,8 +445,11 @@
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/cell/end}{TD}
{
- \tag_mc_end:
- \tag_struct_end:
+ \@@_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -376,18 +461,26 @@
\NewSocketPlug{tagsupport/tbl/pcell/begin}{TDpbox}
{
\@@_show_curr_cell_data:
- \tag_struct_begin:n
+ \@@_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
{
- tag =\l__tbl_pcelltag_tl,
- attribute-class =\l__tbl_cellattribute_tl
- }
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
- \int_step_inline:nn { \g__tbl_span_tl - 1 }
- {
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tagpdfparaOn
- \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \clist_if_in:NVT \l_@@_header_columns_clist\g_@@_col_int
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l_@@_pcelltag_tl,
+ attribute-class ={\l_@@_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
+ \int_step_inline:nn { \g_@@_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tagpdfparaOn
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -396,7 +489,12 @@
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/pcell/end}{TDpbox}
{
- \tag_struct_end:
+ \@@_if_tag_cell:nnT {\g_@@_row_int } { \g_@@_col_int }
+ {
+ \tag_struct_end:
+ \legacy_if:nT {@endpe}{\par}
+ \mode_if_vertical:T{ \tagpdfparaOff }
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -432,7 +530,7 @@
{
\@@_trace:n
{==>~
- stucture~stored~for~row~\int_use:N\g_@@_row_int :~
+ structure~stored~for~row~\int_use:N\g_@@_row_int :~
\seq_use:Nn \g_@@_struct_cur_seq {,}
}
}
@@ -447,21 +545,49 @@
% normal tables which can also be used inline and nested and
% \enquote{vmode} tables like longtable.
%
+% \begin{macro}{\l__tag_block_flattened_level_int}
+% Count the levels of nested blockenvs starting with the first that
+% is \enquote{flattened}. The counter is defined in lttagging.dtx,
+% but until the next release 11/24 we set it up here too so that we can
+% use it in the following socket
+% \begin{macrocode}
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{plugdecl}{Table}
+% Inside a TD or TR Part is not allowed as child. For structures that restore
+% paragraph settings we therefore need a special plug that adjust the settings.
+% Currently we set the para main tag to Div. This leads to double Div-structures
+% but flattening the paragraph doesn't work, it errors if there is a list inside.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/para/restore}{Table}
+ {
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \bool_set_true:N \l__tag_para_bool
+ \bool_set_false:N \l__tag_para_flattened_bool
+ \int_zero:N \l__tag_block_flattened_level_int
+ }
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{Table}
% Inside a table we currently only disable paratagging. We assume
-% that these sockets are in an environment group, so there is no
+% that these sockets are called in a group, so there is no
% need to reenable paratagging.
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/init}{Table}
{
- \tag_if_active:T
- {
- \bool_set_false:N \l__tag_para_bool
+ \bool_set_false:N \l__tag_para_bool
+ \AssignSocketPlug{tagsupport/para/restore}{Table}
% \end{macrocode}
% We also initialize the structure data variables a this point.
% \begin{macrocode}
- \@@_init_struct_data:
- }
+ \@@_init_struct_data:
}
% \end{macrocode}
% \end{plugdecl}
@@ -573,7 +699,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l_@@_tmpa_tl _prop }
{
- \exp_args:No \__tag_struct_prop_gput:nnn {\l_@@_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn { \l_@@_tmpa_tl } {S}{/Artifact}
}
}
}
@@ -664,7 +790,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l_@@_tmpa_tl _prop }
{
- \exp_args:No\__tag_struct_prop_gput:nnn {\l_@@_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn {\l_@@_tmpa_tl} {S}{/Artifact}
}
}
}
@@ -711,7 +837,7 @@
\tag_mc_end_push:
% \end{macrocode}
% Close the P-chunk. This assumes that para-tagging is active.
-% For nested tables that is not necessarly true, so we test for it.
+% For nested tables that is not necessarily true, so we test for it.
% \begin{macrocode}
\bool_lazy_and:nnT
{ \bool_if_exist_p:N \l__tag_para_bool } { \l__tag_para_bool }
@@ -729,7 +855,7 @@
\tag_struct_end:
% \end{macrocode}
% reopen the P-chunk. This assumes that para-tagging is active.
-% For nested tables that is not necessarly true, so we test for it.
+% For nested tables that is not necessarily true, so we test for it.
% \begin{macrocode}
\bool_lazy_and:nnT
{ \bool_if_exist_p:N \l__tag_para_bool } { \l__tag_para_bool }
@@ -778,16 +904,33 @@
{/O /Table /ColSpan~\int_eval:n{#1}}
}
\tl_set:Ne \l_@@_cellattribute_tl
- {colspan-\int_eval:n{#1}}
+ {\l_@@_cellattribute_tl,colspan-\int_eval:n{#1}}
}
}
% \end{macrocode}
-% TODO: move to tagpdf
+% \end{plugdecl}
+%
+%
+%
+%
+% \begin{plugdecl}{code}
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\tag_if_active:T
- { \cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee} }
-
+\str_if_exist:cF { l__socket_tagsupport/tbl/leaders/end_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/leaders/begin}{0}
+ \NewSocket{tagsupport/tbl/leaders/end}{0}
+ }
% \end{macrocode}
+%
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ { \tag_mc_begin:n{artifact} }
+\NewSocketPlug{tagsupport/tbl/leaders/end}{code}
+ { \tag_mc_end: }
+% \end{macrocode}
% \end{plugdecl}
%
%
@@ -810,8 +953,7 @@
% \subsection{Interfaces to tagging}
%
% \subsubsection{Tagging helper commands}
-%
-%
+
% \subsubsection{Disabling/enabling}
%
% For now we have only the option true/false but this will probably be extended
@@ -839,6 +981,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{noop}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{noop}
\AssignSocketPlug{tagsupport/tbl/colspan}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{noop}
}
% \end{macrocode}
% \end{macro}
@@ -866,6 +1010,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{Table}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{Table}
\AssignSocketPlug{tagsupport/tbl/colspan}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{code}
}
% \end{macrocode}
% \end{macro}
@@ -886,7 +1032,8 @@
\tl_set:Nn\l_@@_pcelltag_tl {NonStruct}
\tl_set:Nn\l_@@_celltag_tl {text}
\tl_set:Nn\l_@@_tabletag_tl {Div}
- \clist_clear:N \l_@@_header_rows_clist
+ \clist_clear:N \l_@@_header_rows_clist
+ \clist_clear:N \l_@@_header_columns_clist
},
table/tagging .default:n = true,
table/tagging .initial:n = true
@@ -893,7 +1040,7 @@
}
% \end{macrocode}
% This are the old key names kept for now for
-% compability. They will got at some time.
+% compatibility. They will got at some time.
% \begin{macrocode}
\keys_define:nn { __tag / setup }
{
@@ -955,11 +1102,12 @@
% \end{macrocode}
%
-% \begin{variable}{\l_@@_header_rows_clist}
-% This holds the numbers of the header rows. Negative numbers are
+% \begin{variable}{\l_@@_header_rows_clist,\l_@@_header_columns_clist}
+% This holds the numbers of the header rows and columns. Negative numbers are
% possible and count from the last column backwards.
% \begin{macrocode}
\clist_new:N \l_@@_header_rows_clist
+\clist_new:N \l_@@_header_columns_clist
% \end{macrocode}
% \end{variable}
%
@@ -982,14 +1130,26 @@
{
\__tag_struct_prop_gput:nnn{ ####1 }{S}{/TH}
% \end{macrocode}
-% This need refinement once row headers (and perhaps other attributes)
-% are used too, but for now it should be ok.
+% This sets the scope class. If the header has already a row attribute
+% we replace by TH-both.
% \begin{macrocode}
\prop_get:cnNTF
{ g__tag_struct_####1_prop }
{ C }
\l_@@_tmpa_tl
- {\__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l_@@_tmpa_tl]} }
+ {
+ \str_set:Ne \l_@@_tmpa_str {\l_@@_tmpa_tl}
+ \str_remove_once:Nn \l_@@_tmpa_str {[}
+ \str_remove_once:Nn \l_@@_tmpa_str {]}
+ \str_if_in:NnTF\l_@@_tmpa_str{/TH-row}
+ {
+ \str_replace_once:Nnn \l_@@_tmpa_str {/TH-row}{/TH-both}
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[\l_@@_tmpa_str]}
+ }
+ {
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l_@@_tmpa_str]}
+ }
+ }
{\__tag_struct_prop_gput:nnn{ ####1 }{C}{/TH-col}}
}
}
@@ -1004,6 +1164,7 @@
\keys_define:nn { __tag / setup }
{
table/header-rows .clist_set:N = \l_@@_header_rows_clist,
+ table/header-columns .clist_set:N = \l_@@_header_columns_clist,
% \end{macrocode}
% obsolete older name:
% \begin{macrocode}
@@ -1011,8 +1172,114 @@
}
% \end{macrocode}
%
+% \subsection{Multirow support}
+%
+% \begin{macro}{\@@_multirow:n}
+% This command makes the current cell into a multirow cell:
+% it creates, if needed, an RowSpan-attribute, adds it to the attributes
+% of the cell structure, and marks all following cells spanned by the multirow
+% as cells that should not be tagged. The argument is the number of spanned row
+% (including the current row).
+% \begin{macrocode}
+\cs_if_exist:NT \__tag_struct_prop_gput:nnn
+ {
+ \cs_generate_variant:Nn \__tag_struct_prop_gput:nnn {one}
+ }
+\cs_new_protected:Npn \@@_multirow:n #1
+ {
+% \end{macrocode}
+% Create an attribute if needed:
+% \begin{macrocode}
+ \prop_get:NeNF \g__tag_attr_entries_prop
+ {rowspan-\int_eval:n{#1}}
+ \l_@@_tmpa_tl
+ {
+ \__tag_attr_new_entry:ee
+ {rowspan-\int_eval:n{#1}}
+ {/O /Table /RowSpan~\int_eval:n{#1}}
+ }
+% \end{macrocode}
+% ensure that the attribute is marked as used:
+% \begin{macrocode}
+ \seq_gput_left:Ne\g__tag_attr_class_used_seq
+ {\pdf_name_from_unicode_e:n{rowspan-\int_eval:n{#1}}}
+% \end{macrocode}
+% Get the structure number of the current cell
+% \begin{macrocode}
+ \seq_get_right:NN\g_@@_struct_cur_seq \l_@@_tmpb_tl
+% \end{macrocode}
+% If we are in a multicolumn the number can be negative and
+% this must be changed
+% \begin{macrocode}
+ \tl_set:Ne \l_@@_tmpb_tl { \int_abs:n{\l_@@_tmpb_tl} }
+% \end{macrocode}
+% no we must update an existing attribute.
+% TODO: simplify this ... (see also colspan handling).
+% \begin{macrocode}
+ \prop_get:cnNTF
+ { g__tag_struct_\l_@@_tmpb_tl _prop }
+ { C }
+ \l_@@_tmpa_tl
+ {
+ \tl_remove_once:Nn \l_@@_tmpa_tl {[}
+ \tl_remove_once:Nn \l_@@_tmpa_tl {]}
+ \__tag_struct_prop_gput:one{ \l_@@_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}~\l_@@_tmpa_tl]}
+ }
+ {
+ \__tag_struct_prop_gput:one{ \l_@@_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}]}
+ }
+% \end{macrocode}
+% Now mark the spanned cells that should be ignored.
+% \begin{macrocode}
+ \@@_gset_untagged_row_cells:nn {#1-1}{\g_@@_span_tl}
+ }
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macrocode}
+\keys_define:nn{ __tag / setup }
+ { table/multirow .code:n = {\@@_multirow:n {#1} }
+ ,table/multirow .default:n = 1
+ }
+% \end{macrocode}
%
+% \begin{macro}{\@@_gset_untagged_row_cells:nn}
+% This command stores the row and column numbers of the cells in the following row(s)
+% that should not be tagged as they are a part of a rowspan.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gset_untagged_row_cells:nn #1 #2 % #1 number of rows, #2 number of columns
+ {
+ \int_step_inline:nn {#1}
+ {
+ \int_step_inline:nn {#2}
+ {
+ \prop_gput:Nee \g_@@_untagged_cells_prop
+ { \int_eval:n {\g_@@_row_int + ##1},\int_eval:n{\g_@@_col_int + ####1 -1 } }{}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_tag_cell:nn}
+% We must be able to detect if a cell should be tagged. For this
+% we define a conditional --- if more options are needed it can be extended.
+% \begin{macrocode}
+\prg_new_protected_conditional:Npnn\@@_if_tag_cell:nn #1 #2 %#1 row, #2 col
+ { T,TF }
+ {
+ \prop_get:NeNTF \g_@@_untagged_cells_prop
+ {\int_eval:n{#1},\int_eval:n{#2}}\l__tbl_tmpa_tl
+ { \prg_return_false:}
+ { \prg_return_true: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Misc stuff}
%
% \begin{macro}{\@@_show_curr_cell_data:}
@@ -1037,13 +1304,6 @@
% cell of a row, but still inside that cell, so we use two
% commands. The one adding is used in the row/end socket.
% \begin{macrocode}
-\NewSocket{tbl/celldata/missingcount}{1}
-\NewSocketPlug{tbl/celldata/missingcount}{code}{\tbl_count_missing_cells:n{#1}}
-\AssignSocketPlug{tbl/celldata/missingcount}{code}
-
-% \end{macrocode}
-%
-% \begin{macrocode}
\cs_new:Npn \@@_add_missing_cells:
{
% \end{macrocode}
@@ -1058,6 +1318,7 @@
additional~cell(s)~into~previous~row:}
\int_step_inline:nn { \g_@@_missing_cells_int }
{
+ \int_gincr:N\g_@@_col_int
\UseTaggingSocket{tbl/cell/begin}
\UseTaggingSocket{tbl/cell/end}
}
@@ -1164,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/latex-lab/latex-lab-testphase.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-testphase.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-testphase.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -47,7 +47,7 @@
%
% Currently the values |phase-I|, |phase-II|, |phase-III| and |new-or| (bundles |new-or-1|
% and |new-or-2|) are provided.
-% |tagpdf| is an undocumented alias for |phase-II| which is kept for compability.
+% |tagpdf| is an undocumented alias for |phase-II| which is kept for compatibility.
% The value |math| combines various math related files.
%
% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-text.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-text.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-text.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/latex-lab/latex-lab-toc-kernel-changes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc-kernel-changes.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc-kernel-changes.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -17,8 +17,8 @@
% for those people who are interested or want to report an issue.
%
% dates for latex-lab-kernel-changes.sty (pulled from various sources, see ins)
-\def\ltlabkerneldate{2024-02-12}
-\def\ltlabkernelversion{0.85c}
+\def\ltlabkerneldate{2024-07-11}
+\def\ltlabkernelversion{0.85d}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -44,6 +44,11 @@
%
% \providecommand\hook[1]{\texttt{#1}}
%
+%
+% \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}
+%
% \begin{abstract}
% \end{abstract}
%
@@ -68,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?]
%
@@ -160,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}
@@ -187,12 +143,24 @@
% \subsection{\cs{contentsline} extension}
% [latex-lab]
% The tagging code must add code at the begin and end of \cs{contentsline}.
-% This code must have access to the arguments. We set it up as config point
-% for now.
+% This code must have access to the arguments. They are passed
+% together in tagging socket.
+% \begin{socketdecl}{tagsupport/toc/contentsline/before,
+% tagsupport/toc/contentsline/after}
+% Tagging sockets at the begin and end of contentsline.
+% They receive \emph{all} contentsline arguments as one argument
+% in four brace groups. The socket code should then use the parts it needs.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\def\@contentsline at cfgpoint@before#1#2#3#4{}
-\def\@contentsline at cfgpoint@after#1#2#3#4{}
+\str_if_exist:cF { l__socket_tagsupport/toc/contentsline/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/contentsline/before}{1}
+ \NewSocket{tagsupport/toc/contentsline/after}{1}
+ }
% \end{macrocode}
+% \end{socketdecl}
% for the hooks we need that the \cs{l at XX} pass also the destination and
% that \cs{l at XX} takes three arguments.
% TODO: test that, if there are two many problems we should pass the
@@ -200,10 +168,10 @@
% \begin{macrocode}
\def\contentsline#1#2#3#4%
{%
- \@contentsline at cfgpoint@before{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/before}{{#1}{#2}{#3}{#4}}%
\gdef\@contentsline at destination{#4}%
\csname l@#1\endcsname{#2}{#3}%
- \@contentsline at cfgpoint@after{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/after}{{#1}{#2}{#3}{#4}}%
}
% \end{macrocode}
%
@@ -225,17 +193,33 @@
% \subsection{\cs{@starttoc}}
% [kernel?]
%
-% We add a configuration point before and after reading the file
+% We add a tagging socket before and after reading the file
% for the tagging.
+% \begin{socketdecl}{tagsupport/toc/starttoc/before,
+% tagsupport/toc/starttoc/after}
+% Tagging sockets for the begin and end of start of \cs{@starttoc}.
+% They take one argument, the extension.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\def\@starttoc at cfgpoint@before#1{}
-\def\@starttoc at cfgpoint@after#1{}
+\str_if_exist:cF { l__socket_tagsupport/toc/starttoc/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/starttoc/before}{1}
+ \NewSocket{tagsupport/toc/starttoc/after}{1}
+ }
+% \end{macrocode}
+% \begin{macrocode}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{macrocode}
\def\@starttoc#1{%
\begingroup
\makeatletter
- \@starttoc at cfgpoint@before{#1}%
+ \UseTaggingSocket{toc/starttoc/before}{#1}%
\@input{\jobname.#1}%
- \@starttoc at cfgpoint@after{#1}%
+ \UseTaggingSocket{toc/starttoc/after}{#1}%
\if at filesw
\expandafter\newwrite\csname tf@#1\endcsname
\immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
@@ -269,15 +253,32 @@
\NewMirroredHookPairWithArguments{contentsline/page/before}{contentsline/page/after}{4}%
% \end{macrocode}
%
-% The dot in the leader must be set as artifact.
+% The dots in the leader must be set as artifact.
% But luatex requires that the mc are set outside the leaders.
-% So we need a config point.
+% So we need sockets.
%
% \cs{@dottedtocline} needs hooks and formatting commands.
-% We add a sixth argument so that it can grab the destination too.
+% To make the leaders into artifact we use tagging sockets.
+% The declaration should perhaps be moved into lttagging so that
+% it can be used also by external packages even if the tagging code is not
+% loaded?
+% \begin{socketdecl}{tagsupport/toc/leaders/before,
+% tagsupport/toc/leaders/after}
+% Tagging sockets to make the dot leaders an artifact.
+% They do not take an argument.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\def\@dottedtocline at cfgpoint@leaders#1{#1}
-
+\str_if_exist:cF { l__socket_tagsupport/toc/leaders/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/leaders/before}{0}
+ \NewSocket{tagsupport/toc/leaders/after}{0}
+ }
+% \end{macrocode}
+% \end{socketdecl}
+% The destination is accessed through \cs{@contentsline at destination}.
+% \begin{macrocode}
\def\@dottedtocline#1#2#3#4#5{%
\ifnum #1>\c at tocdepth \else
\vskip \z@ \@plus.2\p@
@@ -291,10 +292,11 @@
\csname contentsline at text@#1 at format\endcsname{#4}%
\UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline at destination}%
\nobreak
- \@dottedtocline at cfgpoint@leaders{%
+ \UseTaggingSocket{toc/leaders/before}\SuspendTagging{toc/leaders}%
\leaders\hbox{$\m at th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
- mu$}\hfill}%
+ mu$}\hfill
+ \ResumeTagging{toc/leaders}\UseTaggingSocket{toc/leaders/after}%
\nobreak
\hb at xt@\@pnumwidth{\hfil\normalfont \normalcolor
\UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline at destination}%
Modified: trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/latex-lab/latex-lab-toc.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabtocdate{2023-10-16}
-\def\ltlabtocversion{0.85b}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -42,8 +42,11 @@
% \newcommand{\docclass}{document class \marginpar{\raggedright document class
% customizations}}
%
-% \providecommand\hook[1]{\texttt{#1}}
%
+% \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}
+%
% \begin{abstract}
% \end{abstract}
%
@@ -111,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}
@@ -196,14 +165,17 @@
\tag_struct_begin:n{tag=TOC,title=#1}
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@starttoc at cfgpoint@before#1
- {
- \@@_toc_starttoc_init:n{#1}
- }
+\NewSocketPlug{tagsupport/toc/starttoc/before}{default}
+ {
+ \@@_toc_starttoc_init:n{#1}
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/before}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
% \begin{macro}{\@@_toc_starttoc_finalize:}
% \begin{macrocode}
\cs_new_protected:Npn \@@_toc_starttoc_finalize:
@@ -215,15 +187,18 @@
\seq_gclear:N \g_@@_toc_stack_seq
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@starttoc at cfgpoint@after#1
- {
- \@@_toc_starttoc_finalize:
- }
+\NewSocketPlug{tagsupport/toc/starttoc/after}{default}
+ {
+ \@@_toc_starttoc_finalize:
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/after}{default}
% \end{macrocode}
-% \end{macro}
-
+% \end{plugdecl}
+%
% \begin{macro}{\@@_toc_end:n}
% This commands ends all TOC on the stack with a level higher than the argument
% \begin{macrocode}
@@ -249,10 +224,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_toc_contentsline_begin:nnn}
+% \begin{macro}{\@@_toc_contentsline_begin:nnnn}
% This is main command executed at the begin of a |\contentsline|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_toc_contentsline_begin:nnn #1 #2 #3 %#1 level, #2 content, #3 destination
+\cs_new_protected:Npn \@@_toc_contentsline_begin:nnnn #1 #2 #3 #4
+ %#1 level, #2 content, #3 page number (unused) #4 destination
{
\tag_if_active:T
{
@@ -298,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} }{#3}
+ \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:
}
@@ -315,16 +291,19 @@
}
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@contentsline at cfgpoint@before#1#2#3#4
+\NewSocketPlug{tagsupport/toc/contentsline/before}{default}
{
- \@@_toc_contentsline_begin:nnn {#1}{#2}{#4}
- }
+ \@@_toc_contentsline_begin:nnnn #1
+ }
+\AssignSocketPlug{tagsupport/toc/contentsline/before}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
%
-% \begin{macro}{\@@_toc_contentsline_end:n}
+% \begin{macro}{\@@_toc_contentsline_end:nnnn}
% This is the closing code of a |\contentsline|.
% If the contentsline was actually printed, the code has to
% close the TOCI structure and to update the stack.
@@ -331,7 +310,8 @@
% \begin{macrocode}
\msg_new:nnn {tag}{toc-no-TOCI}{Missing~TOCI~structure~on~toc~stack}
-\cs_new_protected:Npn \@@_toc_contentsline_end:n #1 %#1 level name
+\cs_new_protected:Npn \@@_toc_contentsline_end:nnnn #1 #2 #3 #4
+% #1 level, #2 content (unused), #3 page number (unused) #4 destination (unused)
{
\int_compare:nNnF { \use:c{toclevel@#1} } > {\use:c{c at tocdepth}}
{
@@ -348,14 +328,17 @@
}
}
% \end{macrocode}
-% Now we map it to the config point
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn \@contentsline at cfgpoint@after #1#2#3#4
- {
- \@@_toc_contentsline_end:n {#1}
- }
+\NewSocketPlug{tagsupport/toc/contentsline/after}{default}
+ {
+ \@@_toc_contentsline_end:nnnn #1
+ }
+\AssignSocketPlug{tagsupport/toc/contentsline/after}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
%
% \subsection{Tagging of the content}
% This need discussion.
@@ -380,12 +363,16 @@
\tag_struct_end:
\tag_mc_begin:n{tag=Reference}}
% \end{macrocode}
-%
+% \begin{plugdecl}{artifact}
% \begin{macrocode}
-\def\@dottedtocline at cfgpoint@leaders#1{%
- \tag_mc_begin:n{artifact}\tag_stop:n{leaders}\nobreak#1\nobreak\tag_start:n{leaders}\tag_mc_end:}
+\NewSocketPlug{tagsupport/toc/leaders/before}{artifact}
+ {\tag_mc_begin:n{artifact}\nobreak}
+\NewSocketPlug{tagsupport/toc/leaders/after}{artifact}
+ {\nobreak\tag_mc_end:}
+\AssignSocketPlug{tagsupport/toc/leaders/before}{artifact}
+\AssignSocketPlug{tagsupport/toc/leaders/after}{artifact}
% \end{macrocode}
-
+% \end{plugdecl}
%
% \begin{macrocode}
%</package>
Modified: trunk/Master/texmf-dist/source/latex/tools/array.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tools/array.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/tools/array.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -39,7 +39,7 @@
% \begin{macrocode}
%<+package>\NeedsTeXFormat{LaTeX2e}[2024/06/01]
%<+package>\ProvidesPackage{array}
-%<+package> [2024/06/14 v2.6d Tabular extension package (FMi)]
+%<+package> [2024/10/17 v2.6g Tabular extension package (FMi)]
%
% \fi
%
@@ -259,7 +259,7 @@
% \begin{table}[!t]
% \begin{center}
% \setlength{\extrarowheight}{1pt}
-% \begin{tabular}{|>{\tt}c|m{9cm}|}
+% \begin{tabular}{|>{\ttfamily}c|m{9cm}|}
% \hline
% \multicolumn{2}{|c|}{Unchanged options}\\
% \hline
@@ -382,6 +382,20 @@
% \end{itemize}
%
%
+%
+% \subsection{A note on the allowed content of \texttt{>\{...\}} and
+% \texttt{<\{...\}}}
+%
+% These specifiers are meant to hold declarations, such as
+% \verb=>{\itshape}=. They cannot end in commands that take arguments
+% without providing these arguments as part of the \verb={...}=. It
+% would be a mistaken assumption that they pick up all or parts of the
+% alignment entry data if their argument is not provided. E.g.,
+% \verb=>{\textbf}= would not make the whole column bold nor would it
+% make the first character bold (technically it would try to
+% bolden \cs{ignorespaces}). Thus, it would not fail with an error,
+% but effectively the output would be wrong and not as expected.
+%
% \subsection{The behavior of the \texttt{\string\\} command}
%
% In the basic \texttt{tabular} implementation of \LaTeX{} the \cs{\bslash}
@@ -464,16 +478,16 @@
% "\newcolumntype{L}{>{$}l<{$}}" \\
% "\newcolumntype{R}{>{$}r<{$}}"
% \end{quote}
-% Then we can use \texttt{C} to get centred LR-mode in an
-% \texttt{array}, or centred math-mode in a \texttt{tabular}.
+% Then we can use \texttt{C} to get centered LR-mode in an
+% \texttt{array}, or centered math-mode in a \texttt{tabular}.
%
-% The example given above for `centred decimal points' could be
+% The example given above for `center decimal points' could be
% assigned to a \texttt{d} specifier with the following command.
% \begin{quote}
% "\newcolumntype{d}{>{\centerdots}c<{\endcenterdots}}"
% \end{quote}
%
-% The above solution always centres the dot in the
+% The above solution always centers the dot in the
% column. This does not look too good if the column consists of large
% numbers, but to only a few decimal places. An alternative definition
% of a \texttt{d} column is
@@ -715,7 +729,7 @@
%
% A similar problem happened when "\extrarowheight" was used. For that
% reason m-cells now manually position the cell content which
-% allows to ignore this extra space request during the vertical aligment.
+% allows to ignore this extra space request during the vertical alignment.
%
%
% \subsection{Bugs and Features}
@@ -734,7 +748,7 @@
% user the opportunity of overriding the settings of a
% "\newcolumntype" defined using these declarations. For example,
% suppose in an \texttt{array} environment we use a \texttt{C}
-% column defined as above. The \texttt{C} specifies a centred text
+% column defined as above. The \texttt{C} specifies a centered text
% column, however ">{\bfseries}C", which re-writes to
% ">{\bfseries}>{$}c<{$}" would not specify a bold column as might
% be expected, as the preamble would essentially expand to
@@ -896,7 +910,7 @@
%
% \section{A note on the updates done December 2023}
%
-% We introduced support for tagged PDf and at the same time we added
+% We introduced support for tagged PDF and at the same time we added
% code to determine row and column numbers for each cell in
% preparation for supporting formatting or type specifications for individual
% cells (or group of cells) from the outside, e.g., \enquote{rows 1,
@@ -903,7 +917,7 @@
% 2, and 10 are header rows} (syntax to be decided).
%
% This new code is already written with L3 programming layer conventions
-% while most of the legay code is still as it was before. This make the code
+% while most of the legacy code is still as it was before. This make the code
% currently somewhat clattered, unfortunately. Eventually this will all move to L3
% programming layer but this will take time.
%
@@ -1345,7 +1359,7 @@
% of \textsf{token} register $15$ instead of $1$ later on.
%
% The example above referred to an older version of =\save at decl= which
-% inserted a =\relex= inside the token register. This is now moved to
+% inserted a =\relax= inside the token register. This is now moved to
% the places where the actual token registers are inserted (look for
% =\the at toks=) because the old version would still make =@=
% expressions to moving arguments since after expanding the second
@@ -1373,6 +1387,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}
@@ -1385,10 +1400,116 @@
% \begin{macrocode}
\UseTaggingSocket{tbl/cell/begin}%
% \end{macrocode}
-% Here, we assume that the \textsf{count} register
+% Next we have to insert the toks register holding the content of
+% \verb=>{...}=. 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, i.e., starting in \verb=>{...}=, 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}. \TeX{} otherwise can get
+% confused about the value of the master counter, and we get some
+% strange errors. We suspected that there was an underlying issue
+% is the \TeX{} engine, but it turned out to be rather hard to get
+% to the bottom of it, because the master counter is not accessible
+% through \TeX{}'s tracing tools. Thus, all we could do was
+% producing various example documents, observing results, as well
+% as staring at a printout of the \TeX{} program. As an example,
+% without this approach, something like
+% \begin{verbatim}
+% \NewDocumentCommand\foo{o}{x}
+% \begin{tabular}{>{\foo}l}
+% Foo
+% \end{tabular}
+% \end{verbatim}
+% failed. 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 due to an obscure bug (or perhaps, say, an
+% undocumented feature of \TeX{}). Eventually, we were able to pin
+% down the root cause and really understand why
+% \cs{@protected at firstofone} solves the problem, even though it
+% looks like a nonsense addition to the code that does nothing
+% useful.\footnote{So it is a \TeX{} engine bug that was in there
+% from day one, or if you like, it is a hidden feature that is not
+% explained; neither in the \TeX{}book nor in the program code. We
+% don't really expect this to change in \TeX{} after such a long
+% time, other than perhaps documenting it as a feature, so this is
+% a proper solution to the problem and not just a workaround.}
+%
+% The problem is that \TeX{} tries to conserve stack space, and
+% when the last token of an existing token list is a macro, then
+% this token list is \emph{first} removed from memory (reducing the
+% stack) \emph{before} the macro replacement text (as a new
+% token list) is given to the parser adding a new stack level. This
+% is done using the routine \texttt{end\_token\_list} in the \TeX{}
+% program and ending the u-part of an \cs{halign} column with this
+% routine immediately sets the \emph{master counter} used by alignments to
+% zero (see chapter~22 and Appendix~D of the \TeX{}book). This
+% means that technically the expansion of the last token in the u-part (if it
+% is a macro) is not executed in the context of the u-part, but in
+% the context of the alignment entry in the document. That normally
+% doesn't make any difference whatsoever --- unless you play
+% around (as we sometimes have to) with tricks like those from
+% Appendix~D.
+%
+% To illustrate the issue we show a bit of strange low-level plain
+% \TeX{} code.\footnote{If all of this looks mighty strange to you,
+% don't worry. You will be unlikely to need to know about it. It is
+% just there so that programmers at some point in the future do not
+% have to wonder too much why there is this odd
+% \cs{@protected at firstofone} that apparently does nothing
+% useful. It took us several nights of head scratching to come up
+% with these minimal examples and then some more time to understand
+% what the heck is going on inside \TeX{}---thanks to Bruno for the
+% right ideas on the latter.} Below are two very special grouping
+% commands that are like \cs{bgroup} and \cs{egroup} but also
+% affect the alignment master counter when expanded (see
+% \TeX{}book p.385). If one of them is used as the
+% last macro in the u-part of a column, then you get strange errors
+% that you shouldn't get.
+% \begin{verbatim}
+% \def\bbgroup{{\ifnum0=`}\fi}
+% \def\eegroup{\ifnum0=`{\fi}}
+%
+% % Fails with an error message, but there should be none:
+% \halign{%
+% \message{u-part^^J}%
+% \bbgroup % <-- in the u-part
+% \eegroup % <-- in the u-part
+% #%
+% \message{v-part^^J}%
+% \hfill\cr
+% \message{body^^J}x
+% \cr
+% }
+%
+% % Fails but should work, the v-part is never reached:
+% \halign{%
+% \message{u-part^^J}%
+% \bbgroup % <-- in the u-part
+% #%
+% \message{v-part^^JJ}%
+% \eegroup % <-- in the v-part
+% \hfill\cr
+% \message{body^^J}x
+% \cr
+% }
+% \end{verbatim}
+%
+% So the trick we use now is making \cs{@protected at firstofone} the
+% last macro in the u-part, i.e., before the \cs{@sharp}. That way
+% its argument is always fully expanded as part of the alignment
+% entry and not as part of the u-part and this way we know exactly
+% what the master counter value is at this point, regardless of the content of
+% \verb=>{...}=.
+%
+% \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 +1517,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
+% \changes{v2.0h}{1992/06/22}{Removed \{\} again in favor 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 +1551,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 +1570,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}%
@@ -1882,7 +2013,7 @@
% For that reason the new implementation does the centering
% manually: First we check the height of the cell and if that is
% less or equal to =\ht\strutbox= we assume that this is a
-% single line cell. In that case we don't do any vertical maneuvre
+% single line cell. In that case we don't do any vertical maneuver
% and simply output the box, i.e., make it behave like a single
% line p-cell.
%
@@ -1900,7 +2031,7 @@
% is how much do we need to move down? If there is any
% =\arraystretch= in place then the first line will have some
% unusual height and we don't want to consider that when finding
-% the middle point. So we substract from the cell height the height
+% the middle point. So we subtract from the cell height the height
% of that strut. But of course we want to include the normal height
% of the first line (which would be something like =\ht\strutbox=)
% so we need to add that. On the other hand, when centering around
@@ -2325,7 +2456,7 @@
\lineskip \z@
\baselineskip \z@
% \end{macrocode}
-% Don't use \cs{m at th} here as that signals to the math taggingg
+% Don't use \cs{m at th} here as that signals to the math tagging
% code that this is fake math that should not be tagged.
% \changes{v2.6a}{2023/12/11}{Support for tagged PDF}
% \begin{macrocode}
@@ -2451,7 +2582,7 @@
%
% We then start a special brace which I have directly
% copied from the original definition. It is
-% necessary, because the =\futurlet= in =\@ifnextchar=
+% necessary, because the =\futurelet= in =\@ifnextchar=
% might
% expand a following =&= \textsf{token} in a construction like
% =\\ &=. This would otherwise end the alignment template at a
@@ -2464,7 +2595,7 @@
% that a =&= will not be considered belonging to the current
% =\halign= while we are looking for a =*= or =[=.
% For further information see
-% \cite[Appendix D]{bk:knuth}.
+% \cite[Appendix~D]{bk:knuth}.
% \begin{macrocode}
\iffalse{\fi\ifnum 0=`}\fi
% \end{macrocode}
@@ -2649,7 +2780,7 @@
% \section{The Environment Definitions}
%
% After these preparations we are able to define the environments. They
-% only differ in the initialisations of =\d at llar...=, =\col at sep=
+% only differ in the initializations of =\d at llar...=, =\col at sep=
% and =\@halignto=.
%
% \begin{macro}{\@halignto}
@@ -2656,7 +2787,7 @@
% \begin{macro}{\d at llarbegin}
% \begin{macro}{\d at llarend}
% =\d at llar= has to be
-% locally asigned since otherwise nested \textsf{tabular} and \textsf{array}
+% locally assigned since otherwise nested \textsf{tabular} and \textsf{array}
% environments (via =\multicolumn=) are impossible.
% For 25 years or so =\@halignto= was set globally (to save space on the
% save stack, but that was a mistake: if there is a tabular in the
@@ -2664,7 +2795,7 @@
% able overwrite the =\@halignto=
% setting of a tabular in the main text resulting in a very weird error.
% \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)}
-% \changes{v2.0g}{1992/06/18}{`d at llarbegin defined on toplevel.}
+% \changes{v2.0g}{1992/06/18}{`d at llarbegin defined on top-level.}
% When the new font selection scheme is in force we have to
% we surround all =\halign= entries
% with braces. See remarks in TUGboat 10\#2. Actually we are going
@@ -2714,7 +2845,7 @@
% \begin{macro}{\tabular}
% \begin{macro}{\tabular*}
% The environments \textsf{tabular} and \textsf{tabular$*$} differ
-% only in the initialisation of the command =\@halignto=. Therefore
+% only in the initialization of the command =\@halignto=. Therefore
% we define
% \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)}
% \begin{macrocode}
@@ -2996,7 +3127,7 @@
% rewrites (in the token register "\NC at list") will look like
% "\NC at do *" "\NC at do C" "\NC at do L".
% So we need to define "\NC at do" as a one argument macro which
-% initialises the rewriting of the specified column. Let us assume that
+% initializes the rewriting of the specified column. Let us assume that
% `C' is the argument.
% \begin{macrocode}
\def\NC at do#1{%
@@ -3064,7 +3195,7 @@
% \end{macro}
%
% \subsection{The $*$--form}
-% We view the $*$-form as a slight generalisation of the system
+% We view the $*$-form as a slight generalization of the system
% described in the previous subsection. The idea is to define a $*$
% column by a command of the form:
% \begin{verbatim}
@@ -3440,7 +3571,7 @@
% \subsection{Implementing column types \texttt{w} and \texttt{W}}
%
% In TugBoat 38/2 an extension was presented that implemented two
-% aditional column types \texttt{w} and \texttt{W}. These have now
+% additional column types \texttt{w} and \texttt{W}. These have now
% been added to the package itself.
%
%
@@ -3502,7 +3633,7 @@
% the cell content is too wide.
% \changes{v2.4f}{2017/11/07}{Column type added}
% \changes{v2.5a}{2020/04/06}{Use \cs{d at llarbegin} and \cs{d at llarend} so
-% that cell is typeset in mathmode inside \texttt{array} (gh/297)}
+% that cell is typeset in math mode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{W}[2]
{>{\begin{lrbox}\ar at cellbox\d at llarbegin}%
@@ -3517,14 +3648,53 @@
% \end{macro}
%
%
+% \subsection{Handling \cs{cline}}
%
+% In the past \pkg{array} did not have to concern itself with
+% \cs{cline} but simply used the definition already provided in the
+% kernel. However, for tagged PDF output this definition is
+% insufficient, because it causes incorrect row counting and the rules
+% it generates would need to be marked as artifacts.
+% We therefore update it here.
%
%
+% \begin{macro}{\@cline}
+% Tagging support for \cs{cline}
+% \changes{v2.6e}{2024/07/13}{Support for tagging \cs{cline} (tagging/134)}
% \begin{macrocode}
+\ExplSyntaxOn
+\def\@cline#1-#2\@nil{
+ \omit
+ \@multicnt#1
+ \advance\@multispan\m at ne
+ \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
+ \@multicnt#2
+ \advance\@multicnt-#1
+ \advance\@multispan\@ne
+% \end{macrocode}
+% The rule needs artifact tagging in tagged PDF.
+% \begin{macrocode}
+ \UseTaggingSocket{tbl/leaders/begin}
+ \leaders\hrule\@height\arrayrulewidth\hfill
+ \UseTaggingSocket{tbl/leaders/end}
+% \end{macrocode}
+% To the row counting the above appears like an extra row, so we
+% have to correct the count.
+% \begin{macrocode}
+ \tbl_gdecr_row_count:
+ \cr
+ \noalign{\vskip-\arrayrulewidth}
+}
\ExplSyntaxOff
% \end{macrocode}
+% \end{macro}
%
%
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+%
% \PrintIndex
% \PrintChanges
%
Modified: trunk/Master/texmf-dist/source/latex/tools/longtable.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tools/longtable.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/tools/longtable.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -28,7 +28,7 @@
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<package>
-% Try the 2020 version for any rollback before that date:
+% Try the 2020 version for any rollback before that date:
%<package>\DeclareRelease{}{1994-06-01}{longtable-2020-01-07.sty}
%<package>
%<package>\DeclareRelease{v4.13}{2020-01-02}{longtable-2020-01-07.sty}
@@ -38,7 +38,7 @@
%<driver> \ProvidesFile{longtable.drv}
% \fi
% \ProvidesFile{longtable.dtx}
- [2024-04-26 v4.20 Multi-page Table package (DPC)]
+ [2024-10-27 v4.22 Multi-page Table package (DPC)]
%
% \iffalse
%<*driver>
@@ -179,7 +179,7 @@
% \env{longtable}, which has most of the features of the \env{tabular}
% environment, but produces tables which may be broken by \TeX's
% standard page-breaking algorithm. It also shares some features with
-% the \env{table} environment. In particular it uses the same counter,
+% the \env{table} environment. In particular it uses by default the same counter,
% \texttt{table}, and has a similar "\caption" command. Also, the
% standard "\listoftables" command lists tables produced by either the
% \env{table} or \env{longtable} environments.
@@ -335,6 +335,29 @@
% \caption{A floating table}
% \end{table}
%
+% \section{Counter and Caption Types}
+%
+% As mentioned in the introduction \env{longtable} uses and updates by default
+% the \texttt{table} counter, the "\caption" command creates a table caption
+% which is added to the list of tables.
+% Packages like \pkg{ltcaption} added more flexibility here by adding the
+% command "\LTcaptype" which allowed to change the type, e.g. to a listing.
+% Starting with version 4.21 \pkg{longtable} supports this command directly.
+% \DescribeMacro{\LTcaptype}%
+% By redefining this command it is possible to change the counter and caption type.
+% After "\renewcommand\LTcaptype{"\meta{counter}"}" \env{longtable} will update
+% the counter \meta{counter}, use "\fnum@"\meta{counter} in the caption (which
+% typically will make use of "\"\meta{counter}"name" and "\the"\meta{counter}), and
+% write content line entries into the file with the extension stored in the
+% command "\ext@"\meta{counter}. When \pkg{hyperref} is loaded the name of
+% the anchor will use \meta{counter} too. Packages or documents that change
+% "\LTcaptype" to some nonstandard value must ensure that the counter
+% \meta{counter} and the commands "\fnum@"\meta{counter}
+% and "\ext@"\meta{counter} exist and do not error.
+% If "\LTcaptype" is empty no counter is advanced and "\"\meta{counter}"name" in
+% the caption is suppressed.
+%
+%
% \section{Captions and Headings}
%
% At the start of the table one may specify lines which are to appear at
@@ -907,6 +930,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\LTcaptype}
+% The name used as counter, in caption, "\addcontentsline" and in targets.
+% "\providecommand" is used for compability with \pkg{ltcaption}
+% \changes{v4.21}{2024/07/04}
+% {Added \cs{LTcaptype} to support other types beside table.}
+% \begin{macrocode}
+\providecommand\LTcaptype{table}
+% \end{macrocode}
+% \end{macro}
% \subsection{Internal Parameters}
%
% \begin{macro}{\LT at head}
@@ -957,8 +989,11 @@
% are preserved correctly when "\includeonly" is used. In the rest of
% the file "\LT at tables" has been replaced by "\c at LT@tables" without
% further comment.
+% \changes{v4.21}{2024/07/04}
+% {Provide a \cs{theH}-representation for targets.}
% \begin{macrocode}
\newcounter{LT at tables}
+\providecommand\theHLT at tables{\theLT at tables}
% \end{macrocode}
% \end{macro}
%
@@ -1050,12 +1085,12 @@
\LT at err{longtable not in 1-column mode}\@ehc
\fi
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/vmode/begin}%
% \end{macrocode}
-%
+%
% \begin{macrocode}
\begingroup
% \end{macrocode}
@@ -1080,6 +1115,9 @@
% Since Version 3.02, \package{longtable} has used the internal counter
% "\c at LT@tables". The \LaTeX\ counter "table" is still incremented
% so that "\caption" works correctly.
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} instead of \texttt{table} in various places
+% to support other types beside table.}
% \begin{macrocode}
\def\LT at array[#1]#2{%
% \end{macrocode}
@@ -1097,25 +1135,31 @@
% TODO: When a line is killed the structure subtree is there already
% too and must be removed. If hard to do, then maybe at first warn if the
% construction is used.
-%
+%
% \cs{LT at array} is executed in a group, so we can disable para-tagging here.
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/init}
- \@kernel at refstepcounter{table}\stepcounter{LT at tables}
+ \tl_if_empty:eTF { \LTcaptype }
+ {
+ \tl_gset:Ne \@currentHref {LT at tables.\theHLT at tables}
+ }
+ {
+ \@kernel at refstepcounter{\LTcaptype}\stepcounter{LT at tables}
% \end{macrocode}
-% The target is created rather late and a \cs{label} can come earlier,
+% The target is created rather late and a \cs{label} can come earlier,
% so we have to define \cs{@currentHref} explicitly. We can't currently
% assume that \cs{theHtable} is defined always.
% \begin{macrocode}
- \tl_gset:Ne \@currentHref {table.\cs_if_exist_use:N\theHtable}
+ \tl_gset:Ne \@currentHref {\LTcaptype.\cs_if_exist_use:c {theH\LTcaptype}}
+ }
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_gzero_row_count:
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/init}
@@ -1225,7 +1269,7 @@
\begingroup
\@mkpream{#2}%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_count_table_cols:
@@ -1271,12 +1315,12 @@
\tabskip\z@ \@arstrut
% \end{macrocode}
% Insert the tagging socket to start the row and initialize the cell
-% data for the row.
+% data for the row.
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/row/begin}%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_init_cell_data_for_row:
@@ -1314,7 +1358,7 @@
column:~ \the\g_@@_col_int
}
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\tbl_if_row_was_started:T
@@ -1399,7 +1443,7 @@
% We also have to make sure that this breakpoint doesn't affect how the next
% page is broken, so we make the penalty 9999 (10000 is infinite and thus not
% a legal breakpoint) and cancel out the "\kern" with a new "\kern".
-%
+%
% I don't think this is the \emph{right} solution to the problem (that would be
% that the standard output routine has a feature for syncronizing with
% typesetting, as part of the preparations for switching output routine), but
@@ -1476,9 +1520,17 @@
\maxdepth\z@
\fi
% \end{macrocode}
-%
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} to support other types beside table and handle
+% the case if it is empty.}
% \begin{macrocode}
- \MakeLinkTarget{table}
+ \tl_if_empty:eTF{\LTcaptype}
+ {
+ \MakeLinkTarget{LT at tables}
+ }
+ {
+ \MakeLinkTarget{\LTcaptype}
+ }
% \end{macrocode}
% Put the table head on the page, and then switch to the new output
% routine.
@@ -1487,12 +1539,12 @@
% \begin{macrocode}
\ifvoid\LT at firsthead\copy\LT at head\else\box\LT at firsthead\fi\nobreak
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/head}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\output{\LT at output}}
\ExplSyntaxOff
@@ -1524,18 +1576,18 @@
% \begin{macrocode}
\tbl_crcr:n {endlongtable}
% \end{macrocode}
-%
+%
% \changes{v4.01}{1996/04/11}
% {(DPC) use \cs{noalign} to sneak in \cs{LT at entry@chop}}
% \begin{macrocode}
\noalign{%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/finalize}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\let\LT at entry\LT at entry@chop
\xdef\LT at save@row{\LT at save@row}}%
@@ -1579,19 +1631,28 @@
\ifx\LT at save@row\LT@@@@save at row
\else
\LT at warn{Column~ widths~ have~ changed\MessageBreak
- in~ table~ \thetable}%
+ in~
+ \tl_if_empty:eTF{\LTcaptype}
+ {longtable~ \theLT at tables}
+ {\LTcaptype\c_space_tl\use:c{the\LTcaptype}}
+ }
\LT at final@warn
\fi
% \end{macrocode}
-% Force one more go with the \env{longtable} output routine.
+% Force one more go with the \env{longtable} output routine.
+% Guard the special start of page value of "\pagegoal".
% \changes{v4.14}{2020/02/07}
% {Rearrange vertical space tests for tools/3512 (floats on same page)}
+% \changes{v4.22}{2024/10/27}
+% {Keep \cs{pagegoal} below \cs{maxdimen} gh1495}
% \begin{macrocode}
\endgraf\penalty -\LT at end@pen
\ifvoid\LT at foot\else
\global\advance\vsize\ht\LT at foot
\global\advance\@colroom\ht\LT at foot
- \dimen@\pagegoal\advance\dimen@\ht\LT at foot\pagegoal\dimen@
+ \ifdim\pagegoal<\maxdimen
+ \dimen@\pagegoal\advance\dimen@\ht\LT at foot\pagegoal\dimen@
+ \fi
\fi
% \end{macrocode}
% Now close the group to return to the standard routine.
@@ -1613,7 +1674,7 @@
% \begin{macrocode}
\ifvoid\footins\else\insert\footins{}\fi
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/vmode/end}%
@@ -2161,7 +2222,6 @@
\tbl_gdecr_row_count:
\penalty\@M}
\@gtempa}
-\ExplSyntaxOff
%<@@=>
% \end{macrocode}
% \end{macro}
@@ -2187,14 +2247,22 @@
% {Add new control argument}
% \changes{v4.16}{2021/05/07}
% {use \cs{ext at table} gh/561}
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} to support other types beside table.}
% \begin{macrocode}
-\def\LT at c@ption#1[#2]#3{%
- \LT at makecaption#1\fnum at table{#3}%
- \def\@tempa{#2}%
- \ifx\@tempa\@empty\else
- {\let\\\space
- \addcontentsline{\ext at table}{table}{\protect\numberline{\thetable}{#2}}}%
- \fi}
+\def\LT at c@ption#1[#2]#3{
+ \tl_if_empty:eTF{\LTcaptype}
+ {\LT at makecaption\@gobble{}{#3}}
+ {\LT at makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}
+ \def\@tempa{#2}
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addcontentsline
+ {\@nameuse{ext@\LTcaptype}}
+ {\LTcaptype}
+ {\protect\numberline{\@nameuse{the\LTcaptype}}{#2}}}
+ \fi}}
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
%
@@ -2375,7 +2443,7 @@
\ExplSyntaxOn
\def\LT at end@hd at ft#1{%
% \end{macrocode}
-%
+%
% This command is used to store the head and foot boxes.
% We need to retrieve and store the row so that we can clean
% up the structure in the finalize code.
@@ -2388,7 +2456,7 @@
% \end{macrocode}
% TODO: This is exposing internal counters, so it should be encapsulated
% in some interface command (but I'm not sure what that should be
-% called, so not done yet.
+% called, so not done yet.
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_count_missing_cells:n {head/foot}
@@ -2413,19 +2481,28 @@
% To get out of this trap we run \cs{crcr} (which would normally
% come inside \cs{LT at echunk}. That will then trigger \cs{everycr}
% and update row counter unnecessarily, but now we have a defined state, so
-% we can use \cs{noalign} to undo that.
+% we can use \cs{noalign} to undo that.
% We also change \cs{LT at rows} so that further \cs{cr}s do not do
% any harm (as explained above.
%
% The \cs{crcr} inside \cs{LT at echunk} will be bypassed in that case
% as we have just executed a \cs{crcr} and are still in scanning modus for
-% \cs{omit} or \cs{noalign}.
+% \cs{omit} or \cs{noalign}.
% \begin{macrocode}
{
\crcr
\noalign{
% \end{macrocode}
-%
+% \changes{v4.22}{2024/08/13}{Store header row numbers}
+% \begin{macrocode}
+ \int_step_inline:nn
+ { \LT at rows }
+ {
+ \seq_gput_left:ce
+ {g_@@_\cs_to_str:N #1 _rows_seq }
+ { \int_eval:n {\g_@@_row_int - ##1 } }
+ }
+% \end{macrocode}
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_gdecr_row_count: % undo the increment
@@ -2442,7 +2519,7 @@
{Increase~ LTchunksize}%
\fi
\setbox#1\box\z@
- \@@_trace:n {-->>~ Saving~\noexpand#1}
+ \@@_trace:n {-->>~ Saving~\noexpand#1}
\LT at get@widths
\LT at bchunk}
% \end{macrocode}
@@ -2501,7 +2578,7 @@
\bgroup
% \end{macrocode}
% \changes{v4.12}{2019/02/06}{Color group to match array package}
-% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}%
+% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}
% \begin{macrocode}
\color at begingroup
\let\@footnotetext\LT at p@ftntext
@@ -2509,7 +2586,7 @@
\@arrayparboxrestore
\everypar{%
\vrule \@height \ht\@arstrutbox \@width \z@
- \everypar{}}%
+ \everypar{}}%
}
% \end{macrocode}
% \end{macro}
Modified: trunk/Master/texmf-dist/source/latex/tools/multicol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tools/multicol.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/tools/multicol.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -20,7 +20,7 @@
% \iffalse This is a METACOMMENT
%
%% Package `multicol' to use with LaTeX2e
-%% Copyright 1989-2023 Frank Mittelbach
+%% Copyright 1989-2024 Frank Mittelbach
%%
%% In addition to the terms of LPPL any distributed version
%% (unchanged or modified) of multicol has to keep the statement
@@ -77,7 +77,7 @@
%% not for the payment of a license fee per se (which might or might
%% not follow from this evaluation).
%%
-%% The license fee, if any, can be payed either to the LaTeX fund
+%% The license fee, if any, can be paid either to the LaTeX fund
%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
%% the program who can be contacted at
%%
@@ -98,7 +98,7 @@
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2024/05/23 v1.9h multicolumn formatting (FMi)]
+ [2024/09/14 v1.9i multicolumn formatting (FMi)]
%
%
%
@@ -403,12 +403,17 @@
% the most important is called |\tolerance|: this controls the
% allowed `looseness' (i.e.\ the amount of blank space between words).
% Its default value is 200 (the \LaTeX{} |\fussy|) which is too
-% small for narrow columns. On the other hand the |\sloppy|
-% declaration (which sets |\tolerance| to $10000=\infty$) is too
-% large, allowing really bad spacing.\footnote{Look at the next
-% paragraph, it was set with the \cs{sloppy} declaration.}
+% small for narrow columns.
+
+% Setting it to \texttt{10000} (a.k.a.\ $\infty$) means arbitrary bad
+% lines are possible. With that setting \LaTeX{} will make most lines
+% perfect but intermix them with really bad lines. This was the
+% setting originally used by \cs{sloppy} (nowadays it is a bit more
+% cautious and used \texttt{9999} which makes a huge
+% difference).\footnote{Look at the next paragraph, it was set with
+% the \cs{tolerance}\texttt{=10000}.}
%
-% \begin{sloppypar}
+% \begin{sloppypar}\tolerance=10000
% \DescribeMacro\multicoltolerance \DescribeMacro\multicolpretolerance
% We therefore use a |\multicoltolerance| parameter for the
% |\tolerance| value inside the \mc{} environment. Its default value
@@ -417,10 +422,10 @@
% be done outside the \mc{} environment. Since |\tolerance| is set
% to |\multicoltolerance| at the beginning of every \textsf{multicols}
% environment one can locally overwrite this default by assigning
-% \verb*+\tolerance = +\meta{desired value}. There also exists a
+% \cs{tolerance}\texttt{=}\meta{desired value}. There also exists a
% |\multicolpretolerance| parameter holding the value for
% |\pretolerance| within a \mc{} environment. Both parameters are
-% usually used only by package designers.
+% usually used only by package or class designers.
% \end{sloppypar}
%
% Generation of multicolumn output can be divided into two parts. In
@@ -679,7 +684,7 @@
% this value will additionally trace the mark handling
% algorithm. It will show what marks are found, what marks are
% considered, etc. To fully understand this information you will
-% probably have to read carefully trough the implementation.
+% probably have to read carefully through the implementation.
% \item[$\meta{number}\geq 4$.] Setting \meta{number}\pagebreak[2] to
% such a high value will additionally place an |\hrule| into your
% output, separating the part of text which had already been
@@ -1945,7 +1950,7 @@
% the balancing happened in the output routine then \TeX{} reverts
% to the |\prevdepth| that was current before the OR once the OR has
% finished. In short |\prevdepth| is something you can't set
-% globally it is alway local to the current list being built. Thus
+% globally it is always local to the current list being built. Thus
% we need to set it back to zero here to avoid incorrect spacing.
% \changes{v1.8h}{2014/09/12}{Set \cs{prevdepdth} for current vlist
% when returning from multicols environment}
@@ -2216,7 +2221,7 @@
% \begin{macro}{\multicolmindepthstring}
% The default minimum depth of each column corresponds to the depth
% of a `p' in the current font. This makes sense for Latin-based
-% languages and was hard-wired intitially, but for Asian languages
+% languages and was hard-wired initially, but for Asian languages
% it is better to use a zero depth (and alternatively one might
% want to use the depth of a strut or a parentheses). So we now
% offer a way to adjust this while maintaining backward
@@ -2462,7 +2467,7 @@
% If |\kept at firstmark| is non-empty then |\kept at botmark| must be
% non-empty too so we can use their values. Otherwise we use the
% value of |\kept at topmark| which was first initialized when we
-% gathered the |\partical at page| and later on was updated to the
+% gathered the |\partial at page| and later on was updated to the
% |\botmark| for the preceding page.
%
% \changes{v1.4a}{1992/02/14}{\cs{botmark} set to \cs{splitbotmark}}
@@ -2938,7 +2943,7 @@
% marks from this box. This has to be done \emph{before} we add a
% penalty of $-10000$ to the top of the box, otherwise only an
% empty box will be considered. But even that is not enough: the box
-% may contain \cs{columnbreak}s in which case doing some artifical
+% may contain \cs{columnbreak}s in which case doing some artificial
% splitting to get the marks out still fails to see all marks
% unless we take some special precaution in \cs{get at keptmarks}
% (which is now done).
@@ -3625,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}
@@ -3652,6 +3667,7 @@
\fi
\ifnum\@floatpenalty=-\@Mii
\@Esphack
+ \UseTaggingSocket{float/hmode/end}%
\fi}}
% \end{macrocode}
% \end{macro}
Modified: trunk/Master/texmf-dist/source/latex/tools/theorem.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/tools/theorem.dtx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/tools/theorem.dtx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -24,7 +24,7 @@
%%
%
%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%
% \ProvidesFile{theorem.dtx}[\FMithmInfo]
%\iffalse % this is a METACOMMENT !
@@ -952,7 +952,6 @@
%
% \subsubsection{The \texttt{changebreak} style}
%
-% \begin{macrocode}
% This style option is stored in the file |thcb.sty|.
% \begin{macrocode}
%<*thcb>
Modified: trunk/Master/texmf-dist/source/latex/tools/tools.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/tools/tools.ins 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/source/latex/tools/tools.ins 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/amsmath/amsmath.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/amsmath/amsmath.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/amsmath/amsmath.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -25,8 +25,8 @@
[1994/12/01]% LaTeX date must be December 1994 or later
\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]
+\DeclareCurrentRelease{}{2024-10-30}
+\ProvidesPackage{amsmath}[2024/10/30 v2.17s AMS math features]
\edef\@temp{\catcode 96=\number\catcode 96 }
\catcode\string `\`=12
\def\do#1{\catcode\number`#1=\number\catcode`#1}
@@ -443,6 +443,10 @@
\@xp\Umathch@\meaning@\Umathch@
}
\fi
+{\uccode`7=`\\ \uccode`(=`i \uccode`)=`f
+ \uppercase{\gdef\testif@#1#2#3#4\testif@{%
+ \ifx7#1\ifx(#2\ifx)#3\@tempswafalse\fi\fi\fi}
+}}
\newcount\classnum@
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum at 4096
\ifcase\number\classnum@\or\or\gdef\thedots@{\dotsb@}\or
@@ -486,6 +490,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
@@ -520,7 +527,16 @@
\gdef\thedots@{\dotsb@}%
\else
\xdef\meaning@{\meaning\@let at token. .........}%
+ \@tempswatrue
+ \@xp\testif@\meaning at ....\testif@
+ \if at tempswa
+ \begingroup
+ \def\protect{\protect}% % make it a quark
+ \xdef\meaning@{\@xp\stripprotect@\@let at token.........\stripprotect at . .........}%
+ \endgroup
+ \fi
\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 +584,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/base/alltt.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/alltt.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/alltt.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -49,7 +49,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{alltt}
- [2024/02/08 v2.0g defines alltt environment]
+ [2024/07/07 v2.0g defines alltt environment]
\begingroup
\lccode`\~=`\'
\lowercase{\endgroup
Modified: trunk/Master/texmf-dist/tex/latex/base/article.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/article.cls 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/article.cls 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{article}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX document class]
\newcommand\@ptsize{}
\newif\if at restonecol
Modified: trunk/Master/texmf-dist/tex/latex/base/bk10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/bk10.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/bk10.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{bk10.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt\@xiipt
Modified: trunk/Master/texmf-dist/tex/latex/base/bk11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/bk11.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/bk11.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{bk11.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xipt{13.6}%
Modified: trunk/Master/texmf-dist/tex/latex/base/bk12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/bk12.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/bk12.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{bk12.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xiipt{14.5}%
Modified: trunk/Master/texmf-dist/tex/latex/base/book.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/book.cls 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/book.cls 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{book}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX document class]
\newcommand\@ptsize{}
\newif\if at restonecol
Modified: trunk/Master/texmf-dist/tex/latex/base/checkencodingsubset.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/checkencodingsubset.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/checkencodingsubset.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,8 +42,8 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%% From File: lttextcomp.dtx
-\Providesfile{checkencodingsubset.tex}
- [2024/01/27 v0.5a Figure out safe TS1 encoding subsets]
+\ProvidesFile{checkencodingsubset.tex}
+ [2024/10/18 v0.5b Figure out safe TS1 encoding subsets]
\let\typeoutdetails\typeout
\def\doesglyphexist#1#2{\iffontchar\testFont #1 0\else 1\relax \fi}
\def\glyphmissingdetails#1#2{\iffontchar\testFont #1 \else
Modified: trunk/Master/texmf-dist/tex/latex/base/doc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/doc.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/doc.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -52,7 +52,7 @@
\DeclareCurrentRelease{v3}{2022-06-01}
\ProvidesPackage{doc}
- [2024/04/26 v3.0p
+ [2024/10/23 v3.0q
Standard LaTeX documentation package V3 (FMi)]
%%
%% Package `doc' to use with LaTeX 2e
@@ -908,15 +908,6 @@
\expandafter\let\expandafter\doc at eoph@@k\csname doc.sty-h@@k\endcsname
\RequirePackage{hypdoc}
\expandafter\let\csname doc.sty-h@@k\endcsname\doc at eoph@@k
- \let\PrintDescribeMacro \@@PrintDescribeMacro
- \let\PrintDescribeEnv \@@PrintDescribeEnv
- \let\PrintMacroName \@@PrintMacroName
- \let\PrintEnvName \@@PrintEnvName
- \let\SpecialUsageIndex \@@SpecialUsageIndex
- \let\SpecialEnvIndex \@@SpecialEnvIndex
- \let\SortIndex \@@SortIndex
- \let\DescribeMacro \@@DescribeMacro
- \let\DescribeEnv \@@DescribeEnv
\ifx\special at index\@gobble % do we write index entries at all?
\else
\ifcodeline at index
@@ -1242,6 +1233,7 @@
idxgroup = environments ,
printtype = \textit{env.}
]{Env}{environment}
+\AddToHook{package/hypdoc/before}{%
\let\@@PrintDescribeMacro \PrintDescribeMacro
\let\@@PrintDescribeEnv \PrintDescribeEnv
\let\@@PrintMacroName \PrintMacroName
@@ -1251,6 +1243,18 @@
\let\@@SortIndex \SortIndex
\let\@@DescribeMacro \DescribeMacro
\let\@@DescribeEnv \DescribeEnv
+}
+\AddToHook{package/hypdoc/after}{%
+ \let\PrintDescribeMacro \@@PrintDescribeMacro
+ \let\PrintDescribeEnv \@@PrintDescribeEnv
+ \let\PrintMacroName \@@PrintMacroName
+ \let\PrintEnvName \@@PrintEnvName
+ \let\SpecialUsageIndex \@@SpecialUsageIndex
+ \let\SpecialEnvIndex \@@SpecialEnvIndex
+ \let\SortIndex \@@SortIndex
+ \let\DescribeMacro \@@DescribeMacro
+ \let\DescribeEnv \@@DescribeEnv
+}
\DeclareRobustCommand\cs[1]{\texttt{\bslash #1}}
\AddToHook{class/amsdtx/after}{%
Modified: trunk/Master/texmf-dist/tex/latex/base/fontmath.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/fontmath.cfg 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/fontmath.cfg 2024-11-01 21:25:37 UTC (rev 72739)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.cfg}
- [2024/02/09 v3.0i LaTeX Kernel
+ [2024/09/03 v3.0k LaTeX Kernel
(Uncustomized math font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex/base/fontmath.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/fontmath.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/fontmath.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.ltx}
- [2024/02/09 v3.0i 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/base/fonttext.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/fonttext.cfg 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/fonttext.cfg 2024-11-01 21:25:37 UTC (rev 72739)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.cfg}
- [2024/02/09 v3.0i LaTeX Kernel
+ [2024/09/03 v3.0k LaTeX Kernel
(Uncustomized text font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex/base/fonttext.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/fonttext.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/fonttext.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.ltx}
- [2024/02/09 v3.0i 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,9 +77,17 @@
\endgroup
\begingroup
\nfss at catcodes
+\input {t1cmss.fd}
+\input {t1cmtt.fd}
\input {ot1cmss.fd}
\input {ot1cmtt.fd}
\endgroup
+\ifx\Umathcode\@undefined\else
+\begingroup
+\nfss at catcodes
+\input {ts1cmr.fd}
+\endgroup
+\fi
\DeclareErrorFont{OT1}{cmr}{m}{n}{10}
\ifx\Umathcode\@undefined
\newcommand\encodingdefault{OT1}
Modified: trunk/Master/texmf-dist/tex/latex/base/latex.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/latex.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/latex.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -709,8 +709,8 @@
%%% From File: ltvers.dtx
\def\fmtname{LaTeX2e}
\edef\fmtversion
- {2024-06-01}
-\def\patch at level{2}
+ {2024-11-01}
+\def\patch at level{0}
\edef\development at branch@name{}
\iffalse
\def\reserved at a#1/#2/#3\@nil{%
@@ -1811,8 +1811,8 @@
\xdef#1{\the\toks@}%
\endgroup}
%%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.2e}
-\def\ltcmddate{2024-04-17}
+\def\ltcmdversion{v1.2f}
+\def\ltcmddate{2024-07-06}
\message{document commands,}
\ExplSyntaxOn
\tl_new:N \l__cmd_arg_spec_tl
@@ -2030,23 +2030,15 @@
}
\cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2
{
- \str_set:Nx \l__cmd_environment_str {#1}
- \str_set:Nx \l__cmd_environment_str
- { \tl_trim_spaces:o { \l__cmd_environment_str } }
- \cs_if_exist:cTF { \l__cmd_environment_str }
- {
- \msg_info:nnxx { cmd } { redefine-env }
- { \l__cmd_environment_str } { \tl_to_str:n {#2} }
- }
- {
- \msg_info:nnxx { cmd } { define-env }
- { \l__cmd_environment_str } { \tl_to_str:n {#2} }
- }
+ \str_set:Nn \l__cmd_environment_str {#1}
+ \cs_if_exist:cTF { #1 }
+ { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } }
+ { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } }
\bool_set_false:N \l__cmd_expandable_bool
\bool_set_true:N \l__cmd_environment_bool
- \exp_args:NV \__cmd_declare_env_internal:nnnn
- \l__cmd_environment_str {#2}
+ \__cmd_declare_env_internal:nnnn {#1} {#2}
}
+\cs_generate_variant:Nn \__cmd_declare_env:nnnn { e }
\cs_new_protected:Npn \__cmd_declare_env_internal:nnnn #1#2#3#4
{
\exp_args:Nc \__cmd_declare_cmd_internal:Nnnn { environment~ #1 } {#2}
@@ -4556,24 +4548,54 @@
}
\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
{
+ \__cmd_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \__cmd_new_env:nnnn #1
+ {
\cs_if_exist:cTF {#1}
- { \msg_error:nnx { cmd } { env-already-defined } {#1} }
{
+ \msg_error:nnx { cmd } { env-already-defined } {#1}
+ \use_none:nnn
+ }
+ {
\cs_if_exist:cTF { end #1 }
- { \msg_error:nnx { cmd } { env-end-already-defined } {#1} }
- { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ {
+ \msg_error:nnx { cmd } { env-end-already-defined } {#1}
+ \use_none:nnn
+ }
+ { \__cmd_declare_env:nnnn {#1} }
}
}
-\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+\cs_new_protected:Npn \__cmd_renew_env:nnnn #1
{
\cs_if_exist:cTF {#1}
- { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
- { \msg_error:nnx { cmd } { env-undefined } {#1} }
+ { \__cmd_declare_env:nnnn {#1} }
+ {
+ \msg_error:nnx { cmd } { env-undefined } {#1}
+ \use_none:nnn
+ }
}
-\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
- { \cs_if_exist:cF {#1} { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } }
-\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
- { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \__cmd_provide_env:nnnn #1
+ {
+ \cs_if_exist:cTF {#1}
+ { \use_none:nnn }
+ { \__cmd_declare_env:nnnn {#1} }
+ }
+\cs_generate_variant:Nn \__cmd_new_env:nnnn { e }
+\cs_generate_variant:Nn \__cmd_renew_env:nnnn { e }
+\cs_generate_variant:Nn \__cmd_provide_env:nnnn { e }
\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
{
\__cmd_check_definable:nNT {#1} \NewExpandableDocumentCommand
@@ -4842,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:
}
{
@@ -4907,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
@@ -4921,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 }
@@ -5789,7 +5813,9 @@
{ #2 { The~hook~is~empty } }
{
\__hook_log_line:x { Code~chunks: }
- \prop_if_empty:cTF { g__hook_#1_code_prop }
+ \bool_lazy_or:nnTF
+ { ! \prop_if_exist_p:c { g__hook_#1_code_prop } }
+ { \prop_if_empty_p:c { g__hook_#1_code_prop } }
{ \__hook_log_line_indent:x { --- } }
{
\prop_map_inline:cn { g__hook_#1_code_prop }
@@ -5884,16 +5910,19 @@
}
\cs_new_protected:Npn \__hook_list_rules:nn #1 #2
{
- \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
- \prop_map_inline:cn { g__hook_#1_code_prop }
+ \prop_if_exist:cT { g__hook_#1_code_prop }
{
+ \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
\prop_map_inline:cn { g__hook_#1_code_prop }
{
- \__hook_if_label_case:nnnnn {##1} {####1}
- { \prop_map_break: }
- { \__hook_list_one_rule:nnn {##1} {####1} }
- { \__hook_list_one_rule:nnn {####1} {##1} }
- {#1}
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_list_one_rule:nnn {##1} {####1} }
+ { \__hook_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
}
}
}
@@ -6220,6 +6249,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:. \\
@@ -6358,6 +6391,8 @@
\NewDocumentCommand \ClearHookRule { m m m }
{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF
+\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT
+\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF
\cs_new_eq:NN \IfHookExistsTF \__hook_if_usable:nTF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cs_new_protected:Npn \hook_disable:n
@@ -6957,7 +6992,7 @@
{
\cs_generate_from_arg_count:cNnn
{ __socket_#1_plug_#2:w }
- \cs_new_protected:Npn
+ \cs_new:Npn
{ \int_use:c { c__socket_#1_args_int } }
{#3}
\seq_put_right:cn { l__socket_#1_plugs_seq } {#2}
@@ -6976,7 +7011,7 @@
{
\cs_generate_from_arg_count:cNnn
{ __socket_#1_plug_#2:w }
- \cs_set_protected:Npn
+ \cs_set:Npn
{ \int_use:c { c__socket_#1_args_int } }
{#3}
\__socket_debug_term:n
@@ -7016,6 +7051,10 @@
\cs_new_eq:NN \socket_use:nn \socket_use:nw % socket with one input
\cs_new_eq:NN \socket_use:nnn \socket_use:nw % socket with two inputs
\cs_new_eq:NN \socket_use:nnnn \socket_use:nw % socket with three inputs
+\cs_new:Npn \socket_use_expandable:nw #1 {
+ \use:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w }
+}
+\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs
\msg_new:nnnn { socket } { already-declared }
{ Socket~ '#1'~ already~ declared! }
@@ -7890,23 +7929,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
@@ -8524,6 +8573,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{%
@@ -8696,6 +8747,8 @@
\let \IfDocumentMetadataTF \@firstoftwo
\DocumentMetadata
}
+\ExplSyntaxOn
+\int_new:N\g__kernel_target_int
\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
\ifvmode
\special{}%
@@ -8703,8 +8756,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}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -8817,50 +8881,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
@@ -9625,6 +9685,8 @@
\global\expandafter\let\csname cl@#1\endcsname\@empty
\@addtoreset{#1}{@ckpt}%
\global\expandafter\let\csname p@#1\endcsname\@empty
+ \expandafter\xdef\csname theH#1\endcsname{%
+ \noexpand\the\noexpand\value{#1}}%
\expandafter
\ifx\csname the#1\endcsname\relax
\expandafter
@@ -9634,7 +9696,11 @@
\@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\xdef\csname theH#1\endcsname{%
+ \expandafter\noexpand\csname theH#2\endcsname.%
+ \noexpand\the\noexpand\value{#1}}%
+}
\def\@removefromreset#1#2{%
\@ifundefined{c@#2}\relax
{\begingroup
@@ -9728,7 +9794,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}
@@ -10201,6 +10268,7 @@
\hbadness\@M
\hfuzz\maxdimen
\tracingonline\z@
+ \tracinglostchars\z@
\everypar={}%
\leftskip\z at skip
\rightskip\z at skip
@@ -13273,11 +13341,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}
@@ -13337,14 +13421,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 }
@@ -13467,8 +13548,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
{
@@ -13482,6 +13563,8 @@
}
\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF}
\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} }
+\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} }
\cs_new_protected:Npn \property_ref_undefined_warn:
{
\flag_if_raised:nT { l__property_ref_flag }
@@ -13644,7 +13727,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}}%
@@ -13662,6 +13745,7 @@
\fi
\UseHook{env/#1/begin}%
}
+
\edef\end
{\unexpanded{%
\romannumeral
@@ -13680,6 +13764,7 @@
}%
\expandafter\noexpand\csname end \endcsname
}
+
\@namedef{end }#1{%
\romannumeral
\IfHookEmptyTF{env/#1/end}%
@@ -13686,7 +13771,7 @@
{\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
}
@@ -14233,11 +14318,20 @@
\def\@doendpe{\@endpetrue
\def\par{\@restorepar
\clubpenalty\@clubpenalty
- \everypar{}\par\@endpefalse}\everypar
- {{\setbox\z@\lastbox}%
- \everypar{}\@endpefalse}}
+ \@endpefalse
+ \everypar{}\par}%
+ \everypar
+ {{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}}
\newif\if at endpe
-\@endpefalse
+\def\@endpefalse{\global\let\if at endpe\iffalse}
+\def\@endpetrue {%
+ \global\let\if at endpe\iftrue
+ \ifnum\currentgrouplevel>\z@
+ \aftergroup\propagate at doendpe
+ \fi
+}
+\def\propagate at doendpe{\if at endpe \@doendpe \fi}
\def\@mklab#1{\hfil #1}
\def\item{%
\@inmatherr\item
@@ -14405,12 +14499,14 @@
\kern\z@}}
\let\set at color\relax
\let\color at begingroup\begingroup
-\def\color at endgroup{\endgraf\endgroup}
\def\color at setgroup{\color at begingroup} % changed further in color package
\let\normalcolor\relax % remains untouched; only changed in a color package
\def\color at hbox{\hbox\bgroup\color at begingroup}
\def\color at vbox{\vbox\bgroup\color at begingroup}
\def\color at endbox{\color at endgroup\egroup}
+
+\def\color at endgroup{\endgraf\@endpefalse\endgroup}
+
\def\newsavebox#1{\@ifdefinable{#1}{\newbox#1}}
\DeclareRobustCommand\savebox[1]{%
\@ifnextchar(%)
@@ -16072,7 +16168,6 @@
%% Copyright (C) 2022-2024
%% Frank Mittelbach, The LaTeX Project
%%% From File: ltmarks.dtx
-%% \end{function}
\ExplSyntaxOn
\seq_new:N \g__mark_classes_seq
@@ -16425,6 +16520,12 @@
\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
\mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
}
+\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} {
+ \mark_if_eq:nnnnT {#1}{#2}{#3}{#4}
+}
+\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} {
+ \mark_if_eq:nnnnF {#1}{#2}{#3}{#4}
+}
\cs_new_protected:Npn \__mark_update_singlecol_structures: {
\box_if_vertical:NTF \@outputbox
{
@@ -16780,7 +16881,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{%
@@ -17133,7 +17236,11 @@
\ifx\@currext\@clsextension
document class%
\else
- package%
+ \ifx\@currext\@pkgextension
+ package%
+ \else
+ file%
+ \fi
\fi}
\@onlypreamble\@cls at pkg
\def\@unknownoptionerror{%
@@ -17337,6 +17444,13 @@
\pkgcls at debug{\@spaces 4: #4}%
\def\pkgcls at name{#1}% % for info message
\def\pkgcls at arg {#3}% % for info message
+ \edef\pkgcls at ext{%
+ \ifx#4\@clsextension document class\else
+ \ifx#4\@pkgextension package\else
+ file
+ \fi
+ \fi
+ }% % for info message
\pkgcls at parse@date at arg{#3}%
\let\pkgcls at candidate\@empty
\begingroup
@@ -17378,7 +17492,7 @@
\ifnum \@parse at version0#1//00\@nil > \pkgcls at targetdate
\@latex at warning@no at line{Suspicious rollback/min-date date given\MessageBreak
A minimal date of #1 has been specified for
- \@cls at pkg\MessageBreak '\pkgcls at name'.\MessageBreak
+ \pkgcls at ext\MessageBreak '\pkgcls at name'.\MessageBreak
But this is in conflict
with a rollback request to \requestedpatchdate}
\fi
@@ -17434,6 +17548,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
}
@@ -17526,7 +17641,40 @@
{ \q_recursion_tail } { }
\q_recursion_stop
\group_end:
+\cs_new_protected:cpn { \c__keys_props_root_str .pass-to-packages }
+ {
+ \bool_if:NTF \l__keys_no_value_bool
+ { \__keys_scope:n { true } }
+ { \__keys_scope:n }
+ }
+\cs_new_protected:Npn \__keys_scope:n #1
+ {
+ \str_case:nnF {#1}
+ {
+ { true }
+ { \__keys_scope:N \clist_put_right:NV }
+ { false }
+ { \__keys_scope:N \clist_remove_all:NV }
+ }
+ {
+ \msg_error:nnnn { keys }
+ { choice-unknown }
+ { .pass-to-packages }
+ {#1}
+ }
+ }
+\cs_new_protected:Npn \__keys_scope:N #1
+ {
+ \exp_after:wN \__keys_find_key_module:wNN
+ \l_keys_path_str \s__keys_stop
+ \l_keys_key_tl \l_keys_key_str
+ #1 \l__keys_forced_global_clist \l_keys_key_str
+ }
+\cs_generate_variant:Nn \clist_if_in:NnT { Ne }
+\cs_generate_variant:Nn \clist_if_in:NnTF { Ne }
\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
+\clist_new:N \l__keys_class_only_clist
+\clist_new:N \l__keys_forced_global_clist
\clist_new:N \l__keys_options_clist
\bool_new:N \l__keys_options_loading_bool
\cs_new_protected:Npn \__keys_options:n #1
@@ -17579,19 +17727,12 @@
{
\cs_if_free:cF { @raw at opt@ \@currname . \@currext }
{
- \keys_if_exist:nnTF {#1} { unknown }
+ \clist_map_inline:cn { @raw at opt@ \@currname . \@currext }
{
- \clist_put_right:Nv \l__keys_options_clist
- { @raw at opt@ \@currname . \@currext }
+ \exp_args:Ne \__keys_options_class:nnn
+ { \tl_trim_spaces:e { \__keys_remove_equals:n {##1} } }
+ {##1} {#1}
}
- {
- \clist_map_inline:cn { @raw at opt@ \@currname . \@currext }
- {
- \exp_args:Ne \__keys_options_class:nnn
- { \tl_trim_spaces:e { \__keys_remove_equals:n {##1} } }
- {##1} {#1}
- }
- }
}
}
\cs_new_protected:Npn \__keys_options_class:nnn #1#2#3
@@ -17598,14 +17739,23 @@
{
\keys_if_exist:nnTF {#3} {#1}
{
- \clist_put_right:Nn \l__keys_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \__keys_options_class:nn {#1} {#2}
+ \clist_put_right:Ne \l__keys_class_only_clist { \tl_to_str:n {#1} }
}
{
- \clist_if_in:NnF \@unusedoptionlist {#1}
- { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ \keys_if_exist:nnTF {#3} { unknown }
+ { \__keys_options_class:nn {#1} {#2} }
+ {
+ \clist_if_in:NnF \@unusedoptionlist {#1}
+ { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ }
}
}
+\cs_new_protected:Npn \__keys_options_class:nn #1#2
+ {
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_put_right:Nn \l__keys_options_clist {#2}
+ }
\cs_new_protected:Npn \__keys_options_package:n #1
{
\clist_map_inline:Nn \@raw at classoptionslist
@@ -17619,10 +17769,19 @@
{
\keys_if_exist:nnT {#3} {#1}
{
- \clist_put_right:Nn \l__keys_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_if_in:NeTF \l__keys_class_only_clist { \tl_to_str:n {#1} }
+ {
+ \clist_if_in:NeT \l__keys_forced_global_clist { \tl_to_str:n {#1} }
+ { \__keys_options_package:nn {#1} {#2} }
+ }
+ { \__keys_options_package:nn {#1} {#2} }
}
}
+\cs_new_protected:Npn \__keys_options_package:nn #1#2
+ {
+ \clist_put_right:Nn \l__keys_options_clist {#2}
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ }
\cs_new_protected:Npn \__keys_options_local:
{
\cs_if_eq:NNF \@currext \@clsextension
@@ -19527,17 +19686,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
{
@@ -19545,8 +19698,10 @@
{ \prg_return_false: }
}
}
+\cs_new:Npn \tag_socket_use_expandable:n #1 { }
\cs_new_protected:Npn \tag_socket_use:n #1 { }
\cs_new_protected:Npn \tag_socket_use:nn #1#2 { }
+\cs_new_protected:Npn \tag_socket_use:nnn #1#2#3 { #3 }
\cs_new_protected:Npn \UseTaggingSocket #1 {
\int_case:nnF
{ \int_use:c { c__socket_tagsupport/#1_args_int } }
@@ -19553,11 +19708,53 @@
{
0 \prg_do_nothing:
1 \use_none:n
- 2 \use_none:nn
+ 2 \use_ii:nn
}
\ERRORusetaggingsocket % that should get a proper error message
}
+\cs_new:Npn \UseExpandableTaggingSocket #1 {
+ \int_case:nnF
+ { \int_use:c { c__socket_tagsupport/#1_args_int } }
+ {
+ 0 \prg_do_nothing:
+ 1 \use_none:n
+ 2 \use_ii:nn
+ }
+ \ERRORusetaggingsocket % that should get a proper error message
+}
+\int_new:N \l__tag_block_flattened_level_int
+\NewSocket{tagsupport/para/restore}{0}
+\NewSocketPlug{tagsupport/para/restore}{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
+ \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}
+\NewSocket{tagsupport/toc/starttoc/after}{1}
+\NewSocket{tagsupport/toc/leaders/before}{0}
+\NewSocket{tagsupport/toc/leaders/after}{0}
\NewSocket{tagsupport/tbl/cell/begin}{0}
\NewSocket{tagsupport/tbl/cell/end}{0}
\NewSocket{tagsupport/tbl/row/begin}{0}
@@ -19565,7 +19762,9 @@
\NewSocket{tagsupport/tbl/pcell/begin}{0}
\NewSocket{tagsupport/tbl/pcell/end}{0}
\NewSocket{tagsupport/tbl/init}{0}
+\NewSocket{tagsupport/tbl/init/celldata}{0}
\NewSocket{tagsupport/tbl/finalize}{0}
+\NewSocket{tagsupport/tbl/restore/celldata}{0}
\NewSocket{tagsupport/tbl/colspan}{1}
@@ -19577,6 +19776,16 @@
\NewSocket{tagsupport/tbl/longtable/finalize}{0}
\NewSocket{tagsupport/tbl/longtable/head}{0}
\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
@@ -19650,6 +19859,7 @@
{ max:~ \l__tbl_saved_table_cols_tl }
)
}
+ \UseTaggingSocket{tbl/init/celldata}
\int_gzero:N \g__tbl_row_int
\int_gzero:N \g__tbl_col_int
\tl_gset:Nn \g__tbl_span_tl {1}
@@ -19685,6 +19895,7 @@
\int_gset:Nn \g__tbl_row_int { \l__tbl_saved_row_tl }
\tl_gset_eq:NN \g__tbl_span_tl \l__tbl_saved_span_tl
\tl_gset_eq:NN \g__tbl_table_cols_tl \l__tbl_saved_table_cols_tl
+ \UseTaggingSocket{tbl/restore/celldata}
\__tbl_trace:n { ==>~ restored~cell~data:~
\int_use:N \g__tbl_row_int,
\int_use:N \g__tbl_col_int,
@@ -19715,7 +19926,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/base/latexrelease.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/latexrelease.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/latexrelease.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -122,6 +122,13 @@
\pkgcls at debug{\@spaces 4: #4}%
\def\pkgcls at name{#1}% % for info message
\def\pkgcls at arg {#3}% % for info message
+ \edef\pkgcls at ext{%
+ \ifx#4\@clsextension document class\else
+ \ifx#4\@pkgextension package\else
+ file
+ \fi
+ \fi
+ }% % for info message
\pkgcls at parse@date at arg{#3}%
\let\pkgcls at candidate\@empty
\begingroup
@@ -163,7 +170,7 @@
\ifnum \@parse at version0#1//00\@nil > \pkgcls at targetdate
\@latex at warning@no at line{Suspicious rollback/min-date date given\MessageBreak
A minimal date of #1 has been specified for
- \@cls at pkg\MessageBreak '\pkgcls at name'.\MessageBreak
+ \pkgcls at ext\MessageBreak '\pkgcls at name'.\MessageBreak
But this is in conflict
with a rollback request to \requestedpatchdate}
\fi
@@ -219,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
}
@@ -293,7 +301,7 @@
}
%%% From File: ltvers.dtx
\edef\latexreleaseversion
- {2024-06-01}
+ {2024-11-01}
\newif\if at includeinrelease
\@includeinreleasefalse
\def\IncludeInRelease#1{%
@@ -424,7 +432,7 @@
\@skipping at modulefalse
\fi}
\ProvidesPackage{latexrelease}
- [2022/11/14 v1.0p LaTeX release emulation and tests
+ [2024/08/11 v1.0p LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\@ifundefined{sourceLaTeXdate}{%
@@ -1982,8 +1990,8 @@
\EndIncludeInRelease
%%% From File: ltcmd.dtx
-\def\ltcmdversion{v1.2e}
-\def\ltcmddate{2024-04-17}
+\def\ltcmdversion{v1.2f}
+\def\ltcmddate{2024-07-06}
\edef\@latexrelease at catcode@null{\the\catcode`\^^@ }
\catcode`\^^@=12
\ExplSyntaxOn
@@ -2202,8 +2210,24 @@
{ \cs_set_nopar:cpx }
{ \l__cmd_function_tl \c_space_tl } ##1##2 { ##1 {##2} }
}
+\IncludeInRelease{2024/11/01}{\__cmd_declare_env:nnnn}%
+ {Use~space-trimmed~envname~directly}
\cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2
{
+ \str_set:Nn \l__cmd_environment_str {#1}
+ \cs_if_exist:cTF { #1 }
+ { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } }
+ { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } }
+ \bool_set_false:N \l__cmd_expandable_bool
+ \bool_set_true:N \l__cmd_environment_bool
+ \__cmd_declare_env_internal:nnnn {#1} {#2}
+ }
+\cs_generate_variant:Nn \__cmd_declare_env:nnnn { e }
+\EndIncludeInRelease
+\IncludeInRelease{2024/06/01}{\__cmd_declare_env:nnnn}%
+ {Use~space-trimmed~envname~directly}
+\cs_new_protected:Npn \__cmd_declare_env:nnnn #1#2
+ {
\str_set:Nx \l__cmd_environment_str {#1}
\str_set:Nx \l__cmd_environment_str
{ \tl_trim_spaces:o { \l__cmd_environment_str } }
@@ -2221,6 +2245,8 @@
\exp_args:NV \__cmd_declare_env_internal:nnnn
\l__cmd_environment_str {#2}
}
+
+\EndIncludeInRelease
\cs_new_protected:Npn \__cmd_declare_env_internal:nnnn #1#2#3#4
{
\exp_args:Nc \__cmd_declare_cmd_internal:Nnnn { environment~ #1 } {#2}
@@ -4799,9 +4825,64 @@
\__cmd_check_definable:nNT {#1} \DeclareDocumentCommand
{ \__cmd_declare_cmd:Nnn #1 {#2} {#3} }
}
+\IncludeInRelease{2024/11/01}{\NewDocumentEnvironment}%
+ {Trim~spaces~from~envname~first}
\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
{
+ \__cmd_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ {
+ \__cmd_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \__cmd_new_env:nnnn #1
+ {
\cs_if_exist:cTF {#1}
+ {
+ \msg_error:nnx { cmd } { env-already-defined } {#1}
+ \use_none:nnn
+ }
+ {
+ \cs_if_exist:cTF { end #1 }
+ {
+ \msg_error:nnx { cmd } { env-end-already-defined } {#1}
+ \use_none:nnn
+ }
+ { \__cmd_declare_env:nnnn {#1} }
+ }
+ }
+\cs_new_protected:Npn \__cmd_renew_env:nnnn #1
+ {
+ \cs_if_exist:cTF {#1}
+ { \__cmd_declare_env:nnnn {#1} }
+ {
+ \msg_error:nnx { cmd } { env-undefined } {#1}
+ \use_none:nnn
+ }
+ }
+\cs_new_protected:Npn \__cmd_provide_env:nnnn #1
+ {
+ \cs_if_exist:cTF {#1}
+ { \use_none:nnn }
+ { \__cmd_declare_env:nnnn {#1} }
+ }
+\cs_generate_variant:Nn \__cmd_new_env:nnnn { e }
+\cs_generate_variant:Nn \__cmd_renew_env:nnnn { e }
+\cs_generate_variant:Nn \__cmd_provide_env:nnnn { e }
+\EndIncludeInRelease
+\IncludeInRelease{2024/06/01}{\NewDocumentEnvironment}%
+ {Trim~spaces~from~envname~first}
+\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+ {
+ \cs_if_exist:cTF {#1}
{ \msg_error:nnx { cmd } { env-already-defined } {#1} }
{
\cs_if_exist:cTF { end #1 }
@@ -4819,6 +4900,14 @@
{ \cs_if_exist:cF {#1} { \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} } }
\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
{ \__cmd_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_undefine:N \__cmd_new_env:nnnn
+\cs_undefine:N \__cmd_new_env:ennn
+\cs_undefine:N \__cmd_renew_env:nnnn
+\cs_undefine:N \__cmd_renew_env:ennn
+\cs_undefine:N \__cmd_provide_env:nnnn
+\cs_undefine:N \__cmd_provide_env:ennn
+
+\EndIncludeInRelease
\cs_new_protected:Npn \NewExpandableDocumentCommand #1#2#3
{
\__cmd_check_definable:nNT {#1} \NewExpandableDocumentCommand
@@ -5242,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:
}
{
@@ -5307,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
@@ -5321,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 }
@@ -6774,7 +6865,9 @@
{ #2 { The~hook~is~empty } }
{
\__hook_log_line:x { Code~chunks: }
- \prop_if_empty:cTF { g__hook_#1_code_prop }
+ \bool_lazy_or:nnTF
+ { ! \prop_if_exist_p:c { g__hook_#1_code_prop } }
+ { \prop_if_empty_p:c { g__hook_#1_code_prop } }
{ \__hook_log_line_indent:x { --- } }
{
\prop_map_inline:cn { g__hook_#1_code_prop }
@@ -6981,16 +7074,19 @@
}
\cs_new_protected:Npn \__hook_list_rules:nn #1 #2
{
- \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
- \prop_map_inline:cn { g__hook_#1_code_prop }
+ \prop_if_exist:cT { g__hook_#1_code_prop }
{
+ \cs_set_protected:Npn \__hook_tmp:w ##1 ##2 ##3 {#2}
\prop_map_inline:cn { g__hook_#1_code_prop }
{
- \__hook_if_label_case:nnnnn {##1} {####1}
- { \prop_map_break: }
- { \__hook_list_one_rule:nnn {##1} {####1} }
- { \__hook_list_one_rule:nnn {####1} {##1} }
- {#1}
+ \prop_map_inline:cn { g__hook_#1_code_prop }
+ {
+ \__hook_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \__hook_list_one_rule:nnn {##1} {####1} }
+ { \__hook_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
}
}
}
@@ -7528,6 +7624,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:. \\
@@ -7705,6 +7805,8 @@
\NewDocumentCommand \ClearHookRule { m m m }
{ \hook_gset_rule:nnnn {#1}{#2}{unrelated}{#3} }
\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF
+\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT
+\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF
\cs_new_eq:NN \IfHookExistsTF \__hook_if_usable:nTF
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\cs_new_protected:Npn \hook_disable:n
@@ -8540,7 +8642,7 @@
{
\cs_generate_from_arg_count:cNnn
{ __socket_#1_plug_#2:w }
- \cs_new_protected:Npn
+ \cs_new:Npn
{ \int_use:c { c__socket_#1_args_int } }
{#3}
\seq_put_right:cn { l__socket_#1_plugs_seq } {#2}
@@ -8559,7 +8661,7 @@
{
\cs_generate_from_arg_count:cNnn
{ __socket_#1_plug_#2:w }
- \cs_set_protected:Npn
+ \cs_set:Npn
{ \int_use:c { c__socket_#1_args_int } }
{#3}
\__socket_debug_term:n
@@ -8599,6 +8701,10 @@
\cs_new_eq:NN \socket_use:nn \socket_use:nw % socket with one input
\cs_new_eq:NN \socket_use:nnn \socket_use:nw % socket with two inputs
\cs_new_eq:NN \socket_use:nnnn \socket_use:nw % socket with three inputs
+\cs_new:Npn \socket_use_expandable:nw #1 {
+ \use:c { __socket_#1_plug_ \str_use:c { l__socket_#1_plug_str } :w }
+}
+\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs
\msg_new:nnnn { socket } { already-declared }
{ Socket~ '#1'~ already~ declared! }
@@ -9489,23 +9595,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
@@ -10090,6 +10206,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{}%
@@ -10097,8 +10217,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}%
@@ -10258,6 +10401,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{%
@@ -10291,6 +10448,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{%
@@ -11227,6 +11416,54 @@
{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\xdef\csname theH#1\endcsname{%
+ \noexpand\the\noexpand\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\xdef\csname theH#1\endcsname{%
+ \expandafter\noexpand\csname theH#2\endcsname.%
+ \noexpand\the\noexpand\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{%
@@ -11359,6 +11596,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}%
@@ -11664,6 +11912,7 @@
\hbadness\@M
\hfuzz\maxdimen
\tracingonline\z@
+ \tracinglostchars\z@
\everypar={}%
\leftskip\z at skip
\rightskip\z at skip
@@ -14575,11 +14824,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}
@@ -14685,14 +14965,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 }
@@ -14815,8 +15092,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
{
@@ -14830,6 +15107,8 @@
}
\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF}
\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} }
+\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} }
\cs_new_protected:Npn \property_ref_undefined_warn:
{
\flag_if_raised:nT { l__property_ref_flag }
@@ -14943,6 +15222,9 @@
\NewHook{enddocument/afteraux}
\NewHook{enddocument/info}
\NewHook{enddocument/end}
+\RemoveFromHook{enddocument/info}[kernel/filelist]
+\RemoveFromHook{enddocument/info}[kernel/warnings]
+\RemoveFromHook{enddocument/info}[kernel/release]
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
\AddToHook{enddocument/info}[kernel/release]{%
@@ -15004,6 +15286,9 @@
\NewHook{enddocument/afteraux}
\NewHook{enddocument/info}
\NewHook{enddocument/end}
+\RemoveFromHook{enddocument/info}[kernel/filelist]
+\RemoveFromHook{enddocument/info}[kernel/warnings]
+\RemoveFromHook{enddocument/info}[kernel/release]
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument at kernel@warnings}
\AddToHook{enddocument/info}[kernel/release]{%
@@ -15127,7 +15412,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}}%
@@ -15145,6 +15430,34 @@
\fi
\UseHook{env/#1/begin}%
}
+\EndIncludeInRelease
+\IncludeInRelease{2019/10/01}%
+ {\begin}{Making \begin/\end robust}%
+\DeclareRobustCommand\begin[1]{%
+ \@ifundefined{#1}%
+ {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
+ {\def\reserved at a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on at line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse\reserved at a}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\begin}{Making \begin/\end robust}%
+\def\begin#1{%
+ \@ifundefined{#1}%
+ {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
+ {\def\reserved at a{\def\@currenvir{#1}%
+ \edef\@currenvline{\on at line}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup\@endpefalse\reserved at a}
+
+\expandafter\let\csname begin \endcsname\@undefined
+
+\EndIncludeInRelease
+\IncludeInRelease{2019/10/01}%
+ {\end}{Making \begin/\end robust}%
\edef\end
{\unexpanded{%
\romannumeral
@@ -15163,6 +15476,17 @@
}%
\expandafter\noexpand\csname end \endcsname
}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\end}{Making \begin/\end robust}%
+\def\end#1{%
+ \csname end#1\endcsname\@checkend{#1}%
+ \expandafter\endgroup\if at endpe\@doendpe\fi
+ \if at ignore\@ignorefalse\ignorespaces\fi}
+
+\EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+ {\end!space}{New @endpe handling}%
\@namedef{end }#1{%
\romannumeral
\IfHookEmptyTF{env/#1/end}%
@@ -15169,6 +15493,20 @@
{\expandafter\z@}%
{\z@\UseHook{env/#1/end}}%
\csname end#1\endcsname\@checkend{#1}%
+ \endgroup
+ \UseHook{env/#1/after}%
+ \if at ignore\@ignorefalse\ignorespaces\fi
+}
+\EndIncludeInRelease
+\IncludeInRelease{2020/10/01}%
+ {\end!space}{Use hook system}%
+
+\@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
\UseHook{env/#1/after}%
\if at ignore\@ignorefalse\ignorespaces\fi
@@ -15175,33 +15513,8 @@
}
\EndIncludeInRelease
\IncludeInRelease{2019/10/01}%
- {\begin}{Making \begin/\end robust}%
-\DeclareRobustCommand\begin[1]{%
- \@ifundefined{#1}%
- {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
- {\def\reserved at a{\def\@currenvir{#1}%
- \edef\@currenvline{\on at line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse\reserved at a}
-\edef\end
- {\unexpanded{%
- \romannumeral
- \ifx\protect\@typeset at protect
- \expandafter %1
- \expandafter %2
- \expandafter %1
- \expandafter %3 expands the \csname inside \end<space>
- \expandafter %1
- \expandafter %2 expands \end<space>
- \expandafter %1 expands the \else
- \z@
- \else
- \expandafter\z@\expandafter\protect
- \fi
- }%
- \expandafter\noexpand\csname end \endcsname
- }
+ {\end!space}{Making \begin/\end robust}%
+
\@namedef{end }#1{%
\csname end#1\endcsname\@checkend{#1}%
\expandafter\endgroup\if at endpe\@doendpe\fi
@@ -15208,21 +15521,7 @@
\if at ignore\@ignorefalse\ignorespaces\fi}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
- {\begin}{Making \begin/\end robust}%
-\def\begin#1{%
- \@ifundefined{#1}%
- {\def\reserved at a{\@latex at error{Environment #1 undefined}\@eha}}%
- {\def\reserved at a{\def\@currenvir{#1}%
- \edef\@currenvline{\on at line}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup\@endpefalse\reserved at a}
-\def\end#1{%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if at endpe\@doendpe\fi
- \if at ignore\@ignorefalse\ignorespaces\fi}
-
-\expandafter\let\csname begin \endcsname\@undefined
+ {\end!space}{Making \begin/\end robust}%
\expandafter\let\csname end \endcsname\@undefined
\EndIncludeInRelease
@@ -15697,6 +15996,25 @@
\let\leqno\@kernel at leqno
\EndIncludeInRelease
%%% From File: ltlists.dtx
+\IncludeInRelease{2024/11/01}%
+ {\@endpetrue}{New @endpe handling}%
+\def\@endpefalse{\global\let\if at endpe\iffalse}
+\def\@endpetrue {%
+ \global\let\if at endpe\iftrue
+ \ifnum\currentgrouplevel>\z@
+ \aftergroup\propagate at doendpe
+ \fi
+}
+\def\propagate at doendpe{\if at endpe \@doendpe \fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@endpetrue}{New @endpe handling}%
+
+
+\def\@endpefalse{\let\if at endpe\iffalse}
+\def\@endpetrue{\let\if at endpe\iftrue}
+
+\EndIncludeInRelease
%%% From File: ltboxes.dtx
\IncludeInRelease{2015/01/01}%
{\makebox}{Make \makebox robust}%
@@ -15776,7 +16094,6 @@
\IncludeInRelease{2021/06/01}%
{\color at begingroup}{color group settings}%
\let\color at begingroup\begingroup
-\def\color at endgroup{\endgraf\endgroup}
\def\color at setgroup{\color at begingroup} % changed further in color package
\let\normalcolor\relax % remains untouched; only changed in a color package
\def\color at hbox{\hbox\bgroup\color at begingroup}
@@ -15787,7 +16104,6 @@
{\color at begingroup}{color group settings}%
\let\color at begingroup\relax
-\let\color at endgroup\relax
\let\color at setgroup\relax
\let\normalcolor\relax
\let\color at hbox\relax
@@ -15795,6 +16111,22 @@
\let\color at endbox\relax
\EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+ {\color at endgroup}{color group settings}%
+\def\color at endgroup{\endgraf\@endpefalse\endgroup}
+
+\EndIncludeInRelease
+\IncludeInRelease{2021/06/01}%
+ {\color at endgroup}{color group settings}%
+\def\color at endgroup{\endgraf\endgroup}
+
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\color at endgroup}{color group settings}%
+
+\let\color at endgroup\relax
+
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\savebox}{Make \savebox robust}%
\DeclareRobustCommand\savebox[1]{%
@@ -17187,7 +17519,6 @@
%% Copyright (C) 2022-2024
%% Frank Mittelbach, The LaTeX Project
%%% From File: ltmarks.dtx
-%% \end{function}
\ExplSyntaxOn
\NewModuleRelease{2022/06/01}{ltmarks}
@@ -17493,6 +17824,12 @@
\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
\mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
}
+\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} {
+ \mark_if_eq:nnnnT {#1}{#2}{#3}{#4}
+}
+\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} {
+ \mark_if_eq:nnnnF {#1}{#2}{#3}{#4}
+}
\cs_new_protected:Npn \__mark_update_singlecol_structures: {
\box_if_vertical:NTF \@outputbox
{
@@ -18003,7 +18340,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{%
@@ -18466,6 +18805,29 @@
\DeclareRobustCommand\AtEndDocument{\g at addto@macro\@enddocumenthook}
\EndIncludeInRelease
+\IncludeInRelease{2024/11/01}%
+ {\@cls at pkg}{Allow for more extensions}%
+\def\@cls at pkg{%
+ \ifx\@currext\@clsextension
+ document class%
+ \else
+ \ifx\@currext\@pkgextension
+ package%
+ \else
+ file%
+ \fi
+ \fi}
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\@cls at pkg}{Allow for more extensions}%
+
+\def\@cls at pkg{%
+ \ifx\@currext\@clsextension
+ document class%
+ \else
+ package%
+ \fi}
+\EndIncludeInRelease
\IncludeInRelease{2020/10/01}%
{\filec at ntents}{Define \q at curr@file directly (gh/220)}%
\def\filecontents{\@tempswatrue\@fileswtrue
Modified: trunk/Master/texmf-dist/tex/latex/base/letter.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/letter.cls 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/letter.cls 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}[1996/06/01]
\ProvidesClass{letter}
- [2021/12/07 v1.3c
+ [2024/08/12 v1.3c
Standard LaTeX document class]
\newcommand\@ptsize{}
\DeclareOption{a4paper}
Modified: trunk/Master/texmf-dist/tex/latex/base/ltluatex.lua
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/ltluatex.lua 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/ltluatex.lua 2024-11-01 21:25:37 UTC (rev 72739)
@@ -64,7 +64,7 @@
luatexbase_log(
"Lua module: " .. info.name
.. spaced(info.date)
- .. spaced(info.version)
+ .. spaced(info.version and string_gsub(info.version or "","^(%d)","v%1"))
.. spaced(info.description)
)
modules[info.name] = info
@@ -301,7 +301,7 @@
end
list[i] = current.value
else
- -- Cycle occured. TODO: Show cycle for debugging
+ -- Cycle occurred. TODO: Show cycle for debugging
-- list[i] = ...
local remaining = {}
for name, entry in next, meta do
@@ -335,7 +335,7 @@
for i=2, length//2 do
cycle[i], cycle[length + 1 - i] = cycle[length + 1 - i], cycle[i]
end
- error('Cycle occured at ' .. table.concat(cycle, ' -> ', 1, length))
+ error('Cycle occurred at ' .. table.concat(cycle, ' -> ', 1, length))
end
end
end
Modified: trunk/Master/texmf-dist/tex/latex/base/ltluatex.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/ltluatex.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/ltluatex.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -47,7 +47,7 @@
#1#2[#3]{\endgroup\immediate\write-1{File: #1 #3}}
\fi
\ProvidesFile{ltluatex.tex}
-[2024/02/11 v1.2c
+[2024/08/16 v1.2e
LuaTeX support for plain TeX (core)%
]
\edef\etatcatcode{\the\catcode`\@}
Modified: trunk/Master/texmf-dist/tex/latex/base/preload.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/preload.cfg 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/preload.cfg 2024-11-01 21:25:37 UTC (rev 72739)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{preload.cfg}
- [2024/02/09 v3.0i LaTeX Kernel
+ [2024/09/03 v3.0k LaTeX Kernel
(Uncustomized preload font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex/base/report.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/report.cls 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/report.cls 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesClass{report}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX document class]
\newcommand\@ptsize{}
\newif\if at restonecol
Modified: trunk/Master/texmf-dist/tex/latex/base/shortvrb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/shortvrb.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/shortvrb.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
\NeedsTeXFormat{LaTeX2e}[1994/12/01]
\ProvidesPackage{shortvrb}
- [2024/04/26 v3.0p
+ [2024/10/23 v3.0q
Standard LaTeX documentation package V3 (FMi)]
%%
%% Package `doc' to use with LaTeX 2e
Modified: trunk/Master/texmf-dist/tex/latex/base/size10.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/size10.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/size10.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{size10.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xpt\@xiipt
Modified: trunk/Master/texmf-dist/tex/latex/base/size11.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/size11.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/size11.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{size11.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xipt{13.6}%
Modified: trunk/Master/texmf-dist/tex/latex/base/size12.clo
===================================================================
--- trunk/Master/texmf-dist/tex/latex/base/size12.clo 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/base/size12.clo 2024-11-01 21:25:37 UTC (rev 72739)
@@ -42,7 +42,7 @@
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
\ProvidesFile{size12.clo}
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
Standard LaTeX file (size option)]
\renewcommand\normalsize{%
\@setfontsize\normalsize\@xiipt{14.5}%
Modified: trunk/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/firstaid/latex2e-first-aid-for-external-files.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
-\def\LaTeXFirstAidDate{2024/06/25}
-\def\LaTeXFirstAidVersion{v1.1f}
+\def\LaTeXFirstAidDate{2024/10/16}
+\def\LaTeXFirstAidVersion{v1.1g}
\ProvidesFile{latex2e-first-aid-for-external-files.ltx}
[\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
LaTeX kernel fixes to external files and packages]
@@ -228,6 +228,23 @@
{[\@tempb][\arabic{page}][\cref at result]\thepage}{}{}{}}}% <------- five
\@esphack}%
}
+ \newcommand\firstaid at cref@smugglelabel{\let\cref at currentlabel\cref at gcurrentlabel@temp}
+ \newcommand\firstaid at cref@updatelabeldata[1]{%
+ \cref at constructprefix{#1}{\cref at result}%
+ \@ifundefined{cref@#1 at alias}%
+ {\def\@tempa{#1}}%
+ {\def\@tempa{\csname cref@#1 at alias\endcsname}}%
+ \protected at xdef\cref at gcurrentlabel@temp{%
+ [\@tempa][\arabic{#1}][\cref at result]%
+ \csname p@#1\endcsname\csname the#1\endcsname}%
+ \aftergroup\firstaid at cref@smugglelabel
+ }
+ \AddToHook{label}[firstaid/cleveref]
+ {\ifx
+ \@currentcounter\@empty
+ \else
+ \firstaid at cref@updatelabeldata{\@currentcounter}
+ \fi}
}%
}
\AddToHook{package/arydshln/after}[firstaid]{%
Modified: trunk/Master/texmf-dist/tex/latex/graphics/color.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphics/color.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/graphics/color.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -25,7 +25,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{color}
- [2024/01/14 v1.3d Standard LaTeX Color (DPC)]
+ [2024/06/23 v1.3e Standard LaTeX Color (DPC)]
\edef\Gin at codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
@@ -170,7 +170,7 @@
\input{mathcolor.ltx}
\def\color at setgroup{\begingroup\set at color}
\let\color at begingroup\begingroup
-\def\color at endgroup{\endgraf\endgroup}
+\def\color at endgroup{\endgraf\@endpefalse\endgroup}
\def\color at hbox{\hbox\bgroup\color at begingroup}
\def\color at vbox{\vbox\bgroup\color at begingroup}
\def\color at endbox{\color at endgroup\egroup}
Modified: trunk/Master/texmf-dist/tex/latex/graphics/graphics.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/graphics/graphics.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/graphics/graphics.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -30,7 +30,7 @@
\DeclareCurrentRelease{}{2019-10-01}
\ProvidesPackage{graphics}
- [2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
+ [2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
\edef\Gin at codes{%
\catcode`\noexpand\^^A\the\catcode`\^^A\relax
\catcode`\noexpand\"\the\catcode`\"\relax
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/bib-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%%
%%
%% File: latex-lab-bib.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabbibdate{2024-02-12}
+\def\ltlabbibdate{2024-07-05}
\def\ltlabbibversion{0.81b}
\ProvidesFile{bib-latex-lab-testphase.ltx}
[\ltlabbibdate\space v\ltlabbibversion\space
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/block-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/block-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/block-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-03-23}
-\def\ltlabblockversion{0.8n}
+\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/latex-lab/documentmetadata-support.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/documentmetadata-support.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/latex-lab/firstaid-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/firstaid-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,9 +33,8 @@
%%
%%
%% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-05-25}
-\def\ltlabfirstaidversion{0.85d}
-
+\def\ltlabfirstaiddate{2024-10-16}
+\def\ltlabfirstaidversion{0.85h}
\ProvidesFile{firstaid-latex-lab-testphase.ltx}
[\ltlabfirstaiddate\space v\ltlabfirstaidversion\space
latex-lab wrapper firstaid]
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/float-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-03-23}
-\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/latex-lab/graphic-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/graphic-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-graphic.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabgraphicdate{2024-03-13}
-\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/latex-lab/latex-lab-amsmath.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-amsmath.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,7 +34,7 @@
%%
%% File: latex-lab-amsmath.dtx
\ProvidesFile{latex-lab-amsmath.ltx}
- [2024-02-12 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/latex-lab/latex-lab-footmisc.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footmisc.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-footnotes.dtx
-\def\ltlabfootnotedate{2024-03-12}
-\def\ltlabfootnoteversion{0.8d}
+\def\ltlabfootnotedate{2024-09-30}
+\def\ltlabfootnoteversion{0.8g}
%%
%% Copyright (c) 1995-2011 Robin Fairbairns
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-footnotes.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-footnotes.dtx
-\def\ltlabfootnotedate{2024-03-12}
-\def\ltlabfootnoteversion{0.8d}
+\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 {
@@ -157,6 +157,17 @@
\cs_new_eq:NN \__fnote_footnotemark_finish: \__fnote_footnotemark_default_finish:
\NewSocket{tagsupport/fnmark}{1}
\cs_set_eq:NN \@footnotemark \fnote_footnotemark:
+\str_if_exist:cF { l__socket_tagsupport/para/restore_plug_str }
+ {
+ \NewSocket{tagsupport/para/restore}{0}
+ \NewSocketPlug{tagsupport/para/restore}{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
+ \bool_set_false:N\l__tag_para_flattened_bool
+ }
+ \AssignSocketPlug{tagsupport/para/restore}{default}
+ }
\cs_new_protected:Npn \fnote_footnotetext:n #1 {
\__fnote_debug_footnotetext:
\hook_use:n {fntext/before}
@@ -172,6 +183,7 @@
\floatingpenalty \@MM
\hsize\columnwidth
\@parboxrestore
+ \UseTaggingSocket{para/restore}
\parindent 1em % typical default used in \@makefntext moved up here
\def\@currentcounter{footnote}
\protected at edef \@currentlabel { \p at footnote \@thefnmark }
@@ -454,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
{
@@ -465,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:
@@ -475,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
@@ -505,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/latex-lab/latex-lab-kernel-changes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-kernel-changes.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,39 +34,13 @@
%%
%%
%% File: latex-lab-toc-kernel-changes.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabkerneldate{2024-02-12}
-\def\ltlabkernelversion{0.85c}
+\def\ltlabkerneldate{2024-07-11}
+\def\ltlabkernelversion{0.85d}
\ProvidesPackage{latex-lab-kernel-changes}
[\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-02-12}
-\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/latex-lab/latex-lab-math.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-math.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-math.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-math.dtx
-\def\ltlabmathdate{2024-04-16}
-\def\ltlabmathversion{0.5j}
+\def\ltlabmathdate{2024-10-25}
+\def\ltlabmathversion{0.6i}
\ProvidesFile{latex-lab-math.ltx}
[\ltlabmathdate\space
v\ltlabmathversion\space
@@ -48,6 +48,7 @@
\tl_new:N \g__math_grabbed_math_tl
\tl_new:N \l__math_tmpa_tl
\skip_new:N \l__math_tmpa_skip
+\str_new:N \l__math_tmpa_str
\tl_new:N \l__math_content_alt_tl
\tl_new:N \l__math_content_actual_tl
\tl_new:N \l__math_content_AF_source_tl
@@ -74,6 +75,8 @@
\bool_new:N\g__tag_math_mathml_AF_bool
\bool_new:N\l__tag_math_mathml_pane_bool
\bool_new:N\l__tag_math_alt_bool
+\tl_new:N\g__tag_math_luamml_tl
+\tl_gset:Nn\g__tag_math_luamml_tl {0}
\int_new:N\g__math_mathml_total_int
\int_new:N\g__math_mathml_int
\int_new:N\g__math_math_total_int
@@ -80,8 +83,8 @@
\int_new:N\g__math_mathml_AF_found_int
\int_new:N\g__math_mathml_AF_attached_int
\clist_new:N\l__tag_math_mathml_files_clist
-\clist_put_right:Ne\l__tag_math_mathml_files_clist {\c_sys_jobname_str-mathml}
-
+\clist_put_right:Ne\l__tag_math_mathml_files_clist
+ {\c_sys_jobname_str-mathml,\c_sys_jobname_str-luamml-mathml}
\cs_new_protected:Npn \__math_AF_mml:nnnn #1 #2 #3 #4
{
\int_gincr:N \g__math_mathml_total_int
@@ -108,28 +111,295 @@
\endgroup
\__math_AF_mml:nnnn{#1}{#2}{#3}{#4}
}
+\tl_const:Nn \c__math_mathml_write_init_tl
+ {
+ <!DOCTYPE~html>
+ \iow_newline:
+ <html>
+ \iow_newline:
+ }
+\tl_new:N \l__math_mathml_write_before_tl
+\tl_const:Nn \c__math_mathml_write_after_tl
+ {
+ \iow_newline:
+ </div>
+ \iow_newline:
+ }
+\tl_const:Nn \c__math_mathml_write_final_tl
+ {
+ </html>
+ }
+\socket_new:nn {tagsupport/math/mathml/write/prepare}{0}
+\socket_new_plug:nnn{tagsupport/math/mathml/write/prepare}{On}
+ {
+ \str_set:NV\l__math_tmpa_str\l__math_content_AF_source_tl
+ \str_replace_all:Nnn\l__math_tmpa_str{&}{&}
+ \str_replace_all:Nnn\l__math_tmpa_str{<}{<}
+ \tl_set:Nn \l__math_mathml_write_before_tl
+ {
+ <div>
+ \iow_newline:
+ <h2>\c_backslash_str mml\c_space_tl \int_use:N \g__math_math_total_int </h2>
+ \iow_newline:
+ <p>\l__math_tmpa_str</p>
+ \iow_newline:
+ <p>\l__math_content_hash_tl </p>
+ \iow_newline:
+ }
+ }
+\cs_new_protected:Npn\__math_provide_luamml_commands:
+ {
+ \providecommand\luamml_flag_structelem:{}
+ \cs_if_free:NT \luamml_structelem:
+ {
+ \cs_set_eq:NN\luamml_structelem:\luamml_flag_structelem:
+ }
+ \providecommand\luamml_flag_process:{}
+ \cs_if_free:NT \luamml_process:
+ {
+ \cs_set_eq:NN\luamml_process:\luamml_flag_process:
+ }
+ \providecommand\luamml_flag_ignore:{}
+ \cs_if_free:NT \luamml_ignore:
+ {
+ \cs_set_eq:NN\luamml_ignore:\luamml_flag_ignore:
+ }
+ }
+\sys_if_engine_luatex:TF
+ {
+ \cs_new_protected:Npn \__math_correct_luamml_array_patches:
+ {
+ \AddToHook{package/array/after}
+ {
+ \cs_set:Npn \endarray
+ {
+ \tbl_crcr:n{endarray}
+ \__luamml_array_save_array:
+ \egroup
+ \UseTaggingSocket{tbl/finalize}
+ \tbl_restore_outer_cell_data:
+ \egroup
+ \mode_if_math:T { \__luamml_array_finalize_array: }
+ \@arrayright
+ \gdef \@preamble {}
+ }
+ \cs_set:Npn \@classz
+ {
+ \@classx
+ \@tempcnta \count@
+ \prepnext at tok
+ \@addtopreamble {
+ \ifcase \@chnum
+ \hfil
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 0~
+ }
+ \do at row@strut
+ \hfil
+ \or
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 1~
+ }
+ \do at row@strut
+ \hfil
+ \or
+ \hfil
+ \hskip 1sp
+ \d at llarbegin
+ \cs_if_eq:NNTF \d at llarbegin \begingroup {
+ \insert at column
+ \d at llarend
+ } {
+ \__luamml_array_init_col:
+ \insert at column
+ \luamml_flag_save:nn {} {mtd}
+ \d at llarend
+ \__luamml_array_finalize_col:w 2~
+ }
+ \do at row@strut
+ \or
+ \setbox \ar at mcellbox \vbox \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \ar at align@mcell
+ \do at row@strut
+ \or
+ \vtop \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \do at row@strut
+ \or
+ \vbox \@startpbox { \@nextchar }
+ \insert at pcolumn
+ \@endpbox
+ \do at row@strut
+ \fi
+ }
+ \prepnext at tok
+ }
+ }
+ }
+ \AddToHook{begindocument/before}
+ {
+ \str_case:on \g__math_luamml_load_tl
+ {
+ { 1 } {
+ \RequirePackage { luamml }
+ \__math_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \__math_luamml_activate_write:
+ }
+ }
+ {-1 } {
+ \AddToHook{begindocument/end}
+ {
+ \msg_note:nnnn { tag }
+ { luamml-status }{ disabled }{ not~create }
+ }
+ }
+ { 0 }
+ {
+ \@ifpackageloaded { unicode-math }
+ {
+ \RequirePackage { luamml }
+ \__math_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \__math_luamml_activate_write:
+ }
+ }
+ { \msg_warning:nn { tag }{ unicode-math-missing } }
+ }
+ }
+ \__math_provide_luamml_commands:
+ }
+ }
+ {
+ \__math_provide_luamml_commands:
+ }
+\msg_new:nnn { tag }{ luamml-status }
+ {
+ luamml~has~been~#1~and~will~#2~an~MathML~file.
+ }
+
+\msg_new:nnn { tag }{ unicode-math-missing }
+ {
+ The~package~unicode-math~is~missing\\
+ luamml~will~not~create~an~MathML~file.\\
+ To~avoid~this~warning~load~unicode-math~\\
+ or~disable~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=false}}\\
+ or~force~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=true}}
+ }
+\cs_new_protected:Npn \__math_luamml_activate_write:
+ {
+ \bool_if:NT \g__math_luamml_write_bool
+ {
+ \bool_gset_true:N\g__tag_math_mathml_AF_bool
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/substruct/begin}{single}
+ \AssignSocketPlug{tagsupport/math/substruct/end}{single}
+ \int_set:Nn \l__luamml_pretty_int { 7 }
+ \RegisterFamilyMapping\symsymbols{oms}
+ \RegisterFamilyMapping\symletters{oml}
+ \AssignSocketPlug{tagsupport/math/mathml/write/prepare}{On}
+ \iow_new:N \g__math_luamml_iow
+ \iow_open:Nn \g__math_luamml_iow {\c_sys_jobname_str-luamml-mathml.html}
+ \iow_now:Ne \g__math_luamml_iow { \c__math_mathml_write_init_tl }
+ \cs_new:Npn \__math_luamml_output_hook:n ##1
+ {
+ \tl_if_empty:NF \l__math_mathml_write_before_tl
+ {
+ \iow_now:Ne \g__math_luamml_iow
+ {
+ \l__math_mathml_write_before_tl
+ ##1
+ \c__math_mathml_write_after_tl
+ }
+ }
+ }
+ \__luamml_register_output_hook:N \__math_luamml_output_hook:n
+ \AddToHook{enddocument/afterlastpage}
+ {
+ \iow_now:Ne \g__math_luamml_iow
+ { \c__math_mathml_write_final_tl }
+ \iow_close:N \g__math_luamml_iow
+ }
+ \msg_note:nnnn { tag }
+ { luamml-status }{ enabled }{ create }
+ }
+ }
+\tl_new:N \g__math_luamml_load_tl
+\tl_gset:Nn \g__math_luamml_load_tl {0}
+\bool_new:N \g__math_luamml_write_bool
+\bool_gset_true:N \g__math_luamml_write_bool
+\msg_new:nnn { tag }{ PDF-2.0-recommended }
+ {
+ The~key~#1~will~not~work~properly~with~PDF~#2.\\
+ Switching~to~PDF~2.0~is~recommended.
+ }
+\keys_define:nn { __tag / setup }
+ {
+ math/mathml/luamml/load .choice: ,
+ math/mathml/luamml/load/true .code:n = {\tl_gset:Nn \g__math_luamml_load_tl{1}},
+ math/mathml/luamml/load/false .code:n = {\tl_gset:Nn \g__math_luamml_load_tl{-1}},
+ math/mathml/luamml/load .default:n = true,
+ math/mathml/luamml/load .usage:n=preamble,
+ math/mathml/structelem .code:n =
+ {
+ \pdf_version_compare:NnT < {2.0}
+ {
+ \msg_warning:nnne { tag }{ PDF-2.0-recommended }
+ { math/mathml/structelem }{ \pdf_version: }
+ }
+ \AddToHook{begindocument/end}{\luamml_structelem:}
+ },
+ math/mathml/ignore .code:n = {\luamml_ignore:},
+ math/mathml/luamml/write .choice:,
+ math/mathml/luamml/write/true .code:n =
+ {
+ \tl_gset:Nn \g__math_luamml_load_tl{1}
+ \bool_gset_true:N \g__math_luamml_write_bool
+ },
+ math/mathml/luamml/write/false .code:n =
+ {
+ \bool_gset_false:N \g__math_luamml_write_bool
+ },
+ math/mathml/luamml/write .default:n = true,
+ math/mathml/luamml/write .usage:n=preamble,
+ math/mathml/luamml .bool_gset:N = \g__math_luamml_write_bool,
+ math/mathml/luamml .usage:n=preamble
+ }
\socket_new:nn {tagsupport/math/mathml/write}{0}
\socket_new_plug:nnn{tagsupport/math/mathml/write}{On}
{
- \str_set:NV\l__math_tmpa_str\l__math_content_AF_source_tl
- \str_replace_all:Nnn\l__math_tmpa_str{&}{&}
- \str_replace_all:Nnn\l__math_tmpa_str{<}{<}
\iow_now:Ne \g__math_writedummy_iow
{
- \iow_newline:
- <div>
- \iow_newline:
- <h2>\c_backslash_str mml\c_space_tl \int_use:N \g__math_math_total_int </h2>
- \iow_newline:
- <p>\l__math_tmpa_str</p>
- \iow_newline:
- <p>\l__math_content_hash_tl </p>
- \iow_newline:
+ \l__math_mathml_write_before_tl
<math></math>
- \iow_newline:
- </div>
- \iow_newline:
+ \c__math_mathml_write_after_tl
}
}
@@ -147,14 +417,14 @@
}
\iow_now:Ne \g__math_writedummy_iow
{
- <!DOCTYPE~html>
- \iow_newline:
- <html>
+ \c__math_mathml_write_init_tl
}
+ \AssignSocketPlug {tagsupport/math/mathml/write/prepare}{On}
\AssignSocketPlug {tagsupport/math/mathml/write}{On}
\AddToHook{enddocument/afterlastpage}
{
- \iow_now:Nn \g__math_writedummy_iow {</html>}
+ \iow_now:Ne \g__math_writedummy_iow
+ { \c__math_mathml_write_final_tl }
\iow_close:N \g__math_writedummy_iow
}
}
@@ -188,8 +458,8 @@
\bool_if:NT\g__tag_math_mathml_AF_bool
{
\typeout{Info:~Activating~mathml~support}
- \AssignSocketPlug{tagsupport/math/struct/begin}{test-mathml}
- \AssignSocketPlug{tagsupport/math/struct/end}{test-mathml}
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
\AssignSocketPlug{tagsupport/math/substruct/begin}{single}
\AssignSocketPlug{tagsupport/math/substruct/end}{single}
\AddToHook{enddocument/info}
@@ -220,13 +490,13 @@
\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 }
{
math/mathml/sources .clist_set:N = \l__tag_math_mathml_files_clist,
- math/alt/use .bool_set:N = \l__tag_math_alt_bool,
+ math/alt/use .bool_set:N = \l__tag_math_alt_bool,
viewer/pane/mathml .bool_set:N = \l__tag_math_mathml_pane_bool,
viewer/pane/mathml .initial:n = true,
viewer/pane/mathsource .bool_set:N = \l__tag_math_texsource_pane_bool,
@@ -235,6 +505,23 @@
math/tex/AF .bool_set:N = \l__tag_math_texsource_AF_bool,
math/tex/AF .initial:n = true
}
+\AddToHook{begindocument/end}
+ {
+ \str_if_eq:eeT
+ {1}
+ {
+ \exp_last_unbraced:Ne\use_i:nn
+ {\GetDocumentProperties{document/pdfstandard-UA}}
+ \c_empty_tl\c_empty_tl
+ }
+ {
+ \bool_if:NF \l__tag_math_alt_bool
+ {
+ \typeout{PDF/UA-1~detected.~Enabling~alt~text~on~Formula}
+ }
+ \bool_set_true:N\l__tag_math_alt_bool
+ }
+ }
\socket_new:nn {tagsupport/math/inline/begin}{0}
\socket_new:nn {tagsupport/math/inline/end}{0}
\socket_new:nn {tagsupport/math/inline/formula/begin}{1} %
@@ -250,13 +537,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}
@@ -284,11 +571,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}
@@ -367,9 +654,19 @@
\bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l__math_content_AF_source_tmpa_tl \l__math_content_AF_source_tl }
{ \tl_clear:N \l__math_content_AF_source_tmpa_tl }
+ \tl_if_eq:NnTF\g__math_grabbed_env_tl {math}
+ {
+ \tl_set:Nn\l__math_attribute_class_tl{inline}
+ }
+ {
+ \tl_set:Nn\l__math_attribute_class_tl{display}
+ }
+ \bool_if:NF\l__tag_math_alt_bool
+ { \tl_set:Nn \l__math_content_alt_tl{} }
\tag_struct_begin:n
{
tag=Formula,
+ attribute-class=\l__math_attribute_class_tl,
texsource = \l__math_content_AF_source_tmpa_tl,
title-o = \g__math_grabbed_env_tl,
actualtext = \l__math_content_actual_tl,
@@ -388,7 +685,7 @@
\tl_new:N\l__math_grabbed_math_tl
\socket_new_plug:nnn
{tagsupport/math/struct/begin}
- {test-mathml}
+ {mathml-AF}
{
\int_gincr:N\g__math_math_total_int
\tl_set:Ne\l__math_content_hash_tl
@@ -404,20 +701,24 @@
\bool_if:NF\l__tag_math_alt_bool
{ \tl_set:Nn \l__math_content_alt_tl{} }
\tl_if_exist:cTF { g__math_mathml_ \l__math_content_hash_tl _tl }
- {
- \int_gincr:N\g__math_mathml_AF_found_int
- \bool_if:NTF \l__tag_math_mathml_AF_bool
- {
- \int_gincr:N\g__math_mathml_AF_attached_int
- \typeout {Inserting~mathml~with~Hash~\l__math_content_hash_tl}
- }
- {
- \typeout {Ignoring~mathml~with~Hash~\l__math_content_hash_tl}
- }
- }
- {
- \typeout{WARNING:~mathml~missing~for~hash~\l__math_content_hash_tl}
- }
+ {
+ \int_gincr:N\g__math_mathml_AF_found_int
+ \bool_if:NTF \l__tag_math_mathml_AF_bool
+ {
+ \int_gincr:N\g__math_mathml_AF_attached_int
+ \typeout {Inserting~mathml~with~Hash~\l__math_content_hash_tl}
+ }
+ {
+ \typeout {Ignoring~mathml~with~Hash~\l__math_content_hash_tl}
+ }
+ }
+ {
+ \bool_if:NT \l__tag_math_mathml_AF_bool
+ {
+ \typeout {WARNING:~mathml~missing~for~hash~\l__math_content_hash_tl}
+ }
+ }
+ \socket_use:n {tagsupport/math/mathml/write/prepare}
\socket_use:n {tagsupport/math/mathml/write} % write hash if request
\bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l__math_content_AF_source_tmpa_tl \l__math_content_AF_source_tl }
@@ -438,7 +739,7 @@
}
\socket_new_plug:nnn
{tagsupport/math/struct/end}
- {test-mathml}
+ {mathml-AF}
{
\tag_struct_end:
}
@@ -516,25 +817,29 @@
\cs_new_protected:Npn \__math_process_auxii:nn #1#2 { }
\cs_new_protected:Npn \math_processor:n #1
{ \cs_set_protected:Npn \__math_process_auxii:nn ##1##2 {#1} }
-\cs_new_protected:Npn \__math_grab_dollar:w % $
- #1 $
+\cs_new_protected:Npn \__math_grab_dollar:w { \__math_grab_dollar_delim:w }
+\cs_new_protected:Npn \__math_grab_dollar:n #1
{
- \tl_if_blank:nF {#1}
- {
- \__math_process:nn { math } {#1} % $
- \bool_lazy_or:nnTF
- {\legacy_if_p:n { measuring@ }}
- { \l__math_fakemath_bool }
- { #1 $ }
+ \__math_process:nn { math } {#1}
+ \bool_lazy_any:nTF
{
+ {\legacy_if_p:n { measuring@ }}
+ { \l__math_fakemath_bool }
+ { \tl_if_blank_p:n {#1} }
+ }
+ {
+ #1 $ % $
+ }
+ {
\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
}
- }
}
+\cs_new_protected:Npn \__math_grab_dollar_delim:w #1 $ % $
+ { \__math_grab_dollar:n {#1} }
\cs_new_protected:Npn \__math_grab_dollardollar:w % $$
#1 $$
{
@@ -541,10 +846,10 @@
\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}
- $$
}
+ $$
}
\cs_new_protected:Npn \__math_tag_dollardollar_display_end:
{
@@ -553,9 +858,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
}
@@ -573,6 +880,82 @@
{
\begin { equation* } #1 \end { equation* }
}
+\tl_new:N \l__math_grabbed_tl
+\int_new:N \l__math_grab_env_int
+\cs_new_protected:Npn \__math_grab_dollar_loop:
+ {
+ \group_begin:
+ \tl_clear:N \l__math_grabbed_tl
+ \__math_grab_loop:
+ }
+\cs_new_protected:Npn \__math_grab_loop:
+ {
+ \peek_remove_spaces:n
+ {
+ \peek_meaning:NTF \c_group_begin_token
+ { \__math_grab_loop_group:n }
+ { \__math_grab_loop_token:N }
+ }
+ }
+\cs_new_protected:Npn \__math_grab_loop_group:n #1
+ { \__math_grab_loop_store:n { {#1} } }
+\cs_new_protected:Npn \__math_grab_loop_store:n #1
+ {
+ \tl_put_right:Nn \l__math_grabbed_tl {#1}
+ \__math_grab_loop:
+ }
+\cs_new_protected:Npn \__math_grab_loop_token:N #1
+ {
+ \cs_if_exist_use:cF
+ { __math_grab_loop_ \token_to_str:N #1 : }
+ { \__math_grab_loop_store:n {#1} }
+ }
+\cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N $ : }
+ { \__math_grab_loop_end: }
+\cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N \\ : }
+ {
+ \int_compare:nNnTF \l__math_grab_env_int = 0
+ { \__math_grab_loop_newline: }
+ { \__math_grab_loop_store:n { \\ } }
+ }
+\cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N \begin : }
+ {
+ \int_incr:N \l__math_grab_env_int
+ \__math_grab_loop_store:n { \begin }
+ }
+\cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N \end : }
+ {
+ \int_compare:nNnTF \l__math_grab_env_int = 0
+ {
+ \__math_grab_loop_newline:
+ \end
+ }
+ {
+ \int_decr:N \l__math_grab_env_int
+ \__math_grab_loop_store:n { \end }
+ }
+ }
+\tl_map_inline:nn { \ignorespaces \unskip \textonly at unskip }
+ {
+ \cs_new_protected:cpn { __math_grab_loop_ \token_to_str:N #1 : }
+ { \__math_grab_loop: }
+ }
+\cs_new_protected:Npn \__math_grab_loop_newline:
+ {
+ \if_false: { \fi:
+ \cs_set_protected:Npn \cr
+ {
+ \__math_grab_loop:
+ \tex_cr:D
+ }
+ \if_false: } \fi:
+ \\
+ }
+\cs_new_protected:Npn \__math_grab_loop_end:
+ {
+ \exp_args:NNV \group_end:
+ \__math_grab_dollar:n \l__math_grabbed_tl
+ }
\tl_new:N \l__math_env_name_tl
\keys_define:nn { __math }
{
@@ -781,6 +1164,7 @@
\bool_set_false:N \l__math_collected_bool
\col at sep\tabcolsep \let\d at llarbegin\begingroup
\let\d at llarend\endgroup
+ \cs_set_protected:Npn \__math_grab_dollar:w { \__math_grab_dollar_loop: }
\@tabarray}
}
\cs_new_eq:NN \__math_m at th: \m at th
@@ -870,7 +1254,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/latex-lab/latex-lab-mathtools.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-mathtools.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,10 @@
%%
%%
%% File: latex-lab-mathtools.dtx
+\def\ltlabmathtoolsdate{2024-09-18}
+\def\ltlabmathtoolsversion{0.80a}
\ProvidesFile{latex-lab-mathtools.ltx}
- [2023-01-05 v0.1a mathtools adaptions]
+ [2024-07-13 v0.1a mathtools adaptions]
\RequirePackage{tagpdf-base}
\ExplSyntaxOn
\tl_new:N\l__math_mathtools_init_tl
@@ -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/latex-lab/latex-lab-testphase-bib.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-bib.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,7 +33,7 @@
%%
%%
%% File: latex-lab-bib.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabbibdate{2024-02-12}
+\def\ltlabbibdate{2024-07-05}
\def\ltlabbibversion{0.81b}
\ProvidesExplPackage {latex-lab-testphase-bib} {\ltlabbibdate} {\ltlabbibversion}
{Code related to the tagging of bibliography and cite command}
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-block.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-03-23}
-\def\ltlabblockversion{0.8n}
+\def\ltlabblockdate{2024-10-11}
+\def\ltlabblockversion{0.8v}
\ProvidesPackage {latex-lab-testphase-block}
[\ltlabblockdate\space v\ltlabblockversion\space
blockenv implementation]
@@ -58,8 +58,6 @@
}
}
\cs_new_eq:NN \__kernel_displayblock_doendpe: \prg_do_nothing:
-\def\@endpetrue {\global\let\if at endpe\iftrue}
-\def\@endpefalse{\global\let\if at endpe\iffalse}
\NewTemplateType{blockenv}{1}
\NewTemplateType{block}{1}
\NewTemplateType{para}{1}
@@ -90,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 ,
@@ -257,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 }
@@ -407,14 +406,14 @@
\__block_debug_typeout:n{\l__block_env_name_tl -env-start}
\tl_if_empty:nF {#1} { \SetTemplateKeys{blockenv}{display}{#1} }
% \begin{macrocode}
- \int_compare:nNnTF \l__block_flattened_level_int > 0
+ \int_compare:nNnTF \l__tag_block_flattened_level_int > 0
{
- \int_incr:N \l__block_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
{
\bool_if:NT \l__tag_para_flattened_bool
{
- \int_incr:N \l__block_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
}
\tl_if_empty:NF \l__block_inner_level_counter_tl
@@ -435,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 }
@@ -462,7 +464,10 @@
}
\l__block_final_code_tl
}
-\int_new:N \l__block_flattened_level_int
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
\newcounter{maxblocklevels}
\setcounter{maxblocklevels}{6}
\cs_new:Npn \endblockenv {
@@ -474,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
@@ -496,14 +498,16 @@
}
\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:}}
}
\socket_new:nn {tagsupport/block-endpe}{0}
\socket_new_plug:nnn{tagsupport/block-endpe}{on}
- { \legacy_if_gset_true:n { @endpe } }
+ { \@endpetrue }
\socket_new_plug:nnn{tagsupport/block-endpe}{off}
- { \legacy_if_gset_false:n { @endpe } }
+ { \@endpefalse }
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
\DeclareTemplateCode{para}{std}{1}
{
@@ -529,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 ,
@@ -629,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,
@@ -645,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
@@ -672,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 }
@@ -708,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
{
@@ -779,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 }
@@ -804,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
@@ -819,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} }
@@ -1011,6 +1030,7 @@
block-instance = verbatimblock ,
inner-instance = ,
final-code = \legacyverbatimsetup ,
+ para-instance = justify
}
\DeclareInstance{blockenv}{itemize}{display}
{
@@ -1203,7 +1223,7 @@
\legacy_if_gset_false:n { @endpe }
}
{
- \int_compare:nNnT \l__block_flattened_level_int < 2
+ \int_compare:nNnT \l__tag_block_flattened_level_int < 2
{
\__tag_gincr_para_main_begin_int:
\tag_struct_begin:n
@@ -1436,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/latex-lab/latex-lab-testphase-firstaid.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-firstaid.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,9 +33,8 @@
%%
%%
%% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-05-25}
-\def\ltlabfirstaidversion{0.85d}
-
+\def\ltlabfirstaiddate{2024-10-16}
+\def\ltlabfirstaidversion{0.85h}
\ProvidesPackage {latex-lab-testphase-firstaid} [%
\ltlabfirstaiddate\space v\ltlabfirstaiddate\space
Temporary patches to external packages needed for the tagging project]
@@ -51,12 +50,118 @@
} }
\exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
-\ExplSyntaxOff
\AddToHook{class/amsart/after}
{\def\@author{\authors}}
\AddToHook{class/amsbook/after}
{\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}{beginsep=\thm at preskip}
+ \skip_set:Nn\l__block_topsepadd_skip { \thm at postskip }
+ \tagpdfparaOff
+ \mode_leave_vertical:
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\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:}}%
+ \tag_struct_begin:n{tag=Caption}
+ \thm at swap\swappedhead\thmhead{##1}{##2}{##3}%
+ \tag_mc_begin:n{}\the\thm at headpunct\tag_mc_end:
+ \tag_struct_end:
+ \thmheadnl % possibly a newline.
+ \hskip\thm at headsep
+ \group_end:
+ \tagpdfparaOn
+ \UseTaggingSocket{para/begin} %
+ \ignorespaces}
+ \def\thmhead at plain##1##2##3{%
+ \thmname{##1}
+ \thmnumber{
+ \@ifnotempty{##1}{~}\@upn{##2}
+ }%
+ \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+ }
+ \let\thmhead\thmhead at plain
+ \def\swappedhead##1##2##3{%
+ \thmnumber{##2}
+ \thmname{\@ifnotempty{##2}{\nobreakspace}##1}
+ \thmnote{\pdffakespace\space{\the\thm at notefont(##3)}}
+ }
+ \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}%
{%
@@ -85,41 +190,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
@@ -128,11 +198,6 @@
\protected at edef\cref at currentlabel{%
[footnote][\arabic{footnote}][\cref at result]%
\p at footnote\@thefnmark}}
- \RenewDocumentCommand\refstepcounter{om}{%
- \IfNoValueTF{#1}%
- {\refstepcounter at noarg{#2}}%
- {\refstepcounter at optarg[#1]{#2}}%
- }%
}
\ExplSyntaxOn
\AddToHook{package/booktabs/after}
@@ -159,6 +224,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/latex-lab/latex-lab-testphase-float.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-float.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-03-23}
-\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/latex-lab/latex-lab-testphase-graphic.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-graphic.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-graphic.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabgraphicdate{2024-03-13}
-\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/latex-lab/latex-lab-testphase-marginpar.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-marginpar.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-marginpar.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%
%% File: latex-lab-marginpar.dtx
%%
-\def\ltlabmarginpardate{2024-02-12}
-\def\ltlabmarginparversion{0.85b}
+\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}
@@ -42,11 +42,27 @@
\int_new:N \g__kernel_marginpar_int
\socket_new:nn {tagsupport/marginpar/begin}{0}
\socket_new:nn {tagsupport/marginpar/end}{0}
+\cs_new_protected:Npn\__tag_get_marginpar_parent_aux:nn #1 #2
+ {
+ \str_if_eq:eeT{\use_ii:nn #1}{Part}{\seq_put_right:Nn\l__tag_tmpa_seq {#2}}
+ }
+\cs_new_protected:Npn \__tag_get_marginpar_parent:N #1
+ {
+ \seq_clear:N\l__tag_tmpa_seq
+ \seq_map_pairwise_function:NNN
+ \g__tag_struct_tag_stack_seq
+ \g__tag_struct_stack_seq
+ \__tag_get_marginpar_parent_aux:nn
+ \seq_put_right:Nn\l__tag_tmpa_seq {2}
+ \seq_get_left:NN \l__tag_tmpa_seq #1
+ }
+\cs_generate_variant:Nn \tag_struct_begin:n {e}
\socket_new_plug:nnn {tagsupport/marginpar/begin}{default}
{
\if_mode_horizontal:
\tag_mc_end:
- \tag_struct_begin:n{tag=Aside,parent=\g__tag_para_main_struct_tl}%
+ \__tag_get_marginpar_parent:N \l__tag_tmpa_tl
+ \tag_struct_begin:e{tag=Aside,parent=\l__tag_tmpa_tl}%
\else:
\tag_struct_begin:n{tag=Aside}%
\fi:
@@ -77,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 }
@@ -88,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/latex-lab/latex-lab-testphase-minipage.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-minipage.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%
%% File: latex-lab-minipage.dtx
%%
-\def\ltlabminipagedate{2023-10-30}
-\def\ltlabminipageversion{0.81c}
+\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}
@@ -54,12 +54,13 @@
\@pboxswfalse
\setlength\@tempdima{#4}%
\def\@mpargs{{#1}{#2}[#3]{#4}}%
- \socket_use:n{tagsupport/minipage/before}% new
+ \UseTaggingSocket{minipage/before}% new
\setbox\@tempboxa\vbox\bgroup
\color at begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
+ \UseTaggingSocket{para/restore}
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c at mpfootnote\z@
\socket_assign_plug:nn{fntext/process}{mp}%
\let\@listdepth\@mplistdepth \@mplistdepth\z@
@@ -77,10 +78,10 @@
\@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}
- \socket_use:n{tagsupport/minipage/after} %new end ...
+ \tag_resume:n{minipage}
+ \UseTaggingSocket{minipage/after} %new end ...
}
\long\def\@iiiparbox#1#2[#3]#4#5{%
\@kernel at init@parbox
@@ -87,8 +88,10 @@
\leavevmode
\@pboxswfalse
\setlength\@tempdima{#4}%
- \socket_use:n{tagsupport/parbox/before}
- \@begin at tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
+ \UseTaggingSocket{parbox/before}
+ \@begin at tempboxa\vbox{\hsize\@tempdima\@parboxrestore
+ \UseTaggingSocket{para/restore}
+ #5\@@par}%
\ifx\relax#2\else
\setlength\@tempdimb{#2}%
\edef\@parboxto{to\the\@tempdimb}%
@@ -102,23 +105,36 @@
\csname bm@#3\endcsname}%
\if at pboxsw \m at th$\fi
\@end at tempboxa%
- \socket_use:n{tagsupport/parbox/after}
+ \UseTaggingSocket{parbox/after}
}
\tl_new:N \l__ltboxes_tag_tl
\tl_set:Nn \l__ltboxes_tag_tl {Div}
\socket_new_plug:nnn{tagsupport/minipage/before}{tag/dflt}
{
- \tag_mc_end_push:\tag_struct_end:
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
}
\socket_new_plug:nnn{tagsupport/minipage/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
\socket_new_plug:nnn{tagsupport/parbox/before}{tag/dflt}
- {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}}
+ {
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
+ \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
+ }
\socket_new_plug:nnn{tagsupport/parbox/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
\socket_assign_plug:nn{tagsupport/minipage/before}{tag/dflt}
\socket_assign_plug:nn{tagsupport/minipage/after} {tag/dflt}
\socket_assign_plug:nn{tagsupport/parbox/before} {tag/dflt}
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-sec.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,16 +33,19 @@
%%
%%
%% File: latex-lab-sec.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabsecdate{2024-02-12}
-\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/latex-lab/latex-lab-testphase-table.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-table.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-table.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-05-25}
-\def\ltlabtblversion{0.85i}
+\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}
@@ -50,47 +50,97 @@
\tl_set:Nn \l__tbl_cellattribute_tl {}
\tl_new:N \l__tbl_rowattribute_tl
\tl_set:Nn \l__tbl_rowattribute_tl {}
+\prop_new:N\g__tbl_untagged_cells_prop
+\prop_new:N\l__tbl_saved_untagged_cells_prop
\clist_new:N \l__tbl_tmpa_clist
\tl_new:N \l__tbl_tmpa_tl
+\str_new:N \l__tbl_tmpa_str
+\str_if_exist:cF { l__socket_tagsupport/tbl/init/celldata_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/init/celldata}{0}
+ \NewSocket{tagsupport/tbl/restore/celldata}{0}
+ }
+\NewSocketPlug{tagsupport/tbl/init/celldata}{default}
+ {
+ \prop_set_eq:NN\l__tbl_saved_untagged_cells_prop \g__tbl_untagged_cells_prop
+ \prop_gclear:N \g__tbl_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/init/celldata}{default}
+
+\NewSocketPlug{tagsupport/tbl/restore/celldata}{default}
+ {
+ \prop_gset_eq:NN\g__tbl_untagged_cells_prop \l__tbl_saved_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/restore/celldata}{default}
\NewSocketPlug{tagsupport/tbl/cell/begin}{TD}
{
\__tbl_show_curr_cell_data:
- \tag_struct_begin:n
+ \__tbl_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
{
- tag =\l__tbl_celltag_tl,
- attribute-class =\l__tbl_cellattribute_tl
+ \clist_if_in:NVT \l__tbl_header_columns_clist\g__tbl_col_int
+ {
+ \tl_set:Nn \l__tbl_celltag_tl {TH}
+ \tl_set:Ne \l__tbl_cellattribute_tl {\l__tbl_cellattribute_tl,TH-row}
+ }
+ \tl_set:Ne \l__tbl_tmpa_tl {\int_eval:n { \g__tbl_col_int - 1 - \g__tbl_table_cols_tl }}
+ \clist_if_in:NoT \l__tbl_header_columns_clist { \l__tbl_tmpa_tl }
+ {
+ \tl_set:Nn \l__tbl_celltag_tl {TH}
+ \tl_set:Ne \l__tbl_cellattribute_tl {\l__tbl_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l__tbl_celltag_tl,
+ attribute-class ={\l__tbl_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
+ \int_step_inline:nn { \g__tbl_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tag_mc_begin:n{}
}
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
- \int_step_inline:nn { \g__tbl_span_tl - 1 }
- {
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tag_mc_begin:n{}
}
\NewSocketPlug{tagsupport/tbl/cell/end}{TD}
{
- \tag_mc_end:
- \tag_struct_end:
+ \__tbl_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ }
}
\NewSocketPlug{tagsupport/tbl/pcell/begin}{TDpbox}
{
\__tbl_show_curr_cell_data:
- \tag_struct_begin:n
+ \__tbl_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
{
- tag =\l__tbl_pcelltag_tl,
- attribute-class =\l__tbl_cellattribute_tl
- }
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
- \int_step_inline:nn { \g__tbl_span_tl - 1 }
- {
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tagpdfparaOn
- \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \clist_if_in:NVT \l__tbl_header_columns_clist\g__tbl_col_int
+ {
+ \tl_set:Nn \l__tbl_celltag_tl {TH}
+ \tl_set:Ne \l__tbl_cellattribute_tl {\l__tbl_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l__tbl_pcelltag_tl,
+ attribute-class ={\l__tbl_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
+ \int_step_inline:nn { \g__tbl_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tagpdfparaOn
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ }
}
\NewSocketPlug{tagsupport/tbl/pcell/end}{TDpbox}
{
- \tag_struct_end:
+ \__tbl_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
+ {
+ \tag_struct_end:
+ \legacy_if:nT {@endpe}{\par}
+ \mode_if_vertical:T{ \tagpdfparaOff }
+ }
}
\NewSocketPlug{tagsupport/tbl/row/begin}{TR}
{
@@ -116,7 +166,7 @@
{
\__tbl_trace:n
{==>~
- stucture~stored~for~row~\int_use:N\g__tbl_row_int :~
+ structure~stored~for~row~\int_use:N\g__tbl_row_int :~
\seq_use:Nn \g__tbl_struct_cur_seq {,}
}
}
@@ -124,13 +174,23 @@
\tag_struct_end:
}
}
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
+\NewSocketPlug{tagsupport/para/restore}{Table}
+ {
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \bool_set_true:N \l__tag_para_bool
+ \bool_set_false:N \l__tag_para_flattened_bool
+ \int_zero:N \l__tag_block_flattened_level_int
+ }
\NewSocketPlug{tagsupport/tbl/init}{Table}
{
- \tag_if_active:T
- {
- \bool_set_false:N \l__tag_para_bool
- \__tbl_init_struct_data:
- }
+ \bool_set_false:N \l__tag_para_bool
+ \AssignSocketPlug{tagsupport/para/restore}{Table}
+ \__tbl_init_struct_data:
}
\NewSocketPlug{tagsupport/tbl/finalize}{Table}
{
@@ -190,7 +250,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l__tbl_tmpa_tl _prop }
{
- \exp_args:No \__tag_struct_prop_gput:nnn {\l__tbl_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn { \l__tbl_tmpa_tl } {S}{/Artifact}
}
}
}
@@ -261,7 +321,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l__tbl_tmpa_tl _prop }
{
- \exp_args:No\__tag_struct_prop_gput:nnn {\l__tbl_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn {\l__tbl_tmpa_tl} {S}{/Artifact}
}
}
}
@@ -320,14 +380,21 @@
{/O /Table /ColSpan~\int_eval:n{#1}}
}
\tl_set:Ne \l__tbl_cellattribute_tl
- {colspan-\int_eval:n{#1}}
+ {\l__tbl_cellattribute_tl,colspan-\int_eval:n{#1}}
}
}
-\tag_if_active:T
- { \cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee} }
-
+\str_if_exist:cF { l__socket_tagsupport/tbl/leaders/end_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/leaders/begin}{0}
+ \NewSocket{tagsupport/tbl/leaders/end}{0}
+ }
+\NewSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ { \tag_mc_begin:n{artifact} }
+\NewSocketPlug{tagsupport/tbl/leaders/end}{code}
+ { \tag_mc_end: }
\AddToHook{cmd/array/before}{\__tag_tbl_disable:}
+
\cs_new_protected:Npn \__tag_tbl_disable:
{
\AssignSocketPlug{tagsupport/tbl/cell/begin}{noop}
@@ -347,6 +414,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{noop}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{noop}
\AssignSocketPlug{tagsupport/tbl/colspan}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{noop}
}
\cs_new_protected:Npn \__tag_tbl_enable:
@@ -368,6 +437,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{Table}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{Table}
\AssignSocketPlug{tagsupport/tbl/colspan}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{code}
}
\keys_define:nn { __tag / setup }
@@ -385,6 +456,7 @@
\tl_set:Nn\l__tbl_celltag_tl {text}
\tl_set:Nn\l__tbl_tabletag_tl {Div}
\clist_clear:N \l__tbl_header_rows_clist
+ \clist_clear:N \l__tbl_header_columns_clist
},
table/tagging .default:n = true,
table/tagging .initial:n = true
@@ -416,6 +488,7 @@
}
\clist_new:N \l__tbl_header_rows_clist
+\clist_new:N \l__tbl_header_columns_clist
\cs_new_protected:Npn \__tbl_set_header_rows:
{
\clist_map_inline:Nn \l__tbl_header_rows_clist
@@ -433,7 +506,19 @@
{ g__tag_struct_####1_prop }
{ C }
\l__tbl_tmpa_tl
- {\__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l__tbl_tmpa_tl]} }
+ {
+ \str_set:Ne \l__tbl_tmpa_str {\l__tbl_tmpa_tl}
+ \str_remove_once:Nn \l__tbl_tmpa_str {[}
+ \str_remove_once:Nn \l__tbl_tmpa_str {]}
+ \str_if_in:NnTF\l__tbl_tmpa_str{/TH-row}
+ {
+ \str_replace_once:Nnn \l__tbl_tmpa_str {/TH-row}{/TH-both}
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[\l__tbl_tmpa_str]}
+ }
+ {
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l__tbl_tmpa_str]}
+ }
+ }
{\__tag_struct_prop_gput:nnn{ ####1 }{C}{/TH-col}}
}
}
@@ -442,8 +527,68 @@
\keys_define:nn { __tag / setup }
{
table/header-rows .clist_set:N = \l__tbl_header_rows_clist,
+ table/header-columns .clist_set:N = \l__tbl_header_columns_clist,
table-header-rows .meta:n = {table/header-rows={#1}}
}
+\cs_if_exist:NT \__tag_struct_prop_gput:nnn
+ {
+ \cs_generate_variant:Nn \__tag_struct_prop_gput:nnn {one}
+ }
+\cs_new_protected:Npn \__tbl_multirow:n #1
+ {
+ \prop_get:NeNF \g__tag_attr_entries_prop
+ {rowspan-\int_eval:n{#1}}
+ \l__tbl_tmpa_tl
+ {
+ \__tag_attr_new_entry:ee
+ {rowspan-\int_eval:n{#1}}
+ {/O /Table /RowSpan~\int_eval:n{#1}}
+ }
+ \seq_gput_left:Ne\g__tag_attr_class_used_seq
+ {\pdf_name_from_unicode_e:n{rowspan-\int_eval:n{#1}}}
+ \seq_get_right:NN\g__tbl_struct_cur_seq \l__tbl_tmpb_tl
+ \tl_set:Ne \l__tbl_tmpb_tl { \int_abs:n{\l__tbl_tmpb_tl} }
+ \prop_get:cnNTF
+ { g__tag_struct_\l__tbl_tmpb_tl _prop }
+ { C }
+ \l__tbl_tmpa_tl
+ {
+ \tl_remove_once:Nn \l__tbl_tmpa_tl {[}
+ \tl_remove_once:Nn \l__tbl_tmpa_tl {]}
+ \__tag_struct_prop_gput:one{ \l__tbl_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}~\l__tbl_tmpa_tl]}
+ }
+ {
+ \__tag_struct_prop_gput:one{ \l__tbl_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}]}
+ }
+ \__tbl_gset_untagged_row_cells:nn {#1-1}{\g__tbl_span_tl}
+ }
+\keys_define:nn{ __tag / setup }
+ { table/multirow .code:n = {\__tbl_multirow:n {#1} }
+ ,table/multirow .default:n = 1
+ }
+\cs_new_protected:Npn \__tbl_gset_untagged_row_cells:nn #1 #2 % #1 number of rows, #2 number of columns
+ {
+ \int_step_inline:nn {#1}
+ {
+ \int_step_inline:nn {#2}
+ {
+ \prop_gput:Nee \g__tbl_untagged_cells_prop
+ { \int_eval:n {\g__tbl_row_int + ##1},\int_eval:n{\g__tbl_col_int + ####1 -1 } }{}
+ }
+ }
+ }
+\prg_new_protected_conditional:Npnn\__tbl_if_tag_cell:nn #1 #2 %#1 row, #2 col
+ { T,TF }
+ {
+ \prop_get:NeNTF \g__tbl_untagged_cells_prop
+ {\int_eval:n{#1},\int_eval:n{#2}}\l__tbl_tmpa_tl
+ { \prg_return_false:}
+ { \prg_return_true: }
+ }
\cs_new_protected:Npn \__tbl_show_curr_cell_data: {
\__tbl_trace:n { ==>~ current~cell~data:~
\int_use:N \g__tbl_row_int ,
@@ -451,10 +596,6 @@
\g__tbl_span_tl
}
}
-\NewSocket{tbl/celldata/missingcount}{1}
-\NewSocketPlug{tbl/celldata/missingcount}{code}{\tbl_count_missing_cells:n{#1}}
-\AssignSocketPlug{tbl/celldata/missingcount}{code}
-
\cs_new:Npn \__tbl_add_missing_cells:
{
\int_compare:nNnT \g__tbl_missing_cells_int > 0
@@ -464,6 +605,7 @@
additional~cell(s)~into~previous~row:}
\int_step_inline:nn { \g__tbl_missing_cells_int }
{
+ \int_gincr:N\g__tbl_col_int
\UseTaggingSocket{tbl/cell/begin}
\UseTaggingSocket{tbl/cell/end}
}
@@ -505,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/latex-lab/latex-lab-testphase-text.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-text.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/latex-lab/latex-lab-testphase-toc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/latex-lab-testphase-toc.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,35 +36,41 @@
%%
%%
%% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2023-10-16}
-\def\ltlabtocversion{0.85b}
+\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
-\def\ltlabkerneldate{2024-02-12}
-\def\ltlabkernelversion{0.85c}
+\def\ltlabkerneldate{2024-07-11}
+\def\ltlabkernelversion{0.85d}
\RequirePackage{latex-lab-kernel-changes}
-\def\@contentsline at cfgpoint@before#1#2#3#4{}
-\def\@contentsline at cfgpoint@after#1#2#3#4{}
+\str_if_exist:cF { l__socket_tagsupport/toc/contentsline/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/contentsline/before}{1}
+ \NewSocket{tagsupport/toc/contentsline/after}{1}
+ }
\def\contentsline#1#2#3#4%
{%
- \@contentsline at cfgpoint@before{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/before}{{#1}{#2}{#3}{#4}}%
\gdef\@contentsline at destination{#4}%
\csname l@#1\endcsname{#2}{#3}%
- \@contentsline at cfgpoint@after{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/after}{{#1}{#2}{#3}{#4}}%
}
\def\addcontentsline#1#2#3{% #1=toc extension, #2= heading type, tag
\addtocontents{#1}{%
\protect\contentsline{#2}{#3}{\thepage}{\@currentHref}\protected at file@percent
}}
-\def\@starttoc at cfgpoint@before#1{}
-\def\@starttoc at cfgpoint@after#1{}
+\str_if_exist:cF { l__socket_tagsupport/toc/starttoc/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/starttoc/before}{1}
+ \NewSocket{tagsupport/toc/starttoc/after}{1}
+ }
\def\@starttoc#1{%
\begingroup
\makeatletter
- \@starttoc at cfgpoint@before{#1}%
+ \UseTaggingSocket{toc/starttoc/before}{#1}%
\@input{\jobname.#1}%
- \@starttoc at cfgpoint@after{#1}%
+ \UseTaggingSocket{toc/starttoc/after}{#1}%
\if at filesw
\expandafter\newwrite\csname tf@#1\endcsname
\immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
@@ -74,8 +80,11 @@
\NewMirroredHookPairWithArguments{contentsline/number/before}{contentsline/number/after}{1}%
\NewMirroredHookPairWithArguments{contentsline/text/before}{contentsline/text/after}{4}%
\NewMirroredHookPairWithArguments{contentsline/page/before}{contentsline/page/after}{4}%
-\def\@dottedtocline at cfgpoint@leaders#1{#1}
-
+\str_if_exist:cF { l__socket_tagsupport/toc/leaders/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/leaders/before}{0}
+ \NewSocket{tagsupport/toc/leaders/after}{0}
+ }
\def\@dottedtocline#1#2#3#4#5{%
\ifnum #1>\c at tocdepth \else
\vskip \z@ \@plus.2\p@
@@ -89,10 +98,11 @@
\csname contentsline at text@#1 at format\endcsname{#4}%
\UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline at destination}%
\nobreak
- \@dottedtocline at cfgpoint@leaders{%
+ \UseTaggingSocket{toc/leaders/before}\SuspendTagging{toc/leaders}%
\leaders\hbox{$\m at th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
- mu$}\hfill}%
+ mu$}\hfill
+ \ResumeTagging{toc/leaders}\UseTaggingSocket{toc/leaders/after}%
\nobreak
\hb at xt@\@pnumwidth{\hfil\normalfont \normalcolor
\UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline at destination}%
@@ -276,45 +286,26 @@
\fi}
}
%% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2023-10-16}
-\def\ltlabtocversion{0.85b}
+\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
@@ -325,10 +316,11 @@
\int_gset:Nn \g__tag_toc_level_int {-100}
\tag_struct_begin:n{tag=TOC,title=#1}
}
-\cs_set_protected:Npn\@starttoc at cfgpoint@before#1
- {
- \__tag_toc_starttoc_init:n{#1}
- }
+\NewSocketPlug{tagsupport/toc/starttoc/before}{default}
+ {
+ \__tag_toc_starttoc_init:n{#1}
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/before}{default}
\cs_new_protected:Npn \__tag_toc_starttoc_finalize:
{
\int_step_inline:nn
@@ -337,11 +329,11 @@
\tag_struct_end:
\seq_gclear:N \g__tag_toc_stack_seq
}
-\cs_set_protected:Npn\@starttoc at cfgpoint@after#1
- {
- \__tag_toc_starttoc_finalize:
- }
-
+\NewSocketPlug{tagsupport/toc/starttoc/after}{default}
+ {
+ \__tag_toc_starttoc_finalize:
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/after}{default}
\cs_new_protected:Npn \__tag_toc_end:n #1
{
\seq_get:NNT\g__tag_toc_stack_seq \l__tag_toc_tmpa_tl
@@ -361,7 +353,8 @@
}
}
\cs_generate_variant:Nn \__tag_toc_end:n {e}
-\cs_new_protected:Npn \__tag_toc_contentsline_begin:nnn #1 #2 #3 %#1 level, #2 content, #3 destination
+\cs_new_protected:Npn \__tag_toc_contentsline_begin:nnnn #1 #2 #3 #4
+ %#1 level, #2 content, #3 page number (unused) #4 destination
{
\tag_if_active:T
{
@@ -383,21 +376,22 @@
\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} }{#3}
+ \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:
}
}
}
-\cs_set_protected:Npn\@contentsline at cfgpoint@before#1#2#3#4
+\NewSocketPlug{tagsupport/toc/contentsline/before}{default}
{
- \__tag_toc_contentsline_begin:nnn {#1}{#2}{#4}
+ \__tag_toc_contentsline_begin:nnnn #1
}
+\AssignSocketPlug{tagsupport/toc/contentsline/before}{default}
\msg_new:nnn {tag}{toc-no-TOCI}{Missing~TOCI~structure~on~toc~stack}
-\cs_new_protected:Npn \__tag_toc_contentsline_end:n #1 %#1 level name
+\cs_new_protected:Npn \__tag_toc_contentsline_end:nnnn #1 #2 #3 #4
{
\int_compare:nNnF { \use:c{toclevel@#1} } > {\use:c{c at tocdepth}}
{
@@ -413,10 +407,11 @@
}
}
}
-\cs_set_protected:Npn \@contentsline at cfgpoint@after #1#2#3#4
- {
- \__tag_toc_contentsline_end:n {#1}
- }
+\NewSocketPlug{tagsupport/toc/contentsline/after}{default}
+ {
+ \__tag_toc_contentsline_end:nnnn #1
+ }
+\AssignSocketPlug{tagsupport/toc/contentsline/after}{default}
\AddToHook{contentsline/text/before}[tagpdf]{%
\tag_struct_begin:n{tag=Reference}%
\tag_mc_begin:n{tag=Reference}}
@@ -435,9 +430,12 @@
\tag_mc_end:
\tag_struct_end:
\tag_mc_begin:n{tag=Reference}}
-\def\@dottedtocline at cfgpoint@leaders#1{%
- \tag_mc_begin:n{artifact}\tag_stop:n{leaders}\nobreak#1\nobreak\tag_start:n{leaders}\tag_mc_end:}
-
+\NewSocketPlug{tagsupport/toc/leaders/before}{artifact}
+ {\tag_mc_begin:n{artifact}\nobreak}
+\NewSocketPlug{tagsupport/toc/leaders/after}{artifact}
+ {\nobreak\tag_mc_end:}
+\AssignSocketPlug{tagsupport/toc/leaders/before}{artifact}
+\AssignSocketPlug{tagsupport/toc/leaders/after}{artifact}
%% File: latex-lab-toc-hyperref-changes.dtx (C) Copyright 2022-2024 LaTeX Project
\def\ltlabtochyperdate{2023-07-20}
\def\ltlabtochyperversion{0.85a}
Modified: trunk/Master/texmf-dist/tex/latex/latex-lab/marginpar-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/marginpar-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/marginpar-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%
%% File: latex-lab-marginpar.dtx
%%
-\def\ltlabmarginpardate{2024-02-12}
-\def\ltlabmarginparversion{0.85b}
+\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/latex-lab/minipage-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/minipage-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -34,8 +34,8 @@
%%
%% File: latex-lab-minipage.dtx
%%
-\def\ltlabminipagedate{2023-10-30}
-\def\ltlabminipageversion{0.81c}
+\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/latex-lab/sec-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/sec-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/sec-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-sec.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabsecdate{2024-02-12}
-\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/latex-lab/table-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/table-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/table-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-05-25}
-\def\ltlabtblversion{0.85i}
+\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/latex-lab/tabular-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/tabular-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/tabular-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-table.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabtbldate{2024-05-25}
-\def\ltlabtblversion{0.85i}
+\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/latex-lab/text-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/text-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/latex-lab/toc-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/latex-lab/toc-latex-lab-testphase.ltx 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/latex-lab/toc-latex-lab-testphase.ltx 2024-11-01 21:25:37 UTC (rev 72739)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-toc.dtx (C) Copyright 2022-2024 LaTeX Project
-\def\ltlabtocdate{2023-10-16}
-\def\ltlabtocversion{0.85b}
+\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/tools/.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/.tex 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/.tex 2024-11-01 21:25:37 UTC (rev 72739)
@@ -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/tools/array.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/array.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/array.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -47,7 +47,7 @@
\NeedsTeXFormat{LaTeX2e}[2024/06/01]
\ProvidesPackage{array}
- [2024/06/14 v2.6d Tabular extension package (FMi)]
+ [2024/10/17 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}%
@@ -432,7 +433,24 @@
<{\d at llarend\end{lrbox}%
\let\hss\hfil
\makebox[#2][#1]{\unhbox\ar at cellbox}}}
+\ExplSyntaxOn
+\def\@cline#1-#2\@nil{
+ \omit
+ \@multicnt#1
+ \advance\@multispan\m at ne
+ \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
+ \@multicnt#2
+ \advance\@multicnt-#1
+ \advance\@multispan\@ne
+ \UseTaggingSocket{tbl/leaders/begin}
+ \leaders\hrule\@height\arrayrulewidth\hfill
+ \UseTaggingSocket{tbl/leaders/end}
+ \tbl_gdecr_row_count:
+ \cr
+ \noalign{\vskip-\arrayrulewidth}
+}
\ExplSyntaxOff
+\ExplSyntaxOff
\endinput
%%
%% End of file `array.sty'.
Modified: trunk/Master/texmf-dist/tex/latex/tools/longtable.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/longtable.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/longtable.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -43,7 +43,7 @@
\DeclareCurrentRelease{}{2020-02-07}
\ProvidesPackage{longtable}
- [2024-04-26 v4.20 Multi-page Table package (DPC)]
+ [2024-10-27 v4.22 Multi-page Table package (DPC)]
\def\LT at err{\PackageError{longtable}}
\def\LT at warn{\PackageWarning{longtable}}
\def\LT at final@warn{%
@@ -65,6 +65,7 @@
\newcount\LTchunksize \LTchunksize=200
\let\c at LTchunksize\LTchunksize
\newdimen\LTcapwidth \LTcapwidth=4in
+\providecommand\LTcaptype{table}
\newbox\LT at head
\newbox\LT at firsthead
\newbox\LT at foot
@@ -73,6 +74,7 @@
\newcount\LT at cols
\newcount\LT at rows
\newcounter{LT at tables}
+\providecommand\theHLT at tables{\theLT at tables}
\newcounter{LT at chunks}[LT at tables]
\ifx\c at table\undefined
\newcounter{table}
@@ -105,8 +107,14 @@
\ExplSyntaxOn
\def\LT at array[#1]#2{%
\UseTaggingSocket{tbl/init}
- \@kernel at refstepcounter{table}\stepcounter{LT at tables}
- \tl_gset:Ne \@currentHref {table.\cs_if_exist_use:N\theHtable}
+ \tl_if_empty:eTF { \LTcaptype }
+ {
+ \tl_gset:Ne \@currentHref {LT at tables.\theHLT at tables}
+ }
+ {
+ \@kernel at refstepcounter{\LTcaptype}\stepcounter{LT at tables}
+ \tl_gset:Ne \@currentHref {\LTcaptype.\cs_if_exist_use:c {theH\LTcaptype}}
+ }
\tbl_gzero_row_count:
\UseTaggingSocket{tbl/longtable/init}
\if l#1%
@@ -220,7 +228,13 @@
\dimen@\pagegoal\advance\dimen at -\ht\LT at foot\pagegoal\dimen@
\maxdepth\z@
\fi
- \MakeLinkTarget{table}
+ \tl_if_empty:eTF{\LTcaptype}
+ {
+ \MakeLinkTarget{LT at tables}
+ }
+ {
+ \MakeLinkTarget{\LTcaptype}
+ }
\ifvoid\LT at firsthead\copy\LT at head\else\box\LT at firsthead\fi\nobreak
\UseTaggingSocket{tbl/longtable/head}
\output{\LT at output}}
@@ -245,7 +259,11 @@
\ifx\LT at save@row\LT@@save at row
\else
\LT at warn{Column~ widths~ have~ changed\MessageBreak
- in~ table~ \thetable}%
+ in~
+ \tl_if_empty:eTF{\LTcaptype}
+ {longtable~ \theLT at tables}
+ {\LTcaptype\c_space_tl\use:c{the\LTcaptype}}
+ }
\LT at final@warn
\fi
\endgraf\penalty -\LT at end@pen
@@ -252,7 +270,9 @@
\ifvoid\LT at foot\else
\global\advance\vsize\ht\LT at foot
\global\advance\@colroom\ht\LT at foot
- \dimen@\pagegoal\advance\dimen@\ht\LT at foot\pagegoal\dimen@
+ \ifdim\pagegoal<\maxdimen
+ \dimen@\pagegoal\advance\dimen@\ht\LT at foot\pagegoal\dimen@
+ \fi
\fi
\endgroup
\global\@mparbottom\z@
@@ -431,17 +451,22 @@
\tbl_gdecr_row_count:
\penalty\@M}
\@gtempa}
-\ExplSyntaxOff
\def\LT at caption{%
\noalign\bgroup
\@ifnextchar[{\egroup\LT at c@ption\@firstofone}\LT at capti@n}
-\def\LT at c@ption#1[#2]#3{%
- \LT at makecaption#1\fnum at table{#3}%
- \def\@tempa{#2}%
- \ifx\@tempa\@empty\else
- {\let\\\space
- \addcontentsline{\ext at table}{table}{\protect\numberline{\thetable}{#2}}}%
- \fi}
+\def\LT at c@ption#1[#2]#3{
+ \tl_if_empty:eTF{\LTcaptype}
+ {\LT at makecaption\@gobble{}{#3}}
+ {\LT at makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}
+ \def\@tempa{#2}
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addcontentsline
+ {\@nameuse{ext@\LTcaptype}}
+ {\LTcaptype}
+ {\protect\numberline{\@nameuse{the\LTcaptype}}{#2}}}
+ \fi}}
+\ExplSyntaxOff
\def\LT at capti@n{%
\@ifstar
{\egroup\LT at c@ption\@gobble[]}%
@@ -506,6 +531,13 @@
{
\crcr
\noalign{
+ \int_step_inline:nn
+ { \LT at rows }
+ {
+ \seq_gput_left:ce
+ {g__tbl_\cs_to_str:N #1 _rows_seq }
+ { \int_eval:n {\g__tbl_row_int - ##1 } }
+ }
\tbl_gdecr_row_count: % undo the increment
\int_gset:Nn \LT at rows { \LTchunksize }
}
Modified: trunk/Master/texmf-dist/tex/latex/tools/multicol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/multicol.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/multicol.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -35,7 +35,7 @@
%% given in the file `manifest.txt'.
%%
%% Package `multicol' to use with LaTeX2e
-%% Copyright 1989-2023 Frank Mittelbach
+%% Copyright 1989-2024 Frank Mittelbach
%%
%% In addition to the terms of LPPL any distributed version
%% (unchanged or modified) of multicol has to keep the statement
@@ -92,7 +92,7 @@
%% not for the payment of a license fee per se (which might or might
%% not follow from this evaluation).
%%
-%% The license fee, if any, can be payed either to the LaTeX fund
+%% The license fee, if any, can be paid either to the LaTeX fund
%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
%% the program who can be contacted at
%%
@@ -105,7 +105,8 @@
\DeclareCurrentRelease{}{2021-11-15}
\ProvidesPackage{multicol}
- [2024/05/23 v1.9h multicolumn formatting (FMi)]
+ [2024/09/14 v1.9i multicolumn formatting (FMi)]
+
\DeclareOption{twocolumn}
{\PackageWarning{multicol}{May not work
with the twocolumn option}}
@@ -872,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@
@@ -882,6 +891,7 @@
\fi
\ifnum\@floatpenalty=-\@Mii
\@Esphack
+ \UseTaggingSocket{float/hmode/end}%
\fi}}
\def\kept at topmark{{}{}}
\let\kept at firstmark\@empty
Modified: trunk/Master/texmf-dist/tex/latex/tools/thb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thb.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thb.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/thc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thc.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thc.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/thcb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thcb.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thcb.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/theorem.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/theorem.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/theorem.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/thm.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thm.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thm.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/thmb.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thmb.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thmb.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
Modified: trunk/Master/texmf-dist/tex/latex/tools/thp.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/tools/thp.sty 2024-11-01 21:23:08 UTC (rev 72738)
+++ trunk/Master/texmf-dist/tex/latex/tools/thp.sty 2024-11-01 21:25:37 UTC (rev 72739)
@@ -36,7 +36,7 @@
%% given in the file `manifest.txt'.
%%
%%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%%
%% Package `theorem' to use with LaTeX2e
%% Copyright (C) 1989-1995 Frank Mittelbach, all rights reserved.
More information about the tex-live-commits
mailing list.