texlive[72979] Master: latex-dev (26nov24)
commits+karl at tug.org
commits+karl at tug.org
Tue Nov 26 22:21:15 CET 2024
Revision: 72979
https://tug.org/svn/texlive?view=revision&revision=72979
Author: karl
Date: 2024-11-26 22:21:14 +0100 (Tue, 26 Nov 2024)
Log Message:
-----------
latex-dev (26nov24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex-dev/base/README.md
trunk/Master/texmf-dist/doc/latex-dev/base/alltt.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/cfgguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt
trunk/Master/texmf-dist/doc/latex-dev/base/classes.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/clsguide-historic.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex
trunk/Master/texmf-dist/doc/latex-dev/base/cmfonts.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/cyrguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/doc-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/docstrip.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/encguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/exscale.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/fix-cm.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/graphpap.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ifthen.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/inputenc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lamport-manual.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/latexrelease.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/latexsym.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lb2.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/letter.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lgc2.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lppl.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltluatex.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.tex
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews01.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews02.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews03.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews04.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews05.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews06.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews07.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews08.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews09.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews10.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews11.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews12.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews13.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews14.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews15.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews16.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews17.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews18.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews19.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews20.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews21.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews22.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews23.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews24.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews25.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews26.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews27.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.tex
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews29.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews30.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews31.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews32.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews33.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews34.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews36.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews37.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews38.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.tex
trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltsockets-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltsockets-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltx3info.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/ltxdoc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/makeindx.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/modguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/nfssfont.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/proc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/slides.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/slifonts.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/source2e.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/syntonly.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/tlc2.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/tlc3.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/tulm.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/usrguide-historic.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.tex
trunk/Master/texmf-dist/doc/latex-dev/base/utf8ienc.pdf
trunk/Master/texmf-dist/doc/latex-dev/base/webcomp.pdf
trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt
trunk/Master/texmf-dist/doc/latex-dev/firstaid/latex2e-first-aid-for-external-files.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-code.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-doc.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-amsmath.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-bib.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-block.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-firstaid.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-float.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-footnotes.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-graphic.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-marginpar.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-math.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathpkg.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathtools.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-minipage.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-namespace.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-sec.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-table.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-testphase.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-text.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-title.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/README.md
trunk/Master/texmf-dist/doc/latex-dev/tools/afterpage.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/array.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/bm.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/calc.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt
trunk/Master/texmf-dist/doc/latex-dev/tools/dcolumn.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/delarray.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/enumerate.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/fileerr.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/fontsmpl.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/ftnright.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/hhline.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/indentfirst.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/l3sys-query.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/layout.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/longtable.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/multicol.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/rawfonts.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/shellesc.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/showkeys.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/somedefs.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/tabularx.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/theorem.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/tools-overview.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/trace.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/varioref.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/verbatim.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/xr.pdf
trunk/Master/texmf-dist/doc/latex-dev/tools/xspace.pdf
trunk/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd
trunk/Master/texmf-dist/source/latex-dev/base/docstrip.dtx
trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx
trunk/Master/texmf-dist/source/latex-dev/base/latex209.dtx
trunk/Master/texmf-dist/source/latex-dev/base/letter.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltdirchk.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltexpl.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfssaxes.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltfsstrc.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltidxglo.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltplain.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx
trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx
trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx
trunk/Master/texmf-dist/source/latex-dev/base/lttextcomp.dtx
trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx
trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx
trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-new-or-1.dtx
trunk/Master/texmf-dist/source/latex-dev/tools/calc.dtx
trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx
trunk/Master/texmf-dist/tex/latex-dev/base/flafter.sty
trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty
trunk/Master/texmf-dist/tex/latex-dev/base/fontenc.sty
trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx
trunk/Master/texmf-dist/tex/latex-dev/base/latex209.def
trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
trunk/Master/texmf-dist/tex/latex-dev/base/omlcmm.fd
trunk/Master/texmf-dist/tex/latex-dev/base/omlcmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/omlenc.def
trunk/Master/texmf-dist/tex/latex-dev/base/omscmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/omscmsy.fd
trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.def
trunk/Master/texmf-dist/tex/latex-dev/base/omxcmex.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmdh.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfib.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmss.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmvtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.def
trunk/Master/texmf-dist/tex/latex-dev/base/ot4enc.def
trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmdh.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfib.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmss.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1cmvtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.def
trunk/Master/texmf-dist/tex/latex-dev/base/textcomp-2018-08-11.sty
trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmss.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmvtt.fd
trunk/Master/texmf-dist/tex/latex-dev/base/tuenc.def
trunk/Master/texmf-dist/tex/latex-dev/base/ucmr.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ucmss.fd
trunk/Master/texmf-dist/tex/latex-dev/base/ucmtt.fd
trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-new-or-1.sty
trunk/Master/texmf-dist/tex/latex-dev/latex-lab/new-or-1-latex-lab-testphase.ltx
trunk/Master/texmf-dist/tex/latex-dev/tools/calc.sty
trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty
trunk/Master/tlpkg/bin/c2lx
Added Paths:
-----------
trunk/Master/texmf-dist/tex/latex-dev/tools/multicol-2024-05-23.sty
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/README.md 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/README.md 2024-11-26 21:21:14 UTC (rev 72979)
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2025-06-01 pre-release 0
+Release 2025-06-01 pre-release 1
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/alltt.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cfgguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/changes.txt 2024-11-26 21:21:14 UTC (rev 72979)
@@ -6,11 +6,100 @@
not part of the distribution.
================================================================================
+2024-11-17 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltmarks.dtx (section{Public interfaces for packages such as \pkg{multicol}}):
+ Make all relevant functions public:
+ \mark_update_structure_from_material:nn
+ \mark_copy_structure:nn
+ \mark_set_structure_to_err:n
+ \mark_clear_structure:n
+ \mark_get_marks_for_reinsertion:nNN
+
+2024-11-16 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * latex209.dtx:
+ Add low-level marks \mark1, \mark2, and \mark3 to mimic the fact that 2.09 initialized
+ the mark system with a set of empty marks
+
+2024-11-16 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltpage.dtx:
+ Use new mark mechanism and drop legacy mark support
+
+ * ltoutput.dtx:
+ Use new mark mechanism and drop legacy mark support
+
+2024-11-14 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltmarks.dtx (subsection{Placing and retrieving marks}):
+ Improve error message if mark region or class is unknown
+
+2024-11-12 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lttagging.dtx (subsection{Tagging support for output routines}):
+ Added socket for multicol.
+
+2024-11-12 Joseph Wright <Joseph.Wright at latex-project.org>
+ * ltfinal.dtx (subsection{Case changing}):
+ Use \text_titlecase_...:nn for titlecasing
+ Introduce option to titlecase first or all words
+ * usrguide.tex:
+ Document new key for titlecasing
+
+2024-11-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * ltmarks.dtx (subsection{Placing and retrieving marks}):
+ Generate an error if \FirstMark etc, try to query for an unknown
+ region or class to avoid low-level errors later on.
+
+ Renamed \__mark_update_structure_alias:nn to \__mark_update_alias_structure:nn
+
+ Added \__mark_clear_structure:n
+
+2024-11-06 Joseph Wright <Joseph.Wright at latex-project.org>
+ * ltoutenc.dtx
+ Add support for \={i} to OT1 and T1
+
+2024-11-05 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * ltproperties.dtx: add missing variants (gh/1532).
+
+2024-11-02 Joseph Wright <Joseph.Wright at latex-project.org>
+ * ltdirchk.dtx, ltplain.dtx
+ Add tab char to \dospecials
+
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
#########################
+# 2024-11-01 PL1 Release
+#########################
+
+2024-11-22 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lttagging.dtx (section{Implementation}):
+ Declare \tag_if_active:TF and friends in the kernel (gh/1558)
+
+2024-11-19 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * lttextcomp.dtx:
+ Allow using \DeclareEncodingSubset in the document body so that it
+ can be placed into .fd file (gh/1518)
+
+ * cmfonts.fdd:
+ Add \DeclareEncodingSubset declarations in the .fd files for
+ ts1cmr, ts1cmss, ts1cmtt, and ts1cmvtt (gh/1518)
+
+ * ltfssbas.dtx:
+ Moved \DeclareEncodingSubset and \CheckEncodingSubset from
+ lttextcomp.dtx into this file
+
+ * fontdef.dtx:
+ Preload ts1cmr.fd, ts1cmss.fd, and ts1cmtt in the kernel
+ Drop unnessary \DeclareFontSubstitution declarations
+
+#########################
# 2024-11-01 Release
#########################
@@ -42,7 +131,7 @@
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
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/classes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/clsguide-historic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/clsguide.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -42,7 +42,7 @@
\texttt{clsguide.tex} for full details.}%
}
-\date{2024-09-15}
+\date{2024-11-14}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -1397,7 +1397,7 @@
\texttt{expl3} commands and more details can be found in
\texttt{ltproperties-doc.pdf}.
-\subsubsection{Templates (protoype document commands)}
+\subsubsection{Templates (prototype document commands)}
\emph{Templates} as defined by \LaTeX{} are a mechanism to cleanly separate the
three layers needed for writing a document
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cmfonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/cyrguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/doc-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/docstrip.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/encguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/exscale.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/fix-cm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/fntguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/graphpap.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ifthen.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/inputenc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lamport-manual.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/latexrelease.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/latexsym.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lb2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/letter.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lgc2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lppl.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltcmdhooks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltfilehook-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lthooks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltluatex.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltmarks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -232,10 +232,10 @@
\newcommand*{\gobbleopt}[1][]{}%
\let\org at twocolumn\twocolumn
\renewcommand\NeedsTeXFormat[1]{\NeedsTeXFormatdate}% ignore that inside
- \newcommand\NeedsTeXFormatdate[1][]{}% % inidividual issues
+ \newcommand\NeedsTeXFormatdate[1][]{}% % individual issues
\renewenvironment{document}{%
\clearpage
-% 1.4d (JLB) Normally |\ltn at tocend| shoud do nothing
+% 1.4d (JLB) Normally |\ltn at tocend| should do nothing
\let\ltn at tocend\relax
\ifnum\@issue=20 %
\addtocontents{toc}{%
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews01.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews02.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews03.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews04.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews05.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews06.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews07.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews08.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews09.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews10.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews11.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews12.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews13.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews14.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews15.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews16.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews17.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews18.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews19.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews20.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews21.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews22.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews23.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews24.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews25.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews26.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews27.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews28.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -226,7 +226,7 @@
\pkg{inputenc} documentation.
As usual, this change may also be reverted via the more general
-\pkg{latexrelease} package mechanism, by speciying a release date
+\pkg{latexrelease} package mechanism, by specifying a release date
earlier than this release.
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews29.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews30.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews31.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews32.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews33.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews34.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews35.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews36.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews37.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews38.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews39.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews40.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -161,7 +161,7 @@
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
+the $\varepsilon$) 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.
@@ -206,6 +206,7 @@
of \LaTeX{}: its outstanding ability to reprocess old documents
written many years ago.
+\tubcommand\newpage
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
@@ -276,7 +277,7 @@
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
+\texttt{phase-III} key, basic commands of several packages, including
\pkg{amsthm} and \pkg{fancyvrb}, can now be used.
@@ -297,7 +298,7 @@
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
+Similarly you may add a RowSpan attribute to tag a cell that spans
two rows using:
\begin{verbatim}
\tagpdfsetup{table/multirow={2}}
@@ -466,12 +467,12 @@
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 ....
+! 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 ....
+! LaTeX hooks Error: Empty hook on line ..
\end{verbatim}
%
\githubissue{1423}
@@ -485,7 +486,7 @@
\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+\newcounter{+\meta{counter}\verb+}+ will define not only
\verb+\the+\meta{counter} but also \verb+\theH+\meta{counter}.
\subsection{Extending \cs{refstepcounter}}
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/ltnews41.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -143,12 +143,79 @@
\section{Introduction}
-% To write
+\emph{to write}
+\section{Replacement for the legacy mark mechanism}
+
+
+
+\LaTeX{}'s legacy mechanism only supported two classes (left and right
+marks) and setting the left mark (with \cs{markboth}) always altered
+the state of the right mark as well, i.e., they were far from
+independent. For generating running headers with \enquote{chapter
+ titles} on the left and \enquote{section titles} on the right they
+work reasonably well but without much flexibility, e.g., \cs{leftmark}
+always generated the first \enquote{left}-mark on the page, while
+\cs{rightmark} always generated the last \enquote{right}-mark.
+
+A few releases ago~\cite{41:ltnews35} we therefore introduced a new
+mark mechanism for \LaTeX{} that supports arbitrary many truly
+independent mark classes and also offers querying the state at the top
+of the page, something that wasn't available in \LaTeX{} at all.
+
+Up to now, both mechanisms coexisted with completely separate
+implementations. With this release we have retired the legacy code and
+instead implement its public interfaces by using the new concepts,
+i.e., \cs{markboth}, \cs{markright}, \cs{leftmark}, and \cs{rightmark}
+remain supported but internally use \cs{InsertMark}, etc. Existing
+document classes or documents using the interfaces will therefore
+continue to work without any modifications but use a single underlying
+implementation and new documents can benefit from the additional
+flexibility, e.g., by displaying not only the last right-mark
+(\cs{leftmark} or \verb=\LastMark{2e-right}=) but also the first
+right-mark (\verb=\FirstMark{2e-right}=) or the top right-mark
+(\verb=\TopMark{2e-right}=), etc.
+
+See~\cite{41:ltmarks} for details on the extended functionality.
+
+
+
\section{New or improved commands}
\section{Code improvements}
+\subsection{Refinement of \cs{MakeTitlecase}}
+
+We introduced \cs{MakeTitlecase} as a late addition to the June
+2022 release, making use of the improved case code in
+\pkg{expl3}. Unlike upper and lowercasing, making text
+titlecased is more tricky to get right: this can apply either to
+the whole text or on a word-by-word basis.
+
+A subtle issue was reported against the \pkg{expl3} repository
+(\url{https://github.com/latex3/latex3/issues/1316}) which links
+to how we deal with the question of case changing
+\enquote{words} but shows up if you titlecase text stored in a
+command.
+
+We have looked again at how to implement \cs{MakeTitlecase} to
+be as predictable as possible, and have made a change in this
+release. The command no longer tries to lowercase text before
+applying titlecasing, and gives the correct result for text
+stored in commands.
+
+We have also added an additional key to the optional argument to
+\cs{MakeTitlecase} which allows the user to decide if this will
+apply only to the first word (the default) or to all words.
+
+\subsection{Tab character as a special}
+
+In \LaTeX{} News~38, we described the extension of \cs{verb}, etc., to cover
+the tab character as equivalent to a space. We have now added tabs to the
+standard list of characters covered by \cs{dospecials}. This allows them to
+be used in for example a \texttt{v}~specification document command without
+additional steps.
+
\section{Bug fixes}
%\subsection{A fix}
@@ -161,8 +228,23 @@
%\section{Changes to packages in the \pkg{graphics} category}
-%\section{Changes to packages in the \pkg{tools} category}
+\section{Changes to packages in the \pkg{tools} category}
+\subsection{\pkg{multicol}:\ Full support for extended marks}
+
+In 2022 we introduced a new mark mechanism for
+\LaTeX{}~\cite{41:ltnews35}. However, the initial implementation only
+covered the standard output routine of \LaTeX{}. As a result the
+extended marks were not available within columns produced with the
+\pkg{multicol} package (where they would be especially useful). This
+limitation has finally been lifted and the new mechanism is now fully
+supported.
+%
+\githubissue{1421}
+
+
+
+
%\section{Changes to files in the \pkg{cyrillic} category}
\begin{thebibliography}{9}\frenchspacing
@@ -181,10 +263,22 @@
\emph{\LaTeXe{} news 1--39}. June, 2024.
\url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
+\bibitem{41:ltnews35} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 35}. June 2022.
+ \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
+
+\bibitem{41:ltnews38} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 38}. November 2023.
+ \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}
+
\bibitem{41:ltnews40} \LaTeX{} Project Team.
\emph{\LaTeXe{} news 40}. November 2024.
\url{https://latex-project.org/news/latex2e-news/ltnews40.pdf}
+\bibitem{41:ltmarks} Frank Mittelbach, \LaTeX{} Project Team.
+ \emph{The \texttt{ltmarks.dtx} code}. June 2025.
+ \url{https://latex-project.org/help/documentation/ltmarks-doc.pdf}
+
\end{thebibliography}
\end{document}
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltpara-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltproperties-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltshipout-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltsockets-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltsockets-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/lttemplates-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltx3info.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/ltxdoc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/makeindx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/modguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/nfssfont.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/proc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/slides.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/slifonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/source2e.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/syntonly.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/tlc2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/tlc3.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/tulm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/usrguide-historic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.tex 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/base/usrguide.tex 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
\texttt{usrguide.tex} for full details.}%
}
-\date{2024-10-22}
+\date{2024-11-12}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -1277,13 +1277,26 @@
\end{flushleft}
The case-changing commands take an optional argument which can be used to
-tailor the output. This optional argument accepts the key \texttt{locale},
-also available under the alias \texttt{lang},
-which can be used to give a language identifier in BCP-47
-format. This is then applied to select language-specific features during
-case-changing.
+tailor the output. This optional argument accepts the key \texttt{locale}, also
+available under the alias \texttt{lang}, which can be used to give a language
+identifier in BCP-47 format. This is then applied to select language-specific
+features during case-changing.
-The input given to these commands is `expanded' before case changing is
+For titlecasing, the key \texttt{words} may also be used: this
+takes a choice of \texttt{first} or \texttt{all}. The standard
+setting is \texttt{first}, and means that only the very first
+\enquote{letter} is (broadly) uppercased. The alternative,
+\texttt{all}, means that the input is divided at each space, and
+for each word that results, the first letter is uppercased. For
+example
+\begin{verbatim}
+ \MakeTitlecase[words = first]{some words}
+ \MakeTitlecase[words = all]{some words}
+\end{verbatim}
+gives \enquote{\MakeTitlecase[words = first]{some words}
+\MakeTitlecase[words = all]{some words}}.
+
+The input given to these commands is \enquote{expanded} before case changing is
applied. This means that any commands within the input that convert to pure
text will be case changed. Mathematical content is automatically excluded, as
are the arguments to the commands \cs{label}, \cs{ref}, \cs{cite}, \cs{begin}
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/utf8ienc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/base/webcomp.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/firstaid/changes.txt 2024-11-26 21:21:14 UTC (rev 72979)
@@ -1,3 +1,15 @@
+2024-11-24 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: add iftag at -test to cleveref firstaid for issue #1560
+
+2024-11-08 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: add missing \expandafter for issue #1544
+
+2024-11-04 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: correct spurious space
+
2024-10-16 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* latex2e-first-aid-for-external-files.dtx: extend firstaid for cleveref
Modified: trunk/Master/texmf-dist/doc/latex-dev/firstaid/latex2e-first-aid-for-external-files.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/README.md 2024-11-26 21:21:14 UTC (rev 72979)
@@ -1,6 +1,6 @@
# LaTeX laboratory
-Release 2025-06-01 pre-release 0
+Release 2025-06-01 pre-release 1
## Overview
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/blocks-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/latex-lab/changes.txt 2024-11-26 21:21:14 UTC (rev 72979)
@@ -1,6 +1,33 @@
+2024-11-26 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-math.dtx: changed handling of math/mathml/structelem to handle
+ fakemath better(tagging/764)
+ * latex-lab-math.dtx: made all main math sockets tagging sockets and
+ assign the plugs directly.
+ * disable para tagging also in $$-display (tagging/765)
+
+2024-11-23 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * latex-lab-block.dtx (subsubsection{Implementation of block templates \ldots}):
+ Use private storage bin for parindent and not \listparindent to decouple block
+ and list templates (tagging/767)
+
+ (subsubsection{Blockquote instances}):
+ Theorems use their own block-instance and not displayblock to allow for
+ customization (tagging/767)
+
+ * latex-lab-firstaid.dtx (subsection{ams classes and amsthm}):
+ Move the theorem link target later to not have to force hmode with \leavevmode.
+ Otherwise theorems get always an indentation.
+
+2024-11-21 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * latex-lab-float.dtx: Correct socket declaration.
+
+2024-11-18 Joseph Wright <Joseph.Wright at latex-project.org>
+ * latex-lab-math.dtx: Use "@@" for a couple of internals
+
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
+ 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>
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-code.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/documentmetadata-support-doc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-amsmath.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-bib.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-block.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-firstaid.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-float.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-footnotes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-graphic.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-marginpar.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-math.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathpkg.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-mathtools.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-minipage.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-namespace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-1.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-new-or-2.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-sec.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-table.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-testphase.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-text.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-title.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc-kernel-changes.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/latex-lab/latex-lab-toc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/tools/README.md 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/README.md 2024-11-26 21:21:14 UTC (rev 72979)
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2025-06-01 pre-release 0
+Release 2025-06-01 pre-release 1
Overview
--------
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/afterpage.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/array.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/bm.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/calc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt
===================================================================
--- trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/doc/latex-dev/tools/changes.txt 2024-11-26 21:21:14 UTC (rev 72979)
@@ -5,6 +5,22 @@
are not part of the distribution.
=======================================================================
+2024-11-12 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+ * multicol.dtx (subsection{Tagging support}):
+ Added another socket to support tagging.
+
+2024-11-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+ * multicol.dtx (subsection{Supporting the new mark mechanism}):
+ Drop the legacy support for marks and use the new mark
+ mechanism throughout.
+ \usepackage{multicol}[=v1.9] reverts to previous approach.
+
+ Change the definition of \leftmark and \rightmark to use the new
+ mechanism and not any longer the legacy on.
+
+2024-11-03 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+ * calc.dtx: suspend tagging in \@settodim (tagging/628)
+
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/dcolumn.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/delarray.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/enumerate.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/fileerr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/fontsmpl.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/ftnright.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/hhline.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/indentfirst.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/l3sys-query.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/layout.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/longtable.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/multicol.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/rawfonts.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/shellesc.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/showkeys.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/somedefs.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/tabularx.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/theorem.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/tools-overview.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/trace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/varioref.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/verbatim.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/xr.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex-dev/tools/xspace.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/cmfonts.fdd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -67,7 +67,7 @@
%<*driver, >
\ProvidesFile{cmfonts.drv}
%</driver, >
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
%
%<*driver>
\documentclass{ltxdoc}
@@ -751,6 +751,11 @@
\EC at family{TS1}{cmr}{bx}{sl}{tcbl}
%<!ec>\EC at family{TS1}{cmr}{m}{ui}{tcu}
%<ec>\EC at family{TS1}{cmr}{m}{ui}{tcui}
+% \end{macrocode}
+%
+% \changes{v2.5n}{2024/11/19}{Add \cs{DeclareEncodingSubset} declaration}
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{cmr}{0}
%</TS1cmr>
%<*TS1cmss>
\DeclareFontFamily{TS1}{cmss}{\hyphenchar\font\m at ne}
@@ -760,6 +765,11 @@
\EC at family{TS1}{cmss}{bx}{n}{tcsx}
\EC at family{TS1}{cmss}{bx}{it}{tcso}
\EC at family{TS1}{cmss}{bx}{sl}{tcso}
+% \end{macrocode}
+%
+% \changes{v2.5n}{2024/11/19}{Add \cs{DeclareEncodingSubset} declaration}
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{cmss}{0}
%</TS1cmss>
%<*TS1cmtt>
\DeclareFontFamily{TS1}{cmtt}{\hyphenchar\font\m at ne}
@@ -766,6 +776,11 @@
\EC at ttfamily{TS1}{cmtt}{m}{n}{tctt}
\EC at ttfamily{TS1}{cmtt}{m}{sl}{tcst}
\EC at ttfamily{TS1}{cmtt}{m}{it}{tcit}
+% \end{macrocode}
+%
+% \changes{v2.5n}{2024/11/19}{Add \cs{DeclareEncodingSubset} declaration}
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{cmtt}{0}
%</TS1cmtt>
% \end{macrocode}
% Again the italic shape is only available with release 1.3.
@@ -774,6 +789,10 @@
\DeclareFontFamily{TS1}{cmvtt}{}
\EC at ttfamily{TS1}{cmvtt}{m}{n}{tcvt}
\EC at ttfamily{TS1}{cmvtt}{m}{it}{tcvi}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareEncodingSubset{TS1}{cmvtt}{0}
%</TS1cmvtt>
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/docstrip.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/docstrip.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/docstrip.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -77,7 +77,7 @@
% less/more dirty---all uses of \cs{afterfi}}
% \changes{2.3e}{1995/09/25}{Directories support}
% \changes{2.3e}{1995/10/24}{added \cs{makepathname} to support
-% systems with bizare pathnames}
+% systems with bizarre pathnames}
% \changes{2.3e}{1995/10/25}{batch files work by \cs{input}}
% \changes{2.3e}{1996/10/02}{Introduced ``open lists''}
% \changes{2.4a}{1996/06/06}{Add stream limits (MDW)}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/fontdef.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -40,7 +40,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
% \iffalse
%<text, > (Text font setup)
%<math, > (Math font setup)
@@ -260,7 +260,7 @@
\input {omsenc.def}
% \end{macrocode}
% Documents containing a lot of accented characters should really
-% be using T1 fonts. We therefore load this last so that T1 encoding
+% be using T1 fonts. We therefore load this after OT1 so that T1 encoding
% specific commands are executed as fast as possible (encoding
% files are no longer reloaded in \texttt{fontenc}.
% \changes{v3.0f}{2020/01/25}{Load t1enc.def last (gh/255)}
@@ -270,7 +270,7 @@
% \end{macrocode}
%
% \begin{macrocode}
-\input{ts1enc.def}
+\input {ts1enc.def}
% \end{macrocode}
%
%
@@ -349,7 +349,15 @@
\DeclareFontEncodingDefaults{}{}
% \end{macrocode}
%
-% Then we define the default substitution for every encoding.
+% The default font substitution for an encoding is defined in the
+% corresponding \texttt{...enc.def} file so for \texttt{OT1},
+% \texttt{T1}, and \texttt{TS1} this is already defined.
+% \begin{macrocode}
+%\DeclareFontSubstitution{T1}{cmr}{m}{n}
+%\DeclareFontSubstitution{OT1}{cmr}{m}{n}
+%\DeclareFontSubstitution{TS1}{cmr}{m}{n}
+% \end{macrocode}
+%
% This release of \LaTeXe{} assumes that the ec fonts are
% available. It is possible to change this to point to some other
% font family (e.g., Times with the appropriate encoding if it is
@@ -358,10 +366,6 @@
% sites. The substitution defaults can all be changed without
% losing portability as long as there are font shape definitions
% for the selected substitutions.
-% \begin{macrocode}
-\DeclareFontSubstitution{T1}{cmr}{m}{n}
-\DeclareFontSubstitution{OT1}{cmr}{m}{n}
-% \end{macrocode}
%
% For every encoding declaration, \LaTeXe{} will try to verify that
% the given substitution information makes sense, i.e.~that it is
@@ -391,6 +395,12 @@
\nfss at catcodes
\input {t1cmr.fd}
\input {ot1cmr.fd}
+% \end{macrocode}
+%
+% \changes{v3.0l}{2024/11/19}{Preload the TS1 \texttt{ts1cmr.fd} file
+% in all engines}
+% \begin{macrocode}
+\input {ts1cmr.fd}
\endgroup
% \end{macrocode}
%
@@ -411,6 +421,12 @@
\input {t1cmtt.fd}
\input {ot1cmss.fd}
\input {ot1cmtt.fd}
+% \end{macrocode}
+%
+% \changes{v3.0l}{2024/11/19}{Preload the TS1 \texttt{.fd} file}
+% \begin{macrocode}
+\input {ts1cmss.fd}
+\input {ts1cmtt.fd}
\endgroup
% \end{macrocode}
%
@@ -417,13 +433,17 @@
% \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.
+%
+% We now load it in all engines above, so the next lines are no longer
+% necessary. We keep them here if we stop loading other fd files in
+% Unicode engines.
% \begin{macrocode}
-\ifx\Umathcode\@undefined\else
-\begingroup
-\nfss at catcodes
-\input {ts1cmr.fd}
-\endgroup
-\fi
+%\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
Modified: trunk/Master/texmf-dist/source/latex-dev/base/latex209.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/latex209.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/latex209.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -29,7 +29,7 @@
%
% \title{Compatibility mode for \LaTeXe{} emulating \LaTeX~2.09}
% \author{Alan Jeffrey and Frank Mittelbach}
-% \date{1995/12/27}
+% \date{2024/11/16}
%
%
%
@@ -525,6 +525,16 @@
% \begin{macrocode}
\mark{{}{}}
% \end{macrocode}
+% We mimic this also for the new mark mechanism (in a low-level
+% way): marks 1,2, and 3 correspond to 2e-left, 2e-right, and
+% 2e-right-noempty.
+% \begin{macrocode}
+\ExplSyntaxOn
+\marks1{\__mark_value:nn {2.09-compat}{}}
+\marks2{\__mark_value:nn {2.09-compat}{}}
+\marks3{\__mark_value:nn {2.09-compat}{}}
+\ExplSyntaxOff
+% \end{macrocode}
% \end{macro}
%
% \subsection{Layout}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/letter.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/letter.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/letter.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -243,7 +243,7 @@
% compatible 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
+% \texttt{9} and \texttt{8} assuming that a class won't define both
% \Lopt{8pt} and \Lopt{18pt} options.
%
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltbibl.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -379,7 +379,7 @@
%
% Given that we are now a quarter century into using \LaTeXe{}
% there is no good reason any more do limit ourself to 2.09
-% conciderations. So we now simply delay the \cs{nocide} if it is
+% considerations. So we now simply delay the \cs{nocite} if it is
% issued in the preamble.
%
% \changes{v1.1o}{2003/05/18}{Check if we are after \cs{document}}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -2170,7 +2170,7 @@
% An utility macro similar to \cs{@@_bad_def:wn} to abort a command
% copy. Contrary to \cs{@@_bad_def:wn} though, when this happens the
% issue is most likely internal, because the command was already
-% (supposedly) correcly defined so it should be copyable. Hopefully
+% (supposedly) correctly defined so it should be copyable. Hopefully
% this macro will never be used ever, but if it does, apologise and
% give the reason for the failure so the user can report.
% \begin{macrocode}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltdirchk.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltdirchk.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltdirchk.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -38,7 +38,7 @@
% \fi
% \fi
\ProvidesFile{ltdirchk.dtx}
- [2024/02/11 v1.3a LaTeX Kernel (System Dependent Parts)]
+ [2024/11/02 v1.3b LaTeX Kernel (System Dependent Parts)]
% \iffalse
% \iffalse
\documentclass{ltxdoc}
@@ -307,6 +307,7 @@
%<initex>\fi
% \end{macrocode}
%
+% \changes{v1.3b}{2024/11/02}{Add tab char to \cs{dospecials}}
% That distraction over, back to the basics of a format.
% \begin{macrocode}
\catcode`\#=6
@@ -322,7 +323,7 @@
\newlinechar`\^^J
\def\typeout{\immediate\write17}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
- \do\#\do\^\do\_\do\%\do\~}
+ \do\#\do\^\do\_\do\%\do\~\do\^^I}
\def\@makeother#1{\catcode`#1=12\relax}
\def\space{ }
\def\@tempswafalse{\let\if at tempswa\iffalse}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltexpl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltexpl.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltexpl.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -411,7 +411,7 @@
%
% \section{Document-level command names for \pkg{expl3} functions}
%
-% Current home for L3 programing layer functions that we make
+% Current home for L3 programming layer functions that we make
% directly available at the document level. This section may need
% to be moved later (after \cs{NewDocumentCommand} is defined in
% case we want to use that in the setup).
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2024/07/08 v2.3c LaTeX Kernel (Final Settings)]
+ [2024/11/12 v2.3d LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1080,6 +1080,8 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Case changing}
+%
% \begin{macro}{\MakeUppercase}
% \begin{macro}{\MakeLowercase}
% \begin{macro}{\MakeTitlecase}
@@ -1110,6 +1112,8 @@
% \changes{v2.2x}{2022/10/26}{Make case changing commands language-aware}
% \changes{v2.2x}{2022/10/26}{Auto-detect \pkg{babel} locale}
% \changes{v2.3a}{2023/04/11}{Use new generic mechanism to detect locale}
+% \changes{v2.3d}{2024/11/12}{Use updated titlecase-first function in \pkg{expl3}}
+% \changes{v2.3d}{2024/11/12}{Add option to titlecase first or all words}
% Wrappers around the L3 case changing functions.
% |\protected| to make them mostly safe as replacements for |uppercase|
% and |\lowercase|.
@@ -1137,11 +1141,15 @@
\keys_define:nn { __kernel }
{
lang .str_set:N = \reserved at a ,
- locale .str_set:N = \reserved at a
+ locale .str_set:N = \reserved at a ,
+ words .choices:nn =
+ { all , first }
+ { \str_set:Nn \reserved at b {#1} }
}
\cs_new_protected:Npn \@@text at case@aux #1#2#3
{
\cs_set_nopar:Npn \reserved at a { }
+ \cs_set_nopar:Npn \reserved at b { }
\tl_if_blank:nTF {#2}
{
\str_set:Nx \reserved at a
@@ -1153,7 +1161,7 @@
}
}
{ \keys_set:nn { __kernel } {#2} }
- \use:c { text_ #1 case:Vn } \reserved at a {#3}
+ \use:c { text_ #1 :Vn } \reserved at a {#3}
}
% \end{macrocode}
% The odd use of \emph{three} spaces here is needed as \pkg{ltcmd} uses the
@@ -1173,6 +1181,11 @@
\reserved at a { Lower }
\reserved at a { Title }
% \end{macrocode}
+% These don't get covered above so we do them manually.
+% \begin{macrocode}
+\cs_generate_variant:Nn \text_titlecase_all:nn { V }
+\cs_generate_variant:Nn \text_titlecase_first:nn { V }
+% \end{macrocode}
% \changes{v2.2y}{2022/11/30}{Set \cs{oe}/\cs{OE} equal to act as a marker for \pkg{babel}}
% \changes{v2.2z}{2023/03/28}{Use groups for gh/1021}
% Currently, \pkg{babel} uses the equivalence of \cs{oe} and \cs{OE} to force casing of
@@ -1183,17 +1196,17 @@
\cs_new_protected:cpn { MakeLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \OE \oe
- \@@text at case@aux { lower } {#1} {#2}
+ \@@text at case@aux { lowercase } {#1} {#2}
}}
\cs_new_protected:cpn { MakeUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \oe \OE
- \@@text at case@aux { upper } {#1} {#2}
+ \@@text at case@aux { uppercase } {#1} {#2}
}}
\cs_new_protected:cpn { MakeTitlecase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \oe \OE
- \@@text at case@aux { title } {#1} {#2}
+ \@@text at case@aux { titlecase_ \reserved at b } {#1} {#2}
}}
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfssaxes.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfssaxes.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfssaxes.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssaxes.dtx}
- [2024/02/08 v1.0i LaTeX Kernel (NFSS Axes handing)]
+ [2024/11/19 v1.0j LaTeX Kernel (NFSS Axes handing)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -70,10 +70,17 @@
%
% \changes{v1.0h}{2020/12/04}{Reorganized the rollback data}
%
+% \begin{macrocode}
+%<2ekernel>\message{NFSS axes,}
+% \end{macrocode}
+%
% Everything in the this file got introduced 2020/02/02, so we use large rollback
% chunks, only interrupted if necessary.
% \begin{macrocode}
%<*2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\DeclareFontSeriesChangeRule}{Series change rules}%
% \end{macrocode}
@@ -706,7 +713,7 @@
%
% \begin{macro}{\fontseries}
% The \cs{fontseries} command takes one argument which is the requested new
-% font series. In the orginal implementation it simply saved the
+% font series. In the original implementation it simply saved the
% expanded value in \cs{f at series}. Now we do a bit more processing
% and look up the final value in the font series data base. This is
% done by \cs{merge at font@series}. But the lookup should be done
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfssbas.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssbas.dtx}
- [2024/06/17 v3.2m LaTeX Kernel (NFSS Basic Macros)]
+ [2024/11/19 v3.2n LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -157,12 +157,16 @@
% We define a number
% of macros that will be used later.
%
+% \begin{macrocode}
+%<*2ekernel>
+\message{NFSS base,}
+% \end{macrocode}
%
+%
% \begin{macro}{\@nomath}
% |\@nomath| is used by most macros that will have no effect
% in math mode. It issues a warning message.
% \begin{macrocode}
-%<*2ekernel>
\def\@nomath#1{\relax\ifmmode
\@font at warning{Command \noexpand#1invalid in math mode}\fi}
% \end{macrocode}
@@ -593,6 +597,135 @@
% \end{macro}
%
%
+%
+%
+% \begin{macro}{\DeclareEncodingSubset}
+%
+% The declaration takes 3 mandatory arguments: an \emph{encoding}
+% for which a subsetting is wanted (currently always \texttt{TS1},
+% and most likely forever), the \emph{font family} for which we
+% declare the subset and finally the \emph{subset} number, with a value between
+% \texttt{0} (all of the encoding is supported) and \texttt{9} (many
+% glyphs are missing).
+%
+% For \texttt{TS1} the numbers have been chosen in a way that most
+% fonts can be fairly correctly categorized, but the default
+% settings are always conservative, that is they may claim that
+% fewer glyphs are supported than there actually are.
+%
+% As these days many font families are set up to end in \texttt{-LF}
+% (lining figures), \texttt{-OsF} (oldstyle figures), etc.\ the
+% declaration supports a shortcut: if the \emph{font family} name
+% ends in \texttt{-*} then the star gets replaced by these common
+% ending, e.g.,
+%\begin{verbatim}
+% \DeclareEncodingSubset{TS1}{Alegreya-*}{2}
+%\end{verbatim}
+% is the same as writing
+%\begin{verbatim}
+% \DeclareEncodingSubset{TS1}{Alegreya-LF}{2}
+% \DeclareEncodingSubset{TS1}{Alegreya-OsF}{2}
+% \DeclareEncodingSubset{TS1}{Alegreya-TLF}{2}
+% \DeclareEncodingSubset{TS1}{Alegreya-TOsF}{2}
+%\end{verbatim}
+% If only some are needed then one can define them individually but
+% in many cases all four are wanted, hence the shortcut.
+%
+%
+% The coding of the declaration has no error checking as it is
+% mostly for internal use.
+% \begin{macrocode}
+\def\DeclareEncodingSubset#1#2{%
+ \DeclareEncodingSubset at aux{#1}#2*\DeclareEncodingSubset at aux
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\DeclareEncodingSubset at aux#1#2*#3\DeclareEncodingSubset at aux#4{%
+% \end{macrocode}
+% if \verb=#3= is empty then there was no star, otherwise we
+% define all four variants.
+% \begin{macrocode}
+ \expandafter\ifx\expandafter X\detokenize{#3}X%
+ \@DeclareEncodingSubset{#1}{#2}{#4}%
+ \else
+ \@DeclareEncodingSubset{#1}{#2LF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2TLF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2OsF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2TOsF}{#4}%
+ \fi
+}
+% \end{macrocode}
+%
+% The subset info is stored in a command with the name
+% \texttt{\bslash}\emph{family}\texttt{:}\emph{subset} so if that
+% already exists we change otherwise declare a subset.
+% \begin{macrocode}
+\def\@DeclareEncodingSubset#1#2#3{%
+ \@ifundefined{#1:#2}%
+ {\@font at info{Setting #2 sub-encoding to #1/#3}}%
+ {\@font at info{Changing #2 sub-encoding to #1/#3}}%
+% \end{macrocode}
+% This declaration should be usable in \texttt{.fd} files and
+% therefore has to make its definition globally, because such files
+% can get loaded in random places.
+% \changes{v1.0g}{2022/08/07}{Make global declaration (gh/905)}
+% \begin{macrocode}
+ \global\@namedef{#1:#2}{#3}}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\CheckEncodingSubset}
+% The command |\CheckEncodingSubset| will check if the current font
+% family has the right encoding subset to typeset a certain
+% command. It takes five arguments as follows:
+% first argument is either |\UseTextSymbol|, |\UseTextAccent|
+% depending on whether or not the symbol is a text symbol or a text
+% accent.
+
+% The second argument is the encoding from which this symbol should
+% be fetched.
+%
+% The third argument is either a fake accessor command or an error
+% message. the code in that argument (if ever executed) receives
+% two arguments: |#2| and |#5| of |\CheckEncodingSubset|.
+%
+% Argument four is the subset encoding id to test against: if this
+% value is higher than the subset id of the current font family
+% then we typeset the symbol, i.e., execute |#1{#2}#5| otherwise
+% it runs |#3#5|, e.g., to produce an error message or fake the
+% glyph somehow.
+%
+% Argument five is the symbol or accent command that is being
+% checked.
+%
+% For usage examples see definitions in \texttt{lttextcomp.dtx}.
+%
+% \begin{macrocode}
+\def\CheckEncodingSubset#1#2#3#4#5{%
+ \ifnum #4>%
+ \expandafter\ifx\csname #2:\f at family\endcsname\relax
+ 0\csname #2:?\endcsname
+ \else
+ \csname #2:\f at family\endcsname
+ \fi
+ \relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#1{#2}}{#3}%
+ #5%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
% \begin{macro}{\DeclarePreloadSizes}
% \begin{macrocode}
\def\DeclarePreloadSizes#1#2#3#4#5{%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfssdcl.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssdcl.dtx}
- [2022/09/20 v3.1b LaTeX Kernel (NFSS Declarative Interface)]
+ [2024/11/19 v3.1c LaTeX Kernel (NFSS Declarative Interface)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -110,6 +110,11 @@
% \cs{@DeclareMathDelimiter}}
% \changes{v2.1c}{1994/03/13}{add 2ekernel module to omit repeated code}
%
+% \begin{macrocode}
+%<*2ekernel>
+\message{NFSS declarative interface,}
+% \end{macrocode}
+%
%
% \begin{macro}{\in@}
% \changes{v3.0m}{2009/10/20}{More robust thanks to Heiko.}
@@ -121,7 +126,6 @@
% contain braces nor |#| (more precisely, tokens of category
% code 1,~2, or~6).
% \begin{macrocode}
-%<*2ekernel>
\def\in@#1#2%
{%
\begingroup
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfssini.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssini.dtx}
- [2024/08/28 v3.2i LaTeX Kernel (NFSS Initialisation)]
+ [2024/11/19 v3.2j LaTeX Kernel (NFSS Initialisation)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -142,6 +142,7 @@
%
% \begin{macrocode}
%<*2ekernel>
+\message{NFSS initialization,}
% \end{macrocode}
%
% \subsection{Providing math \emph{versions}}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltfsstrc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltfsstrc.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltfsstrc.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%<package> [2020/12/22 v3.0n Standard LaTeX package (font tracing)]
% \fi
% \ProvidesFile{ltfsstrc.dtx}
-% [2024/02/08 v3.0o LaTeX Kernel (NFSS tracing)]
+% [2024/11/19 v3.0p LaTeX Kernel (NFSS tracing)]
%
% \iffalse
%<+checkmem>\CHECKMEM
@@ -212,6 +212,7 @@
% {Check if \cs{tracingfonts} defined removed again.}
% \begin{macrocode}
%<*2ekernel>
+\message{NFSS tracing,}
\def\tracingfonts{%
\@font at warning{Command \noexpand\tracingfonts
not provided.\MessageBreak
@@ -468,7 +469,7 @@
% we are ready to change the font face. This way they happen after
% a possibly new family is set which is important because they
% look at the available font faces in that family and alter the
-% selection based on availibility. Several calls to \cs{fontseries}
+% selection based on availability. Several calls to \cs{fontseries}
% or \cs{fontshape} are delayed in the order in which they appear,
% so that by switching them one can work around missing
% intermediate font faces and avoid substitutions.
@@ -495,7 +496,7 @@
\delayed at f@adjustment
% \end{macrocode}
% We then check if the resulting cominbation is valid but for this
-% we have to make sure that the appropiate \texttt{.fd} is loaded if
+% we have to make sure that the appropriate \texttt{.fd} is loaded if
% that hasn't happened so far.
% \begin{macrocode}
\maybe at load@fontshape
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltidxglo.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltidxglo.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltidxglo.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -76,7 +76,7 @@
% \changes{v1.1a}{1994/05/19}{Initial version of ltidxglo.dtx,
% split from ltidxbib.dtx}
% \changes{v1.1d}{1995/10/25}{Doc cleanup}
-% \changes{v1.1f}{2019/08/27}{Make \cs{index} and \cs{gloassary} robust}
+% \changes{v1.1f}{2019/08/27}{Make \cs{index} and \cs{glossary} robust}
%
%
% \begin{oldcomments}
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltmarks.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmarks.dtx}
- [2024/10/22 v1.0h LaTeX Kernel (Marks)]
+ [2024/11/14 v1.1a LaTeX Kernel (Marks)]
% \iffalse
%
\documentclass{l3doc}
@@ -211,6 +211,13 @@
% 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.
+% There is, however, one exception: if you produce multiple columns
+% using the \pkg{multicol} package, it is possible to retrieve mark
+% values from the regions \texttt{first-column},
+% \texttt{last-column}, \texttt{mcol-1},
+% \texttt{mcol-2},\ldots\ directly after the environment has
+% ended. This can, for example, be useful if a \env{multicols} has
+% been be used inside a box.
% \end{function}
%
%
@@ -218,45 +225,18 @@
% Currently, \meta{region} is one of
% \texttt{page},
% \texttt{previous-page},
-% \texttt{column}, and
-% \texttt{previous-column}.
-% If a page has just been finished then the region \texttt{page}
-% refers to the current page and \texttt{previous-page}, as the name
-% indicates, to the page that has been finished previously. This
-% means you are able to access mark information for the current page
-% as well as for the page before if you are inside the output
-% routine, without the need to explicitly save that information
-% beforehand.
+% \texttt{column},
+% \texttt{previous-column},
+% \texttt{first-column},
+% \texttt{last-column}, and
+% \texttt{mcol-1} (first column in a \env{multicols}),
+% \texttt{mcol-2} (second column in a \env{multicols}),
+% up to
+% \texttt{mcol-20} (twentieth column in a \env{multicols}).
+% See section~\ref{sec:regions} for discussion of how these regions
+% behave and how one can make use of them.
%
-% In single column documents the \texttt{column} is the same as the
-% \texttt{page} region, but in two-column documents, \texttt{column}
-% refers to the current column that just got finished and
-% \text{previous-column} to the one previously finished. Code for
-% running headers are (in standard \LaTeX{}) only evaluated when
-% both columns are assembled, which is another way of saying that in
-% that case \texttt{previous-column} refers to the left column and
-% \texttt{column} to the right column.
-% However, to make this a bit nicer to access, there are also alias
-% regions named \texttt{first-column} and
-% \texttt{last-column}\footnote{This is called \enquote{last} not \enquote{second}
-% in anticipation of extending the mechanism to multiple columns,
-% where first and last would still make sense.} to
-% access these regions.\footnote{At the moment there aren't any
-% \texttt{previous-...-column} regions to access the columns from
-% the previous page. If necessary, the mechanism could be
-% easily augmented to cover them too, though.}
%
-% Note that you can only look backwards at already processed regions,
-% e.g., in a \texttt{twoside} document finishing a recto (odd,
-% right-hand) page you can access the data from the facing verso
-% (left-hand) page, but if you are finishing a left-hand page you
-% can't integrate data from the upcoming right-hand page. If such a
-% scenario needs to be realized then it is necessary to save the
-% left-hand page temporarily instead of finalizing it, process
-% material for the right-hand page and once both are ready, attach
-% running headers and footers and shipout out both in one
-% go.\footnote{As of now that scenario is not yet officially supported.}
-%
% \begin{function}[EXP]{\IfMarksEqualTF,\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}
@@ -347,6 +327,151 @@
%
%
%
+% \subsection{Understanding regions}
+%
+% If a page has just been finished then the region \texttt{page}
+% refers to the current page and \texttt{previous-page}, as the name
+% indicates, refers to the page before the current page. This
+% means you are able to access mark information for the current page
+% as well as for the page before (as long as you are inside the output
+% routine) without the need to explicitly save that information
+% beforehand. The \texttt{page} region is the region that is most
+% often queried, which is why commands like \cs{FirstMark} use that
+% region by default.
+%
+% In single column documents the \texttt{column} is the same as the
+% \texttt{page} region, but in two-column documents (if not produced
+% by \env{multicols}), \texttt{column} refers to the current column
+% that just got finished and \text{previous-column} to the one
+% previously finished. Code for running headers is (in standard
+% \LaTeX{}) evaluated only after both columns have been assembled, which is
+% another way of saying that in that case \texttt{previous-column}
+% refers to the left column and \texttt{column} to the right column.
+% However, to make these somewhat easier to use, there are also aliased names
+% for these two regions: \texttt{first-column} and
+% \texttt{last-column}.\footnote{The region is called \enquote{last-column} not
+% \enquote{second-column} in anticipation of extending the mechanism to
+% multiple columns, where first and last would still make sense.
+% There aren't any
+% \texttt{previous-first-column} and \texttt{previous-last-column}
+% regions to access the corresponding
+% columns from the previous page.}
+%
+% Note that you can only look backwards at already processed
+% regions, e.g., in a \texttt{twoside} document finishing a recto
+% (odd, right-hand) page you can access the data from the facing
+% verso (left-hand) page, but if you are finishing a left-hand page
+% you can't integrate data from the upcoming right-hand page. If
+% such a scenario needs to be realized then it is necessary to save
+% the left-hand page temporarily instead of finalizing it, process
+% material for the right-hand page and once both are ready, attach
+% running headers and footers and shipout out both in one
+% go.\footnote{As of now that scenario is not (yet) officially
+% supported but it would be possible to achieve this using the
+% shipout hooks to store the verso page and then on the next shipout
+% use the hook to shipout both with running headers and footers
+% attached.}
+%
+% The situation starts getting rather complex if you allow for
+% multiple columns in the way they are supported by the
+% \pkg{multicol} package. In this case you might have a variable
+% number of \enquote{columns} on a single page to be shipped
+% out. And even if not, then a \env{multicols} might start or end in
+% the middle of the page; in either case, the regions \texttt{column} and
+% \texttt{previous-column} become rather meaningless and you should
+% therefore not use them.\footnote{They return something, because
+% they represent the last two columns of the \env{multicols} when
+% you are inside the output routine, but that is obviously of little
+% use.}
+% Instead, the algorithm offers \texttt{mcol-1}, \texttt{mcol-2},
+% \texttt{mcol-3}, etc., to represent the columns in the
+% \env{multicols} on the current page to be shipped out. If there is
+% more than one \env{multicols} on the current page then in the output routine
+% only the columns of the last one will be accessible.
+%
+% These provisions cover, out of the box, a number of layouts and use cases, but
+% obviously not all. However, more cases can be supported by storing away
+% mark information during the processing. Here is the full
+% algorithm:
+% \begin{itemize}
+% \item
+
+% The \texttt{column} region is used by the \enquote{current
+% column} that is being built (moving through all columns with
+% \texttt{previous-column} trailing behind (to handle top marks
+% properly).
+%
+% \item
+
+% When the \env{multicols} starts, the \texttt{column} region is
+% cleared, i.e., from that point on it looks as if there have not
+% been any marks so far. This will make sure that the top mark in
+% the first column is always empty.
+%
+% \item
+%
+% If the \env{multicols} extends beyond the current page, then the
+% material designated for the current page is split into columns.
+% The \texttt{column} region is used to represent each column in
+% turn.
+
+% \begin{itemize}
+% \item
+%
+% First we copy the current data from \texttt{column} to
+% \texttt{previous-column}. Then the mark data from the current
+% column is placed into the \texttt{column} region. Then we alias
+% \texttt{column} to \texttt{mcol-1}.
+%
+% \item These steps are repeated for all columns of the \env{multicols}
+% environment.
+%
+% \item Finally, the first and the last column of that page is also
+% made available as \texttt{first-column} and
+% \texttt{last-column}, respectively.
+% \end{itemize}
+%
+% \item
+% All those marks inside any of the columns are also available in the
+% \texttt{page} region. Thus, if you are interested in the top,
+% first, or last mark of a specific class on the whole page you
+% simply need to query for it in the \texttt{page} region.
+%
+% \item
+% If the \env{multicols} continues across several pages then
+% this algorithm above is repeated for each page, except that the \texttt{column}
+% region is not cleared again. This means that the top mark of
+% the first column of the next page will be the last mark of the
+% last column from the previous page.
+%
+% \item
+% When the \env{multicols} finishes the remaining material for the
+% current page is balanced to produce columns of roughly equal height.
+%
+% \item
+% Again \texttt{column} and \texttt{previous-column} are used
+% while this balancing happens and \texttt{mcol-1},
+% \texttt{mcol-2}, etc., are used to represent the column
+% regions and \texttt{first-column} and \texttt{last-column} are
+% set appropriately.
+%
+% \item
+% Then the balanced set of columns is returned back to the page
+% (since there may be space for further material). In addition, all
+% marks inside that material are reinserted so that they become
+% available in the \texttt{page} region.
+%
+% \item As a side effect, it is possible (and useful in certain
+% circumstances) to query for mark classes directly after the
+% \env{multicols} has ended without the need to be inside the output
+% routine. The regions that can be queried this way are
+% \texttt{mcol-1}, \texttt{mcol-2}, etc.\ (up to the number of columns
+% the multicol had) and \texttt{first-column} and \text{last-column}.
+%
+% \end{itemize}
+%
+%
+%
% \subsection{Debugging mark code}
%
%
@@ -573,47 +698,22 @@
% be taken care of---those are discussed in the implementation sections.
%
%
-% \section{Internal output routine functions}
%
-% The functions in this section are tied to the output routine and used in the
-% interface to \LaTeXe{} and perhaps at some later time within a new
-% output routine
-% for \LaTeX. They are not meant for general use and are therefore made internal.
-% Internal means that \verb|@@| automatically gets
-% replaced in the code (and in the documentation) so we have to give
-% it a suitable value.
-% \begin{macrocode}
-%<@@=mark>
-% \end{macrocode}
%
-% \begin{function}{\@@_update_singlecol_structures:}
-% \begin{syntax}
-% \cs{@@_update_singlecol_structures:}
-% \end{syntax}
-% \LaTeXe{} integration function in case we are doing single column
-% layouts. It assumes that the page content is already stored in
-% \cs{@outputbox} and processes the marks inside that box. It is
-% called as part of \cs{@opcol}.
-% \end{function}
+% \section{Public interfaces for packages such as \pkg{multicol}}
%
+% The functions in this section are public so that packages can make
+% use of them. However, this must be done with great care, e.g.,
+% \cs{mark_update_structure_from_material:nn} updates the global mark
+% structure and can therefore be used only in places where such an
+% update is meaningful, e.g., in special output routines. Elsewhere, a
+% change to the mark structure would break the whole mechanism and
+% querying the marks would return incorrect data.
%
-% \begin{function}{\@@_update_dblcol_structures:}
+% \begin{function}{\mark_update_structure_from_material:nn}
% \begin{syntax}
-% \cs{@@_update_singlecol_structures:}
+% \cs{mark_update_structure_from_material:nn} \Arg{region} \Arg{material with marks}
% \end{syntax}
-% \LaTeXe{} integration function mark used when we are doing double
-% column documents. It assumes that the page content is already
-% stored in \cs{@outputbox} and processes the marks inside that
-% box. It then does different post-processing depending on the start
-% of the switch \cs{if at firstcolumn}. If we are in the second column
-% it also has to update page marks, otherwise it only updates column
-% marks. It too is called as part of \cs{@opcol}.
-% \end{function}
-%
-% \begin{function}{\@@_update_structure_from_material:nn}
-% \begin{syntax}
-% \cs{@@_update_structure_from_material:nn} \Arg{region} \Arg{material with marks}
-% \end{syntax}
% Helper function that inspects the marks
% inside the second argument and assigns new mark values based on
% that to the \meta{region} given in the first argument.
@@ -635,14 +735,14 @@
%
%
%
-% \begin{function}{\@@_update_structure_alias:nn}
+% \begin{function}{\mark_copy_structure:nn}
% \begin{syntax}
-% \cs{@@_update_structure_alias:nn} \Arg{alias} \Arg{source}
+% \cs{mark_copy_structure:nn} \Arg{alias} \Arg{source}
% \end{syntax}
% Helper function that copies all mark values in the \meta{source}
% region to \meta{alias}, i.e., make the structures identical. Used
% to update the \texttt{previous-...} structures inside
-% \cs{@@_update_structure_from_material:nn} and \texttt{first-column} and
+% \cs{mark_update_structure_from_material:nn} and \texttt{first-column} and
% \texttt{last-column} structures inside
% \cs{@@_update_singlecol_structures:} or
% \cs{@@_update_dblcol_structures:}.
@@ -650,9 +750,9 @@
%
%
%
-% \begin{function}{\@@_update_structure_to_err:n}
+% \begin{function}{\mark_set_structure_to_err:n}
% \begin{syntax}
-% \cs{@@_update_structure_to_err:n} \Arg{region}
+% \cs{mark_set_structure_to_err:n} \Arg{region}
% \end{syntax}
% Helper function that sets all mark values in the \meta{region} to
% an error message. This is currently used for \texttt{last-column}
@@ -661,9 +761,23 @@
% \end{function}
%
%
-% \begin{function}{\@@_get_marks_for_reinsertion:nNN}
+%
+% \begin{function}{\mark_clear_structure:n}
% \begin{syntax}
-% \cs{@@_get_marks_for_reinsertion:nNN} \Arg{source}
+% \cs{mark_clear_structure:n} \Arg{region}
+% \end{syntax}
+% Helper function that sets all mark values in the \meta{region} to
+% empty. This is currently used for \texttt{column} when a multicol
+% environment starts; this is because it wouldn't make sense if the top mark
+% in the first column returned the last mark from a previous
+% multicol (which may have been much earlier, with intermediate
+% material).
+% \end{function}
+%
+%
+% \begin{function}{\mark_get_marks_for_reinsertion:nNN}
+% \begin{syntax}
+% \cs{mark_get_marks_for_reinsertion:nNN} \Arg{source}
% \qquad \meta{token-list-var for collecting first marks}
% \qquad \meta{token-list-var for collecting last marks}
% \end{syntax}
@@ -672,8 +786,8 @@
% does not update mark structures and can therefore be used outside
% the output routine as well.
%
-% It collect all the top-level marks from inside the \meta{source}
-% and adds suitable \cs{mark_insert:nn} in the two token
+% It collects all the top-level marks from inside the \meta{source}
+% and then adds suitable \cs{mark_insert:nn} commands to each of 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, going to be used\footnote{Probably not before 2025, though.}
@@ -693,7 +807,46 @@
% \end{function}
%
%
+% \section{Internal functions for the standard output routine of \LaTeX{}}
%
+% The functions in this section are tied to the output routine and used in the
+% interface to \LaTeXe{} and perhaps at some later time within a new
+% output routine
+% for \LaTeX. They are not (yet) meant for general use and are
+% therefore made internal, even though we already use them in
+% \pkg{multicol}.
+% Internal means that \verb|@@| automatically gets
+% replaced in the code (and in the documentation) so we have to give
+% it a suitable value.
+% \begin{macrocode}
+%<@@=mark>
+% \end{macrocode}
+%
+% \begin{function}{\@@_update_singlecol_structures:}
+% \begin{syntax}
+% \cs{@@_update_singlecol_structures:}
+% \end{syntax}
+% \LaTeXe{} integration function in case we are doing single column
+% layouts. It assumes that the page content is already stored in
+% \cs{@outputbox} and processes the marks inside that box. It is
+% called as part of \cs{@opcol}.
+% \end{function}
+%
+%
+% \begin{function}{\@@_update_dblcol_structures:}
+% \begin{syntax}
+% \cs{@@_update_singlecol_structures:}
+% \end{syntax}
+% \LaTeXe{} integration function mark used when we are doing double
+% column documents. It assumes that the page content is already
+% stored in \cs{@outputbox} and processes the marks inside that
+% box. It then does different post-processing depending on the start
+% of the switch \cs{if at firstcolumn}. If we are in the second column
+% it also has to update page marks, otherwise it only updates column
+% marks. It too is called as part of \cs{@opcol}.
+% \end{function}
+%
+%
% ^^A \end{documentation}
%
%
@@ -774,69 +927,85 @@
% \begin{macrocode}
\seq_gput_right:Nn \g_@@_classes_seq {#1}
% \end{macrocode}
-% We need three token lists for each region, one for top, first,
-% and last.
% \begin{macrocode}
- \tl_new:c { g_@@_page_top_ #1 _tl }
- \tl_new:c { g_@@_page_first_ #1 _tl }
- \tl_new:c { g_@@_page_last_ #1 _tl }
+ \@@_init_region:nn {page}{#1}
% \end{macrocode}
% For the \texttt{page} region we also keep track of the
% \texttt{previous-page}.
% \begin{macrocode}
- \tl_new:c { g_@@_previous-page_top_ #1 _tl }
- \tl_new:c { g_@@_previous-page_first_ #1 _tl }
- \tl_new:c { g_@@_previous-page_last_ #1 _tl }
+ \@@_init_region:nn {previous-page}{#1}
% \end{macrocode}
% Same game for \texttt{column} and \texttt{previous-column}
% \begin{macrocode}
- \tl_new:c { g_@@_column_top_ #1 _tl }
- \tl_new:c { g_@@_column_first_ #1 _tl }
- \tl_new:c { g_@@_column_last_ #1 _tl }
- \tl_new:c { g_@@_previous-column_top_ #1 _tl }
- \tl_new:c { g_@@_previous-column_first_ #1 _tl }
- \tl_new:c { g_@@_previous-column_last_ #1 _tl }
+ \@@_init_region:nn {column}{#1}
+ \@@_init_region:nn {previous-column}{#1}
% \end{macrocode}
% But for columns we also allocate token lists for the alias
% regions \texttt{first-column} and \texttt{last-column}.
% \begin{macrocode}
- \tl_new:c { g_@@_first-column_top_ #1 _tl }
- \tl_new:c { g_@@_first-column_first_ #1 _tl }
- \tl_new:c { g_@@_first-column_last_ #1 _tl }
- \tl_new:c { g_@@_last-column_top_ #1 _tl }
- \tl_new:c { g_@@_last-column_first_ #1 _tl }
- \tl_new:c { g_@@_last-column_last_ #1 _tl }
+ \@@_init_region:nn {first-column}{#1}
+ \@@_init_region:nn {last-column}{#1}
% \end{macrocode}
-% 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.
-% \changes{v1.0g}{2024/05/31}{Initialize all marks with an id, use 0
-% when a new class is made (gh/1359)}
+% To support multiple columns produced by the \pkg{multicol}
+% package, we preallocate twenty alias regions (since this is the number of columns that
+% \pkg{multicol} supports as a maximum). They are filled by copying
+% the current \texttt{column} into the appropriate \texttt{mcol-...}.
% \begin{macrocode}
- \tl_set:cn { g_@@_page_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_page_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_page_last_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-page_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-page_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-page_last_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_column_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_column_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_column_last_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-column_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-column_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_previous-column_last_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_first-column_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_first-column_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_first-column_last_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_last-column_top_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_last-column_first_ #1 _tl }{ \@@_id:n{0} }
- \tl_set:cn { g_@@_last-column_last_ #1 _tl }{ \@@_id:n{0} }
+%fmi \@@_init_region:nn {mcol}{#1}
+%fmi \@@_init_region:nn {previous-mcol}{#1}
+ \@@_init_region:nn {mcol-1}{#1}
+ \@@_init_region:nn {mcol-2}{#1}
+ \@@_init_region:nn {mcol-3}{#1}
+ \@@_init_region:nn {mcol-4}{#1}
+ \@@_init_region:nn {mcol-5}{#1}
+ \@@_init_region:nn {mcol-6}{#1}
+ \@@_init_region:nn {mcol-7}{#1}
+ \@@_init_region:nn {mcol-8}{#1}
+ \@@_init_region:nn {mcol-9}{#1}
+ \@@_init_region:nn {mcol-10}{#1}
+ \@@_init_region:nn {mcol-11}{#1}
+ \@@_init_region:nn {mcol-12}{#1}
+ \@@_init_region:nn {mcol-13}{#1}
+ \@@_init_region:nn {mcol-14}{#1}
+ \@@_init_region:nn {mcol-15}{#1}
+ \@@_init_region:nn {mcol-16}{#1}
+ \@@_init_region:nn {mcol-17}{#1}
+ \@@_init_region:nn {mcol-18}{#1}
+ \@@_init_region:nn {mcol-19}{#1}
+ \@@_init_region:nn {mcol-20}{#1}
}
% \end{macrocode}
% \end{macro}
%
%
+% \begin{macro}{\@@_init_region:nn,\c_@@_empty_tl}
+%
+% For each class (\texttt{\#2}) and region (\texttt{\#1}), we need
+% three token lists: one for top, first, and last. The default value to be
+% returned is \enquote{empty}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_init_region:nn #1 #2 {
+ \tl_new:c { g_@@_#1_top_ #2 _tl }
+ \tl_new:c { g_@@_#1_first_ #2 _tl }
+ \tl_new:c { g_@@_#1_last_ #2 _tl }
+ \tl_set_eq:cN { g_@@_#1_top_ #2 _tl } \c_@@_empty_tl
+ \tl_set_eq:cN { g_@@_#1_first_ #2 _tl } \c_@@_empty_tl
+ \tl_set_eq:cN { g_@@_#1_last_ #2 _tl } \c_@@_empty_tl
+}
+% \end{macrocode}
+%
+% All marks will have an identification in the form of a
+% number\footnote{There are a few cases where special
+% identification strings are used, e.g., \texttt{2.09-compat}.} that is
+% incremented each time a mark insertion happens; therefore the
+% initial empty values should also have such a number, so that data extraction
+% will be uniform.
+% \changes{v1.0g}{2024/05/31}{Initialize all marks with an id, use
+% \texttt{0} when a new class is made (gh/1359)}
+% \begin{macrocode}
+\tl_const:Nn \c_@@_empty_tl { \@@_value:nn{0}{} }
+% \end{macrocode}
+% \end{macro}
%
%
% \subsection{Updating mark structures}
@@ -860,9 +1029,9 @@
%
% This is the main macro to extract and handle marks inside some
% vertical material. It is used by
-% \cs{@@_update_structure_from_material:nn} (for updating the mark
+% \cs{mark_update_structure_from_material:nn} (for updating the mark
% structure for a region based on the marks found) and by
-% \cs{@@_get_marks_for_reinsertion:nNN} (for extracting marks from
+% \cs{mark_get_marks_for_reinsertion:nNN} (for extracting marks from
% some material and prepare for reinserting them later (e.g., out
% of a box that is placed as a box into the main galley).
% \begin{macrocode}
@@ -1102,7 +1271,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_update_structure_from_material:nn}
+% \begin{macro}{\mark_update_structure_from_material:nn}
%
% \changes{v1.0e}{2024/01/29}{Macro renamed}
%
@@ -1113,7 +1282,7 @@
% the assignments.
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_update_structure_from_material:nn #1#2 {
+\cs_new_protected:Npn \mark_update_structure_from_material:nn #1#2 {
\@@_extract_and_handle_marks:nn
% \end{macrocode}
%
@@ -1137,9 +1306,9 @@
%
% The first thing we do is to copy the current region structure to
% \texttt{previous-...}; this leaves the current structure
-% untouched so we can update it class by class (which is necessary).
+% untouched so we can update it class by class (as is necessary).
% \begin{macrocode}
- \@@_update_structure_alias:nn { previous-#1 } {#1}
+ \mark_copy_structure:nn { previous-#1 } {#1}
% \end{macrocode}
% After this action we can get first and last marks of the various
% classes through \cs{tex_splitfirstmarks:D} and
@@ -1211,7 +1380,7 @@
%
%
%
-% \begin{macro}{\@@_get_marks_for_reinsertion:nNN}
+% \begin{macro}{\mark_get_marks_for_reinsertion:nNN}
%
% This function extracts the marks from the material in the first
% argument but it does not update any the mark structures. Instead,
@@ -1224,12 +1393,12 @@
% really clear that this is never needed.}
%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_get_marks_for_reinsertion:nNN #1#2#3 {
+\cs_new_protected:Npn \mark_get_marks_for_reinsertion:nNN #1#2#3 {
% \end{macrocode}
% First we clear the temporary token lists as we haven't seen any marks yet.
% \begin{macrocode}
- \tl_clear:N \g_@@_first_marks_tl
- \tl_clear:N \g_@@_last_marks_tl
+ \tl_gclear:N \g_@@_first_marks_tl
+ \tl_gclear:N \g_@@_last_marks_tl
% \end{macrocode}
% Then we extract all top-level marks, thereby filling the token lists
% with suitable \cs{mark_insert:nn} calls.
@@ -1236,8 +1405,8 @@
% \begin{macrocode}
\@@_extract_and_handle_marks:nn
% \end{macrocode}
-% The first argument holds the code for fill the token lists and
-% the second is the material we extract from.
+% The first argument holds the code used for filling the token lists and
+% the second holds the material from which all marks should be extracted.
% \begin{macrocode}
\@@_get_from_splitmarks:
{ #1 }
@@ -1309,7 +1478,7 @@
mark~ for~ class~ '##1'~ =~ \g_@@_tmp_tl } }
%</trace>
\tl_gput_right:Ne \g_@@_last_marks_tl
- { \mark_insert:nn {##1} { \g_@@_tmp_tl } }
+ { \mark_insert:nn {##1} { \@@_drop_id:o { \g_@@_tmp_tl } } }
% \end{macrocode}
% Because we had a last mark we also have a first mark (which might
% be the same, but might not be), so we pick that up and add it to
@@ -1327,8 +1496,14 @@
\tl_gput_right:Ne \g_@@_first_marks_tl
{ \mark_insert:nn {##1}
{
- \tex_splitfirstmarks:D
- \use:c { c_@@_class_##1_mark }
+% \end{macrocode}
+% We better drop the id from the returned value otherwise they
+% will accumulate in the marks when reinserted.
+% \begin{macrocode}
+ \@@_drop_id:o {
+ \tex_splitfirstmarks:D
+ \use:c { c_@@_class_##1_mark }
+ }
}
}
}
@@ -1347,12 +1522,13 @@
% \end{macro}
%
%
-% \begin{macro}{\@@_update_structure_alias:nn}
-% This function copies the structure for one region to another
-% (name), e.g., from \texttt{page} to \texttt{previous-page} above,
+% \begin{macro}{\mark_copy_structure:nn}
+% This function copies the structure for one region to another,
+% e.g., from \texttt{page} to \texttt{previous-page} above,
% or later from \texttt{column} to \texttt{first-column}, etc.
+% \changes{v1.1a}{2024/11/09}{Macro renamed}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_update_structure_alias:nn #1#2 {
+\cs_new_protected:Npn \mark_copy_structure:nn #1#2 {
% \end{macrocode}
% This requires a simple loop through all mark classes copying the
% token list from one name to the next.
@@ -1371,16 +1547,40 @@
% \end{macro}
%
%
+% \begin{macro}{\mark_clear_structure:n}
+% This function sets the structure of one region back to an initial
+% state, so that all classes return an empty value if queried.
+% \changes{v1.1a}{2024/11/09}{}
+% \begin{macrocode}
+\cs_new_protected:Npn \mark_clear_structure:n #1 {
+% \end{macrocode}
+% This requires a simple loop through all mark classes.
+% \begin{macrocode}
+ \seq_map_inline:Nn \g_@@_classes_seq
+ {
+ \tl_gset_eq:cN { g_@@_ #1 _top_ ##1 _tl }
+ \c_@@_empty_tl
+ \tl_gset_eq:cN { g_@@_ #1 _first_ ##1 _tl }
+ \c_@@_empty_tl
+ \tl_gset_eq:cN { g_@@_ #1 _last_ ##1 _tl }
+ \c_@@_empty_tl
+ }
+}
+% \end{macrocode}
+% \end{macro}
%
-% \begin{macro}{\@@_update_structure_to_err:n,\@@_error:n}
-% A slight variation is to install a fixed error message as the value.
+%
+%
+% \begin{macro}{\mark_set_structure_to_err:n,\@@_error:n}
+% A slight variation is to install a fixed error message as the
+% value.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_update_structure_to_err:n #1 {
+\cs_new_protected:Npn \mark_set_structure_to_err:n #1 {
\seq_map_inline:Nn \g_@@_classes_seq
{
- \tl_gset:cn { g_@@_ #1 _top_ ##1 _tl } { \@@_error:n {#1} }
- \tl_gset:cn { g_@@_ #1 _first_ ##1 _tl } { \@@_error:n {#1} }
- \tl_gset:cn { g_@@_ #1 _last_ ##1 _tl } { \@@_error:n {#1} }
+ \tl_gset:ce { g_@@_ #1 _top_ ##1 _tl } { \@@_value:nn{?}{\@@_error:nn {#1}{?} }}
+ \tl_gset:ce { g_@@_ #1 _first_ ##1 _tl } { \@@_value:nn{?}{\@@_error:nn {#1}{?} }}
+ \tl_gset:ce { g_@@_ #1 _last_ ##1 _tl } { \@@_value:nn{?}{\@@_error:nn {#1}{?} }}
}
}
% \end{macrocode}
@@ -1388,9 +1588,10 @@
% argument which would be a bit more compact, but who knows,
% perhaps we end up with another reason to use this error command
% elsewhere, so for now we keep the argument.
+%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_error:n #1 {
- \msg_error:nnn { mark } { invalid-use } {#1}
+\cs_new_protected:Npn \@@_error:nn #1#2 {
+ \msg_error:nnnn { mark } { invalid-use } {#1} {#2}
}
% \end{macrocode}
% \end{macro}
@@ -1440,8 +1641,7 @@
% \changes{v1.0f}{2024/05/30}{Use sequence marker to make all marks
% unique on nearby regions (gh/1359)}
% \begin{macrocode}
- \@@_id:n{ \int_use:N\g_@@_int }
- #2
+ \@@_value:nn{ \int_use:N\g_@@_int }{#2}
}
%<*trace>
\@@_debug:n{ \iow_term:x { Marks:~ set~#1~<-~
@@ -1455,7 +1655,7 @@
% becomes empty, but not immediately; otherwise we just put
% \cs{g_@@_tmp_tl} in.
% \begin{macrocode}
-% this is no longer needed with 1.0f
+% This is no longer needed with 1.0f
% \tl_if_empty:NTF \g_@@_tmp_tl
% { \exp_not:n { \prg_do_nothing: } }
% { \exp_not:o { \g_@@_tmp_tl } }
@@ -1465,7 +1665,7 @@
% \end{macrocode}
% A mark introduces a possible break point and in certain
% situations that should not happen in vertical mode in \LaTeX{}.
-% This needs some cleanup \ldots.
+% This may need some checking and possibly cleanup \ldots.
% \begin{macrocode}
\if at nobreak\ifvmode\nobreak\fi\fi
}
@@ -1481,7 +1681,7 @@
% \end{macro}
%
%
-% \begin{macro}{\@@_id:n}
+% \begin{macro}{\@@_value:nn}
% A hidden marker is placed into every mark added by
% \cs{mark_insert:nn}. It will will not show up in the output but
% its argument (a counter value that is incremented) makes all
@@ -1490,7 +1690,7 @@
% \changes{v1.0f}{2024/05/30}{Use sequence marker to make all marks
% unique on nearby regions (gh/1359)}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_id:n #1 { }
+\cs_new_protected:Npn \@@_value:nn #1#2 { #2 }
% \end{macrocode}
% \end{macro}
%
@@ -1532,26 +1732,43 @@
% To retrieve the first, last or top region mark, we grab the
% appropriate value stored in the corresponding token list variable
% and pass its contents back. These functions should be used only
-% in output routines and only after \cs{@@_update_structure_from_material:nn} has acted,
+% in output routines and only after \cs{mark_update_structure_from_material:nn} has acted,
% otherwise their value will be wrong.
%
-% If used with an unknown class or region they generate an error
-% (fairly low-level because we are in an expandable context).
+% \begin{macrocode}
+\cs_new:Npn \mark_use_first:nn #1#2 { \@@_use_check:nnn { g_@@_#1_first_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_last:nn #1#2 { \@@_use_check:nnn { g_@@_#1_last_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_top:nn #1#2 { \@@_use_check:nnn { g_@@_#1_top_#2_tl } {#1} {#2} }
+% \end{macrocode}
%
+% If used with an unknown class or region these commands will generate an error.
+% If that happens in an expandable context then the error
+% generation is delayed (e.g., if used in a \cs{section}) and
+% happens when the code is finally used in typesetting, e.g., in the
+% TOC or a running header.
+% If used in a \cs{typeout} you only see something like
+% \verb=\__mark_error:n{page}=.
+% This is not too good, but probably better than low-level errors, I
+% guess, and I don't want to use an expandable error because of the
+% size restrictions in such error messages.
+% \changes{v1.1a}{2024/11/09}{}
+% \begin{macrocode}
+\cs_new:Npn \@@_use_check:nnn #1#2#3 {
+ \tl_if_eq:cNTF {#1} \relax
+ { \@@_error:nn {#2} {#3} }
+ { \@@_drop_id:v {#1} }
+}
+% \end{macrocode}
+%
% Each mark starts with an id and while the id does not print it is
% nevertheless better to remove it when returning the mark, so that
% downstream manipulation of the data doesn't have to deal with it.
% \changes{v1.0g}{2024/05/31}{Remove the id when returning the mark value (gh/1359)}
+% This is what the \cs{exp_not:o} accomplishes.
% \begin{macrocode}
-\cs_new:Npn \mark_use_first:nn #1#2 { \@@_use:v { g_@@_#1_first_#2_tl } }
-\cs_new:Npn \mark_use_last:nn #1#2 { \@@_use:v { g_@@_#1_last_#2_tl } }
-\cs_new:Npn \mark_use_top:nn #1#2 { \@@_use:v { g_@@_#1_top_#2_tl } }
+\cs_new:Npn \@@_drop_id:n #1 { \exp_not:o { #1 } }
+\cs_generate_variant:Nn \@@_drop_id:n { o, v }
% \end{macrocode}
-% This is what the \cs{use_none:nn} accomplishes.
-% \begin{macrocode}
-\cs_new:Npn \@@_use:n #1 { \exp_not:o { \use_none:nn #1 } }
-\cs_generate_variant:Nn \@@_use:n { v }
-% \end{macrocode}
% \end{macro}
%
%
@@ -1618,15 +1835,17 @@
}
% \end{macrocode}
%
-%
+% The next error can also happen if the mark class is unknown, so this
+% should perhaps be separated into two different errors.
% \begin{macrocode}
-
\msg_new:nnnn { mark } { invalid-use }
- { Mark~region~'#1'~not ~usable }
+ { Mark~region~'#1'~not~usable~or~class~'#2'~unknown }
{
\c__msg_coding_error_text_tl
- The~region~'#1'~can~only~be~used~after~
- all~columns~have~been~assembled.
+ The~region~'#1'~is~either~not~known~or~data~for~it~
+ still~needs~to~be~assembled,~e.g.,~last-column~
+ while~building~the~first-column.~
+ Also~possible:~the~class~namne~'#2'~is~misspelled.
\c__msg_return_text_tl
}
% \end{macrocode}
@@ -1691,53 +1910,76 @@
%
%
%
-% \begin{macro}{\@@_class_status:nn}
+% \begin{macro}{\@@_class_status:nnn}
% Shows the mark values across all regions for one mark class
-% (\verb=#2=). The first argument gives some \meta{info} to help
-% identifying where the command was called.
+% (\verb=#2=).
+%
+% The first argument gives some \meta{info} to help
+% in identifying where the command was called, the second is
+% the class and the third holds the number of \texttt{mcol-...} we
+% should display: inside a \env{multicols} environment this will be \cs{col at number},
+% in \LaTeX{}'s normal output routines it will be \texttt{0}.
+% \changes{v1.1a}{2024/11/09}{Add a third argument}
% \begin{macrocode}
%<*trace>
-\cs_new_protected:Npn \@@_class_status:nn #1#2
- {
- \typeout{ Marks:~#2~ #1:}
- \typeout{\@spaces page~ (current):
- | \exp_not:v { g_@@_page_top_ #2 _tl }
- | \exp_not:v { g_@@_page_first_ #2 _tl }
- | \exp_not:v { g_@@_page_last_ #2 _tl } |}
- \typeout{\@spaces page~ (previous):
- | \exp_not:v { g_@@_previous-page_top_ #2 _tl }
- | \exp_not:v { g_@@_previous-page_first_ #2 _tl }
- | \exp_not:v { g_@@_previous-page_last_ #2 _tl } |}
- \typeout{\@spaces column~ (previous):
- | \exp_not:v { g_@@_previous-column_top_ #2 _tl }
- | \exp_not:v { g_@@_previous-column_first_ #2 _tl }
- | \exp_not:v { g_@@_previous-column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (current):
- | \exp_not:v { g_@@_column_top_ #2 _tl }
- | \exp_not:v { g_@@_column_first_ #2 _tl }
- | \exp_not:v { g_@@_column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (first):
- | \exp_not:v { g_@@_first-column_top_ #2 _tl }
- | \exp_not:v { g_@@_first-column_first_ #2 _tl }
- | \exp_not:v { g_@@_first-column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (second):
- | \exp_not:v { g_@@_last-column_top_ #2 _tl }
- | \exp_not:v { g_@@_last-column_first_ #2 _tl }
- | \exp_not:v { g_@@_last-column_last_ #2 _tl } |}
+\cs_new_protected:Npn \@@_class_status:nnn #1#2#3 {
+ \typeout{ Marks:~#2~ #1:}
+ \@@_region_status:nnn {#2}{ page~ (previous) } { previous-page }
+ \@@_region_status:nnn {#2}{ page~ (current)~ } { page }
+ \@@_region_status:nnn {#2}{ column~ (previous) }{ previous-column }
+ \@@_region_status:nnn {#2}{ column~ (current)~ }{ column }
+ \@@_region_status:nnn {#2}{ column~ (first) } { first-column }
+ \@@_region_status:nnn {#2}{ column~ (last)~ } { last-column }
+% \end{macrocode}
+% Then finish by displaying a subset of the \texttt{mcol-...} regions: none (\texttt{0})
+% in the standard \LaTeX{} output routine and \cs{col at number}
+% within a \env{multicols} environment.
+% \begin{macrocode}
+ \int_step_inline:nn {#3}
+ {
+ \@@_region_status:nnn {#2}{ column~ (##1)~ } { mcol-##1 }
+ }
}
% \end{macrocode}
% \end{macro}
%
%
+% \begin{macro}{\@@_region_status:nnn}
+%
+% Display the top, first, and last mark of a region unless none of
+% them exist or all of them are empty.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_region_status:nnn #1#2#3 {
+ \group_begin:
+ \cs_set:Npn \@@_value:nn ##1##2{ \exp_not:n{ {##1} ~ ##2 } }
+ \tl_if_exist:cT { g_@@_#3_last_ #1 _tl }
+ {
+ \tl_if_eq:cNF { g_@@_#3_last_ #1 _tl } \c_@@_empty_tl
+ {
+ \typeout{\@spaces #2 =
+ ~|~ \use:c { g_@@_#3_top_ #1 _tl } ~|~
+ \use:c { g_@@_#3_first_ #1 _tl } ~|~
+ \use:c { g_@@_#3_last_ #1 _tl } ~|
+ }
+ }
+ }
+ \group_end:
+}
+% \end{macrocode}
+% \end{macro}
%
%
-% \begin{macro}{\@@_status:n}
-% Show a snapshot of all mark class values across all regions.
+% \begin{macro}{\@@_status:nn}
+% Show a snapshot of all mark class values across all regions. The
+% first argument is a string to identify the output, the second
+% argument is the number of \texttt{mcol-...} regions to show. Outside
+% of a \env{multicols} environment this is normally set to 0.
+% \changes{v1.1a}{2024/11/09}{Add a second argument}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_status:n #1
+\cs_new_protected:Npn \@@_status:nn #1#2
{
\seq_map_inline:Nn \g_@@_classes_seq
- { \@@_class_status:nn {#1} {##1} }
+ { \@@_class_status:nnn {#1} {##1} {#2} }
}
%</trace>
% \end{macrocode}
@@ -1747,15 +1989,17 @@
% \begin{macro}{\ShowMarksAt}
% \changes{v1.0e}{2024/01/29}{Macro added}
% Debugging helper that displays a snapshot of all known mark
-% structures. The argument is a text string that is
-% displayed to help identifying when the snapshot was made.
+% structures. The first argument is a text string that is
+% displayed to help identifying when the snapshot was made. The
+% optional second one determines how many \texttt{mcol-...} regions
+% are displayed (by default 4).
%
% This may not stay like this (or at all), which is why it isn't
% yet documented as an official command.
% \begin{macrocode}
-\cs_new_protected:Npn \ShowMarksAt #1 {
+\NewDocumentCommand \ShowMarksAt {m O{4} } {
%<*trace>
- \@@_debug:n { \@@_status:n {#1} }
+ \@@_debug:n { \@@_status:nn {#1}{#2} }
%</trace>
}
% \end{macrocode}
@@ -1842,25 +2086,25 @@
% \begin{macrocode}
\box_if_vertical:NTF \@outputbox
{
- \@@_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \vbox_unpack:N \@outputbox }
}
{
- \@@_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \hbox_unpack:N \@outputbox }
}
% \end{macrocode}
-% The we provide the necessary updates for the aliases.
+% Then we provide the necessary updates for the aliases.
% \begin{macrocode}
- \@@_update_structure_alias:nn {previous-column}{previous-page}
- \@@_update_structure_alias:nn {column}{page}
- \@@_update_structure_alias:nn {first-column}{page}
- \@@_update_structure_alias:nn {last-column}{page}
+ \mark_copy_structure:nn {previous-column}{previous-page}
+ \mark_copy_structure:nn {column}{page}
+ \mark_copy_structure:nn {first-column}{page}
+ \mark_copy_structure:nn {last-column}{page}
%<*trace>
% move this into status itself?
\@@_debug:n
{
- \@@_status:n
+ \@@_status:nn
{ in~ OR~ (
\legacy_if:nTF {@twoside}
{ twoside-
@@ -1870,6 +2114,7 @@
{ oneside }
)
}
+ {0}
}
%</trace>
}
@@ -1886,11 +2131,11 @@
% \begin{macrocode}
\box_if_vertical:NTF \@outputbox
{
- \@@_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \vbox_unpack:N \@outputbox }
}
{
- \@@_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \hbox_unpack:N \@outputbox }
}
% \end{macrocode}
@@ -1905,8 +2150,8 @@
% \texttt{first-column} and there is no \texttt{last-column} yet,
% so we make those an error.
% \begin{macrocode}
- \@@_update_structure_alias:nn {first-column}{column}
- \@@_update_structure_to_err:n {last-column}
+ \mark_copy_structure:nn {first-column}{column}
+ \mark_set_structure_to_err:n {last-column}
}
{
% \end{macrocode}
@@ -1916,11 +2161,11 @@
% (because is was set to \texttt{column} last time which is now the
% \texttt{previous-column}), thus there is no need to make an update.
% \begin{macrocode}
-% \@@_update_structure_alias:nn {first-column}{previous-column}
+% \mark_copy_structure:nn {first-column}{previous-column}
% \end{macrocode}
% However, we now have a proper \texttt{last-column} so we assign that.
% \begin{macrocode}
- \@@_update_structure_alias:nn {last-column}{column}
+ \mark_copy_structure:nn {last-column}{column}
% \end{macrocode}
% What now remains doing is to update the \texttt{page} and
% \texttt{previous-page} regions. For this we have to copy the
@@ -1995,7 +2240,7 @@
%<*trace>
\@@_debug:n
{
- \@@_status:n
+ \@@_status:nn
{ in~ OR~ (
\legacy_if:nTF {@twoside}
{ twoside-
@@ -2008,6 +2253,7 @@
{ first~ }{ second~ }
column )
}
+ {0}
}
%</trace>
}
@@ -2014,10 +2260,23 @@
% \end{macrocode}
% \end{macro}
%
+%
+%
+% \subsection{Other \LaTeXe{} output routines}
+%
+% This section will cover support for packages that alter the
+% \LaTeX{} output routine (as necessary). The support for
+% \pkg{multicol} (for now) is handled directly in that package.
+%
+%
+%
+%
% \begin{macrocode}
%<@@=>
% \end{macrocode}
%
+
+
% \begin{macro}[int]{\@expl@@@mark at update@singlecol at structures@@}
% \begin{macrocode}
\cs_new_eq:NN \@expl@@@mark at update@singlecol at structures@@
@@ -2037,14 +2296,6 @@
%
%
%
-% \subsection{Other \LaTeXe{} output routines}
-%
-% This section will cover \pkg{multicol} and other packages altering
-% or providing their own output routine. Not done yet.
-%
-%
-%
-%
% \subsection{Rollback information}
%
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltoutenc.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%<TS1>\ProvidesFile{ts1enc.def}[2001/06/05 v3.0e (jk/car/fm)
%<TU>\ProvidesFile{tuenc.def}
%<package>\ProvidesPackage{fontenc}
-%<OT1|T1|OMS|OML|OT4|TU|package> [2021/04/29 v2.0v
+%<OT1|T1|OMS|OML|OT4|TU|package> [2024/11/06 v2.1b
%<OT1|T1|OMS|OML|OT4|TS1|TU> Standard LaTeX file]
%<package> Standard LaTeX package]
%
@@ -44,7 +44,7 @@
%<*driver>
% \fi
\ProvidesFile{ltoutenc.dtx}
- [2024/02/08 v2.1a LaTeX Kernel (font encodings)]
+ [2024/11/06 v2.1b LaTeX Kernel (font encodings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutenc.dtx}
@@ -1827,6 +1827,7 @@
% T1, pr/3295}
% \changes{v1.94}{2001/06/05}{Text composite Commands need kludges for
% `,' -- see tlb1903.lvt}
+% \changes{v2.1b}{2024/11/06}{Support for macron-i for OT1}
% \begin{macrocode}
\DeclareTextComposite{\.}{OT1}{i}{`\i}
\DeclareTextComposite{\.}{OT1}{\i}{`\i}
@@ -1834,6 +1835,7 @@
\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
\DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
\DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
+\DeclareTextCompositeCommand{\=}{OT1}{i}{\=\i}
% \end{macrocode}
%
% T1 encoding is given more extensive set of overloads for \verb|\c|
@@ -2277,7 +2279,13 @@
\fi
% \end{macrocode}
%
+% \changes{v2.1b}{2024/11/06}{Support for macron-i for T1}
+% One oddity.
% \begin{macrocode}
+\DeclareTextCompositeCommand{\=}{T1}{\i}{\=\i}
+% \end{macrocode}
+%
+% \begin{macrocode}
%</T1>
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -30,7 +30,7 @@
%%% From File: ltoutput.dtx
%<flafter>\ProvidesPackage{flafter}
%<fltrace>\ProvidesPackage{fltrace}
-%<flafter,fltrace> [2021/07/31 v1.4e
+%<flafter,fltrace> [2024/11/16 v1.4k
%<flafter> Standard LaTeX floats after reference (FMi)]
%<fltrace> Tracing LaTeX floats algorithm (FMi)]
%
@@ -37,7 +37,7 @@
%<*driver>
% \fi
\ProvidesFile{ltoutput.dtx}
- [2024/03/16 v1.4j LaTeX Kernel (Output Routine)]
+ [2024/11/16 v1.4k LaTeX Kernel (Output Routine)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutput.dtx}
@@ -56,8 +56,8 @@
%
% \iffalse
% LATEX VERSION 2e
-% Copyright (C) 1992 by Leslie Lamport
-% Copyright (C) 1994-2000 by Leslie Lamport, LaTeX Project
+% Copyright (C) 1992 Leslie Lamport
+% Copyright (C) 1994-2000 Leslie Lamport, LaTeX Project
%
% LaTeX 2e kernel file for the output routine.
%
@@ -2065,8 +2065,8 @@
% internal commands as hooks.
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2017/04/15}%
-%<latexrelease> {\@outputpage}{Reset language for hyphenation}%
+%<latexrelease>\IncludeInRelease{2025/06/01}%
+%<latexrelease> {\@outputpage}{Use new mark mechanism}%
%<*2ekernel|latexrelease>
\def\@outputpage{%
% \end{macrocode}
@@ -2245,16 +2245,79 @@
% \begin{macrocode}
\global \@colht \textheight
\stepcounter{page}%
+}
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
-% It is now clear that this does something useful, thanks to Piet
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2017/04/15}%
+%<latexrelease> {\@outputpage}{Reset language for hyphenation}%
+%<latexrelease>\def\@outputpage{%
+%<latexrelease>\begingroup
+%<latexrelease> \let \protect \noexpand
+%<latexrelease> \language\document at default@language
+%<latexrelease> \@resetactivechars
+%<latexrelease> \global\let\@@if at newlist\if at newlist
+%<latexrelease> \global\@newlistfalse
+%<latexrelease> \@parboxrestore
+%<latexrelease> \shipout \vbox{%
+%<latexrelease> \set at typeset@protect
+%<latexrelease> \aftergroup \endgroup
+%<latexrelease> \aftergroup \set at typeset@protect
+%<latexrelease> \if at specialpage
+%<latexrelease> \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
+%<latexrelease> \fi
+%<latexrelease> \if at twoside
+%<latexrelease> \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+%<latexrelease> \let\@themargin\oddsidemargin
+%<latexrelease> \else \let\@thehead\@evenhead
+%<latexrelease> \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \reset at font
+%<latexrelease> \normalsize
+%<latexrelease> \normalsfcodes
+%<latexrelease> \let\label\@gobble
+%<latexrelease> \let\index\@gobble
+%<latexrelease> \let\glossary\@gobble
+%<latexrelease> \baselineskip\z at skip \lineskip\z at skip \lineskiplimit\z@
+%<latexrelease> \@begindvi
+%<latexrelease> \vskip \topmargin
+%<latexrelease> \moveright\@themargin \vbox {%
+%<latexrelease> \setbox\@tempboxa \vbox to\headheight{%
+%<latexrelease> \vfil
+%<latexrelease> \color at hbox
+%<latexrelease> \normalcolor
+%<latexrelease> \hb at xt@\textwidth{\@thehead}%
+%<latexrelease> \color at endbox
+%<latexrelease> }%
+%<latexrelease> \dp\@tempboxa \z@
+%<latexrelease> \box\@tempboxa
+%<latexrelease> \vskip \headsep
+%<latexrelease> \box\@outputbox
+%<latexrelease> \baselineskip \footskip
+%<latexrelease> \color at hbox
+%<latexrelease> \normalcolor
+%<latexrelease> \hb at xt@\textwidth{\@thefoot}%
+%<latexrelease> \color at endbox
+%<latexrelease> }%
+%<latexrelease> }%
+%<latexrelease> \global\let\if at newlist\@@if at newlist
+%<latexrelease> \global \@colht \textheight
+%<latexrelease> \stepcounter{page}%
+% \end{macrocode}
+% It is now clear that this does something useful, thanks to Pieter
% van Oostrum. It is needed because a float page is made without
% using TeX's page-builder; thus the output routine is never called
% so the marks are not updated.
% \begin{macrocode}
- \let\firstmark\botmark
-}
+%<latexrelease> \let\firstmark\botmark
+%<latexrelease>}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\@outputpage}{Reset language for hyphenation}%
%<latexrelease>\def\@outputpage{%
@@ -4757,15 +4820,11 @@
% \changes{1.2g}{2000/07/12}{Ensure that rule is in \cs{normalcolor}}
% \changes{v1.2m}{2014/12/30}{Command updated (latexrelease)}
% \begin{macrocode}
-%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
-%<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
+%<latexrelease|fltrace>\IncludeInRelease{2025/06/01}%
+%<latexrelease|fltrace> {\@outputdblcol}{Use new mark mechanism}%
%<*2ekernel|fltrace|latexrelease>
% \end{macrocode}
%
-%
-% This is just a change to the single command |\@outputdblcol|
-% so that it saves mark information for the first column and restores
-% it in the second column.
% \begin{macrocode}
\def\@outputdblcol{%
\if at firstcolumn
@@ -4777,49 +4836,7 @@
%<fltrace> \fl at trace{PAGE: first column boxed}%
% \end{macrocode}
%
-% Remember the marks from the first column
% \begin{macrocode}
- \splitmaxdepth\maxdimen
- \vbadness\maxdimen
-% \end{macrocode}
-% In case of |\enlargethispage| we will have infinite negative glue
-% at the bottom of the page (coming from |\vss|) and that will earn
-% us an error message if we |\vsplit| to get at the marks. So we
-% need to remove the last glue (if any) at the end of |\@outputbox|
-% as we are only interested in marks that change doesn't matter.
-% \changes{v1.1o}{2014/04/18}{Handle infinite glue from
-% \cs{enlargethispage} (pr/4023)}
-% \begin{macrocode}
- \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
- \setbox\@outputbox\vsplit\@outputbox to\maxdimen
-% \end{macrocode}
-%
-% One minor difference from the current |fixmarks| package, pass the
-% marks through a token register to stop any |#| tokens causing an
-% error in a |\def|.
-% \begin{macrocode}
- \toks@\expandafter{\topmark}%
- \xdef\@firstcoltopmark{\the\toks@}%
- \toks@\expandafter{\splitfirstmark}%
- \xdef\@firstcolfirstmark{\the\toks@}%
-% \end{macrocode}
-%
-% This test does not work if truly empty marks have been inserted, but
-% \LaTeX\ marks should always have (at least) two brace groups.
-% (Except before the first mark is used, when the marks are empty,
-% but that is OK here.)
-% \begin{macrocode}
- \ifx\@firstcolfirstmark\@empty
- \global\let\@setmarks\relax
- \else
- \gdef\@setmarks{%
- \let\firstmark\@firstcolfirstmark
- \let\topmark\@firstcoltopmark}%
- \fi
-% \end{macrocode}
-%
-% End of change
-% \begin{macrocode}
\else
\global\@firstcolumntrue
\setbox\@outputbox\vbox{%
@@ -4835,14 +4852,7 @@
\hfil
\hb at xt@\columnwidth{\box\@outputbox \hss}}}%
%<fltrace> \fl at trace{PAGE: second column also boxed}%
- \@combinedblfloats
-% \end{macrocode}
-% Override current first and top with those of first column if necessary
-% \begin{macrocode}
- \@setmarks
-% \end{macrocode}
-% End of change
-% \begin{macrocode}
+ \@combinedblfloats
\@outputpage
%<fltrace> \fl at trace{PAGE: two column page completed}%
\begingroup
@@ -4857,6 +4867,50 @@
%
% \begin{macrocode}
%<latexrelease|fltrace>\EndIncludeInRelease
+%<latexrelease|fltrace>\IncludeInRelease{2015/01/01}%
+%<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
+%<latexrelease|fltrace>\def\@outputdblcol{%
+%<latexrelease|fltrace> \if at firstcolumn
+%<latexrelease|fltrace> \global\@firstcolumnfalse
+%<latexrelease|fltrace> \global\setbox\@leftcolumn\copy\@outputbox
+%<latexrelease|fltrace> \splitmaxdepth\maxdimen
+%<latexrelease|fltrace> \vbadness\maxdimen
+%<latexrelease|fltrace> \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
+%<latexrelease|fltrace> \setbox\@outputbox\vsplit\@outputbox to\maxdimen
+%<latexrelease|fltrace> \toks@\expandafter{\topmark}%
+%<latexrelease|fltrace> \xdef\@firstcoltopmark{\the\toks@}%
+%<latexrelease|fltrace> \toks@\expandafter{\splitfirstmark}%
+%<latexrelease|fltrace> \xdef\@firstcolfirstmark{\the\toks@}%
+%<latexrelease|fltrace> \ifx\@firstcolfirstmark\@empty
+%<latexrelease|fltrace> \global\let\@setmarks\relax
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \gdef\@setmarks{%
+%<latexrelease|fltrace> \let\firstmark\@firstcolfirstmark
+%<latexrelease|fltrace> \let\topmark\@firstcoltopmark}%
+%<latexrelease|fltrace> \fi
+%<latexrelease|fltrace> \else
+%<latexrelease|fltrace> \global\@firstcolumntrue
+%<latexrelease|fltrace> \setbox\@outputbox\vbox{%
+%<latexrelease|fltrace> \hb at xt@\textwidth{%
+%<latexrelease|fltrace> \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
+%<latexrelease|fltrace> \hfil
+%<latexrelease|fltrace> {\normalcolor\vrule \@width\columnseprule}%
+%<latexrelease|fltrace> \hfil
+%<latexrelease|fltrace> \hb at xt@\columnwidth{\box\@outputbox \hss}}}%
+%<latexrelease|fltrace> \@combinedblfloats
+%<latexrelease|fltrace> \@setmarks
+%<latexrelease|fltrace> \@outputpage
+%<latexrelease|fltrace> \begingroup
+%<latexrelease|fltrace> \@dblfloatplacement
+%<latexrelease|fltrace> \@startdblcolumn
+%<latexrelease|fltrace> \@whilesw\if at fcolmade \fi{\@outputpage
+%<latexrelease|fltrace> \@startdblcolumn}%
+%<latexrelease|fltrace> \endgroup
+%<latexrelease|fltrace> \fi}
+%<latexrelease|fltrace>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease|fltrace>\IncludeInRelease{0000/00/00}%
%<latexrelease|fltrace> {\@outputdblcol}{2 column marks}%
%<latexrelease|fltrace>\def\@outputdblcol{%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltpage.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpage.dtx}
- [2022/04/03 v1.0n LaTeX Kernel (page style setup)]
+ [2024/11/16 v1.0o LaTeX Kernel (page style setup)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpage.dtx}
@@ -180,8 +180,8 @@
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2022/06/01}%
-%<latexrelease> {\markboth}{New mark support}%
+%<latexrelease>\IncludeInRelease{2025/06/01}%
+%<latexrelease> {\markboth}{Drop legacy mark support}%
% \end{macrocode}
%
%
@@ -204,61 +204,24 @@
% error (pr/3203).}
% \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \changes{v1.0n}{2022/04/04}{Interface with new mark mechanism}
+% \changes{v1.1a}{2025/06/01}{}
% \begin{macrocode}
\ExplSyntaxOn
\DeclareRobustCommand*\markboth[2]{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \unrestored at protected@xdef\@themark {{#1}{#2}}%
- \@temptokena \expandafter{\@themark}%
-% \end{macrocode}
-% In addition to generating the legacy mark we output the
-% individual ones as well at the very same point.
-% The legacy mark is kept unchanged in order to work with packages
-% that expect that mark in exactly the way it is right now.
-%
-% We might want to think about how to improve this in one-side
-% documents, see comments below.
-%
-% We have not changed all of the code to L3 prog layer convention,
-% in case packages attempt to do some patching and expect the 2e
-% names being around. Eventually this should and will change.
-% \begin{macrocode}
\mark_insert:nn{2e-left}{#1}
\mark_insert:nn{2e-right}{#2}
\tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
- \mark{\the\@temptokena}%
- \endgroup
- \if at nobreak\ifvmode\nobreak\fi\fi}
+}
% \end{macrocode}
%
% \changes{v1.0m}{2020/07/27}{Don't make the command \cs{long} (gh/354)}
% \changes{v1.0n}{2022/04/04}{Interface with new mark mechanism}
+% \changes{v1.1a}{2025/06/01}{}
% \begin{macrocode}
\DeclareRobustCommand*\markright[1]{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
-% \end{macrocode}
-% Protection is handled inside |\@markright|.
-% \begin{macrocode}
- \expandafter\@markright\@themark {#1}%
- \@temptokena \expandafter{\@themark}%
-% \end{macrocode}
-% Same game with \cs{markright} more or less \ldots
-% \begin{macrocode}
\mark_insert:nn{2e-right}{#1}
\tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
-% \end{macrocode}
-% The legacy \LaTeX{} mechanism always sets left and right mark,
-% i.e., if a sub-mark (i.e., right mark) is set the corresponding main
-% mark also is getting a mark with the same value it had previously.
-% However, for the individual mark classes this means we are losing
-% information so for them that is not done.
-% \begin{macrocode}
-% \mark_insert:nn{2e-left}{\exp_after:wN \use_i:nn \@themark }
- \mark{\the\@temptokena}%
- \endgroup
- \if at nobreak\ifvmode\nobreak\fi\fi}
+}
\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
@@ -267,6 +230,32 @@
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\markboth}{New mark support}%
+%<latexrelease>\ExplSyntaxOn
+%<latexrelease>\DeclareRobustCommand*\markboth[2]{%
+%<latexrelease> \begingroup
+%<latexrelease> \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease> \unrestored at protected@xdef\@themark {{#1}{#2}}%
+%<latexrelease> \@temptokena \expandafter{\@themark}%
+%<latexrelease> \mark_insert:nn{2e-left}{#1}
+%<latexrelease> \mark_insert:nn{2e-right}{#2}
+%<latexrelease> \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
+%<latexrelease> \mark{\the\@temptokena}%
+%<latexrelease> \endgroup
+%<latexrelease> \if at nobreak\ifvmode\nobreak\fi\fi}
+%<latexrelease>\DeclareRobustCommand*\markright[1]{%
+%<latexrelease> \begingroup
+%<latexrelease> \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease> \expandafter\@markright\@themark {#1}%
+%<latexrelease> \@temptokena \expandafter{\@themark}%
+%<latexrelease> \mark_insert:nn{2e-right}{#1}
+%<latexrelease> \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
+%<latexrelease> \mark{\the\@temptokena}%
+%<latexrelease> \endgroup
+%<latexrelease> \if at nobreak\ifvmode\nobreak\fi\fi}
+%<latexrelease>\ExplSyntaxOff
+%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2019/10/01}%
%<latexrelease> {\markboth}{Make commands robust}%
%<latexrelease>
@@ -291,8 +280,29 @@
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\markboth}{Make commands robust}%
%<latexrelease>
-%<latexrelease>\kernel at make@fragile\markboth
-%<latexrelease>\kernel at make@fragile\markright
+% \end{macrocode}
+% Using \cs{kernel at make@fragile} doesn't really work if there are
+% more redefinitions later on, so we have to repeat the above
+% definition first and then undo it (or use \cs{def} directly).
+% \begin{macrocode}
+%<latexrelease>%\kernel at make@fragile\markboth
+%<latexrelease>%\kernel at make@fragile\markright
+%<latexrelease>\def\markboth#1#2{%
+%<latexrelease> \begingroup
+%<latexrelease> \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease> \unrestored at protected@xdef\@themark {{#1}{#2}}%
+%<latexrelease> \@temptokena \expandafter{\@themark}%
+%<latexrelease> \mark{\the\@temptokena}%
+%<latexrelease> \endgroup
+%<latexrelease> \if at nobreak\ifvmode\nobreak\fi\fi}
+%<latexrelease>\def\markright#1{%
+%<latexrelease> \begingroup
+%<latexrelease> \let\label\relax \let\index\relax \let\glossary\relax
+%<latexrelease> \expandafter\@markright\@themark {#1}%
+%<latexrelease> \@temptokena \expandafter{\@themark}%
+%<latexrelease> \mark{\the\@temptokena}%
+%<latexrelease> \endgroup
+%<latexrelease> \if at nobreak\ifvmode\nobreak\fi\fi}
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
@@ -301,11 +311,6 @@
%
%
%
-% \begin{macro}{\@markright}
-% \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
-% error (pr/3203).}
-% \changes{v1.0k}{2000/06/02}{Small adjustment to give slightly less
-% expansion, CAR}
% \begin{macro}{\leftmark}
% \changes{v1.0j}{2000/05/26}{Use \cs{@empty} instead of brace group
% (pr/3203).}
@@ -317,35 +322,50 @@
% (pr/3203).}
% \task{???}{mark initialization solved?}
% \begin{macrocode}
-\def\@markright#1#2#3{\@temptokena {#1}%
- \unrestored at protected@xdef\@themark{{\the\@temptokena}{#3}}}
-\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
-\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2025/06/01}%
+%<latexrelease> {\leftmark}{Use new mark mechanism}%
% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+\cs_new:Npn \leftmark {\mark_use_last:nn{page}{2e-left}}
+\cs_new:Npn \rightmark {\mark_use_first:nn{page}{2e-right}}
+\ExplSyntaxOff
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\leftmark}{Use new mark mechanism}%
+%<latexrelease>
+%<latexrelease>\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
+%<latexrelease>\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty}
+% \end{macrocode}
+%
+% \begin{macro}{\@markright}
+% \changes{v1.0j}{2000/05/26}{Reimplementation to fix expansion
+% error (pr/3203).}
+% \changes{v1.0k}{2000/06/02}{Small adjustment to give slightly less
+% expansion, CAR}
+% \begin{macro}{\mark}
+% \changes{LaTeX2e}{1993/12/16}{Init \cs{mark} at begin document}
+% \changes{LaTeX2e}{1993/12/17}{Removed init \cs{mark} at begin
+% document, since it doesn't work.}
+% \begin{macrocode}
+%<latexrelease>\def\@themark{{}{}}
+%<latexrelease>\def\@markright#1#2#3{\@temptokena {#1}%
+%<latexrelease>\unrestored at protected@xdef\@themark{{\the\@temptokena}{#3}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
%
%
-% \begin{macro}{\@themark}
-% Initialise \LaTeX's marks without setting a \TeX\ mark \meta{whatsit}.
-% \begin{macrocode}
-\def\@themark{{}{}}
-% \end{macrocode}
-% \end{macro}
%
-% \begin{macro}{\mark}
-% Test versions of \LaTeXe\ initialised \TeX's |\mark| system
-% at this point, but this was removed before the first release.
-% \changes{LaTeX2e}{1993/12/16}{Init \cs{mark} at begin document}
-% \changes{LaTeX2e}{1993/12/17}{Removed init \cs{mark} at begin
-% document, since it doesn't work.}
-%\begin{verbatim}
-%\AtBeginDocument{\mark{{}{}}}
-%\end{verbatim}
-% \end{macro}
%
-%
% \begin{macro}{\raggedbottom}
% |\raggedbottom| typesets pages with no vertical stretch, so they have
% their natural height instead of all being exactly the
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltplain.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltplain.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltplain.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltplain.dtx}
- [2024/02/08 v2.3j LaTeX Kernel (Plain TeX)]
+ [2024/11/02 v2.3k LaTeX Kernel (Plain TeX)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltplain.dtx}
@@ -137,12 +137,13 @@
% |\catcode`\a=11 ... \catcode`\z=11 %| lowercase letters\\
% all others are type 12 (other)
%
+% \changes{v1.3k}{2024/11/02}{Add tab char to \cs{dospecials}}
% Here is a list of the characters that have been specially catcoded:
% \begin{macrocode}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
- \do\#\do\^\do\_\do\%\do\~}
+ \do\#\do\^\do\_\do\%\do\~\do\^^I}
% \end{macrocode}
-% (not counting ascii null, tab, linefeed, formfeed, return, delete)
+% (not counting ascii null, linefeed, formfeed, return, delete)
% Each symbol in the list is preceded by \do, which can be defined
% if you want to do something to every item in the list.
%
@@ -934,7 +935,7 @@
% file. e-\TeX{} improved on that and supported a value of \texttt{2}
% to show the warning on the terminal, so we could have changed the
% default when we made the e-\TeX{} extensions required---however,
-% we overlooked that oportunity.
+% we overlooked that opportunity.
% In 2021 this parameter was improved on again and now also accepts
% the value \texttt{3}
% (error on the terminal). This made us realize that we should
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltproperties.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -30,7 +30,7 @@
%<*driver>
% \fi
\ProvidesFile{ltproperties.dtx}
- [2024/10/21 v1.0h LaTeX Kernel (Properties)]
+ [2024/11/05 v1.0i LaTeX Kernel (Properties)]
% \iffalse
%
\documentclass[full]{l3doc}
@@ -741,7 +741,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} { p , T , F, TF }
% \end{macrocode}
% \end{macro}
%
@@ -770,7 +770,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} { p , T , F, TF }
% \end{macrocode}
% \end{macro}
%
@@ -801,7 +801,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} { p , T , F, TF }
% \end{macrocode}
% \end{macro}
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lttagging.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{lttagging.dtx}
- [2024/10/21 v1.0k LaTeX Kernel (tagging support)]
+ [2024/11/22 v1.0l LaTeX Kernel (tagging support)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttagging.dtx}
@@ -142,7 +142,7 @@
% \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
+% version of the command. 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.
%
@@ -183,19 +183,15 @@
% 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
% still missing.
+% \changes{v1.0l}{2024/11/21}{Define \cs{tag_if_active:TF} conditionals here (github/1558)}
% \begin{macrocode}
-\AddToHook{begindocument}[kernel]{
- \cs_if_exist:NF \tag_if_active:T
- {
- \prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
- { \prg_return_false: }
- }
-}
+\prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
+ { \prg_return_false: }
% \end{macrocode}
-%
% 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:
+% The default in the kernel is simply to get rid of the first argument, while
+% the second argument 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}
@@ -536,6 +532,20 @@
% \end{macrocode}
% \end{socketdecl}
%
+%
+% \subsection{Tagging support for output routines}
+%
+% \begin{socketdecl}{tagsupport/page at sofar}
+%
+% This socket is declared and used in the \pkg{multicol} output routines.
+% Only listed for reference.
+% \begin{macrocode}
+%\NewSocket{tagsupport/page at sofar}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+%
+%
% \section{For lttab.dtx parked here for now}
%
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lttemplates.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -36,7 +36,7 @@
%<*driver>
% \fi
\ProvidesFile{lttemplates.dtx}
- [2024-10-07 v1.0d LaTeX Kernel (Prototype document functions)]
+ [2024-11-17 v1.0d LaTeX Kernel (Prototype document functions)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttemplates.dtx}
@@ -289,7 +289,7 @@
% and \meta{number of arguments} required. The \meta{key bindings}
% argument is a key--value list which specifies the relationship
% between each \meta{key} of the template interface with an
-% underlying\meta{variable}.
+% underlying \meta{variable}.
%
% \begin{quotation}
% \obeylines
@@ -363,7 +363,7 @@
% ~~\Arg{type} \Arg{template2} \Arg{template1}
% \end{syntax}
% Copies \meta{template1} of \meta{type} to a new name \meta{template2}:
-% the copy can then be edited independent of teh original.
+% the copy can then be edited independent of the original.
% \end{function}
%
% \section{Multiple choices}
@@ -2117,6 +2117,10 @@
set:N
}
}
+% \end{macrocode}
+% Notice we need a \texttt{V}-type variant for each \texttt{(g)set}
+% operation here: these need to be provided by \pkg{expl3}.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_assign_variable:n #1
{
\@@_if_key_value:VTF \l_@@_value_tl
Modified: trunk/Master/texmf-dist/source/latex-dev/base/lttextcomp.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/lttextcomp.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/lttextcomp.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%
%
\ProvidesFile{lttextcomp.dtx}
- [2024/04/24 v1.1c LaTeX Kernel (text companion symbols)]
+ [2024/11/19 v1.1d LaTeX Kernel (text companion symbols)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -161,139 +161,9 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\DeclareEncodingSubset}
%
-% The declaration takes 3 mandatory arguments: an \emph{encoding}
-% for which a subsetting is wanted (currently always \texttt{TS1},
-% and most likely forever), the \emph{font family} for which we
-% declare the subset and finally the \emph{subset} number, with a value between
-% \texttt{0} (all of the encoding is supported) and \texttt{9} (many
-% glyphs are missing).
%
-% For \texttt{TS1} the numbers have been chosen in a way that most
-% fonts can be fairly correctly categorized, but the default
-% settings are always conservative, that is they may claim that
-% less glyphs are supported than there actually are.
%
-% As these days many font families are set up to end in \texttt{-LF}
-% (lining figures), \texttt{-OsF} (oldstyle figures), etc.\ the
-% declaration supports a shortcut: if the \emph{font family} name
-% ends in \texttt{-*} then the star gets replaced by these common
-% ending, e.g.,
-%\begin{verbatim}
-% \DeclareEncodingSubset{TS1}{Alegreya-*}{2}
-%\end{verbatim}
-% is the same as writing
-%\begin{verbatim}
-% \DeclareEncodingSubset{TS1}{Alegreya-LF}{2}
-% \DeclareEncodingSubset{TS1}{Alegreya-OsF}{2}
-% \DeclareEncodingSubset{TS1}{Alegreya-TLF}{2}
-% \DeclareEncodingSubset{TS1}{Alegreya-TOsF}{2}
-%\end{verbatim}
-% If only some are needed then one can define them individually but
-% in many cases all four are wanted, hence the shortcut.
-%
-%
-% The coding of the declaration has no error checking as it is
-% mostly for internal use.
-% \begin{macrocode}
-\def\DeclareEncodingSubset#1#2{%
- \DeclareEncodingSubset at aux{#1}#2*\DeclareEncodingSubset at aux
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\DeclareEncodingSubset at aux#1#2*#3\DeclareEncodingSubset at aux#4{%
-% \end{macrocode}
-% if \verb=#3= is empty then there was no star, otherwise we
-% define all four variants.
-% \begin{macrocode}
- \expandafter\ifx\expandafter X\detokenize{#3}X%
- \@DeclareEncodingSubset{#1}{#2}{#4}%
- \else
- \@DeclareEncodingSubset{#1}{#2LF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TLF}{#4}%
- \@DeclareEncodingSubset{#1}{#2OsF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TOsF}{#4}%
- \fi
-}
-% \end{macrocode}
-%
-% The subset info is stored in a command with the name
-% \texttt{\bslash}\emph{family}\texttt{:}\emph{subset} so if that
-% already exists we change otherwise declare a subset.
-% \begin{macrocode}
-\def\@DeclareEncodingSubset#1#2#3{%
- \@ifundefined{#1:#2}%
- {\@font at info{Setting #2 sub-encoding to #1/#3}}%
- {\@font at info{Changing #2 sub-encoding to #1/#3}}%
-% \end{macrocode}
-% This declaration should be usable in \texttt{.fd} files and
-% therefore has to make its definition globally, because such files
-% can get loaded in random places.
-% \changes{v1.0g}{2022/08/07}{Make global declaration (gh/905)}
-% \begin{macrocode}
- \global\@namedef{#1:#2}{#3}}
-% \end{macrocode}
-%
-% Any reason to allow those in the middle of documents?
-% \begin{macrocode}
-\@onlypreamble\DeclareEncodingSubset
-\@onlypreamble\DeclareEncodingSubset at aux
-\@onlypreamble\@DeclareEncodingSubset
-% \end{macrocode}
-% \end{macro}
-
-
-% \begin{macro}{\CheckEncodingSubset}
-% The command |\CheckEncodingSubset| will check if the current font
-% family has the right encoding subset to typeset a certain
-% command. It takes five arguments as follows:
-% first argument is either |\UseTextSymbol|, |\UseTextAccent|
-% depending on whether or not the symbol is a text symbol or a text
-% accent.
-
-% The second argument is the encoding from which this symbol should
-% be fetched.
-%
-% The third argument is either a fake accessor command or an error
-% message. the code in that argument (if ever executed) receives
-% two arguments: |#2| and |#5| of |\CheckEncodingSubset|.
-%
-% Argument four is the subset encoding id to test against: if this
-% value is higher than the subset id of the current font family
-% then we typeset the symbol, i.e., execute |#1{#2}#5| otherwise
-% it runs |#3#5|, e.g., to produce an error message or fake the
-% glyph somehow.
-%
-% Argument five is the symbol or accent command that is being
-% checked.
-%
-% For usage examples see definitions below.
-%
-% \begin{macrocode}
-\def\CheckEncodingSubset#1#2#3#4#5{%
- \ifnum #4>%
- \expandafter\ifx\csname #2:\f at family\endcsname\relax
- 0\csname #2:?\endcsname
- \else
- \csname #2:\f at family\endcsname
- \fi
- \relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {#1{#2}}{#3}%
- #5%
-}
-% \end{macrocode}
-% \end{macro}
-
-
-
-
-
% To set up the glyphs for the subsets we need a number helpers.
%
% \begin{macro}{\tc at errorwarn}
@@ -956,11 +826,20 @@
% \begin{macrocode}
\DeclareEncodingSubset{TS1}{ccr} {0}
\DeclareEncodingSubset{TS1}{cmbr} {0}
-\DeclareEncodingSubset{TS1}{cmr} {0}
-\DeclareEncodingSubset{TS1}{cmss} {0}
+% \end{macrocode}
+% The following 4 declarations are now part of the corresponding
+% \texttt{.fd} file, hopefully other will follow so that this list
+% of declarations can eventually be removed from the kernel (where
+% it doesn't belong).
+% \begin{macrocode}
+%\DeclareEncodingSubset{TS1}{cmr} {0}
+%\DeclareEncodingSubset{TS1}{cmss} {0}
+%\DeclareEncodingSubset{TS1}{cmtt} {0}
+%\DeclareEncodingSubset{TS1}{cmvtt} {0}
+% \end{macrocode}
+%
+% \begin{macrocode}
\DeclareEncodingSubset{TS1}{cmtl} {0}
-\DeclareEncodingSubset{TS1}{cmtt} {0}
-\DeclareEncodingSubset{TS1}{cmvtt} {0}
\DeclareEncodingSubset{TS1}{pxr} {0}
\DeclareEncodingSubset{TS1}{pxss} {0}
\DeclareEncodingSubset{TS1}{pxtt} {0}
@@ -1218,7 +1097,7 @@
% \end{macrocode}
% Strangely enough NotoSerif and NotoSans are sub-encoding 7 as
% they are missing \cs{textminus} and several other glyphs. In
-% contrast the NotoSansMono is far more complete.
+% contrast, the NotoSansMono is far more complete.
% \begin{macrocode}
\DeclareEncodingSubset{TS1}{NotoSans-*} {7}
\DeclareEncodingSubset{TS1}{NotoSerif-*} {7}
@@ -1700,8 +1579,13 @@
{\PackageInfo{textcomp}{Setting #2 sub-encoding to #1/#3}}%
{\PackageInfo{textcomp}{Changing #2 sub-encoding to #1/#3}}%
\@namedef{#1:#2}{#3}}
-\@onlypreamble\DeclareEncodingSubset
% \end{macrocode}
+% In the original code this was only allowed in the preamble but
+% now \texttt{.fd}s might contain it so that even in a rollback
+% situation it is necessary to allow it everywhere in the document.
+% \begin{macrocode}
+%\@onlypreamble\DeclareEncodingSubset
+% \end{macrocode}
% \end{macro}
%
%
Modified: trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/base/ltvers.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -115,7 +115,7 @@
{2025-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch at level{0}
+\def\patch at level{-1}
% \end{macrocode}
%
% \begin{macro}{\development at branch@name}
Modified: trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/firstaid/latex2e-first-aid-for-external-files.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/10/16}
-\def\LaTeXFirstAidVersion{v1.1g}
+\def\LaTeXFirstAidDate{2024/11/24}
+\def\LaTeXFirstAidVersion{v1.1j}
% \end{macrocode}
%
% \begin{macrocode}
@@ -121,7 +121,7 @@
LaTeX kernel fixes to external files and packages]
% \end{macrocode}
%
-%
+%
% \begin{macro}{\FirstAidNeededT}
% This is a very simple help to ensure that we only apply first aid
% to an unmodified package or class. It only works in the case the
@@ -132,7 +132,7 @@
% assume that the package/class in question got updated by its
% maintainer.
% \begin{macrocode}
-\ExplSyntaxOn
+\ExplSyntaxOn
\cs_new:Npn\FirstAidNeededT#1#2#3{
\exp_args:Ncx\str_if_eq:onF{ver@#1.#2}{#3}
{ \typeout{==>~ First~ Aid~ for~ #1.#2~ no~ longer~ applied!^^J
@@ -147,7 +147,7 @@
\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
@@ -154,7 +154,7 @@
%
%
% \subsection{The \pkg{filehook} package first aid}
-%
+%
% The \pkg{filehook} package implements hooks into file loading
% commands. These days this is already provided by the kernel
% albeit not with the same user interface. Until that package gets
@@ -201,7 +201,7 @@
\newcommand\AtEndOfEveryFile [1]
{\AddToHook{file/after}{#1}}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\newcommand\AtBeginOfIncludes [1]
{\AddToHook{include/before}{#1}}
@@ -210,7 +210,7 @@
\newcommand\AfterIncludes [1]
{\AddToHook{include/after}{#1}}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\newcommand\AtBeginOfPackages [1]
{\AddToHook{package/before}{#1}}
@@ -217,7 +217,7 @@
\newcommand\AtEndOfPackages [1]
{\AddToHook{package/after}{#1}}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\newcommand\AtBeginOfClasses [1]
{\AddToHook{class/before}{#1}}
@@ -232,7 +232,7 @@
{\AddToHook{file/#1/after}{#2}}
% \end{macrocode}
%
-% Some commands offered a starred form
+% Some commands offered a starred form
% \begin{macrocode}
\DeclareDocumentCommand \AtBeginOfPackageFile {smm}
{\IfBooleanTF{#1}%
@@ -242,7 +242,7 @@
{\AddToHook{package/#2/before}{#3}}%
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\DeclareDocumentCommand \AtEndOfPackageFile {smm}
{\IfBooleanTF{#1}%
@@ -254,7 +254,7 @@
% \end{macrocode}
%
% Are the * forms here of any use? I know they are use 3--4 times
-% on CTAN but I wonder if those are real or mistaken usages.
+% on CTAN but I wonder if those are real or mistaken usages.
% \begin{macrocode}
\DeclareDocumentCommand \AtBeginOfClassFile {smm}
{\IfBooleanTF{#1}%
@@ -271,7 +271,7 @@
{\AddToHook{class/#2/after}{#3}}%
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\newcommand\AtBeginOfIncludeFile [2]
{\AddToHook{include/#1/before}{#2}}
@@ -334,7 +334,7 @@
% \end{macrocode}
% Undo overwriting \cs{shipout}:
% \begin{macrocode}
- \cs_gset_eq:NN \shipout \pgfpages at originalshipout
+ \cs_gset_eq:NN \shipout \pgfpages at originalshipout
% \end{macrocode}
% Instead overwrite the L3 programming layer name of the
% primitive. This is really an absolute no-go, but for now the
@@ -394,23 +394,23 @@
% \subsection{The \pkg{crop} package first aid}
%
% The crop packages fails currently due to two \LaTeX{} changes:
-% It doesn't know that \cs{stockheight} and \cs{stockwidth}
+% It doesn't know that \cs{stockheight} and \cs{stockwidth}
% are now defined, and doesn't take into account that \cs{rlap}
% is robust (https://github.com/rrthomas/crop/issues/2).
% The first is addressed by setting the dimension if they are zero or
% negative. For the second we locally change the meaning of \cs{protect}
-%
+%
% \begin{macrocode}
\AddToHook{file/crop.sty/after}[firstaid]{%
\FirstAidNeededT{crop}{sty}{2017/11/19 1.10 crop marks (mf)}%
{%
- \ifdim\stockwidth > 0pt \else \stockwidth\paperwidth \fi
- \ifdim\stockheight > 0pt \else \stockheight\paperheight \fi
+ \ifdim\stockwidth > 0pt \else \stockwidth\paperwidth \fi
+ \ifdim\stockheight > 0pt \else \stockheight\paperheight \fi
\renewcommand*\CROP at genreflect[1]{%
\leavevmode
\dimen0\CROP at horigin
\kern2\dimen0
- \begingroup
+ \begingroup
\set at typeset@protect %change protect
\reflectbox{%
\hb at xt@\paperwidth{%
@@ -500,7 +500,7 @@
%
% So this needs to be removed as well by adding an additional
% \cs{unskip}.
-%
+%
% \begin{macrocode}
\AddToHook{file/varwidth.sty/after}[firstaid]{%
\FirstAidNeededT{varwidth}{sty}%
@@ -513,7 +513,7 @@
\count@\lastpenalty\unpenalty
\setbox\z@\lastbox
\ifvoid\z@ \advance\sift at deathcycles\@ne \else \sift at deathcycles\z@ \fi
- \ifnum\sift at deathcycles>33
+ \ifnum\sift at deathcycles>33
\let\@vwid at sift\relax
\PackageWarning{varwidth}{Failed to reprocess entire contents}%
\fi
@@ -564,23 +564,23 @@
%</kernel>
% \end{macrocode}
% \subsection{The \pkg{underscore} first aid}
-%
+%
% The \pkg{underscore} package makes the underscore active. This means that the
% underscore can not be used in label and references unless the package option \texttt{strings} is used
-% (which patches a selection of problematic commands like \cs{label} and \cs{ref})
-% or \pkg{babel} is used which redefines\footnote{unless the recommended option \texttt{safe=none} is used}
+% (which patches a selection of problematic commands like \cs{label} and \cs{ref})
+% or \pkg{babel} is used which redefines\footnote{unless the recommended option \texttt{safe=none} is used}
% a selection of problematic commands like \cs{@testdef} or \cs{@newl at bel}.
-%
-% With the new property commands the work-around do not work. We therefore make the
+%
+% With the new property commands the work-around do not work. We therefore make the
% underscore protected and use \cs{ifincsname} to allow its use in csnames.
-%
+%
% \begin{macrocode}
%<*underscore-ltx>
\ProvidesPackage{underscore-ltx}[2023/09/20 LaTeX firstaid to make underscore protected ]
\begingroup
\catcode`\_=\active
- \protected\gdef _{%
- \ifincsname %
+ \protected\gdef _{%
+ \ifincsname %
\string_%
\else
\ifx\protect\@typeset at protect
@@ -659,7 +659,7 @@
%
% The \pkg{cleveref} package expects only two data containers
% for its internal \cs{newlabel} command. This fails if
-% \pkg{xr-hyper} is used which expands every \cs{newlabel} to
+% \pkg{xr-hyper} is used which expands every \cs{newlabel} to
% five data container and puts the file name into the last one.
% \begin{macrocode}
\AddToHook{package/cleveref/after}[firstaid]{%
@@ -680,12 +680,12 @@
\expandafter\expandafter\expandafter\def%
\expandafter\expandafter\expandafter#2%
\expandafter\expandafter\expandafter{%
- \expandafter\@secondoffive#2}}% <----------- five
+ \expandafter\@secondoffive#2}}% <----------- five
% \end{macrocode}
% We also need to redefine the internal label commands of cleveref.
-% This must be done after \pkg{cleveref} has made its changes
-% in \texttt{begindocument} so we add it to the same hook using
-% the hook label used by \pkg{cleveref}.
+% This must be done after \pkg{cleveref} has made its changes
+% in \texttt{begindocument} so we add it to the same hook using
+% the hook label used by \pkg{cleveref}.
% This way it is guaranteed to overwrite the definitions.
% \begin{macrocode}
\AddToHook{begindocument}[cleveref]{%
@@ -716,11 +716,12 @@
{\string\newlabel{#2 at cref}{{\cref at currentlabel}%
{[\@tempb][\arabic{page}][\cref at result]\thepage}{}{}{}}}% <------- five
\@esphack}%
- }
+ }
% \end{macrocode}
% \changes{v1.1g}{2024/10/16}{update cleveref data in label hook}
+% \changes{v1.1i}{2024/11/08}{add expandafter, issue \#1544}
% 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
+% 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
@@ -733,18 +734,23 @@
{\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}%
+ \csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
\aftergroup\firstaid at cref@smugglelabel
}
% \end{macrocode}
-% we test if \cs{@currentcounter} is empty for unnumbered sections
+% we test if \cs{@currentcounter} is empty for unnumbered sections
+% \changes{v1.1h}{2024/11/01}{fix spurious space}
+% \changes{v1.1j}{2024/11/24}{add \cs{iftag@} test, issue \#1560}
% \begin{macrocode}
+ \newif\iftag@
\AddToHook{label}[firstaid/cleveref]
{\ifx
\@currentcounter\@empty
\else
- \firstaid at cref@updatelabeldata{\@currentcounter}
- \fi}
+ \iftag@\else
+ \firstaid at cref@updatelabeldata{\@currentcounter}%
+ \fi
+ \fi}
}%
}
% \end{macrocode}
Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -9,8 +9,8 @@
%
% https://www.latex-project.org/lppl.txt
%
-\def\ltlabblockdate{2024-10-11}
-\def\ltlabblockversion{0.8v}
+\def\ltlabblockdate{2024-11-25}
+\def\ltlabblockversion{0.8w}
%<*driver>
\documentclass[kernel]{l3doc}
\usepackage{amstext}
@@ -17,6 +17,9 @@
\EnableCrossrefs
\CodelineIndex
+\setcounter{secnumdepth}{4}
+\setcounter{tocdepth}{4}
+
\usepackage{todonotes}
\begin{document}
@@ -61,8 +64,9 @@
% printtype=\textit{inst.}] {Instance}{instance}
%
%
-% \newcommand\valuefrom[1]{\textrm{value from }\texttt{#1}}
% \newcommand\key[1]{\texttt{#1}}
+% \newcommand\keyvalue[1]{\texttt{#1}}
+% \newcommand\valuefrom[1]{\textrm{value from }\key{#1}}
%
%
% \NewDocumentCommand\fmi{sO{}m}
@@ -98,7 +102,7 @@
% \def\TemplateKey##1##2##3##4{^^A
% \item[\texttt{##1}~(\textit{\mdseries##2})]##3^^A
% \ifx\TemplateKey##4\TemplateKey\else
-% \hfill\penalty500\hbox{}\hfill Default:~\texttt{##4}^^A
+% \hfill\penalty500\hbox{}\hfill Default:~\keyvalue{##4}^^A
% \nobreak\hskip-\parfillskip\hskip0pt\relax
% \fi
% \par
@@ -239,14 +243,14 @@
% {An explicit tag class attribute}{}
% \TemplateKey{tagging-recipe}{tokenlist}
% {Defines the way tagging is done. Currently the values
-% \texttt{basic}, \texttt{standard}, and \texttt{list}
+% \keyvalue{basic}, \keyvalue{standard}, and \keyvalue{list}
% are supported}{standard}
% \TemplateKey{level-increase}{boolean}{Does this \xt{blockenv}
% increase the block level if it is nested in an outer block?}{true}
% \TemplateKey{setup-code}{tokenlist}
% {Initial setup code. This is
-% executed after legacy defaults (from \cs{@listi},
-% \cs{@listii}, etc.) are used but before the block instance is called}{}
+% executed after legacy defaults (from \tn{@listi},
+% \tn{@listii}, etc.) are used but before the block instance is called}{}
% \TemplateKey{block-instance}{tokenlist}{Part of the name of the
% \xt{block} instance that is called. The full name has
% a \texttt{-}\meta{level} appended}{displayblock}
@@ -263,14 +267,14 @@
% \TemplateKey{inner-instance}{tokenlist}{Name of the inner instance
% (if any).}{}
% \TemplateKey{para-flattened}{boolean}{\emph{describe}}{false}
-% \TemplateKey{final-code}{tokenlist}{Final setup code}{\cs{ignorespaces}}
+% \TemplateKey{final-code}{tokenlist}{Final setup code}{\tn{ignorespaces}}
%
% \TemplateSemantics
%
% This \xt{blockenv} template supports the legacy list setting that
-% are found in many document classes in the macros \cs{@listi},
-% \cs{@listii}, up to \cs{@listvi}. It also uses the counter
-% \cs{@listdepth} to track nesting of block, again mainly to
+% are found in many document classes in the macros \tn{@listi},
+% \tn{@listii}, up to \tn{@listvi}. It also uses the counter
+% \tn{@listdepth} to track nesting of block, again mainly to
% support legacy setups (internally it gives it a more appropriate
% name but it remains accessible through the \LaTeXe{} name).
%
@@ -277,8 +281,8 @@
%
% It first checks that nothing is too deeply nested.
% If the level should increase then the increments the
-% \cs{@listdepth} counter and
-% calls the corresponding \cs{@list...} macro to update the legacy
+% \tn{@listdepth} counter and
+% calls the corresponding \tn{@list...} macro to update the legacy
% defaults. If \key{level-increase} is set to false this is bypassed.
%
% It then sets up the
@@ -302,7 +306,7 @@
% called.
%
% Finally, the \key{final-code} is executed (by default
-% \cs{ignorespaces}).
+% \tn{ignorespaces}).
%
%
% \end{TemplateDescription}
@@ -309,7 +313,7 @@
%
% The maximum number of \xt{blockenv}s that can be nested into each
% other is restricted by the \LaTeX{} counter
-% \texttt{maxblocklevels} with a default value of \texttt{6}. If this
+% \texttt{maxblocklevels} with a default value of \keyvalue{6}. If this
% value is increased then it is necessary to provide additional
% instances, e.g., \texttt{displayblock-7}, etc. Decreasing is, of
% course, always possible, then some of the instances defined are not
@@ -316,7 +320,7 @@
% used and instead the user gets an error that there is too much
% nesting going on.
%
-% If the key \key{level-increase} is set to \texttt{false} then such
+% If the key \key{level-increase} is set to \keyvalue{false} then such
% an environment doesn't alter the nesting level and therefore you can
% nest those environments as often as you like (a typical example
% would be \env{flushleft} anywhere in the nesting hierarchy, that
@@ -326,18 +330,18 @@
% \begin{TemplateDescription}{block}{display}
%
% \TemplateKey{heading}{tokenlist}{\emph{not really used yet}}{}
-% \TemplateKey{beginsep}{skip}{}{\cs{topsep}}
-% \TemplateKey{begin-par-skip}{skip}{}{\cs{partopsep}}
-% \TemplateKey{par-skip}{skip}{}{\cs{parsep}}
+% \TemplateKey{beginsep}{skip}{}{\tn{topsep}}
+% \TemplateKey{begin-par-skip}{skip}{}{\tn{partopsep}}
+% \TemplateKey{par-skip}{skip}{}{\tn{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}}
-% \TemplateKey{rightmargin}{length}{}{\cs{rightmargin}}
-% \TemplateKey{parindent}{length}{}{\cs{listparindent}}
+% block is a list; if not the setting has no effect}{\tn{itemsep}}
+% \TemplateKey{beginpenalty}{integer}{}{\tn{@beginparpenalty}}
+% \TemplateKey{endpenalty}{integer}{}{\tn{@endparpenalty}}
+% \TemplateKey{leftmargin}{length}{}{\tn{leftmargin}}
+% \TemplateKey{rightmargin}{length}{}{\tn{rightmargin}}
+% \TemplateKey{parindent}{length}{}{0pt}
%
% \TemplateSemantics
%
@@ -358,14 +362,14 @@
%
% \begin{TemplateDescription}{para}{std}
%
-% \TemplateKey{indent-width}{length}{}{\cs{parindent}}
+% \TemplateKey{indent-width}{length}{}{\tn{parindent}}
% \TemplateKey{start-skip}{skip}{}{0pt}
% \TemplateKey{left-skip}{skip}{}{0pt}
% \TemplateKey{right-skip}{skip}{}{0pt}
-% \TemplateKey{end-skip}{skip}{}{\cs{@flushglue}}
+% \TemplateKey{end-skip}{skip}{}{\tn{@flushglue}}
% \TemplateKey{fixed-word-spaces}{boolean}{}{false}
% \TemplateKey{final-hyphen-demerits}{integer}{}{5000}
-% \TemplateKey{cr-cmd}{tokenlist}{}{\cs{@normalcr}}
+% \TemplateKey{cr-cmd}{tokenlist}{}{\tn{@normalcr}}
% \TemplateKey{para-class}{tokenlist}{}{justify}
%
% \TemplateSemantics
@@ -396,13 +400,13 @@
% \TemplateKey{item-indent}{length}{Horizontal displacement of the item.}{0pt}
% \TemplateKey{item-penalty}{integer}
% {Penalty for breaking before an
-% item (except the first)}{\cs{@itempenalty}}
+% item (except the first)}{\tn{@itempenalty}}
% \TemplateKey{label-width}{length}
-% {Width reserved for the formatted item label}{\cs{labelwidth}}
+% {Width reserved for the formatted item label}{\tn{labelwidth}}
% \TemplateKey{label-sep}{length}
-% {Horizontal separation between label and following text}{\cs{labelsep}}
+% {Horizontal separation between label and following text}{\tn{labelsep}}
% \TemplateKey{legacy-support}{boolean}
-% {Is formatting the label via \cs{makelabel} supported?}{false}
+% {Is formatting the label via \tn{makelabel} supported?}{false}
%
% \TemplateSemantics
%
@@ -412,16 +416,16 @@
%
% \begin{TemplateDescription}{item}{std}
%
-% \TemplateKey{counter-label}{function{1}}{\emph{unused}}{\cs{arabic}\{\#1\}}
+% \TemplateKey{counter-label}{function{1}}{\emph{unused}}{\tn{arabic}\{\#1\}}
% \TemplateKey{counter-ref}{function{1}}{\emph{unused}}{\valuefrom{counter-label}}
% \TemplateKey{label-ref}{function{1}}{\emph{unused}}{\#1}
% \TemplateKey{label-autoref}{function{1}}{\emph{unused}}{item~\#1}
% \TemplateKey{label-format}{function{1}}
% {Formatting of the label, questionable the way it is used}{\#1}
-% \TemplateKey{label-strut}{boolean}{Add a \cs{strut} to the label?}{false}
+% \TemplateKey{label-strut}{boolean}{Add a \tn{strut} to the label?}{false}
% \TemplateKey{label-align}{choice}
-% {Supported values \texttt{left},\texttt{center},
-% \texttt{right}, and \texttt{parleft}. \emph{Only partly implemented}}{right}
+% {Supported values \keyvalue{left},\keyvalue{center},
+% \keyvalue{right}, and \keyvalue{parleft}. \emph{Only partly implemented}}{right}
% \TemplateKey{label-boxed}{boolean}
% {Should the label be boxed?}{true}
% \TemplateKey{next-line}{boolean}{}{false}
@@ -551,7 +555,8 @@
% \key{tagging-recipe} of the \xt{blockenv} template. Currently the
% following values are implemented:
% \begin{description}
-% \item[\texttt{standalone}]
+% \raggedright
+% \item[\keyvalue{standalone}]
% This recipe does the following:
% \begin{itemize}
% \item
@@ -562,7 +567,7 @@
% \item
% Text inside the body of the environment start with
% \struct{text-unit}\struct{text} unless the key
-% \key{para-flattened} is set to \texttt{true}
+% \key{para-flattened} is set to \keyvalue{true}
% (which is most likely the wrong thing to do because we then get just
% \struct{text} as the structure).
%
@@ -575,7 +580,7 @@
% \struct{text-unit} is started, if appropriate, e.g., if text is following.
% \end{itemize}
%
-% \item[\texttt{basic}]
+% \item[\keyvalue{basic}]
% This recipe does the following:
% \begin{itemize}
% \item
@@ -587,7 +592,7 @@
%
% \item
% Text inside the body of the environment start with
-% \struct{text-unit}\struct{text} if \key{para-flattened} is set to \texttt{false},
+% \struct{text-unit}\struct{text} if \key{para-flattened} is set to \keyvalue{false},
% otherwise just with \struct{text}.
%
% \item
@@ -596,14 +601,14 @@
%
% \item
% Then look if the environment is followed by an empty line
-% (\cs{par}). If so, close the outer \struct{/text-unit} and start any
+% (\tn{par}). If so, close the outer \struct{/text-unit} and start any
% following text with \struct{text-unit}\struct{text}. Otherwise,
% don't and following text restarts with a just a \struct{text} (and no
% paragraph indentation)
% \end{itemize}
%
-% \item[\texttt{standard}]
-% This recipe is like the \texttt{basic} one as far as handling
+% \item[\keyvalue{standard}]
+% This recipe is like the \keyvalue{basic} one as far as handling
% \struct{text-unit} and \struct{text} is concerned. In addition
% \begin{itemize}
% \item
@@ -622,8 +627,8 @@
%
%
%
-% \item[\texttt{list}]
-% This recipe is like the \texttt{standard} one except that
+% \item[\keyvalue{list}]
+% This recipe is like the \keyvalue{standard} one except that
% \begin{itemize}
% \item
% the inner structure is a list (\struct{L}).
@@ -667,7 +672,7 @@
% \end{function}
%
% \begin{function}{\@setupverbinvisiblespace}
-% A counterpart definition to the kernel command \cs{@setupverbinvisiblespace},
+% A counterpart definition to the kernel command \tn{@setupverbinvisiblespace},
% needed as we need to handle real space chars in verbatim.
% \end{function}
%
@@ -680,7 +685,7 @@
% \end{function}
%
% \begin{function}{\item,\@itemlabel}
-% The \cs{item} is redefined.
+% The \tn{item} is redefined.
% \end{function}
%
% \begin{function}{\c at maxblocklevels}
@@ -689,7 +694,7 @@
% \end{function}
%
% \begin{function}{\begin}
-% The \cs{begin} is slightly redefine to handle \cs{@doendpe} better.
+% The \tn{begin} is slightly redefine to handle \tn{@doendpe} better.
% TODO: move to kernel
% \end{function}
%
@@ -732,15 +737,10 @@
\ExplSyntaxOn
% \end{macrocode}
%
-% \ufi{this variable(s) must be declared:}
-% \begin{macrocode}
-\tl_new:N \l_@@_item_align_tl
-\tl_new:N\l_@@_legacy_env_params_tl
-% \end{macrocode}
%
-% \subsection{Handling \cs{par} after the end of the list}
+% \subsection{Handling \tn{par} after the end of the list}
%
-% An empty line (or a \cs{par}) after a list has semantic meaning as
+% An empty line (or a \tn{par}) after a list has semantic meaning as
% it defines whether then following text is logically within the same
% paragraph as the list (no empty line) or whether it starts a new
% paragraph and the paragraph containing the list ends at the end of
@@ -747,7 +747,7 @@
% the list (empty line after the list).
% This is handled by \LaTeX{} using a legacy flag called
% \texttt{@endpe} and set of commands inside the
-% generic \cs{end} (calling \cs{@doendpe}) and as part of the list
+% generic \tn{end} (calling \tn{@doendpe}) and as part of the list
% environments identifying themselves as \enquote{paragraph ending
% environments} (by setting this flag).
%
@@ -775,8 +775,8 @@
\__kernel_displayblock_doendpe:
% \end{macrocode}
%
-% The standard \cs{par} command (\cs{par_end:}) acts on
-% \texttt{@endpe} and attempts to close a still open \texttt{text-unit}
+% The standard \tn{par} command (\cs{par_end:}) acts on
+% \texttt{@endpe} and attempts to close a still open \struct{text-unit}s
% and this would be wrong if it was already closed above. So we
% have to reset the switch to false first.
% \begin{macrocode}
@@ -849,11 +849,11 @@
% \begin{macrocode}
\DeclareTemplateInterface{block}{display}{1}
{
- heading : tokenlist = , %??
+ heading : tokenlist = , % ??
beginsep : skip = \topsep ,
begin-par-skip : skip = \partopsep ,
par-skip : skip = \parsep ,
- end-skip : skip = \KeyValue{beginsep} , % conflict with name below
+ 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} ,
@@ -860,8 +860,9 @@
endpenalty : integer = \UseName{@endparpenalty} ,
leftmargin : length = \leftmargin ,
rightmargin : length = \rightmargin ,
- parindent : length = \listparindent ,
-% font : tokenlist % maybe add? (or more general for fonts and color)
+ parindent : length = 0pt ,
+% maybe add? (or more general for fonts and color)
+% font : tokenlist
}
% \end{macrocode}
% \end{template}
@@ -872,6 +873,7 @@
% \begin{macrocode}
\DeclareTemplateInterface{para}{std}{1}
{
+ para-class : tokenlist = justify ,
indent-width : length = \parindent ,
start-skip : skip = 0pt ,
left-skip : skip = 0pt ,
@@ -880,7 +882,6 @@
fixed-word-spaces : boolean = false ,
final-hyphen-demerits : integer = 5000 ,
cr-cmd : tokenlist = \@normalcr ,
- para-class : tokenlist = justify ,
}
% \end{macrocode}
% \end{template}
@@ -1019,508 +1020,8 @@
%
%
%
-% \subsection{Implementation of the document-level block environments}
%
-% Most such environments are pretty simple: they take an option
-% argument and call a \texttt{blockenv} instance to do the work. At
-% the end of environment we call \cs{endblockenv} to finish.
%
-%
-% \subsubsection{Displayblock environments}
-%
-%
-% There are two basic block environment which are similar to
-% \LaTeXe{}'s \env{trivlist} except that there aren't degenerated
-% lists and thus have no hidden \cs{item} inside.
-%
-%
-% \begin{environment}{displayblock}
-%
-% \begin{macrocode}
-\NewDocumentEnvironment{displayblock}{ !O{} }
- { \UseInstance{blockenv}{displayblock} {#1} }
- { \endblockenv }
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
-%
-% \begin{environment}{displayblockflattened}
-%
-% \begin{macrocode}
-\NewDocumentEnvironment{displayblockflattened}{ !O{} }
- { \UseInstance{blockenv}{displayblockflattened} {#1} }
- { \endblockenv }
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
-%
-%
-%
-%
-%
-% \begin{environment}{center,flushleft,flushright}
-%
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{center} { !O{} }
- { \UseInstance{blockenv}{center}{#1} }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{flushright} { !O{} }
- { \UseInstance{blockenv}{flushright}{#1} }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{flushleft} { !O{} }
- { \UseInstance{blockenv}{flushleft}{#1} }
- { \endblockenv }
-}
-% \end{macrocode}
-%
-%
-% \end{environment}
-%
-%
-%
-%
-% \subsubsection{Display quote environments}
-%
-%
-% \begin{environment}{quote,quotation}
-%
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{quote}{ !O{} }
- { \UseInstance{blockenv}{quote} {#1} }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{quotation}{ !O{} }
- { \UseInstance{blockenv}{quotation} {#1} }
- { \endblockenv }
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
-%
-%
-%
-% \subsubsection{Verbatim environments}
-%
-%
-% \begin{environment}{verbatim,verbatim*}
-%
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{verbatim}{ !O{} }
- { \UseInstance{blockenv}{verbatim} {#1}
-% \end{macrocode}
-% This is the part of the code where \env{verbatim}
-% and\env{verbatim*} differ.
-% \begin{macrocode}
- \@setupverbinvisiblespace\frenchspacing\@vobeyspaces
- \@xverbatim
- }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{verbatim*}{ !O{} }
- { \UseInstance{blockenv}{verbatim} {#1}
- \@setupverbvisiblespace\frenchspacing\@vobeyspaces
- \@sxverbatim
- }
- { \endblockenv }
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-%
-% \paragraph{Helper commands for verbatim}
-%
-%
-% \begin{macro}{\legacyverbatimsetup}
-%
-% This code resembles the \LaTeXe{} verbatim implementation with a
-% slight twist: in \LaTeXe{} each code line was a paragraph using
-% \cs{leftskip}=\cs{@totalleftmargin}. This was possible because
-% the whole environment was implemented as a trivlist. As this is
-% no longer the case setting \cs{leftskip} would alter the layout
-% of a surrounding list. So instead we need to make sure that the
-% paragraph end is executed in a group so that any parshape setup
-% is preserved.
-% \begin{macrocode}
-%<@@=>
-\def\legacyverbatimsetup{%
- \language\l at nohyphenation
- \@tempswafalse
- \def\par{%
- \if at tempswa
- \leavevmode \null {\@@par}\penalty\interlinepenalty
- \else
- \@tempswatrue
- \ifhmode{\@@par}\penalty\interlinepenalty\fi
- \fi}%
- \let\do\@makeother \dospecials
- \obeylines \verbatim at font \@noligs
- \everypar \expandafter{\the\everypar \unpenalty}%
-% \end{macrocode}
-%
-% \begin{macrocode}
- \tl_set:Nn \l__tag_para_main_tag_tl {codeline}
- \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code}
-}
-%<@@=block>
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@setupverbinvisiblespace}
-% In the \pdfTeX{} engine we need to use \cs{pdffakespace} chars
-% for the invisible spaces.
-% \begin{macrocode}
-\newcommand\@setupverbinvisiblespace{}
-\tag_if_active:T {
- \bool_if:NF\g__tag_mode_lua_bool
- {
- \renewcommand\@setupverbinvisiblespace{\def\@xobeysp{\nobreakspace\pdffakespace}}
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{Standard list environments}
-%
-%
-% \begin{environment}{itemize,enumerate,description}
-%
-% For the standard lists everything is managed by the blockenv instance.
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{itemize}{!O{}}
- { \UseInstance{blockenv}{itemize} {#1} }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{enumerate}{!O{}}
- { \UseInstance{blockenv}{enumerate} {#1} }
- { \endblockenv }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \RenewDocumentEnvironment{description}{!O{}}
- { \UseInstance{blockenv}{description} {#1} }
- { \endblockenv }
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \subsubsection{verse environment}
-%
-% \begin{environment}{verse}
-% The verse environment has not special tagging currently. It is
-% defined as a simple standard list and takes the tagging from there.
-% But it must be redefined so that \cs{itemindent} is correctly set.
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{verse}{ !O{} }
- {
- \let\\\@centercr
- \UseInstance{blockenv}{list}
- {
- item-indent=-1.5em,
- parindent=-1.5em,
- item-skip=0pt,
- rightmargin=\leftmargin,
- leftmargin=\leftmargin+1.5em,
- #1
- }
- \item\relax
- }
- { \endblockenv }
- }
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \begin{environment}{list}
-%
-% The legacy 2e list environment is more complicated as we have to get the
-% extra arguments accounted for.
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{list}{O{} m m }
- {
-% \end{macrocode}
-% 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 \l_@@_legacy_env_params_tl
- {
- \tl_set:Nn \@itemlabel {#2}
- #3
- }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \UseInstance{blockenv}{list} {#1}
- }
- { \endblockenv }
-}
-% \end{macrocode}
-%
-% \end{environment}
-%
-%
-%
-%
-% \begin{macro}{\legacylistsetupcode}
-%
-% And here is the extra code for use in the list instance setup
-% inside the key \texttt{setup-code}.
-% \begin{macrocode}
-\cs_new:Npn \legacylistsetupcode {
-% \end{macrocode}
-% Reset values to defaults:
-% \begin{macrocode}
- \dim_zero:N \listparindent
- \dim_zero:N \rightmargin
- \dim_zero:N \itemindent
-% \end{macrocode}
-%
-% 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
-% \end{macrocode}
-% By default there is a simple definition for \cs{makelabel}. It can be
-% overwritten in the second mandatory argument to the list
-% environment (stored in \cs{l_@@_legacy_env_params_tl}) and
-% is used if the instance sets the compatibility key to true.
-% \begin{macrocode}
- \let\makelabel\@mklab % TODO: customize
-% \end{macrocode}
-% Now we use the argument with parameter settings to update some or
-% all of the above defaults:
-% \begin{macrocode}
- \l_@@_legacy_env_params_tl
-% \end{macrocode}
-% As we don't know much about this list we can only make a guess about
-% the nature of the list and the setting of the tag name (default
-% \texttt{list} rolemapped to \texttt{L}) and any tag attributes
-% may have to be overwritten in the optional key/value argument. But we do have some hints to play with.
-% \begin{macrocode}
- \legacy_if:nTF { @nmbrlist }
- { \tl_set:Nn \l__tag_L_attr_class_tl {enumerate} } % numbered list
- { \tl_if_empty:NTF \@itemlabel
- { \tl_set:Nn \l__tag_L_attr_class_tl {list} } % no label
- { \tl_set:Nn \l__tag_L_attr_class_tl {itemize} } % unnumbered, unordered
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \begin{environment}{trivlist}
-%
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{trivlist}{ !O{} }
- { \list[#1]{}
- {
- \dim_zero:N \leftmargin
- \dim_zero:N \labelwidth
- \cs_set_eq:NN \makelabel \use:n
- }
- }
- { \endblockenv }
-}
-% \end{macrocode}
-% \end{environment}
-%
-%
-% \subsubsection{Theorem-like environments}
-%
-% Theorem-like environments are defined in \LaTeX{} with the help of
-% \cs{newtheorem} declarations. Internally they used a list with a
-% single item. Using lists was convenient back then, but in a tagged
-% document you end up with a strange structure. We therefore alter the
-% mechanism.
-%
-%
-% \begin{macro}{\newtheorem}
-% This is a slightly streamlined version of \cs{newtheorem}, but it
-% still uses a lot of the 2e code for now. Eventually this will change.
-% \begin{macrocode}
-\RenewDocumentCommand \newtheorem { m O{#1} m o }
-{
- \expandafter\@ifdefinable\csname #1\endcsname
- {
- \str_if_eq:nnTF{#1}{#2}
- {
- \@definecounter {#2}
- \IfNoValueTF {#4}
- { % @ynthm
- \tl_gset:ce { the #2 }
- {
- \@thmcounter{#2}
- }
- }
- { % @xnthm
- \@newctr{#1}[#4]
- \tl_gset:ce { the #2 }
- {
- \expandafter\noexpand\csname the#4\endcsname
- \@thmcountersep
- \@thmcounter{#2}
- }
- }
- }
- { % @othm
- \@ifundefined{c@#2}
- { \@nocounterr{#2} }
- {
- \tl_gset:cn { the #1 }
- { \UseName { the #2 } }
- }
- }
- \global\@namedef{#1} { \@thm{#2}{#3} }
- \global\@namedef{end#1}{ \@endtheorem }
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@thm}
-% \cs{@thm} executes \cs{refstepcounter} too early for hyperref
-% and structure destinations: the generated target is outside the structure
-% and can be separated from the theorem by a page break. We therefore move
-% the anchor setting into \cs{@begintheorem}. \cs{@begintheorem} doesn't
-% currently get the name of the counter as argument, so we store it in variable
-% for now, to be able to pass it along.
-% \begin{macrocode}
-\tl_new:N \l_@@_thm_current_counter_tl
-\def\@thm#1#2{%
- \@kernel at refstepcounter{#1}
- \tl_set:Nn \l_@@_thm_current_counter_tl{#1}
- \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
-% \end{macrocode}
-% To avoid that hyperref overwrites the definition again we must its patch:
-% \begin{macrocode}
-\def\hyper at nopatch@thm{}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@begintheorem,\@opargbegintheorem}
-%
-% The \cs{@thm} command expands to either \cs{@beginthorem} or
-% \cs{@opargbegintheorem}. For the moment we stick with this as it
-% will help with the transition. But instead of using a
-% \env{trivlist} we use a blockenv and some tagging for the title
-% (as a Caption).
-% We do not want potential tagging from \cs{textbf} here,
-% so we use \cs{bfseries} to set the font. The commands set also the link targets
-% which should be inside the main structure.
-% \begin{macrocode}
-\def\@begintheorem#1#2{
- \UseInstance{blockenv}{theorem}{}
- \tagpdfparaOff
- \mode_leave_vertical:
- \MakeLinkTarget{\l_@@_thm_current_counter_tl}
- \tag_struct_begin:n{tag=Caption}
- \group_begin:
- \bfseries
- \tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
- #2
- \tag_mc_end:
- \tag_struct_end:
- \group_end:
- \tag_struct_end:
- \tagpdfparaOn
-% \end{macrocode}
-%
-% \begin{macrocode}
- \@@_start_para_structure_unconditionally:n { \PARALABEL }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \itshape
- \hskip\labelsep
- \ignorespaces
-}
-\def\@opargbegintheorem#1#2#3{
- \UseInstance{blockenv}{theorem}{}
- \tagpdfparaOff
- \mode_leave_vertical:
- \MakeLinkTarget{\l_@@_thm_current_counter_tl}
- \tag_struct_begin:n{tag=Caption}
- \group_begin:
- \bfseries
- \tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
- #2
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n {}
- \ (#3)
- \tag_mc_end:
- \group_end:
- \tag_struct_end:
- \tagpdfparaOn
-% \end{macrocode}
-%
-% \begin{macrocode}
- \@@_start_para_structure_unconditionally:n { \PARALABEL }
-% \end{macrocode}
-%
-% \begin{macrocode}
- \itshape
- \hskip\labelsep
- \ignorespaces
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@endtheorem{\endblockenv}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-%
-%
% \subsection{Implementation of templates}
%
%
@@ -1531,11 +1032,11 @@
% \begin{macro}{\g_block_nesting_depth_int}
% \LaTeXe{} already has a counter to record the nesting depth of
% blocks, but we want our own name because it isn't really tied to
-% \enquote{lists} any more. However, \cs{@listdepth} is really part
+% \enquote{lists} any more. However, \tn{@listdepth} is really part
% of the legacy interface (for example \env{minipage} alters it to
% point to a different counter) so that we are stuck with using at
% least indirectly for now and the following line makes this look
-% like an L3 integer variable but internally expands to \cs{@listdepth}:
+% like an L3 integer variable but internally expands to \tn{@listdepth}:
% \begin{macrocode}
\cs_new:Npn \g_block_nesting_depth_int { \@listdepth } % a fake int
% for now
@@ -1556,11 +1057,11 @@
setup-code = \l_@@_setup_code_tl ,
block-instance = \l_@@_block_instance_tl ,
para-instance = \l_@@_para_instance_tl ,
+ para-flattened = \l__tag_para_flattened_bool ,
inner-level-counter = \l_@@_inner_level_counter_tl ,
max-inner-levels = \l_@@_max_inner_levels_tl ,
inner-instance-type = \l_@@_inner_instance_type_tl ,
inner-instance = \l_@@_inner_instance_tl ,
- para-flattened = \l__tag_para_flattened_bool ,
final-code = \l_@@_final_code_tl ,
}
{
@@ -1577,8 +1078,8 @@
% Thus a value of \texttt{0} means no flattening requested so far
% and \texttt{1} means this is the first blockenv requesting
% flattening. In either case we have to make sure that the blockenv
-% is surrounded by a \texttt{text-unit} tag, while for any value above
-% \texttt{1} we have to omit the \texttt{text-unit}.
+% is surrounded by a \struct{text-unit} tag, while for any value above
+% \texttt{1} we have to omit the \struct{text-unit}.
% \begin{macrocode}
\int_compare:nNnTF \l__tag_block_flattened_level_int > 0
{
@@ -1615,7 +1116,8 @@
% does nothing, i.e., the current values (from the last level
% become the defaults for the next.
% \begin{macrocode}
- \use:c { @list \int_to_roman:n { \g_block_nesting_depth_int } }
+ \use:c { @list \int_to_roman:n
+ { \g_block_nesting_depth_int } }
}
}
% \end{macrocode}
@@ -1623,7 +1125,8 @@
% tagging, which alters various kernel hooks to add appropriate
% tagging structures.
% \begin{macrocode}
- \tag_if_active:T { \use:c { @@_recipe_ \l_@@_tagging_recipe_tl : } }
+ \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
@@ -1634,8 +1137,8 @@
% 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
+% \changes{v0.8v}{2024/10/11}{Set the defaults for \tn{@itemlabel},
+% \tn{@listctr} and \texttt{@nmbrlist} early in the block code
% before the setup code gets executed (tagging/730)}
% \begin{macrocode}
\tl_clear:N \@itemlabel
@@ -1664,7 +1167,8 @@
% \begin{macrocode}
\tl_if_empty:NF \l_@@_para_instance_tl
{
- \@@_debug_typeout:n{use~ para~ instance:~ \l_@@_para_instance_tl }
+ \@@_debug_typeout:n{ use~ para~ instance:~
+ \l_@@_para_instance_tl }
% \end{macrocode}
% For now we don't offer to alter instance parameters here so we
% pass an empty argument.
@@ -1684,14 +1188,14 @@
\UseInstance{ \l_@@_inner_instance_type_tl }
{ \l_@@_inner_instance_tl
\tl_if_empty:NF \l_@@_inner_level_counter_tl
- { - \int_use:N \l_@@_inner_level_counter_tl } % not clean
- % use "o"?
+ % not clean use "o"?
+ { - \int_use:N \l_@@_inner_level_counter_tl }
}
{#1}
}
% \end{macrocode}
% We finish off with \cs{l_@@_final_code_tl} which defaults to
-% \cs{ignorespaces} so that spaces between \verb=\begin{...}= and
+% \tn{ignorespaces} so that spaces between \verb=\begin{...}= and
% the start of the text are ignored.
% \begin{macrocode}
\l_@@_final_code_tl
@@ -1739,7 +1243,7 @@
\bool_if:NT \l_@@_level_incr_bool
{ \int_gdecr:N \g_block_nesting_depth_int }
% \end{macrocode}
-% If this block was a list and there are still \cs{item} labels to
+% If this block was a list and there are still \tn{item} labels to
% be placed we move to horizontal mode to get them typeset.
% \begin{macrocode}
\legacy_if:nT { @inlabel }
@@ -1749,14 +1253,14 @@
}
% \end{macrocode}
% 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
+% \tn{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
+% list then \tn{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}
+% \changes{v0.8q}{2024/09/03}{Raise a \tn{@noitemerr} if appropriate}
% \begin{macrocode}
\@@_if_list:T { \legacy_if:nT { @newlist } { \@noitemerr } }
% \end{macrocode}
@@ -1811,9 +1315,9 @@
% should be added only if the paragraph ends here and not if it
% continues, so this need some further cleanup.\fmi{decide}
%
-% Finally, we have a socket that handles the \cs{par} handling
+% Finally, we have a socket that handles the \tn{par} handling
% after the block. Normally, we use it with the \plug{on} plug (check for a
-% following \cs{par}) but in the case of standalone environments we
+% following \tn{par}) but in the case of standalone environments we
% assign it the \plug{off} plug.
% \begin{macrocode}
\socket_use:n {tagsupport/block-endpe}
@@ -1825,7 +1329,7 @@
%
% \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 environment a \enquote{list} that has \tn{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}
@@ -1848,7 +1352,7 @@
%
%
% \begin{socketdecl}{tagsupport/block-endpe}
-% This socket is responsible for the end environment \cs{par}
+% This socket is responsible for the end environment \tn{par}
% handling. We define two plugs for it (\plug{on} and \plug{off}).
% \begin{macrocode}
\socket_new:nn {tagsupport/block-endpe}{0}
@@ -1915,7 +1419,13 @@
%
% \begin{template}{block display}
%
+% In contrast to the \LaTeXe{} implementation we do not directly
+% use \tn{listparindent} here but a private register of the
+% template. The reason is that block template instances are also
+% used outside of lists.
% \changes{v0.8s}{2024/10/03}{Offer item-skip key also on block templates}
+% \changes{v0.8w}{2024/11/23}{Use private storage bin for parindent
+% and not \tn{listparindent} to decouple block and list templates (tagging/767)}
% \begin{macrocode}
\DeclareTemplateCode{block}{display}{1}
{
@@ -1930,7 +1440,7 @@
endpenalty = \@endparpenalty ,
rightmargin = \rightmargin ,
leftmargin = \leftmargin ,
- parindent = \listparindent ,
+ parindent = \l_@@_parindent_dim ,
}
{
\tl_if_empty:nF {#1} { \SetTemplateKeys{block}{display}{#1} }
@@ -1938,7 +1448,8 @@
% \fmi{generalize heading usage (or drop?)}
% \begin{macrocode}
\tl_if_blank:oF \l_@@_heading_tl
- { \mode_leave_vertical: \textbf{\l_@@_heading_tl} } % TODO customize
+ { \mode_leave_vertical:
+ \textbf{\l_@@_heading_tl} } % TODO customize
% \end{macrocode}
% The code largely follows the logic of \LaTeXe{}'s \env{trivlist}
% implementation as far as it applicable for the \enquote{display
@@ -1964,11 +1475,11 @@
% \end{macrocode}
% If we are in horizontal mode then the displayblock has to return
% to vertical mode now (after removing any immediately preceding
-% skip or kern. But before we actually issue the\cs{par} we execute
+% skip or kern. But before we actually issue the\tn{par} we execute
% a kernel hook in which we can add tagging code. This hook is
% \enquote{weird} because by default it does nothing, but if
% tagging is wanted it takes an argument and grabs the following
-% \cs{par} in order to put tagging code before and after the \cs{par}.
+% \tn{par} in order to put tagging code before and after the \tn{par}.
% \begin{macrocode}
\@@_skip_remove_last: \@@_skip_remove_last:
\__kernel_displayblock_beginpar_hmode:w \par
@@ -1988,8 +1499,9 @@
}
\skip_add:Nn \l_@@_effective_top_skip { \parskip }
% \end{macrocode}
-% Next lines set some paragraph defaults, this may get overwritten
-% if there is a \key{para-instance} specified on the \xt{blockenv}.
+% Next lines set some paragraph defaults, any of them may get overwritten
+% if there is a \key{para-instance} specified on the \xt{blockenv}
+% instance.
% \begin{macrocode}
\skip_zero:N \leftskip
\skip_set_eq:NN \rightskip \@rightskip
@@ -1998,8 +1510,8 @@
% The next lines establish a parshape which is retained across
% paragraphs be executing \cs{para_end:} within a group and thus
% reestablishing the parshape for the next paragraph again. In case
-% a list got started \cs{par} is ignored until we have seen an
-% \cs{item} (or we have executed \cs{par} one thousand times.
+% a list got started \tn{par} is ignored until we have seen an
+% \tn{item} (or we have executed \tn{par} one thousand times.
% \begin{macrocode}
\int_zero:N \par at deathcycles
\@setpar
@@ -2018,7 +1530,11 @@
}
\skip_set_eq:NN \@outerparskip \parskip
\skip_set_eq:NN \parskip \parsep
- \dim_set_eq:NN \parindent \listparindent
+% \end{macrocode}
+% \changes{v0.8w}{2024/11/23}{Use private storage bin for parindent
+% and not \tn{listparindent} to decouple block and list templates (tagging/767)}
+% \begin{macrocode}
+ \dim_set_eq:NN \parindent \l_@@_parindent_dim
\dim_add:Nn \linewidth { - \rightmargin - \leftmargin }
\dim_add:Nn \@totalleftmargin { \leftmargin }
\tex_parshape:D 1 ~ \@totalleftmargin \linewidth
@@ -2031,8 +1547,8 @@
% \end{macrocode}
% Finally, we have to output the vertical separation and penalty at
% the start of the block and make corrections for a change in
-% \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
+% \tn{parskip} and some other housekeeping, unless this block is inside a list and the list
+% \tn{item} has not yet placed. In that case the vertical
% space and penalty us suppressed. This
% is controlled through the legacy switches \texttt{@noparitem},
% \texttt{minipage}, and \texttt{@nobreak}.
@@ -2053,7 +1569,8 @@
{
\@@_skip_set_to_last:N \l_@@_tmpa_skip
\skip_vertical:n { - \l_@@_tmpa_skip }
- \skip_vertical:n { \l_@@_tmpa_skip + \@outerparskip - \parskip }
+ \skip_vertical:n { \l_@@_tmpa_skip +
+ \@outerparskip - \parskip }
}
}
{
@@ -2087,19 +1604,22 @@
% The internal kernel hooks for tagging.
% \begin{macrocode}
\cs_new:Npn \__kernel_displayblock_begin: {
- \@@_debug_typeout:n{\detokenize{__kernel_displayblock_begin:}}
+ \@@_debug_typeout:n
+ {\detokenize{__kernel_displayblock_begin:}}
}
% \end{macrocode}
%
% \begin{macrocode}
\cs_new:Npn \__kernel_displayblock_beginpar_hmode:w {
- \@@_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_hmode:w}}
+ \@@_debug_typeout:n
+ {\detokenize{__kernel_displayblock_beginpar_hmode:w}}
}
% \end{macrocode}
%
% \begin{macrocode}
\cs_new:Npn \__kernel_displayblock_beginpar_vmode: {
- \@@_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_vmode:}}
+ \@@_debug_typeout:n
+ {\detokenize{__kernel_displayblock_beginpar_vmode:}}
}
% \end{macrocode}
% \end{macro}
@@ -2112,7 +1632,7 @@
%
%
% \begin{macro}{\@itemlabel,\@listctr}
-% Both \cs{@itemlabel} and \cs{@listctr} from the \LaTeXe{} list
+% Both \tn{@itemlabel} and \tn{@listctr} from the \LaTeXe{} list
% implementation are used (or set) by various packages. We
% therefore use them too, so that these packages have a fighting
% chance to work with the new tagging-aware implementation for
@@ -2127,26 +1647,26 @@
%
% \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
+% the behavior of the template instance that defines the \tn{item}
+% command. If meant to alter only a single \tn{item} command one
+% would specify them in the optional argument of the \tn{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
+% set them inside the \tn{item} template code using
+% \tn{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
+% different \tn{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
+% \changes{v0.8s}{2024/10/03}{Pass user keys on list to \tn{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
+% for now this is a one-off for the \tn{item} command and therefore
% coded inline and internal to the block code.
% \begin{macrocode}
%\cs_new:Npn \@@_save_user_keys:n #1 {
@@ -2190,9 +1710,9 @@
% 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}.
+% template for \tn{item}.
% \changes{v0.8s}{2024/10/03}{Prepare \cs{@@_evaluate_saved_user_keys:nn}
-% for use in \cs{item}}
+% for use in \tn{item}}
% \begin{macrocode}
\tl_if_empty:nTF {#1}
{ \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
@@ -2207,8 +1727,8 @@
\tl_if_empty:NTF \l_@@_counter_tl
{
% \end{macrocode}
-% If not we check if \cs{@nmbrlist} is true which may be the case
-% in legacy environments that used \cs{usecounter} in the argument
+% If not we check if \tn{@nmbrlist} is true which may be the case
+% in legacy environments that used \tn{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)}
@@ -2217,7 +1737,7 @@
{
% \end{macrocode}
% In that case we only check if we should resume a previous list
-% (\cs{@listctr} should be set in that case through the legacy
+% (\tn{@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
@@ -2246,8 +1766,8 @@
% \end{macrocode}
% Does the current instance has an item label representation? This
% would be possible whether or not we have a numbered list. If yes,
-% then we use this for \cs{@itemlabel}, otherwise we expect that
-% \cs{@itemlabel} is provided from the outside, e.g., as part of
+% then we use this for \tn{@itemlabel}, otherwise we expect that
+% \tn{@itemlabel} is provided from the outside, e.g., as part of
% the \env{list} environment argument.
% \begin{macrocode}
\tl_if_empty:NF \l_@@_item_label_tl
@@ -2256,20 +1776,20 @@
}
% \end{macrocode}
% 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}
+% affects how the first \tn{item} is handled and how \tn{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
+% If we encounter horizontal material before the first \tn{item} we
+% do want a \tn{@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
+% missing \tn{item}. So we setup up \cs{@@_item_everypar:} to test
+% for this; when the first \tn{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
+% the first \tn{item} (maybe some \tn{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.}
@@ -2301,17 +1821,17 @@
% \end{template}
%
%
-% \subsubsection{Implementation of \cs{item} template(s)}
+% \subsubsection{Implementation of \tn{item} template(s)}
%
%
%
% \begin{template}{item std}
-% The item template has one hidden key \texttt{label} which is not available on the
+% The item template has one hidden key \key{label} which is not available on the
% template for setting because it is only used to receive any
-% optional data passed to the \cs{item} command. We therefore
+% optional data passed to the \tn{item} command. We therefore
% declare it with \cs{keys_define:nn} and ensure that the optional
-% argument data to \cs{item} (if it is not a key/value list
-% already) is passed to this \texttt{label} key.
+% argument data to \tn{item} (if it is not a key/value list
+% already) is passed to this \key{label} key.
% \begin{macrocode}
\keys_define:nn { template/item/std }
{ label .tl_set:N = \l_@@_label_given_tl }
@@ -2351,7 +1871,7 @@
% from the counter. If it is boxed and reasonably short, add padding to
% make it at least of size \tn{labelwidth}, then add another layer of
% box. This way, when we unpack it in \cs{g_@@_labels_box} it correctly
-% remains boxed in those cases. Afterwards, in the \texttt{nextline}
+% remains boxed in those cases. Afterwards, in the \keyvalue{nextline}
% case add \tn{newline} if the label did not fit in the allotted space.
% \begin{macrocode}
{
@@ -2360,7 +1880,7 @@
%
% First deal with the key--value input, which in particular may
% provide a value for the label (the usual optional argument of
-% \cs{item}). For this we set \cs{l_@@_label_given_tl} to
+% \tn{item}). For this we set \cs{l_@@_label_given_tl} to
% \cs{c_novalue_tl} so that we can identify if an optional argument
% was given.
% \begin{macrocode}
@@ -2369,7 +1889,7 @@
% 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
+% with all keys specified on this \tn{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}
@@ -2390,10 +1910,13 @@
% incomplete and partly wrong.\fmi{fix}
% \begin{macrocode}
\tl_if_blank:oF \@listctr { \@kernel at refstepcounter \@listctr }
- \bool_if:NTF \l_@@_item_compatibility_bool % not sure that conditional
- % makes sense
- { \@@_make_label_box:n { \MakeLinkTarget[\@listctr]{}\@itemlabel } } % TODO ?
- { \@@_make_label_box:n { \MakeLinkTarget[\@listctr]{}\@@_counter_label:n { \@listctr } } }
+ \bool_if:NTF \l_@@_item_compatibility_bool % not sure that
+ % conditional
+ % makes sense
+ { \@@_make_label_box:n { \MakeLinkTarget[\@listctr]{}%
+ \@itemlabel } } % TODO ?
+ { \@@_make_label_box:n { \MakeLinkTarget[\@listctr]{}%
+ \@@_counter_label:n { \@listctr } } }
}
{
\@@_debug_typeout:n{item~ with~ optional}
@@ -2401,7 +1924,9 @@
\bool_if:nT
{
\l_@@_label_boxed_bool
- && \dim_compare_p:n { \box_wd:N \l_@@_one_label_box <= \linewidth } % TODO: is \linewidth correct?
+% TODO: is \linewidth correct?
+ && \dim_compare_p:n
+ { \box_wd:N \l_@@_one_label_box <= \linewidth }
}
{
\dim_compare:nNnT
@@ -2418,7 +1943,8 @@
% enumitem offers that in some cases too) but it should probably
% not the default.
% \begin{macrocode}
-% \hbox_unpack_drop:N \l_@@_one_label_box %TODO: customize?
+% TODO: customize?
+% \hbox_unpack_drop:N \l_@@_one_label_box
\box_use_drop:N \l_@@_one_label_box
% \end{macrocode}
%
@@ -2445,12 +1971,33 @@
{ \bool_if:NT \l_@@_long_label_bool { \nobreak \hfil \break } }
% version of \newline inside an hbox that will be unpacked
}
- % \skip_set_eq:NN \parsep \l_@@_item_parsep_skip TODO??? FMi
- % what's that?
- \dim_set_eq:NN \parindent \listparindent
+ % TODO??? FMi what's that?
+ % \skip_set_eq:NN \parsep \l_@@_item_parsep_skip
% \end{macrocode}
+% The next setting is for compatibility: The list template sets
+% \tn{listparindent} to zero and otherwise doesn't use it any
+% more. However, in the second argument of a legacy \env{list}
+% envrironment the user may have set it explicitly to some other
+% value and whatever value it had was then used for \tn{parindent}
+% within the list. Now we use its value only if it differs from
+% zero but otherwise use whatever the template instances
+% specify. This gives 99.9\% compatibility for legacy
+% documents. 100\% for definitions using the \env{list} environment
+% and a setting inside, but if the user used \tn{listparindent}
+% within the document, e.g., inside a \env{verse} environment there
+% there is one case in which the setting is ignored, i.e., when it
+% was set back to zero. That's a rather unlikely scenario, but it
+% is not impossible. However, I couldn't think of an approach that
+% circumvents such boundary cases.
+%
+% \changes{v0.8w}{2024/11/24}{Only use \tn{listparindent} if it was changed
+% from its default (tagging/767)}
+% \begin{macrocode}
+ \dim_compare:nNnF \listparindent = {0pt}
+ { \dim_set_eq:NN \parindent \listparindent }
+% \end{macrocode}
% Placing the list label(s) is done when the paragraph for the
-% \cs{item} is started, which executes \cs{@@_item_everypar:}
+% \tn{item} is started, which executes \cs{@@_item_everypar:}
% inside \hook{para/begin}. By default this command does nothing, now we
% change it to attach the pending label or labels.
% \begin{macrocode}
@@ -2461,6 +2008,12 @@
%
%
%
+% \begin{macro}{\l_@@_item_align_tl}
+%
+% \begin{macrocode}
+\tl_new:N \l_@@_item_align_tl
+% \end{macrocode}
+% \end{macro}
%
% \begin{variable}{\l_@@_one_label_box, \g_@@_labels_box}
% Each label is typeset in \cs{l_@@_one_label_box} to be measured.
@@ -2542,7 +2095,7 @@
% \end{macrocode}
%
% Note that we have to make sure that the above code is executed
-% after the hook chunk from \texttt{tagpdf} because the latter uses
+% after the hook chunk from \pkg{tagpdf} because the latter uses
% \texttt{@inlabel} to make a decision.
%
% By the end of the day both should probably move into the kernel
@@ -2601,8 +2154,8 @@
% \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
+% \tn{item} is encountered.
+% \changes{v0.8q}{2024/09/02}{Call \tn{@noitemerr} if hmode is
% started before the first item}
% \begin{macrocode}
\cs_new:Npn \@@_item_everypar_first: {
@@ -2658,7 +2211,7 @@
% 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
+% calls \tn{UseInstance}\{item\}\marg{instance}) to prepare the
% upcoming item: it will be actually inserted only once some later
% material triggers \tn{everypar}.
% \begin{macrocode}
@@ -2681,7 +2234,7 @@
% \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}}
+% the first \tn{item}}
% \begin{macrocode}
\legacy_if_gset_false:n { @newlist }
}
@@ -2715,7 +2268,7 @@
\legacy_if:nT { @inlabel }
{ \indent \par } % case of \item\item
% \end{macrocode}
-% \cs{par} may have a strange definition and may not get us back to
+% \tn{par} may have a strange definition and may not get us back to
% vertical mode in one go, so we better do not treat the next line
% as an else case to the above conditional (for now).
% \begin{macrocode}
@@ -2750,14 +2303,557 @@
%
%
%
+% \subsection{Tagging support commands}
%
+% In this section we provide code to the various kernel hooks to support
+% the tagging of different displayblock environments.
+%
+% All of the following definitions should only be made if tagging
+% is active!
+% \begin{macrocode}
+\tag_if_active:TF {
+% \end{macrocode}
%
+% \begin{macro}{\@@_beginpar_vmode:}
+% When a block starts out in vertical mode, i.e., is not yet part of
+% a paragraph, we have to start a paragraph
+% structure. However, this is not the case if we are already
+% flattening paragraphs, thus in this case we do nothing.
+% We also do nothing if \texttt{@endpe} is currently true, because
+% that means we are right now just after the end of a
+% \texttt{blockenv} and in the process of looking if we have to end
+% the current \struct{text-unit}, i.e., it is already open.
+% \begin{macrocode}
+ \cs_set:Npn \@@_beginpar_vmode: {
+ \@@_debug_typeout:n
+ { @endpe = \legacy_if:nTF { @endpe }{true}{false}
+ \on at line }
+ \legacy_if:nTF { @endpe }
+ {
+ \legacy_if_gset_false:n { @endpe }
+ }
+% \end{macrocode}
+% We test for \texttt{<2} because the first flattened environment
+% has to surround itself with a \struct{text-unit}. Only any inner ones
+% then have to avoid adding another \struct{text-unit}.
+% \begin{macrocode}
+ {
+ \int_compare:nNnT \l__tag_block_flattened_level_int < 2
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_beginpar_hmode:N}
+% If the block is already part of a part of a paragraph, i.e., when it has
+% some text directly in front, then the first thing to
+% do is to return to vertical mode. However, that should be done
+% without inserting a paragraph end tag, so before calling \tn{par}
+% to do its normal work, we disable paragraph tagging and
+% restarting afterwards again. The argument to this config point
+% simply gobbles the \tn{par} following it in the code above (which
+% is used when there is no tagging going on.
+% \begin{macrocode}
+ \cs_set:Npn \@@_beginpar_hmode:N #1
+ {
+ \tag_mc_end:
+ \__tag_gincr_para_end_int:
+ \@@_debug_typeout:n{increment~ /P \on at line }
+ \bool_if:NT \l__tag_para_show_bool
+ { \tag_mc_begin:n{artifact}
+ \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int}
+ \tag_mc_end:
+ }
+ \tag_struct_end:
+ \tagpdfparaOff \par \tagpdfparaOn
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\__kernel_displayblock_doendpe:}
+% If a display block ends and is followed by a blank line we have to end the
+% enclosing paragraph tagging structure.
+% \begin{macrocode}
+\cs_set:Npn \__kernel_displayblock_doendpe: {
+ \bool_if:NT \l__tag_para_bool
+ {
+% \end{macrocode}
+% Given that restoring \tn{par} through the legacy \LaTeXe{} method
+% can take a few iterations (for example, in case of nested lists,
+% e.g., \verb=...\end{itemize} \item ...\par= it can happen that
+% \cs{__kernel_displayblock_doendpe:} is called while
+% \texttt{@endpe} is already handled and then we should not attempt
+% to close a \struct{text-unit} structure). So we need to check for this.
+% \begin{macrocode}
+ \legacy_if:nT { @endpe }
+ {
+% \end{macrocode}
+% If the display block currently ending was \enquote{flattened}
+% (i.e., uses simplified paragraphs that are not tagged by a
+% combination of \struct{text-unit} followed by \struct{text}, but simply
+% with a \struct{text}),
+% then we don't have to do anything, because the \struct{text} is already closed.
+% \begin{macrocode}
+ \@@_debug_typeout:n
+ { flattened= \bool_if:NTF
+ \l__tag_para_flattened_bool
+ {true}{false}
+ \on at line }
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \@@_debug_typeout:n{Structure-end~
+ \l__tag_para_main_tag_tl\space
+ after~ displayblock \on at line }
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end: %text-unit
+ }
+ }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{para/begin}
+%
+% Paragraph tagging is mainly done using the paragraph hooks (will
+% get moved eventually). The default hook setting is not good
+% enough when lists get supported: we need to delay starting the
+% paragraph tagging if we still have to place the list label.
+% We therefore remove the existing hook data and replace it with an
+% augmented version (this will get combined eventually).
+% \begin{macrocode}
+\RemoveFromHook{para/begin}[tagpdf]
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AddToHook{para/begin}[tagpdf]{
+ \bool_if:NT \l__tag_para_bool {
+% \end{macrocode}
+% if we are still waiting to typeset the list label we do nothing
+% (the paragraph tagging then happens when the list is finally
+% typeset).
+% \begin{macrocode}
+ \legacy_if:nF { @inlabel }
+ {
+% \end{macrocode}
+% Otherwise, we start a \struct{text} tag structure but only if we are not
+% starting a paragraph immediately \emph{after} a list, in which
+% case we only start a new MC (because the \struct{text} tag is still open from
+% before the list --- one of the reasons why lists are always put
+% \enquote{inside} paragraphs.
+%
+% We do this in a separate command, because it is needed elsewhere too.
+% \begin{macrocode}
+ \@@_start_para_structure:n { \PARALABEL }
+ }
+ }
+}
+% \end{macrocode}
+%
+%
+% \begin{macro}{\@@_start_para_structure:n}
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_start_para_structure:n #1 {
+ \@@_debug_typeout:n
+ { @endpe = \legacy_if:nTF { @endpe }{true}{false}
+ \on at line }
+ \legacy_if:nF { @endpe }
+ {
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ }
+ \__tag_gincr_para_begin_int:
+ \@@_debug_typeout:n{increment~ P \on at line }
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_tag_tl
+ ,attribute-class=\l__tag_para_attr_class_tl
+ }
+ \__tag_check_para_begin_show:nn {green}{#1}
+ \tag_mc_begin:n {}
+}
+% \end{macrocode}
+% The same code, but without testing \texttt{@endpe}. This is not
+% needed in the standalone case and wrong inside lists.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_start_para_structure_unconditionally:n #1 {
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ \__tag_gincr_para_begin_int:
+ \@@_debug_typeout:n{increment~ P \on at line }
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_tag_tl
+ ,attribute-class=\l__tag_para_attr_class_tl
+ }
+ \__tag_check_para_begin_show:nn {green}{#1}
+ \tag_mc_begin:n {}
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+\RemoveFromHook{para/end}[tagpdf]
+\AddToHook{para/end}
+ {
+ \bool_if:NT \l__tag_para_bool
+ {
+ \__tag_gincr_para_end_int:
+ \@@_debug_typeout:n{increment~ /P \on at line }
+ \tag_mc_end:
+ \__tag_check_para_end_show:nn {red}{}
+ \tag_struct_end:
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end:
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\PARALABEL{NP-}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\para_end:}
+% If we see a \tn{par} in vmode and a \struct{text-unit} is still open
+% we need to close that. For this we check if a request for
+% \text{@endpe} was made (but the \tn{par} redefinition got lost
+% due to (bad?) coding).
+% \begin{macrocode}
+\cs_set_protected:Npn \para_end: {
+ \scan_stop:
+ \mode_if_horizontal:TF {
+ \mode_if_inner:F {
+ \tex_unskip:D
+ \hook_use:n{para/end}
+ \@kernel at after@para at end
+ \mode_if_horizontal:TF {
+ \if_int_compare:w 11 = \tex_lastnodetype:D
+ \tex_hskip:D \c_zero_dim
+ \fi:
+ \tex_par:D
+ \hook_use:n{para/after}
+ \@kernel at after@para at after
+ }
+ { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} }
+ }
+ }
+ {
+ \__kernel_endpe_vmode: % should do nothing if no tagging
+ \tex_par:D
+ }
+}
+\cs_set_eq:NN \par \para_end:
+\cs_set_eq:NN \@@par \para_end:
+\cs_set_eq:NN \endgraf \para_end:
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+% \begin{macro}{\begin}
+% We need to do a little more than canceling \texttt{@endpe} now.
+% \begin{macrocode}
+\DeclareRobustCommand*\begin[1]{%
+ \UseHook{env/#1/before}%
+ \@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}%
+ \@execute at begin@hook{#1}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup
+ \__kernel_endpe_vmode:
+ \reserved at a}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\__kernel_endpe_vmode:}
+% Close an open \struct{text-unit} if \texttt{@endpe} is true and we
+% are in vmode. Used in \cs{para_end:} and \tn{begin}.
+% \begin{macrocode}
+\cs_new:Npn \__kernel_endpe_vmode: {
+ \if at endpe \ifvmode
+ \bool_if:NT \l__tag_para_bool
+ {
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end:
+ }
+ \@endpefalse
+ }
+ \fi \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\__kernel_list_label_after:}
+% If starting the text-unit/text tags got delayed because of a pending label we
+% have to do it after the label got typeset
+% \begin{macrocode}
+\cs_set:Npn \__kernel_list_label_after: {
+ \bool_if:NT \l__tag_para_bool
+ {
+ \@@_start_para_structure_unconditionally:n { LI- }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_inner_begin:}
+% Start a block that has an inner structure if it isn't also a list.
+% \begin{macrocode}
+\cs_new:Npn \@@_inner_begin: {
+ \tagstructbegin{tag=\l_@@_tag_inner_tag_tl}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@@_inner_end:}
+% End a block (which isn't also a list).
+% \begin{macrocode}
+\cs_new:Npn \@@_inner_end: {
+ \@@_debug_typeout:n{block-end \on at line}
+ \legacy_if:nT { @endpe }
+ {
+ \__tag_gincr_para_main_end_int:
+ \@@_debug_typeout:n{close~ /text-unit \on at line}
+ \tagstructend
+ }
+ \tagstructend % end inner structure
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+%
+% \subsubsection{List tags}
+%
+%
+% \begin{macrocode}
+\tl_new:N \l__tag_L_tag_tl
+\tl_set:Nn \l__tag_L_tag_tl {L}
+
+\tl_new:N\l__tag_L_attr_class_tl
+\tl_set:Nn \l__tag_L_attr_class_tl {list}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\tag_if_active:T
+{
+ \tagpdfsetup
+ {
+ role/new-attribute = {itemize}
+ {/O /List /ListNumbering/Unordered},
+ role/new-attribute = {enumerate}
+ {/O /List /ListNumbering/Ordered},
+ role/new-attribute = {description}
+ {/O /List /ListNumbering/Description},
+% \end{macrocode}
+% Initially, we had \texttt{/None} for the basic \env{list}
+% environment, but that is not allowed in PDF/UA-2 if the list
+% contains any Lbl tags. So now we default to
+% \texttt{Unordered}.
+% \begin{macrocode}
+ % default if unknown
+ role/new-attribute = {list}{/O /List /ListNumbering/Unordered},
+ }
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\LItag{LI}
+% \end{macrocode}
+%
+% \begin{macro}{\@@_list_begin:}
+% Start a list \ldots
+% \begin{macrocode}
+\cs_set:Npn \@@_list_begin: {
+ \tagstructbegin
+ {
+ tag=\l__tag_L_tag_tl
+ ,attribute-class=\l__tag_L_attr_class_tl
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_list_item_begin:}
+% Start tagging a list item.
+% \begin{macrocode}
+\cs_set:Npn \@@_list_item_begin: { \tagstructbegin{tag=\LItag} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\__kernel_list_label_begin:}
+% A list label needs a \struct{Lbl} structure tag and an MC.
+% \begin{macrocode}
+\cs_set:Npn \__kernel_list_label_begin: {
+%
+% FMi: this needs a different logic to decide when to make the label
+% an artifact (after cleaning up the \item code ), therefore
+% disabled for now
+% \tl_if_empty:oTF \@itemlabel
+% {
+% \tag_mc_begin:n {artifact}
+% }
+% {
+ \tagstructbegin{tag=Lbl}
+ \tagmcbegin{tag=Lbl}
+% }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\__kernel_list_label_end:}
+% And when we are done with the label we have to close the MC and
+% the \struct{Lbl} structure. We then start the \struct{LBody}. The
+% material inside will be \enquote{paragraph} text and the tagging
+% for that is handled by the normal para tagging.
+% \begin{macrocode}
+\cs_set:Npn \__kernel_list_label_end: {
+ \tagmcend % end mc-Lbl or artifact
+% FMi: unconditionally for now
+% \tl_if_empty:oF \@itemlabel
+ \tagstructend % end Lbl
+ \tagstructbegin{tag=\LBody}
+}
+\def\LBody{LBody}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_list_item_end:}
+% When a list item ends we have to close \struct{LBody} and
+% \struct{LI} but also a \struct{text} in the special case that the
+% item material ends in a list (identifiable via \texttt{@endpe}).
+% \begin{macrocode}
+\cs_set:Npn \@@_list_item_end: {
+ \legacy_if:nT { @endpe }
+ {
+ \__tag_gincr_para_main_end_int:
+ \tagstructend % text-unit
+% \@@_debug_typeout:n{Structure-end~ P~ at~ item-end \on at line }
+ }
+ \tagstructend \tagstructend % end LBody, LI
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_list_end:}
+% Finally, at the list end we have to close the open
+% \struct{LBody}, \struct{LI}, \struct{L}, and possibly a
+% \struct{text} if the last item ends with a list.
+% However, if the user forgot to add an \tn{item} then there will be no
+% \struct{LI} and \struct{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 \tn{@noitemerr} was issued. However, there is one case
+% where it isn't an error: In the \env{thebibliography}
+% environment (which is internally a list) it is often the case
+% that documents start out with an empty environment, not
+% containing any \tn{bibitem}s. For that reason \tn{@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: {
+% \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 }
+ {
+ \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 % end L
+}
+% \end{macrocode}
+% \end{macro}
+% End of tagging related declarations.
+% \begin{macrocode}
+}
+% \end{macrocode}
+% These command should have a dummy declaration if tagging is not active
+% \begin{macrocode}
+{
+ \cs_new:Npn \@@_start_para_structure_unconditionally:n #1 {}
+}
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
% \subsection{Tagging recipes}
%
% \begin{macro}{\@@_recipe_basic:}
-% The \texttt{basic} recipe simply ensures that the block is inside
-% a \texttt{text-unit} structure and if necessary starts one. When the
-% block ends and is followed by a blank line the \texttt{text-unit}
+% The \keyvalue{basic} recipe simply ensures that the block is inside
+% a \struct{text-unit} structure and if necessary starts one. When the
+% block ends and is followed by a blank line the \struct{text-unit}
% structure is closed too, otherwise it remains open and further
% text starts with just a \struct{text} structure.
%
@@ -2764,7 +2860,7 @@
% There is otherwise no inner structure so
% \cs{__kernel_displayblock_begin:} and
% \cs{__kernel_displayblock_end:} do nothing---blockenvs with inner
-% structure use the \texttt{standard} or \texttt{list} recipe instead.
+% structure use the \keyvalue{standard} or \keyvalue{list} recipe instead.
% \begin{macrocode}
\cs_new:Npn \@@_recipe_basic: {
\cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w
@@ -2774,7 +2870,7 @@
\let \__kernel_displayblock_begin: \prg_do_nothing:
\let \__kernel_displayblock_end: \prg_do_nothing:
% \end{macrocode}
-% End environment \cs{par} handling:
+% End environment \tn{par} handling:
% \begin{macrocode}
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
}
@@ -2783,9 +2879,9 @@
%
% \begin{macro}{\@@_recipe_standalone:}
%
-% The \texttt{standalone} recipe produces a block that ensures that
-% a previous \texttt{text-unit} ends and that after the block a new
-% \texttt{text-unit} starts.
+% The \keyvalue{standalone} recipe produces a block that ensures that
+% a previous \struct{text-unit} ends and that after the block a new
+% \struct{text-unit} starts.
% \begin{macrocode}
\cs_new:Npn \@@_recipe_standalone: {
\cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w
@@ -2795,7 +2891,7 @@
\cs_set_eq:NN \__kernel_displayblock_begin: \@@_inner_begin:
\cs_set_eq:NN \__kernel_displayblock_end: \@@_inner_end:
% \end{macrocode}
-% End environment \cs{par} handling:
+% End environment \tn{par} handling:
% \begin{macrocode}
\socket_assign_plug:nn{tagsupport/block-endpe}{off}
% \end{macrocode}
@@ -2809,21 +2905,21 @@
% \end{macro}
%
% \begin{macro}{\@@_recipe_standard:}
-% The \texttt{standard} recipe does the following:
+% The \keyvalue{standard} recipe does the following:
% \begin{itemize}
-% \item surround the block with a \texttt{text-unit}-structure if not already in a
-% a \texttt{text-unit}. In the latter case end the
-% MC and the \struct{text} but leave the \texttt{text-unit} open.
+% \item surround the block with a \struct{text-unit} structure if not already in a
+% a \struct{text-unit}. In the latter case end the
+% MC and the \struct{text} but leave the \struct{text-unit} open.
%
% If we are producing flattened paragraphs, just close any
-% \struct{text} but do not open a \texttt{text-unit}.
+% \struct{text} but do not open a \struct{text-unit}.
%
% \item Then open an new (inner) structure (by default
-% \texttt{Figure} but typically the one specified on the instance).
+% \struct{Figure} but typically the one specified on the instance).
% \item At the end of the block close the inner structure
-% (\texttt{Figure} or explicit one)
-% but leave the \texttt{text-unit} open to be either continued or closed due to a
-% following \cs{par}.
+% (\struct{Figure} or explicit one)
+% but leave the \struct{text-unit} open to be either continued or closed due to a
+% following \tn{par}.
% \end{itemize}
% \begin{macrocode}
\cs_new:Npn \@@_recipe_standard:
@@ -2835,7 +2931,7 @@
\cs_set_eq:NN \__kernel_displayblock_begin: \@@_inner_begin:
\cs_set_eq:NN \__kernel_displayblock_end: \@@_inner_end:
% \end{macrocode}
-% End environment \cs{par} handling:
+% End environment \tn{par} handling:
% \begin{macrocode}
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
% \end{macrocode}
@@ -2859,7 +2955,7 @@
%
%
% \begin{macro}{\@@_recipe_list:}
-% The \texttt{list} recipe does the following.
+% The \keyvalue{list} recipe does the following.
% \begin{itemize}
% \item It opens a \struct{text-unit}-structure or keeps the current one open (only
% closing the MC).
@@ -2881,7 +2977,7 @@
\cs_set_eq:NN \__kernel_displayblock_end: \@@_list_end:
% \end{macrocode}
% The next two lines could be done globally, because they are only
-% called if we do have \cs{item}s, i.e., if we are in a list. It is
+% called if we do have \tn{item}s, i.e., if we are in a list. It is
% therefore also not necessary to reset them in other recipes
% (right now---this may change if we get more templates (like
% inline lists)).
@@ -2889,7 +2985,7 @@
\cs_set_eq:NN \__kernel_list_item_begin: \@@_list_item_begin:
\cs_set_eq:NN \__kernel_list_item_end: \@@_list_item_end:
% \end{macrocode}
-% End environment \cs{par} handling:
+% End environment \tn{par} handling:
% \begin{macrocode}
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
% \end{macrocode}
@@ -2906,28 +3002,580 @@
}
% \end{macrocode}
% \end{macro}
-
-
-
+%
+%
+%
+%
+% \section[Implementation of document-level block environments]
+% {Implementation of document-level block\\ environments}
+%
+% Most such environments are pretty simple: they take an optional
+% argument and call a \texttt{blockenv} instance to do the work. At
+% the end of environment we call \tn{endblockenv} to finish.
+%
+%
+% \subsection{Displayblock environments}
+%
+%
+% There are two basic block environment which are similar to
+% \LaTeXe{}'s \env{trivlist} except that there aren't degenerated
+% lists and thus have no hidden \tn{item} inside.
+%
+%
+% \begin{environment}{displayblock}
+%
+% \begin{macrocode}
+\NewDocumentEnvironment{displayblock}{ !O{} }
+ { \UseInstance{blockenv}{displayblock} {#1} }
+ { \endblockenv }
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{environment}{displayblockflattened}
+%
+% \begin{macrocode}
+\NewDocumentEnvironment{displayblockflattened}{ !O{} }
+ { \UseInstance{blockenv}{displayblockflattened} {#1} }
+ { \endblockenv }
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+%
+% \subsection{The \env{center}, \env{flushleft}, and \env{flushright} environments}
+%
+%
+%
+% \begin{environment}{center,flushleft,flushright}
+%
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{center} { !O{} }
+ { \UseInstance{blockenv}{center}{#1} }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{flushright} { !O{} }
+ { \UseInstance{blockenv}{flushright}{#1} }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{flushleft} { !O{} }
+ { \UseInstance{blockenv}{flushleft}{#1} }
+ { \endblockenv }
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \subsection{Display quote environments}
+%
+%
+% \begin{environment}{quote,quotation}
+%
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{quote}{ !O{} }
+ { \UseInstance{blockenv}{quote} {#1} }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{quotation}{ !O{} }
+ { \UseInstance{blockenv}{quotation} {#1} }
+ { \endblockenv }
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+%
+%
+%
+% \subsection{Verbatim environments}
+%
+%
+% \begin{environment}{verbatim,verbatim*}
+%
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{verbatim}{ !O{} }
+ { \UseInstance{blockenv}{verbatim} {#1}
+% \end{macrocode}
+% This is the part of the code where \env{verbatim}
+% and\env{verbatim*} differ.
+% \begin{macrocode}
+ \@setupverbinvisiblespace\frenchspacing\@vobeyspaces
+ \@xverbatim
+ }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{verbatim*}{ !O{} }
+ { \UseInstance{blockenv}{verbatim} {#1}
+ \@setupverbvisiblespace\frenchspacing\@vobeyspaces
+ \@sxverbatim
+ }
+ { \endblockenv }
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+%
+% \subsubsection{Helper commands for verbatim}
+%
+%
+% \begin{macro}{\legacyverbatimsetup}
+%
+% This code resembles the \LaTeXe{} verbatim implementation with a
+% slight twist: in \LaTeXe{} each code line was a paragraph using
+% \tn{leftskip}=\tn{@totalleftmargin}. This was possible because
+% the whole environment was implemented as a trivlist. As this is
+% no longer the case setting \tn{leftskip} would alter the layout
+% of a surrounding list. So instead we need to make sure that the
+% paragraph end is executed in a group so that any parshape setup
+% is preserved.
+% \begin{macrocode}
+%<@@=>
+\def\legacyverbatimsetup{%
+ \language\l at nohyphenation
+ \@tempswafalse
+ \def\par{%
+ \if at tempswa
+ \leavevmode \null {\@@par}\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode{\@@par}\penalty\interlinepenalty\fi
+ \fi}%
+ \let\do\@makeother \dospecials
+ \obeylines \verbatim at font \@noligs
+ \everypar \expandafter{\the\everypar \unpenalty}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \tl_set:Nn \l__tag_para_main_tag_tl {codeline}
+ \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code}
+}
+%<@@=block>
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@setupverbinvisiblespace}
+% In the \pdfTeX{} engine we need to use \tn{pdffakespace} chars
+% for the invisible spaces.
+% \begin{macrocode}
+\newcommand\@setupverbinvisiblespace{}
+\tag_if_active:T {
+ \bool_if:NF\g__tag_mode_lua_bool
+ {
+ \renewcommand\@setupverbinvisiblespace
+ {\def\@xobeysp{\nobreakspace\pdffakespace}}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsection{Standard list environments}
+%
+%
+% \begin{environment}{itemize,enumerate,description}
+%
+% For the standard lists everything is managed by the blockenv instance.
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{itemize}{!O{}}
+ { \UseInstance{blockenv}{itemize} {#1} }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{enumerate}{!O{}}
+ { \UseInstance{blockenv}{enumerate} {#1} }
+ { \endblockenv }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \RenewDocumentEnvironment{description}{!O{}}
+ { \UseInstance{blockenv}{description} {#1} }
+ { \endblockenv }
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \subsection{verse environment}
+%
+% \begin{environment}{verse}
+% The verse environment has not special tagging currently. It is
+% defined as a simple standard list and takes the tagging from there.
+% But it must be redefined so that \tn{itemindent} is correctly set.
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{verse}{ !O{} }
+ {
+ \let\\\@centercr
+ \UseInstance{blockenv}{list}
+ {
+ item-indent=-1.5em,
+ parindent=-1.5em,
+ item-skip=0pt,
+ rightmargin=\leftmargin,
+ leftmargin=\leftmargin+1.5em,
+ #1
+ }
+ \item\relax
+ }
+ { \endblockenv }
+ }
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \begin{environment}{list}
+%
+% The legacy 2e list environment is more complicated as we have to get the
+% extra arguments accounted for.
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{list}{O{} m m }
+ {
+% \end{macrocode}
+% We do this by storing them away and then call the list
+% instance. Inside this instance the \key{setup-code} key
+% contains \tn{legacylistsetupcode}, which makes use of the stored values.
+% \changes{v0.8v}{2024/10/11}{Update \tn{@itemlabel} in
+% \cs{l_@@_legacy_env_params_tl} and not at the start of the
+% environment (tagging/730)}
+% \begin{macrocode}
+ \tl_set:Nn \l_@@_legacy_env_params_tl
+ {
+ \tl_set:Nn \@itemlabel {#2}
+ #3
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \UseInstance{blockenv}{list} {#1}
+ }
+ { \endblockenv }
+}
+% \end{macrocode}
+%
+% \end{environment}
+%
+%
+%
+% \begin{macro}{\legacylistsetupcode}
+%
+% And here is the extra code for use in the list instance setup
+% inside the key \key{setup-code}.
+% \begin{macrocode}
+\cs_new:Npn \legacylistsetupcode {
+% \end{macrocode}
+% Reset values to defaults:
+% \begin{macrocode}
+ \dim_zero:N \listparindent
+ \dim_zero:N \rightmargin
+ \dim_zero:N \itemindent
+% \end{macrocode}
+%
+% 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 \tn{@itemlabel},
+% \tn{@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
+% \end{macrocode}
+% By default there is a simple definition for \tn{makelabel}. It can be
+% overwritten in the second mandatory argument to the list
+% environment (stored in \cs{l_@@_legacy_env_params_tl}) and
+% is used if the instance sets the compatibility key to true.
+% \begin{macrocode}
+ \let\makelabel\@mklab % TODO: customize
+% \end{macrocode}
+% Now we use the argument with parameter settings to update some or
+% all of the above defaults:
+% \begin{macrocode}
+ \l_@@_legacy_env_params_tl
+% \end{macrocode}
+% As we don't know much about this list we can only make a guess about
+% the nature of the list and the setting of the tag name (default
+% \keyvalue{list} rolemapped to \struct{L}) and any tag attributes
+% may have to be overwritten in the optional key/value argument.
+% But we do have some hints to play with.
+% \begin{macrocode}
+ \legacy_if:nTF { @nmbrlist }
+ { \tl_set:Nn \l__tag_L_attr_class_tl {enumerate} } % numbered list
+ { \tl_if_empty:NTF \@itemlabel
+ { \tl_set:Nn \l__tag_L_attr_class_tl {list} } % no label
+ { \tl_set:Nn \l__tag_L_attr_class_tl {itemize} } % unnumbered,
+ % unordered
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\l_@@_legacy_env_params_tl}
+%
+% \begin{macrocode}
+\tl_new:N\l_@@_legacy_env_params_tl
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{environment}{trivlist}
+% \fmi{Replace with code not using \tn{list}}
+% \begin{macrocode}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{trivlist}{ !O{} }
+ { \list[#1]{}
+ {
+ \dim_zero:N \leftmargin
+ \dim_zero:N \labelwidth
+ \cs_set_eq:NN \makelabel \use:n
+ }
+ }
+ { \endblockenv }
+}
+% \end{macrocode}
+% \end{environment}
+%
+%
+% \subsection{Theorem-like environments}
+%
+% Theorem-like environments are defined in \LaTeX{} with the help of
+% \tn{newtheorem} declarations. Internally they used a list with a
+% single item. Using lists was convenient back then, but in a tagged
+% document you end up with a strange structure. We therefore alter the
+% mechanism.
+%
+%
+% \begin{macro}{\newtheorem}
+% This is a slightly streamlined version of \tn{newtheorem}, but it
+% still uses a lot of the 2e code for now. Eventually this will change.
+% \begin{macrocode}
+\RenewDocumentCommand \newtheorem { m O{#1} m o }
+{
+ \expandafter\@ifdefinable\csname #1\endcsname
+ {
+ \str_if_eq:nnTF{#1}{#2}
+ {
+ \@definecounter {#2}
+ \IfNoValueTF {#4}
+ { % @ynthm
+ \tl_gset:ce { the #2 }
+ {
+ \@thmcounter{#2}
+ }
+ }
+ { % @xnthm
+ \@newctr{#1}[#4]
+ \tl_gset:ce { the #2 }
+ {
+ \expandafter\noexpand\csname the#4\endcsname
+ \@thmcountersep
+ \@thmcounter{#2}
+ }
+ }
+ }
+ { % @othm
+ \@ifundefined{c@#2}
+ { \@nocounterr{#2} }
+ {
+ \tl_gset:cn { the #1 }
+ { \UseName { the #2 } }
+ }
+ }
+ \global\@namedef{#1} { \@thm{#2}{#3} }
+ \global\@namedef{end#1}{ \@endtheorem }
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@thm}
+% \tn{@thm} executes \tn{refstepcounter} too early for hyperref
+% and structure destinations: the generated target is outside the structure
+% and can be separated from the theorem by a page break. We therefore move
+% the anchor setting into \tn{@begintheorem}. \tn{@begintheorem} doesn't
+% currently get the name of the counter as argument, so we store it in variable
+% for now, to be able to pass it along.
+% \begin{macrocode}
+\tl_new:N \l_@@_thm_current_counter_tl
+\def\@thm#1#2{%
+ \@kernel at refstepcounter{#1}
+ \tl_set:Nn \l_@@_thm_current_counter_tl{#1}
+ \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
+% \end{macrocode}
+% To avoid that hyperref overwrites the definition again we must its patch:
+% \begin{macrocode}
+\def\hyper at nopatch@thm{}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@begintheorem,\@opargbegintheorem}
+%
+% The \tn{@thm} command expands to either \tn{@beginthorem} or
+% \tn{@opargbegintheorem}. For the moment we stick with this as it
+% will help with the transition. But instead of using a
+% \env{trivlist} we use a blockenv and some tagging for the title
+% (as a Caption).
+% We do not want potential tagging from \tn{textbf} here,
+% so we use \tn{bfseries} to set the font. The commands set also the link targets
+% which should be inside the main structure.
+% \begin{macrocode}
+\def\@begintheorem#1#2{
+ \UseInstance{blockenv}{theorem}{}
+ \tagpdfparaOff
+% \end{macrocode}
+%
+% \changes{v0.8w}{2024/11/23}{\LaTeXe{} theorems always start out
+% without indentation (tagging/767)}
+% \begin{macrocode}
+ \noindent
+ \MakeLinkTarget{\l_@@_thm_current_counter_tl}
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n {}
+ #2
+ \tag_mc_end:
+ \tag_struct_end:
+ \group_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@@_start_para_structure_unconditionally:n { \PARALABEL }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \itshape
+ \hskip\labelsep
+ \ignorespaces
+}
+\def\@opargbegintheorem#1#2#3{
+ \UseInstance{blockenv}{theorem}{}
+ \tagpdfparaOff
+% \end{macrocode}
+%
+% \changes{v0.8w}{2024/11/23}{\LaTeXe{} theorems always start out
+% without indentation (tagging/767)}
+% \begin{macrocode}
+ \noindent
+ \MakeLinkTarget{\l_@@_thm_current_counter_tl}
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n {}
+ #2
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin:n {}
+ \ (#3)
+ \tag_mc_end:
+ \group_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \@@_start_para_structure_unconditionally:n { \PARALABEL }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \itshape
+ \hskip\labelsep
+ \ignorespaces
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@endtheorem{\endblockenv}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \section{Instance declarations for environments}
+%
% \subsection{Blockenv instances}
%
+% The blockenv instances handle overall setup for the document-level
+% environments, i.e.,
+% \begin{itemize}
+% \raggedright
+% \item name of the environment for debugging purposes (\key{env-name})
+% \item how tagging should be performed (\key{tagging-recipe},
+% \key{tag-name}, \key{tag-class})
+% \item does this environment changes the block level if nested
+% (\key{level-increase})
+% \item any special setup code; normally not used (\key{setup-code})
+% \item what kind of block instance should be used (\key{block-instance})
+% \item what kind of para instance should be used; empty means
+% inherit from the outside (\key{para-instance})
+% \item are inner paragraphs real paragraphs (default) or are they
+% just \struct{text} structures and part of an outer
+% paragraph (\key{para-flattened})
+% \item what kind of inner instance should be used, if any
+% (\key{inner-instance}, \key{inner-instance-type})
+% \item the counter name of the inner level, if any (\key{inner-level-counter})
+% \item supported nesting depth of the inner level, if relevant
+% (\key{max-inner-levels})
+% \item extra code executed at the end, by default \tn{ignorespaces}
+% (\key{final-code})
+% \end{itemize}
+% The blockenv displayblock instance below shows the full set with
+% those using default values being commented out.
%
% \subsubsection{Basic instances}
%
+%
% \begin{instance}{blockenv displayblock}
-%
+% This is like \LaTeXe{}'s \env{trivlist}, i.e., it produces a
+% vertical block with default setting, but doesn't put a list
+% inside but uses a \struct{Figure} structure.
+% \fmi{should this really generate a /Figure structure?}
% \begin{macrocode}
\DeclareInstance{blockenv}{displayblock}{display}
{
env-name = displayblock,
- tag-name = ,
- tag-class = ,
- tagging-recipe = standard,
- inner-level-counter = ,
+% tagging-recipe = standard,
+% tag-name = ,
+% tag-class = ,
level-increase = false,
- setup-code = ,
- block-instance = displayblock ,
- inner-instance = ,
+% setup-code = ,
+% block-instance = displayblock ,
+% para-instance = ,
+% para-flattened = false ,
+% inner-instance = ,
+% inner-instance-type = list , % not relevant as there is no inner instance
+% inner-level-counter = , % not relevant as there is no inner instance
+% max-inner-levels = 4, % not relevant as there is no inner instance
+% final-code = \ignorespaces ,
}
% \end{macrocode}
% \end{instance}
@@ -2934,8 +3582,10 @@
%
%
%
+%
% \begin{instance}{blockenv displayblockflattened}
-%
+% This flattens inner paragraphs without any surrounding tag
+% structure by using the \keyvalue{basic} tagging recipe.
% \begin{macrocode}
\DeclareInstance{blockenv}{displayblockflattened}{display}
{
@@ -2955,8 +3605,15 @@
%
%
%
+%
+%
+% \subsubsection{Center, flushleft, and flushright instances}
+%
+% All three environments use the \texttt{displayblock} instance as
+% block instance. They only differ in the choice of para instance.
+%
% \begin{instance}{blockenv center}
-%
+% The \env{center} environment without using a list internally.
% \begin{macrocode}
\DeclareInstance{blockenv}{center}{display}
{
@@ -2977,7 +3634,7 @@
%
%
% \begin{instance}{blockenv flushleft}
-%
+% The \env{flushleft} environment without using a list internally.
% \begin{macrocode}
\DeclareInstance{blockenv}{flushleft}{display}
{
@@ -3000,6 +3657,7 @@
%
% \begin{instance}{blockenv flushright}
%
+% The \env{flushright} environment without using a list internally.
% \begin{macrocode}
\DeclareInstance{blockenv}{flushright}{display}
{
@@ -3020,10 +3678,18 @@
%
%
%
+%
% \subsubsection{Blockquote instances}
%
+
+% \LaTeXe{} has two environments for quoting: \env{quote} and
+% \env{quoation}. By default they differ only in indentation of inner
+% paragraphs. This is handled by using separate block instances.
+%
+% The tag names are both roll-mapped to \struct{BlockQuote}.
+%
% \begin{instance}{blockenv quotation}
- %
+% For the \env{quotation} environment:
% \begin{macrocode}
\DeclareInstance{blockenv}{quotation}{display}
{
@@ -3043,7 +3709,7 @@
%
%
% \begin{instance}{blockenv quote}
-%
+% For the \env{quote} environment:
% \begin{macrocode}
\DeclareInstance{blockenv}{quote}{display}
{
@@ -3060,44 +3726,18 @@
% \end{macrocode}
% \end{instance}
%
-% An alternative setup for quotations, using the displayblock instance and
-% just overwrite a bit in the setup code.\fmi{I guess the setup
-% code is still executed too early, have to check.}
-% This would be less flexible but would ensure visual consistency,
-% because the displayblock settings are used throughout.
-% \begin{macrocode}
-% \DeclareInstance{blockenv}{quotation}{display}
-% {
-% env-name = quotation,
-% tag-name = ,
-% tag-class = ,
-% tagging-recipe = blockquote,
-% inner-level-counter = ,
-% level-increase = true,
-% setup-code = \setlength\rightmargin{\leftmargin}
-% \setlength\parsep{1.5em} ,
-% block-instance = displayblock ,
-% inner-instance = ,
-% }
-% \end{macrocode}
+%
+%
+% \subsubsection{The theorem instance}
+%
+% \begin{instance}{blockenv theorem}
%
-% \begin{macrocode}
-% \DeclareInstance{blockenv}{quote}{display}
-% {
-% env-name = quote,
-% tag-name = ,
-% tag-class = ,
-% tagging-recipe = blockquote,
-% inner-level-counter = ,
-% level-increase = true,
-% setup-code = \setlength\rightmargin{\leftmargin} ,
-% block-instance = displayblock ,
-% inner-instance = ,
-% }
-% \end{macrocode}
+% We use \struct{theorem-like} as the structure name and rolemap it
+% to a \struct{Sect} because that can hold a \struct{Caption}.
%
-
%
+% \changes{v0.8w}{2024/11/23}{Theorems use their own block-instance
+% and not displayblock to allow for customization (tagging/767)}
% \begin{macrocode}
\DeclareInstance{blockenv}{theorem}{display}
{
@@ -3108,21 +3748,20 @@
inner-level-counter = ,
level-increase = false,
setup-code = ,
- block-instance = displayblock ,
-% inner-instance-type = innerblock ,
-% inner-instance = theorem,
+ block-instance = theoremblock ,
}
% \end{macrocode}
+% \end{instance}
%
-% We use \struct{theorem-like} as the structure name and rolemap it
-% to a \struct{Sect} because that can hold a \struct{Caption}.
%
-% \subsubsection{Verbatim instances}
%
+% \subsubsection{The verbatim instance}
+%
% \begin{instance}{blockenv verbatim}
%
-% The rolemapping is current verbatim to P and codeline to Sub (which is role mapped
-% to Span in pdf 1.7. Alternatives for PDF 1.7: Div and P.
+% The rolemapping is currently \struct{verbatim} to \struct{P} and
+% \struct{codeline} to \struct{Sub} (which is role mapped
+% to \struct{Span} in pdf 1.7. Alternatives for PDF 1.7: \struct{Div} and \struct{P}.
%
% \begin{macrocode}
\DeclareInstance{blockenv}{verbatim}{display}
@@ -3146,7 +3785,7 @@
% \subsubsection{Standard list instances}
%
% \begin{instance}{blockenv itemize}
-%
+% For the \env{itemize} environment:
% \begin{macrocode}
\DeclareInstance{blockenv}{itemize}{display}
{
@@ -3167,6 +3806,7 @@
%
% \begin{instance}{blockenv enumerate}
%
+% For the \env{enumerate} environment:
% \begin{macrocode}
\DeclareInstance{blockenv}{enumerate}{display}
{
@@ -3187,6 +3827,7 @@
%
% \begin{instance}{blockenv description}
%
+% For the \env{description} environment:
% \begin{macrocode}
\DeclareInstance{blockenv}{description}{display}
@@ -3207,7 +3848,7 @@
%
% \begin{instance}{blockenv list}
% The general (legacy) \env{list} environment does some of its
-% setup in the \texttt{setup-code} key.
+% setup in the \key{setup-code} key.
% \begin{macrocode}
\DeclareInstance{blockenv}{list}{display}
{
@@ -3229,12 +3870,18 @@
%
% \subsection{Block instances}
%
+% Below, we declare the different block instances for the
+% document-level environments. Some, such as the displayblock ones
+% are shared between different environments (as long as one doesn't
+% need to adjust individual values), other environments have their
+% own instances (for precisely that reason).
+%
% \subsubsection{Displayblock instances}
%
% We provide 6 nesting levels (as in \LaTeXe{}). If you want to
% provide more you need to change the \texttt{maxblocklevels}
% counter, offer further \texttt{displayblock-xx} instances but
-% also define further (legacy) \cs{list\meta{romannumeral}} commands
+% also define further (legacy) \tn{list\meta{romannumeral}} commands
% for the defaults. If not, then the settings from the previous
% level are reused automatically---which may or may not be good enough).
% \begin{macrocode}
@@ -3251,11 +3898,24 @@
%
% Here we need level zero as well in case a flattened displayblock
% (like the center env) it is used on top-level.
+%
+% We show all keys here for reference, with those using their
+% default values commented out:
% \begin{macrocode}
\DeclareInstance{block}{displayblock-0}{display}
{
+% heading = , %??
+% beginsep = \topsep ,
+% begin-par-skip = \partopsep ,
+% par-skip = \parsep ,
+% end-skip = \KeyValue{beginsep} ,
+% end-par-skip = \KeyValue{begin-par-skip} ,
+% item-skip = \itemsep ,
+% beginpenalty = \UseName{@beginparpenalty} ,
+% endpenalty = \UseName{@endparpenalty} ,
leftmargin = 0pt ,
- parindent = 0pt ,
+% rightmargin = \rightmargin ,
+% parindent = 0pt ,
}
% \end{macrocode}
%
@@ -3288,7 +3948,6 @@
\DeclareInstance{block}{verbatimblock-0}{display}
{
leftmargin = 0pt ,
- parindent = 0pt ,
par-skip = 0pt ,
}
% \end{macrocode}
@@ -3356,6 +4015,26 @@
% \end{instance}
%
%
+% \subsubsection{Block instances for the theorems}
+%
+%
+% \begin{instance}{block theoremblock-0}
+% Theorems do not support nesting, so we have only one to set up.
+% The \LaTeX{} default reused the general value of \tn{parindent}
+% and \tn{parskip} and, of course, they start at the outer margin.
+% \changes{v0.8w}{2024/11/23}{Add block instance for theorems}
+% \begin{macrocode}
+\DeclareInstance{block}{theoremblock-0}{display}
+ {
+ leftmargin = 0pt ,
+ parindent = \parindent ,
+ par-skip = \parskip ,
+ }
+% \end{macrocode}
+% \end{instance}
+%
+%
+%
% \subsubsection{Block instances for the standard lists}
%
% \begin{instance}{block list-1,
@@ -3365,13 +4044,13 @@
% block list-5,
% block list-6 }
% The block instances for the various list environments use the
-% same underlying instance (well by default) and nothing
+% same underlying instance (well, by default) and nothing
% needs to be set up specifically (because that is already done in
-% the legacy \cs{list\meta{romannumeral}} unless a
+% the legacy \tn{list\meta{romannumeral}} unless a
% different layout is wanted.
% \begin{macrocode}
\DeclareInstance{block}{list-1}{display}{
-% heading = ,
+% heading = , % unused, might vanish
% beginsep = \topsep ,
% begin-par-skip = \partopsep ,
% par-skip = \parsep ,
@@ -3381,7 +4060,7 @@
% endpenalty = \UseName{@endparpenalty} ,
% leftmargin = \leftmargin ,
% rightmargin = \rightmargin ,
-% parindent = \listparindent ,
+% parindent = 0pt ,
}
\DeclareInstance{block}{list-2}{display}{}
\DeclareInstance{block}{list-3}{display}{}
@@ -3396,7 +4075,7 @@
% \subsection{List instances for the standard lists}
%
% For all list instances we have to say what kind of label we want
-% (\texttt{label-instance}) and how it should be formatted.
+% (\key{item-label}) and how it should be formatted.
%
% \begin{instance}{list itemize-1,
% list itemize-2,
@@ -3404,7 +4083,7 @@
% list itemize-4}
% For \env{itemize} environments this is all we need to do and we
% refer back to the external definitions rather than defining the
-% \texttt{item-label} code in the instance to ensure that old
+% \key{item-label} code in the instance to ensure that old
% documents still work.
%
% \begin{macrocode}
@@ -3422,7 +4101,7 @@
% list enumerate-3,
% list enumerate-4}
% \env{enumerate} environments are similar, except that we also
-% have to say which counter to use on every level.
+% have to say which counter to use on each level.
% \begin{macrocode}
\DeclareInstance{list}{enum-1}{std}
{ item-label = \labelenumi , counter = enumi }
@@ -3442,8 +4121,8 @@
% which is reused on all levels. This is done this way one because
% the legacy \env{list} environment sets all its
% parameters through its arguments. So this instances shouldn't
-% really be touched. It sets the \texttt{legacy-support} key to
-% true, which means that the list code uses \cs{makelabel} for
+% really be touched. It sets the \key{legacy-support} key to
+% true, which means that the list code uses \tn{makelabel} for
% formatting the label
% \begin{macrocode}
\DeclareInstance{list}{legacy}{std} {
@@ -3467,14 +4146,12 @@
%
%
% \begin{instance}{item basic, item description}
-% There two item instances set up: \texttt{description} for use
-% with the \env{description} environment and \texttt{basic} for use
+% There two item instances set up: \keyvalue{description} for use
+% with the \env{description} environment and \keyvalue{basic} for use
% with all other lists (up to now).
% \begin{macrocode}
\DeclareInstance{item}{basic}{std}
- {
- label-align = right ,
- }
+ { label-align = right }
% \end{macrocode}
%
% \begin{macrocode}
@@ -3507,56 +4184,64 @@
% \begin{macrocode}
\DeclareInstance{para}{center}{std}
{
+ para-class = center ,
indent-width = 0pt ,
- start-skip = 0pt ,
+% start-skip = 0pt ,
left-skip = \@flushglue ,
right-skip = \@flushglue ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = center ,
}
% \end{macrocode}
+% \end{instance}
%
+% \begin{instance}{para raggedright}
% \begin{macrocode}
\DeclareInstance{para}{raggedright}{std}
{
+ para-class = raggedright ,
indent-width = 0pt ,
- start-skip = 0pt ,
+% start-skip = 0pt ,
left-skip = \z at skip ,
right-skip = \@flushglue ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = raggedright ,
}
% \end{macrocode}
+% \end{instance}
%
+% \begin{instance}{para raggedleft}
% \begin{macrocode}
\DeclareInstance{para}{raggedleft}{std}
{
+ para-class = raggedleft ,
indent-width = 0pt ,
- start-skip = 0pt ,
+% start-skip = 0pt ,
left-skip = \@flushglue ,
right-skip = \z at skip ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = raggedleft ,
}
% \end{macrocode}
+% \end{instance}
%
+% \begin{instance}{para justify}
+% Justifying is exactly what the default values do, so the instance
+% hasn't any special setup.
% \begin{macrocode}
\DeclareInstance{para}{justify}{std}
{
-% indent-width = 0pt ,
- start-skip = 0pt ,
- left-skip = \z at skip ,
- right-skip = \z at skip ,
- end-skip = \@flushglue ,
- final-hyphen-demerits = 5000 ,
- cr-cmd = \@normalcr ,
- para-class = justify ,
+% para-class = justify ,
+% indent-width = \parindent ,
+% start-skip = 0pt ,
+% left-skip = \z at skip ,
+% right-skip = \z at skip ,
+% end-skip = \@flushglue ,
+% final-hyphen-demerits = 5000 ,
+% cr-cmd = \@normalcr ,
}
% \end{macrocode}
% \end{instance}
@@ -3564,557 +4249,24 @@
%
%
%
+% \begin{macro}[no-user-doc]{\centering,\raggedleft,\raggedright,\justifying}
+%
% \begin{macrocode}
\DeclareRobustCommand\centering {\UseInstance{para}{center}{}}
\DeclareRobustCommand\raggedleft {\UseInstance{para}{raggedleft}{}}
\DeclareRobustCommand\raggedright{\UseInstance{para}{raggedright}{}}
\DeclareRobustCommand\justifying {\UseInstance{para}{justify}{}}
-
-\justifying
% \end{macrocode}
-%
-%
-%
-%
-%
-% \subsection{Tagging support}
-%
-% In this section we provide code to the various kernel hooks to support
-% the tagging of the different displayblock environments.
-%
-% All of the following definitions should only be made if tagging
-% is active!
-% \begin{macrocode}
-\tag_if_active:TF {
-% \end{macrocode}
-%
-% \begin{macro}{\@@_beginpar_vmode:}
-% When a block starts out in vertical mode, i.e., is not yet part of
-% a paragraph, we have to start a paragraph
-% structure. However, this is not the case if we are already
-% flattening paragraphs, thus in this case we do nothing.
-% We also do nothing if \texttt{@endpe} is currently true, because
-% that means we are right now just after the end of a
-% \texttt{blockenv} and in the process of looking if we have to end
-% the current \texttt{text-unit}, i.e., it is already open.
-% \begin{macrocode}
- \cs_set:Npn \@@_beginpar_vmode: {
- \@@_debug_typeout:n
- { @endpe = \legacy_if:nTF { @endpe }{true}{false}
- \on at line }
- \legacy_if:nTF { @endpe }
- {
- \legacy_if_gset_false:n { @endpe }
- }
-% \end{macrocode}
-% We test for \texttt{<2} because the first flattened environment
-% has to surround itself with a \texttt{text-unit}. Only any inner ones
-% then have to avoid adding another \texttt{text-unit}.
-% \begin{macrocode}
- {
- \int_compare:nNnT \l__tag_block_flattened_level_int < 2
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- }
- }
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_beginpar_hmode:N}
-% If the block is already part of a part of a paragraph, i.e., when it has
-% some text directly in front, then the first thing to
-% do is to return to vertical mode. However, that should be done
-% without inserting a paragraph end tag, so before calling \cs{par}
-% to do its normal work, we disable paragraph tagging and
-% restarting afterwards again. The argument to this config point
-% simply gobbles the \cs{par} following it in the code above (which
-% is used when there is no tagging going on.
-% \begin{macrocode}
- \cs_set:Npn \@@_beginpar_hmode:N #1
- {
- \tag_mc_end:
- \__tag_gincr_para_end_int:
- \@@_debug_typeout:n{increment~ /P \on at line }
- \bool_if:NT \l__tag_para_show_bool
- { \tag_mc_begin:n{artifact}
- \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int}
- \tag_mc_end:
- }
- \tag_struct_end:
- \tagpdfparaOff \par \tagpdfparaOn
- }
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\__kernel_displayblock_doendpe:}
-% If a display block ends and is followed by a blank line we have to end the
-% enclosing paragraph tagging structure.
-% \begin{macrocode}
-\cs_set:Npn \__kernel_displayblock_doendpe: {
- \bool_if:NT \l__tag_para_bool
- {
-% \end{macrocode}
-% Given that restoring \cs{par} through the legacy \LaTeXe{} method
-% can take a few iterations (for example, in case of nested lists,
-% e.g., \verb=...\end{itemize} \item ...\par= it can happen that
-% \cs{__kernel_displayblock_doendpe:} is called while
-% \texttt{@endpe} is already handled and then we should not attempt
-% to close a \texttt{text-unit} structure). So we need to check for this.
-% \begin{macrocode}
- \legacy_if:nT { @endpe }
- {
-% \end{macrocode}
-% If the display block currently ending was \enquote{flattened}
-% (i.e., uses simplified paragraphs that are not tagged by a
-% combination of \texttt{text-unit} followed by \struct{text}, but simply
-% with a \struct{text}),
-% then we don't have to do anything, because the \struct{text} is already closed.
-% \begin{macrocode}
- \@@_debug_typeout:n
- { flattened= \bool_if:NTF
- \l__tag_para_flattened_bool {true}{false}
- \on at line }
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \@@_debug_typeout:n{Structure-end~
- \l__tag_para_main_tag_tl\space after~ displayblock \on at line }
- \__tag_gincr_para_main_end_int:
- \tag_struct_end: %text-unit
- }
- }
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{para/begin}
-%
-% Paragraph tagging is mainly done using the paragraph hooks (will
-% get moved eventually). The default hook setting is not good
-% enough when lists get supported: we need to delay starting the
-% paragraph tagging if we still have to place the list label.
-% We therefore remove the existing hook data and replace it with an
-% augmented version (this will get combined eventually).
-% \begin{macrocode}
-\RemoveFromHook{para/begin}[tagpdf]
-% \end{macrocode}
-%
-% \begin{macrocode}
-\AddToHook{para/begin}[tagpdf]{
- \bool_if:NT \l__tag_para_bool {
-% \end{macrocode}
-% if we are still waiting to typeset the list label we do nothing
-% (the paragraph tagging then happens when the list is finally
-% typeset).
-% \begin{macrocode}
- \legacy_if:nF { @inlabel }
- {
-% \end{macrocode}
-% Otherwise, we start a \struct{text} tag structure but only if we are not
-% starting a paragraph immediately \emph{after} a list, in which
-% case we only start a new MC (because the \struct{text} tag is still open from
-% before the list --- one of the reasons why lists are always put
-% \enquote{inside} paragraphs.
-%
-% We do this in a separate command, because it is needed elsewhere too.
-% \begin{macrocode}
- \@@_start_para_structure:n { \PARALABEL }
- }
- }
-}
-% \end{macrocode}
%
-%
-% \begin{macro}{\@@_start_para_structure:n}
-%
% \begin{macrocode}
-\cs_new_protected:Npn \@@_start_para_structure:n #1 {
- \@@_debug_typeout:n
- { @endpe = \legacy_if:nTF { @endpe }{true}{false}
- \on at line }
- \legacy_if:nF { @endpe }
- {
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- }
- \__tag_gincr_para_begin_int:
- \@@_debug_typeout:n{increment~ P \on at line }
- \tag_struct_begin:n
- {
- tag=\l__tag_para_tag_tl
- ,attribute-class=\l__tag_para_attr_class_tl
- }
- \__tag_check_para_begin_show:nn {green}{#1}
- \tag_mc_begin:n {}
-}
+\justifying
% \end{macrocode}
-% The same code, but without testing \texttt{@endpe}. This is not
-% needed in the standalone case and wrong inside lists.
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_start_para_structure_unconditionally:n #1 {
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- \__tag_gincr_para_begin_int:
- \@@_debug_typeout:n{increment~ P \on at line }
- \tag_struct_begin:n
- {
- tag=\l__tag_para_tag_tl
- ,attribute-class=\l__tag_para_attr_class_tl
- }
- \__tag_check_para_begin_show:nn {green}{#1}
- \tag_mc_begin:n {}
-}
-% \end{macrocode}
% \end{macro}
-%
-% \begin{macrocode}
-\RemoveFromHook{para/end}[tagpdf]
-\AddToHook{para/end}
- {
- \bool_if:NT \l__tag_para_bool
- {
- \__tag_gincr_para_end_int:
- \@@_debug_typeout:n{increment~ /P \on at line }
- \tag_mc_end:
- \__tag_check_para_end_show:nn {red}{}
- \tag_struct_end:
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_end_int:
- \tag_struct_end:
- }
- }
- }
-% \end{macrocode}
%
-% \begin{macrocode}
-\def\PARALABEL{NP-}
-% \end{macrocode}
-% \end{macro}
%
%
-% \begin{macro}{\para_end:}
-% If we see a \cs{par} in vmode and a \texttt{text-unit} is still open
-% we need to close that. For this we check if a request for
-% \text{@endpe} was made (but the \cs{par} redefinition got lost
-% due to (bad?) coding).
-% \begin{macrocode}
-\cs_set_protected:Npn \para_end: {
- \scan_stop:
- \mode_if_horizontal:TF {
- \mode_if_inner:F {
- \tex_unskip:D
- \hook_use:n{para/end}
- \@kernel at after@para at end
- \mode_if_horizontal:TF {
- \if_int_compare:w 11 = \tex_lastnodetype:D
- \tex_hskip:D \c_zero_dim
- \fi:
- \tex_par:D
- \hook_use:n{para/after}
- \@kernel at after@para at after
- }
- { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} }
- }
- }
- {
- \__kernel_endpe_vmode: % should do nothing if no tagging
- \tex_par:D
- }
-}
-\cs_set_eq:NN \par \para_end:
-\cs_set_eq:NN \@@par \para_end:
-\cs_set_eq:NN \endgraf \para_end:
-% \end{macrocode}
-%
-% \end{macro}
-%
-%
-% \begin{macro}{\begin}
-% We need to do a little more than canceling \texttt{@endpe} now.
-% \begin{macrocode}
-\DeclareRobustCommand*\begin[1]{%
- \UseHook{env/#1/before}%
- \@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}%
- \@execute at begin@hook{#1}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup
- \__kernel_endpe_vmode:
- \reserved at a}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\__kernel_endpe_vmode:}
-% Close an open \texttt{text-unit} if \texttt{@endpe} is true and we
-% are in vmode. Used in \cs{para_end:} and \cs{begin}.
-% \begin{macrocode}
-\cs_new:Npn \__kernel_endpe_vmode: {
- \if at endpe \ifvmode
- \bool_if:NT \l__tag_para_bool
- {
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_end_int:
- \tag_struct_end:
- }
- \@endpefalse
- }
- \fi \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\__kernel_list_label_after:}
-% If starting the text-unit/text tags got delayed because of a pending label we
-% have to do it after the label got typeset
-% \begin{macrocode}
-\cs_set:Npn \__kernel_list_label_after: {
- \bool_if:NT \l__tag_para_bool
- {
- \@@_start_para_structure_unconditionally:n { LI- }
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_inner_begin:}
-% Start a block that has an inner structure if it isn't also a list.
-% \begin{macrocode}
-\cs_new:Npn \@@_inner_begin: {
- \tagstructbegin{tag=\l_@@_tag_inner_tag_tl}
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@_inner_end:}
-% End a block (which isn't also a list).
-% \begin{macrocode}
-\cs_new:Npn \@@_inner_end: {
- \@@_debug_typeout:n{block-end \on at line}
- \legacy_if:nT { @endpe }
- {
- \__tag_gincr_para_main_end_int:
- \@@_debug_typeout:n{close~ /text-unit \on at line}
- \tagstructend
- }
- \tagstructend % end inner structure
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-%
-%
-% \subsubsection{List tags}
-%
-%
-% \begin{macrocode}
-\tl_new:N \l__tag_L_tag_tl
-\tl_set:Nn \l__tag_L_tag_tl {L}
-
-\tl_new:N\l__tag_L_attr_class_tl
-\tl_set:Nn \l__tag_L_attr_class_tl {list}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\tag_if_active:T
-{
- \tagpdfsetup
- {
- role/new-attribute = {itemize}{/O /List /ListNumbering/Unordered},
- role/new-attribute = {enumerate}{/O /List /ListNumbering/Ordered},
- role/new-attribute = {description}{/O /List /ListNumbering/Description},
-% \end{macrocode}
-% Initially, we had \texttt{/None} for the basic \env{list}
-% environment, but that is not allowed in PDF/UA-2 if the list
-% contains any Lbl tags. So now we default to
-% \texttt{Unordered}.
-% \begin{macrocode}
- % default if unknown
- role/new-attribute = {list}{/O /List /ListNumbering/Unordered},
- }
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\LItag{LI}
-% \end{macrocode}
-%
-% \begin{macro}{\@@_list_begin:}
-% Start a list \ldots
-% \begin{macrocode}
-\cs_set:Npn \@@_list_begin: {
- \tagstructbegin
- {
- tag=\l__tag_L_tag_tl
- ,attribute-class=\l__tag_L_attr_class_tl
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@@_list_item_begin:}
-% Start tagging a list item.
-% \begin{macrocode}
-\cs_set:Npn \@@_list_item_begin: { \tagstructbegin{tag=\LItag} }
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\__kernel_list_label_begin:}
-% A list label needs a \texttt{Lbl} structure tag and an MC.
-% \begin{macrocode}
-\cs_set:Npn \__kernel_list_label_begin: {
-%
-% FMi: this needs a different logic to decide when to make the label
-% an artifact (after cleaning up the \item code ), therefore
-% disabled for now
-% \tl_if_empty:oTF \@itemlabel
-% {
-% \tag_mc_begin:n {artifact}
-% }
-% {
- \tagstructbegin{tag=Lbl}
- \tagmcbegin{tag=Lbl}
-% }
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\__kernel_list_label_end:}
-% And when we are done with the label we have to close the MC and
-% the \texttt{Lbl} structure. We then start the \texttt{LBody}. The
-% material inside will be \enquote{paragraph} text and the tagging
-% for that is handled by the normal para tagging.
-% \begin{macrocode}
-\cs_set:Npn \__kernel_list_label_end: {
- \tagmcend % end mc-Lbl or artifact
-% FMi: unconditionally for now
-% \tl_if_empty:oF \@itemlabel
- \tagstructend % end Lbl
- \tagstructbegin{tag=\LBody}
-}
-\def\LBody{LBody}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\@@_list_item_end:}
-% When a list item ends we have to close \texttt{LBody} and
-% \texttt{LI} but also a \struct{text} in the special case that the
-% item material ends in a list (identifiable via \texttt{@endpe}).
-% \begin{macrocode}
-\cs_set:Npn \@@_list_item_end: {
- \legacy_if:nT { @endpe }
- {
- \__tag_gincr_para_main_end_int:
- \tagstructend % text-unit
-% \@@_debug_typeout:n{Structure-end~ P~ at~ item-end \on at line }
- }
- \tagstructend \tagstructend % end LBody, LI
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \begin{macro}{\@@_list_end:}
-% 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: {
-% \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 }
- {
- \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 % end L
-}
-% \end{macrocode}
-% \end{macro}
-% End of tagging related declarations.
-% \begin{macrocode}
-}
-% \end{macrocode}
-% These command should have a dummy declaration if tagging is not active
-% \begin{macrocode}
-{
- \cs_new:Npn \@@_start_para_structure_unconditionally:n #1 {}
-}
-% \end{macrocode}
-%
-%
-%
%
%
-%
-%
-%
-%
% \begin{macrocode}
%</package>
% \end{macrocode}
@@ -4132,6 +4284,7 @@
%
% \end{implementation}
%
+% \appendix
%
% \section{Documentation from first prototype implementations}
%
@@ -4143,10 +4296,11 @@
%
% \subsection{Code cleanup}
% \begin{itemize}
+% \raggedright
% \item Actually implement what's announced.
%
% \item Encapsulate most uses of \cs[no-index]{legacy_if\dots} into
-% commands with \texttt{expl3} syntax: we cannot rename these booleans
+% commands with \pkg{expl3} syntax: we cannot rename these booleans
% for compatibility reasons but we can make the code cleaner
% nevertheless. --- made issue ---
%
@@ -4181,8 +4335,8 @@
%
% \item Add key--value settings mimicking \pkg{enumitem}'s ability to
% set any four of five horizontal parameters and deduce the fifth by
-% $\cs{leftmargin} + \cs{itemindent} = \cs{labelindent} +
-% \cs{labelwidth} + \cs{labelsep}$.
+% $\tn{leftmargin} + \tn{itemindent} = \tn{labelindent} +
+% \tn{labelwidth} + \tn{labelsep}$.
%
% \item Provide good ways to customize how overlong labels are dealt with.
%
@@ -4232,8 +4386,8 @@
% horizontal spacing around it. This type of layout is shared with
% environments such as \texttt{quote}, \texttt{flushright}, or
% \texttt{tabbing}. This common layout is implemented in \LaTeXe{}
-% through \cs{trivlist} (or \cs{list}).
-% \item It defines how each \cs{item} should be typeset: how to
+% through \tn{trivlist} (or \tn{list}).
+% \item It defines how each \tn{item} should be typeset: how to
% construct the label, in particular the \texttt{counter} name, and
% how to format the content of the item.
% \end{itemize}
@@ -4259,6 +4413,7 @@
% run-in lists.} that omits the \texttt{heading} parameter and whose
% default for \texttt{item-instance} is non-empty.
% \begin{itemize}
+% \raggedright
% \item Structural parameters: the \texttt{heading} to place before,
% \texttt{counter} name, \texttt{start} value, whether to
% \texttt{resume} a previous list, and the \texttt{item-instance} (an
@@ -4311,7 +4466,7 @@
% \texttt{label-strut} boolean.
% \item Label alignment (\texttt{label-align}, \texttt{label-boxed},
% \texttt{next-line}).
-% \item Content parameters: \texttt{text-font}.
+% \item Content parameters: \key{text-font}.
% \item A \texttt{compatibility} boolean that controls for instance
% whether \tn{makelabel} is used.
% \end{itemize}
Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfirstaiddate{2024-10-16}
-\def\ltlabfirstaidversion{0.85h}
+\def\ltlabfirstaiddate{2024-11-23}
+\def\ltlabfirstaidversion{0.85i}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -179,35 +179,38 @@
% While create the caption/label we disable para-tagging.
% \begin{macrocode}
\tagpdfparaOff
- \mode_leave_vertical:
+ \group_begin:
+ \normalfont
+ \the\thm at headfont \thm at indent
% \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
+% The anchor for links. It must be inserted when we have started hmode
+% (which happens with \cs{thm at indent}). \pkg{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}
+% \changes{v0.85i}{2024/11/23}{Do not use \cs{leavevmode} but wait
+% for hmode to add the link target}
+% \begin{macrocode}
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\MakeLinkTarget{\l__block_thm_current_counter_tl}}
\@ifempty{##1}
- {\let\thmname\@gobble}
+ {\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:}}%
+ {\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:}}%
+ {\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:}}%
+ {\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:
@@ -221,7 +224,7 @@
% be used if tagging is active!
% \begin{macrocode}
\tagpdfparaOn
- \UseTaggingSocket{para/begin} %
+ \UseTaggingSocket{para/begin}
\ignorespaces}
% \end{macrocode}
% This redefines the standard styles for the theorem heads.
Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfloatdate{2024-09-20}
-\def\ltlabfloatversion{0.81f}
+\def\ltlabfloatdate{2024-11-21}
+\def\ltlabfloatversion{0.81g}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -549,11 +549,12 @@
}
% \end{macrocode}
% These socket are currently defined in tagpdf.
+% \changes{v0.81g}{2024-11-21}{add missing argument to socket}
% \begin{macrocode}
\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
{
- \NewSocket{tagsupport/para/begin}
- \NewSocket{tagsupport/para/end}
+ \NewSocket{tagsupport/para/begin}{0}
+ \NewSocket{tagsupport/para/end}{0}
}
% \end{macrocode}
%
Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-math.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -19,8 +19,8 @@
% for those people who are interested or want to report an issue.
%
%
-\def\ltlabmathdate{2024-10-25}
-\def\ltlabmathversion{0.6i}
+\def\ltlabmathdate{2024-11-26}
+\def\ltlabmathversion{0.6j}
%
%<*driver>
\documentclass{l3doc}
@@ -205,11 +205,8 @@
% 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
+% This socket takes the math as second argument and its code
% 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:
% \begin{itemize}
@@ -1169,6 +1166,13 @@
\bool_gset_true:N \g_@@_luamml_write_bool
% \end{macrocode}
% \end{variable}
+% \begin{macro}{\@@_luamml_ignore:,\@@_luamml_structelem:}
+% Internal variants of the luamml commands, that can be remapped if needed.
+% \begin{macrocode}
+\cs_new:Npn\@@_luamml_structelem:{}
+\cs_new:Npn\@@_luamml_ignore:{}
+% \end{macrocode}
+% \end{macro}
%
% \begin{macrocode}
\msg_new:nnn { tag }{ PDF-2.0-recommended }
@@ -1187,10 +1191,11 @@
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.
+% A key to activate math structure elements.
+% \changes{v0.6j}{2024-11-19}{no longer enable globally for better fake math handling, issue \#764}
% \begin{macrocode}
- math/mathml/structelem .code:n =
+ math/mathml/structelem .choice:,
+ math/mathml/structelem/true .code:n =
{
\pdf_version_compare:NnT < {2.0}
{
@@ -1197,8 +1202,15 @@
\msg_warning:nnne { tag }{ PDF-2.0-recommended }
{ math/mathml/structelem }{ \pdf_version: }
}
- \AddToHook{begindocument/end}{\luamml_structelem:}
+ \cs_set:Npn\@@_luamml_structelem:{\luamml_structelem:}
+ \cs_set:Npn\@@_luamml_ignore:{\luamml_ignore:}
},
+ math/mathml/structelem/false .code:n =
+ {
+ \cs_set_eq:NN\@@_luamml_structelem:\prg_do_nothing:
+ \cs_set_eq:NN\@@_luamml_ignore:\prg_do_nothing:
+ },
+ math/mathml/structelem .default:n = true,
% \end{macrocode}
% and a key to call the ignore flag. This should only be used locally.
% \begin{macrocode}
@@ -1423,10 +1435,12 @@
% 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!
+% \changes{v0.6j}{2024-11-19}{change the socket to two arguments so that it can
+% be used as tagging socket}
% \begin{macrocode}
\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} %
+\socket_new:nn {tagsupport/math/inline/formula/begin}{2} %
\socket_new:nn {tagsupport/math/inline/formula/end}{0}
% \end{macrocode}
%\end{socketdecl}
@@ -1453,8 +1467,11 @@
{default}
% \end{macrocode}
% \changes{v0.6g}{2024-10-02}{disable paratagging, issue \#711}
+% \changes{v0.6j}{2024-11-19}{activate structelem locally issue \#764}
+% \changes{v0.6j}{2024-11-19}{change to two arguments}
% \begin{macrocode}
{ \tagpdfparaOff
+ \@@_luamml_structelem:
\tag_socket_use:n{math/content}
\tag_socket_use:n{math/struct/begin}
% \end{macrocode}
@@ -1462,7 +1479,7 @@
% \begin{macrocode}
% inner formula if multiple parts (not really implemented yet)
\tag_socket_use:n{math/substruct/begin}
- #1
+ #2
\tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
@@ -1491,13 +1508,11 @@
% 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 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.
+% \changes{v0.6j}{2024-11-19}{change number of arguments of formula/begin socket}
% \begin{macrocode}
\socket_new:nn {tagsupport/math/display/begin}{0}
\socket_new:nn {tagsupport/math/display/end}{0}
-\socket_new:nn {tagsupport/math/display/formula/begin}{1} %
+\socket_new:nn {tagsupport/math/display/formula/begin}{2} %
\socket_new:nn {tagsupport/math/display/formula/end}{0}
% \end{macrocode}
%\end{socketdecl}
@@ -1518,15 +1533,18 @@
% \begin{plugdecl}{default}
+% \changes{v0.6j}{2024-11-19}{moved \cs{tagpdfparaOff} into the socket, tagging/765}
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/display/formula/begin}
{default}
{
+ \tagpdfparaOff
+ \@@_luamml_structelem:
\tag_socket_use:n{math/content}
\tag_socket_use:n{math/struct/begin}
\tag_socket_use:n{math/substruct/begin}
- #1
+ #2
\tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
@@ -1833,48 +1851,21 @@
\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:
- {
- \socket_assign_plug:nn {tagsupport/math/inline/begin}{noop}
- \socket_assign_plug:nn {tagsupport/math/inline/end}{noop}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{identity}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{noop}
- \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}
- }
-% \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
+% \changes{v0.6j}{2024-11-19}{removed enable/disable command and assign tagging sockets directly}
% \begin{macrocode}
-\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}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{default}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{default}
- \socket_assign_plug:nn {tagsupport/math/display/begin}{default}
- \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}
- }
+\socket_assign_plug:nn {tagsupport/math/inline/begin}{MC}
+\socket_assign_plug:nn {tagsupport/math/inline/end}{MC}
+\socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/inline/formula/end}{default}
+\socket_assign_plug:nn {tagsupport/math/display/begin}{default}
+\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:
-% \begin{macrocode}
-\AtBeginDocument{\tag_if_active:T{\__tag_math_enable: }}
-% \end{macrocode}
%
+%
% \subsection{Interface commands}
%
% \begin{macro}
@@ -1945,6 +1936,7 @@
{ \tl_if_blank_p:n {#1} }
}
{
+ \@@_luamml_ignore:
#1 $ % $
}
{
@@ -1952,8 +1944,9 @@
% \end{macrocode}
% We do no use a tagging socket here, so that the argument (the
% math) is not lost, tagging-project issue 661.
+% \changes{v0.6j}{2024-11-19}{change socket to tagging socket}
% \begin{macrocode}
- \socket_use:nn {tagsupport/math/inline/formula/begin}{#1}
+ \tag_socket_use:nnn {math/inline/formula/begin}{}{#1}
$ % $
\tag_socket_use:n {math/inline/formula/end}
\tag_socket_use:n {math/inline/end} % restart P-MC
@@ -1982,7 +1975,7 @@
{
\@@_process:nn { equation* } {#1}
\tag_socket_use:n {math/display/begin}
- \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
+ \tag_socket_use:nn{math/display/formula/begin}{}{#1}
}
$$
}
@@ -1990,6 +1983,7 @@
%
% The end code is added through a \cs{aftergroup} so we
% store it inside a command.
+% \changes{v0.6j}{2024-11-19}{removed unneeded \cs{tagpdfparaOn}}
% \begin{macrocode}
\cs_new_protected:Npn \@@_tag_dollardollar_display_end:
{
@@ -1997,10 +1991,6 @@
% \ShowTagging{struct-stack}
\para_raw_end:
% \end{macrocode}
-% 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
@@ -2018,12 +2008,12 @@
% after displays (tagging/721)}
% \begin{macrocode}
\nobreak
- \skip_vertical:n { -\l__math_tmpa_skip } % remove the negative belowdisplayskip
+ \skip_vertical:n { -\l_@@_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
+ \skip_vertical:n { -\l_@@_tmpa_skip } % insert the correct skip
\@doendpe % this has no \end{...} to take care of it
}
@@ -2399,8 +2389,7 @@
% \typeout{==>A3}
\__tag_tool_close_P:
}
- \socket_use:nn{tagsupport/math/display/formula/begin}{}
- \tagpdfparaOff
+ \tag_socket_use:nn{math/display/formula/begin}{}{}
% \typeout{==>MC1}\ShowTagging{mc-current}
}
@@ -2408,7 +2397,7 @@
% \typeout{==>MC2}\ShowTagging{mc-current}
\para_raw_end:
\tagpdfparaOn
- \socket_use:n{tagsupport/math/display/formula/end}
+ \tag_socket_use:n{tagsupport/math/display/formula/end}
% \typeout{==>MC3}\ShowTagging{mc-current}
\@endpetrue
}
Modified: trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-new-or-1.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-new-or-1.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-new-or-1.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -9,8 +9,8 @@
%
% https://www.latex-project.org/lppl.txt
%
-\def\ltlabneworIdate{2023-07-20}
-\def\ltlabneworIversion{0.85a}
+\def\ltlabneworIdate{2024-11-12}
+\def\ltlabneworIversion{0.85b}
%<*driver>
\documentclass{l3doc}
@@ -70,7 +70,7 @@
\providecommand\@kernel at before@foot{}
\providecommand\@kernel at after@head{}
\providecommand\@kernel at after@foot{}
-\providecommand\@mult at ptagging@hook{}% multicol
+\providecommand\@mult at ptagging@hook{}% should be replaced with a socket, eventually
% \end{macrocode}
%
% \begin{macrocode}
@@ -143,20 +143,22 @@
% \item
% \end{itemize}
%
+% This is now directly provided in \pkg{multicol} so the patch below is no longer necessary.
+%
% \begin{macrocode}
-\AddToHook{package/multicol/after}
- {% multicol needs later loading
+%\AddToHook{package/multicol/after}
+% {% multicol needs later loading
% \end{macrocode}
%
% \begin{macrocode}
- \patchcmd\page at sofar
- {\global\dimen\tw@\dp\z@}%
- {%
- \global\dimen\tw@\dp\z@
- \@mult at ptagging@hook
- }%
- {\typeout{Patching \string\page at sofar\space for tagging}}{\PATCHerror}%
-}
+% \patchcmd\page at sofar
+% {\global\dimen\tw@\dp\z@}%
+% {%
+% \global\dimen\tw@\dp\z@
+% \@mult at ptagging@hook
+% }%
+% {\typeout{Patching \string\page at sofar\space for tagging}}{\PATCHerror}%
+%}
% \end{macrocode}
%
% \subsection{Interrupt hooks}
Modified: trunk/Master/texmf-dist/source/latex-dev/tools/calc.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/calc.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/calc.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -40,7 +40,7 @@
%<driver> \ProvidesFile{calc.drv}
% \fi
% \ProvidesFile{calc.dtx}
- [2023/07/08 v4.3 Infix arithmetic (KKT,FJ)]
+ [2024/11/03 v4.3a Infix arithmetic (KKT,FJ)]
%
% \iffalse
%<*driver>
@@ -1323,6 +1323,8 @@
% \begin{macro}{\@settodim}
% \changes{v4.2}{2005/08/06}
% {Changed kernel macro}
+% \changes{v4.3a}{2024/11/03}
+% {Suspend Tagging}
% \begin{macro}{\settototalheight}
% \changes{v4.2}{2005/08/06}
% {Added macro}
@@ -1333,7 +1335,8 @@
% A search on the internet confirmed that some people do that kind of thing.
% \begin{macrocode}
\def\@settodim#1#2#3{%
- \setbox\@tempboxa\hbox{{#3}}%
+ \setbox\@tempboxa\hbox
+ {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}%
\dimen at ii=\z@
\@tf at r\reserved at a #1\do{%
\advance\dimen at ii\reserved at a\@tempboxa}%
@@ -1354,4 +1357,3 @@
%
% \Finale
\endinput
-
Modified: trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/source/latex-dev/tools/multicol.dtx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -92,6 +92,7 @@
%
%<package>\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
%<package>\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
+%<package>\DeclareRelease{v1.9}{2021-11-15}{multicol-2024-05-23.sty}
%<package>\DeclareCurrentRelease{}{2021-11-15}
%<package>
%<package>\ProvidesPackage{multicol}
@@ -98,7 +99,7 @@
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2024/09/14 v1.9i multicolumn formatting (FMi)]
+ [2024/11/21 v2.0a multicolumn formatting (FMi)]
%
%
%
@@ -181,6 +182,23 @@
% the scope of the environment.
% \end{abstract}
%
+% \begin{multicols}{3}[\section*{Preface to versions 1.9 + 2.0}]
+%
+% Version 1.9 added tagging support and also a number of smaller
+% enhancements, such as an optional argument to
+% \cs{columnbreak} to allow for conditional breaks instead of
+% forced ones. The min column depth was also made customizable
+% (previously it was hardwired to the depth of \enquote{p}) to support
+% special cases and in particular languages that do not have
+% characters with any noticeable depth such as, for example, Japanese.
+%
+% Verson 2.0 then simplified and improved the mark handling, by
+% fully supporting the new mark mechanism of \LaTeX.
+%
+% \end{multicols}
+%
+%
+%
% \begin{multicols}{3}[\section*{Preface to version 1.8}]
% The 1.8 release improves on the balancing approach. If due to a
% limited number of break points (e.g., due to large objects) the
@@ -746,15 +764,7 @@
% |\mult at firstbox|, the next
% in register |\mult at firstbox|${}+2$, \ldots,
% only the last one as an exception in
-% register |\mult at grightbox|. Furthermore it has to set up
-% the two macros
-% |\kept at firstmark| and |\kept at botmark| to hold the values for the
-% first and bottom mark as found in the individual columns. There
-% are some helper functions defined in section \ref{sec:v14} which
-% may be used for this. Getting the marks right ``by hand'' is
-% non-trivial and it may pay off to first take a look at the
-% documentation and implementation of |\balance at columns| below
-% before trying anew.
+% register |\mult at grightbox|.
% \end{multicols}
% \end{quote}
% \vspace*{-3ex}
@@ -927,7 +937,7 @@
%
% The following redefinitions have to be moved until after the
% preamble because version 3 of \pkg{doc} resets them after the
-% premable (this is tmp, because \pkg{hypdoc} is not yet
+% preamble (this is tmp, because \pkg{hypdoc} is not yet
% integrated, but as we all know, tmp solutions have a tendency to
% survive for a long time\ldots).
% \begin{macrocode}
@@ -976,6 +986,7 @@
% v... multicolumn formatting]
% \end{macrocode}
%
+%
%^^A \subsection{Option processing}
%
% Next we declare options supported by \mc{}. Two-column mode
@@ -998,10 +1009,18 @@
{\c at tracingmulticols\@ne}
\DeclareOption{balancingshow}
{\c at tracingmulticols\tw@}
+% \end{macrocode}
+%
+% \changes{v2.0a}{2024/11/10}{Add \cs{DebugMarksOn} to the show options}
+% \begin{macrocode}
\DeclareOption{markshow}
- {\c at tracingmulticols\thr@@}
+ {\c at tracingmulticols\thr@@
+ \DebugMarksOn
+ }
\DeclareOption{debugshow}
- {\c at tracingmulticols5\relax}
+ {\c at tracingmulticols5\relax
+ \DebugMarksOn
+ }
% \end{macrocode}
% The next option is intended for typesetting on a |\baselineskip|
% grid. Right now it doesn't do anything other than warning if it
@@ -1042,6 +1061,9 @@
% \begin{multicols}{2}[\subsection{Starting and
% Ending the \mc{} Environment}]
%
+%
+%
+%
% \begin{macro}{\multicols}
% As mentioned before, the \mc{} environment has one mandatory
% argument (the number of columns) and up to two optional ones. We
@@ -1389,13 +1411,13 @@
\multiply\doublecol at number\tw@
\advance\doublecol at number\mult at rightbox
% \end{macrocode}
+%
+% \begin{macrocode}
+ \mc at prepare@mark at regions
+% \end{macrocode}
%
% \begin{macrocode}
\if at boxedmulticols
- \let\l at kept@firstmark\kept at firstmark
- \let\l at kept@botmark\kept at botmark
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
\else
% \end{macrocode}
% We add an empty box to the main vertical list to ensure that we
@@ -1456,31 +1478,8 @@
\unvbox\@cclv
\global\setbox\last at line\lastbox
}%
+ }\eject
% \end{macrocode}
-% Finally we need to record the marks that are present within the
-% |\partial at page| so that we can construct correct first and bottom
-% marks later on. This is done by the following code.
-% \changes{v1.4a}{1992/02/14}{kept marks initiated}
-% \begin{macrocode}
- \prep at keptmarks
-% \end{macrocode}
-% Finally we have to initialize |\kept at topmark| which should
-% ideally be initialized with the mark that is current on ``top''
-% of this page. Unfortunately we can't use |\topmark| because this
-% register will not always contain what its name promises because
-% \LaTeX{} sometimes calls the output routine for float
-% management.\footnote{During such a call the \cs{botmark}
-% gets globally copied to \cs{topmark} by the \TeX{}
-% program.} Therefore we use the second best solution by
-% initializing it with |\firstmark|. In fact, for our purpose this
-% doesn't matter as we use |\kept at topmark| only to initialize
-% |\firstmark| and |\botmark| of a following page if we don't find
-% any marks on the current one.
-% \changes{v1.4i}{1992/06/18}{\cs{kept at topmark} initialized.}
-% \begin{macrocode}
- \global\let\kept at topmark\firstmark
- }\eject
-% \end{macrocode}
% The next thing to do is to assign a new value to |\vsize|.
% \LaTeX{} maintains the free room on the page (i.e.\ the page
% height without the space for already contributed floats) in the
@@ -1770,14 +1769,7 @@
\balance at columns
% \end{macrocode}
% After balancing the result has to be returned by the command
-% |\page at sofar|. But before we do this we reinsert any marks found
-% in box |\mult at box|.
-% \begin{macrocode}
- \return at nonemptymark{first}%
- \kept at firstmark
- \return at nonemptymark{bot}%
- \kept at botmark
-% \end{macrocode}
+% |\page at sofar|.
% When the boxed multicol is returned to the page it can happen
% that it doesn't fit onto it and \LaTeX{} therefore breaks
% earlier. The problem in that case is that during the generation
@@ -1788,23 +1780,18 @@
% until we have left the group below.
% \changes{v1.9e}{2023/02/25}{Delay returning boxed multicols (gh/1002)}
% \begin{macrocode}
- \global\setbox\mc at boxedresult\vbox{%
- \page at sofar
+ \global\setbox\mc at boxedresult\vbox{%
% \end{macrocode}
-%
+% We first update the mark structures and collect all marks that
+% need reinsertion once \mc{} has finished. Then we output the boxed
+% columns and finally we reinsert the marks.
+% \changes{v2.0a}{2024/11/10}{Use new mark mechanism}
% \begin{macrocode}
- \global\let\kept at firstmark
- \l at kept@firstmark
- \global\let\kept at botmark
- \l at kept@botmark
+ \mc at handle@marks at and@reinserts
+ {in multicol (boxed mode)}%
+ \page at sofar
+ \mc at reinsert@marks
}%
-%<*marktrace>
- \mult at info\tw@
- {Restore kept marks to\MessageBreak
- first: \meaning\kept at firstmark
- \MessageBreak bot\space\space:
- \meaning\kept at botmark }%
-%</marktrace>
% \end{macrocode}
% This finishes the code for the ``boxed'' case.
% \begin{macrocode}
@@ -1869,18 +1856,8 @@
% \begin{macrocode}
\ifvbox\partial at page
\unvbox\partial at page\fi
+ \fi
% \end{macrocode}
-% After the output routine has acted we restore
-% the kept marks to their initial value.
-% \begin{macrocode}
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
-%<*marktrace>
- \mult at info\tw@
- {Make kept marks empty}%
-%</marktrace>
- \fi
-% \end{macrocode}
% The output routine above will take care of the |\vsize| and
% reinsert the balanced columns, etc. But it can't reinsert the
% |\footnotes| because we first have to restore the
@@ -2120,6 +2097,8 @@
% \begin{macrocode}
\ifvmode\else\errmessage{Multicol Error}\fi
% \end{macrocode}
+%
+%
% Now we put all columns together in an |\hbox| of width
% |\full at width| (shifting it by |\multicol at leftmargin| to the right
% so that it will be placed correctly if we are within a list
@@ -2157,6 +2136,14 @@
% \changes{v1.9f}{2023/03/30}{Make column min depth customizable (gh/698)}
% \begin{macrocode}
\setbox\z@\hbox{\multicolmindepthstring}\global\dimen\tw@\dp\z@
+% \end{macrocode}
+%
+% \changes{v2.0a}{2024/11/12}{Addedd tagging socket}
+% \begin{macrocode}
+ \UseTaggingSocket{page at sofar}%
+% \end{macrocode}
+%
+% \begin{macrocode}
\moveright\multicol at leftmargin
\hbox to\full at width{%
% \end{macrocode}
@@ -2386,10 +2373,6 @@
\setbox\count@
\vsplit\@cclv to\dimen@
% \end{macrocode}
-% After splitting we update the kept marks.
-% \begin{macrocode}
- \set at keptmarks
-% \end{macrocode}
% If |\raggedcolumns| is in force we add a |vfill| at the bottom by
% unboxing the split box.
% But we need to unbox anyway to ensure that at the end of the box
@@ -2406,12 +2389,12 @@
% \changes{v1.8h}{2014/09/12}{Use \cs{vfilmaxdepth}}
% \changes{v1.8k}{2015/03/22}{\cs{remove at discardable@items} removed}
% \begin{macrocode}
- \setbox\count@
- \vbox to\dimen@
- {\unvbox\count@
- \ifshr at nking
- \vfilmaxdepth\fi}%
- }%
+ \setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@
+ \ifshr at nking
+ \vfilmaxdepth\fi}%
+ }%
% \end{macrocode}
% Then the last column follows.
% \changes{v1.5a}{1992/11/04}{New box mechanism}
@@ -2422,7 +2405,6 @@
% \begin{macrocode}
\setbox\mult at rightbox
\vsplit\@cclv to\dimen@
- \set at keptmarks
\setbox\mult at rightbox\vbox to\dimen@
{\unvbox\mult at rightbox
\ifshr at nking\vfilmaxdepth\fi}%
@@ -2455,6 +2437,7 @@
\thepage\space might be wrong}%
\fi
% \end{macrocode}
+%
% If the `\textsf{tracingmulticols}' counter is 4 or higher we also
% add a rule.
% \begin{macrocode}
@@ -2462,48 +2445,6 @@
\hrule\allowbreak \fi
\fi
% \end{macrocode}
-% To get a correct marks for the current page we have to (locally)
-% redefine |\firstmark| and |\botmark|.
-% 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 |\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}}
-% \begin{macrocode}
- \ifx\@empty\kept at firstmark
- \let\firstmark\kept at topmark
- \let\botmark\kept at topmark
- \else
- \let\firstmark\kept at firstmark
- \let\botmark\kept at botmark
- \fi
-% \end{macrocode}
-% We also initialize |\topmark| with |\kept at topmark|. This will make
-% this mark okay for all middle pages of the \mc{} environment.
-% \changes{v1.5d}{1993/09/15}{reinit \cs{topmark}}
-% \begin{macrocode}
- \let\topmark\kept at topmark
-%<*marktrace>
- \mult at info\tw@
- {Use kept top mark:\MessageBreak
- \meaning\kept at topmark
- \MessageBreak
- Use kept first mark:\MessageBreak
- \meaning\kept at firstmark
- \MessageBreak
- Use kept bot mark:\MessageBreak
- \meaning\kept at botmark
- \MessageBreak
- Produce first mark:\MessageBreak
- \meaning\firstmark
- \MessageBreak
- Produce bot mark:\MessageBreak
- \meaning\botmark
- \@gobbletwo}%
-%</marktrace>
-% \end{macrocode}
% With a little more effort we could have done better. If we had,
% for example, recorded the shrinkage of the material in
% |\partial at page| it would be now possible to try higher
@@ -2524,9 +2465,19 @@
% \changes{v1.8p}{2016/04/07}{Reset \cs{boxmaxdepth}}
% \begin{macrocode}
\boxmaxdepth\maxdimen
- \setbox\@cclv\vbox{\unvbox\partial at page
- \page at sofar}%
+ \setbox\@cclv\vbox
+ {%
% \end{macrocode}
+% If we make a page while still inside the \mc{} environment we
+% have to handle column and page mark structures.
+% \changes{v2.0a}{2024/11/10}{Use new mark mechanism}
+% \begin{macrocode}
+ \mc at handle@col at andpage@marks
+ {in multicol OR (full page)}%
+ \unvbox\partial at page
+ \page at sofar
+ }%
+% \end{macrocode}
% The macro |\@makecol| adds all floats assigned for the current
% page to this page. |\@outputpage| ships out the resulting box.
% Note that it is just possible that such floats are present even
@@ -2534,24 +2485,6 @@
% \begin{macrocode}
\@makecol\@outputpage
% \end{macrocode}
-% After the page is shipped out we have to prepare the kept marks
-% for the following page. |\kept at firstmark| and |\kept at botmark|
-% reinitialized by setting them to |\@empty|. The value of
-% |\botmark| is then assigned to |\kept at topmark|.
-% \changes{v1.4g}{1992/06/03}{Only change \cs{kept at topmark} if
-% \cs{kept at botmark} non-empty}
-% \changes{v1.4i}{1992/06/18}{Set \cs{kept at topmark} to \cs{botmark}}
-% \begin{macrocode}
- \global\let\kept at topmark\botmark
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
-%<*marktrace>
- \mult at info\tw@
- {(Re)Init top mark:\MessageBreak
- \meaning\kept at topmark
- \@gobbletwo}%
-%</marktrace>
-% \end{macrocode}
% Now we reset |\@colroom| to |\@colht| which is \LaTeX's
% saved value of |\textheight|.
% We also have to reset the recorded position of the last
@@ -2910,14 +2843,19 @@
% \begin{macrocode}
\unvbox\partial at page
% \end{macrocode}
-% Then we return the first and bottom mark and the gathered
-% material to the main vertical list.
-% \begin{macrocode}
- \return at nonemptymark{first}%
- \kept at firstmark
- \return at nonemptymark{bot}\kept at botmark
+% We then handle mark structures of the columns, return the gathered
+% material to the main vertical list and then also reinsert the
+% first and last marks that have been found in the columns.
+% \changes{v2.0a}{2024/11/10}{Use new mark mechanism}
+ % \begin{macrocode}
+ \mc at handle@marks at and@reinserts
+ {in multicol OR (balancing)}%
\page at sofar
+ \mc at reinsert@marks
% \end{macrocode}
+%
+% \begin{macrocode}
+% \end{macrocode}
% We need to add a penalty at this point which allows to break at
% this point since calling the output routine may have removed the
% only permissible break point thereby ``glueing'' any following
@@ -2939,21 +2877,7 @@
% \begin{macrocode}
\def\balance at columns{%
% \end{macrocode}
-% We start by setting the kept marks by updating them with any
-% 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 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).
-% \changes{v1.5h}{1994/08/26}{Get kept marks first}
-% \begin{macrocode}
- \get at keptmarks\mult at box
-% \end{macrocode}
-% We then continue by resetting trying to remove any discardable
-% stuff at the end of |\mult at box|. This is rather experimental. We
-% also add a forced break point at the very beginning, so that we
+% We start by adding a forced break point at the very beginning, so that we
% can split the box to height zero later on, thereby adding a known
% |\splittopskip| glue at the beginning.
% \changes{v1.8k}{2015/03/21}{\cs{remove at discardable@items} removed}
@@ -3635,13 +3559,6 @@
% 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
@@ -3672,241 +3589,8 @@
% \end{macrocode}
% \end{macro}
%
-% \end{multicols}
%
-% \begin{multicols}{2}[\subsection{Maintaining the mark registers}]
-% \label{sec:v14}
%
-% This section contains the routines that set the marks so that they
-% will be handled correctly. They have been introduced with version~1.4.
-%
-% \begin{macro}{\kept at topmark}
-% \changes{v1.4h}{1992/06/04}{Init to double brace pair}
-% \begin{macro}{\kept at firstmark}
-% \begin{macro}{\kept at botmark}
-% First thing we do is to reserve three macro names to hold the
-% replacement text for \TeX's primitives |\firstmark|, |\botmark| and
-% |\topmark|. We initialize the first two to be empty and
-% |\kept at topmark| to contain two empty pair of braces. This is
-% necessary since |\kept at topmark| is supposed to contain the last
-% mark from a preceding page and in \LaTeX{} any ``real'' mark must
-% contain two parts representing left and right mark information.
-% \begin{macrocode}
-\def\kept at topmark{{}{}}
-\let\kept at firstmark\@empty
-\let\kept at botmark\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\return at nonemptymark}
-% Sometimes we want to return the value of a ``kept'' mark into a
-% |\mark| node on the main vertical list. This is done by the
-% function |\return at nonemptymark|. As the name suggests it only acts
-% if the replacement text of the kept mark is non-empty. This is done
-% to avoid adding an empty mark when no mark was actually present. If
-% we would nevertheless add such a mark it would be regarded as a
-% valid |\firstmark| later on.
-% \begin{macrocode}
-\def\return at nonemptymark#1#2{%
- \ifx#2\@empty
- \else
-% \end{macrocode}
-% For debugging purposes we take a look at the value of the kept mark
-% that we are about to return. This code will get stripped out for
-% production.
-% \begin{macrocode}
-%<*marktrace>
- \mult at info\tw@
- {Returned #1 mark:\MessageBreak
- \meaning#2}%
-% \nobreak
-% \fi
-%</marktrace>
-% \end{macrocode}
-% Since the contents of the mark may be arbitrary \LaTeX{} code we
-% better make sure that it doesn't get expanded any further. (Some
-% expansion have been done already during the execution of
-% |\markright| or |\markboth|.) We therefore use the usual mechanism
-% of a toks register to prohibit expansion.\footnote{Due to the
-% current definition of \cs{markright} etc.\ it wouldn't
-% help to define the \cs{protect} command to prohibit
-% expansion as any \cs{protect} has already vanished due to
-% earlier expansions.}
-% \changes{v1.4n}{1992/09/10}{Make marks robust}
-% \changes{v1.5t}{1999/03/22}{re-add \cs{mark} command which was commented out
-% by mistake at some point in 1998 (pr/2978)}
-% \begin{macrocode}
- \toks@\expandafter{#2}%
- \mark{\the\toks@}%
-% \end{macrocode}
-% We don't want any breakpoint between such a returned mark and the
-% following material (which is usually just the box where the mark
-% came from).
-% \begin{macrocode}
- \nobreak
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\get at keptmarks}
-% If we have some material in a box register we may want to get the
-% first and the last mark out of this box. This can be done with
-% |\get at keptmarks| which takes one argument: the box register number
-% or its nick name defined by |\newbox|.
-% \begin{macrocode}
-\def\get at keptmarks#1{%
-% \end{macrocode}
-% For debugging purposes we take a look at the current dimensions
-% of the box since in earlier versions of the code I made some
-% mistakes in this area.
-% \begin{macrocode}
-%<*debug>
- \typeout{Mark box #1 before:
- ht \the\ht#1, dp \the\dp#1}%
-%</debug>
-% \end{macrocode}
-% Now we open a new group and locally copy the box to itself. As a
-% result any operation, i.e.\ |\vsplit|, will only have a local
-% effect. Without this trick the box content would get lost up to
-% the level where the last assignment to the box register was done.
-% \begin{macrocode}
- \begingroup
- \vbadness\@M
- \setbox#1\copy#1%
-% \end{macrocode}
-% Now we split the box to the maximal possible dimension. This
-% should split off the full contents of the box so that effectively
-% everything is split off. As a result |\splitfirstmark| and
-% |\splitbotmark| will contain the first and last mark in the box
-% respectively.
-%
-% Unfortunately, a simple \cs{vsplit} is not enough if the material
-% contains forced breaks in that case we first have to get rid of
-% those which is why we do this work in a separate macro that can
-% call itself recursively.
-% \changes{v1.9g}{2023/11/10}{Get rid of forced breaks for mark
-% extraction (gh/1130)}
-% \begin{macrocode}
- \mc at get@all at box@marks #1%
-% \end{macrocode}
-% Therefore we can now set the kept marks which is a global
-% operation and afterwards close the group. This will restore the
-% original box contents.
-% \begin{macrocode}
- \set at keptmarks
- \endgroup
-% \end{macrocode}
-% For debugging we take again a look at the box dimension which
-% shouldn't have changed.
-% \begin{macrocode}
-%<*debug>
- \typeout{Mark box #1 \space after:
- ht \the\ht#1, dp \the\dp#1}%
-%</debug>
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\mc at get@all at box@marks}
-% This macro splits a box to \cs{maxdimen} in order to get at the
-% marks inside. If it turns out that we have a remainder after the
-% split (e.g., if there was a \cs{columnbreak} in the material) we
-% stitch the two parts together again (which omits the forced
-% break) and recurse. Eventually, everything is split off and the
-% split marks will then have the appropriate values.
-% \changes{v1.9g}{2023/11/10}{Get rid of forced breaks for mark
-% extraction (gh/1130)}
-% \begin{macrocode}
-\def\mc at get@all at box@marks #1{%
- \setbox\@tempboxa\vsplit#1to\maxdimen
- \ifvoid#1\else
- \setbox#1\vbox{\unvbox\@tempboxa \unvbox#1}%
- \mc at get@all at box@marks #1%
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \begin{macro}{\set at keptmarks}
-% The macro |\set at keptmarks| is responsible for setting
-% |\kept at firstmark| and |\kept at botmark|, by checking the current
-% values for |\splitfirstmark| and |\splitbotmark|.
-% \begin{macrocode}
-\def\set at keptmarks{%
-% \end{macrocode}
-% If |\kept at firstmark| is empty we assume that it isn't set. This
-% is strictly speaking not correct as we loose the ability to have
-% marks that are explicitly empty, but for standard \LaTeX{}
-% application it is sufficient. If it is non-empty we don't change
-% the value---within the output routines it will then be restored
-% to |\@empty|.
-% \begin{macrocode}
- \ifx\kept at firstmark\@empty
-% \end{macrocode}
-% We now put the contents of |\splitfirstmark| into
-% |\kept at firstmark|. In the case that there wasn't any mark at all
-% |\kept at firstmark| will not change by that operation.
-% \begin{macrocode}
- \expandafter\gdef\expandafter
- \kept at firstmark
- \expandafter{\splitfirstmark}%
-% \end{macrocode}
-% When debugging we show the assignment but only when something
-% actually happened.
-% \begin{macrocode}
-%<*marktrace>
- \ifx\kept at firstmark\@empty\else
- \mult at info\tw@
- {Set kept first mark:\MessageBreak
- \meaning\kept at firstmark%
- \@gobbletwo}%
- \fi
-%</marktrace>
- \fi
-% \end{macrocode}
-% We always try to set the bottom mark to the |\splitbotmark| but
-% of course only when there has been a |\splitbotmark| at all.
-% Again, we assume that an empty |\splitbotmark| means that the
-% split off box part didn't contain any marks at all.
-% \begin{macrocode}
- \expandafter\def\expandafter\@tempa
- \expandafter{\splitbotmark}%
- \ifx\@tempa\@empty\else
- \global\let\kept at botmark\@tempa
-%<*marktrace>
- \mult at info\tw@
- {Set kept bot mark:\MessageBreak
- \meaning\kept at botmark%
- \@gobbletwo}%
-%</marktrace>
- \fi}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\prep at keptmarks}
-% The |\prep at keptmarks| function is used to initialize the kept
-% marks from the contents of |\partial at page|, i.e.\ the box that
-% holds everything from the top of the current page prior to
-% starting the \mc{} environment. However, such a box is only
-% available if we are not producing a boxed \mc{}.
-% \begin{macrocode}
-\def\prep at keptmarks{%
- \if at boxedmulticols \else
- \get at keptmarks\partial at page
- \fi}
-% \end{macrocode}
-% \end{macro}
-%
-%
% \begin{macro}{\remove at discardable@items}
% There are situations when we may have some space at the end of a
% column and this macro here will attempt to get rid of it. The
@@ -4069,9 +3753,9 @@
% \end{multicols}
%
%
-% \begin{multicols*}{2}[\section{Further extensions}]
+% \section{Further extensions}
%
-% This section does contain code for extensions added to this package
+% This section contains code for extensions added to this package
% over time. Not all of them may be active, some might sit dormant and
% wait for being activated in some later release.
%
@@ -4221,8 +3905,8 @@
\else
% \end{macrocode}
% Increasingly lower penalty based on argument value. This is like
-% \cs{pagebreak} but we use other penalty values are the \LaTeX{}
-% defaults aree rather pointless for pagination.
+% \cs{pagebreak} but we use other penalty values as the \LaTeX{}
+% defaults are rather useless for pagination.
% \begin{macrocode}
\edef\mc at break@pen
{-\ifcase#1\@m\or 3333\or 6666\or 9999\else\@Mv\fi\relax}%
@@ -4470,7 +4154,9 @@
%
% The \verb=\docolaction= scans for a star and optional argument
% and 3 mandatory ones, but we do this in chunks (not having xparse
-% available).
+% available).\footnote{We can do better now, as
+% \cs{NewDocumentCommand} is part of the kernel. So this should be
+% cleaned up one day.}
%
% \changes{v1.8u}{2018/11/09}{Support star with \cs{docolaction}}
% \begin{macrocode}
@@ -4641,8 +4327,350 @@
\mc at firstcoltrue
% \end{macrocode}
% \end{macro}
-% \end{multicols*}
%
+%
+%
+%
+% \subsection{Using the new mark mechanism}
+%
+% \subsubsection{Helpers}
+%
+% \changes{v2.0a}{2024/11/10}{Using the new mark mechanism}
+% \begin{macrocode}
+\ExplSyntaxOn
+%<@@=mc>
+% \end{macrocode}
+%
+%
+%
+% \begin{macro}{\g_@@_curr_col_int}
+% Counter for tracking the current column number. At the start of a
+% \mc{} environment is holds the number of columns for
+% which there is currently \texttt{mcol-...} data (i.e., the number
+% of columns in the last \mc{} environment).
+% \begin{macrocode}
+\int_new:N \g_@@_curr_col_int
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@@_debug_marks:n}
+% For now we reuse the internal debugging interface of ltmarks,
+% this will probably change
+% \begin{macrocode}
+\cs_new:Npn \@@_debug_marks:n #1 { \__mark_debug:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_update_mcol_structures:}
+%
+% Helper function to update the \texttt{mcol-...} regions when we
+% finish a page while within a \mc{} environment or when we finish
+% the \mc{} and return the balanced columns back to the galley.
+%
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_update_mcol_structures: {
+ \@@_debug_marks:n
+ { \typeout{Marks:~ update~ mcol~ structures~ (multicol)} }
+% \end{macrocode}
+% It might be possible that there was a previous \mc{} (either
+% before the current one, or a boxed one inside) and that one might
+% have had more columns than the current one. If so, we should make these
+% column structures an error as they are no longer valid (or at
+% least empty them, not sure what is better).
+% \begin{macrocode}
+ \int_step_inline:nnn {\col at number + 1} { \g_@@_curr_col_int }
+ { \mark_set_structure_to_err:n { mcol - ##1 } }
+% \end{macrocode}
+%
+% There is no need to do anything to \texttt{mcol-1} up to
+% \texttt{mcol-\meta{\cs{col at number}}} because those regions get
+% new data in a second.
+%
+% Once we have done this we reset the column counter for further
+% processing.
+% \begin{macrocode}
+ \int_gset:Nn \g_@@_curr_col_int {1}
+% \end{macrocode}
+% Now we loop through all the assembled column material, using the
+% \texttt{column} and \texttt{previous-column} regions as an
+% intermediate holding area.
+% \begin{macrocode}
+ \process at cols\mult at firstbox
+ {
+ \mark_update_structure_from_material:nn
+%fmi {mcol}
+ {column}
+ {\unvcopy\count@}
+% \end{macrocode}
+% Once the \texttt{column} region got updated we copy it to
+% \texttt{mcol-\meta{\cs{\detokenize{g_@@_curr_col_int}}}} and then increment
+% the counter.
+% \begin{macrocode}
+ \mark_copy_structure:nn
+ {mcol - \int_use:N\g_@@_curr_col_int }
+%fmi {mcol}
+ {column}
+ \int_gincr:N \g_@@_curr_col_int
+ }
+% \end{macrocode}
+% The above loop takes care of all columns, except for the last one
+% (which is stored in \cs{mult at rightbox}. So we have to do that separately.
+% \begin{macrocode}
+ \mark_update_structure_from_material:nn
+%fmi {mcol}
+ {column}
+ {\unvcopy\mult at rightbox}
+ \mark_copy_structure:nn
+ { mcol - \int_use:N\g_@@_curr_col_int }
+%fmi {mcol}
+ {column}
+% \end{macrocode}
+% Two more aliases to take care of: \texttt{first-column} and
+% \texttt{last-column} and we are done:
+% \begin{macrocode}
+ \mark_copy_structure:nn{first-column}{mcol-1}
+%fmi \mark_copy_structure:nn{last-column} {mcol}
+ \mark_copy_structure:nn{last-column} {column}
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+
+% \begin{macro}{\@@_update_page_structures:}
+% If we are making a page while inside a \mc{} environment, we also
+% have to take care of the page region.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_update_page_structures: {
+ \@@_debug_marks:n
+ {
+ \typeout{Marks:~ update~ page~ structure~ (multicol)}
+ }
+% \end{macrocode}
+% Since for the \texttt{page} region we are only interested in the
+% top, first, and last marks on the whole page regardless in which
+% column they appear, we simply string together all columns in a big
+% box and update the structure from that.
+% \begin{macrocode}
+ \mark_update_structure_from_material:nn
+ {page}
+ {
+% \end{macrocode}
+% And we better not forget the \cs{partial at page} in case this is
+% the first page of the \mc{} (on later pages this box will be void).
+% \begin{macrocode}
+ \unvcopy\partial at page
+ \process at cols \mult at firstbox { \unvcopy\count@ }
+ \unvcopy\mult at rightbox
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
+
+% \begin{macro}{\@@_prepare_mark_reinserts:}
+%
+% When finishing a \mc{} environment, we have to return marks (in
+% then boxed columns) to the current page so that they are
+% available when that page is produced.
+% This is what this helper does.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_prepare_mark_reinserts: {
+ \@@_debug_marks:n
+ { \typeout{Marks:~ prepare~ for~ reinserting~ marks~ (multicol)} }
+% \end{macrocode}
+% We are only interested in the top, first, and last marks of each
+% class regardless in which column they appeared, so we can copy
+% all column boxes together and process them in one go. The result
+% is returned in \cs{\detokenize{l_@@_first_marks_tl}} and
+% \cs{\detokenize{l_@@_last_marks_tl}} in form of \cs{\detokenize{mark_insert:nn}} statements
+% so we can later execute such token lists directly (and if there
+% were no marks they will be empty).
+% \begin{macrocode}
+ \mark_get_marks_for_reinsertion:nNN
+ {
+ \process at cols \mult at firstbox { \unvcopy\count@ }
+ \unvcopy\mult at rightbox
+ }
+ \l_@@_first_marks_tl
+ \l_@@_last_marks_tl
+}
+% \end{macrocode}
+% And here are the token lists used above.
+% \begin{macrocode}
+\tl_new:N \l_@@_first_marks_tl
+\tl_new:N \l_@@_last_marks_tl
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\mc at reinsert@marks}
+% So reinserting it just means executing the token lists (with some
+% surrounding debugging statements).
+% \begin{macrocode}
+\cs_new_protected:Npn \mc at reinsert@marks{
+ \@@_debug_marks:n
+ { \typeout{Marks:~ --~ reinsert~ marks~ (multicol)} }
+ \l_@@_first_marks_tl \l_@@_last_marks_tl
+ \@@_debug_marks:n
+ { \typeout{Marks:~ --~ finished~ reinserting~ marks~ (multicol)} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \subsubsection{Interfaces used in the \mc{} code and its output routines}
+%
+%
+% \begin{macro}{\mc at prepare@mark at regions}
+% When a \mc{} environment starts we need to clear the column
+% region as it it may contain quite old data. Otherwise, that data
+% would be used to generate the top marks and that would be
+% obviously wrong for the first column.
+% \begin{macrocode}
+\cs_new_protected:Npn \mc at prepare@mark at regions {
+% \end{macrocode}
+% However, before we do this we need to save away the current
+% column data in case this is a boxed multicol, because when that
+% finishes we need to restore the previous state --- this is not
+% necessary for a normal \mc{} environment, because there the
+% \texttt{column} region is overwritten in the standard output
+% routine by copying the \texttt{page} region.
+% \begin{macrocode}
+ \legacy_if:nT { @boxedmulticols }
+ { \mark_copy_structure:nn{saved-column}{column} }
+ \@@_debug_marks:n
+ { \typeout{Marks:~ empty~ mcol~ regions~ (multicol)} }
+ \mark_clear_structure:n {column}
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\mc at handle@marks at and@reinserts}
+%
+% If a \mc{} ends the columns are balanced and then returned to the
+% galley. in that situation we do have to prepare the
+% \texttt{mcol-...} regions and also do this reinsertion.
+% \begin{macrocode}
+\cs_new_protected:Npn \mc at handle@marks at and@reinserts #1 {
+ \@@_update_mcol_structures:
+% \end{macrocode}
+% Show the current region status when debugging:
+% \begin{macrocode}
+ \@@_debug_marks:n { \__mark_status:nn {#1} {\the\col at number} }
+% \end{macrocode}
+% Then prepare for reinserting the marks:
+% \begin{macrocode}
+ \@@_prepare_mark_reinserts:
+% \end{macrocode}
+% Finally, we restore the \texttt{column} region in case this was a
+% boxed \mc{} environment.
+% \begin{macrocode}
+ \legacy_if:nT { @boxedmulticols }
+ { \mark_copy_structure:nn {column}{saved-column} }
+}
+
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\mc at handle@col at andpage@marks}
+% If a page is generated while we are processing a \mc{} then we
+% have to update the \texttt{mcol-...} regions but also the
+% \texttt{page} region.
+% \begin{macrocode}
+\cs_new_protected:Npn \mc at handle@col at andpage@marks #1 {
+ \@@_update_mcol_structures:
+ \@@_update_page_structures:
+% \end{macrocode}
+% Once done we display the current status of the marks.
+% \begin{macrocode}
+ \@@_debug_marks:n { \__mark_status:nn {#1} {\the\col at number} }
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\leftmark,\rightmark}
+% We change the legacy \cs{leftmark} and \cs{rightmark} to use
+% the new mark mechanism. For now we do this only if pkg{multicol}
+% is loaded, but eventually this will move to the kernel which then
+% also simplifies the definitions for \cs{markboth} and friends.
+%
+% These commands should be expandable, so no protection.
+% \changes{v2.0a}{2024/11/10}{Use the new mark mechanism}
+% \begin{macrocode}
+\cs_set:Npn \leftmark {\mark_use_last:nn{page}{2e-left}}
+\cs_set:Npn \rightmark {\mark_use_first:nn{page}{2e-right}}
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+%
+% \subsection{Tagging support}
+%
+% Here we collect adjustments necessary for tagging support, e.g.,
+% before the 2024-11-01 release it was necessary to allocate two
+% float sockets. By now they are part of the kernel and their plugs
+% are currently defined by \pkg{tagpdf}.
+% \begin{macrocode}
+%\str_if_exist:cF { l__socket_tagsupport/float/end_plug_str }
+% {
+% \NewSocket{tagsupport/float/end}{0}
+% \NewSocket{tagsupport/float/hmode/end}{0}
+% }
+% \end{macrocode}
+%
+% This one is only relevant for \pkg{multicol} so declared here.
+% \begin{macrocode}
+\NewSocket{tagsupport/page at sofar}{0}
+% \end{macrocode}
+%
+% The plug definition for now just uses the definition from
+% \pkg{tagpdf}. There has to be a decision where such plugs should be
+% implemented: in the package (like now) then they functions used
+% from tagpdf should become public, in \pkg{tagpdf}, or in
+% \texttt{lttagging} in the kernel.
+% \changes{v2.0a}{2024/11/12}{Added tagging socket and use public tagpdf function}
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/page at sofar}{default}
+ {
+% \__tag_check_typeout_v:n {====>~In~\string\page at sofar} % some similar debug message if wanted.
+ \process at cols\mult at firstbox
+ { \tag_mc_add_missing_to_stream:Nn \count@ {multicol} }
+ \tag_mc_add_missing_to_stream:Nn \mult at rightbox {multicol}
+ }
+% \end{macrocode}
+% In the \LuaTeX{} engine there is no need to do anything special
+% in this socket.
+% \begin{macrocode}
+\sys_if_engine_luatex:TF
+ { \AssignSocketPlug{tagsupport/page at sofar}{noop} }
+ { \AssignSocketPlug{tagsupport/page at sofar}{default} }
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+%
+%
% \Finale
%
\endinput
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/flafter.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/flafter.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/flafter.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutput.dtx
\ProvidesPackage{flafter}
- [2021/07/31 v1.4e
+ [2024/11/16 v1.4k
Standard LaTeX floats after reference (FMi)]
\IncludeInRelease{2015/01/01}%
{\@addtocurcol}{float order in 2-column}%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fltrace.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutput.dtx
\ProvidesPackage{fltrace}
- [2021/07/31 v1.4e
+ [2024/11/16 v1.4k
Tracing LaTeX floats algorithm (FMi)]
\def\onecolumn{%
\clearpage
@@ -1130,6 +1130,35 @@
\fi
}
\EndIncludeInRelease
+\IncludeInRelease{2025/06/01}%
+ {\@outputdblcol}{Use new mark mechanism}%
+\def\@outputdblcol{%
+ \if at firstcolumn
+ \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\copy\@outputbox
+ \fl at trace{PAGE: first column boxed}%
+ \else
+ \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hb at xt@\textwidth{%
+ \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hfil
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb at xt@\columnwidth{\box\@outputbox \hss}}}%
+ \fl at trace{PAGE: second column also boxed}%
+ \@combinedblfloats
+ \@outputpage
+ \fl at trace{PAGE: two column page completed}%
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if at fcolmade \fi{\@outputpage
+ \fl at trace{PAGE: double float page completed}%
+ \@startdblcolumn}%
+ \endgroup
+ \fi}%
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\@outputdblcol}{2 column marks}%
\def\@outputdblcol{%
@@ -1136,7 +1165,6 @@
\if at firstcolumn
\global\@firstcolumnfalse
\global\setbox\@leftcolumn\copy\@outputbox
- \fl at trace{PAGE: first column boxed}%
\splitmaxdepth\maxdimen
\vbadness\maxdimen
\setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
@@ -1161,19 +1189,16 @@
{\normalcolor\vrule \@width\columnseprule}%
\hfil
\hb at xt@\columnwidth{\box\@outputbox \hss}}}%
- \fl at trace{PAGE: second column also boxed}%
\@combinedblfloats
\@setmarks
\@outputpage
- \fl at trace{PAGE: two column page completed}%
\begingroup
\@dblfloatplacement
\@startdblcolumn
\@whilesw\if at fcolmade \fi{\@outputpage
- \fl at trace{PAGE: double float page completed}%
\@startdblcolumn}%
\endgroup
- \fi}%
+ \fi}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\@outputdblcol}{2 column marks}%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fontenc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fontenc.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fontenc.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesPackage{fontenc}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX package]
\def\update at uclc@with at cyrillic{%
\expandafter\def\expandafter\@uclclist\expandafter
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.cfg 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.cfg}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
(Uncustomized math font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fontmath.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fontmath.ltx}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
(Math font setup)
]
\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.cfg 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.cfg}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
(Uncustomized text font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/fonttext.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{fonttext.ltx}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
(Text font setup)
]
\typeout{=== Don't modify this file, use a .cfg file instead ===^^J}
@@ -45,7 +45,7 @@
\input {omsenc.def}
\input {ot1enc.def}
\input {t1enc.def}
-\input{ts1enc.def}
+\input {ts1enc.def}
\ifx\Umathcode\@undefined
\fontencoding{OT1}
\def\@fontenc at load@list{\@elt{T1,OT1}}
@@ -68,12 +68,11 @@
\DeclareFontSubstitution{TU}{lmr}{m}{n}
\fi
\DeclareFontEncodingDefaults{}{}
-\DeclareFontSubstitution{T1}{cmr}{m}{n}
-\DeclareFontSubstitution{OT1}{cmr}{m}{n}
\begingroup
\nfss at catcodes
\input {t1cmr.fd}
\input {ot1cmr.fd}
+\input {ts1cmr.fd}
\endgroup
\begingroup
\nfss at catcodes
@@ -81,13 +80,9 @@
\input {t1cmtt.fd}
\input {ot1cmss.fd}
\input {ot1cmtt.fd}
+\input {ts1cmss.fd}
+\input {ts1cmtt.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-dev/base/latex.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latex.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -128,7 +128,7 @@
\newlinechar`\^^J
\def\typeout{\immediate\write17}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
- \do\#\do\^\do\_\do\%\do\~}
+ \do\#\do\^\do\_\do\%\do\~\do\^^I}
\def\@makeother#1{\catcode`#1=12\relax}
\def\space{ }
\def\@tempswafalse{\let\if at tempswa\iffalse}
@@ -316,7 +316,7 @@
\catcode`\^^L=\active \def^^L{\par}% ascii form-feed is \par
\message{catcodes,}
\def\dospecials{\do\ \do\\\do\{\do\}\do\$\do\&%
- \do\#\do\^\do\_\do\%\do\~}
+ \do\#\do\^\do\_\do\%\do\~\do\^^I}
\catcode`@=11
\chardef\@ne=1
\chardef\tw@=2
@@ -710,7 +710,7 @@
\def\fmtname{LaTeX2e}
\edef\fmtversion
{2025-06-01}
-\def\patch at level{0}
+\def\patch at level{-1}
\edef\development at branch@name{develop \the\year-\the\month-\the\day}
\iffalse
\def\reserved at a#1/#2/#3\@nil{%
@@ -9803,6 +9803,7 @@
\def\@settopoint#1{\divide#1\p@\multiply#1\p@}
%%% From File: ltfssbas.dtx
%% Copyright (C) 1989-2002 Frank Mittelbach and Rainer Sch\"opf
+\message{NFSS base,}
\def\@nomath#1{\relax\ifmmode
\@font at warning{Command \noexpand#1invalid in math mode}\fi}
\gdef\no at alphabet@error#1{\relax \ifmmode
@@ -9949,6 +9950,40 @@
\@onlypreamble\DeclareFontEncodingDefaults
\let\default at T\@empty
\let\default at M\@empty
+\def\DeclareEncodingSubset#1#2{%
+ \DeclareEncodingSubset at aux{#1}#2*\DeclareEncodingSubset at aux
+}
+\def\DeclareEncodingSubset at aux#1#2*#3\DeclareEncodingSubset at aux#4{%
+ \expandafter\ifx\expandafter X\detokenize{#3}X%
+ \@DeclareEncodingSubset{#1}{#2}{#4}%
+ \else
+ \@DeclareEncodingSubset{#1}{#2LF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2TLF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2OsF}{#4}%
+ \@DeclareEncodingSubset{#1}{#2TOsF}{#4}%
+ \fi
+}
+\def\@DeclareEncodingSubset#1#2#3{%
+ \@ifundefined{#1:#2}%
+ {\@font at info{Setting #2 sub-encoding to #1/#3}}%
+ {\@font at info{Changing #2 sub-encoding to #1/#3}}%
+ \global\@namedef{#1:#2}{#3}}
+
+\def\CheckEncodingSubset#1#2#3#4#5{%
+ \ifnum #4>%
+ \expandafter\ifx\csname #2:\f at family\endcsname\relax
+ 0\csname #2:?\endcsname
+ \else
+ \csname #2:\f at family\endcsname
+ \fi
+ \relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+ {#1{#2}}{#3}%
+ #5%
+}
\def\DeclarePreloadSizes#1#2#3#4#5{%
\@ifundefined{T@#1}%
{\@latex at error{Encoding scheme `#1' unknown}\@eha}%
@@ -10325,6 +10360,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltfssaxes.dtx
%% Copyright (C) 2019-2020 Frank Mittelbach
+\message{NFSS axes,}
\def\DeclareFontSeriesChangeRule#1#2#3#4{%
\@namedef{series@#1@#2}{{#3}{#4}}}
\DeclareFontSeriesChangeRule {bc}{b}{bc}{}
@@ -10926,6 +10962,7 @@
%%% From File: ltfsstrc.dtx
%% Copyright (C) 1989-97 by Frank Mittelbach and Rainer Sch\"opf.
%% Copyright (C) 1994-97 by LaTeX Project. All rights reserved.
+\message{NFSS tracing,}
\def\tracingfonts{%
\@font at warning{Command \noexpand\tracingfonts
not provided.\MessageBreak
@@ -11270,6 +11307,7 @@
%%% From File: ltfssdcl.dtx
%% Copyright (C) 1989-1998 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
+\message{NFSS declarative interface,}
\def\in@#1#2%
{%
\begingroup
@@ -12164,6 +12202,7 @@
%%% From File: ltfssini.dtx
%% Copyright (C) 1989-2001 Frank Mittelbach and Rainer Sch\"opf,
%% all rights reserved.
+\message{NFSS initialization,}
\DeclareMathVersion{normal}
\DeclareMathVersion{bold}
\DeclareRobustCommand\upshape
@@ -12717,45 +12756,6 @@
\egroup
}
\def\textcompsubstdefault{\rmsubstdefault}
-\def\DeclareEncodingSubset#1#2{%
- \DeclareEncodingSubset at aux{#1}#2*\DeclareEncodingSubset at aux
-}
-\def\DeclareEncodingSubset at aux#1#2*#3\DeclareEncodingSubset at aux#4{%
- \expandafter\ifx\expandafter X\detokenize{#3}X%
- \@DeclareEncodingSubset{#1}{#2}{#4}%
- \else
- \@DeclareEncodingSubset{#1}{#2LF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TLF}{#4}%
- \@DeclareEncodingSubset{#1}{#2OsF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TOsF}{#4}%
- \fi
-}
-\def\@DeclareEncodingSubset#1#2#3{%
- \@ifundefined{#1:#2}%
- {\@font at info{Setting #2 sub-encoding to #1/#3}}%
- {\@font at info{Changing #2 sub-encoding to #1/#3}}%
- \global\@namedef{#1:#2}{#3}}
-\@onlypreamble\DeclareEncodingSubset
-\@onlypreamble\DeclareEncodingSubset at aux
-\@onlypreamble\@DeclareEncodingSubset
-
-
-\def\CheckEncodingSubset#1#2#3#4#5{%
- \ifnum #4>%
- \expandafter\ifx\csname #2:\f at family\endcsname\relax
- 0\csname #2:?\endcsname
- \else
- \csname #2:\f at family\endcsname
- \fi
- \relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {#1{#2}}{#3}%
- #5%
-}
-
\def\tc at errorwarn#1#2{\@latex at info{#1}}
\def\tc at subst#1{%
@@ -13072,11 +13072,7 @@
\DeclareEncodingSubset{TS1}{?}{9}
\DeclareEncodingSubset{TS1}{ccr} {0}
\DeclareEncodingSubset{TS1}{cmbr} {0}
-\DeclareEncodingSubset{TS1}{cmr} {0}
-\DeclareEncodingSubset{TS1}{cmss} {0}
\DeclareEncodingSubset{TS1}{cmtl} {0}
-\DeclareEncodingSubset{TS1}{cmtt} {0}
-\DeclareEncodingSubset{TS1}{cmvtt} {0}
\DeclareEncodingSubset{TS1}{pxr} {0}
\DeclareEncodingSubset{TS1}{pxss} {0}
\DeclareEncodingSubset{TS1}{pxtt} {0}
@@ -13531,7 +13527,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} { p , T , F, TF }
\cs_new_eq:NN \IfPropertyExistsTF \property_if_exist:eTF
\cs_new:Npn \IfPropertyExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
\cs_new:Npn \IfPropertyExistsF #1 {\property_if_exist:eTF {#1}{} }
@@ -13546,7 +13542,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} { p , T , F, TF }
\cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }
\cs_new:Npn \IfLabelExistsF #1 {\property_if_recorded:eTF {#1}{} }
@@ -13561,7 +13557,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} { p , T , F, 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} }
@@ -16169,6 +16165,9 @@
%% Frank Mittelbach, The LaTeX Project
%%% From File: ltmarks.dtx
+
+
+
\ExplSyntaxOn
\seq_new:N \g__mark_classes_seq
\cs_new_protected:Npn \mark_new_class:n #1
@@ -16186,43 +16185,42 @@
\__mark_debug:n { \iow_term:x { Marks:~new~mark:~#1~\msg_line_context: } }
\exp_args:Nc \newmarks {c__mark_class_ #1 _mark}
\seq_gput_right:Nn \g__mark_classes_seq {#1}
- \tl_new:c { g__mark_page_top_ #1 _tl }
- \tl_new:c { g__mark_page_first_ #1 _tl }
- \tl_new:c { g__mark_page_last_ #1 _tl }
- \tl_new:c { g__mark_previous-page_top_ #1 _tl }
- \tl_new:c { g__mark_previous-page_first_ #1 _tl }
- \tl_new:c { g__mark_previous-page_last_ #1 _tl }
- \tl_new:c { g__mark_column_top_ #1 _tl }
- \tl_new:c { g__mark_column_first_ #1 _tl }
- \tl_new:c { g__mark_column_last_ #1 _tl }
- \tl_new:c { g__mark_previous-column_top_ #1 _tl }
- \tl_new:c { g__mark_previous-column_first_ #1 _tl }
- \tl_new:c { g__mark_previous-column_last_ #1 _tl }
- \tl_new:c { g__mark_first-column_top_ #1 _tl }
- \tl_new:c { g__mark_first-column_first_ #1 _tl }
- \tl_new:c { g__mark_first-column_last_ #1 _tl }
- \tl_new:c { g__mark_last-column_top_ #1 _tl }
- \tl_new:c { g__mark_last-column_first_ #1 _tl }
- \tl_new:c { g__mark_last-column_last_ #1 _tl }
- \tl_set:cn { g__mark_page_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_page_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_page_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_last_ #1 _tl }{ \__mark_id:n{0} }
+ \__mark_init_region:nn {page}{#1}
+ \__mark_init_region:nn {previous-page}{#1}
+ \__mark_init_region:nn {column}{#1}
+ \__mark_init_region:nn {previous-column}{#1}
+ \__mark_init_region:nn {first-column}{#1}
+ \__mark_init_region:nn {last-column}{#1}
+ \__mark_init_region:nn {mcol-1}{#1}
+ \__mark_init_region:nn {mcol-2}{#1}
+ \__mark_init_region:nn {mcol-3}{#1}
+ \__mark_init_region:nn {mcol-4}{#1}
+ \__mark_init_region:nn {mcol-5}{#1}
+ \__mark_init_region:nn {mcol-6}{#1}
+ \__mark_init_region:nn {mcol-7}{#1}
+ \__mark_init_region:nn {mcol-8}{#1}
+ \__mark_init_region:nn {mcol-9}{#1}
+ \__mark_init_region:nn {mcol-10}{#1}
+ \__mark_init_region:nn {mcol-11}{#1}
+ \__mark_init_region:nn {mcol-12}{#1}
+ \__mark_init_region:nn {mcol-13}{#1}
+ \__mark_init_region:nn {mcol-14}{#1}
+ \__mark_init_region:nn {mcol-15}{#1}
+ \__mark_init_region:nn {mcol-16}{#1}
+ \__mark_init_region:nn {mcol-17}{#1}
+ \__mark_init_region:nn {mcol-18}{#1}
+ \__mark_init_region:nn {mcol-19}{#1}
+ \__mark_init_region:nn {mcol-20}{#1}
}
+\cs_new_protected:Npn \__mark_init_region:nn #1 #2 {
+ \tl_new:c { g__mark_#1_top_ #2 _tl }
+ \tl_new:c { g__mark_#1_first_ #2 _tl }
+ \tl_new:c { g__mark_#1_last_ #2 _tl }
+ \tl_set_eq:cN { g__mark_#1_top_ #2 _tl } \c__mark_empty_tl
+ \tl_set_eq:cN { g__mark_#1_first_ #2 _tl } \c__mark_empty_tl
+ \tl_set_eq:cN { g__mark_#1_last_ #2 _tl } \c__mark_empty_tl
+}
+\tl_const:Nn \c__mark_empty_tl { \__mark_value:nn{0}{} }
\box_new:N \l__mark_box
\box_new:N \l__mark_ii_box
\tl_new:N \g__mark_tmp_tl
@@ -16277,13 +16275,13 @@
\exp_not:N \l__mark_saved_parameters_tl
}
\tl_new:N \l__mark_saved_parameters_tl
-\cs_new_protected:Npn \__mark_update_structure_from_material:nn #1#2 {
+\cs_new_protected:Npn \mark_update_structure_from_material:nn #1#2 {
\__mark_extract_and_handle_marks:nn
{ \__mark_update_structure_from_splitmarks:n {#1} }
{ #2 }
}
\cs_new_protected:Npn \__mark_update_structure_from_splitmarks:n #1 {
- \__mark_update_structure_alias:nn { previous-#1 } {#1}
+ \mark_copy_structure:nn { previous-#1 } {#1}
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl }
@@ -16307,9 +16305,9 @@
}
}
}
-\cs_new_protected:Npn \__mark_get_marks_for_reinsertion:nNN #1#2#3 {
- \tl_clear:N \g__mark_first_marks_tl
- \tl_clear:N \g__mark_last_marks_tl
+\cs_new_protected:Npn \mark_get_marks_for_reinsertion:nNN #1#2#3 {
+ \tl_gclear:N \g__mark_first_marks_tl
+ \tl_gclear:N \g__mark_last_marks_tl
\__mark_extract_and_handle_marks:nn
\__mark_get_from_splitmarks:
{ #1 }
@@ -16331,7 +16329,7 @@
\__mark_debug:n { \iow_term:x { Marks:~ extract~ last~
mark~ for~ class~ '##1'~ =~ \g__mark_tmp_tl } }
\tl_gput_right:Ne \g__mark_last_marks_tl
- { \mark_insert:nn {##1} { \g__mark_tmp_tl } }
+ { \mark_insert:nn {##1} { \__mark_drop_id:o { \g__mark_tmp_tl } } }
\__mark_debug:n { \iow_term:x { Marks:~ extract~ first~
mark~ for~ class~ '##1'~ =~
\tex_splitfirstmarks:D
@@ -16340,8 +16338,10 @@
\tl_gput_right:Ne \g__mark_first_marks_tl
{ \mark_insert:nn {##1}
{
- \tex_splitfirstmarks:D
- \use:c { c__mark_class_##1_mark }
+ \__mark_drop_id:o {
+ \tex_splitfirstmarks:D
+ \use:c { c__mark_class_##1_mark }
+ }
}
}
}
@@ -16349,7 +16349,7 @@
}
\tl_new:N \g__mark_first_marks_tl
\tl_new:N \g__mark_last_marks_tl
-\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 {
+\cs_new_protected:Npn \mark_copy_structure:nn #1#2 {
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:cc { g__mark_ #1 _top_ ##1 _tl }
@@ -16360,16 +16360,27 @@
{ g__mark_ #2 _last_ ##1 _tl }
}
}
-\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 {
+\cs_new_protected:Npn \mark_clear_structure:n #1 {
\seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cN { g__mark_ #1 _top_ ##1 _tl }
+ \c__mark_empty_tl
+ \tl_gset_eq:cN { g__mark_ #1 _first_ ##1 _tl }
+ \c__mark_empty_tl
+ \tl_gset_eq:cN { g__mark_ #1 _last_ ##1 _tl }
+ \c__mark_empty_tl
+ }
+}
+\cs_new_protected:Npn \mark_set_structure_to_err:n #1 {
+ \seq_map_inline:Nn \g__mark_classes_seq
{
- \tl_gset:cn { g__mark_ #1 _top_ ##1 _tl } { \__mark_error:n {#1} }
- \tl_gset:cn { g__mark_ #1 _first_ ##1 _tl } { \__mark_error:n {#1} }
- \tl_gset:cn { g__mark_ #1 _last_ ##1 _tl } { \__mark_error:n {#1} }
+ \tl_gset:ce { g__mark_ #1 _top_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
+ \tl_gset:ce { g__mark_ #1 _first_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
+ \tl_gset:ce { g__mark_ #1 _last_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
}
}
-\cs_new_protected:Npn \__mark_error:n #1 {
- \msg_error:nnn { mark } { invalid-use } {#1}
+\cs_new_protected:Npn \__mark_error:nn #1#2 {
+ \msg_error:nnnn { mark } { invalid-use } {#1} {#2}
}
\cs_new_protected:Npn \mark_insert:nn #1#2
{
@@ -16380,8 +16391,7 @@
\hook_use:n { insertmark }
\unrestored at protected@xdef \g__mark_tmp_tl
{
- \__mark_id:n{ \int_use:N\g__mark_int }
- #2
+ \__mark_value:nn{ \int_use:N\g__mark_int }{#2}
}
\__mark_debug:n{ \iow_term:x { Marks:~ set~#1~<-~
'\tl_to_str:V \g__mark_tmp_tl' ~ \msg_line_context: } }
@@ -16397,7 +16407,7 @@
{ \tl_to_str:n {#1} }
}
}
-\cs_new_protected:Npn \__mark_id:n #1 { }
+\cs_new_protected:Npn \__mark_value:nn #1#2 { #2 }
\int_new:N \g__mark_int
\cs_new:Npn \@kernel at before@insertmark {
\cs_set_eq:NN \label \scan_stop:
@@ -16409,11 +16419,16 @@
}
\hook_new:n {insertmark}
-\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use:v { g__mark_#1_first_#2_tl } }
-\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use:v { g__mark_#1_last_#2_tl } }
-\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use:v { g__mark_#1_top_#2_tl } }
-\cs_new:Npn \__mark_use:n #1 { \exp_not:o { \use_none:nn #1 } }
-\cs_generate_variant:Nn \__mark_use:n { v }
+\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_first_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_last_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_top_#2_tl } {#1} {#2} }
+\cs_new:Npn \__mark_use_check:nnn #1#2#3 {
+ \tl_if_eq:cNTF {#1} \relax
+ { \__mark_error:nn {#2} {#3} }
+ { \__mark_drop_id:v {#1} }
+}
+\cs_new:Npn \__mark_drop_id:n #1 { \exp_not:o { #1 } }
+\cs_generate_variant:Nn \__mark_drop_id:n { o, v }
\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
{
\tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
@@ -16444,13 +16459,14 @@
LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
but~this~class~of~marks~does~not~exist.
}
-
\msg_new:nnnn { mark } { invalid-use }
- { Mark~region~'#1'~not ~usable }
+ { Mark~region~'#1'~not~usable~or~class~'#2'~unknown }
{
\c__msg_coding_error_text_tl
- The~region~'#1'~can~only~be~used~after~
- all~columns~have~been~assembled.
+ The~region~'#1'~is~either~not~known~or~data~for~it~
+ still~needs~to~be~assembled,~e.g.,~last-column~
+ while~building~the~first-column.~
+ Also~possible:~the~class~namne~'#2'~is~misspelled.
\c__msg_return_text_tl
}
\bool_new:N \g__mark_debug_bool
@@ -16472,41 +16488,42 @@
}
\cs_new_eq:NN \DebugMarksOn \mark_debug_on:
\cs_new_eq:NN \DebugMarksOff \mark_debug_off:
-\cs_new_protected:Npn \__mark_class_status:nn #1#2
- {
- \typeout{ Marks:~#2~ #1:}
- \typeout{\@spaces page~ (current):
- | \exp_not:v { g__mark_page_top_ #2 _tl }
- | \exp_not:v { g__mark_page_first_ #2 _tl }
- | \exp_not:v { g__mark_page_last_ #2 _tl } |}
- \typeout{\@spaces page~ (previous):
- | \exp_not:v { g__mark_previous-page_top_ #2 _tl }
- | \exp_not:v { g__mark_previous-page_first_ #2 _tl }
- | \exp_not:v { g__mark_previous-page_last_ #2 _tl } |}
- \typeout{\@spaces column~ (previous):
- | \exp_not:v { g__mark_previous-column_top_ #2 _tl }
- | \exp_not:v { g__mark_previous-column_first_ #2 _tl }
- | \exp_not:v { g__mark_previous-column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (current):
- | \exp_not:v { g__mark_column_top_ #2 _tl }
- | \exp_not:v { g__mark_column_first_ #2 _tl }
- | \exp_not:v { g__mark_column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (first):
- | \exp_not:v { g__mark_first-column_top_ #2 _tl }
- | \exp_not:v { g__mark_first-column_first_ #2 _tl }
- | \exp_not:v { g__mark_first-column_last_ #2 _tl } |}
- \typeout{\@spaces column~ (second):
- | \exp_not:v { g__mark_last-column_top_ #2 _tl }
- | \exp_not:v { g__mark_last-column_first_ #2 _tl }
- | \exp_not:v { g__mark_last-column_last_ #2 _tl } |}
+\cs_new_protected:Npn \__mark_class_status:nnn #1#2#3 {
+ \typeout{ Marks:~#2~ #1:}
+ \__mark_region_status:nnn {#2}{ page~ (previous) } { previous-page }
+ \__mark_region_status:nnn {#2}{ page~ (current)~ } { page }
+ \__mark_region_status:nnn {#2}{ column~ (previous) }{ previous-column }
+ \__mark_region_status:nnn {#2}{ column~ (current)~ }{ column }
+ \__mark_region_status:nnn {#2}{ column~ (first) } { first-column }
+ \__mark_region_status:nnn {#2}{ column~ (last)~ } { last-column }
+ \int_step_inline:nn {#3}
+ {
+ \__mark_region_status:nnn {#2}{ column~ (##1)~ } { mcol-##1 }
+ }
}
-\cs_new_protected:Npn \__mark_status:n #1
+\cs_new_protected:Npn \__mark_region_status:nnn #1#2#3 {
+ \group_begin:
+ \cs_set:Npn \__mark_value:nn ##1##2{ \exp_not:n{ {##1} ~ ##2 } }
+ \tl_if_exist:cT { g__mark_#3_last_ #1 _tl }
+ {
+ \tl_if_eq:cNF { g__mark_#3_last_ #1 _tl } \c__mark_empty_tl
+ {
+ \typeout{\@spaces #2 =
+ ~|~ \use:c { g__mark_#3_top_ #1 _tl } ~|~
+ \use:c { g__mark_#3_first_ #1 _tl } ~|~
+ \use:c { g__mark_#3_last_ #1 _tl } ~|
+ }
+ }
+ }
+ \group_end:
+}
+\cs_new_protected:Npn \__mark_status:nn #1#2
{
\seq_map_inline:Nn \g__mark_classes_seq
- { \__mark_class_status:nn {#1} {##1} }
+ { \__mark_class_status:nnn {#1} {##1} {#2} }
}
-\cs_new_protected:Npn \ShowMarksAt #1 {
- \__mark_debug:n { \__mark_status:n {#1} }
+\NewDocumentCommand \ShowMarksAt {m O{4} } {
+ \__mark_debug:n { \__mark_status:nn {#1}{#2} }
}
\cs_new_eq:NN \NewMarkClass \mark_new_class:n
\@onlypreamble \NewMarkClass
@@ -16529,20 +16546,20 @@
\cs_new_protected:Npn \__mark_update_singlecol_structures: {
\box_if_vertical:NTF \@outputbox
{
- \__mark_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \vbox_unpack:N \@outputbox }
}
{
- \__mark_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \hbox_unpack:N \@outputbox }
}
- \__mark_update_structure_alias:nn {previous-column}{previous-page}
- \__mark_update_structure_alias:nn {column}{page}
- \__mark_update_structure_alias:nn {first-column}{page}
- \__mark_update_structure_alias:nn {last-column}{page}
+ \mark_copy_structure:nn {previous-column}{previous-page}
+ \mark_copy_structure:nn {column}{page}
+ \mark_copy_structure:nn {first-column}{page}
+ \mark_copy_structure:nn {last-column}{page}
\__mark_debug:n
{
- \__mark_status:n
+ \__mark_status:nn
{ in~ OR~ (
\legacy_if:nTF {@twoside}
{ twoside-
@@ -16552,25 +16569,26 @@
{ oneside }
)
}
+ {0}
}
}
\cs_new_protected:Npn \__mark_update_dblcol_structures: {
\box_if_vertical:NTF \@outputbox
{
- \__mark_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \vbox_unpack:N \@outputbox }
}
{
- \__mark_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \hbox_unpack:N \@outputbox }
}
\legacy_if:nTF {@firstcolumn}
{
- \__mark_update_structure_alias:nn {first-column}{column}
- \__mark_update_structure_to_err:n {last-column}
+ \mark_copy_structure:nn {first-column}{column}
+ \mark_set_structure_to_err:n {last-column}
}
{
- \__mark_update_structure_alias:nn {last-column}{column}
+ \mark_copy_structure:nn {last-column}{column}
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:cc { g__mark_previous-page_top_ ##1 _tl }
@@ -16598,7 +16616,7 @@
}
\__mark_debug:n
{
- \__mark_status:n
+ \__mark_status:nn
{ in~ OR~ (
\legacy_if:nTF {@twoside}
{ twoside-
@@ -16611,8 +16629,10 @@
{ first~ }{ second~ }
column )
}
+ {0}
}
}
+
\cs_new_eq:NN \@expl@@@mark at update@singlecol at structures@@
\__mark_update_singlecol_structures:
\cs_new_eq:NN \@expl@@@mark at update@dblcol at structures@@
@@ -16638,32 +16658,19 @@
\let\@rightmark\@secondoftwo
\ExplSyntaxOn
\DeclareRobustCommand*\markboth[2]{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \unrestored at protected@xdef\@themark {{#1}{#2}}%
- \@temptokena \expandafter{\@themark}%
\mark_insert:nn{2e-left}{#1}
\mark_insert:nn{2e-right}{#2}
\tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
- \mark{\the\@temptokena}%
- \endgroup
- \if at nobreak\ifvmode\nobreak\fi\fi}
+}
\DeclareRobustCommand*\markright[1]{%
- \begingroup
- \let\label\relax \let\index\relax \let\glossary\relax
- \expandafter\@markright\@themark {#1}%
- \@temptokena \expandafter{\@themark}%
\mark_insert:nn{2e-right}{#1}
\tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
- \mark{\the\@temptokena}%
- \endgroup
- \if at nobreak\ifvmode\nobreak\fi\fi}
+}
\ExplSyntaxOff
-\def\@markright#1#2#3{\@temptokena {#1}%
- \unrestored at protected@xdef\@themark{{\the\@temptokena}{#3}}}
-\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
-\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty}
-\def\@themark{{}{}}
+\ExplSyntaxOn
+\cs_new:Npn \leftmark {\mark_use_last:nn{page}{2e-left}}
+\cs_new:Npn \rightmark {\mark_use_first:nn{page}{2e-right}}
+\ExplSyntaxOff
\DeclareRobustCommand\raggedbottom{%
\def\@textbottom{\vskip \z@ \@plus.0001fil}\let\@texttop\relax}
\DeclareRobustCommand\flushbottom{%
@@ -19066,7 +19073,6 @@
\global\let\if at newlist\@@if at newlist
\global \@colht \textheight
\stepcounter{page}%
- \let\firstmark\botmark
}
\def \@begindvi{%
\unvbox \@begindvibox
@@ -19611,21 +19617,6 @@
\if at firstcolumn
\global\@firstcolumnfalse
\global\setbox\@leftcolumn\copy\@outputbox
- \splitmaxdepth\maxdimen
- \vbadness\maxdimen
- \setbox\@outputbox\vbox{\unvbox\@outputbox\unskip}%
- \setbox\@outputbox\vsplit\@outputbox to\maxdimen
- \toks@\expandafter{\topmark}%
- \xdef\@firstcoltopmark{\the\toks@}%
- \toks@\expandafter{\splitfirstmark}%
- \xdef\@firstcolfirstmark{\the\toks@}%
- \ifx\@firstcolfirstmark\@empty
- \global\let\@setmarks\relax
- \else
- \gdef\@setmarks{%
- \let\firstmark\@firstcolfirstmark
- \let\topmark\@firstcoltopmark}%
- \fi
\else
\global\@firstcolumntrue
\setbox\@outputbox\vbox{%
@@ -19635,8 +19626,7 @@
{\normalcolor\vrule \@width\columnseprule}%
\hfil
\hb at xt@\columnwidth{\box\@outputbox \hss}}}%
- \@combinedblfloats
- \@setmarks
+ \@combinedblfloats
\@outputpage
\begingroup
\@dblfloatplacement
@@ -19691,13 +19681,8 @@
\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
- {
- \prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
- { \prg_return_false: }
- }
-}
+\prg_new_conditional:Npnn \tag_if_active: { p , T , TF, F }
+ { \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 { }
@@ -20266,11 +20251,15 @@
\keys_define:nn { __kernel }
{
lang .str_set:N = \reserved at a ,
- locale .str_set:N = \reserved at a
+ locale .str_set:N = \reserved at a ,
+ words .choices:nn =
+ { all , first }
+ { \str_set:Nn \reserved at b {#1} }
}
\cs_new_protected:Npn \@@text at case@aux #1#2#3
{
\cs_set_nopar:Npn \reserved at a { }
+ \cs_set_nopar:Npn \reserved at b { }
\tl_if_blank:nTF {#2}
{
\str_set:Nx \reserved at a
@@ -20282,7 +20271,7 @@
}
}
{ \keys_set:nn { __kernel } {#2} }
- \use:c { text_ #1 case:Vn } \reserved at a {#3}
+ \use:c { text_ #1 :Vn } \reserved at a {#3}
}
\exp_args_generate:n { cnx }
\cs_set_protected:Npn \reserved at a #1
@@ -20296,20 +20285,22 @@
\reserved at a { Upper }
\reserved at a { Lower }
\reserved at a { Title }
+\cs_generate_variant:Nn \text_titlecase_all:nn { V }
+\cs_generate_variant:Nn \text_titlecase_first:nn { V }
\cs_new_protected:cpn { MakeLowercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \OE \oe
- \@@text at case@aux { lower } {#1} {#2}
+ \@@text at case@aux { lowercase } {#1} {#2}
}}
\cs_new_protected:cpn { MakeUppercase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \oe \OE
- \@@text at case@aux { upper } {#1} {#2}
+ \@@text at case@aux { uppercase } {#1} {#2}
}}
\cs_new_protected:cpn { MakeTitlecase \c_space_tl \c_space_tl \c_space_tl } [#1] #2
{{
\let \oe \OE
- \@@text at case@aux { title } {#1} {#2}
+ \@@text at case@aux { titlecase_ \reserved at b } {#1} {#2}
}}
\cs_new_protected_nopar:Npn\AddToNoCaseChangeList
{\tl_put_right:Nn \l_text_case_exclude_arg_tl}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latex209.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latex209.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latex209.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -167,6 +167,11 @@
\newdimen\@maxsep
\newdimen\@dblmaxsep
\mark{{}{}}
+\ExplSyntaxOn
+\marks1{\__mark_value:nn {2.09-compat}{}}
+\marks2{\__mark_value:nn {2.09-compat}{}}
+\marks3{\__mark_value:nn {2.09-compat}{}}
+\ExplSyntaxOff
\def\sloppy{\tolerance \@M \hfuzz .5\p@ \vfuzz .5\p@}
\def\@finalstrut#1{\unskip\strut}
\let \@marginparreset \@empty
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/latexrelease.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -13967,45 +13967,6 @@
\egroup
}
\def\textcompsubstdefault{\rmsubstdefault}
-\def\DeclareEncodingSubset#1#2{%
- \DeclareEncodingSubset at aux{#1}#2*\DeclareEncodingSubset at aux
-}
-\def\DeclareEncodingSubset at aux#1#2*#3\DeclareEncodingSubset at aux#4{%
- \expandafter\ifx\expandafter X\detokenize{#3}X%
- \@DeclareEncodingSubset{#1}{#2}{#4}%
- \else
- \@DeclareEncodingSubset{#1}{#2LF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TLF}{#4}%
- \@DeclareEncodingSubset{#1}{#2OsF}{#4}%
- \@DeclareEncodingSubset{#1}{#2TOsF}{#4}%
- \fi
-}
-\def\@DeclareEncodingSubset#1#2#3{%
- \@ifundefined{#1:#2}%
- {\@font at info{Setting #2 sub-encoding to #1/#3}}%
- {\@font at info{Changing #2 sub-encoding to #1/#3}}%
- \global\@namedef{#1:#2}{#3}}
-\@onlypreamble\DeclareEncodingSubset
-\@onlypreamble\DeclareEncodingSubset at aux
-\@onlypreamble\@DeclareEncodingSubset
-
-
-\def\CheckEncodingSubset#1#2#3#4#5{%
- \ifnum #4>%
- \expandafter\ifx\csname #2:\f at family\endcsname\relax
- 0\csname #2:?\endcsname
- \else
- \csname #2:\f at family\endcsname
- \fi
- \relax
- \expandafter\@firstoftwo
- \else
- \expandafter\@secondoftwo
- \fi
- {#1{#2}}{#3}%
- #5%
-}
-
\def\tc at errorwarn#1#2{\@latex at info{#1}}
\def\tc at subst#1{%
@@ -14322,11 +14283,7 @@
\DeclareEncodingSubset{TS1}{?}{9}
\DeclareEncodingSubset{TS1}{ccr} {0}
\DeclareEncodingSubset{TS1}{cmbr} {0}
-\DeclareEncodingSubset{TS1}{cmr} {0}
-\DeclareEncodingSubset{TS1}{cmss} {0}
\DeclareEncodingSubset{TS1}{cmtl} {0}
-\DeclareEncodingSubset{TS1}{cmtt} {0}
-\DeclareEncodingSubset{TS1}{cmvtt} {0}
\DeclareEncodingSubset{TS1}{pxr} {0}
\DeclareEncodingSubset{TS1}{pxss} {0}
\DeclareEncodingSubset{TS1}{pxtt} {0}
@@ -15075,7 +15032,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_exist:n {e} { p , T , F, TF }
\cs_new_eq:NN \IfPropertyExistsTF \property_if_exist:eTF
\cs_new:Npn \IfPropertyExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
\cs_new:Npn \IfPropertyExistsF #1 {\property_if_exist:eTF {#1}{} }
@@ -15090,7 +15047,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:n {e} { p , T , F, TF }
\cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }
\cs_new:Npn \IfLabelExistsF #1 {\property_if_recorded:eTF {#1}{} }
@@ -15105,7 +15062,7 @@
\prg_return_false:
}
}
-\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} {TF}
+\prg_generate_conditional_variant:Nnn \property_if_recorded:nn {ee} { p , T , F, 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} }
@@ -17520,6 +17477,9 @@
%% Frank Mittelbach, The LaTeX Project
%%% From File: ltmarks.dtx
+
+
+
\ExplSyntaxOn
\NewModuleRelease{2022/06/01}{ltmarks}
{Marks~handling}
@@ -17538,43 +17498,42 @@
{
\exp_args:Nc \newmarks {c__mark_class_ #1 _mark}
\seq_gput_right:Nn \g__mark_classes_seq {#1}
- \tl_new:c { g__mark_page_top_ #1 _tl }
- \tl_new:c { g__mark_page_first_ #1 _tl }
- \tl_new:c { g__mark_page_last_ #1 _tl }
- \tl_new:c { g__mark_previous-page_top_ #1 _tl }
- \tl_new:c { g__mark_previous-page_first_ #1 _tl }
- \tl_new:c { g__mark_previous-page_last_ #1 _tl }
- \tl_new:c { g__mark_column_top_ #1 _tl }
- \tl_new:c { g__mark_column_first_ #1 _tl }
- \tl_new:c { g__mark_column_last_ #1 _tl }
- \tl_new:c { g__mark_previous-column_top_ #1 _tl }
- \tl_new:c { g__mark_previous-column_first_ #1 _tl }
- \tl_new:c { g__mark_previous-column_last_ #1 _tl }
- \tl_new:c { g__mark_first-column_top_ #1 _tl }
- \tl_new:c { g__mark_first-column_first_ #1 _tl }
- \tl_new:c { g__mark_first-column_last_ #1 _tl }
- \tl_new:c { g__mark_last-column_top_ #1 _tl }
- \tl_new:c { g__mark_last-column_first_ #1 _tl }
- \tl_new:c { g__mark_last-column_last_ #1 _tl }
- \tl_set:cn { g__mark_page_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_page_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_page_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-page_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_previous-column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_first-column_last_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_top_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_first_ #1 _tl }{ \__mark_id:n{0} }
- \tl_set:cn { g__mark_last-column_last_ #1 _tl }{ \__mark_id:n{0} }
+ \__mark_init_region:nn {page}{#1}
+ \__mark_init_region:nn {previous-page}{#1}
+ \__mark_init_region:nn {column}{#1}
+ \__mark_init_region:nn {previous-column}{#1}
+ \__mark_init_region:nn {first-column}{#1}
+ \__mark_init_region:nn {last-column}{#1}
+ \__mark_init_region:nn {mcol-1}{#1}
+ \__mark_init_region:nn {mcol-2}{#1}
+ \__mark_init_region:nn {mcol-3}{#1}
+ \__mark_init_region:nn {mcol-4}{#1}
+ \__mark_init_region:nn {mcol-5}{#1}
+ \__mark_init_region:nn {mcol-6}{#1}
+ \__mark_init_region:nn {mcol-7}{#1}
+ \__mark_init_region:nn {mcol-8}{#1}
+ \__mark_init_region:nn {mcol-9}{#1}
+ \__mark_init_region:nn {mcol-10}{#1}
+ \__mark_init_region:nn {mcol-11}{#1}
+ \__mark_init_region:nn {mcol-12}{#1}
+ \__mark_init_region:nn {mcol-13}{#1}
+ \__mark_init_region:nn {mcol-14}{#1}
+ \__mark_init_region:nn {mcol-15}{#1}
+ \__mark_init_region:nn {mcol-16}{#1}
+ \__mark_init_region:nn {mcol-17}{#1}
+ \__mark_init_region:nn {mcol-18}{#1}
+ \__mark_init_region:nn {mcol-19}{#1}
+ \__mark_init_region:nn {mcol-20}{#1}
}
+\cs_new_protected:Npn \__mark_init_region:nn #1 #2 {
+ \tl_new:c { g__mark_#1_top_ #2 _tl }
+ \tl_new:c { g__mark_#1_first_ #2 _tl }
+ \tl_new:c { g__mark_#1_last_ #2 _tl }
+ \tl_set_eq:cN { g__mark_#1_top_ #2 _tl } \c__mark_empty_tl
+ \tl_set_eq:cN { g__mark_#1_first_ #2 _tl } \c__mark_empty_tl
+ \tl_set_eq:cN { g__mark_#1_last_ #2 _tl } \c__mark_empty_tl
+}
+\tl_const:Nn \c__mark_empty_tl { \__mark_value:nn{0}{} }
\box_new:N \l__mark_box
\box_new:N \l__mark_ii_box
\tl_new:N \g__mark_tmp_tl
@@ -17626,13 +17585,13 @@
\exp_not:N \l__mark_saved_parameters_tl
}
\tl_new:N \l__mark_saved_parameters_tl
-\cs_new_protected:Npn \__mark_update_structure_from_material:nn #1#2 {
+\cs_new_protected:Npn \mark_update_structure_from_material:nn #1#2 {
\__mark_extract_and_handle_marks:nn
{ \__mark_update_structure_from_splitmarks:n {#1} }
{ #2 }
}
\cs_new_protected:Npn \__mark_update_structure_from_splitmarks:n #1 {
- \__mark_update_structure_alias:nn { previous-#1 } {#1}
+ \mark_copy_structure:nn { previous-#1 } {#1}
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:Nc \g__mark_new_top_tl { g__mark_#1_last_##1_tl }
@@ -17656,9 +17615,9 @@
}
}
}
-\cs_new_protected:Npn \__mark_get_marks_for_reinsertion:nNN #1#2#3 {
- \tl_clear:N \g__mark_first_marks_tl
- \tl_clear:N \g__mark_last_marks_tl
+\cs_new_protected:Npn \mark_get_marks_for_reinsertion:nNN #1#2#3 {
+ \tl_gclear:N \g__mark_first_marks_tl
+ \tl_gclear:N \g__mark_last_marks_tl
\__mark_extract_and_handle_marks:nn
\__mark_get_from_splitmarks:
{ #1 }
@@ -17676,12 +17635,14 @@
}
{
\tl_gput_right:Ne \g__mark_last_marks_tl
- { \mark_insert:nn {##1} { \g__mark_tmp_tl } }
+ { \mark_insert:nn {##1} { \__mark_drop_id:o { \g__mark_tmp_tl } } }
\tl_gput_right:Ne \g__mark_first_marks_tl
{ \mark_insert:nn {##1}
{
- \tex_splitfirstmarks:D
- \use:c { c__mark_class_##1_mark }
+ \__mark_drop_id:o {
+ \tex_splitfirstmarks:D
+ \use:c { c__mark_class_##1_mark }
+ }
}
}
}
@@ -17689,7 +17650,7 @@
}
\tl_new:N \g__mark_first_marks_tl
\tl_new:N \g__mark_last_marks_tl
-\cs_new_protected:Npn \__mark_update_structure_alias:nn #1#2 {
+\cs_new_protected:Npn \mark_copy_structure:nn #1#2 {
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:cc { g__mark_ #1 _top_ ##1 _tl }
@@ -17700,16 +17661,27 @@
{ g__mark_ #2 _last_ ##1 _tl }
}
}
-\cs_new_protected:Npn \__mark_update_structure_to_err:n #1 {
+\cs_new_protected:Npn \mark_clear_structure:n #1 {
\seq_map_inline:Nn \g__mark_classes_seq
+ {
+ \tl_gset_eq:cN { g__mark_ #1 _top_ ##1 _tl }
+ \c__mark_empty_tl
+ \tl_gset_eq:cN { g__mark_ #1 _first_ ##1 _tl }
+ \c__mark_empty_tl
+ \tl_gset_eq:cN { g__mark_ #1 _last_ ##1 _tl }
+ \c__mark_empty_tl
+ }
+}
+\cs_new_protected:Npn \mark_set_structure_to_err:n #1 {
+ \seq_map_inline:Nn \g__mark_classes_seq
{
- \tl_gset:cn { g__mark_ #1 _top_ ##1 _tl } { \__mark_error:n {#1} }
- \tl_gset:cn { g__mark_ #1 _first_ ##1 _tl } { \__mark_error:n {#1} }
- \tl_gset:cn { g__mark_ #1 _last_ ##1 _tl } { \__mark_error:n {#1} }
+ \tl_gset:ce { g__mark_ #1 _top_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
+ \tl_gset:ce { g__mark_ #1 _first_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
+ \tl_gset:ce { g__mark_ #1 _last_ ##1 _tl } { \__mark_value:nn{?}{\__mark_error:nn {#1}{?} }}
}
}
-\cs_new_protected:Npn \__mark_error:n #1 {
- \msg_error:nnn { mark } { invalid-use } {#1}
+\cs_new_protected:Npn \__mark_error:nn #1#2 {
+ \msg_error:nnnn { mark } { invalid-use } {#1} {#2}
}
\cs_new_protected:Npn \mark_insert:nn #1#2
{
@@ -17720,8 +17692,7 @@
\hook_use:n { insertmark }
\unrestored at protected@xdef \g__mark_tmp_tl
{
- \__mark_id:n{ \int_use:N\g__mark_int }
- #2
+ \__mark_value:nn{ \int_use:N\g__mark_int }{#2}
}
\tex_marks:D \use:c { c__mark_class_ #1 _mark }
{
@@ -17735,7 +17706,7 @@
{ \tl_to_str:n {#1} }
}
}
-\cs_new_protected:Npn \__mark_id:n #1 { }
+\cs_new_protected:Npn \__mark_value:nn #1#2 { #2 }
\int_new:N \g__mark_int
\cs_new:Npn \@kernel at before@insertmark {
\cs_set_eq:NN \label \scan_stop:
@@ -17747,11 +17718,16 @@
}
\hook_new:n {insertmark}
-\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use:v { g__mark_#1_first_#2_tl } }
-\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use:v { g__mark_#1_last_#2_tl } }
-\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use:v { g__mark_#1_top_#2_tl } }
-\cs_new:Npn \__mark_use:n #1 { \exp_not:o { \use_none:nn #1 } }
-\cs_generate_variant:Nn \__mark_use:n { v }
+\cs_new:Npn \mark_use_first:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_first_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_last:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_last_#2_tl } {#1} {#2} }
+\cs_new:Npn \mark_use_top:nn #1#2 { \__mark_use_check:nnn { g__mark_#1_top_#2_tl } {#1} {#2} }
+\cs_new:Npn \__mark_use_check:nnn #1#2#3 {
+ \tl_if_eq:cNTF {#1} \relax
+ { \__mark_error:nn {#2} {#3} }
+ { \__mark_drop_id:v {#1} }
+}
+\cs_new:Npn \__mark_drop_id:n #1 { \exp_not:o { #1 } }
+\cs_generate_variant:Nn \__mark_drop_id:n { o, v }
\prg_new_conditional:Npnn \mark_if_eq:nnnn #1#2#3#4 { T , F , TF }
{
\tl_if_eq:ccTF { g__mark_ #1 _#3_ #2 _tl }
@@ -17782,13 +17758,14 @@
LaTeX~was~asked~to~manipulate~a~mark~of~class~'#1',~
but~this~class~of~marks~does~not~exist.
}
-
\msg_new:nnnn { mark } { invalid-use }
- { Mark~region~'#1'~not ~usable }
+ { Mark~region~'#1'~not~usable~or~class~'#2'~unknown }
{
\c__msg_coding_error_text_tl
- The~region~'#1'~can~only~be~used~after~
- all~columns~have~been~assembled.
+ The~region~'#1'~is~either~not~known~or~data~for~it~
+ still~needs~to~be~assembled,~e.g.,~last-column~
+ while~building~the~first-column.~
+ Also~possible:~the~class~namne~'#2'~is~misspelled.
\c__msg_return_text_tl
}
\bool_new:N \g__mark_debug_bool
@@ -17810,7 +17787,7 @@
}
\cs_new_eq:NN \DebugMarksOn \mark_debug_on:
\cs_new_eq:NN \DebugMarksOff \mark_debug_off:
-\cs_new_protected:Npn \ShowMarksAt #1 {
+\NewDocumentCommand \ShowMarksAt {m O{4} } {
}
\cs_new_eq:NN \NewMarkClass \mark_new_class:n
\@onlypreamble \NewMarkClass
@@ -17833,35 +17810,35 @@
\cs_new_protected:Npn \__mark_update_singlecol_structures: {
\box_if_vertical:NTF \@outputbox
{
- \__mark_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \vbox_unpack:N \@outputbox }
}
{
- \__mark_update_structure_from_material:nn {page}
+ \mark_update_structure_from_material:nn {page}
{ \hbox_unpack:N \@outputbox }
}
- \__mark_update_structure_alias:nn {previous-column}{previous-page}
- \__mark_update_structure_alias:nn {column}{page}
- \__mark_update_structure_alias:nn {first-column}{page}
- \__mark_update_structure_alias:nn {last-column}{page}
+ \mark_copy_structure:nn {previous-column}{previous-page}
+ \mark_copy_structure:nn {column}{page}
+ \mark_copy_structure:nn {first-column}{page}
+ \mark_copy_structure:nn {last-column}{page}
}
\cs_new_protected:Npn \__mark_update_dblcol_structures: {
\box_if_vertical:NTF \@outputbox
{
- \__mark_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \vbox_unpack:N \@outputbox }
}
{
- \__mark_update_structure_from_material:nn {column}
+ \mark_update_structure_from_material:nn {column}
{ \hbox_unpack:N \@outputbox }
}
\legacy_if:nTF {@firstcolumn}
{
- \__mark_update_structure_alias:nn {first-column}{column}
- \__mark_update_structure_to_err:n {last-column}
+ \mark_copy_structure:nn {first-column}{column}
+ \mark_set_structure_to_err:n {last-column}
}
{
- \__mark_update_structure_alias:nn {last-column}{column}
+ \mark_copy_structure:nn {last-column}{column}
\seq_map_inline:Nn \g__mark_classes_seq
{
\tl_gset_eq:cc { g__mark_previous-page_top_ ##1 _tl }
@@ -17888,6 +17865,7 @@
}
}
}
+
\cs_new_eq:NN \@expl@@@mark at update@singlecol at structures@@
\__mark_update_singlecol_structures:
\cs_new_eq:NN \@expl@@@mark at update@dblcol at structures@@
@@ -17910,6 +17888,20 @@
\ExplSyntaxOff
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% From File: ltpage.dtx
+\IncludeInRelease{2025/06/01}%
+ {\markboth}{Drop legacy mark support}%
+\ExplSyntaxOn
+\DeclareRobustCommand*\markboth[2]{%
+ \mark_insert:nn{2e-left}{#1}
+ \mark_insert:nn{2e-right}{#2}
+ \tl_if_empty:nF{#2}{ \mark_insert:nn{2e-right-nonempty}{#2} }
+}
+\DeclareRobustCommand*\markright[1]{%
+ \mark_insert:nn{2e-right}{#1}
+ \tl_if_empty:nF{#1}{ \mark_insert:nn{2e-right-nonempty}{#1} }
+}
+\ExplSyntaxOff
+\EndIncludeInRelease
\IncludeInRelease{2022/06/01}%
{\markboth}{New mark support}%
\ExplSyntaxOn
@@ -17960,10 +17952,42 @@
\IncludeInRelease{0000/00/00}%
{\markboth}{Make commands robust}%
-\kernel at make@fragile\markboth
-\kernel at make@fragile\markright
+%\kernel at make@fragile\markboth
+%\kernel at make@fragile\markright
+\def\markboth#1#2{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \unrestored at protected@xdef\@themark {{#1}{#2}}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if at nobreak\ifvmode\nobreak\fi\fi}
+\def\markright#1{%
+ \begingroup
+ \let\label\relax \let\index\relax \let\glossary\relax
+ \expandafter\@markright\@themark {#1}%
+ \@temptokena \expandafter{\@themark}%
+ \mark{\the\@temptokena}%
+ \endgroup
+ \if at nobreak\ifvmode\nobreak\fi\fi}
\EndIncludeInRelease
+\IncludeInRelease{2025/06/01}%
+ {\leftmark}{Use new mark mechanism}%
+\ExplSyntaxOn
+\cs_new:Npn \leftmark {\mark_use_last:nn{page}{2e-left}}
+\cs_new:Npn \rightmark {\mark_use_first:nn{page}{2e-right}}
+\ExplSyntaxOff
+\EndIncludeInRelease
+\IncludeInRelease{0000/00/00}%
+ {\leftmark}{Use new mark mechanism}%
+
+\def\leftmark{\expandafter\@leftmark\botmark\@empty\@empty}
+\def\rightmark{\expandafter\@rightmark\firstmark\@empty\@empty}
+\def\@themark{{}{}}
+\def\@markright#1#2#3{\@temptokena {#1}%
+\unrestored at protected@xdef\@themark{{\the\@temptokena}{#3}}}
+\EndIncludeInRelease
%%% From File: ltclass.dtx
@@ -20321,6 +20345,63 @@
\fi
}%
\EndIncludeInRelease
+\IncludeInRelease{2025/06/01}%
+ {\@outputpage}{Use new mark mechanism}%
+\def\@outputpage{%
+\begingroup
+ \let \protect \noexpand
+ \language\document at default@language
+ \@resetactivechars
+ \global\let\@@if at newlist\if at newlist
+ \global\@newlistfalse
+ \@parboxrestore
+ \shipout \vbox{%
+ \set at typeset@protect
+ \aftergroup \endgroup
+ \aftergroup \set at typeset@protect
+ \if at specialpage
+ \global\@specialpagefalse\@nameuse{ps@\@specialstyle}%
+ \fi
+ \if at twoside
+ \ifodd\count\z@ \let\@thehead\@oddhead \let\@thefoot\@oddfoot
+ \let\@themargin\oddsidemargin
+ \else \let\@thehead\@evenhead
+ \let\@thefoot\@evenfoot \let\@themargin\evensidemargin
+ \fi
+ \fi
+ \reset at font
+ \normalsize
+ \normalsfcodes
+ \let\label\@gobble
+ \let\index\@gobble
+ \let\glossary\@gobble
+ \baselineskip\z at skip \lineskip\z at skip \lineskiplimit\z@
+ \@begindvi
+ \vskip \topmargin
+ \moveright\@themargin \vbox {%
+ \setbox\@tempboxa \vbox to\headheight{%
+ \vfil
+ \color at hbox
+ \normalcolor
+ \hb at xt@\textwidth{\@thehead}%
+ \color at endbox
+ }%
+ \dp\@tempboxa \z@
+ \box\@tempboxa
+ \vskip \headsep
+ \box\@outputbox
+ \baselineskip \footskip
+ \color at hbox
+ \normalcolor
+ \hb at xt@\textwidth{\@thefoot}%
+ \color at endbox
+ }%
+ }%
+ \global\let\if at newlist\@@if at newlist
+ \global \@colht \textheight
+ \stepcounter{page}%
+}
+\EndIncludeInRelease
\IncludeInRelease{2017/04/15}%
{\@outputpage}{Reset language for hyphenation}%
\def\@outputpage{%
@@ -20894,6 +20975,31 @@
\endgroup
}
\EndIncludeInRelease
+\IncludeInRelease{2025/06/01}%
+ {\@outputdblcol}{Use new mark mechanism}%
+\def\@outputdblcol{%
+ \if at firstcolumn
+ \global\@firstcolumnfalse
+ \global\setbox\@leftcolumn\copy\@outputbox
+ \else
+ \global\@firstcolumntrue
+ \setbox\@outputbox\vbox{%
+ \hb at xt@\textwidth{%
+ \hb at xt@\columnwidth{\box\@leftcolumn \hss}%
+ \hfil
+ {\normalcolor\vrule \@width\columnseprule}%
+ \hfil
+ \hb at xt@\columnwidth{\box\@outputbox \hss}}}%
+ \@combinedblfloats
+ \@outputpage
+ \begingroup
+ \@dblfloatplacement
+ \@startdblcolumn
+ \@whilesw\if at fcolmade \fi{\@outputpage
+ \@startdblcolumn}%
+ \endgroup
+ \fi}%
+\EndIncludeInRelease
\IncludeInRelease{2015/01/01}%
{\@outputdblcol}{2 column marks}%
\def\@outputdblcol{%
@@ -20933,7 +21039,7 @@
\@whilesw\if at fcolmade \fi{\@outputpage
\@startdblcolumn}%
\endgroup
- \fi}%
+ \fi}
\EndIncludeInRelease
\IncludeInRelease{0000/00/00}%
{\@outputdblcol}{2 column marks}%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omlcmm.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omlcmm.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omlcmm.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{omlcmm.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OML}{cmm}{\skewchar\font127 }
\DeclareFontShape{OML}{cmm}{m}{it}%
{<5><6><7><8><9>gen*cmmi%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omlcmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omlcmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omlcmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{omlcmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OML}{cmr}{\skewchar\font127 }
\DeclareFontShape{OML}{cmr}{m}{n}%
{<->ssub*cmm/m/it}{}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omlenc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omlenc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omlenc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{omlenc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\DeclareFontEncoding{OML}{}{}
\DeclareTextSymbol{\textless}{OML}{`\<}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omscmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omscmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omscmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{omscmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OMS}{cmr}{\skewchar\font48 }
\DeclareFontShape{OMS}{cmr}{m}{n}%
{<->ssub*cmsy/m/n}{}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omscmsy.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omscmsy.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omscmsy.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{omscmsy.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OMS}{cmsy}{\skewchar\font48 }
\DeclareFontShape{OMS}{cmsy}{m}{n}{%
<5><6><7><8><9><10>gen*cmsy%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omsenc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{omsenc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\DeclareFontEncoding{OMS}{}{}
\DeclareTextSymbol{\textasteriskcentered}{OMS}{3} % "03
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/omxcmex.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/omxcmex.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/omxcmex.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{omxcmex.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OMX}{cmex}{}
\DeclareFontShape{OMX}{cmex}{m}{n}{%
<->sfixed*cmex10%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmdh.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmdh.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmdh.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmdh.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmdh}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmdh}{m}{n}{%
<10>cmdunh10%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfib.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfib.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfib.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmfib.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmfib}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmfib}{m}{n}{%
<8>cmfib8%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmfr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmfr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmfr}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmfr}{m}{n}{%
<10>cmff10%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmr}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmr}{m}{n}%
{<5><6><7><8><9><10><12>gen*cmr%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmss.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmss.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmss.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmss.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmss}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmss}{m}{n}
{%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmtt}{\hyphenchar \font\m at ne}
\DeclareFontShape{OT1}{cmtt}{m}{n}
{%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmvtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmvtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1cmvtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ot1cmvtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{OT1}{cmvtt}{\hyphenchar\font45 }
\DeclareFontShape{OT1}{cmvtt}{m}{n}%
{%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot1enc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{ot1enc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\DeclareFontEncoding{OT1}{}{}
\DeclareTextAccent{\"}{OT1}{127}
@@ -117,6 +117,7 @@
\DeclareTextCompositeCommand{\'}{OT1}{i}{\@tabacckludge'\i}
\DeclareTextCompositeCommand{\^}{OT1}{i}{\^\i}
\DeclareTextCompositeCommand{\"}{OT1}{i}{\"\i}
+\DeclareTextCompositeCommand{\=}{OT1}{i}{\=\i}
\ifx\textcommaabove\@undefined\else
\DeclareTextCompositeCommand{\c}{OT1}{g}{\textcommaabove{g}}
\fi
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ot4enc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ot4enc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ot4enc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{ot4enc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\DeclareFontEncoding{OT4}{}{}
\DeclareFontSubstitution{OT4}{cmr}{m}{n}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/preload.cfg 2024-11-26 21:21:14 UTC (rev 72979)
@@ -37,7 +37,7 @@
%%
%%% From File: fontdef.dtx
\ProvidesFile{preload.cfg}
- [2024/09/03 v3.0k LaTeX Kernel
+ [2024/11/19 v3.0l LaTeX Kernel
(Uncustomized preload font setup)
]
%%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmdh.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmdh.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmdh.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmdh.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfib.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfib.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfib.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmfib.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmfr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmfr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmss.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmss.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmss.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmss.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at ssfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at ttfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1cmvtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1cmvtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1cmvtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{t1cmvtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at ttfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/t1enc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{t1enc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\DeclareFontEncoding{T1}{}{}
\DeclareTextAccent{\`}{T1}{0}
@@ -291,6 +291,7 @@
\DeclareTextCompositeCommand{\c}{T1}{R}{\textcommabelow{R}}
\DeclareTextCompositeCommand{\c}{T1}{r}{\textcommabelow{r}}
\fi
+\DeclareTextCompositeCommand{\=}{T1}{\i}{\=\i}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/textcomp-2018-08-11.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/textcomp-2018-08-11.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/textcomp-2018-08-11.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -64,7 +64,6 @@
{\PackageInfo{textcomp}{Setting #2 sub-encoding to #1/#3}}%
{\PackageInfo{textcomp}{Changing #2 sub-encoding to #1/#3}}%
\@namedef{#1:#2}{#3}}
-\@onlypreamble\DeclareEncodingSubset
\newif\iftc at forced \tc at forcedfalse
\DeclareOption{full}{\DeclareEncodingSubset{TS1}{?}{0}}
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ts1cmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
@@ -60,6 +60,7 @@
\EC at family{TS1}{cmr}{bx}{it}{tcbi}
\EC at family{TS1}{cmr}{bx}{sl}{tcbl}
\EC at family{TS1}{cmr}{m}{ui}{tcui}
+\DeclareEncodingSubset{TS1}{cmr}{0}
\endinput
%%
%% End of file `ts1cmr.fd'.
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmss.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmss.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmss.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ts1cmss.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at family}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8><9><10><10.95><12><14.4>%
@@ -58,6 +58,7 @@
\EC at family{TS1}{cmss}{bx}{n}{tcsx}
\EC at family{TS1}{cmss}{bx}{it}{tcso}
\EC at family{TS1}{cmss}{bx}{sl}{tcso}
+\DeclareEncodingSubset{TS1}{cmss}{0}
\endinput
%%
%% End of file `ts1cmss.fd'.
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ts1cmtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at ttfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
@@ -56,6 +56,7 @@
\EC at ttfamily{TS1}{cmtt}{m}{n}{tctt}
\EC at ttfamily{TS1}{cmtt}{m}{sl}{tcst}
\EC at ttfamily{TS1}{cmtt}{m}{it}{tcit}
+\DeclareEncodingSubset{TS1}{cmtt}{0}
\endinput
%%
%% End of file `ts1cmtt.fd'.
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmvtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmvtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ts1cmvtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ts1cmvtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\providecommand{\EC at ttfamily}[5]{%
\DeclareFontShape{#1}{#2}{#3}{#4}%
{<5><6><7><8>#50800%
@@ -55,6 +55,7 @@
\DeclareFontFamily{TS1}{cmvtt}{}
\EC at ttfamily{TS1}{cmvtt}{m}{n}{tcvt}
\EC at ttfamily{TS1}{cmvtt}{m}{it}{tcvi}
+\DeclareEncodingSubset{TS1}{cmvtt}{0}
\endinput
%%
%% End of file `ts1cmvtt.fd'.
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/tuenc.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/tuenc.def 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/tuenc.def 2024-11-26 21:21:14 UTC (rev 72979)
@@ -43,7 +43,7 @@
%% extension .ins) which are part of the distribution.
%%% From File: ltoutenc.dtx
\ProvidesFile{tuenc.def}
- [2021/04/29 v2.0v
+ [2024/11/06 v2.1b
Standard LaTeX file]
\providecommand\UnicodeEncodingName{TU}
\begingroup\expandafter\expandafter\expandafter\endgroup
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ucmr.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ucmr.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ucmr.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ucmr.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{U}{cmr}{\hyphenchar\font45 }
\DeclareFontShape{U}{cmr}{m}{n}%
{<5><6><7><8><9><10><12>gen*cmr%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ucmss.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ucmss.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ucmss.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ucmss.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{U}{cmss}{\hyphenchar\font45 }
\DeclareFontShape{U}{cmss}{m}{n}%
{%
Modified: trunk/Master/texmf-dist/tex/latex-dev/base/ucmtt.fd
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/base/ucmtt.fd 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/base/ucmtt.fd 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,7 +46,7 @@
%% making successful document exchange impossible.
%%
\ProvidesFile{ucmtt.fd}
- [2023/04/13 v2.5m Standard LaTeX font definitions]
+ [2024/11/19 v2.5n Standard LaTeX font definitions]
\DeclareFontFamily{U}{cmtt}{\hyphenchar \font\m at ne}
\DeclareFontShape{U}{cmtt}{m}{n}%
{%
Modified: trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/firstaid/latex2e-first-aid-for-external-files.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -34,8 +34,8 @@
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
-\def\LaTeXFirstAidDate{2024/10/16}
-\def\LaTeXFirstAidVersion{v1.1g}
+\def\LaTeXFirstAidDate{2024/11/24}
+\def\LaTeXFirstAidVersion{v1.1j}
\ProvidesFile{latex2e-first-aid-for-external-files.ltx}
[\LaTeXFirstAidDate\space \LaTeXFirstAidVersion\space
LaTeX kernel fixes to external files and packages]
@@ -236,14 +236,17 @@
{\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}%
+ \csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
\aftergroup\firstaid at cref@smugglelabel
}
+ \newif\iftag@
\AddToHook{label}[firstaid/cleveref]
{\ifx
\@currentcounter\@empty
\else
- \firstaid at cref@updatelabeldata{\@currentcounter}
+ \iftag@\else
+ \firstaid at cref@updatelabeldata{\@currentcounter}%
+ \fi
\fi}
}%
}
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/block-latex-lab-testphase.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-10-11}
-\def\ltlabblockversion{0.8v}
+\def\ltlabblockdate{2024-11-25}
+\def\ltlabblockversion{0.8w}
\ProvidesFile{block-latex-lab-testphase.ltx}
[\ltlabblockdate\space v\ltlabblockversion\space
blockenv implementation]
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/firstaid-latex-lab-testphase.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-10-16}
-\def\ltlabfirstaidversion{0.85h}
+\def\ltlabfirstaiddate{2024-11-23}
+\def\ltlabfirstaidversion{0.85i}
\ProvidesFile{firstaid-latex-lab-testphase.ltx}
[\ltlabfirstaiddate\space v\ltlabfirstaidversion\space
latex-lab wrapper firstaid]
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/float-latex-lab-testphase.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-09-20}
-\def\ltlabfloatversion{0.81f}
+\def\ltlabfloatdate{2024-11-21}
+\def\ltlabfloatversion{0.81g}
\ProvidesFile{float-latex-lab-testphase.ltx}
[\ltlabfloatdate\space v\ltlabfloatversion\space latex-lab wrapper float]
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-math.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-math.dtx
-\def\ltlabmathdate{2024-10-25}
-\def\ltlabmathversion{0.6i}
+\def\ltlabmathdate{2024-11-26}
+\def\ltlabmathversion{0.6j}
\ProvidesFile{latex-lab-math.ltx}
[\ltlabmathdate\space
v\ltlabmathversion\space
@@ -355,6 +355,8 @@
\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
+\cs_new:Npn\__math_luamml_structelem:{}
+\cs_new:Npn\__math_luamml_ignore:{}
\msg_new:nnn { tag }{ PDF-2.0-recommended }
{
The~key~#1~will~not~work~properly~with~PDF~#2.\\
@@ -367,7 +369,8 @@
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 =
+ math/mathml/structelem .choice:,
+ math/mathml/structelem/true .code:n =
{
\pdf_version_compare:NnT < {2.0}
{
@@ -374,8 +377,15 @@
\msg_warning:nnne { tag }{ PDF-2.0-recommended }
{ math/mathml/structelem }{ \pdf_version: }
}
- \AddToHook{begindocument/end}{\luamml_structelem:}
+ \cs_set:Npn\__math_luamml_structelem:{\luamml_structelem:}
+ \cs_set:Npn\__math_luamml_ignore:{\luamml_ignore:}
},
+ math/mathml/structelem/false .code:n =
+ {
+ \cs_set_eq:NN\__math_luamml_structelem:\prg_do_nothing:
+ \cs_set_eq:NN\__math_luamml_ignore:\prg_do_nothing:
+ },
+ math/mathml/structelem .default:n = true,
math/mathml/ignore .code:n = {\luamml_ignore:},
math/mathml/luamml/write .choice:,
math/mathml/luamml/write/true .code:n =
@@ -524,7 +534,7 @@
}
\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} %
+\socket_new:nn {tagsupport/math/inline/formula/begin}{2} %
\socket_new:nn {tagsupport/math/inline/formula/end}{0}
\socket_new_plug:nnn
{tagsupport/math/inline/begin}
@@ -538,11 +548,12 @@
{tagsupport/math/inline/formula/begin}
{default}
{ \tagpdfparaOff
+ \__math_luamml_structelem:
\tag_socket_use:n{math/content}
\tag_socket_use:n{math/struct/begin}
% inner formula if multiple parts (not really implemented yet)
\tag_socket_use:n{math/substruct/begin}
- #1
+ #2
\tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
@@ -554,7 +565,7 @@
}
\socket_new:nn {tagsupport/math/display/begin}{0}
\socket_new:nn {tagsupport/math/display/end}{0}
-\socket_new:nn {tagsupport/math/display/formula/begin}{1} %
+\socket_new:nn {tagsupport/math/display/formula/begin}{2} %
\socket_new:nn {tagsupport/math/display/formula/end}{0}
\socket_new_plug:nnn
@@ -571,10 +582,12 @@
{tagsupport/math/display/formula/begin}
{default}
{
+ \tagpdfparaOff
+ \__math_luamml_structelem:
\tag_socket_use:n{math/content}
\tag_socket_use:n{math/struct/begin}
\tag_socket_use:n{math/substruct/begin}
- #1
+ #2
\tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
@@ -774,30 +787,14 @@
{single}
{ \tag_mc_end:}
\socket_new:nn {tagsupport/math/end}{0}
-
-\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}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{identity}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{noop}
- \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}
- }
-\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}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{default}
- \socket_assign_plug:nn {tagsupport/math/inline/formula/end}{default}
- \socket_assign_plug:nn {tagsupport/math/display/begin}{default}
- \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}
- }
-\AtBeginDocument{\tag_if_active:T{\__tag_math_enable: }}
+\socket_assign_plug:nn {tagsupport/math/inline/begin}{MC}
+\socket_assign_plug:nn {tagsupport/math/inline/end}{MC}
+\socket_assign_plug:nn {tagsupport/math/inline/formula/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/inline/formula/end}{default}
+\socket_assign_plug:nn {tagsupport/math/display/begin}{default}
+\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}
\cs_new_protected:Npn \__math_process:nn #1#2
{
\legacy_if:nF { measuring@ }
@@ -828,11 +825,12 @@
{ \tl_if_blank_p:n {#1} }
}
{
+ \__math_luamml_ignore:
#1 $ % $
}
{
\tag_socket_use:n {math/inline/begin} %end P-MC
- \socket_use:nn {tagsupport/math/inline/formula/begin}{#1}
+ \tag_socket_use:nnn {math/inline/formula/begin}{}{#1}
$ % $
\tag_socket_use:n {math/inline/formula/end}
\tag_socket_use:n {math/inline/end} % restart P-MC
@@ -847,7 +845,7 @@
{
\__math_process:nn { equation* } {#1}
\tag_socket_use:n {math/display/begin}
- \socket_use:nn{tagsupport/math/display/formula/begin}{#1}
+ \tag_socket_use:nn{math/display/formula/begin}{}{#1}
}
$$
}
@@ -856,7 +854,6 @@
% \typeout{== tag dollarldollar display end}
% \ShowTagging{struct-stack}
\para_raw_end:
- \tagpdfparaOn
\l__math_tmpa_skip \lastskip
\tag_socket_use:n{math/display/formula/end}
\nobreak
@@ -1069,14 +1066,13 @@
{
\__tag_tool_close_P:
}
- \socket_use:nn{tagsupport/math/display/formula/begin}{}
- \tagpdfparaOff
+ \tag_socket_use:nn{math/display/formula/begin}{}{}
}
\cs_new:Npn \@kernel at math@registered at end {
\para_raw_end:
\tagpdfparaOn
- \socket_use:n{tagsupport/math/display/formula/end}
+ \tag_socket_use:n{tagsupport/math/display/formula/end}
\@endpetrue
}
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-block.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,15 +33,13 @@
%%
%%
%% File: latex-lab-block.dtx (C) Copyright 2021-2024 LaTeX Project
-\def\ltlabblockdate{2024-10-11}
-\def\ltlabblockversion{0.8v}
+\def\ltlabblockdate{2024-11-25}
+\def\ltlabblockversion{0.8w}
\ProvidesPackage {latex-lab-testphase-block}
[\ltlabblockdate\space v\ltlabblockversion\space
blockenv implementation]
\RequirePackage{latex-lab-kernel-changes}
\ExplSyntaxOn
-\tl_new:N \l__block_item_align_tl
-\tl_new:N\l__block_legacy_env_params_tl
\def\@doendpe{\@endpetrue
\def\par
{
@@ -82,11 +80,11 @@
}
\DeclareTemplateInterface{block}{display}{1}
{
- heading : tokenlist = , %??
+ heading : tokenlist = , % ??
beginsep : skip = \topsep ,
begin-par-skip : skip = \partopsep ,
par-skip : skip = \parsep ,
- end-skip : skip = \KeyValue{beginsep} , % conflict with name below
+ 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} ,
@@ -93,10 +91,11 @@
endpenalty : integer = \UseName{@endparpenalty} ,
leftmargin : length = \leftmargin ,
rightmargin : length = \rightmargin ,
- parindent : length = \listparindent ,
+ parindent : length = 0pt ,
}
\DeclareTemplateInterface{para}{std}{1}
{
+ para-class : tokenlist = justify ,
indent-width : length = \parindent ,
start-skip : skip = 0pt ,
left-skip : skip = 0pt ,
@@ -105,7 +104,6 @@
fixed-word-spaces : boolean = false ,
final-hyphen-demerits : integer = 5000 ,
cr-cmd : tokenlist = \@normalcr ,
- para-class : tokenlist = justify ,
}
\DeclareTemplateInterface{list}{std}{1} % optional
{
@@ -163,226 +161,6 @@
\cs_new_protected:Npn \DebugBlocksOn { \block_debug_on: }
\cs_new_protected:Npn \DebugBlocksOff { \block_debug_off: }
\DebugBlocksOff
-\NewDocumentEnvironment{displayblock}{ !O{} }
- { \UseInstance{blockenv}{displayblock} {#1} }
- { \endblockenv }
-\NewDocumentEnvironment{displayblockflattened}{ !O{} }
- { \UseInstance{blockenv}{displayblockflattened} {#1} }
- { \endblockenv }
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{center} { !O{} }
- { \UseInstance{blockenv}{center}{#1} }
- { \endblockenv }
- \RenewDocumentEnvironment{flushright} { !O{} }
- { \UseInstance{blockenv}{flushright}{#1} }
- { \endblockenv }
- \RenewDocumentEnvironment{flushleft} { !O{} }
- { \UseInstance{blockenv}{flushleft}{#1} }
- { \endblockenv }
-}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{quote}{ !O{} }
- { \UseInstance{blockenv}{quote} {#1} }
- { \endblockenv }
- \RenewDocumentEnvironment{quotation}{ !O{} }
- { \UseInstance{blockenv}{quotation} {#1} }
- { \endblockenv }
-}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{verbatim}{ !O{} }
- { \UseInstance{blockenv}{verbatim} {#1}
- \@setupverbinvisiblespace\frenchspacing\@vobeyspaces
- \@xverbatim
- }
- { \endblockenv }
- \RenewDocumentEnvironment{verbatim*}{ !O{} }
- { \UseInstance{blockenv}{verbatim} {#1}
- \@setupverbvisiblespace\frenchspacing\@vobeyspaces
- \@sxverbatim
- }
- { \endblockenv }
-}
-\def\legacyverbatimsetup{%
- \language\l at nohyphenation
- \@tempswafalse
- \def\par{%
- \if at tempswa
- \leavevmode \null {\@@par}\penalty\interlinepenalty
- \else
- \@tempswatrue
- \ifhmode{\@@par}\penalty\interlinepenalty\fi
- \fi}%
- \let\do\@makeother \dospecials
- \obeylines \verbatim at font \@noligs
- \everypar \expandafter{\the\everypar \unpenalty}%
- \tl_set:Nn \l__tag_para_main_tag_tl {codeline}
- \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code}
-}
-\newcommand\@setupverbinvisiblespace{}
-\tag_if_active:T {
- \bool_if:NF\g__tag_mode_lua_bool
- {
- \renewcommand\@setupverbinvisiblespace{\def\@xobeysp{\nobreakspace\pdffakespace}}
- }
-}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{itemize}{!O{}}
- { \UseInstance{blockenv}{itemize} {#1} }
- { \endblockenv }
- \RenewDocumentEnvironment{enumerate}{!O{}}
- { \UseInstance{blockenv}{enumerate} {#1} }
- { \endblockenv }
- \RenewDocumentEnvironment{description}{!O{}}
- { \UseInstance{blockenv}{description} {#1} }
- { \endblockenv }
-}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{verse}{ !O{} }
- {
- \let\\\@centercr
- \UseInstance{blockenv}{list}
- {
- item-indent=-1.5em,
- parindent=-1.5em,
- item-skip=0pt,
- rightmargin=\leftmargin,
- leftmargin=\leftmargin+1.5em,
- #1
- }
- \item\relax
- }
- { \endblockenv }
- }
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{list}{O{} m m }
- {
- \tl_set:Nn \l__block_legacy_env_params_tl
- {
- \tl_set:Nn \@itemlabel {#2}
- #3
- }
- \UseInstance{blockenv}{list} {#1}
- }
- { \endblockenv }
-}
-\cs_new:Npn \legacylistsetupcode {
- \dim_zero:N \listparindent
- \dim_zero:N \rightmargin
- \dim_zero:N \itemindent
- \let\makelabel\@mklab % TODO: customize
- \l__block_legacy_env_params_tl
- \legacy_if:nTF { @nmbrlist }
- { \tl_set:Nn \l__tag_L_attr_class_tl {enumerate} } % numbered list
- { \tl_if_empty:NTF \@itemlabel
- { \tl_set:Nn \l__tag_L_attr_class_tl {list} } % no label
- { \tl_set:Nn \l__tag_L_attr_class_tl {itemize} } % unnumbered, unordered
- }
-}
-\AddToHook{begindocument/before}{
- \RenewDocumentEnvironment{trivlist}{ !O{} }
- { \list[#1]{}
- {
- \dim_zero:N \leftmargin
- \dim_zero:N \labelwidth
- \cs_set_eq:NN \makelabel \use:n
- }
- }
- { \endblockenv }
-}
-\RenewDocumentCommand \newtheorem { m O{#1} m o }
-{
- \expandafter\@ifdefinable\csname #1\endcsname
- {
- \str_if_eq:nnTF{#1}{#2}
- {
- \@definecounter {#2}
- \IfNoValueTF {#4}
- { % @ynthm
- \tl_gset:ce { the #2 }
- {
- \@thmcounter{#2}
- }
- }
- { % @xnthm
- \@newctr{#1}[#4]
- \tl_gset:ce { the #2 }
- {
- \expandafter\noexpand\csname the#4\endcsname
- \@thmcountersep
- \@thmcounter{#2}
- }
- }
- }
- { % @othm
- \@ifundefined{c@#2}
- { \@nocounterr{#2} }
- {
- \tl_gset:cn { the #1 }
- { \UseName { the #2 } }
- }
- }
- \global\@namedef{#1} { \@thm{#2}{#3} }
- \global\@namedef{end#1}{ \@endtheorem }
- }
-}
-\tl_new:N \l__block_thm_current_counter_tl
-\def\@thm#1#2{%
- \@kernel at refstepcounter{#1}
- \tl_set:Nn \l__block_thm_current_counter_tl{#1}
- \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
-\def\hyper at nopatch@thm{}
-\def\@begintheorem#1#2{
- \UseInstance{blockenv}{theorem}{}
- \tagpdfparaOff
- \mode_leave_vertical:
- \MakeLinkTarget{\l__block_thm_current_counter_tl}
- \tag_struct_begin:n{tag=Caption}
- \group_begin:
- \bfseries
- \tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
- #2
- \tag_mc_end:
- \tag_struct_end:
- \group_end:
- \tag_struct_end:
- \tagpdfparaOn
- \__block_start_para_structure_unconditionally:n { \PARALABEL }
- \itshape
- \hskip\labelsep
- \ignorespaces
-}
-\def\@opargbegintheorem#1#2#3{
- \UseInstance{blockenv}{theorem}{}
- \tagpdfparaOff
- \mode_leave_vertical:
- \MakeLinkTarget{\l__block_thm_current_counter_tl}
- \tag_struct_begin:n{tag=Caption}
- \group_begin:
- \bfseries
- \tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
- #2
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n {}
- \ (#3)
- \tag_mc_end:
- \group_end:
- \tag_struct_end:
- \tagpdfparaOn
- \__block_start_para_structure_unconditionally:n { \PARALABEL }
- \itshape
- \hskip\labelsep
- \ignorespaces
-}
-\def\@endtheorem{\endblockenv}
\cs_new:Npn \g_block_nesting_depth_int { \@listdepth } % a fake int
% for now
\DeclareTemplateCode{blockenv}{display}{1}
@@ -395,11 +173,11 @@
setup-code = \l__block_setup_code_tl ,
block-instance = \l__block_block_instance_tl ,
para-instance = \l__block_para_instance_tl ,
+ para-flattened = \l__tag_para_flattened_bool ,
inner-level-counter = \l__block_inner_level_counter_tl ,
max-inner-levels = \l__block_max_inner_levels_tl ,
inner-instance-type = \l__block_inner_instance_type_tl ,
inner-instance = \l__block_inner_instance_tl ,
- para-flattened = \l__tag_para_flattened_bool ,
final-code = \l__block_final_code_tl ,
}
{
@@ -430,10 +208,12 @@
{ \@toodeep }
{
\int_gincr:N \g_block_nesting_depth_int
- \use:c { @list \int_to_roman:n { \g_block_nesting_depth_int } }
+ \use:c { @list \int_to_roman:n
+ { \g_block_nesting_depth_int } }
}
}
- \tag_if_active:T { \use:c { __block_recipe_ \l__block_tagging_recipe_tl : } }
+ \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 }
@@ -446,7 +226,8 @@
{#1}
\tl_if_empty:NF \l__block_para_instance_tl
{
- \__block_debug_typeout:n{use~ para~ instance:~ \l__block_para_instance_tl }
+ \__block_debug_typeout:n{ use~ para~ instance:~
+ \l__block_para_instance_tl }
\UseInstance{para}{ \l__block_para_instance_tl } {}
}
\tl_if_empty:NF \l__block_inner_instance_tl
@@ -457,8 +238,8 @@
\UseInstance{ \l__block_inner_instance_type_tl }
{ \l__block_inner_instance_tl
\tl_if_empty:NF \l__block_inner_level_counter_tl
- { - \int_use:N \l__block_inner_level_counter_tl } % not clean
- % use "o"?
+ % not clean use "o"?
+ { - \int_use:N \l__block_inner_level_counter_tl }
}
{#1}
}
@@ -538,12 +319,13 @@
endpenalty = \@endparpenalty ,
rightmargin = \rightmargin ,
leftmargin = \leftmargin ,
- parindent = \listparindent ,
+ parindent = \l__block_parindent_dim ,
}
{
\tl_if_empty:nF {#1} { \SetTemplateKeys{block}{display}{#1} }
\tl_if_blank:oF \l__block_heading_tl
- { \mode_leave_vertical: \textbf{\l__block_heading_tl} } % TODO customize
+ { \mode_leave_vertical:
+ \textbf{\l__block_heading_tl} } % TODO customize
\legacy_if:nT { @noskipsec } { \mode_leave_vertical: }
\skip_set:Nn \l__block_topsepadd_skip { \topsep }
\mode_if_vertical:TF
@@ -586,7 +368,7 @@
}
\skip_set_eq:NN \@outerparskip \parskip
\skip_set_eq:NN \parskip \parsep
- \dim_set_eq:NN \parindent \listparindent
+ \dim_set_eq:NN \parindent \l__block_parindent_dim
\dim_add:Nn \linewidth { - \rightmargin - \leftmargin }
\dim_add:Nn \@totalleftmargin { \leftmargin }
\tex_parshape:D 1 ~ \@totalleftmargin \linewidth
@@ -604,7 +386,8 @@
{
\__block_skip_set_to_last:N \l__block_tmpa_skip
\skip_vertical:n { - \l__block_tmpa_skip }
- \skip_vertical:n { \l__block_tmpa_skip + \@outerparskip - \parskip }
+ \skip_vertical:n { \l__block_tmpa_skip +
+ \@outerparskip - \parskip }
}
}
{
@@ -624,13 +407,16 @@
,listparindent .skip_set:N = \listparindent
}
\cs_new:Npn \__kernel_displayblock_begin: {
- \__block_debug_typeout:n{\detokenize{__kernel_displayblock_begin:}}
+ \__block_debug_typeout:n
+ {\detokenize{__kernel_displayblock_begin:}}
}
\cs_new:Npn \__kernel_displayblock_beginpar_hmode:w {
- \__block_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_hmode:w}}
+ \__block_debug_typeout:n
+ {\detokenize{__kernel_displayblock_beginpar_hmode:w}}
}
\cs_new:Npn \__kernel_displayblock_beginpar_vmode: {
- \__block_debug_typeout:n{\detokenize{__kernel_displayblock_beginpar_vmode:}}
+ \__block_debug_typeout:n
+ {\detokenize{__kernel_displayblock_beginpar_vmode:}}
}
\tl_new:N \@itemlabel % should have a top-level definition
\tl_new:N \@listctr % should have a top-level definition
@@ -725,10 +511,13 @@
\tl_if_novalue:oTF \l__block_label_given_tl
{
\tl_if_blank:oF \@listctr { \@kernel at refstepcounter \@listctr }
- \bool_if:NTF \l__block_item_compatibility_bool % not sure that conditional
- % makes sense
- { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}\@itemlabel } } % TODO ?
- { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}\__block_counter_label:n { \@listctr } } }
+ \bool_if:NTF \l__block_item_compatibility_bool % not sure that
+ % conditional
+ % makes sense
+ { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}%
+ \@itemlabel } } % TODO ?
+ { \__block_make_label_box:n { \MakeLinkTarget[\@listctr]{}%
+ \__block_counter_label:n { \@listctr } } }
}
{
\__block_debug_typeout:n{item~ with~ optional}
@@ -736,7 +525,8 @@
\bool_if:nT
{
\l__block_label_boxed_bool
- && \dim_compare_p:n { \box_wd:N \l__block_one_label_box <= \linewidth } % TODO: is \linewidth correct?
+ && \dim_compare_p:n
+ { \box_wd:N \l__block_one_label_box <= \linewidth }
}
{
\dim_compare:nNnT
@@ -765,11 +555,13 @@
{ \bool_if:NT \l__block_long_label_bool { \nobreak \hfil \break } }
% version of \newline inside an hbox that will be unpacked
}
- % \skip_set_eq:NN \parsep \l__block_item_parsep_skip TODO??? FMi
- % what's that?
- \dim_set_eq:NN \parindent \listparindent
+ % TODO??? FMi what's that?
+ % \skip_set_eq:NN \parsep \l__block_item_parsep_skip
+ \dim_compare:nNnF \listparindent = {0pt}
+ { \dim_set_eq:NN \parindent \listparindent }
\cs_set_eq:NN \__block_item_everypar: \__block_item_everypar_std:
}
+\tl_new:N \l__block_item_align_tl
\box_new:N \l__block_one_label_box
\box_new:N \g__block_labels_box
\bool_new:N \l__block_long_label_bool
@@ -860,6 +652,270 @@
}
\cs_new_eq:NN \__kernel_list_item_begin: \prg_do_nothing:
\cs_new_eq:NN \__kernel_list_item_end: \prg_do_nothing:
+\tag_if_active:TF {
+ \cs_set:Npn \__block_beginpar_vmode: {
+ \__block_debug_typeout:n
+ { @endpe = \legacy_if:nTF { @endpe }{true}{false}
+ \on at line }
+ \legacy_if:nTF { @endpe }
+ {
+ \legacy_if_gset_false:n { @endpe }
+ }
+ {
+ \int_compare:nNnT \l__tag_block_flattened_level_int < 2
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ }
+ }
+ \cs_set:Npn \__block_beginpar_hmode:N #1
+ {
+ \tag_mc_end:
+ \__tag_gincr_para_end_int:
+ \__block_debug_typeout:n{increment~ /P \on at line }
+ \bool_if:NT \l__tag_para_show_bool
+ { \tag_mc_begin:n{artifact}
+ \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int}
+ \tag_mc_end:
+ }
+ \tag_struct_end:
+ \tagpdfparaOff \par \tagpdfparaOn
+ }
+\cs_set:Npn \__kernel_displayblock_doendpe: {
+ \bool_if:NT \l__tag_para_bool
+ {
+ \legacy_if:nT { @endpe }
+ {
+ \__block_debug_typeout:n
+ { flattened= \bool_if:NTF
+ \l__tag_para_flattened_bool
+ {true}{false}
+ \on at line }
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__block_debug_typeout:n{Structure-end~
+ \l__tag_para_main_tag_tl\space
+ after~ displayblock \on at line }
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end: %text-unit
+ }
+ }
+ }
+}
+\RemoveFromHook{para/begin}[tagpdf]
+\AddToHook{para/begin}[tagpdf]{
+ \bool_if:NT \l__tag_para_bool {
+ \legacy_if:nF { @inlabel }
+ {
+ \__block_start_para_structure:n { \PARALABEL }
+ }
+ }
+}
+\cs_new_protected:Npn \__block_start_para_structure:n #1 {
+ \__block_debug_typeout:n
+ { @endpe = \legacy_if:nTF { @endpe }{true}{false}
+ \on at line }
+ \legacy_if:nF { @endpe }
+ {
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ }
+ \__tag_gincr_para_begin_int:
+ \__block_debug_typeout:n{increment~ P \on at line }
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_tag_tl
+ ,attribute-class=\l__tag_para_attr_class_tl
+ }
+ \__tag_check_para_begin_show:nn {green}{#1}
+ \tag_mc_begin:n {}
+}
+\cs_new_protected:Npn \__block_start_para_structure_unconditionally:n #1 {
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_main_tag_tl,
+ attribute-class=\l__tag_para_main_attr_class_tl,
+ }
+ \__tag_para_main_store_struct:
+ }
+ \__tag_gincr_para_begin_int:
+ \__block_debug_typeout:n{increment~ P \on at line }
+ \tag_struct_begin:n
+ {
+ tag=\l__tag_para_tag_tl
+ ,attribute-class=\l__tag_para_attr_class_tl
+ }
+ \__tag_check_para_begin_show:nn {green}{#1}
+ \tag_mc_begin:n {}
+}
+\RemoveFromHook{para/end}[tagpdf]
+\AddToHook{para/end}
+ {
+ \bool_if:NT \l__tag_para_bool
+ {
+ \__tag_gincr_para_end_int:
+ \__block_debug_typeout:n{increment~ /P \on at line }
+ \tag_mc_end:
+ \__tag_check_para_end_show:nn {red}{}
+ \tag_struct_end:
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end:
+ }
+ }
+ }
+\def\PARALABEL{NP-}
+\cs_set_protected:Npn \para_end: {
+ \scan_stop:
+ \mode_if_horizontal:TF {
+ \mode_if_inner:F {
+ \tex_unskip:D
+ \hook_use:n{para/end}
+ \@kernel at after@para at end
+ \mode_if_horizontal:TF {
+ \if_int_compare:w 11 = \tex_lastnodetype:D
+ \tex_hskip:D \c_zero_dim
+ \fi:
+ \tex_par:D
+ \hook_use:n{para/after}
+ \@kernel at after@para at after
+ }
+ { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} }
+ }
+ }
+ {
+ \__kernel_endpe_vmode: % should do nothing if no tagging
+ \tex_par:D
+ }
+}
+\cs_set_eq:NN \par \para_end:
+\cs_set_eq:NN \__blockpar \para_end:
+\cs_set_eq:NN \endgraf \para_end:
+\DeclareRobustCommand*\begin[1]{%
+ \UseHook{env/#1/before}%
+ \@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}%
+ \@execute at begin@hook{#1}%
+ \csname #1\endcsname}}%
+ \@ignorefalse
+ \begingroup
+ \__kernel_endpe_vmode:
+ \reserved at a}
+\cs_new:Npn \__kernel_endpe_vmode: {
+ \if at endpe \ifvmode
+ \bool_if:NT \l__tag_para_bool
+{
+ \bool_if:NF \l__tag_para_flattened_bool
+ {
+ \__tag_gincr_para_main_end_int:
+ \tag_struct_end:
+ }
+ \@endpefalse
+}
+ \fi \fi
+}
+\cs_set:Npn \__kernel_list_label_after: {
+ \bool_if:NT \l__tag_para_bool
+ {
+ \__block_start_para_structure_unconditionally:n { LI- }
+ }
+}
+\cs_new:Npn \__block_inner_begin: {
+ \tagstructbegin{tag=\l__block_tag_inner_tag_tl}
+}
+\cs_new:Npn \__block_inner_end: {
+ \__block_debug_typeout:n{block-end \on at line}
+ \legacy_if:nT { @endpe }
+ {
+ \__tag_gincr_para_main_end_int:
+ \__block_debug_typeout:n{close~ /text-unit \on at line}
+ \tagstructend
+ }
+ \tagstructend % end inner structure
+}
+\tl_new:N \l__tag_L_tag_tl
+\tl_set:Nn \l__tag_L_tag_tl {L}
+
+\tl_new:N\l__tag_L_attr_class_tl
+\tl_set:Nn \l__tag_L_attr_class_tl {list}
+\tag_if_active:T
+{
+ \tagpdfsetup
+ {
+ role/new-attribute = {itemize}
+ {/O /List /ListNumbering/Unordered},
+ role/new-attribute = {enumerate}
+ {/O /List /ListNumbering/Ordered},
+ role/new-attribute = {description}
+ {/O /List /ListNumbering/Description},
+ % default if unknown
+ role/new-attribute = {list}{/O /List /ListNumbering/Unordered},
+ }
+}
+\def\LItag{LI}
+\cs_set:Npn \__block_list_begin: {
+ \tagstructbegin
+ {
+ tag=\l__tag_L_tag_tl
+ ,attribute-class=\l__tag_L_attr_class_tl
+ }
+}
+\cs_set:Npn \__block_list_item_begin: { \tagstructbegin{tag=\LItag} }
+\cs_set:Npn \__kernel_list_label_begin: {
+ \tagstructbegin{tag=Lbl}
+ \tagmcbegin{tag=Lbl}
+}
+\cs_set:Npn \__kernel_list_label_end: {
+ \tagmcend % end mc-Lbl or artifact
+ \tagstructend % end Lbl
+ \tagstructbegin{tag=\LBody}
+}
+\def\LBody{LBody}
+\cs_set:Npn \__block_list_item_end: {
+ \legacy_if:nT { @endpe }
+ {
+ \__tag_gincr_para_main_end_int:
+ \tagstructend % text-unit
+ }
+ \tagstructend \tagstructend % end LBody, LI
+}
+\cs_set:Npn \__block_list_end: {
+ \legacy_if:nF { @newlist }
+ {
+ \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 % end L
+}
+}
+{
+ \cs_new:Npn \__block_start_para_structure_unconditionally:n #1 {}
+}
\cs_new:Npn \__block_recipe_basic: {
\cs_set_eq:NN \__kernel_displayblock_beginpar_hmode:w
\__block_beginpar_hmode:N
@@ -913,18 +969,233 @@
{ \tl_set:Nn \l__tag_L_attr_class_tl {} }
{ \tl_set_eq:NN \l__tag_L_attr_class_tl \l__block_tag_class_tl }
}
-
+\NewDocumentEnvironment{displayblock}{ !O{} }
+ { \UseInstance{blockenv}{displayblock} {#1} }
+ { \endblockenv }
+\NewDocumentEnvironment{displayblockflattened}{ !O{} }
+ { \UseInstance{blockenv}{displayblockflattened} {#1} }
+ { \endblockenv }
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{center} { !O{} }
+ { \UseInstance{blockenv}{center}{#1} }
+ { \endblockenv }
+ \RenewDocumentEnvironment{flushright} { !O{} }
+ { \UseInstance{blockenv}{flushright}{#1} }
+ { \endblockenv }
+ \RenewDocumentEnvironment{flushleft} { !O{} }
+ { \UseInstance{blockenv}{flushleft}{#1} }
+ { \endblockenv }
+}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{quote}{ !O{} }
+ { \UseInstance{blockenv}{quote} {#1} }
+ { \endblockenv }
+ \RenewDocumentEnvironment{quotation}{ !O{} }
+ { \UseInstance{blockenv}{quotation} {#1} }
+ { \endblockenv }
+}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{verbatim}{ !O{} }
+ { \UseInstance{blockenv}{verbatim} {#1}
+ \@setupverbinvisiblespace\frenchspacing\@vobeyspaces
+ \@xverbatim
+ }
+ { \endblockenv }
+ \RenewDocumentEnvironment{verbatim*}{ !O{} }
+ { \UseInstance{blockenv}{verbatim} {#1}
+ \@setupverbvisiblespace\frenchspacing\@vobeyspaces
+ \@sxverbatim
+ }
+ { \endblockenv }
+}
+\def\legacyverbatimsetup{%
+ \language\l at nohyphenation
+ \@tempswafalse
+ \def\par{%
+ \if at tempswa
+ \leavevmode \null {\@@par}\penalty\interlinepenalty
+ \else
+ \@tempswatrue
+ \ifhmode{\@@par}\penalty\interlinepenalty\fi
+ \fi}%
+ \let\do\@makeother \dospecials
+ \obeylines \verbatim at font \@noligs
+ \everypar \expandafter{\the\everypar \unpenalty}%
+ \tl_set:Nn \l__tag_para_main_tag_tl {codeline}
+ \tagtool{paratag=Code}% oder faster: \tl_set:Nn\l__tag_para_tag_tl{Code}
+}
+\newcommand\@setupverbinvisiblespace{}
+\tag_if_active:T {
+ \bool_if:NF\g__tag_mode_lua_bool
+ {
+ \renewcommand\@setupverbinvisiblespace
+ {\def\@xobeysp{\nobreakspace\pdffakespace}}
+ }
+}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{itemize}{!O{}}
+ { \UseInstance{blockenv}{itemize} {#1} }
+ { \endblockenv }
+ \RenewDocumentEnvironment{enumerate}{!O{}}
+ { \UseInstance{blockenv}{enumerate} {#1} }
+ { \endblockenv }
+ \RenewDocumentEnvironment{description}{!O{}}
+ { \UseInstance{blockenv}{description} {#1} }
+ { \endblockenv }
+}
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{verse}{ !O{} }
+ {
+ \let\\\@centercr
+ \UseInstance{blockenv}{list}
+ {
+ item-indent=-1.5em,
+ parindent=-1.5em,
+ item-skip=0pt,
+ rightmargin=\leftmargin,
+ leftmargin=\leftmargin+1.5em,
+ #1
+ }
+ \item\relax
+ }
+ { \endblockenv }
+ }
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{list}{O{} m m }
+ {
+ \tl_set:Nn \l__block_legacy_env_params_tl
+ {
+ \tl_set:Nn \@itemlabel {#2}
+ #3
+ }
+ \UseInstance{blockenv}{list} {#1}
+ }
+ { \endblockenv }
+}
+\cs_new:Npn \legacylistsetupcode {
+ \dim_zero:N \listparindent
+ \dim_zero:N \rightmargin
+ \dim_zero:N \itemindent
+ \let\makelabel\@mklab % TODO: customize
+ \l__block_legacy_env_params_tl
+ \legacy_if:nTF { @nmbrlist }
+ { \tl_set:Nn \l__tag_L_attr_class_tl {enumerate} } % numbered list
+ { \tl_if_empty:NTF \@itemlabel
+ { \tl_set:Nn \l__tag_L_attr_class_tl {list} } % no label
+ { \tl_set:Nn \l__tag_L_attr_class_tl {itemize} } % unnumbered,
+ % unordered
+ }
+}
+\tl_new:N\l__block_legacy_env_params_tl
+\AddToHook{begindocument/before}{
+ \RenewDocumentEnvironment{trivlist}{ !O{} }
+ { \list[#1]{}
+ {
+ \dim_zero:N \leftmargin
+ \dim_zero:N \labelwidth
+ \cs_set_eq:NN \makelabel \use:n
+ }
+ }
+ { \endblockenv }
+}
+\RenewDocumentCommand \newtheorem { m O{#1} m o }
+{
+ \expandafter\@ifdefinable\csname #1\endcsname
+ {
+ \str_if_eq:nnTF{#1}{#2}
+ {
+ \@definecounter {#2}
+ \IfNoValueTF {#4}
+ { % @ynthm
+ \tl_gset:ce { the #2 }
+ {
+ \@thmcounter{#2}
+ }
+ }
+ { % @xnthm
+ \@newctr{#1}[#4]
+ \tl_gset:ce { the #2 }
+ {
+ \expandafter\noexpand\csname the#4\endcsname
+ \@thmcountersep
+ \@thmcounter{#2}
+ }
+ }
+ }
+ { % @othm
+ \@ifundefined{c@#2}
+ { \@nocounterr{#2} }
+ {
+ \tl_gset:cn { the #1 }
+ { \UseName { the #2 } }
+ }
+ }
+ \global\@namedef{#1} { \@thm{#2}{#3} }
+ \global\@namedef{end#1}{ \@endtheorem }
+ }
+}
+\tl_new:N \l__block_thm_current_counter_tl
+\def\@thm#1#2{%
+ \@kernel at refstepcounter{#1}
+ \tl_set:Nn \l__block_thm_current_counter_tl{#1}
+ \@ifnextchar[{\@ythm{#1}{#2}}{\@xthm{#1}{#2}}}
+\def\hyper at nopatch@thm{}
+\def\@begintheorem#1#2{
+ \UseInstance{blockenv}{theorem}{}
+ \tagpdfparaOff
+ \noindent
+ \MakeLinkTarget{\l__block_thm_current_counter_tl}
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n {}
+ #2
+ \tag_mc_end:
+ \tag_struct_end:
+ \group_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+ \__block_start_para_structure_unconditionally:n { \PARALABEL }
+ \itshape
+ \hskip\labelsep
+ \ignorespaces
+}
+\def\@opargbegintheorem#1#2#3{
+ \UseInstance{blockenv}{theorem}{}
+ \tagpdfparaOff
+ \noindent
+ \MakeLinkTarget{\l__block_thm_current_counter_tl}
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n {}
+ #2
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin:n {}
+ \ (#3)
+ \tag_mc_end:
+ \group_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+ \__block_start_para_structure_unconditionally:n { \PARALABEL }
+ \itshape
+ \hskip\labelsep
+ \ignorespaces
+}
+\def\@endtheorem{\endblockenv}
\DeclareInstance{blockenv}{displayblock}{display}
{
env-name = displayblock,
- tag-name = ,
- tag-class = ,
- tagging-recipe = standard,
- inner-level-counter = ,
level-increase = false,
- setup-code = ,
- block-instance = displayblock ,
- inner-instance = ,
}
\DeclareInstance{blockenv}{displayblockflattened}{display}
{
@@ -981,7 +1252,7 @@
para-instance = raggedleft ,
inner-instance = ,
}
- %
+
\DeclareInstance{blockenv}{quotation}{display}
{
env-name = quotation,
@@ -1006,7 +1277,6 @@
block-instance = quoteblock ,
inner-instance = ,
}
-
\DeclareInstance{blockenv}{theorem}{display}
{
env-name = theorem-like,
@@ -1016,7 +1286,7 @@
inner-level-counter = ,
level-increase = false,
setup-code = ,
- block-instance = displayblock ,
+ block-instance = theoremblock ,
}
\DeclareInstance{blockenv}{verbatim}{display}
{
@@ -1087,7 +1357,6 @@
\DeclareInstance{block}{displayblock-0}{display}
{
leftmargin = 0pt ,
- parindent = 0pt ,
}
\DeclareInstanceCopy{block}{displayblock-1}{displayblock-0}
\DeclareInstanceCopy{block}{displayblock-2}{displayblock-0}
@@ -1098,7 +1367,6 @@
\DeclareInstance{block}{verbatimblock-0}{display}
{
leftmargin = 0pt ,
- parindent = 0pt ,
par-skip = 0pt ,
}
\DeclareInstanceCopy{block}{verbatimblock-1}{verbatimblock-0}
@@ -1121,6 +1389,12 @@
\DeclareInstanceCopy{block}{quotationblock-4}{quotationblock-1}
\DeclareInstanceCopy{block}{quotationblock-5}{quotationblock-1}
\DeclareInstanceCopy{block}{quotationblock-6}{quotationblock-1}
+\DeclareInstance{block}{theoremblock-0}{display}
+ {
+ leftmargin = 0pt ,
+ parindent = \parindent ,
+ par-skip = \parskip ,
+ }
\DeclareInstance{block}{list-1}{display}{
}
\DeclareInstance{block}{list-2}{display}{}
@@ -1146,9 +1420,7 @@
}
\DeclareInstance{list}{description}{std} { item-instance = description }
\DeclareInstance{item}{basic}{std}
- {
- label-align = right ,
- }
+ { label-align = right }
\DeclareInstance{item}{description}{std}
{
label-format = \normalfont\bfseries #1 ,
@@ -1166,313 +1438,43 @@
}
\DeclareInstance{para}{center}{std}
{
+ para-class = center ,
indent-width = 0pt ,
- start-skip = 0pt ,
left-skip = \@flushglue ,
right-skip = \@flushglue ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = center ,
}
\DeclareInstance{para}{raggedright}{std}
{
+ para-class = raggedright ,
indent-width = 0pt ,
- start-skip = 0pt ,
left-skip = \z at skip ,
right-skip = \@flushglue ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = raggedright ,
}
\DeclareInstance{para}{raggedleft}{std}
{
+ para-class = raggedleft ,
indent-width = 0pt ,
- start-skip = 0pt ,
left-skip = \@flushglue ,
right-skip = \z at skip ,
end-skip = \z at skip ,
final-hyphen-demerits = 0 ,
cr-cmd = \@centercr ,
- para-class = raggedleft ,
}
\DeclareInstance{para}{justify}{std}
{
- start-skip = 0pt ,
- left-skip = \z at skip ,
- right-skip = \z at skip ,
- end-skip = \@flushglue ,
- final-hyphen-demerits = 5000 ,
- cr-cmd = \@normalcr ,
- para-class = justify ,
}
\DeclareRobustCommand\centering {\UseInstance{para}{center}{}}
\DeclareRobustCommand\raggedleft {\UseInstance{para}{raggedleft}{}}
\DeclareRobustCommand\raggedright{\UseInstance{para}{raggedright}{}}
\DeclareRobustCommand\justifying {\UseInstance{para}{justify}{}}
-
\justifying
-\tag_if_active:TF {
- \cs_set:Npn \__block_beginpar_vmode: {
- \__block_debug_typeout:n
- { @endpe = \legacy_if:nTF { @endpe }{true}{false}
- \on at line }
- \legacy_if:nTF { @endpe }
- {
- \legacy_if_gset_false:n { @endpe }
- }
- {
- \int_compare:nNnT \l__tag_block_flattened_level_int < 2
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- }
- }
- \cs_set:Npn \__block_beginpar_hmode:N #1
- {
- \tag_mc_end:
- \__tag_gincr_para_end_int:
- \__block_debug_typeout:n{increment~ /P \on at line }
- \bool_if:NT \l__tag_para_show_bool
- { \tag_mc_begin:n{artifact}
- \rlap{\color_select:n{red}\tiny\ \int_use:N\g__tag_para_end_int}
- \tag_mc_end:
- }
- \tag_struct_end:
- \tagpdfparaOff \par \tagpdfparaOn
- }
-\cs_set:Npn \__kernel_displayblock_doendpe: {
- \bool_if:NT \l__tag_para_bool
- {
- \legacy_if:nT { @endpe }
- {
- \__block_debug_typeout:n
- { flattened= \bool_if:NTF
- \l__tag_para_flattened_bool {true}{false}
- \on at line }
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__block_debug_typeout:n{Structure-end~
- \l__tag_para_main_tag_tl\space after~ displayblock \on at line }
- \__tag_gincr_para_main_end_int:
- \tag_struct_end: %text-unit
- }
- }
- }
-}
-\RemoveFromHook{para/begin}[tagpdf]
-\AddToHook{para/begin}[tagpdf]{
- \bool_if:NT \l__tag_para_bool {
- \legacy_if:nF { @inlabel }
- {
- \__block_start_para_structure:n { \PARALABEL }
- }
- }
-}
-\cs_new_protected:Npn \__block_start_para_structure:n #1 {
- \__block_debug_typeout:n
- { @endpe = \legacy_if:nTF { @endpe }{true}{false}
- \on at line }
- \legacy_if:nF { @endpe }
- {
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- }
- \__tag_gincr_para_begin_int:
- \__block_debug_typeout:n{increment~ P \on at line }
- \tag_struct_begin:n
- {
- tag=\l__tag_para_tag_tl
- ,attribute-class=\l__tag_para_attr_class_tl
- }
- \__tag_check_para_begin_show:nn {green}{#1}
- \tag_mc_begin:n {}
-}
-\cs_new_protected:Npn \__block_start_para_structure_unconditionally:n #1 {
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_begin_int:
- \tag_struct_begin:n
- {
- tag=\l__tag_para_main_tag_tl,
- attribute-class=\l__tag_para_main_attr_class_tl,
- }
- \__tag_para_main_store_struct:
- }
- \__tag_gincr_para_begin_int:
- \__block_debug_typeout:n{increment~ P \on at line }
- \tag_struct_begin:n
- {
- tag=\l__tag_para_tag_tl
- ,attribute-class=\l__tag_para_attr_class_tl
- }
- \__tag_check_para_begin_show:nn {green}{#1}
- \tag_mc_begin:n {}
-}
-\RemoveFromHook{para/end}[tagpdf]
-\AddToHook{para/end}
- {
- \bool_if:NT \l__tag_para_bool
- {
- \__tag_gincr_para_end_int:
- \__block_debug_typeout:n{increment~ /P \on at line }
- \tag_mc_end:
- \__tag_check_para_end_show:nn {red}{}
- \tag_struct_end:
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_end_int:
- \tag_struct_end:
- }
- }
- }
-\def\PARALABEL{NP-}
-\cs_set_protected:Npn \para_end: {
- \scan_stop:
- \mode_if_horizontal:TF {
- \mode_if_inner:F {
- \tex_unskip:D
- \hook_use:n{para/end}
- \@kernel at after@para at end
- \mode_if_horizontal:TF {
- \if_int_compare:w 11 = \tex_lastnodetype:D
- \tex_hskip:D \c_zero_dim
- \fi:
- \tex_par:D
- \hook_use:n{para/after}
- \@kernel at after@para at after
- }
- { \msg_error:nnnn { hooks }{ para-mode }{end}{horizontal} }
- }
- }
- {
- \__kernel_endpe_vmode: % should do nothing if no tagging
- \tex_par:D
- }
-}
-\cs_set_eq:NN \par \para_end:
-\cs_set_eq:NN \__blockpar \para_end:
-\cs_set_eq:NN \endgraf \para_end:
-\DeclareRobustCommand*\begin[1]{%
- \UseHook{env/#1/before}%
- \@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}%
- \@execute at begin@hook{#1}%
- \csname #1\endcsname}}%
- \@ignorefalse
- \begingroup
- \__kernel_endpe_vmode:
- \reserved at a}
-\cs_new:Npn \__kernel_endpe_vmode: {
- \if at endpe \ifvmode
- \bool_if:NT \l__tag_para_bool
-{
- \bool_if:NF \l__tag_para_flattened_bool
- {
- \__tag_gincr_para_main_end_int:
- \tag_struct_end:
- }
- \@endpefalse
-}
- \fi \fi
-}
-\cs_set:Npn \__kernel_list_label_after: {
- \bool_if:NT \l__tag_para_bool
- {
- \__block_start_para_structure_unconditionally:n { LI- }
- }
-}
-\cs_new:Npn \__block_inner_begin: {
- \tagstructbegin{tag=\l__block_tag_inner_tag_tl}
-}
-\cs_new:Npn \__block_inner_end: {
- \__block_debug_typeout:n{block-end \on at line}
- \legacy_if:nT { @endpe }
- {
- \__tag_gincr_para_main_end_int:
- \__block_debug_typeout:n{close~ /text-unit \on at line}
- \tagstructend
- }
- \tagstructend % end inner structure
-}
-\tl_new:N \l__tag_L_tag_tl
-\tl_set:Nn \l__tag_L_tag_tl {L}
-\tl_new:N\l__tag_L_attr_class_tl
-\tl_set:Nn \l__tag_L_attr_class_tl {list}
-\tag_if_active:T
-{
- \tagpdfsetup
- {
- role/new-attribute = {itemize}{/O /List /ListNumbering/Unordered},
- role/new-attribute = {enumerate}{/O /List /ListNumbering/Ordered},
- role/new-attribute = {description}{/O /List /ListNumbering/Description},
- % default if unknown
- role/new-attribute = {list}{/O /List /ListNumbering/Unordered},
- }
-}
-\def\LItag{LI}
-\cs_set:Npn \__block_list_begin: {
- \tagstructbegin
- {
- tag=\l__tag_L_tag_tl
- ,attribute-class=\l__tag_L_attr_class_tl
- }
-}
-\cs_set:Npn \__block_list_item_begin: { \tagstructbegin{tag=\LItag} }
-\cs_set:Npn \__kernel_list_label_begin: {
- \tagstructbegin{tag=Lbl}
- \tagmcbegin{tag=Lbl}
-}
-\cs_set:Npn \__kernel_list_label_end: {
- \tagmcend % end mc-Lbl or artifact
- \tagstructend % end Lbl
- \tagstructbegin{tag=\LBody}
-}
-\def\LBody{LBody}
-\cs_set:Npn \__block_list_item_end: {
- \legacy_if:nT { @endpe }
- {
- \__tag_gincr_para_main_end_int:
- \tagstructend % text-unit
- }
- \tagstructend \tagstructend % end LBody, LI
-}
-\cs_set:Npn \__block_list_end: {
- \legacy_if:nF { @newlist }
- {
- \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 % end L
-}
-}
-{
- \cs_new:Npn \__block_start_para_structure_unconditionally:n #1 {}
-}
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-firstaid.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-firstaid.dtx (C) Copyright 2023-2024 LaTeX Project
-\def\ltlabfirstaiddate{2024-10-16}
-\def\ltlabfirstaidversion{0.85h}
+\def\ltlabfirstaiddate{2024-11-23}
+\def\ltlabfirstaidversion{0.85i}
\ProvidesPackage {latex-lab-testphase-firstaid} [%
\ltlabfirstaiddate\space v\ltlabfirstaiddate\space
Temporary patches to external packages needed for the tagging project]
@@ -94,25 +94,24 @@
\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
+ \normalfont
+ \the\thm at headfont \thm at indent
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\MakeLinkTarget{\l__block_thm_current_counter_tl}}
\@ifempty{##1}
- {\let\thmname\@gobble}
- {\def\thmname####1{\tag_mc_begin:n {}####1\tag_mc_end:}}%
+ {\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:}}%
+ {\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:}}%
+ {\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:
@@ -121,7 +120,7 @@
\hskip\thm at headsep
\group_end:
\tagpdfparaOn
- \UseTaggingSocket{para/begin} %
+ \UseTaggingSocket{para/begin}
\ignorespaces}
\def\thmhead at plain##1##2##3{%
\thmname{##1}
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-float.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-float.dtx (C) Copyright 2023 LaTeX Project
-\def\ltlabfloatdate{2024-09-20}
-\def\ltlabfloatversion{0.81f}
+\def\ltlabfloatdate{2024-11-21}
+\def\ltlabfloatversion{0.81g}
\ProvidesExplPackage {latex-lab-testphase-float} {\ltlabfloatdate} {\ltlabfloatversion}
{Code related to the tagging of floats}
\prop_new:N \g__tag_float_sect_prop
@@ -285,8 +285,8 @@
}
\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
{
- \NewSocket{tagsupport/para/begin}
- \NewSocket{tagsupport/para/end}
+ \NewSocket{tagsupport/para/begin}{0}
+ \NewSocket{tagsupport/para/end}{0}
}
\NewSocket{caption/label}{1}
\NewSocketPlug{caption/label}{kernel}
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-new-or-1.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-new-or-1.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/latex-lab-testphase-new-or-1.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-new-or-1.dtx (C) Copyright 2020-2024 Frank Mittelbach
-\def\ltlabneworIdate{2023-07-20}
-\def\ltlabneworIversion{0.85a}
+\def\ltlabneworIdate{2024-11-12}
+\def\ltlabneworIversion{0.85b}
\ProvidesPackage{latex-lab-testphase-new-or-1}
[\ltlabneworIdate\space v\ltlabneworIversion\space
Temporary output patches for tagging and better link support]
@@ -43,7 +43,7 @@
\providecommand\@kernel at before@foot{}
\providecommand\@kernel at after@head{}
\providecommand\@kernel at after@foot{}
-\providecommand\@mult at ptagging@hook{}% multicol
+\providecommand\@mult at ptagging@hook{}% should be replaced with a socket, eventually
\patchcmd\@outputpage
{\vfil\color at hbox\normalcolor\hb at xt@\textwidth{\@thehead}\color at endbox}
@@ -84,16 +84,6 @@
\fi
\global \maxdepth \@maxdepth}
}
-\AddToHook{package/multicol/after}
- {% multicol needs later loading
- \patchcmd\page at sofar
- {\global\dimen\tw@\dp\z@}%
- {%
- \global\dimen\tw@\dp\z@
- \@mult at ptagging@hook
- }%
- {\typeout{Patching \string\page at sofar\space for tagging}}{\PATCHerror}%
-}
\ExplSyntaxOn
\def\@kernel at before@head{\pdfannot_link_off:}
\def\@kernel at before@foot{\pdfannot_link_off:}
Modified: trunk/Master/texmf-dist/tex/latex-dev/latex-lab/new-or-1-latex-lab-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/latex-lab/new-or-1-latex-lab-testphase.ltx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/latex-lab/new-or-1-latex-lab-testphase.ltx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -33,8 +33,8 @@
%%
%%
%% File: latex-lab-new-or-1.dtx (C) Copyright 2020-2024 Frank Mittelbach
-\def\ltlabneworIdate{2023-07-20}
-\def\ltlabneworIversion{0.85a}
+\def\ltlabneworIdate{2024-11-12}
+\def\ltlabneworIversion{0.85b}
\ProvidesFile{new-or-1-latex-lab-testphase.ltx}
[\ltlabneworIdate\space v\ltlabneworIversion\space
latex-lab wrapper new-or-1]
Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/calc.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/calc.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/calc.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -47,7 +47,7 @@
%% the normal LaTeX bug report address.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{calc}
- [2023/07/08 v4.3 Infix arithmetic (KKT,FJ)]
+ [2024/11/03 v4.3a Infix arithmetic (KKT,FJ)]
\def\calc at assign@generic#1#2#3#4{\let\calc at A#1\let\calc at B#2%
\calc at open(#4!%
\global\calc at A\calc at B\endgroup#3\calc at B}
@@ -277,7 +277,8 @@
{`#1' invalid at this point}%
{I expected to see one of: + - * / )}}
\def\@settodim#1#2#3{%
- \setbox\@tempboxa\hbox{{#3}}%
+ \setbox\@tempboxa\hbox
+ {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}%
\dimen at ii=\z@
\@tf at r\reserved at a #1\do{%
\advance\dimen at ii\reserved at a\@tempboxa}%
Added: trunk/Master/texmf-dist/tex/latex-dev/tools/multicol-2024-05-23.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/multicol-2024-05-23.sty (rev 0)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/multicol-2024-05-23.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -0,0 +1,1144 @@
+%%
+%% This is file `multicol.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% multicol.dtx (with options: `package,badness,check,marktrace,nobalance')
+%%
+%% This is a generated file.
+%%
+%% The source is maintained by the LaTeX Project team and bug
+%% reports for it can be opened at https://latex-project.org/bugs/
+%% (but please observe conditions on bug reports sent to that address!)
+%%
+%% Copyright (C) 1993-2024
+%% The LaTeX Project and any individual authors listed elsewhere
+%% in this file.
+%%
+%% This file was generated from file(s) of the Standard LaTeX `Tools Bundle'.
+%% --------------------------------------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This file may only be distributed together with a copy of the LaTeX
+%% `Tools Bundle'. You may however distribute the LaTeX `Tools Bundle'
+%% without such generated files.
+%%
+%% The list of all files belonging to the LaTeX `Tools Bundle' is
+%% given in the file `manifest.txt'.
+%%
+%% Package `multicol' to use with LaTeX2e
+%% Copyright 1989-2023 Frank Mittelbach
+%%
+%% In addition to the terms of LPPL any distributed version
+%% (unchanged or modified) of multicol has to keep the statement
+%% about the moral obligation for using multicol. In case of major
+%% changes where this would not be appropriate the author of the
+%% changed version should contact the copyright holder.
+%%
+%%
+%% Moral obligation for using multicol:
+%% ------------------------------------
+%%
+%% Users of multicol who wish to include or use multicol or a modified
+%% version in a proprietary and commercially market product are asked
+%% under certain conditions (see below) for the payment of a license
+%% fee. The size of this fee is to be determined, in each instance,
+%% by the commercial user, depending on his/her judgment of the value of
+%% multicol for his/her product.
+%%
+%%
+%% The conditions for this are as follows:
+%%
+%% The producer of a proprietary and commercially market product
+%% that involves typesetting using multicol is asked to determine
+%% the value of a license fee for using multicol if
+%%
+%% - the product is a document and the producer has decided to
+%% include multicol to typeset (parts of) the document or has
+%% directed the author of the document to include multicol (for
+%% example, by providing a class file to be used by the author)
+%%
+%% - the product is a LaTeX class or package that includes multicol
+%%
+%%
+%% There is no moral obligation in case
+%%
+%% - the product is a document but producer has not directed
+%% the author to include multicol (in that case the moral obligation
+%% lies with the author of the document)
+%%
+%% - the product does not involve typesetting, e.g., consists, for
+%% example, of distributing multicol and its documentation.
+%%
+%% - the product is not proprietary, i.e., is made available as free
+%% software itself (which doesn't prohibit its commercial marketing)
+%%
+%% - multicol is used for non-commercial purposes
+%%
+%%
+%% Determining a license fee might result in a license fee of zero
+%% (i.e., no payment) in case a producer has determined that the use
+%% of multicol has no enhancing effect on the product. This is a
+%% plausible scenario, i.e., in the above two cases the producer is
+%% only asked to evaluate the value of multicol for the product
+%% not for the payment of a license fee per se (which might or might
+%% not follow from this evaluation).
+%%
+%% The license fee, if any, can be payed either to the LaTeX fund
+%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
+%% the program who can be contacted at
+%%
+%% Frank.Mittelbach at latex-project.org
+%%
+
+\DeclareRelease{}{1994-06-01}{multicol-2017-04-11.sty}
+\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
+\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
+\DeclareCurrentRelease{}{2021-11-15}
+
+\ProvidesPackage{multicol}
+ [2024/05/23 v1.9h multicolumn formatting (FMi)]
+\DeclareOption{twocolumn}
+ {\PackageWarning{multicol}{May not work
+ with the twocolumn option}}
+\newcount\c at tracingmulticols
+\DeclareOption{errorshow}
+ {\c at tracingmulticols\z@}
+\DeclareOption{infoshow}
+ {\c at tracingmulticols\@ne}
+\DeclareOption{balancingshow}
+ {\c at tracingmulticols\tw@}
+\DeclareOption{markshow}
+ {\c at tracingmulticols\thr@@}
+\DeclareOption{debugshow}
+ {\c at tracingmulticols5\relax}
+\let\mc at gridwarn\maxdimen
+\DeclareOption{grid}
+ {\def\mc at gridwarn{\@maxdepth}}
+\DeclareOption{colaction}{%
+ \def\mc at col@status at write{%
+ \protected at write\@auxout{}%
+ {\string\mc at col@status
+ {\ifmc at firstcol 1\else 2\fi}}%
+ \mc at firstcolfalse}%
+ \def\mc at lastcol@status at write{%
+ \protected at write\@auxout{}%
+ {\string\mc at col@status{3}}}%
+}
+\let\mc at col@status at write\relax
+\let\mc at lastcol@status at write\relax
+\ProcessOptions
+\def\multicols#1{\col at number#1\relax
+ \ifnum\col at number<\tw@
+ \PackageWarning{multicol}%
+ {Using `\number\col at number'
+ columns doesn't seem a good idea.^^J
+ I therefore use two columns instead}%
+ \col at number\tw@ \fi
+ \ifnum\col at number>20
+ \PackageError{multicol}%
+ {Too many columns}%
+ {Current implementation doesn't
+ support more than 20 columns.%
+ \MessageBreak
+ I therefore use 20 columns instead}%
+ \col at number20 \fi
+ \ifx\@footnotetext\mult at footnotetext
+ \else
+ \let\orig at footnotetext\@footnotetext
+ \let\@footnotetext\mult at footnotetext
+ \fi
+ \@ifnextchar[\mult at cols{\mult at cols[]}}
+\long\def\mult at footnotetext#1{\begingroup
+ \columnwidth\textwidth
+ \orig at footnotetext{#1}\endgroup}
+\def\mult at cols[#1]{\@ifnextchar[%
+ {\mult@@cols{#1}}%
+ {\mult@@cols{#1}[\premulticols]}}
+\def\mult@@cols#1[#2]{%
+ \par
+ \ifinner \@boxedmulticolstrue
+ \else
+ \ifnum \doublecol at number>\z@
+ \@boxedmulticolstrue
+ \fi
+ \fi
+ \mult at info\z@
+ {Starting environment with
+ \the\col at number\space columns%
+ \if at boxedmulticols\MessageBreak
+ (boxed mode)\fi
+ }%
+ \enough at room{#2}%
+ #1\par\addvspace\multicolsep
+ \ifdim \prevdepth = -\@m\p@
+ \else
+ \@tempcnta\prevdepth
+ \@tempcntb\baselineskip
+ \divide\@tempcnta\@tempcntb
+ \advance\@tempcnta\@ne
+ \dimen@\prevdepth
+ \advance\dimen@ -\@tempcnta\baselineskip
+ \advance\dimen@ \topskip
+ \kern-\dimen@
+ \fi
+ \begingroup
+ \prepare at multicols
+ \if at boxedmulticols
+ \setbox\mult at box\vbox\bgroup
+ \color at setgroup
+ \fi
+ \ignorespaces}
+\newif\if at boxedmulticols
+\@boxedmulticolsfalse
+\newbox\mult at box
+\def\enough at room#1{%
+ \if at boxedmulticols\else
+ \par
+ \bgroup\@nobreakfalse\addpenalty\z@\egroup
+ \page at free \pagegoal
+ \advance \page at free -\pagetotal
+ \@tempskipa#1\relax
+ \mult at info\z@
+ {Current page:\MessageBreak
+ height=%
+ \the\pagegoal: used \the\pagetotal
+ \space -> free=\the\page at free
+ \MessageBreak
+ needed \the\@tempskipa
+ \space(for #1)}%
+ \ifdim \page at free <#1\newpage \fi
+ \fi}
+\def\prepare at multicols{%
+ \multicol at leftmargin\@totalleftmargin
+ \@totalleftmargin\z@
+ \parshape\z@
+ \doublecol at number\col at number
+ \multiply\doublecol at number\tw@
+ \advance\doublecol at number\mult at rightbox
+ \if at boxedmulticols
+ \let\l at kept@firstmark\kept at firstmark
+ \let\l at kept@botmark\kept at botmark
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \else
+ \nointerlineskip {\topskip\z@\null}%
+ \output{%
+ \global\setbox\partial at page\vbox
+ {%
+ \ifvoid\partial at page\else
+ \PackageError{multicol}%
+ {Error saving partial page}%
+ {The part of the page before
+ the multicols environment was
+ nearly full with^^Jthe result
+ that starting the environment
+ will produce an overfull
+ page. Some^^Jtext may be lost!
+ Please increase \premulticols
+ either generally or for this%
+ ^^Jenvironment by specifying a
+ suitable value in the second
+ optional argument to^^Jthe
+ multicols environment.}
+ \unvbox\partial at page
+ \box\last at line
+ \fi
+ \unvbox\@cclv
+ \global\setbox\last at line\lastbox
+ }%
+ \prep at keptmarks
+ \global\let\kept at topmark\firstmark
+ }\eject
+ \advance\@colroom-\ht\partial at page
+ \set at mult@vsize\relax
+ \output{\multi at column@out}%
+ \init at mult@footins
+ \reinsert at footnotes
+ \def\clearpage{%
+ \ifx\@deferlist\@empty\else
+ \PackageError{multicol}%
+ {Deferred floats not cleared}%
+ {A \string\clearpage\space inside
+ multicols acts like
+ \string\newpage\space and doesn't
+ clear floats.\MessageBreak
+ Move it before the multicols
+ environment if you need it.}%
+ \fi
+ \newpage}%
+ \fi
+ \vbadness\@Mi \hbadness5000
+ \tolerance\multicoltolerance
+ \pretolerance\multicolpretolerance
+ \setemergencystretch\col at number\hsize
+ \set at floatcmds
+ \advance\baselineskip\multicolbaselineskip
+ \hsize\linewidth \advance\hsize\columnsep
+ \advance\hsize-\col at number\columnsep
+ \divide\hsize\col at number
+ \full at width\linewidth
+ \linewidth\hsize
+ \columnwidth\hsize
+}
+\def\init at mult@footins{%
+ \multiply\count\footins\col at number
+ \multiply\skip \footins\col at number
+}
+\def\set at mult@vsize#1{%
+ \vsize\@colroom
+ \@tempdima\baselineskip
+ \advance\@tempdima-\topskip
+ \advance\vsize\@tempdima
+ \vsize\col at number\vsize
+ \advance\vsize-\@tempdima
+ \advance\vsize\col at number\baselineskip
+ #1\advance\vsize
+ \c at collectmore\baselineskip}
+\newdimen\multicol at leftmargin
+\mathchardef\@Mvi=10006 % 10005 is
+ % \columnbreak
+\def\endmulticols{\par
+ \if at boxedmulticols
+ \remove at discardable@items
+ \color at endgroup\egroup
+ \balance at columns
+ \return at nonemptymark{first}%
+ \kept at firstmark
+ \return at nonemptymark{bot}%
+ \kept at botmark
+ \global\setbox\mc at boxedresult\vbox{%
+ \page at sofar
+ \global\let\kept at firstmark
+ \l at kept@firstmark
+ \global\let\kept at botmark
+ \l at kept@botmark
+ }%
+ \mult at info\tw@
+ {Restore kept marks to\MessageBreak
+ first: \meaning\kept at firstmark
+ \MessageBreak bot\space\space:
+ \meaning\kept at botmark }%
+ \else
+ \ifdim\pagegoal=\maxdimen
+ \ifvoid\colbreak at box\else
+ \mult at info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \unvbox\colbreak at box\fi
+ \fi
+ \penalty\z@
+ \penalty-\@Mvi
+ \ifvbox\partial at page
+ \unvbox\partial at page\fi
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \mult at info\tw@
+ {Make kept marks empty}%
+ \fi
+ \@checkend{multicols}%
+ \endgroup
+ \global\c at unbalance\z@
+ \if at boxedmulticols
+ \unvbox\mc at boxedresult
+ \mc at col@status at write
+ \else
+ \reinsert at footnotes
+ \ifdim \pagegoal=\maxdimen
+ \global\vsize\@colroom
+ \else
+ \enough at room\postmulticols
+ \fi
+ \fi
+ \addvspace\multicolsep
+ \prevdepth\z@
+ \mult at info\z@
+ {Ending environment
+ \if at boxedmulticols
+ \space(boxed mode)\fi
+ }}
+\newcount\c at unbalance
+\newcount\c at collectmore
+\newcount\doublecol at number
+\newcount\multicoltolerance
+\newcount\multicolpretolerance
+\newdimen\full at width
+\newdimen\page at free
+\newdimen\premulticols
+\newdimen\postmulticols
+\newskip\multicolsep
+\newskip\multicolbaselineskip
+\newbox\partial at page
+\newbox\last at line
+\newbox\mc at boxedresult
+\c at unbalance = 0
+\c at collectmore = 0
+\multicoltolerance = 9999
+\multicolpretolerance = -1
+\premulticols = 50pt
+\postmulticols= 20pt
+\multicolsep = 12pt plus 4pt minus 3pt
+\multicolbaselineskip=0pt
+\def\process at cols#1#2{\count@#1\relax
+ \loop
+ #2%
+ \advance\count@\tw@
+ \ifnum\count@<\doublecol at number
+ \repeat}
+\def\page at sofar{%
+ \process at cols\mult at rightbox
+ {\ifvoid\count@
+ \setbox\count@\hbox to\hsize{}%
+ \else
+ \wd\count@\hsize
+ \fi}%
+ \count@\col at number \advance\count@\m at ne
+ \mult at info\z@
+ {Column spec: \the\full at width\space = indent
+ + columns + sep =\MessageBreak
+ \the\multicol at leftmargin\space
+ + \the\col at number\space
+ x \the\hsize\space
+ + \the\count@\space
+ x \the\columnsep
+ }%
+\ifvmode\else\errmessage{Multicol Error}\fi
+ \nointerlineskip
+ \setbox\z@\hbox{\multicolmindepthstring}\global\dimen\tw@\dp\z@
+ \moveright\multicol at leftmargin
+ \hbox to\full at width{%
+ \mc at align@columns
+ \rlap{\phantom \multicolmindepthstring}%
+ }%
+ \prevdepth\z@
+ \kern-\dimen\tw@
+ \ifdim\dimen\tw@ > \mc at gridwarn
+ \PackageWarning{multicol}%
+ {Very deep columns!\MessageBreak
+ Grid alignment might be broken}%
+ \fi
+}
+\def\multicolmindepthstring{p}
+\def\columnseprulecolor{\normalcolor}
+\def\reinsert at footnotes{\ifvoid\footins\else
+ \insert\footins{}\fi}
+\def\vfilmaxdepth{\vskip \z@ \@plus .0001fil
+ \@minus \@maxdepth}
+\def\multi at column@out{%
+ \ifnum\outputpenalty <-\@M
+ \speci at ls \else
+ \ifvoid\colbreak at box\else
+ \mult at info\@ne{Re-adding forced
+ break(s) for splitting}%
+ \setbox\@cclv\vbox{%
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \unvbox\@cclv}%
+ \fi
+ \splittopskip\topskip
+ \splitmaxdepth\@maxdepth
+ \boxmaxdepth\@maxdepth
+ \dimen@\@colroom
+ \divide\skip\footins\col at number
+ \ifvoid\footins \else
+ \leave at mult@footins
+ \fi
+ \ifvbox \@kludgeins
+ \advance \dimen@ -\ht\@kludgeins
+ \ifdim \wd\@kludgeins>\z@
+ \shr at nkingtrue
+ \fi
+ \fi
+ \process at cols\mult at firstbox{%
+ \setbox\count@
+ \vsplit\@cclv to\dimen@
+ \set at keptmarks
+ \setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@
+ \ifshr at nking
+ \vfilmaxdepth\fi}%
+ }%
+ \setbox\mult at rightbox
+ \vsplit\@cclv to\dimen@
+ \set at keptmarks
+ \setbox\mult at rightbox\vbox to\dimen@
+ {\unvbox\mult at rightbox
+ \ifshr at nking\vfilmaxdepth\fi}%
+ \ifvoid\@cclv \else
+ \unvbox\@cclv
+ \ifnum\outputpenalty=\@M
+ \else
+ \penalty\outputpenalty
+ \fi
+ \ifvoid\footins\else
+ \PackageWarning{multicol}%
+ {I moved some lines to
+ the next page.\MessageBreak
+ Footnotes on page
+ \thepage\space might be wrong}%
+ \fi
+ \ifnum \c at tracingmulticols>\thr@@
+ \hrule\allowbreak \fi
+ \fi
+ \ifx\@empty\kept at firstmark
+ \let\firstmark\kept at topmark
+ \let\botmark\kept at topmark
+ \else
+ \let\firstmark\kept at firstmark
+ \let\botmark\kept at botmark
+ \fi
+ \let\topmark\kept at topmark
+ \mult at info\tw@
+ {Use kept top mark:\MessageBreak
+ \meaning\kept at topmark
+ \MessageBreak
+ Use kept first mark:\MessageBreak
+ \meaning\kept at firstmark
+ \MessageBreak
+ Use kept bot mark:\MessageBreak
+ \meaning\kept at botmark
+ \MessageBreak
+ Produce first mark:\MessageBreak
+ \meaning\firstmark
+ \MessageBreak
+ Produce bot mark:\MessageBreak
+ \meaning\botmark
+ \@gobbletwo}%
+ \boxmaxdepth\maxdimen
+ \setbox\@cclv\vbox{\unvbox\partial at page
+ \page at sofar}%
+ \@makecol\@outputpage
+ \global\let\kept at topmark\botmark
+ \global\let\kept at firstmark\@empty
+ \global\let\kept at botmark\@empty
+ \mult at info\tw@
+ {(Re)Init top mark:\MessageBreak
+ \meaning\kept at topmark
+ \@gobbletwo}%
+ \global\@colroom\@colht
+ \global \@mparbottom \z@
+ \global \@textfloatsheight \z@
+ \process at deferreds
+ \@whilesw\if at fcolmade\fi{\@outputpage
+ \global\@colroom\@colht
+ \process at deferreds}%
+ \mult at info\@ne
+ {Colroom:\MessageBreak
+ \the\@colht\space
+ after float space removed
+ = \the\@colroom \@gobble}%
+ \set at mult@vsize \global
+ \fi}
+\def\leave at mult@footins{%
+ \advance\dimen at -\skip\footins
+ \advance\dimen at -\ht\footins
+}
+\def\speci at ls{%
+ \ifnum\outputpenalty <-\@Mi
+ \ifnum \outputpenalty<-\@MM
+ \PackageError{multicol}{Document end
+ inside multicols environment}\@ehd
+ \@specialoutput
+ \else
+ \ifnum\outputpenalty = -\@Mv
+ \mult at info\@ne{Forced column
+ break seen}%
+ \global\advance\vsize-\pagetotal
+ \global\setbox\colbreak at box
+ \vbox{%
+ \ifvoid\colbreak at box
+ \else
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \fi
+ \boxmaxdepth\@maxdepth
+ \setbox\@cclv\vbox{%
+ \unvbox\@cclv
+ \remove at discardable@items}%
+ \dimen@\dp\@cclv
+ \unvbox\@cclv
+ \kern-\dimen@
+ }%
+ \reinsert at footnotes
+ \else
+ \ifnum\outputpenalty = -\@Mvi
+ \mult at info\@ne{End penalty of
+ multicols seen}%
+ \outputpenalty\@M % pretend we had
+ % a natural
+ % forced break
+ \balance at columns@out
+ \else
+ \PackageWarningNoLine{multicol}%
+ {Floats and marginpars not
+ allowed inside `multicols'
+ environment!}%
+ \unvbox\@cclv\reinsert at footnotes
+ \xdef\@freelist{\@freelist
+ \@currlist}%
+ \gdef\@currlist{}%
+ \fi
+ \fi
+ \fi
+ \else \@doclearpage \fi
+}
+\def\process at deferreds{%
+ \@floatplacement
+ \@tryfcolumn\@deferlist
+ \if at fcolmade\else
+ \begingroup
+ \let\@tempb\@deferlist
+ \gdef\@deferlist{}%
+ \let\@elt\@scolelt
+ \@tempb \endgroup
+ \fi}
+\newif\ifshr at nking
+\def\raggedcolumns{%
+ \@bsphack\shr at nkingtrue\@esphack}
+\def\flushcolumns{%
+ \@bsphack\shr at nkingfalse\@esphack}
+\def\balance at columns@out{%
+ \setbox\mult at box\vbox{%
+ \ifvoid\colbreak at box\else
+ \unvbox\colbreak at box
+ \penalty-\@Mv
+ \mult at info\@ne{Re-adding
+ forced break(s) in balancing}%
+ \fi
+ \unvbox\@cclv
+ \remove at discardable@items
+ }%
+ \balance at columns
+ \iftoo at bad
+ \mult at info\@ne
+ {Balancing failed ...
+ cut a normal page}%
+ \setbox\@cclv\vbox
+ {\vskip\topskip
+ \vskip-\splittopskip
+ \unvbox\mult at box
+ \penalty-\@Mvi
+ }%
+ \multi at column@out
+ \else
+ \global\vsize\@colroom
+ \global\advance\vsize\ht\partial at page
+ \ifvbox\@kludgeins
+ \insert\@kludgeins
+ {\unvbox\@kludgeins}\fi
+ \unvbox\partial at page
+ \return at nonemptymark{first}%
+ \kept at firstmark
+ \return at nonemptymark{bot}\kept at botmark
+ \page at sofar
+ \penalty\z@
+ \fi
+}
+\def\balance at columns{%
+ \get at keptmarks\mult at box
+ \setbox\mult at box\vbox{%
+ \penalty-\@M
+ \unvbox\mult at box
+ }%
+ \@tempdima\topskip
+ \splittopskip\@tempdima
+ \@plus\multicolundershoot
+ \@minus\multicolovershoot
+ \splitmaxdepth\@maxdepth
+ \boxmaxdepth\@maxdepth
+ \setbox\@tempboxa\vsplit\mult at box to\z@
+ \@tempdima\ht\mult at box
+ \advance\@tempdima\dp\mult at box
+ \divide\@tempdima\col at number
+ \count@\@tempdima
+ \divide\count@\baselineskip
+ \dimen@\count@\baselineskip
+ \advance\dimen@\topskip
+ \ifdim \dimen@ >\@tempdima
+ \advance\dimen at -\baselineskip
+ \fi
+ \@tempdima\dimexpr
+ \topskip +\c at minrows\baselineskip
+ -\baselineskip\relax
+ \ifnum\dimen@<\@tempdima
+ \mult at info\@ne
+ {Start value
+ \the\dimen@ \space ->
+ \the\@tempdima \space
+ (corrected for minrows)}%
+ \dimen@\@tempdima
+ \fi
+ \advance\dimen@\c at unbalance\baselineskip
+ \mult at info\@ne
+ {Balance columns\on at line:
+ \ifnum\c at unbalance=\z@\else
+ (off balance=\number\c at unbalance)\fi
+ \@gobbletwo}%
+ \ifnum\dimen@<\topskip
+ \mult at info\@ne
+ {Start value
+ \the\dimen@ \space ->
+ \the\topskip \space (corrected)}%
+ \dimen@\topskip
+ \fi
+ \vbadness\@M
+ \vfuzz \maxdimen
+ \last at try-\p@
+ \loop
+ {\process at cols\mult at grightbox
+ {\global\setbox\count@
+ \box\voidb at x}}%
+ \global\setbox\mult at grightbox
+ \copy\mult at box
+ \too at badfalse
+ \forcedbreak at leftoverfalse
+ {\process at cols\mult at gfirstbox{%
+ \global\setbox\count@
+ \vsplit\mult at grightbox to\dimen@
+ \global\setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@}%
+ \ifnum\c at tracingmulticols>\@ne
+ \@tempcnta\count@
+ \advance\@tempcnta-\mult at grightbox
+ \divide\@tempcnta \tw@
+ \message{^^JColumn
+ \number\@tempcnta\space
+ badness: \the\badness\space}%
+ \fi
+ \ifnum\badness>\c at columnbadness
+ \ifnum\c at tracingmulticols>\@ne
+ \message{too bad
+ (>\the\c at columnbadness)}%
+ \fi
+ \too at badtrue
+ \fi
+ }}%
+ \global\setbox\mult at grightbox
+ \vbox{\unvbox\mult at grightbox}%
+ \setbox\mult at nat@firstbox
+ \vbox{\unvcopy\mult at gfirstbox}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{^^JFirst column
+ = \the\dimen@\space
+ (\the\ht\mult at nat@firstbox)}\fi
+ \ifnum\c at tracingmulticols>\@ne
+ \message{<> last column =
+ \the\ht\mult at grightbox^^J}%
+ \fi
+ \ifdim\ht\mult at grightbox >\dimen@
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Rejected: last
+ column too large!}%
+ \fi
+ \else
+ \setbox\@tempboxa
+ \copy\mult at grightbox
+ \setbox\z@\vsplit\@tempboxa to\maxdimen
+ \ifvoid\@tempboxa
+ \global\setbox\mult at grightbox
+ \vbox to\dimen@
+ {\unvbox\mult at grightbox}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{Final badness:
+ \the\badness}%
+ \fi
+ \ifnum\badness>\c at finalcolumnbadness
+ \global\setbox\mult at grightbox
+ \vbox to\dimen@
+ {\unvbox\mult at grightbox\vfil}%
+ \ifnum\c at tracingmulticols>\@ne
+ \message{ setting natural
+ (> \the\c at finalcolumnbadness)}%
+ \fi
+ \fi
+ \else
+ \@tempdima\@colroom
+ \advance\@tempdima \maxbalancingoverflow
+ \ifdim \dimen@ < \@tempdima
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Rejected: unprocessed
+ forced break(s) in last column!}%
+ \fi
+ \else
+ \forcedbreak at leftovertrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Failed: columns too large
+ with unprocessed forced break(s)!}%
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifdim\ht\mult at nat@firstbox<\dimen@
+ \ifdim\ht\mult at nat@firstbox>\last at try
+ \too at badtrue
+ \ifnum\c at tracingmulticols>\@ne
+ \typeout{Retry: using natural
+ height of first column!}%
+ \fi
+ \dimen@\ht\mult at nat@firstbox
+ \last at try\dimen@
+ \advance\dimen at -\p@
+ \fi
+ \fi
+ \iftoo at bad
+ \advance\dimen@\p@
+ \repeat
+ \ifforcedbreak at leftover
+ \too at badtrue
+ \else
+ \if at boxedmulticols\else
+ \ifdim\dimen@>\@colroom
+ \dimen@\@colroom
+ \fi
+ \fi
+ \process at cols\mult at rightbox
+ {\@tempcnta\count@
+ \advance\@tempcnta\@ne
+ \vfuzz\z@
+ \setbox\count@\vbox to\dimen@
+ {%
+ \vskip \z@
+ \@plus-\multicolundershoot
+ \@minus-\multicolovershoot
+ \unvbox\@tempcnta
+ \ifshr at nking\vfilmaxdepth\fi
+ }%
+ \ifnum\badness>\@M
+ \vfuzz\maxdimen % no overfull warning
+ \setbox\@tempboxa \vbox to\dimen@
+ {\vskip-\maxbalancingoverflow
+ \unvcopy\count@}%
+ \ifnum\badness>\@M
+ \mult at info\@ne
+ {Balanced column more than
+ \the\maxbalancingoverflow\space
+ too large}%
+ \too at badtrue
+ \else
+ \mult at info\@ne
+ {Balanced column
+ too large, but less than
+ \the\maxbalancingoverflow}%
+ \fi
+ \fi
+ }%
+ \fi
+}
+\newdimen\maxbalancingoverflow
+\maxbalancingoverflow=12pt
+
+\ifnum\numexpr
+ \count20-\count14-1<40
+ % this is = 2 * 20
+ \count14=\@cclv
+\fi
+\newbox\mult at rightbox
+\newbox\mult at grightbox
+\newbox\mult at firstbox
+\newbox\mult at gfirstbox
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\newbox\@tempa\newbox\@tempa
+\let\@tempa\relax
+\@ifundefined{emergencystretch}
+ {\newdimen\emergencystretch}{}
+\def\setemergencystretch#1#2{%
+ \emergencystretch 4pt
+ \multiply\emergencystretch#1}
+
+\def\set at floatcmds{%
+ \let\@dblfloat\@dbflt
+ \def\end at dblfloat{\@endfloatbox
+ \@largefloatcheck
+ \outer at nobreak
+ \ifnum\@floatpenalty<\z@
+ \@cons\@deferlist\@currbox
+ \fi
+ \ifnum\@floatpenalty=-\@Mii
+ \@Esphack
+ \fi}}
+\def\kept at topmark{{}{}}
+\let\kept at firstmark\@empty
+\let\kept at botmark\@empty
+\def\return at nonemptymark#1#2{%
+ \ifx#2\@empty
+ \else
+ \mult at info\tw@
+ {Returned #1 mark:\MessageBreak
+ \meaning#2}%
+ \toks@\expandafter{#2}%
+ \mark{\the\toks@}%
+ \nobreak
+ \fi}
+\def\get at keptmarks#1{%
+ \begingroup
+ \vbadness\@M
+ \setbox#1\copy#1%
+ \mc at get@all at box@marks #1%
+ \set at keptmarks
+ \endgroup
+}
+\def\mc at get@all at box@marks #1{%
+ \setbox\@tempboxa\vsplit#1to\maxdimen
+ \ifvoid#1\else
+ \setbox#1\vbox{\unvbox\@tempboxa \unvbox#1}%
+ \mc at get@all at box@marks #1%
+ \fi
+}
+\def\set at keptmarks{%
+ \ifx\kept at firstmark\@empty
+ \expandafter\gdef\expandafter
+ \kept at firstmark
+ \expandafter{\splitfirstmark}%
+ \ifx\kept at firstmark\@empty\else
+ \mult at info\tw@
+ {Set kept first mark:\MessageBreak
+ \meaning\kept at firstmark%
+ \@gobbletwo}%
+ \fi
+ \fi
+ \expandafter\def\expandafter\@tempa
+ \expandafter{\splitbotmark}%
+ \ifx\@tempa\@empty\else
+ \global\let\kept at botmark\@tempa
+ \mult at info\tw@
+ {Set kept bot mark:\MessageBreak
+ \meaning\kept at botmark%
+ \@gobbletwo}%
+ \fi}%
+\def\prep at keptmarks{%
+ \if at boxedmulticols \else
+ \get at keptmarks\partial at page
+ \fi}
+\skip0=0pt
+\edef\the at zero@skip{\the\skip0}
+\def\remove at discardable@items{%
+ \unpenalty
+ \edef\@tempa{\the\lastskip}%
+ \unskip
+ \ifx\@tempa\the at zero@skip
+ \edef\@tempb{\the\lastskip}%
+ \ifx\@tempb\the at zero@skip
+ \else
+ \unskip
+ \ifnum \lastpenalty=\@M
+ \vskip\@tempb\vskip\@tempa\relax
+ \else
+ \remove at discardable@items
+ \fi
+ \fi
+ \else
+ \remove at discardable@items
+ \fi
+}
+\newif\iftoo at bad
+\def\too at badtrue{\global\let\iftoo at bad\iftrue}
+\def\too at badfalse{\global\let\iftoo at bad\iffalse}
+\newif\ifforcedbreak at leftover
+\newcount\c at minrows
+\c at minrows=1
+\newcount\c at columnbadness
+\c at columnbadness=10000
+\newcount\c at finalcolumnbadness
+\c at finalcolumnbadness=9999
+
+\newdimen\last at try
+
+\newdimen\multicolovershoot
+\newdimen\multicolundershoot
+\multicolovershoot=0pt
+\multicolundershoot=2pt
+\newbox\mult at nat@firstbox
+\def\mult at info#1#2{%
+ \ifnum\c at tracingmulticols>#1%
+ \GenericWarning
+ {(multicol)\@spaces\@spaces}%
+ {Package multicol: #2}%
+ \fi
+}
+ \@namedef{multicols*}{%
+ \ifinner
+ \PackageWarning{multicol}%
+ {multicols* inside a box does
+ not make sense.\MessageBreak
+ Going to balance anyway}%
+ \else
+ \def\balance at columns@out
+ {\multi at column@out \penalty-\@Mvi }%
+ \fi
+ \begin{multicols}
+}
+\@namedef{endmulticols*}{%
+ \par
+ \ifdim\lastskip>\z@ \vskip-\lastskip \fi
+ \ifdim \prevdepth>\z@
+ \vskip-\ifdim\prevdepth>\boxmaxdepth
+ \boxmaxdepth
+ \else \prevdepth \fi
+ \fi
+ \ifshr at nking\else
+ \vfil
+ \fi
+ \end{multicols}}
+\mathchardef\@Mv=10005
+\newcommand\columnbreak[1][4]{%
+ \ifnum\col at number<\tw@
+ \PackageError{multicol}%
+ {\noexpand\columnbreak outside multicols}%
+ {This command can only be used within
+ a multicols or multicols* environment.}%
+ \else
+ \edef\mc at break@pen
+{-\ifcase#1\@m\or 3333\or 6666\or 9999\else\@Mv\fi\relax}%
+ \ifvmode
+ \penalty \mc at break@pen
+ \else
+ \@bsphack
+ \vadjust{\penalty \mc at break@pen}%
+ \@esphack
+ \fi
+ \fi}
+\newcommand\newcolumn{%
+ \ifnum\col at number<\tw@
+ \PackageError{multicol}%
+ {\noexpand\newcolumn outside multicols}%
+ {This command can only be used within
+ a multicols or multicols* environment.}%
+ \else
+ \ifvmode
+ \nobreak\vfill\kern\z@\penalty -\@Mv\relax
+ \else
+ \@bsphack
+ \vadjust{\nobreak\vfill\kern\z@\penalty -\@Mv\relax}%
+ \@esphack
+ \fi
+ \fi}
+\newbox\colbreak at box
+\def\LR at column@boxes{%
+ \process at cols\mult at firstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \mc at col@status at write
+ \box\count@
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss}%
+ \ifdim\dp\mult at rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult at rightbox \fi
+ \mc at lastcol@status at write
+ \box\mult at rightbox
+}
+
+\def\RL at column@boxes{%
+ \process at cols\mult at firstbox{%
+ \hskip\hsize
+ \hss{\columnseprulecolor\vrule
+ \@width\columnseprule}\hss
+ }%
+ \hskip\hsize
+ \process at cols\mult at firstbox{%
+ \ifdim\dp\count@>\dimen\tw@
+ \global\dimen\tw@\dp\count@ \fi
+ \hskip-\hsize
+ \mc at col@status at write
+ \box\count@
+ \hskip-\hsize
+ \hskip-\columnsep
+ }%
+ \ifdim\dp\mult at rightbox>\dimen\tw@
+ \global\dimen\tw@\dp\mult at rightbox \fi
+ \hskip-\hsize
+ \mc at lastcol@status at write
+ \box\mult at rightbox
+ \hskip-\hsize
+ \hskip\full at width
+ }
+\newcommand\RLmulticolcolumns
+ {\let\mc at align@columns
+ \RL at column@boxes}
+\newcommand\LRmulticolcolumns
+ {\let\mc at align@columns
+ \LR at column@boxes}
+\LRmulticolcolumns
+\newcount\mc at col@check at num
+
+\newcommand\docolaction{%
+ \ifx\mc at col@status at write\relax
+ \PackageError{multicol}%
+ {Option 'colaction' not selected}%
+ {\string\docolaction\space
+ requires the use of the 'colaction'
+ option on the package}%
+ \fi
+ \global\advance\mc at col@check at num\@ne
+ \edef\mc at col@type{\expandafter\ifx
+ \csname mc at col-\the\mc at col@check at num
+ \endcsname\relax
+ 0\else
+ \csname mc at col-\the\mc at col@check at num
+ \endcsname
+ \fi}%
+ \@ifstar
+ {\@docolactionstartrue \@docolaction}%
+ {\@docolactionstarfalse\@docolaction}%
+}
+\newcommand\@docolaction[4][1]{%
+ \edef\@docolactioncheck{\write\@auxout
+ {\string\mc at set@col at status
+ {mc at col-\the\mc at col@check at num}%
+ {\mc at col@type}}}%
+ \if at docolactionstar \@docolactioncheck \fi
+ \ifcase \mc at col@type\relax
+ \ifcase #1\or #2\or#3\or#4\fi
+ \or
+ #2% % 1 First col
+ \or
+ #3% % 2 any middle col
+ \or
+ #4% % 3 last col
+ \else
+ \ERRORwrongdefaultgiven
+ \fi
+ \if at docolactionstar \else \@docolactioncheck \fi
+}
+\newif\if at docolactionstar
+\def\mc at col@status#1{%
+ \gdef\mc at curr@col at status{#1}}
+\def\mc at set@col at status#1#2{%
+ \global\expandafter\let\csname #1\endcsname
+ \mc at curr@col at status}
+\AtEndDocument{\def\mc at set@col at status#1#2{%
+ \ifnum #2=\mc at curr@col at status\else
+ \@tempswatrue
+ \fi}%
+}
+\newif\ifmc at firstcol
+\mc at firstcoltrue
+\endinput
+%%
+%% End of file `multicol.sty'.
Property changes on: trunk/Master/texmf-dist/tex/latex-dev/tools/multicol-2024-05-23.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/texmf-dist/tex/latex-dev/tools/multicol.sty 2024-11-26 21:21:14 UTC (rev 72979)
@@ -102,10 +102,11 @@
\DeclareRelease{}{1994-06-01}{multicol-2017-04-11.sty}
\DeclareRelease{}{2017-04-11}{multicol-2017-04-11.sty}
\DeclareRelease{v1.8}{2019-10-01}{multicol-2019-10-01.sty}
+\DeclareRelease{v1.9}{2021-11-15}{multicol-2024-05-23.sty}
\DeclareCurrentRelease{}{2021-11-15}
\ProvidesPackage{multicol}
- [2024/09/14 v1.9i multicolumn formatting (FMi)]
+ [2024/11/21 v2.0a multicolumn formatting (FMi)]
\DeclareOption{twocolumn}
{\PackageWarning{multicol}{May not work
@@ -118,9 +119,13 @@
\DeclareOption{balancingshow}
{\c at tracingmulticols\tw@}
\DeclareOption{markshow}
- {\c at tracingmulticols\thr@@}
+ {\c at tracingmulticols\thr@@
+ \DebugMarksOn
+ }
\DeclareOption{debugshow}
- {\c at tracingmulticols5\relax}
+ {\c at tracingmulticols5\relax
+ \DebugMarksOn
+ }
\let\mc at gridwarn\maxdimen
\DeclareOption{grid}
{\def\mc at gridwarn{\@maxdepth}}
@@ -225,11 +230,8 @@
\doublecol at number\col at number
\multiply\doublecol at number\tw@
\advance\doublecol at number\mult at rightbox
+ \mc at prepare@mark at regions
\if at boxedmulticols
- \let\l at kept@firstmark\kept at firstmark
- \let\l at kept@botmark\kept at botmark
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
\else
\nointerlineskip {\topskip\z@\null}%
\output{%
@@ -256,9 +258,7 @@
\unvbox\@cclv
\global\setbox\last at line\lastbox
}%
- \prep at keptmarks
- \global\let\kept at topmark\firstmark
- }\eject
+ }\eject
\advance\@colroom-\ht\partial at page
\set at mult@vsize\relax
\output{\multi at column@out}%
@@ -312,22 +312,12 @@
\remove at discardable@items
\color at endgroup\egroup
\balance at columns
- \return at nonemptymark{first}%
- \kept at firstmark
- \return at nonemptymark{bot}%
- \kept at botmark
\global\setbox\mc at boxedresult\vbox{%
+ \mc at handle@marks at and@reinserts
+ {in multicol (boxed mode)}%
\page at sofar
- \global\let\kept at firstmark
- \l at kept@firstmark
- \global\let\kept at botmark
- \l at kept@botmark
+ \mc at reinsert@marks
}%
- \mult at info\tw@
- {Restore kept marks to\MessageBreak
- first: \meaning\kept at firstmark
- \MessageBreak bot\space\space:
- \meaning\kept at botmark }%
\else
\ifdim\pagegoal=\maxdimen
\ifvoid\colbreak at box\else
@@ -339,11 +329,7 @@
\penalty-\@Mvi
\ifvbox\partial at page
\unvbox\partial at page\fi
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
- \mult at info\tw@
- {Make kept marks empty}%
- \fi
+ \fi
\@checkend{multicols}%
\endgroup
\global\c at unbalance\z@
@@ -413,6 +399,7 @@
\ifvmode\else\errmessage{Multicol Error}\fi
\nointerlineskip
\setbox\z@\hbox{\multicolmindepthstring}\global\dimen\tw@\dp\z@
+ \UseTaggingSocket{page at sofar}%
\moveright\multicol at leftmargin
\hbox to\full at width{%
\mc at align@columns
@@ -460,16 +447,14 @@
\process at cols\mult at firstbox{%
\setbox\count@
\vsplit\@cclv to\dimen@
- \set at keptmarks
- \setbox\count@
- \vbox to\dimen@
- {\unvbox\count@
- \ifshr at nking
- \vfilmaxdepth\fi}%
- }%
+ \setbox\count@
+ \vbox to\dimen@
+ {\unvbox\count@
+ \ifshr at nking
+ \vfilmaxdepth\fi}%
+ }%
\setbox\mult at rightbox
\vsplit\@cclv to\dimen@
- \set at keptmarks
\setbox\mult at rightbox\vbox to\dimen@
{\unvbox\mult at rightbox
\ifshr at nking\vfilmaxdepth\fi}%
@@ -489,41 +474,15 @@
\ifnum \c at tracingmulticols>\thr@@
\hrule\allowbreak \fi
\fi
- \ifx\@empty\kept at firstmark
- \let\firstmark\kept at topmark
- \let\botmark\kept at topmark
- \else
- \let\firstmark\kept at firstmark
- \let\botmark\kept at botmark
- \fi
- \let\topmark\kept at topmark
- \mult at info\tw@
- {Use kept top mark:\MessageBreak
- \meaning\kept at topmark
- \MessageBreak
- Use kept first mark:\MessageBreak
- \meaning\kept at firstmark
- \MessageBreak
- Use kept bot mark:\MessageBreak
- \meaning\kept at botmark
- \MessageBreak
- Produce first mark:\MessageBreak
- \meaning\firstmark
- \MessageBreak
- Produce bot mark:\MessageBreak
- \meaning\botmark
- \@gobbletwo}%
\boxmaxdepth\maxdimen
- \setbox\@cclv\vbox{\unvbox\partial at page
- \page at sofar}%
+ \setbox\@cclv\vbox
+ {%
+ \mc at handle@col at andpage@marks
+ {in multicol OR (full page)}%
+ \unvbox\partial at page
+ \page at sofar
+ }%
\@makecol\@outputpage
- \global\let\kept at topmark\botmark
- \global\let\kept at firstmark\@empty
- \global\let\kept at botmark\@empty
- \mult at info\tw@
- {(Re)Init top mark:\MessageBreak
- \meaning\kept at topmark
- \@gobbletwo}%
\global\@colroom\@colht
\global \@mparbottom \z@
\global \@textfloatsheight \z@
@@ -636,15 +595,15 @@
\insert\@kludgeins
{\unvbox\@kludgeins}\fi
\unvbox\partial at page
- \return at nonemptymark{first}%
- \kept at firstmark
- \return at nonemptymark{bot}\kept at botmark
+ % \begin{macrocode}
+ \mc at handle@marks at and@reinserts
+ {in multicol OR (balancing)}%
\page at sofar
+ \mc at reinsert@marks
\penalty\z@
\fi
}
\def\balance at columns{%
- \get at keptmarks\mult at box
\setbox\mult at box\vbox{%
\penalty-\@M
\unvbox\mult at box
@@ -873,13 +832,6 @@
\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
@@ -893,59 +845,6 @@
\@Esphack
\UseTaggingSocket{float/hmode/end}%
\fi}}
-\def\kept at topmark{{}{}}
-\let\kept at firstmark\@empty
-\let\kept at botmark\@empty
-\def\return at nonemptymark#1#2{%
- \ifx#2\@empty
- \else
- \mult at info\tw@
- {Returned #1 mark:\MessageBreak
- \meaning#2}%
- \toks@\expandafter{#2}%
- \mark{\the\toks@}%
- \nobreak
- \fi}
-\def\get at keptmarks#1{%
- \begingroup
- \vbadness\@M
- \setbox#1\copy#1%
- \mc at get@all at box@marks #1%
- \set at keptmarks
- \endgroup
-}
-\def\mc at get@all at box@marks #1{%
- \setbox\@tempboxa\vsplit#1to\maxdimen
- \ifvoid#1\else
- \setbox#1\vbox{\unvbox\@tempboxa \unvbox#1}%
- \mc at get@all at box@marks #1%
- \fi
-}
-\def\set at keptmarks{%
- \ifx\kept at firstmark\@empty
- \expandafter\gdef\expandafter
- \kept at firstmark
- \expandafter{\splitfirstmark}%
- \ifx\kept at firstmark\@empty\else
- \mult at info\tw@
- {Set kept first mark:\MessageBreak
- \meaning\kept at firstmark%
- \@gobbletwo}%
- \fi
- \fi
- \expandafter\def\expandafter\@tempa
- \expandafter{\splitbotmark}%
- \ifx\@tempa\@empty\else
- \global\let\kept at botmark\@tempa
- \mult at info\tw@
- {Set kept bot mark:\MessageBreak
- \meaning\kept at botmark%
- \@gobbletwo}%
- \fi}%
-\def\prep at keptmarks{%
- \if at boxedmulticols \else
- \get at keptmarks\partial at page
- \fi}
\skip0=0pt
\edef\the at zero@skip{\the\skip0}
\def\remove at discardable@items{%
@@ -1149,6 +1048,102 @@
}
\newif\ifmc at firstcol
\mc at firstcoltrue
+\ExplSyntaxOn
+\int_new:N \g__mc_curr_col_int
+\cs_new:Npn \__mc_debug_marks:n #1 { \__mark_debug:n {#1} }
+\cs_new_protected:Npn \__mc_update_mcol_structures: {
+ \__mc_debug_marks:n
+ { \typeout{Marks:~ update~ mcol~ structures~ (multicol)} }
+ \int_step_inline:nnn {\col at number + 1} { \g__mc_curr_col_int }
+ { \mark_set_structure_to_err:n { mcol - ##1 } }
+ \int_gset:Nn \g__mc_curr_col_int {1}
+ \process at cols\mult at firstbox
+ {
+ \mark_update_structure_from_material:nn
+ {column}
+ {\unvcopy\count@}
+ \mark_copy_structure:nn
+ {mcol - \int_use:N\g__mc_curr_col_int }
+ {column}
+ \int_gincr:N \g__mc_curr_col_int
+ }
+ \mark_update_structure_from_material:nn
+ {column}
+ {\unvcopy\mult at rightbox}
+ \mark_copy_structure:nn
+ { mcol - \int_use:N\g__mc_curr_col_int }
+ {column}
+ \mark_copy_structure:nn{first-column}{mcol-1}
+ \mark_copy_structure:nn{last-column} {column}
+}
+
+\cs_new_protected:Npn \__mc_update_page_structures: {
+ \__mc_debug_marks:n
+ {
+ \typeout{Marks:~ update~ page~ structure~ (multicol)}
+ }
+ \mark_update_structure_from_material:nn
+ {page}
+ {
+ \unvcopy\partial at page
+ \process at cols \mult at firstbox { \unvcopy\count@ }
+ \unvcopy\mult at rightbox
+ }
+}
+
+\cs_new_protected:Npn \__mc_prepare_mark_reinserts: {
+ \__mc_debug_marks:n
+ { \typeout{Marks:~ prepare~ for~ reinserting~ marks~ (multicol)} }
+ \mark_get_marks_for_reinsertion:nNN
+ {
+ \process at cols \mult at firstbox { \unvcopy\count@ }
+ \unvcopy\mult at rightbox
+ }
+ \l__mc_first_marks_tl
+ \l__mc_last_marks_tl
+}
+\tl_new:N \l__mc_first_marks_tl
+\tl_new:N \l__mc_last_marks_tl
+\cs_new_protected:Npn \mc at reinsert@marks{
+ \__mc_debug_marks:n
+ { \typeout{Marks:~ --~ reinsert~ marks~ (multicol)} }
+ \l__mc_first_marks_tl \l__mc_last_marks_tl
+ \__mc_debug_marks:n
+ { \typeout{Marks:~ --~ finished~ reinserting~ marks~ (multicol)} }
+}
+\cs_new_protected:Npn \mc at prepare@mark at regions {
+ \legacy_if:nT { @boxedmulticols }
+ { \mark_copy_structure:nn{saved-column}{column} }
+ \__mc_debug_marks:n
+ { \typeout{Marks:~ empty~ mcol~ regions~ (multicol)} }
+ \mark_clear_structure:n {column}
+}
+\cs_new_protected:Npn \mc at handle@marks at and@reinserts #1 {
+ \__mc_update_mcol_structures:
+ \__mc_debug_marks:n { \__mark_status:nn {#1} {\the\col at number} }
+ \__mc_prepare_mark_reinserts:
+ \legacy_if:nT { @boxedmulticols }
+ { \mark_copy_structure:nn {column}{saved-column} }
+}
+
+\cs_new_protected:Npn \mc at handle@col at andpage@marks #1 {
+ \__mc_update_mcol_structures:
+ \__mc_update_page_structures:
+ \__mc_debug_marks:n { \__mark_status:nn {#1} {\the\col at number} }
+}
+\cs_set:Npn \leftmark {\mark_use_last:nn{page}{2e-left}}
+\cs_set:Npn \rightmark {\mark_use_first:nn{page}{2e-right}}
+\NewSocket{tagsupport/page at sofar}{0}
+\NewSocketPlug {tagsupport/page at sofar}{default}
+ {
+ \process at cols\mult at firstbox
+ { \tag_mc_add_missing_to_stream:Nn \count@ {multicol} }
+ \tag_mc_add_missing_to_stream:Nn \mult at rightbox {multicol}
+ }
+\sys_if_engine_luatex:TF
+ { \AssignSocketPlug{tagsupport/page at sofar}{noop} }
+ { \AssignSocketPlug{tagsupport/page at sofar}{default} }
+\ExplSyntaxOff
\endinput
%%
%% End of file `multicol.sty'.
Modified: trunk/Master/tlpkg/bin/c2lx
===================================================================
--- trunk/Master/tlpkg/bin/c2lx 2024-11-26 21:13:48 UTC (rev 72978)
+++ trunk/Master/tlpkg/bin/c2lx 2024-11-26 21:21:14 UTC (rev 72979)
@@ -46,6 +46,8 @@
echo "`basename $0`: $label pkgs: $pkgs"
#
+>$firstfile
+>$tmpfile
for p in $pkgs; do
echo "${label} pkg $p" >&2 # progress report of a sort
printf "\f ${label} pkg $p\n"
More information about the tex-live-commits
mailing list.