summaryrefslogtreecommitdiff
path: root/macros/latex-dev/required
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/required')
-rw-r--r--macros/latex-dev/required/amsmath/README.md2
-rw-r--r--macros/latex-dev/required/amsmath/amsbsy.pdfbin174946 -> 174946 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amscd.pdfbin179951 -> 179948 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsgen.pdfbin178193 -> 178193 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsldoc.pdfbin508230 -> 508207 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.dtx100
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.pdfbin420765 -> 422294 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.pdfbin140093 -> 140093 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amstext.pdfbin217504 -> 217504 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsxtra.pdfbin113560 -> 113560 bytes
-rw-r--r--macros/latex-dev/required/amsmath/changes.txt12
-rw-r--r--macros/latex-dev/required/amsmath/subeqn.pdfbin109733 -> 109740 bytes
-rw-r--r--macros/latex-dev/required/amsmath/technote.pdfbin147459 -> 147459 bytes
-rw-r--r--macros/latex-dev/required/amsmath/testmath.pdfbin454643 -> 454643 bytes
-rw-r--r--macros/latex-dev/required/firstaid/changes.txt10
-rw-r--r--macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx59
-rw-r--r--macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdfbin273766 -> 280510 bytes
-rw-r--r--macros/latex-dev/required/graphics/README.md2
-rw-r--r--macros/latex-dev/required/graphics/changes.txt11
-rw-r--r--macros/latex-dev/required/graphics/color.dtx9
-rw-r--r--macros/latex-dev/required/graphics/color.pdfbin212179 -> 212777 bytes
-rw-r--r--macros/latex-dev/required/graphics/drivers.pdfbin286448 -> 286448 bytes
-rw-r--r--macros/latex-dev/required/graphics/epsfig.pdfbin159239 -> 159239 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphics.dtx5
-rw-r--r--macros/latex-dev/required/graphics/graphics.pdfbin304170 -> 303762 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphicx.pdfbin240618 -> 240618 bytes
-rw-r--r--macros/latex-dev/required/graphics/grfguide.pdfbin331361 -> 331361 bytes
-rw-r--r--macros/latex-dev/required/graphics/keyval.pdfbin239587 -> 239587 bytes
-rw-r--r--macros/latex-dev/required/graphics/lscape.pdfbin155987 -> 155987 bytes
-rw-r--r--macros/latex-dev/required/graphics/mathcolor.pdfbin460632 -> 460753 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotating.pdfbin278452 -> 278524 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotex.pdfbin172240 -> 172252 bytes
-rw-r--r--macros/latex-dev/required/graphics/trig.pdfbin199290 -> 199290 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/CHANGELOG.md60
-rw-r--r--macros/latex-dev/required/l3kernel/README.md2
-rw-r--r--macros/latex-dev/required/l3kernel/expl3.dtx13
-rw-r--r--macros/latex-dev/required/l3kernel/expl3.pdfbin610409 -> 610284 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/interface3.pdfbin1802512 -> 1789657 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/interface3.tex2
-rw-r--r--macros/latex-dev/required/l3kernel/l3basics.dtx11
-rw-r--r--macros/latex-dev/required/l3kernel/l3bitset.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3bootstrap.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3box.dtx6
-rw-r--r--macros/latex-dev/required/l3kernel/l3cctab.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3clist.dtx66
-rw-r--r--macros/latex-dev/required/l3kernel/l3coffins.dtx19
-rw-r--r--macros/latex-dev/required/l3kernel/l3color.dtx38
-rw-r--r--macros/latex-dev/required/l3kernel/l3debug.dtx4
-rw-r--r--macros/latex-dev/required/l3kernel/l3deprecation.dtx8
-rw-r--r--macros/latex-dev/required/l3kernel/l3doc.dtx83
-rw-r--r--macros/latex-dev/required/l3kernel/l3doc.pdfbin565557 -> 565241 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3docstrip.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3docstrip.pdfbin151323 -> 150985 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3expan.dtx6
-rw-r--r--macros/latex-dev/required/l3kernel/l3file.dtx42
-rw-r--r--macros/latex-dev/required/l3kernel/l3flag.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-assign.dtx8
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-aux.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-basics.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-convert.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-expo.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-extended.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-functions.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-logic.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-parse.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-random.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-round.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-symbolic.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-traps.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-trig.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp-types.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3fp.dtx14
-rw-r--r--macros/latex-dev/required/l3kernel/l3fparray.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3int.dtx83
-rw-r--r--macros/latex-dev/required/l3kernel/l3intarray.dtx4
-rw-r--r--macros/latex-dev/required/l3kernel/l3kernel-functions.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3keys.dtx49
-rw-r--r--macros/latex-dev/required/l3kernel/l3legacy.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3luatex.dtx4
-rw-r--r--macros/latex-dev/required/l3kernel/l3msg.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3names.dtx5
-rw-r--r--macros/latex-dev/required/l3kernel/l3news.pdfbin396223 -> 402138 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news01.pdfbin122959 -> 122959 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news02.pdfbin150919 -> 150919 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news03.pdfbin148747 -> 154683 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news04.pdfbin114754 -> 114754 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news05.pdfbin112524 -> 112524 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news06.pdfbin151591 -> 151591 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news07.pdfbin128344 -> 128344 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news08.pdfbin163484 -> 163484 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news09.pdfbin250161 -> 256104 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news10.pdfbin150302 -> 156257 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news11.pdfbin170102 -> 176068 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3news12.pdfbin205020 -> 210960 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3pdf.dtx20
-rw-r--r--macros/latex-dev/required/l3kernel/l3prefixes.csv11
-rw-r--r--macros/latex-dev/required/l3kernel/l3prefixes.pdfbin82843 -> 83202 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3prg.dtx4
-rw-r--r--macros/latex-dev/required/l3kernel/l3prop.dtx74
-rw-r--r--macros/latex-dev/required/l3kernel/l3quark.dtx4
-rw-r--r--macros/latex-dev/required/l3kernel/l3regex.dtx6
-rw-r--r--macros/latex-dev/required/l3kernel/l3seq.dtx153
-rw-r--r--macros/latex-dev/required/l3kernel/l3skip.dtx48
-rw-r--r--macros/latex-dev/required/l3kernel/l3sort.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3str-convert.dtx16
-rw-r--r--macros/latex-dev/required/l3kernel/l3str.dtx15
-rw-r--r--macros/latex-dev/required/l3kernel/l3styleguide.pdfbin296602 -> 296259 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3styleguide.tex2
-rw-r--r--macros/latex-dev/required/l3kernel/l3syntax-changes.pdfbin231447 -> 231103 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3syntax-changes.tex2
-rw-r--r--macros/latex-dev/required/l3kernel/l3sys.dtx18
-rw-r--r--macros/latex-dev/required/l3kernel/l3term-glossary.pdfbin242247 -> 241896 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/l3term-glossary.tex2
-rw-r--r--macros/latex-dev/required/l3kernel/l3text-case.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3text-map.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3text-purify.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3text.dtx21
-rw-r--r--macros/latex-dev/required/l3kernel/l3tl-analysis.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3tl-build.dtx2
-rw-r--r--macros/latex-dev/required/l3kernel/l3tl.dtx6
-rw-r--r--macros/latex-dev/required/l3kernel/l3token.dtx15
-rw-r--r--macros/latex-dev/required/l3kernel/l3unicode.dtx17
-rw-r--r--macros/latex-dev/required/l3kernel/source3.pdfbin7620915 -> 7612299 bytes
-rw-r--r--macros/latex-dev/required/l3kernel/source3.tex2
-rw-r--r--macros/latex-dev/required/l3kernel/source3body.tex19
-rw-r--r--macros/latex-dev/required/latex-lab/README.md2
-rw-r--r--macros/latex-dev/required/latex-lab/blocks-code.pdfbin871980 -> 881794 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/blocks-doc.pdfbin486159 -> 485663 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/changes.txt146
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdfbin539394 -> 563214 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdfbin420928 -> 420933 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support.dtx23
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx10
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdfbin382063 -> 382388 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-bib.dtx10
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-bib.pdfbin383259 -> 383673 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-block.dtx328
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-block.pdfbin871980 -> 881794 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx379
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdfbin368000 -> 398544 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-float.dtx292
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-float.pdfbin426854 -> 444624 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx116
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdfbin819698 -> 821496 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx18
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-graphic.pdfbin517900 -> 517603 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx51
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdfbin389702 -> 414685 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-math.dtx1571
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-math.pdfbin740772 -> 797404 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdfbin355789 -> 355758 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-mathtools.dtx14
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdfbin382063 -> 372235 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx55
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-minipage.pdfbin280811 -> 282259 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-namespace.dtx4
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-namespace.pdfbin235751 -> 235962 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdfbin389721 -> 389721 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdfbin632196 -> 632196 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-sec.dtx196
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-sec.pdfbin527096 -> 544929 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-table.dtx451
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-table.pdfbin556567 -> 572577 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx2
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-testphase.pdfbin298175 -> 298160 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-text.dtx8
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-text.pdfbin307812 -> 307847 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-title.pdfbin348117 -> 348117 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdfbin296124 -> 296124 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx176
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdfbin361081 -> 373186 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-toc.dtx179
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-toc.pdfbin396814 -> 406053 bytes
-rw-r--r--macros/latex-dev/required/tools/README.md2
-rw-r--r--macros/latex-dev/required/tools/afterpage.pdfbin198100 -> 198100 bytes
-rw-r--r--macros/latex-dev/required/tools/array.dtx237
-rw-r--r--macros/latex-dev/required/tools/array.pdfbin839409 -> 875329 bytes
-rw-r--r--macros/latex-dev/required/tools/bm.pdfbin323640 -> 323640 bytes
-rw-r--r--macros/latex-dev/required/tools/calc.pdfbin370660 -> 370660 bytes
-rw-r--r--macros/latex-dev/required/tools/changes.txt68
-rw-r--r--macros/latex-dev/required/tools/dcolumn.pdfbin221038 -> 221038 bytes
-rw-r--r--macros/latex-dev/required/tools/delarray.pdfbin191058 -> 191058 bytes
-rw-r--r--macros/latex-dev/required/tools/enumerate.pdfbin215077 -> 215077 bytes
-rw-r--r--macros/latex-dev/required/tools/fileerr.pdfbin187692 -> 187903 bytes
-rw-r--r--macros/latex-dev/required/tools/fontsmpl.pdfbin146438 -> 146438 bytes
-rw-r--r--macros/latex-dev/required/tools/ftnright.pdfbin387219 -> 387212 bytes
-rw-r--r--macros/latex-dev/required/tools/hhline.pdfbin189678 -> 189678 bytes
-rw-r--r--macros/latex-dev/required/tools/indentfirst.pdfbin157352 -> 157352 bytes
-rw-r--r--macros/latex-dev/required/tools/l3sys-query.pdfbin482622 -> 482622 bytes
-rw-r--r--macros/latex-dev/required/tools/layout.pdfbin260278 -> 260278 bytes
-rw-r--r--macros/latex-dev/required/tools/longtable.dtx165
-rw-r--r--macros/latex-dev/required/tools/longtable.pdfbin399651 -> 402733 bytes
-rw-r--r--macros/latex-dev/required/tools/manifest.txt10
-rw-r--r--macros/latex-dev/required/tools/multicol.dtx50
-rw-r--r--macros/latex-dev/required/tools/multicol.pdfbin524670 -> 525497 bytes
-rw-r--r--macros/latex-dev/required/tools/rawfonts.pdfbin138956 -> 138956 bytes
-rw-r--r--macros/latex-dev/required/tools/shellesc.pdfbin176171 -> 176171 bytes
-rw-r--r--macros/latex-dev/required/tools/showkeys.pdfbin252923 -> 252922 bytes
-rw-r--r--macros/latex-dev/required/tools/somedefs.pdfbin167583 -> 167583 bytes
-rw-r--r--macros/latex-dev/required/tools/tabularx.pdfbin289601 -> 289601 bytes
-rw-r--r--macros/latex-dev/required/tools/theorem.dtx3
-rw-r--r--macros/latex-dev/required/tools/theorem.pdfbin351723 -> 351812 bytes
-rw-r--r--macros/latex-dev/required/tools/tools-overview.pdfbin73673 -> 73684 bytes
-rw-r--r--macros/latex-dev/required/tools/tools-overview.tex8
-rw-r--r--macros/latex-dev/required/tools/tools.ins17
-rw-r--r--macros/latex-dev/required/tools/trace.pdfbin222074 -> 222074 bytes
-rw-r--r--macros/latex-dev/required/tools/varioref.pdfbin393884 -> 393884 bytes
-rw-r--r--macros/latex-dev/required/tools/verbatim.pdfbin331587 -> 331587 bytes
-rw-r--r--macros/latex-dev/required/tools/xr.pdfbin323877 -> 323877 bytes
-rw-r--r--macros/latex-dev/required/tools/xspace.pdfbin257027 -> 257027 bytes
210 files changed, 4148 insertions, 1693 deletions
diff --git a/macros/latex-dev/required/amsmath/README.md b/macros/latex-dev/required/amsmath/README.md
index acf256c850..d63a3303ad 100644
--- a/macros/latex-dev/required/amsmath/README.md
+++ b/macros/latex-dev/required/amsmath/README.md
@@ -1,7 +1,7 @@
The amsmath bundle for LaTeX
============================
-Release 2024-11-01 pre-release 0
+Release 2025-06-01 pre-release 0
Overview
--------
diff --git a/macros/latex-dev/required/amsmath/amsbsy.pdf b/macros/latex-dev/required/amsmath/amsbsy.pdf
index 98414b672d..e3e14d49b6 100644
--- a/macros/latex-dev/required/amsmath/amsbsy.pdf
+++ b/macros/latex-dev/required/amsmath/amsbsy.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amscd.pdf b/macros/latex-dev/required/amsmath/amscd.pdf
index 9f6494bb8e..11815c1cee 100644
--- a/macros/latex-dev/required/amsmath/amscd.pdf
+++ b/macros/latex-dev/required/amsmath/amscd.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsgen.pdf b/macros/latex-dev/required/amsmath/amsgen.pdf
index d67090a444..e3f799a338 100644
--- a/macros/latex-dev/required/amsmath/amsgen.pdf
+++ b/macros/latex-dev/required/amsmath/amsgen.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsldoc.pdf b/macros/latex-dev/required/amsmath/amsldoc.pdf
index e615a52dc4..4730fee5fa 100644
--- a/macros/latex-dev/required/amsmath/amsldoc.pdf
+++ b/macros/latex-dev/required/amsmath/amsldoc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsmath.dtx b/macros/latex-dev/required/amsmath/amsmath.dtx
index ec44957a89..9d45cc2f9d 100644
--- a/macros/latex-dev/required/amsmath/amsmath.dtx
+++ b/macros/latex-dev/required/amsmath/amsmath.dtx
@@ -81,11 +81,11 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\DeclareRelease{}{1994-06-01}{amsmath-2018-12-01.sty}
\DeclareRelease{}{2018-12-01}{amsmath-2018-12-01.sty}
-\DeclareCurrentRelease{}{2019-04-01}
+\DeclareCurrentRelease{}{2024-10-30}
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2024/05/23 v2.17q AMS math features]
+\ProvidesPackage{amsmath}[2024/10/30 v2.17s AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -166,7 +166,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{Flush-left equations [DMJ]}
%
-% The left margin of math enviroments is controlled by
+% The left margin of math environments is controlled by
% \cs{@mathmargin}. This can be set to \cs{@centering} to
% implement the default behaviour, i.e., centered equations, and to
% something else to implement the flushleft style.
@@ -208,7 +208,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% The next question is what happens when amsmath is used with
% one of the standard classes. Unfortunately, \latex/ implements
-% \opt{fleqn} somewhat clumsily; instead of paramaterizing the
+% \opt{fleqn} somewhat clumsily; instead of parameterizing the
% definitions of the math structures (as I've attempted to do
% here), \fn{fleqn.clo} declares a dimen \cn{mathindent} that is
% much like my \cs{@mathmargin} and then redefines \cn\[, \cn\],
@@ -653,7 +653,7 @@ Foreign command \@backslashchar#1;\MessageBreak
%
% the |withdelims| primitives do not work in xetex with OpenType
% fonts, and the relevant font dimen parameters are often not set
-% in luatex as theer are no matching values in the OpenType Math
+% in luatex as there are no matching values in the OpenType Math
% table, so here we use variants that use the font parameters if
% they are set, but scale using |\left\right| rather than the
% |withdelims| primitives.
@@ -1002,6 +1002,10 @@ Foreign command \@backslashchar#1;\MessageBreak
\let\DOTSI\relax
\let\DOTSB\relax
\let\DOTSX\relax
+% \end{macrocode}
+% In the definitions below, special \cs{uccode}s are used to generate macros
+% with arguments delimited by catcode 12 letters as returned by \cs{meaning}.
+% \begin{macrocode}
{\uccode`7=`\\ \uccode`8=`m \uccode`9=`a \uccode`0=`t \uccode`!=`h
\uppercase{%
\gdef\math@#1#2#3#4#5#6\math@{\gtest@false\ifx 7#1\ifx 8#2%
@@ -1039,6 +1043,13 @@ Foreign command \@backslashchar#1;\MessageBreak
}
\fi
% \end{macrocode}
+% \changes{v2.17s}{2024/10/30}{guard against primitive if (gh/1448)}
+% \begin{macrocode}
+{\uccode`7=`\\ \uccode`(=`i \uccode`)=`f
+ \uppercase{\gdef\testif@#1#2#3#4\testif@{%
+ \ifx7#1\ifx(#2\ifx)#3\@tempswafalse\fi\fi\fi}
+}}
+% \end{macrocode}
% \begin{macrocode}
\newcount\classnum@
\def\getmathch@#1.#2\getmathch@{\classnum@#1 \divide\classnum@4096
@@ -1087,6 +1098,14 @@ Foreign command \@backslashchar#1;\MessageBreak
\ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
\def\zap@to@space#1 {}
% \end{macrocode}
+%
+% \changes{v2.17r}{2024/06/29}{macro added to strip \cs{protected} (gh/1265)}
+% \begin{macrocode}
+{\uccode`9=`\p %
+ \uppercase{\gdef\stripprotected@#1#2#3\relax{%
+ \ifx9#2 \@xp\@xp\@xp\zap@to@space\fi}}}
+% \end{macrocode}
+%
% \begin{macrocode}
\def\keybin@{\gtest@true
\ifx\@let@token+\else\ifx\@let@token=\else
@@ -1139,15 +1158,43 @@ Foreign command \@backslashchar#1;\MessageBreak
\gdef\thedots@{\dotsb@}%
\else
% \end{macrocode}
-% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway argument error}
+% In case \cs{@let@token} is a robust \LaTeXe{} command, i.e.,
+% expands to \cs{protect}
+% \verb*=\somename =, we save the \cs{meaning} of
+% \verb*=\somename = in \cs{meaning@} (possibly followed by some dots that have
+% not been consumed as arguments during the expansion).
+% Otherwise, we save the
+% \cs{meaning} of \cs{@let@token} in \cs{meaning@}. The dots at the end
+% as well as the space are
+% used in later parts of the checking (this could probably be cleaned up a bit).
+% \changes{v2.15d}{2016/06/28}{Add space token to prevent runaway
+% argument error}
+% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
+% \changes{v2.17s}{2024/10/30}{skip protect testif detect primitive if (gh/1448)}
% \begin{macrocode}
\xdef\meaning@{\meaning\@let@token. .........}%
-% \end{macrocode}
-% In previous versions \verb|\long| macros were not seen by the lokkahead.
+ \@tempswatrue
+ \@xp\testif@\meaning@....\testif@
+ \if@tempswa
+ \begingroup
+ \def\protect{\protect}% % make it a quark
+ \xdef\meaning@{\@xp\stripprotect@\@let@token.........\stripprotect@. .........}%
+ \endgroup
+ \fi
+% \end{macrocode}
+% In previous versions \verb|\long| macros were not seen by the lookahead.
% That was bad as this file uses \verb|\(re)newcommand| for \verb|\implies| etc.
% \begin{macrocode}
\xdef\meaning@@{\@xp\striplong@\meaning@\relax\meaning@}%
% \end{macrocode}
+% Until now \cs{protected} macros also stopped the lookahead, e.g.,
+% $\cong$ wasn't recognized correctly for that reason.
+%
+% \changes{v2.17r}{2024/06/29}{Handle \cs{protected} macros in
+% lookahead for dots (gh/1265)}
+% \begin{macrocode}
+ \xdef\meaning@@{\@xp\stripprotected@\meaning@@\relax\meaning@@}%
+% \end{macrocode}
% \begin{macrocode}
\@xp\math@\meaning@\math@
\ifgtest@ % if \mathxxx test
@@ -1208,6 +1255,15 @@ Foreign command \@backslashchar#1;\MessageBreak
\thedots@}
% \end{macrocode}
%
+% The helper to generate the meaning of \cs{\@let@token}, or of its
+% first-level expansion with \cs{protect} removed.
+% \changes{v2.17r}{2024/06/29}{Drop \cs{protect} if present (gh/1265)}
+% \begin{macrocode}
+\def\stripprotect@#1#2\stripprotect@{\ifx#1\protect
+ \meaning#2\else \meaning\@let@token \fi}
+
+% \end{macrocode}
+%
% The \qc{\=} character is necessary in the two \cs{let} assignments
% in \cs{boldsymboldots@}, because the symbol we are making
% bold might be an \qc{\=} sign.
@@ -3363,7 +3419,7 @@ ill-advised in LaTeX.%
% \end{macro}
%
% \begin{macro}{\column@plus}
-% \cs{\column@plus} is a useful abbreviation.
+% \cs{column@plus} is a useful abbreviation.
% \begin{macrocode}
\def\column@plus{%
\global\advance\column@\@ne
@@ -3786,7 +3842,7 @@ and fix things up.}
% (In earlier versions of the code anything other than \texttt{b}
% or \texttt{t} was interpreted as \texttt{c} and the data was
% otherwise dropped.)
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
% optional argument is different (gh/5)}
% \begin{macrocode}
\def\ams@start@box#1{%
@@ -3919,7 +3975,7 @@ and fix things up.}
% \end{macrocode}
% If we picked up a bracket group by mistake here is the place to
% return it for processing.
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
% optional argument is different (gh/5)}
% \begin{macrocode}
\ams@return@opt@arg
@@ -4018,7 +4074,7 @@ and fix things up.}
\crcr
% \end{macrocode}
% And put a mistaking picked up bracket group back:
-% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return
+% \changes{v2.17g}{2020/03/10}{Explicitly test for b/t/c and return
% optional argument is different (gh/5)}
% \begin{macrocode}
\ams@return@opt@arg
@@ -4592,7 +4648,7 @@ trying to recover with `aligned'%
% \env{alignat} (i.e., the $n$th field of \cs{maxcolumn@widths}.)
% It expands to a \<dimen>, so it can be used as the right-hand
% side of a \<variable assignment> or \<arithmetic> statement.
-% It's argument can be any \<number>, \<integer variable> or macro
+% Its argument can be any \<number>, \<integer variable> or macro
% that expands to one of these. [Check to make sure this is true.]
%
% This is subtler than it looks.
@@ -5041,7 +5097,7 @@ trying to recover with `aligned'%
% Next we consider the case when equations are flush-left, but tags
% are on the right. This case is somewhat more complicated than
% the previous one, since we can adjust the right margin by varying
-% the inter-align separatin. Thus, when a tag is found to be too
+% the inter-align separation. Thus, when a tag is found to be too
% close to its equation, we first attempt to decrease
% \cs{alignsep@} enough to move the equation off to an acceptable
% distance. Only if that would require a value of \cs{alignsep@}
@@ -5078,7 +5134,7 @@ trying to recover with `aligned'%
% \cs{alignsep@} are both~0. To get the number of align
% structures, we first count the number of columns by counting the
% number of entries in the \cs{fieldlengths@} for the current row.
-% The effective length is calcuated by \cs{x@rcalc@width} and put
+% The effective length is calculated by \cs{x@rcalc@width} and put
% in the temporary register \cs{@tempdimc}, using \cs{@tempdimb} as
% an auxiliary variable.
% \begin{macrocode}
@@ -5500,7 +5556,7 @@ trying to recover with `aligned'%
% might occur at the beginning of the current line. More
% specifically, we first set \cs{count@} equal to the number of
% interalign spaces preceding the current field (namely, $\lfloor
-% (\cs{\column@}-1)/2 \rfloor$), and then subtract \cs{count@} from
+% (\cs{column@}-1)/2 \rfloor$), and then subtract \cs{count@} from
% both \cs{@tempcnta} and \cs{@tempcntb}. The rationale is that
% for the purposes of adjusting the spacing between the tag and the
% equation, the only flexible interalign spaces are those after
@@ -5523,7 +5579,7 @@ trying to recover with `aligned'%
% \end{macro}
%
% \begin{macro}{\place@tag}
-% \cs{place@tag} takes care of the placment of tags in the
+% \cs{place@tag} takes care of the placement of tags in the
% \env{align} environments.
% \begin{macrocode}
\def\place@tag{%
@@ -6187,7 +6243,7 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
% in his \fn{amstex.doc} Spivak indicates those commands should never
% be used on a first or last line. Perhaps better to leave the
% question open unless/until real-life examples turn up.
-% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trival)}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveright} robust (if def is not trivial)}
% \begin{macrocode}
\iftagsleft@
\protected\def\shoveright#1{%
@@ -6212,7 +6268,7 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
}
\fi
% \end{macrocode}
-% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trival)}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trivial)}
% \begin{macrocode}
\if@fleqn
\def\shoveleft#1{#1}%
@@ -6576,14 +6632,14 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\def\mathdisplay@@pop{\the\mathdisplay@stack}
% \end{macrocode}
%\changes{v2.17k}{2021/08/24}{Move the counter inside the equation and guard
-% with a mathopen for better compability with hyperref, issue gh/652}
+% with a mathopen for better compatibility with hyperref, issue gh/652}
% As with hyperref incrementing the counter creates a box to raise the anchor
% it should be in a place where is doesn't affect spacing.
% Currently the code from hyperref is used to avoid this problem:
% If fleqn isn't active the counter is set inside the equation and the potential
% box guarded by a mathopen to avoid side effects on following unary symbols.
% If fleqn is activated it has to be outside to avoid problems with labels.
-% This solution is temporary and not necessarly the best.
+% This solution is temporary and not necessarily the best.
% \begin{macrocode}
\if@fleqn
\renewenvironment{equation}{%
@@ -6637,7 +6693,7 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
%
% \section{Credits}
%
-% Much of the code for the \pkg{amsmath} package had its orgin in
+% Much of the code for the \pkg{amsmath} package had its origin in
% \fn{amstex.tex}, written by Michael Spivak. The initial work of
% porting \fn{amstex.tex} to \fn{amstex.sty} was done in 1988--1989
% by Frank Mittelbach and Rainer Sch\"opf. In 1994 David M. Jones
diff --git a/macros/latex-dev/required/amsmath/amsmath.pdf b/macros/latex-dev/required/amsmath/amsmath.pdf
index 2ae7c81905..dbe7953966 100644
--- a/macros/latex-dev/required/amsmath/amsmath.pdf
+++ b/macros/latex-dev/required/amsmath/amsmath.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsopn.pdf b/macros/latex-dev/required/amsmath/amsopn.pdf
index 6f1b3c0331..91b1e68ce8 100644
--- a/macros/latex-dev/required/amsmath/amsopn.pdf
+++ b/macros/latex-dev/required/amsmath/amsopn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amstext.pdf b/macros/latex-dev/required/amsmath/amstext.pdf
index 37ad4cc7fa..abc6787b01 100644
--- a/macros/latex-dev/required/amsmath/amstext.pdf
+++ b/macros/latex-dev/required/amsmath/amstext.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/amsxtra.pdf b/macros/latex-dev/required/amsmath/amsxtra.pdf
index af44bc5e9b..eaa368f926 100644
--- a/macros/latex-dev/required/amsmath/amsxtra.pdf
+++ b/macros/latex-dev/required/amsmath/amsxtra.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/changes.txt b/macros/latex-dev/required/amsmath/changes.txt
index 588e7d36d0..170c7fe0d7 100644
--- a/macros/latex-dev/required/amsmath/changes.txt
+++ b/macros/latex-dev/required/amsmath/changes.txt
@@ -3,7 +3,17 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
-# 2023-11-01 Release
+# 2024-11-01 Release
+#########################
+
+2024-08-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (section{Ellipsis dots}):
+ Support special \dots magic in case of robust symbols protected with
+ \protected or via \DeclareRobustCommand (gh/1265)
+
+#########################
+# 2024-06-01 Release
#########################
2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
diff --git a/macros/latex-dev/required/amsmath/subeqn.pdf b/macros/latex-dev/required/amsmath/subeqn.pdf
index 54f6fe9385..bcbb801d12 100644
--- a/macros/latex-dev/required/amsmath/subeqn.pdf
+++ b/macros/latex-dev/required/amsmath/subeqn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/technote.pdf b/macros/latex-dev/required/amsmath/technote.pdf
index 6526568bda..8b5b33ae3d 100644
--- a/macros/latex-dev/required/amsmath/technote.pdf
+++ b/macros/latex-dev/required/amsmath/technote.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/testmath.pdf b/macros/latex-dev/required/amsmath/testmath.pdf
index e1ce7c6acd..399ff76fdd 100644
--- a/macros/latex-dev/required/amsmath/testmath.pdf
+++ b/macros/latex-dev/required/amsmath/testmath.pdf
Binary files differ
diff --git a/macros/latex-dev/required/firstaid/changes.txt b/macros/latex-dev/required/firstaid/changes.txt
index 7ddcfbcec2..5bfe7f1a53 100644
--- a/macros/latex-dev/required/firstaid/changes.txt
+++ b/macros/latex-dev/required/firstaid/changes.txt
@@ -1,3 +1,13 @@
+2024-10-16 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: extend firstaid for cleveref
+ for issue #1393 and longtable.
+
+2024-06-25 David Carlisle <David.Carlisle@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx: add firstaid for arydshln
+ define two internal macros as \protected to be safe in colortbl
+
2024-03-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
* latex2e-first-aid-for-external-files.dtx: add firstaid for cleveref
diff --git a/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx b/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx
index 152737eaf7..68877bc24d 100644
--- a/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx
+++ b/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2024/03/20}
-\def\LaTeXFirstAidVersion{v1.1e}
+\def\LaTeXFirstAidDate{2024/10/16}
+\def\LaTeXFirstAidVersion{v1.1g}
% \end{macrocode}
%
% \begin{macrocode}
@@ -343,7 +343,7 @@
% It will be replaced when the ``configuration points'' interface
% for \LaTeX{} becomes available. At that point the package will be
% able to set up a different strategy for doing shipouts and
-% without the need to overrite a primitive (which it did in the
+% without the need to overwrite a primitive (which it did in the
% past and which we do below) and then this code here can be taken
% out again.
% \begin{macrocode}
@@ -446,7 +446,7 @@
% the classic \TeX{} implementation but with the extended
% allocation possibilities of all modern engines is no longer the
% case and there is a point where the allocations take a ``jump''
-% breaking the odering assumption. These days we are fairly close
+% breaking the ordering assumption. These days we are fairly close
% to that point and depending on how many packages are loaded
% before \pkg{bigfoot} the package breaks.
%
@@ -717,10 +717,61 @@
{[\@tempb][\arabic{page}][\cref@result]\thepage}{}{}{}}}% <------- five
\@esphack}%
}
+% \end{macrocode}
+% \changes{v1.1g}{2024/10/16}{update cleveref data in label hook}
+% cleveref patches and redefines \cs{refstepcounter} so that a call updates its data.
+% This fails if like e.g. in \pkg{longtable} the counter is stepped with
+% \cs{@kernel@refstepcounter}. We therefore move the data setup into the label hook.
+% As the hook is in a group we have to smuggle the data out of it.
+% \url{https://tex.stackexchange.com/a/722909/2388} and issue \#1393
+% \begin{macrocode}
+ \newcommand\firstaid@cref@smugglelabel{\let\cref@currentlabel\cref@gcurrentlabel@temp}
+ \newcommand\firstaid@cref@updatelabeldata[1]{%
+ \cref@constructprefix{#1}{\cref@result}%
+ \@ifundefined{cref@#1@alias}%
+ {\def\@tempa{#1}}%
+ {\def\@tempa{\csname cref@#1@alias\endcsname}}%
+ \protected@xdef\cref@gcurrentlabel@temp{%
+ [\@tempa][\arabic{#1}][\cref@result]%
+ \csname p@#1\endcsname\csname the#1\endcsname}%
+ \aftergroup\firstaid@cref@smugglelabel
+ }
+% \end{macrocode}
+% we test if \cs{@currentcounter} is empty for unnumbered sections
+% \begin{macrocode}
+ \AddToHook{label}[firstaid/cleveref]
+ {\ifx
+ \@currentcounter\@empty
+ \else
+ \firstaid@cref@updatelabeldata{\@currentcounter}
+ \fi}
}%
}
% \end{macrocode}
%
+% \subsection{The \pkg{arydshln} package first aid}
+%
+% Making two internal commands robust to avoid expansion while constructing the array preamble.
+% \begin{macrocode}
+\AddToHook{package/arydshln/after}[firstaid]{%
+ \FirstAidNeededT{arydshln}{sty}{2019/02/21 v1.76 }
+ {%
+% add \protected
+\protected\def\adl@@vlineL#1#2#3#4{\adl@ivline#4\@nil{#1}{#2}%
+ \xdef\adl@colsL{\adl@colsL
+ \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+ {\adl@dashcolor}{\adl@gapcolor}}}%
+\protected\def\adl@@vlineR#1#2#3#4{\adl@ivline#4\@nil{#1}{#2}%
+ \xdef\adl@colsR{%
+ \@elt{#3}{\number\@tempcnta}{\number\@tempcntb}%
+ {\adl@dashcolor}{\adl@gapcolor}%
+ \adl@colsR}}%
+\let\adl@act@@vlineL\adl@@vlineL
+\let\adl@act@@vlineR\adl@@vlineR
+ }%
+}
+% \end{macrocode}
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
diff --git a/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdf b/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdf
index 672d8f4fe0..4d4e6e27e3 100644
--- a/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdf
+++ b/macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/README.md b/macros/latex-dev/required/graphics/README.md
index b622f8fbfd..0160491bb9 100644
--- a/macros/latex-dev/required/graphics/README.md
+++ b/macros/latex-dev/required/graphics/README.md
@@ -1,7 +1,7 @@
The LaTeX `graphics` bundle
===========================
-Release 2024-11-01 pre-release 0
+Release 2025-06-01 pre-release 0
Overview
--------
diff --git a/macros/latex-dev/required/graphics/changes.txt b/macros/latex-dev/required/graphics/changes.txt
index face90b342..d437358079 100644
--- a/macros/latex-dev/required/graphics/changes.txt
+++ b/macros/latex-dev/required/graphics/changes.txt
@@ -9,7 +9,16 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
-# 2023-11-01 Release
+# 2024-11-01 Release
+#########################
+
+2024-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * color.dtx (section{Extra Groups}):
+ Support new @endpe mechanism
+
+#########################
+# 2024-06-01 Release
#########################
2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
diff --git a/macros/latex-dev/required/graphics/color.dtx b/macros/latex-dev/required/graphics/color.dtx
index 130a960d09..b14c148f2f 100644
--- a/macros/latex-dev/required/graphics/color.dtx
+++ b/macros/latex-dev/required/graphics/color.dtx
@@ -21,7 +21,7 @@
%<driver> \ProvidesFile{color.drv}
% \fi
% \ProvidesFile{color.dtx}
- [2024/01/14 v1.3d Standard LaTeX Color (DPC)]
+ [2024/06/23 v1.3e Standard LaTeX Color (DPC)]
%
% \iffalse
%<*driver>
@@ -877,10 +877,15 @@
% commands. The |\endgraf| in its definition is required in the case
% of groups of text in vertical `par' mode, but doesn't do any harm in
% horizontal `LR' contexts.
+% The |\@endpefalse| is required for the newer \texttt{@endpe}
+% handling, again it is harmless if an older kernel is used
+% (because there it was a local assignment).
% \changes{v0.2d}{1994/05/13}
% {New definition, was previously just \cs{endgroup}}
+% \changes{v1.3e}{2024/06/23}
+% {Support new \texttt{@endpe} mechanism}
% \begin{macrocode}
-\def\color@endgroup{\endgraf\endgroup}
+\def\color@endgroup{\endgraf\@endpefalse\endgroup}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/required/graphics/color.pdf b/macros/latex-dev/required/graphics/color.pdf
index 964aa7edbd..081cfb5463 100644
--- a/macros/latex-dev/required/graphics/color.pdf
+++ b/macros/latex-dev/required/graphics/color.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/drivers.pdf b/macros/latex-dev/required/graphics/drivers.pdf
index b010839e78..03dc4fc6b4 100644
--- a/macros/latex-dev/required/graphics/drivers.pdf
+++ b/macros/latex-dev/required/graphics/drivers.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/epsfig.pdf b/macros/latex-dev/required/graphics/epsfig.pdf
index 36457b3559..16b8cc6bdc 100644
--- a/macros/latex-dev/required/graphics/epsfig.pdf
+++ b/macros/latex-dev/required/graphics/epsfig.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphics.dtx b/macros/latex-dev/required/graphics/graphics.dtx
index 2392ac09d1..86556ea40a 100644
--- a/macros/latex-dev/required/graphics/graphics.dtx
+++ b/macros/latex-dev/required/graphics/graphics.dtx
@@ -27,7 +27,7 @@
%<driver> \ProvidesFile{graphics.drv}
% \fi
% \ProvidesFile{graphics.dtx}
- [2024/05/23 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
+ [2024/08/06 v1.4g Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1050,7 +1050,8 @@
%
% \begin{macrocode}
\edef\Gin@gzext{\detokenize{gz}}
-% \edef{macrocode}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
%
% \begin{macro}{\Gin@set@curr@file}
diff --git a/macros/latex-dev/required/graphics/graphics.pdf b/macros/latex-dev/required/graphics/graphics.pdf
index 559f3c5a81..24df86ee4e 100644
--- a/macros/latex-dev/required/graphics/graphics.pdf
+++ b/macros/latex-dev/required/graphics/graphics.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/graphicx.pdf b/macros/latex-dev/required/graphics/graphicx.pdf
index d1568333c2..bdd0c30cca 100644
--- a/macros/latex-dev/required/graphics/graphicx.pdf
+++ b/macros/latex-dev/required/graphics/graphicx.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/grfguide.pdf b/macros/latex-dev/required/graphics/grfguide.pdf
index 4e68cea91e..8a060397b6 100644
--- a/macros/latex-dev/required/graphics/grfguide.pdf
+++ b/macros/latex-dev/required/graphics/grfguide.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/keyval.pdf b/macros/latex-dev/required/graphics/keyval.pdf
index 1cfd06071d..ac7d5d5f67 100644
--- a/macros/latex-dev/required/graphics/keyval.pdf
+++ b/macros/latex-dev/required/graphics/keyval.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/lscape.pdf b/macros/latex-dev/required/graphics/lscape.pdf
index b3ffd8c2cd..9a3b2f72d8 100644
--- a/macros/latex-dev/required/graphics/lscape.pdf
+++ b/macros/latex-dev/required/graphics/lscape.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/mathcolor.pdf b/macros/latex-dev/required/graphics/mathcolor.pdf
index 36905fbf31..6f843714d6 100644
--- a/macros/latex-dev/required/graphics/mathcolor.pdf
+++ b/macros/latex-dev/required/graphics/mathcolor.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotating.pdf b/macros/latex-dev/required/graphics/rotating.pdf
index 2ecb86346a..9d45e0a40c 100644
--- a/macros/latex-dev/required/graphics/rotating.pdf
+++ b/macros/latex-dev/required/graphics/rotating.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/rotex.pdf b/macros/latex-dev/required/graphics/rotex.pdf
index 251dcd20b1..b2b66d505e 100644
--- a/macros/latex-dev/required/graphics/rotex.pdf
+++ b/macros/latex-dev/required/graphics/rotex.pdf
Binary files differ
diff --git a/macros/latex-dev/required/graphics/trig.pdf b/macros/latex-dev/required/graphics/trig.pdf
index d220e18d1e..9edb838d90 100644
--- a/macros/latex-dev/required/graphics/trig.pdf
+++ b/macros/latex-dev/required/graphics/trig.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/CHANGELOG.md b/macros/latex-dev/required/l3kernel/CHANGELOG.md
index c58c1a6188..80629d5ef5 100644
--- a/macros/latex-dev/required/l3kernel/CHANGELOG.md
+++ b/macros/latex-dev/required/l3kernel/CHANGELOG.md
@@ -7,6 +7,57 @@ this project uses date-based 'snapshot' version identifiers.
## [Unreleased]
+## [2024-11-02]
+
+### Added
+- `V`-type variant for all `\<var>_set:Nn` functions
+
+### Fixed
+- Error detection in coffin code (see \#1580)
+
+## [2024-10-09]
+
+### Added
+- `\coffin_ht_plus_dp:(N|c)`
+
+### Fixed
+- Use TU-encoding with lualatex and xelatex in `l3doc`
+- Inconsistent local/global assignments in `l3doc` (see \#1593)
+
+## [2024-09-10]
+
+### Fixed
+- `\seq_map_pairwise_function:NNN` not work with `\seq_map_break:(n)` (issue \#1587)
+
+### Changed
+- Increase outdent of long function names in `l3doc` (issue \#1585)
+
+## [2024-08-30]
+
+### Changed
+- Reduce memory usage when building Unicode data storage
+- Avoid recursive doc for `\file_if_exist:n(TF)` (issue \#1573)
+
+### Fixed
+- Handling of `ltcmd` newlines (`\obeyedline`) in `l3doc` (issue \#1577)
+
+## [2024-08-16]
+
+### Added
+- Add quark (`\q_`) and scan mark (`\s_`) prefixes to naming scheme
+ (issue \#1565)
+
+## [2024-07-20]
+
+### Fixed
+- Implementation of deprecated `\tl_mixed_case:n(n)`
+- Redo the fix for LaTeX2e key properties (issue latex3/latex2e\#1415)
+
+## [2024-06-19]
+
+### Fixed
+- Avoid a low-level error when LaTeX2e key properties are given without a value
+
## [2024-05-27]
### Added
@@ -1742,7 +1793,14 @@ this project uses date-based 'snapshot' version identifiers.
- Step functions have been added for dim variables,
e.g. `\dim_step_inline:nnnn`
-[Unreleased]: https://github.com/latex3/latex3/compare/2024-05-27...HEAD
+[Unreleased]: https://github.com/latex3/latex3/compare/2024-11-02...HEAD
+[2024-11-02]: https://github.com/latex3/latex3/compare/2024-10-09...2024-11-02
+[2024-10-09]: https://github.com/latex3/latex3/compare/2024-09-10...2024-10-09
+[2024-09-10]: https://github.com/latex3/latex3/compare/2024-08-30...2024-09-10
+[2024-08-30]: https://github.com/latex3/latex3/compare/2024-08-16...2024-08-30
+[2024-08-16]: https://github.com/latex3/latex3/compare/2024-07-20...2024-08-16
+[2024-07-20]: https://github.com/latex3/latex3/compare/2024-06-19...2024-07-20
+[2024-06-19]: https://github.com/latex3/latex3/compare/2024-05-27...2024-06-19
[2024-05-27]: https://github.com/latex3/latex3/compare/2024-05-08...2024-05-27
[2024-05-08]: https://github.com/latex3/latex3/compare/2024-04-11...2024-05-08
[2024-04-11]: https://github.com/latex3/latex3/compare/2024-03-14...2024-04-11
diff --git a/macros/latex-dev/required/l3kernel/README.md b/macros/latex-dev/required/l3kernel/README.md
index 8946af1293..d048951c6d 100644
--- a/macros/latex-dev/required/l3kernel/README.md
+++ b/macros/latex-dev/required/l3kernel/README.md
@@ -1,7 +1,7 @@
LaTeX3 Programming Conventions
==============================
-Release 2024-05-27
+Release 2024-11-02
Overview
--------
diff --git a/macros/latex-dev/required/l3kernel/expl3.dtx b/macros/latex-dev/required/l3kernel/expl3.dtx
index 4b4e61d3c8..2d0a15de88 100644
--- a/macros/latex-dev/required/l3kernel/expl3.dtx
+++ b/macros/latex-dev/required/l3kernel/expl3.dtx
@@ -24,7 +24,7 @@
%
%<*driver|generic|package|2ekernel>
%</driver|generic|package|2ekernel>
-\def\ExplFileDate{2024-05-27}%
+\def\ExplFileDate{2024-11-02}%
%<*driver>
\documentclass[full]{l3doc}
\usepackage{graphicx}
@@ -51,7 +51,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -454,6 +454,15 @@
% implementation in \LaTeX3 means that |toks| are not required, and that
% all operations for storing tokens can use the |tl| variable type.
%
+% There are two more special types of constants:
+% \begin{arg-description}
+% \item[q] constants of quark type;
+% \item[s] constants of scan mark type.
+% \end{arg-description}
+% The \meta{type} part of quark and scan mark constants is omitted, and
+% the \meta{module} part of general quarks and scan marks is often
+% omitted too.
+%
% Experienced \TeX{} programmers will notice that some of the variable
% types listed are native \TeX{} registers whilst others are not. In
% general, the underlying \TeX{} implementation for a data structure may
diff --git a/macros/latex-dev/required/l3kernel/expl3.pdf b/macros/latex-dev/required/l3kernel/expl3.pdf
index 7210fd3321..70a1b7c03c 100644
--- a/macros/latex-dev/required/l3kernel/expl3.pdf
+++ b/macros/latex-dev/required/l3kernel/expl3.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/interface3.pdf b/macros/latex-dev/required/l3kernel/interface3.pdf
index 69e5f39bc6..359987dde7 100644
--- a/macros/latex-dev/required/l3kernel/interface3.pdf
+++ b/macros/latex-dev/required/l3kernel/interface3.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/interface3.tex b/macros/latex-dev/required/l3kernel/interface3.tex
index 62501cfa53..91576320b0 100644
--- a/macros/latex-dev/required/l3kernel/interface3.tex
+++ b/macros/latex-dev/required/l3kernel/interface3.tex
@@ -58,7 +58,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-11-02}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex-dev/required/l3kernel/l3basics.dtx b/macros/latex-dev/required/l3kernel/l3basics.dtx
index 69e4441580..934bffb39f 100644
--- a/macros/latex-dev/required/l3kernel/l3basics.dtx
+++ b/macros/latex-dev/required/l3kernel/l3basics.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -1151,10 +1151,9 @@
% argument (a single token denoted by |N|) is still free for definition.
% It would be used in constructions like
% \begin{quote}
-% |\bool_if:nTF {| \\
-% \verb" \cs_if_free_p:N \l_tmpz_tl || \cs_if_free_p:N \g_tmpz_tl " \\
-% |}|
-% \Arg{true code} \Arg{false code}
+% "\bool_if:nTF" \\
+% " { \cs_if_free_p:N \l_tmpz_tl || \cs_if_free_p:N \g_tmpz_tl }" \\
+% " "\Arg{true code} \Arg{false code}
% \end{quote}
%
% For each predicate defined, a \enquote{branching conditional}
@@ -1171,7 +1170,7 @@
%
% \subsection{Tests on control sequences}
%
-% \begin{function}[EXP,pTF]{\cs_if_eq:NN}
+% \begin{function}[EXP,pTF]{\cs_if_eq:NN, \cs_if_eq:Nc, \cs_if_eq:cN, \cs_if_eq:cc}
% \begin{syntax}
% \cs{cs_if_eq_p:NN} \meta{cs_1} \meta{cs_2}
% \cs{cs_if_eq:NNTF} \meta{cs_1} \meta{cs_2} \Arg{true code} \Arg{false code}
diff --git a/macros/latex-dev/required/l3kernel/l3bitset.dtx b/macros/latex-dev/required/l3kernel/l3bitset.dtx
index 4559b56fd3..79a5a21b4d 100644
--- a/macros/latex-dev/required/l3kernel/l3bitset.dtx
+++ b/macros/latex-dev/required/l3kernel/l3bitset.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3bootstrap.dtx b/macros/latex-dev/required/l3kernel/l3bootstrap.dtx
index 861f0bb5a6..105304afe4 100644
--- a/macros/latex-dev/required/l3kernel/l3bootstrap.dtx
+++ b/macros/latex-dev/required/l3kernel/l3bootstrap.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3box.dtx b/macros/latex-dev/required/l3kernel/l3box.dtx
index 808d22da23..6499104961 100644
--- a/macros/latex-dev/required/l3kernel/l3box.dtx
+++ b/macros/latex-dev/required/l3kernel/l3box.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -906,9 +906,9 @@
% \begin{syntax}
% \cs{box_set_trim:Nnnnn} \meta{box} \Arg{left} \Arg{bottom} \Arg{right} \Arg{top}
% \end{syntax}
-% Adjusts the bounding box of the \meta{box} \meta{left} is removed from
+% Adjusts the bounding box of the \meta{box}: \meta{left} is removed from
% the left-hand edge of the bounding box, \meta{right} from the right-hand
-% edge and so fourth. All adjustments are \meta{dim exprs}.
+% edge, and so forth. All adjustments are \meta{dim exprs}.
% Material outside of the bounding box is still displayed in the output
% unless \cs{box_set_clipped:N} is subsequently applied.
% The updated \meta{box} is an
diff --git a/macros/latex-dev/required/l3kernel/l3cctab.dtx b/macros/latex-dev/required/l3kernel/l3cctab.dtx
index 4bf8db41a6..53db15109b 100644
--- a/macros/latex-dev/required/l3kernel/l3cctab.dtx
+++ b/macros/latex-dev/required/l3kernel/l3cctab.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3clist.dtx b/macros/latex-dev/required/l3kernel/l3clist.dtx
index 5adb01cffb..dc6caccf0d 100644
--- a/macros/latex-dev/required/l3kernel/l3clist.dtx
+++ b/macros/latex-dev/required/l3kernel/l3clist.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -324,8 +324,10 @@
% {
% \clist_remove_all:Nn, \clist_remove_all:cn,
% \clist_remove_all:NV, \clist_remove_all:cV,
+% \clist_remove_all:Ne, \clist_remove_all:ce,
% \clist_gremove_all:Nn, \clist_gremove_all:cn,
-% \clist_gremove_all:NV, \clist_gremove_all:cV
+% \clist_gremove_all:NV, \clist_gremove_all:cV,
+% \clist_gremove_all:Ne, \clist_gremove_all:ce
% }
% \begin{syntax}
% \cs{clist_remove_all:Nn} \meta{clist~var} \Arg{item}
@@ -350,7 +352,7 @@
% Reverses the order of items stored in the \meta{clist~var}.
% \end{function}
%
-% \begin{function}[added = 2014-07-18]{\clist_reverse:n}
+% \begin{function}[added = 2014-07-18, EXP]{\clist_reverse:n}
% \begin{syntax}
% \cs{clist_reverse:n} \Arg{comma list}
% \end{syntax}
@@ -391,7 +393,7 @@
% \cs{clist_if_empty_p:n} \Arg{comma list}
% \cs{clist_if_empty:nTF} \Arg{comma list} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{clist~var} is empty (containing no items).
+% Tests if the \meta{comma~list} is empty (containing no items).
% The rules for space trimming are as for other \texttt{n}-type
% comma-list functions, hence the comma list |{~,~,,~}| (without
% outer braces) is empty, while |{~,{},}| (without outer braces)
@@ -562,7 +564,8 @@
%
% \begin{function}[EXP, added = 2013-05-26]{\clist_use:Nnnn, \clist_use:cnnn}
% \begin{syntax}
-% \cs{clist_use:Nnnn} \meta{clist~var} \Arg{separator~between~two} \Arg{separator~between~more~than~two} \Arg{separator~between~final~two}
+% \cs{clist_use:Nnnn} \meta{clist~var} \Arg{separator~between~two} \\
+% ~~\Arg{separator~between~more~than~two} \Arg{separator~between~final~two}
% \end{syntax}
% Places the contents of the \meta{clist~var} in the input stream,
% with the appropriate \meta{separator} between the items. Namely, if
@@ -618,8 +621,9 @@
%
% \begin{function}[EXP, added = 2021-05-10]{\clist_use:nnnn, \clist_use:nn}
% \begin{syntax}
-% \cs{clist_use:nnnn} \meta{comma~list} \Arg{separator~between~two} \Arg{separator~between~more~than~two} \Arg{separator~between~final~two}
-% \cs{clist_use:nn} \meta{comma~list} \Arg{separator}
+% \cs{clist_use:nnnn} \Arg{comma~list} \Arg{separator~between~two} \\
+% ~~\Arg{separator~between~more~than~two} \Arg{separator~between~final~two}
+% \cs{clist_use:nn} \Arg{comma~list} \Arg{separator}
% \end{syntax}
% Places the contents of the \meta{comma~list} in the input stream,
% with the appropriate \meta{separator} between the items. As for
@@ -648,60 +652,60 @@
% \begin{function}[noTF, added = 2012-05-14, updated = 2019-02-16]
% {\clist_get:NN, \clist_get:cN}
% \begin{syntax}
-% \cs{clist_get:NN} \meta{clist~var} \meta{token list variable}
+% \cs{clist_get:NN} \meta{clist~var} \meta{tl~var}
% \end{syntax}
% Stores the left-most item from a \meta{clist~var} in the
-% \meta{token list variable} without removing it from the
-% \meta{clist~var}. The \meta{token list variable} is assigned locally.
+% \meta{tl~var} without removing it from the
+% \meta{clist~var}. The \meta{tl~var} is assigned locally.
% In the non-branching version, if the \meta{clist~var} is empty the
-% \meta{token list variable} is set to the marker value \cs{q_no_value}.
+% \meta{tl~var} is set to the marker value \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2011-09-06]{\clist_pop:NN, \clist_pop:cN}
% \begin{syntax}
-% \cs{clist_pop:NN} \meta{clist~var} \meta{token list variable}
+% \cs{clist_pop:NN} \meta{clist~var} \meta{tl~var}
% \end{syntax}
% Pops the left-most item from a \meta{clist~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% comma list and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% comma list and stores it in the \meta{tl~var}.
% Both of the variables are assigned locally.
% \end{function}
%
% \begin{function}{\clist_gpop:NN, \clist_gpop:cN}
% \begin{syntax}
-% \cs{clist_gpop:NN} \meta{clist~var} \meta{token list variable}
+% \cs{clist_gpop:NN} \meta{clist~var} \meta{tl~var}
% \end{syntax}
% Pops the left-most item from a \meta{clist~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% comma list and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% comma list and stores it in the \meta{tl~var}.
% The \meta{clist~var} is modified globally, while the assignment of
-% the \meta{token list variable} is local.
+% the \meta{tl~var} is local.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14]{\clist_pop:NN, \clist_pop:cN}
% \begin{syntax}
-% \cs{clist_pop:NNTF} \meta{clist~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{clist_pop:NNTF} \meta{clist~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{clist~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{clist~var} is non-empty, pops the top item from the
-% \meta{clist~var} in the \meta{token list variable}, \emph{i.e.}~removes
+% \meta{clist~var} in the \meta{tl~var}, \emph{i.e.}~removes
% the item from the \meta{clist~var}. Both the \meta{clist~var} and the
-% \meta{token list variable} are assigned locally.
+% \meta{tl~var} are assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14]{\clist_gpop:NN, \clist_gpop:cN}
% \begin{syntax}
-% \cs{clist_gpop:NNTF} \meta{clist~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{clist_gpop:NNTF} \meta{clist~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{clist~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{clist~var} is non-empty, pops the top item from the
-% \meta{clist~var} in the \meta{token list variable}, \emph{i.e.}~removes
+% \meta{clist~var} in the \meta{tl~var}, \emph{i.e.}~removes
% the item from the \meta{clist~var}. The \meta{clist~var} is modified
-% globally, while the \meta{token list variable} is assigned locally.
+% globally, while the \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}
@@ -1429,13 +1433,15 @@
% \begin{macro}
% {
% \clist_remove_all:Nn, \clist_remove_all:cn,
-% \clist_remove_all:NV, \clist_remove_all:cV
+% \clist_remove_all:NV, \clist_remove_all:cV,
+% \clist_remove_all:Ne, \clist_remove_all:ce
% }
% \UnitTested
% \begin{macro}
% {
% \clist_gremove_all:Nn, \clist_gremove_all:cn,
-% \clist_gremove_all:NV, \clist_gremove_all:cV
+% \clist_gremove_all:NV, \clist_gremove_all:cV,
+% \clist_gremove_all:Ne, \clist_gremove_all:ce
% }
% \UnitTested
% \begin{macro}{\@@_remove_all:NNNn}
@@ -1509,8 +1515,8 @@
\cs_new:Npn \@@_remove_all:
{ \exp_after:wN \@@_remove_all:w \@@_tmp:w , }
\cs_new:Npn \@@_remove_all:w #1 , \s_@@_mark , #2 , { \exp_not:n {#1} }
-\cs_generate_variant:Nn \clist_remove_all:Nn { c , NV , cV }
-\cs_generate_variant:Nn \clist_gremove_all:Nn { c , NV , cV }
+\cs_generate_variant:Nn \clist_remove_all:Nn { c , NV , cV , Ne , ce }
+\cs_generate_variant:Nn \clist_gremove_all:Nn { c , NV , cV , Ne , ce }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex-dev/required/l3kernel/l3coffins.dtx b/macros/latex-dev/required/l3kernel/l3coffins.dtx
index 62dc5f92ad..7eda18d6e7 100644
--- a/macros/latex-dev/required/l3kernel/l3coffins.dtx
+++ b/macros/latex-dev/required/l3kernel/l3coffins.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -327,6 +327,14 @@
% in a form suitable for use in a \meta{dim expr}.
% \end{function}
%
+% \begin{function}[added = 2024-10-01]{\coffin_ht_plus_dp:N, \coffin_ht_plus_dp:c}
+% \begin{syntax}
+% \cs{coffin_ht_plus_dp:N} \meta{coffin}
+% \end{syntax}
+% Calculates the total vertical size (height plus depth) of the \meta{coffin}
+% in a form suitable for use in a \meta{dim expr}.
+% \end{function}
+%
% \begin{function}{\coffin_wd:N, \coffin_wd:c}
% \begin{syntax}
% \cs{coffin_wd:N} \meta{coffin}
@@ -866,7 +874,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \coffin_set_eq:NN #1#2
{
- \@@_if_exist:NT #1
+ \@@_if_exist:NT #2
{
\box_set_eq:NN #1 #2
\prop_set_eq:cc { coffin ~ \@@_to_value:N #1 ~ corners }
@@ -878,7 +886,7 @@
\cs_generate_variant:Nn \coffin_set_eq:NN { c , Nc , cc }
\cs_new_protected:Npn \coffin_gset_eq:NN #1#2
{
- \@@_if_exist:NT #1
+ \@@_if_exist:NT #2
{
\box_gset_eq:NN #1 #2
\prop_gset_eq:cc { coffin ~ \@@_to_value:N #1 ~ corners }
@@ -924,7 +932,8 @@
% \begin{macro}
% {
% \coffin_dp:N, \coffin_dp:c, \coffin_ht:N, \coffin_ht:c,
-% \coffin_wd:N, \coffin_wd:c
+% \coffin_ht_plus_dp:N, \coffin_ht_plus_dp:c,
+% \coffin_wd:N, \coffin_wd:c,
% }
% Coffins are just boxes when it comes to measurement. However, semantically
% a separate set of functions are required.
@@ -933,6 +942,8 @@
\cs_new_eq:NN \coffin_dp:c \box_dp:c
\cs_new_eq:NN \coffin_ht:N \box_ht:N
\cs_new_eq:NN \coffin_ht:c \box_ht:c
+\cs_new_eq:NN \coffin_ht_plus_dp:N \box_ht_plus_dp:N
+\cs_new_eq:NN \coffin_ht_plus_dp:c \box_ht_plus_dp:c
\cs_new_eq:NN \coffin_wd:N \box_wd:N
\cs_new_eq:NN \coffin_wd:c \box_wd:c
% \end{macrocode}
diff --git a/macros/latex-dev/required/l3kernel/l3color.dtx b/macros/latex-dev/required/l3kernel/l3color.dtx
index b56fb9e0ac..99c81e4980 100644
--- a/macros/latex-dev/required/l3kernel/l3color.dtx
+++ b/macros/latex-dev/required/l3kernel/l3color.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -103,7 +103,7 @@
% \begin{itemize}
% \item \texttt{Gray} Grayscale color, with a single axis running from
% $0$ (fully black) to $15$ (fully white)
-% \item \texttt{hsb} Hue-saturation-brightness color, with three axes,all
+% \item \texttt{hsb} Hue-saturation-brightness color, with three axes, all
% real values in the range $[0,1]$ for hue saturation and brightness
% \item \texttt{Hsb} Hue-saturation-brightness color, with three axes, integer
% in the range $[0,360]$ for hue, real values in the range $[0,1]$ for
@@ -243,9 +243,9 @@
%
% \begin{function}{\color_set_eq:nn}
% \begin{syntax}
-% \cs{color_set_eq:nn} \Arg{name1} \Arg{name2}
+% \cs{color_set_eq:nn} \Arg{name_1} \Arg{name_2}
% \end{syntax}
-% Copies the color specification in \meta{name2} to \meta{name1}. The
+% Copies the color specification in \meta{name_2} to \meta{name_1}. The
% special name |.| may be used to represent the current color, allowing
% it to be saved to a name.
% \end{function}
@@ -325,7 +325,7 @@
% \end{function}
%
% \begin{variable}[module = color]{color.sc}
-% When using \texttt{dvips}, this PostScript variables hold the stroke color.
+% When using \texttt{dvips}, this PostScript variable holds the stroke color.
% \end{variable}
%
% \subsection{Coloring math mode material}
@@ -338,7 +338,7 @@
%
% \begin{function}[added = 2022-01-26]{\color_math:nn, \color_math:nnn}
% \begin{syntax}
-% \cs{color_math:nn} \Arg{color expression}\Arg{content}
+% \cs{color_math:nn} \Arg{color expression} \Arg{content}
% \cs{color_math:nnn} \Arg{model(s)} \Arg{value(s)} \Arg{content}
% \end{syntax}
% Works as for \cs[no-index]{color_select:n(n)} but applies color only to the math mode
@@ -406,20 +406,20 @@
%
% \begin{function}{\color_export:nnN}
% \begin{syntax}
-% \cs{color_export:nnN} \Arg{color expression} \Arg{format} \Arg{tl}
+% \cs{color_export:nnN} \Arg{color expression} \Arg{format} \meta{tl var}
% \end{syntax}
% Parses the \meta{color expression} as described earlier,
% then converts to the \meta{format} specified and assigns the data to the
-% \meta{tl}.
+% \meta{tl var}.
% \end{function}
%
% \begin{function}{\color_export:nnnN}
% \begin{syntax}
-% \cs{color_export:nnnN} \Arg{model} \Arg{value(s)} \Arg{format} \Arg{tl}
+% \cs{color_export:nnnN} \Arg{model} \Arg{value(s)} \Arg{format} \meta{tl var}
% \end{syntax}
% Expresses the combination of \meta{model} and \meta{value(s)} in an
% internal representation, then converts to the \meta{format} specified and
-% assigns the data to the \meta{tl}.
+% assigns the data to the \meta{tl var}.
% \end{function}
%
% \section{Creating new color models}
@@ -495,7 +495,7 @@
%
% Color profiles are used to ensure color accuracy by linking to collaboration.
% Applying a profile can be used to standardise color which is otherwise
-% device-dependence.
+% device-dependent.
%
% \begin{function}[added = 2021-02-23]{\color_profile_apply:nn}
% \begin{syntax}
@@ -697,14 +697,14 @@
% \begin{macro}{\@@_convert:nnnN, \@@_convert:nVnN, \@@_convert:nnVN}
% \begin{macro}[EXP]
% {
-% \@@_convert_gray_gray:w
-% \@@_convert_gray_rgb:w
-% \@@_convert_gray_cmyk:w
-% \@@_convert_cmyk_gray:w
-% \@@_convert_cmyk_rgb:w
-% \@@_convert_cmyk_cmyk:w
-% \@@_convert_rgb_gray:w
-% \@@_convert_rgb_rgb:w
+% \@@_convert_gray_gray:w,
+% \@@_convert_gray_rgb:w,
+% \@@_convert_gray_cmyk:w,
+% \@@_convert_cmyk_gray:w,
+% \@@_convert_cmyk_rgb:w,
+% \@@_convert_cmyk_cmyk:w,
+% \@@_convert_rgb_gray:w,
+% \@@_convert_rgb_rgb:w,
% \@@_convert_rgb_cmyk:w
% }
% \begin{macro}[EXP]{\@@_convert_rgb_cmyk:nnn}
diff --git a/macros/latex-dev/required/l3kernel/l3debug.dtx b/macros/latex-dev/required/l3kernel/l3debug.dtx
index 21e6747a84..c3554aab6d 100644
--- a/macros/latex-dev/required/l3kernel/l3debug.dtx
+++ b/macros/latex-dev/required/l3kernel/l3debug.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -69,7 +69,7 @@
%
% Standard file identification.
% \begin{macrocode}
-\ProvidesExplFile{l3debug.def}{2024-05-27}{}{L3 Debugging support}
+\ProvidesExplFile{l3debug.def}{2024-11-02}{}{L3 Debugging support}
% \end{macrocode}
%
% \begin{variable}{\s_@@_stop}
diff --git a/macros/latex-dev/required/l3kernel/l3deprecation.dtx b/macros/latex-dev/required/l3kernel/l3deprecation.dtx
index 5852205ddc..87c7708eb8 100644
--- a/macros/latex-dev/required/l3kernel/l3deprecation.dtx
+++ b/macros/latex-dev/required/l3kernel/l3deprecation.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -505,10 +505,10 @@
{ \text_uppercase:nn {#1} {#2} }
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:n }
\cs_new:Npn \tl_mixed_case:n #1
- { \text_titlecase_first:n {#1} }
+ { \text_titlecase_first:n { \text_lowercase:n {#1} } }
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_titlecase_first:nn }
\cs_new:Npn \tl_mixed_case:nn #1#2
- { \text_titlecase_first:nn {#1} {#2} }
+ { \text_titlecase_first:nn {#1} { \text_lowercase:n {#2} } }
% \end{macrocode}
% \end{macro}
%
@@ -571,7 +571,7 @@
% \char_lower_case:N, \char_upper_case:N,
% \char_mixed_case:Nn, \char_fold_case:N,
% \char_str_lower_case:N, \char_str_upper_case:N,
-% \char_str_mixed_case:Nn, \char_str_fold_case:N,
+% \char_str_mixed_case:N, \char_str_fold_case:N,
% }
% \begin{macrocode}
\__kernel_patch_deprecation:nnNNpn { 2020-01-03 } { \text_lowercase:n }
diff --git a/macros/latex-dev/required/l3kernel/l3doc.dtx b/macros/latex-dev/required/l3kernel/l3doc.dtx
index 43b719ce59..1f7a29efa5 100644
--- a/macros/latex-dev/required/l3kernel/l3doc.dtx
+++ b/macros/latex-dev/required/l3kernel/l3doc.dtx
@@ -71,7 +71,7 @@ and all files in that bundle must be distributed together.
% This isn't included in the typeset documentation because it's a bit
% ugly:
%<*class>
-\ProvidesExplClass{l3doc}{2024-05-27}{}
+\ProvidesExplClass{l3doc}{2024-11-02}{}
{L3 Experimental documentation class}
%</class>
% \fi
@@ -84,7 +84,7 @@ and all files in that bundle must be distributed together.
% require you to do updates, if the class changes.}}
%
% \author{\Team}
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
% \maketitle
% \tableofcontents
%
@@ -471,7 +471,7 @@ and all files in that bundle must be distributed together.
% \cs{tl_if_empty_p:N} \meta{tl~var}
% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable} is entirely empty
+% Tests if the \meta{tl~var} is entirely empty
% (\emph{i.e.}~contains no tokens at all).
% \end{function}
% \end{verbatim}
@@ -484,7 +484,7 @@ and all files in that bundle must be distributed together.
% \cs{tl_if_empty_p:N} \meta{tl~var}
% \cs{tl_if_empty:NTF} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token list variable} is entirely empty
+% Tests if the \meta{tl~var} is entirely empty
% (\emph{i.e.}~contains no tokens at all).
% \end{function}
% \end{minipage}
@@ -959,8 +959,8 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\bool_new:N \g_@@_typeset_documentation_bool
\bool_new:N \g_@@_typeset_implementation_bool
-\bool_set_true:N \g_@@_typeset_documentation_bool
-\bool_set_true:N \g_@@_typeset_implementation_bool
+\bool_gset_true:N \g_@@_typeset_documentation_bool
+\bool_gset_true:N \g_@@_typeset_implementation_bool
% \end{macrocode}
% \end{variable}
%
@@ -1531,12 +1531,23 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\bool_if:NT \g_@@_lmodern_bool
{
- \RequirePackage[T1]{fontenc}
- \RequirePackage{lmodern}
- \group_begin:
- \ttfamily
- \DeclareFontShape{T1}{lmtt}{m}{it}{<->ec-lmtto10}{}
- \group_end:
+ \bool_lazy_or:nnTF
+ { \sys_if_engine_luatex_p: }{ \sys_if_engine_xetex_p: }
+ {
+ \group_begin:
+ \ttfamily
+ \DeclareFontShape{TU}{lmtt}{m}{it}
+ {<-> \UnicodeFontFile{lmmonoslant10-regular}{}}{}
+ \group_end:
+ }
+ {
+ \RequirePackage[T1]{fontenc}
+ \RequirePackage{lmodern}
+ \group_begin:
+ \ttfamily
+ \DeclareFontShape{T1}{lmtt}{m}{it}{<->ec-lmtto10}{}
+ \group_end:
+ }
}
% \end{macrocode}
%
@@ -1618,7 +1629,7 @@ and all files in that bundle must be distributed together.
%
% \subsection{Design}
%
-% Increase the text width slightly so that width the standard fonts
+% Increase the text width slightly so that with the standard fonts
% 72~columns of code may appear in a \env{macrocode} environment.
% Increase the marginpar width slightly, for long command names. And
% increase the left margin by a similar amount.
@@ -2160,10 +2171,18 @@ and all files in that bundle must be distributed together.
%
% \begin{macro}{\@@_names_get_seq:nN}
% The argument~|#1| (argument of a |function| or |macro| environment)
-% has catcodes $10$ (space), $12$ (other) and $13$ (active). Sanitize
-% catcodes. If the |verb| option was used, output a one-item
-% sequence. Otherwise, remove any \enquote{\%} character at the
-% beginning of a line. Remove tabs and newlines. Finally, convert
+% has catcodes $10$ (space), $12$ (other) and $13$ (active), and
+% since \LaTeX{} 2024-06-01 also macro \cs{obeyedline} in replacement
+% of active |^^M| tokens (due to the revised behavior of |+v|
+% argument type in |ltcmd|).
+% If the |verb| option was used, sanitize catcodes and output
+% a one-item sequence.
+% Otherwise, remove any \enquote{\%} character at the beginning of
+% a line using new end-of-line marker \cs{obeyedline}. Remove any
+% remaining \cs{obeyedline}. Then sanitize catcodes so we keep those
+% verbatim \cs{obeyedline} typed in by user. Remove remaining
+% \enquote{\%} character at the beginning of a line using traditional
+% |^^M| marker. Remove tabs and newlines. Finally, convert
% |_@@| and |@@| to |__|\meta{module name} (if it is non-empty). At
% this point, \cs{l_@@_tmpa_tl} contains a comma-delimited list of
% names, where |@| and~|_| have category code letter. Turn it to a
@@ -2172,17 +2191,20 @@ and all files in that bundle must be distributed together.
% \begin{macrocode}
\cs_new_protected:Npn \@@_names_get_seq:nN #1#2
{
- \__kernel_tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:n {#1} }
\bool_if:NTF \l_@@_names_verb_bool
{
\seq_clear:N #2
- \seq_put_right:NV #2 \l_@@_tmpa_tl
+ \seq_put_right:No #2 { \tl_to_str:n {#1} }
}
{
+ \tl_set:Nn \l_@@_tmpa_tl {#1}
\tl_remove_all:Ne \l_@@_tmpa_tl
- { \iow_char:N \^^M \c_percent_str }
+ { \exp_not:N \obeyedline \c_percent_str }
\tl_remove_all:Ne \l_@@_tmpa_tl
- { \token_to_str:N \obeyedline \c_space_tl \c_percent_str }
+ { \exp_not:N \obeyedline }
+ \__kernel_tl_set:Nx \l_@@_tmpa_tl { \tl_to_str:N \l_@@_tmpa_tl }
+ \tl_remove_all:Ne \l_@@_tmpa_tl
+ { \iow_char:N \^^M \c_percent_str }
\tl_remove_all:Ne \l_@@_tmpa_tl { \tl_to_str:n { ^ ^ A } }
\tl_remove_all:Ne \l_@@_tmpa_tl { \iow_char:N \^^I }
\tl_remove_all:Ne \l_@@_tmpa_tl { \iow_char:N \^^M }
@@ -2529,7 +2551,7 @@ and all files in that bundle must be distributed together.
\cs_new_protected:Npn \@@_function_typeset_stop:
{
\par
- \dim_set:Nn \prevdepth { \box_dp:N \l_@@_descr_coffin }
+ \dim_set:Nn \prevdepth { \coffin_dp:N \l_@@_descr_coffin }
\allowbreak
}
% \end{macrocode}
@@ -2594,7 +2616,7 @@ and all files in that bundle must be distributed together.
\dim_zero:N \l_@@_trial_width_dim
\hcoffin_set:Nn \l_@@_functions_coffin { \@@_typeset_functions: }
\dim_set:Nn \l_@@_trial_width_dim
- { \box_wd:N \l_@@_functions_coffin }
+ { \coffin_wd:N \l_@@_functions_coffin }
\bool_set:Nn \l_@@_long_name_bool
{ \dim_compare_p:nNn \l_@@_trial_width_dim > \marginparwidth }
}
@@ -2643,7 +2665,7 @@ and all files in that bundle must be distributed together.
\coffin_join:NnnNnnnn
\l_@@_output_coffin {l} {b}
\l_@@_descr_coffin {l} {t}
- {0.75\marginparwidth + \marginparsep} {-\medskipamount}
+ {\marginparwidth + \marginparsep} {-\medskipamount}
\coffin_typeset:Nnnnn \l_@@_output_coffin
{\l_@@_descr_coffin-l} {\l_@@_descr_coffin-t}
{0pt} {0pt}
@@ -2695,8 +2717,7 @@ and all files in that bundle must be distributed together.
% \end{macro}
%
% ^^A TODO: collect all index targets from a given function environment in a box and stick it at the top.
-% \begin{macro}
-% {\@@_typeset_function_block:nN, \@@_typeset_function_block:eN}
+% \begin{macro}{\@@_typeset_function_block:nN}
% \begin{macro}{\@@_function_index:n, \@@_function_index:e}
% |#1| is a csname, |#2| a boolean indicating whether to add |TF| or not.
% \begin{macrocode}
@@ -2712,7 +2733,6 @@ and all files in that bundle must be distributed together.
{ \@@_typeset_variant_list:nN {#1} #2 }
\\
}
-\cs_generate_variant:Nn \@@_typeset_function_block:nN { e }
\cs_new_protected:Npn \@@_function_index:n #1
{
\seq_gput_right:Nn \g_doc_functions_seq {#1}
@@ -2840,7 +2860,7 @@ and all files in that bundle must be distributed together.
{
\textwidth
\bool_if:NT \l_@@_long_name_bool
- { + 0.75 \marginparwidth - \l_@@_trial_width_dim }
+ { + \marginparwidth - \l_@@_trial_width_dim }
}
\hbox_gset:Nw \g_@@_syntax_box
\small \ttfamily
@@ -3213,7 +3233,7 @@ and all files in that bundle must be distributed together.
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_print_macroname_aux:nn}
+% \begin{macro}{\@@_print_macroname_aux:nn, \@@_print_macroname_aux:on}
% |#1| is prefix, |#2| is optional |TF| suffix.
% \begin{macrocode}
\cs_new_protected:Npn \@@_print_macroname_aux:nn #1#2
@@ -3714,7 +3734,7 @@ and all files in that bundle must be distributed together.
{
\clist_map_inline:nn {#1}
{
- \clist_put_right:Nn \g_docinput_clist {##1}
+ \clist_gput_right:Nn \g_docinput_clist {##1}
\@@_input:n {##1}
}
}
@@ -3839,7 +3859,7 @@ and all files in that bundle must be distributed together.
{ MMMMV - \filesep \int_use:N \c@CodelineNo }
}
}
-\tl_gclear:N \filesep
+\tl_clear_new:N \filesep
\cs_new_protected:Npn \@@_index_page_hc:nn #1#2
{
\protected@write \@indexfile {}
@@ -4254,7 +4274,6 @@ and all files in that bundle must be distributed together.
{#2}
\l_@@_index_internal_bool
}
-\cs_generate_variant:Nn \@@_special_index:nn { o }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/required/l3kernel/l3doc.pdf b/macros/latex-dev/required/l3kernel/l3doc.pdf
index 4700ff58b5..e238f00d33 100644
--- a/macros/latex-dev/required/l3kernel/l3doc.pdf
+++ b/macros/latex-dev/required/l3kernel/l3doc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3docstrip.dtx b/macros/latex-dev/required/l3kernel/l3docstrip.dtx
index fecb228324..fb69b714fb 100644
--- a/macros/latex-dev/required/l3kernel/l3docstrip.dtx
+++ b/macros/latex-dev/required/l3kernel/l3docstrip.dtx
@@ -63,7 +63,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3docstrip.pdf b/macros/latex-dev/required/l3kernel/l3docstrip.pdf
index 8b13f9e4e9..657200dae5 100644
--- a/macros/latex-dev/required/l3kernel/l3docstrip.pdf
+++ b/macros/latex-dev/required/l3kernel/l3docstrip.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3expan.dtx b/macros/latex-dev/required/l3kernel/l3expan.dtx
index d13578bde1..3ca2c517b1 100644
--- a/macros/latex-dev/required/l3kernel/l3expan.dtx
+++ b/macros/latex-dev/required/l3kernel/l3expan.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -75,8 +75,8 @@
% If \cs{seq_gpush:No} was not defined it could be coded in the following way:
% \begin{verbatim}
% \exp_args:NNo \seq_gpush:Nn
-% \g_file_name_stack
-% { \l_tmpa_tl }
+% \g_file_name_stack
+% { \l_tmpa_tl }
% \end{verbatim}
% In other words, the first argument to \cs{exp_args:NNo} is the base
% function and the other arguments are preprocessed and then passed to
diff --git a/macros/latex-dev/required/l3kernel/l3file.dtx b/macros/latex-dev/required/l3kernel/l3file.dtx
index 546222711e..ceadf34dc0 100644
--- a/macros/latex-dev/required/l3kernel/l3file.dtx
+++ b/macros/latex-dev/required/l3kernel/l3file.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -225,8 +225,8 @@
%
% \begin{function}[noTF, added = 2012-06-24, updated = 2019-03-23]{\ior_get:NN}
% \begin{syntax}
-% \cs{ior_get:NN} \meta{stream} \meta{token list variable}
-% \cs{ior_get:NNTF} \meta{stream} \meta{token list variable} \meta{true code} \meta{false code}
+% \cs{ior_get:NN} \meta{stream} \meta{tl~var}
+% \cs{ior_get:NNTF} \meta{stream} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% Function that reads one or more lines (until an equal number of left
% and right braces are found) from the file input \meta{stream} and stores
@@ -243,7 +243,7 @@
% converted to the token \cs{par}. Therefore, blank lines can be
% skipped by using a test such as
% \begin{verbatim}
-% \ior_get:NN \l_my_stream \l_tmpa_tl
+% \ior_get:NN \l_my_ior \l_tmpa_tl
% \tl_set:Nn \l_tmpb_tl { \par }
% \tl_if_eq:NNF \l_tmpa_tl \l_tmpb_tl
% ...
@@ -267,8 +267,8 @@
% \begin{function}[noTF, added = 2016-12-04, updated = 2019-03-23]
% {\ior_str_get:NN}
% \begin{syntax}
-% \cs{ior_str_get:NN} \meta{stream} \meta{token list variable}
-% \cs{ior_str_get:NNTF} \meta{stream} \meta{token list variable} \meta{true code} \meta{false code}
+% \cs{ior_str_get:NN} \meta{stream} \meta{tl~var}
+% \cs{ior_str_get:NNTF} \meta{stream} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% Function that reads one line from the file input \meta{stream} and stores
% the result locally in the \meta{token list} variable.
@@ -277,7 +277,7 @@
% characters which are given category code $10$ (space).
% Multiple whitespace characters are retained by this process. It
% always only reads one line and any blank lines in the input
-% result in the \meta{token list variable} being empty. Unlike
+% result in the \meta{tl~var} being empty. Unlike
% \cs{ior_get:NN}, line ends do not receive any special treatment. Thus
% input
% \begin{verbatim}
@@ -429,7 +429,7 @@
%
% \begin{function}[added = 2019-03-23]{\ior_get_term:nN, \ior_str_get_term:nN}
% \begin{syntax}
-% \cs{ior_get_term:nN} \Arg{prompt} \meta{token list variable}
+% \cs{ior_get_term:nN} \Arg{prompt} \meta{tl~var}
% \end{syntax}
% Function that reads one or more lines (until an equal number of left
% and right braces are found) from the terminal and stores
@@ -718,8 +718,10 @@
% \cs{file_if_exist_p:n} \Arg{file name}
% \cs{file_if_exist:nTF} \Arg{file name} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if \meta{file name} is found in the path as detailed for
-% \cs{file_if_exist:nTF}.
+% Expands the argument of the \meta{file name} to give a string, then
+% searches for this string using the current \TeX{} search
+% path and the additional paths controlled by
+% \cs{l_file_search_path_seq}.
% \end{function}
%
% \subsection{Information about files and file contents}
@@ -844,11 +846,11 @@
% \file_compare_timestamp:VNV
% }
% \begin{syntax}
-% \cs{file_compare_timestamp_p:nNn} \Arg{file-1} \meta{comparator} \Arg{file-2}
-% \cs{file_compare_timestamp:nNnTF} \Arg{file-1} \meta{comparator} \Arg{file-2} \Arg{true code} \Arg{false code}
+% \cs{file_compare_timestamp_p:nNn} \Arg{file-1} \meta{relation} \Arg{file-2}
+% \cs{file_compare_timestamp:nNnTF} \Arg{file-1} \meta{relation} \Arg{file-2} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the file stamps on the two \meta{files} as indicated by
-% the \meta{comparator}, and inserts either the \meta{true code}
+% the \meta{relation}, and inserts either the \meta{true code}
% or \meta{false case} as required. A file which is not found
% is treated as older than any file which is found. This allows for
% example the construct
@@ -865,8 +867,8 @@
% \begin{function}[noTF, updated = 2019-02-16]
% {\file_get_full_name:nN, \file_get_full_name:VN}
% \begin{syntax}
-% \cs{file_get_full_name:nN} \Arg{file name} \meta{tl}
-% \cs{file_get_full_name:nNTF} \Arg{file name} \meta{tl} \Arg{true code} \Arg{false code}
+% \cs{file_get_full_name:nN} \Arg{file name} \meta{tl var}
+% \cs{file_get_full_name:nNTF} \Arg{file name} \meta{tl var} \Arg{true code} \Arg{false code}
% \end{syntax}
% Searches for \meta{file name} in the path as detailed for
% \cs{file_if_exist:nTF}, and if found sets the \meta{tl var} the
@@ -941,15 +943,15 @@
% \begin{function}[noTF, added = 2019-01-16, updated = 2019-02-16]
% {\file_get:nnN, \file_get:VnN}
% \begin{syntax}
-% \cs{file_get:nnN} \Arg{file name} \Arg{setup} \meta{tl}
-% \cs{file_get:nnNTF} \Arg{file name} \Arg{setup} \meta{tl} \Arg{true code} \Arg{false code}
+% \cs{file_get:nnN} \Arg{file name} \Arg{setup} \meta{tl var}
+% \cs{file_get:nnNTF} \Arg{file name} \Arg{setup} \meta{tl var} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Defines \meta{tl} to the contents of \meta{file name}.
+% Defines \meta{tl var} to the contents of \meta{file name}.
% Category codes may need to be set appropriately via the \meta{setup}
% argument.
-% The non-branching version sets the \meta{tl} to \cs{q_no_value} if the file is
+% The non-branching version sets the \meta{tl var} to \cs{q_no_value} if the file is
% not found. The branching version runs the \meta{true code} after the
-% assignment to \meta{tl} if the file is found, and \meta{false code}
+% assignment to \meta{tl var} if the file is found, and \meta{false code}
% otherwise. The file content will be tokenized using the current
% category code régime,
% \end{function}
diff --git a/macros/latex-dev/required/l3kernel/l3flag.dtx b/macros/latex-dev/required/l3kernel/l3flag.dtx
index 88e726df35..7741a9b0da 100644
--- a/macros/latex-dev/required/l3kernel/l3flag.dtx
+++ b/macros/latex-dev/required/l3kernel/l3flag.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-assign.dtx b/macros/latex-dev/required/l3kernel/l3fp-assign.dtx
index e6fa97423e..4fcaf71864 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-assign.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-assign.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
% \maketitle
%
% \begin{documentation}
@@ -75,7 +75,9 @@
% \begin{macro}
% {
% \fp_set:Nn, \fp_set:cn,
+% \fp_set:NV, \fp_set:cV,
% \fp_gset:Nn, \fp_gset:cn,
+% \fp_gset:NV, \fp_gset:cV,
% \fp_const:Nn, \fp_const:cn
% }
% Simply use \cs{@@_parse:n} within various \texttt{f}-expanding
@@ -87,8 +89,8 @@
{ \__kernel_tl_gset:Nx #1 { \exp_not:f { \@@_parse:n {#2} } } }
\cs_new_protected:Npn \fp_const:Nn #1#2
{ \tl_const:Ne #1 { \exp_not:f { \@@_parse:n {#2} } } }
-\cs_generate_variant:Nn \fp_set:Nn {c}
-\cs_generate_variant:Nn \fp_gset:Nn {c}
+\cs_generate_variant:Nn \fp_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \fp_gset:Nn { NV , c , cV }
\cs_generate_variant:Nn \fp_const:Nn {c}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/required/l3kernel/l3fp-aux.dtx b/macros/latex-dev/required/l3kernel/l3fp-aux.dtx
index 1ad33e235e..807710de08 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-aux.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-aux.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-basics.dtx b/macros/latex-dev/required/l3kernel/l3fp-basics.dtx
index e2d93219b0..11c244aa1f 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-basics.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-basics.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-convert.dtx b/macros/latex-dev/required/l3kernel/l3fp-convert.dtx
index 4983a3dd1f..23f7a2213d 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-convert.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-convert.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-expo.dtx b/macros/latex-dev/required/l3kernel/l3fp-expo.dtx
index 7577f640d4..d65a147e15 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-expo.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-expo.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-extended.dtx b/macros/latex-dev/required/l3kernel/l3fp-extended.dtx
index 596dc86ef2..cedbc91888 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-extended.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-extended.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-functions.dtx b/macros/latex-dev/required/l3kernel/l3fp-functions.dtx
index b9e269b988..444e8189fa 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-functions.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-functions.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-logic.dtx b/macros/latex-dev/required/l3kernel/l3fp-logic.dtx
index 486a3bc579..baa08b4216 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-logic.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-logic.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-parse.dtx b/macros/latex-dev/required/l3kernel/l3fp-parse.dtx
index 7853c40132..d272cadf11 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-parse.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-parse.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-random.dtx b/macros/latex-dev/required/l3kernel/l3fp-random.dtx
index ff999926ab..91c3a20477 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-random.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-random.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-round.dtx b/macros/latex-dev/required/l3kernel/l3fp-round.dtx
index 0d39b8a26a..a4202b4fea 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-round.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-round.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-symbolic.dtx b/macros/latex-dev/required/l3kernel/l3fp-symbolic.dtx
index 88e214f49e..0db79ef775 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-symbolic.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-symbolic.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-traps.dtx b/macros/latex-dev/required/l3kernel/l3fp-traps.dtx
index fec48bc163..b300528ec5 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-traps.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-traps.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
% \maketitle
%
% \begin{documentation}
diff --git a/macros/latex-dev/required/l3kernel/l3fp-trig.dtx b/macros/latex-dev/required/l3kernel/l3fp-trig.dtx
index 7c40c6198f..46cad5c8f9 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-trig.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-trig.dtx
@@ -42,7 +42,7 @@
% {latex-team@latex-project.org}^^A
% }^^A
% }
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp-types.dtx b/macros/latex-dev/required/l3kernel/l3fp-types.dtx
index e9269e1f03..049a6eea82 100644
--- a/macros/latex-dev/required/l3kernel/l3fp-types.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp-types.dtx
@@ -42,7 +42,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3fp.dtx b/macros/latex-dev/required/l3kernel/l3fp.dtx
index d273b057ea..0cbfd20153 100644
--- a/macros/latex-dev/required/l3kernel/l3fp.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fp.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -108,7 +108,7 @@
% towards $+\infty$ if $t>0$ and towards $-\infty$ if $t<0$.
% \end{itemize}
% And \emph{(not yet)} modulo, and \enquote{quantize}.
-% \item Random numbers: $\mathop{rand}()$, $\mathop{randint}(m,n)$.
+% \item Random numbers: $\operatorname{rand}()$, $\operatorname{randint}(m,n)$.
% \item Constants: \texttt{pi}, \texttt{deg} (one degree in radians).
% \item Dimensions, automatically expressed in points, \emph{e.g.},
% \texttt{pc} is~$12$.
@@ -198,7 +198,10 @@
% \section{Setting floating point variables}
%
% \begin{function}[updated = 2012-05-08, tested = m3fp002]
-% {\fp_set:Nn, \fp_set:cn, \fp_gset:Nn, \fp_gset:cn}
+% {
+% \fp_set:Nn, \fp_set:cn, \fp_set:NV, \fp_set:cV,
+% \fp_gset:Nn, \fp_gset:cn, \fp_gset:NV, \fp_gset:cV
+% }
% \begin{syntax}
% \cs{fp_set:Nn} \meta{fp~var} \Arg{fp expr}
% \end{syntax}
@@ -773,9 +776,9 @@
% The result may contain other functions, which are
% then replaced by their results if they have any. For instance,
% \begin{quote}
-% \cs{fp_new_function:n} |{ foo }| \\
+% \cs{fp_new_function:n} |{ npow }| \\
% \cs{fp_set_function:nnn} |{ npow } { a,b } { a**b }| \\
-% \cs{fp_show:n} |{ npow(16,0.25) } }|
+% \cs{fp_show:n} |{ npow(16,0.25) }|
% \end{quote}
% shows |2|. The names of the \meta{vars} must
% consist entirely of Latin letters |[a-zA-Z]|, but are otherwise not
@@ -904,7 +907,6 @@
% the \TeX{} run and display some information about the current
% operation in the terminal.
% \end{itemize}
-% \emph{This function is experimental, and may be altered or removed.}
% \end{function}
%
% \begin{variable}
diff --git a/macros/latex-dev/required/l3kernel/l3fparray.dtx b/macros/latex-dev/required/l3kernel/l3fparray.dtx
index f48de27af3..52b91d1296 100644
--- a/macros/latex-dev/required/l3kernel/l3fparray.dtx
+++ b/macros/latex-dev/required/l3kernel/l3fparray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3int.dtx b/macros/latex-dev/required/l3kernel/l3int.dtx
index 5d437910c1..9782fe452c 100644
--- a/macros/latex-dev/required/l3kernel/l3int.dtx
+++ b/macros/latex-dev/required/l3kernel/l3int.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -100,21 +100,6 @@
% restricted-expandable functions can both be used, and \cs{exp_not:n}
% and its variants have no effect while \cs{exp_not:N} may incorrectly
% interrupt the expression.
-% \begin{texnote}
-% Exactly two expansions are needed to evaluate \cs{int_eval:n}.
-% The result is \emph{not} an \meta{internal integer}, and therefore
-% should be terminated by a space if used in \cs{int_value:w} or in
-% a \TeX{}-style integer assignment.
-%
-% As all \TeX{} integers, integer operands can also be:
-% \tn{value}\Arg{\LaTeXe{} counter}; dimension or skip variables,
-% converted to integers in~\texttt{sp}; the character code of some
-% character given as \texttt{`}\meta{char} or
-% \texttt{`\textbackslash}\meta{char}; octal numbers given as
-% \texttt{'} followed by digits from \texttt{0} to \texttt{7}; or
-% hexadecimal numbers given as |"| followed by digits and upper case
-% letters from \texttt{A} to~\texttt{F}.
-% \end{texnote}
%
% \begin{function}[EXP]{\int_eval:n}
% \begin{syntax}
@@ -124,43 +109,7 @@
% input stream as an integer denotation: for positive results an
% explicit sequence of decimal digits not starting with~\texttt{0},
% for negative results \texttt{-}~followed by such a sequence, and
-% \texttt{0}~for zero. The \meta{int expr} should consist,
-% after expansion, of \texttt{+}, \texttt{-}, \texttt{*}, \texttt{/},
-% \texttt{(}, \texttt{)} and of course integer operands. The result
-% is calculated by applying standard mathematical rules with the
-% following peculiarities:
-% \begin{itemize}
-% \item \texttt{/} denotes division rounded to the closest integer with
-% ties rounded away from zero;
-% \item there is an error and the overall expression evaluates to zero
-% whenever the absolute value of any intermediate result exceeds
-% $2^{31}-1$, except in the case of scaling operations
-% $a$\texttt{*}$b$\texttt{/}$c$, for which $a$\texttt{*}$b$ may be
-% arbitrarily large;
-% \item parentheses may not appear after unary \texttt{+} or
-% \texttt{-}, namely placing \texttt{+(} or \texttt{-(} at the start
-% of an expression or after \texttt{+}, \texttt{-}, \texttt{*},
-% \texttt{/} or~\texttt{(} leads to an error.
-% \end{itemize}
-% Each integer operand can be either an integer variable (with no need
-% for \cs{int_use:N}) or an integer denotation. For example both
-% \begin{verbatim}
-% \int_eval:n { 5 + 4 * 3 - ( 3 + 4 * 5 ) }
-% \end{verbatim}
-% and
-% \begin{verbatim}
-% \tl_new:N \l_my_tl
-% \tl_set:Nn \l_my_tl { 5 }
-% \int_new:N \l_my_int
-% \int_set:Nn \l_my_int { 4 }
-% \int_eval:n { \l_my_tl + \l_my_int * 3 - ( 3 + 4 * 5 ) }
-% \end{verbatim}
-% evaluate to $-6$ because \cs[no-index]{l_my_tl} expands to the
-% integer denotation~|5|. As the \meta{int expr} is fully
-% expanded from left to right during evaluation, fully expandable and
-% restricted-expandable functions can both be used, and \cs{exp_not:n}
-% and its variants have no effect while \cs{exp_not:N} may incorrectly
-% interrupt the expression.
+% \texttt{0}~for zero.
% \begin{texnote}
% Exactly two expansions are needed to evaluate \cs{int_eval:n}.
% The result is \emph{not} an \meta{internal integer}, and therefore
@@ -313,11 +262,11 @@
% \begin{function}[EXP, pTF, added=2012-03-03]
% {\int_if_exist:N, \int_if_exist:c}
% \begin{syntax}
-% \cs{int_if_exist_p:N} \meta{int}
-% \cs{int_if_exist:NTF} \meta{int} \Arg{true code} \Arg{false code}
+% \cs{int_if_exist_p:N} \meta{integer}
+% \cs{int_if_exist:NTF} \meta{integer} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests whether the \meta{int} is currently defined. This does not
-% check that the \meta{int} really is an integer variable.
+% Tests whether the \meta{integer} is currently defined. This does not
+% check that the \meta{integer} really is an integer variable.
% \end{function}
%
% \section{Setting and incrementing integers}
@@ -346,7 +295,10 @@
% \end{function}
%
% \begin{function}[updated = 2011-10-22]
-% {\int_set:Nn, \int_set:cn, \int_gset:Nn, \int_gset:cn}
+% {
+% \int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV,
+% \int_gset:Nn, \int_gset:cn, \int_gset:MV, \int_gset:cV
+% }
% \begin{syntax}
% \cs{int_set:Nn} \meta{integer} \Arg{int expr}
% \end{syntax}
@@ -462,7 +414,8 @@
% \end{syntax}
% This function evaluates the \meta{test int expr} and
% compares this in turn to each of the
-% \meta{int expr cases}. If the two are equal then the
+% \meta{int expr case}s until a match is found.
+% If the two are equal then the
% associated \meta{code} is left in the input stream
% and other cases are discarded. If any of the
% cases are matched, the \meta{true code} is also inserted into the
@@ -481,6 +434,10 @@
% { No idea! }
% \end{verbatim}
% leaves \enquote{\texttt{Medium}} in the input stream.
+% Since evaluation of the test expressions stops at the first
+% successful case, the order of possible matches should normally
+% be that the most likely are earlier: this will reduce the average
+% steps required to complete expansion.
% \end{function}
%
% \begin{function}[EXP,pTF]{\int_if_even:n, \int_if_odd:n}
@@ -1519,9 +1476,9 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\int_set:Nn, \int_set:cn}
+% \begin{macro}{\int_set:Nn, \int_set:cn, \int_set:NV, \int_set:cV}
% \UnitTested
-% \begin{macro}{\int_gset:Nn, \int_gset:cn}
+% \begin{macro}{\int_gset:Nn, \int_gset:cn, \int_gset:NV, \int_gset:cV}
% \UnitTested
% As integers are register-based \TeX{} issues an error
% if they are not defined. While the |=| sign is optional, this
@@ -1532,8 +1489,8 @@
{ #1 = \@@_eval:w #2 \@@_eval_end: }
\cs_new_protected:Npn \int_gset:Nn #1#2
{ \tex_global:D #1 = \@@_eval:w #2 \@@_eval_end: }
-\cs_generate_variant:Nn \int_set:Nn { c }
-\cs_generate_variant:Nn \int_gset:Nn { c }
+\cs_generate_variant:Nn \int_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \int_gset:Nn { NV , c , cV }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex-dev/required/l3kernel/l3intarray.dtx b/macros/latex-dev/required/l3kernel/l3intarray.dtx
index aa49275e78..9a9a5d64e8 100644
--- a/macros/latex-dev/required/l3kernel/l3intarray.dtx
+++ b/macros/latex-dev/required/l3kernel/l3intarray.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -79,7 +79,7 @@
% \begin{function}[added = 2018-05-04]
% {\intarray_const_from_clist:Nn, \intarray_const_from_clist:cn}
% \begin{syntax}
-% \cs{intarray_const_from_clist:Nn} \meta{intarray~var} \meta{int expr clist}
+% \cs{intarray_const_from_clist:Nn} \meta{intarray~var} \Arg{int expr clist}
% \end{syntax}
% Creates a new constant \meta{integer array variable} or raises an
% error if the name is already taken. The \meta{integer array
diff --git a/macros/latex-dev/required/l3kernel/l3kernel-functions.dtx b/macros/latex-dev/required/l3kernel/l3kernel-functions.dtx
index c3bb838acf..2678f3f965 100644
--- a/macros/latex-dev/required/l3kernel/l3kernel-functions.dtx
+++ b/macros/latex-dev/required/l3kernel/l3kernel-functions.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3keys.dtx b/macros/latex-dev/required/l3kernel/l3keys.dtx
index 13772d1781..c9220d7279 100644
--- a/macros/latex-dev/required/l3kernel/l3keys.dtx
+++ b/macros/latex-dev/required/l3kernel/l3keys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -500,9 +500,9 @@
%
% \begin{function}{.tl_set:N, .tl_set:c, .tl_gset:N, .tl_gset:c}
% \begin{syntax}
-% \meta{key} .tl_set:N = \meta{token list variable}
+% \meta{key} .tl_set:N = \meta{tl~var}
% \end{syntax}
-% Defines \meta{key} to set \meta{token list variable} to \meta{value}.
+% Defines \meta{key} to set \meta{tl~var} to \meta{value}.
% If the variable does not exist, it is created globally
% at the point that the key is set up.
% \end{function}
@@ -510,9 +510,9 @@
% \begin{function}[added = 2023-09-18]
% {.tl_set_e:N, .tl_set_e:c, .tl_gset_e:N, .tl_gset_e:c}
% \begin{syntax}
-% \meta{key} .tl_set_e:N = \meta{token list variable}
+% \meta{key} .tl_set_e:N = \meta{tl~var}
% \end{syntax}
-% Defines \meta{key} to set \meta{token list variable} to \meta{value},
+% Defines \meta{key} to set \meta{tl~var} to \meta{value},
% which will be subjected to an \texttt{e}-type expansion
% (\emph{i.e.}~using \cs{tl_set:Ne}). If the variable does not exist,
% it is created globally at the point that the key is set up.
@@ -649,15 +649,13 @@
% { key } % Name of choice key
% { choice-a , choice-b , choice-c } % Valid choices
% { \exp_not:n {#1} } % Invalid choice given
-% %
-% %
% }
% \end{verbatim}
%
% Multiple choices are created in a very similar manner to mutually-exclusive
% choices, using the properties \texttt{.multichoice:} and
% \texttt{.multichoices:nn}. As with mutually exclusive choices, multiple
-% choices are define as sub-keys. Thus both
+% choices are defined as sub-keys. Thus both
% \begin{verbatim}
% \keys_define:nn { mymodule }
% {
@@ -1926,19 +1924,21 @@
% \end{macro}
%
% \begin{macro}{\@@_define_code:n}
+% \begin{macro}[EXP]{\@@_define_code:nnn}
% \begin{macro}[EXP]{\@@_define_code:w}
% Two possible cases. If there is a value for the key, then just use
% the function. If not, then a check to make sure there is no need for
% a value with the property. If there should be one then complain,
-% otherwise execute it. There is no need to check for a |:| as if it
-% was missing the earlier tests would have failed.
+% otherwise execute it. For a \LaTeXe{} property like |.code| which
+% doesn't contain a |:|, treat it as having arity 1 and pass the
+% (empty) value to it.
% \begin{macrocode}
\cs_new_protected:Npn \@@_define_code:n #1
{
\bool_if:NTF \l_@@_no_value_bool
{
- \exp_after:wN \@@_define_code:w
- \l_@@_property_str \s_@@_stop
+ \@@_define_code:nnn
+ { \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} }
{ \use:c { \c_@@_props_root_str \l_@@_property_str } }
{
\msg_error:nnee { keys } { property-requires-value }
@@ -1947,12 +1947,31 @@
}
{ \use:c { \c_@@_props_root_str \l_@@_property_str } {#1} }
}
-\exp_last_unbraced:NNNNo
- \cs_new:Npn \@@_define_code:w #1 \c_colon_str #2 \s_@@_stop
- { \tl_if_empty:nTF {#2} }
+\cs_new:Npe \@@_define_code:nnn
+ {
+ \exp_not:N \exp_after:wN \exp_not:N \@@_define_code:w
+ \exp_not:N \l_@@_property_str
+ \c_colon_str \c_colon_str
+ \exp_not:N \s_@@_stop
+ }
+\use:e
+ {
+ \cs_new:Npn \exp_not:N \@@_define_code:w
+ #1 \c_colon_str #2 \c_colon_str #3 \exp_not:N \s_@@_stop
+ }
+ {
+ \tl_if_empty:nTF {#3}
+ { \use_i:nnn }
+ {
+ \tl_if_empty:nTF {#2}
+ { \use_ii:nnn }
+ { \use_iii:nnn }
+ }
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Turning properties into actions}
%
diff --git a/macros/latex-dev/required/l3kernel/l3legacy.dtx b/macros/latex-dev/required/l3kernel/l3legacy.dtx
index 4cfce5c5f1..b76516d1b0 100644
--- a/macros/latex-dev/required/l3kernel/l3legacy.dtx
+++ b/macros/latex-dev/required/l3kernel/l3legacy.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3luatex.dtx b/macros/latex-dev/required/l3kernel/l3luatex.dtx
index eb10d5aecc..d7a6058a15 100644
--- a/macros/latex-dev/required/l3kernel/l3luatex.dtx
+++ b/macros/latex-dev/required/l3kernel/l3luatex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -567,7 +567,7 @@ ltxutils.filesize = filesize
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[int]{luadef}
+% \begin{macro}[int]{luacmd}
% An internal function for defining control sequences form Lua which behave
% like primitives. This acts as a wrapper around |token.set_lua| which accepts
% a function instead of an index into the functions table.
diff --git a/macros/latex-dev/required/l3kernel/l3msg.dtx b/macros/latex-dev/required/l3kernel/l3msg.dtx
index e901b07c06..68058724e8 100644
--- a/macros/latex-dev/required/l3kernel/l3msg.dtx
+++ b/macros/latex-dev/required/l3kernel/l3msg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3names.dtx b/macros/latex-dev/required/l3kernel/l3names.dtx
index 5cdd1361e3..95aeafe4a6 100644
--- a/macros/latex-dev/required/l3kernel/l3names.dtx
+++ b/macros/latex-dev/required/l3kernel/l3names.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -580,7 +580,6 @@
\@@_primitive:NN \pdfoutline \tex_pdfoutline:D
\@@_primitive:NN \pdfoutput \tex_pdfoutput:D
\@@_primitive:NN \pdfpageattr \tex_pdfpageattr:D
- \@@_primitive:NN \pdfpagesattr \tex_pdfpagesattr:D
\@@_primitive:NN \pdfpagebox \tex_pdfpagebox:D
\@@_primitive:NN \pdfpageref \tex_pdfpageref:D
\@@_primitive:NN \pdfpageresources \tex_pdfpageresources:D
@@ -1242,13 +1241,11 @@
% \end{macrocode}
% Primitives from \upTeX{}.
% \begin{macrocode}
- \@@_primitive:NN \currentcjktoken \tex_currentcjktoken:D
\@@_primitive:NN \disablecjktoken \tex_disablecjktoken:D
\@@_primitive:NN \enablecjktoken \tex_enablecjktoken:D
\@@_primitive:NN \forcecjktoken \tex_forcecjktoken:D
\@@_primitive:NN \kchar \tex_kchar:D
\@@_primitive:NN \kchardef \tex_kchardef:D
- \@@_primitive:NN \kuten \tex_kuten:D
\@@_primitive:NN \uptexrevision \tex_uptexrevision:D
\@@_primitive:NN \uptexversion \tex_uptexversion:D
% \end{macrocode}
diff --git a/macros/latex-dev/required/l3kernel/l3news.pdf b/macros/latex-dev/required/l3kernel/l3news.pdf
index d7871cb0de..4b6724990b 100644
--- a/macros/latex-dev/required/l3kernel/l3news.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news01.pdf b/macros/latex-dev/required/l3kernel/l3news01.pdf
index 321b592182..97e9ba1ed6 100644
--- a/macros/latex-dev/required/l3kernel/l3news01.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news01.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news02.pdf b/macros/latex-dev/required/l3kernel/l3news02.pdf
index 1513a85c9d..9ec01fb582 100644
--- a/macros/latex-dev/required/l3kernel/l3news02.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news02.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news03.pdf b/macros/latex-dev/required/l3kernel/l3news03.pdf
index cb710d3c6b..d0db6a7202 100644
--- a/macros/latex-dev/required/l3kernel/l3news03.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news03.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news04.pdf b/macros/latex-dev/required/l3kernel/l3news04.pdf
index 4888017e80..aa342652d3 100644
--- a/macros/latex-dev/required/l3kernel/l3news04.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news04.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news05.pdf b/macros/latex-dev/required/l3kernel/l3news05.pdf
index 6e6edba022..7fd2c79894 100644
--- a/macros/latex-dev/required/l3kernel/l3news05.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news05.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news06.pdf b/macros/latex-dev/required/l3kernel/l3news06.pdf
index 66fb74bfae..19d853a0d5 100644
--- a/macros/latex-dev/required/l3kernel/l3news06.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news06.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news07.pdf b/macros/latex-dev/required/l3kernel/l3news07.pdf
index 55613b539c..92a9de922b 100644
--- a/macros/latex-dev/required/l3kernel/l3news07.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news07.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news08.pdf b/macros/latex-dev/required/l3kernel/l3news08.pdf
index 125807c5c6..12df47ecfb 100644
--- a/macros/latex-dev/required/l3kernel/l3news08.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news08.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news09.pdf b/macros/latex-dev/required/l3kernel/l3news09.pdf
index bb16f50cb7..1b134b20ae 100644
--- a/macros/latex-dev/required/l3kernel/l3news09.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news09.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news10.pdf b/macros/latex-dev/required/l3kernel/l3news10.pdf
index 60a66c3c10..75659fdd85 100644
--- a/macros/latex-dev/required/l3kernel/l3news10.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news10.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news11.pdf b/macros/latex-dev/required/l3kernel/l3news11.pdf
index 7ee423465c..ca8b47fa2c 100644
--- a/macros/latex-dev/required/l3kernel/l3news11.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news11.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3news12.pdf b/macros/latex-dev/required/l3kernel/l3news12.pdf
index c07be30ab5..c3b7a0a396 100644
--- a/macros/latex-dev/required/l3kernel/l3news12.pdf
+++ b/macros/latex-dev/required/l3kernel/l3news12.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3pdf.dtx b/macros/latex-dev/required/l3kernel/l3pdf.dtx
index 55f49476e3..624fd08326 100644
--- a/macros/latex-dev/required/l3kernel/l3pdf.dtx
+++ b/macros/latex-dev/required/l3kernel/l3pdf.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -70,8 +70,8 @@
% \cs{pdf_object_write:nnn} \Arg{object} \Arg{type} \Arg{content}
% \end{syntax}
% Writes the \meta{content} as content of the \meta{object}. Depending on the
-% \meta{type} declared for the object, the format required for the
-% \meta{data} will vary
+% \meta{type} declared for the object, the format required for
+% \meta{content} will vary:
% \begin{itemize}
% \item[\texttt{array}] A space-separated list of values
% \item[\texttt{dict}] Key--value pairs in the form
@@ -159,7 +159,7 @@
% \cs{pdf_object_unnamed_write:nn} \Arg{type} \Arg{content}
% \end{syntax}
% Writes the \meta{content} as content of an anonymous object. Depending on the
-% \meta{type}, the format required for the \meta{data} will vary
+% \meta{type}, the format required for \meta{content} will vary:
% \begin{itemize}
% \item[\texttt{array}] A space-separated list of values
% \item[\texttt{dict}] Key--value pairs in the form
@@ -192,11 +192,11 @@
%
% \begin{function}[pTF, EXP, added = 2021-02-10]{\pdf_version_compare:Nn}
% \begin{syntax}
-% \cs{pdf_version_compare_p:Nn} \meta{comparator} \Arg{version}
-% \cs{pdf_version_compare:NnTF} \meta{comparator} \Arg{version} \Arg{true code} \Arg{false code}
+% \cs{pdf_version_compare_p:Nn} \meta{relation} \Arg{version}
+% \cs{pdf_version_compare:NnTF} \meta{relation} \Arg{version} \Arg{true code} \Arg{false code}
% \end{syntax}
% Compares the version of the PDF being created with the \meta{version}
-% string specified, using the \meta{comparator}. Either the \meta{true code}
+% string specified, using the \meta{relation}. Either the \meta{true code}
% or \meta{false code} will be left in the output stream.
% \end{function}
%
@@ -251,9 +251,9 @@
%
% \section{Destinations}
%
-% Destinations are the places a link jumped too.
-% Unlike the name may suggest they don't described
-% an exact location in the PDF. Instead a destination contains a reference to
+% Destinations are the places a link jumped to.
+% Unlike the name may suggest, they don't describe
+% an exact location in the PDF. Instead, a destination contains a reference to
% a page along with an instruction how to display this page.
% The normally used \enquote{XYZ \textit{top left zoom}} for example instructs
% the viewer to show the page with the given \textit{zoom} and
diff --git a/macros/latex-dev/required/l3kernel/l3prefixes.csv b/macros/latex-dev/required/l3kernel/l3prefixes.csv
index e85412b9d8..e9835fb3f0 100644
--- a/macros/latex-dev/required/l3kernel/l3prefixes.csv
+++ b/macros/latex-dev/required/l3kernel/l3prefixes.csv
@@ -26,6 +26,7 @@ block,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https:
bool,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
box,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
bxjh,BXjaholiday,Takuto Asakura,https://github.com/wtsnjp/BXjaholiday,https://github.com/wtsnjp/BXjaholiday.git,https://github.com/wtsnjp/BXjaholiday/issues,2018-02-02,2019-02-02,
+cal,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
cascade,cascade,F. Pantigny,,,,2020-07-21,2020-07-21,
catcode,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
cctab,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-28,2012-09-28,
@@ -78,6 +79,7 @@ etex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https:
etl,etl,Jonathan P. Spratte,https://github.com/Skillmon/ltx_etl,git@github.com:Skillmon/ltx_etl.git,https://github.com/Skillmon/ltx_etl/issues,2021-08-16,2021-08-16,
exp,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
expl,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+expltools,expltools,Vít Starý Novotný,https://github.com/witiko/expltools/,https://github.com/witiko/expltools.git,https://github.com/witiko/expltools/issues,2024-06-26,2024-06-26,Development tools for expl3 programmers
exsheets,exsheets,Clemens Niederberger,https://bitbucket.org/cgnieder/exsheets/,git@bitbucket.org:cgnieder/exsheets.git,https://bitbucket.org/cgnieder/exsheets/issues,2013-03-16,2013-03-16,
extblx,biblatex-ext,Moritz Wemheuer,https://github.com/moewew/biblatex-ext/,https://github.com/moewew/biblatex-ext.git,https://github.com/moewew/biblatex-ext/issues,2020-02-09,2020-02-09,
exwf,exwrapfig,Takuto Asakura,https://github.com/wtsnjp/exwrapfig,https://github.com/wtsnjp/exwrapfig.git,https://github.com/wtsnjp/exwrapfig/issues,2018-06-07,2018-06-07,
@@ -132,9 +134,11 @@ job,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https:/
jsonparse,jsonparse,Jasper Habicht,https://github.com/jasperhabicht/jsonparse,https://github.com/jasperhabicht/jsonparse/jsponsparse.git,https://github.com/jasperhabicht/jsonparse/issues,2024-04-14,2024-04-14,
kernel,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
keys,"l3kernel,l3keys2e,ltkeys",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+keythms,keytheorems,Matthew Bertucci,https://github.com/mbertucci47/keytheorems,https://github.com/mbertucci47/keytheorems,https://github.com/mbertucci47/keytheorems/issues,2024-09-10,2024-09-10,
keyval,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
kgl,kantlipsum,Enrico Gregorio,,,,2013-03-16,2013-03-16,
kivitendo,"kiviletter, kivitables",Marei Peischl for Kivitendo,https://www.kivitendo.de/,https://github.com/kivitendo/kivitendo-erp,https://forum.kivitendo.de/,2021-05-28,2021-05-28,
+knot,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
langsci,langscibook,Language Science Press,https://langsci-press.org,https://github.com/langsci/langscibook,https://github.com/langsci/langscibook/issues,2021-07-20,2021-07-21,
left,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
liftarm,liftarm,Matthias Floré,,,,2024-05-25,2024-05-25,
@@ -160,6 +164,7 @@ minibox,minibox,Will Robertson,,https://github.com/wspr/will2e.git,https://githu
minus,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
mix,media9,Alexander Grahn,,https://gitlab.com/agrahn/media9,https://gitlab.com/agrahn/media9/issues,2013-01-18,2020-04-15,
mode,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
+moremath,moremath,Marcel Ilg,https://github.com/Mister00X/moremath,https://github.com/Mister00X/moremath.git,https://github.com/Mister00X/moremath/issues,2024-07-27,2024-07-27,
morewrites,morewrites,Bruno Le Floch,https://github.com/blefloch/latex-morewrites,https://github.com/blefloch/latex-morewrites.git,https://github.com/blefloch/latex-morewrites/issues,2013-03-16,2015-09-22,
msg,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
msvg,media4svg,Alexander Grahn,,https://gitlab.com/agrahn/media4svg,https://gitlab.com/agrahn/media4svg/issues,2020-04-15,2020-04-15,
@@ -201,6 +206,7 @@ piton,piton,François Pantigny,,,,29/09/2022,29/09/2022,
pkgploader,pkgploader,Michiel Helvensteijn,,,,2014-02-05,2014-02-05,
platex,platex,Japanese TeX Development Community,https://github.com/texjporg/platex,https://github.com/texjporg/platex.git,https://github.com/texjporg/platex/issues,2020-09-30,2020-09-30,
polyglossia,polyglossia,Arthur Reutenauer,https://www.polyglossia.org/,https://github.com/reutenauer/polyglossia,https://github.com/reutenauer/polyglossia/issues,2019-09-03,,
+polyomino,polyomino,Matthias Floré,,,,2024-09-05,2024-09-05,
postnotes,postnotes,gusbrs,https://github.com/gusbrs/postnotes,https://github.com/gusbrs/postnotes.git,https://github.com/gusbrs/postnotes/issues,2022-04-23,2022-04-23,
prelim,prelim2e,Marei Peischl,https://github.com/TeXhackse/prelim2e,https://github.com/TeXhackse/prelim2e.git,https://github.com/TeXhackse/prelim2e/issues,2020-11-24,2020-11-24,
prg,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
@@ -210,6 +216,7 @@ property,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,htt
pseudo,pseudo,Magnus Lie Hetland,https://github.com/mlhetland/pseudo.sty,https://github.com/mlhetland/pseudo.sty.git,https://github.com/mlhetland/pseudo.sty/issues,2019-06-24,2019-06-24,
ptex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2015-07-28,2015-07-28,
ptxcd,ptxcd,Marei Peischl,,,,2020-07-27,2020-07-27,Used for specific corporate design templates
+ptxtools,"depp, ptxtools",Marei Peischl,https://gitlab.com/islandoftex/texmf/depp,https://gitlab.com/islandoftex/texmf/depp.git,https://gitlab.com/islandoftex/texmf/depp,2024-07-09,2024-07-09,
qrbill,qrbill,Marei Peischl,https://github.com/peiTeX/qrbill,https://github.com/peiTeX/qrbill.git,https://github.com/peiTeX/qrbill/issues,2020-06-27,2020-06-27,
quark,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
rainbow,beamertheme-rainbow,samcarter,https://github.com/samcarter/beamertheme-rainbow,https://github.com/samcarter/beamertheme-rainbow,https://github.com/samcarter/beamertheme-rainbow/issues,2023-07-04,2023-07-04,
@@ -239,6 +246,7 @@ slcd,se2thesis,Stephan Lukasczyk,https://github.com/se2p/se2thesis,https://githu
socket,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex2e.git,https://github.com/latex3/latex2e/issues,2023-10-17,2023-10-17,
sort,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2017-02-13,
space,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
+spath,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
starray,starray,Alceu Frigeri,https://github.com/alceu-frigeri/starray,https://github.com/alceu-frigeri/starray,https://github.com/alceu-frigeri/starray/issues,2023-05-15,2023-05-15,
statistics,statistics,Julien Rivaud,https://gitlab.com/frnchfrgg-latex/statistics,https://gitlab.com/frnchfrgg-latex/statistics.git,https://gitlab.com/frnchfrgg-latex/statistics/issues,2018-06-25,2018-06-25,
stm,lt3-stm,CV Radhakrishnan,http://www.cvr.cc/,,,2014-02-26,2014-02-26,
@@ -258,6 +266,7 @@ tex,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https:/
text,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2020-01-15,2020-01-15,
tikzfill,tikzfill,Thomas F. Sturm,https://github.com/T-F-S/tikzfill,https://github.com/T-F-S/tikzfill.git,https://github.com/T-F-S/tikzfill/issues,2022-07-19,2022-07-19,
tikzlings,tikzlings,samcarter,https://github.com/samcarter/tikzlings,git@github.com:samcarter/tikzlings.git,https://github.com/samcarter/tikzlings/issues,2023-02-17,2023-02-17,
+tikzspath,spath3,Andrew Stacey,https://github.com/loopspace/spath3,https://github.com/loopspace/spath3.git,https://github.com/loopspace/spath3/issues,2024-07-18,2024-07-18,
tikzsymbols,tikzsymbols,Ben Vitecek,https://github.com/Vidabe/tikzsymbols,https://github.com/Vidabe/tikzsymbols.git,https://github.com/Vidabe/tikzsymbols/issues,2018-09-26,2018-09-26,
tilde,l3kernel,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2018-05-12,2018-05-12,
tl,"l3kernel,l3tl-build",The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
@@ -288,6 +297,7 @@ xmarks,latex2e,The LaTeX Project,https://www.latex-project.org/latex3.html,https
xparse,xparse,The LaTeX Project,https://www.latex-project.org/latex3.html,https://github.com/latex3/latex3.git,https://github.com/latex3/latex3/issues,2012-09-27,2012-09-27,
xpatch,"regexpatch,xpatch",Enrico Gregorio,,,,2013-03-16,2013-03-16,
xpeek,xpeek,Joel C. Salomon,,,,2013-03-16,2013-03-16,
+xpg,polyglossia,Jürgen Spitzmüller,https://github.com/reutenauer/polyglossia/,https://github.com/reutenauer/polyglossia/,https://github.com/reutenauer/polyglossia/issues,2024-07-02,2024-07-02,
xpinyin,xpinyin,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/CTeX-org/ctex-kit.git,https://github.com/CTeX-org/ctex-kit/issues,2013-03-16,2013-05-26,
xsb,xsavebox,Alexander Grahn,,https://gitlab.com/agrahn/xsavebox,https://gitlab.com/agrahn/xsavebox/issues,2016-02-26,2020-04-15,
xsim,xsim,Clemens Niederberger,https://github.com/cgnieder/xsim/,https://github.com/cgnieder/xsim.git,https://github.com/cgnieder/xsim/issues,2020-04-14,2020-04-14,
@@ -299,4 +309,5 @@ zhnum,zhnumber,Qing Lee,https://github.com/CTeX-org/ctex-kit,https://github.com/
zrefcheck,zref-check,gusbrs,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check,https://github.com/gusbrs/zref-check/issues,2021-08-05,2021-08-05,
zrefclever,zref-clever,gusbrs,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever,https://github.com/gusbrs/zref-clever/issues,2021-11-29,2021-11-29,
zrefvario,zref-vario,gusbrs,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario,https://github.com/gusbrs/zref-vario/issues,2022-02-02,2022-02-02,
+zugferd,zugferd,Marei Peischl,https://github.com/TeXhackse/LaTeX-ZUGFeRD,https://github.com/TeXhackse/LaTeX-ZUGFeRD.git,https://github.com/TeXhackse/LaTeX-ZUGFeRD/issues,2024-07-09,2024-07-09,
zxjt,zxjatype,Takayuki Yato,,,,2013-03-16,2013-03-16,
diff --git a/macros/latex-dev/required/l3kernel/l3prefixes.pdf b/macros/latex-dev/required/l3kernel/l3prefixes.pdf
index 259b86e94a..862ed53874 100644
--- a/macros/latex-dev/required/l3kernel/l3prefixes.pdf
+++ b/macros/latex-dev/required/l3kernel/l3prefixes.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3prg.dtx b/macros/latex-dev/required/l3kernel/l3prg.dtx
index bec4e3a712..c4f2ab1fa0 100644
--- a/macros/latex-dev/required/l3kernel/l3prg.dtx
+++ b/macros/latex-dev/required/l3kernel/l3prg.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -664,7 +664,7 @@
% ~~\Arg{true code}
% ~~\Arg{false code}
% \end{syntax}
-% Evaluates in turn each of the \meta{boolean expression cases} until
+% Evaluates in turn each of the \meta{boolean expression case}s until
% the first one that evaluates to \texttt{true}.
% The \meta{code} associated to this first case is left in the input
% stream, followed by the \meta{true code}, and other cases are
diff --git a/macros/latex-dev/required/l3kernel/l3prop.dtx b/macros/latex-dev/required/l3kernel/l3prop.dtx
index 21b8d03dd6..47cd52320c 100644
--- a/macros/latex-dev/required/l3kernel/l3prop.dtx
+++ b/macros/latex-dev/required/l3kernel/l3prop.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -181,11 +181,11 @@
% \prop_gset_from_keyval:Nn, \prop_gset_from_keyval:cn,
% }
% \begin{syntax}
-% \cs{prop_set_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_set_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Sets \meta{property list} to contain key--value pairs given in the second
% argument. If duplicate keys appear only the last of the values is kept.
@@ -205,11 +205,11 @@
% \begin{function}[added = 2017-11-28, updated = 2021-11-07]
% {\prop_const_from_keyval:Nn, \prop_const_from_keyval:cn}
% \begin{syntax}
-% \cs{prop_const_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_const_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Creates a new constant \enquote{flat} \meta{property list} or raises
% an error if the
@@ -224,11 +224,11 @@
% \begin{function}[added = 2024-02-12]
% {\prop_const_linked_from_keyval:Nn, \prop_const_linked_from_keyval:cn}
% \begin{syntax}
-% \cs{prop_const_linked_from_keyval:Nn} \meta{prop~var}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_const_linked_from_keyval:Nn} \meta{prop~var} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Creates a new constant \enquote{linked} \meta{prop~var} or raises an
% error if the
@@ -347,11 +347,11 @@
% \prop_gput_from_keyval:Nn, \prop_gput_from_keyval:cn,
% }
% \begin{syntax}
-% \cs{prop_put_from_keyval:Nn} \meta{property list}
-% \{
-% \meta{key1} |=| \meta{value1} |,|
-% \meta{key2} |=| \meta{value2} |,| \ldots{}
-% \}
+% \cs{prop_put_from_keyval:Nn} \meta{property list} \\
+% ~~\{ \\
+% ~~~~\meta{key1} |=| \meta{value1} |,| \\
+% ~~~~\meta{key2} |=| \meta{value2} |,| \ldots{} \\
+% ~~\}
% \end{syntax}
% Updates the \meta{property list} by adding entries for each key--value
% pair given in the second argument. The addition is done through
@@ -386,7 +386,7 @@
% Recovers the \meta{value} stored with \meta{key} from the
% \meta{property list}, and places this in the \meta{token list
% variable}. If the \meta{key} is not found in the
-% \meta{property list} then the \meta{token list variable} is set
+% \meta{property list} then the \meta{tl~var} is set
% to the special marker \cs{q_no_value}. The \meta{token list
% variable} is set within the current \TeX{} group. See also
% \cs{prop_get:NnNTF}.
@@ -405,7 +405,7 @@
% Recovers the \meta{value} stored with \meta{key} from the
% \meta{property list}, and places this in the \meta{token list
% variable}. If the \meta{key} is not found in the
-% \meta{property list} then the \meta{token list variable} is set
+% \meta{property list} then the \meta{tl~var} is set
% to the special marker \cs{q_no_value}. The \meta{key} and
% \meta{value} are then deleted from the property list. Both
% assignments are local. See also \cs{prop_pop:NnNTF}.
@@ -424,11 +424,11 @@
% Recovers the \meta{value} stored with \meta{key} from the
% \meta{property list}, and places this in the \meta{token list
% variable}. If the \meta{key} is not found in the
-% \meta{property list} then the \meta{token list variable} is set
+% \meta{property list} then the \meta{tl~var} is set
% to the special marker \cs{q_no_value}. The \meta{key} and
% \meta{value} are then deleted from the property list.
% The \meta{property list} is modified globally, while the assignment of
-% the \meta{token list variable} is local. See also \cs{prop_gpop:NnNTF}.
+% the \meta{tl~var} is local. See also \cs{prop_gpop:NnNTF}.
% \end{function}
%
% \begin{function}[EXP, added = 2014-07-17]
@@ -553,17 +553,17 @@
% \prop_get:cnc
% }
% \begin{syntax}
-% \cs{prop_get:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% \cs{prop_get:NnNTF} \meta{property list} \Arg{key} \meta{tl~var} \\
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream. The value of the
-% \meta{token list variable} is not defined in this case and should
+% \meta{tl~var} is not defined in this case and should
% not be relied upon. If the \meta{key} is present in the
% \meta{property list}, stores the corresponding \meta{value} in the
-% \meta{token list variable} without removing it from the
+% \meta{tl~var} without removing it from the
% \meta{property list}, then leaves the \meta{true code} in the input
-% stream. The \meta{token list variable} is assigned locally.
+% stream. The \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2011-08-18, updated = 2012-05-19]
@@ -574,17 +574,17 @@
% \prop_pop:coN
% }
% \begin{syntax}
-% \cs{prop_pop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% \cs{prop_pop:NnNTF} \meta{property list} \Arg{key} \meta{tl~var} \\
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream. The value of the
-% \meta{token list variable} is not defined in this case and should
+% \meta{tl~var} is not defined in this case and should
% not be relied upon. If the \meta{key} is present in
% the \meta{property list}, pops the corresponding \meta{value}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from
% the \meta{property list}.
-% Both the \meta{property list} and the \meta{token list variable}
+% Both the \meta{property list} and the \meta{tl~var}
% are assigned locally.
% \end{function}
%
@@ -596,18 +596,18 @@
% \prop_gpop:coN
% }
% \begin{syntax}
-% \cs{prop_gpop:NnNTF} \meta{property list} \Arg{key} \meta{token list variable} \\
+% \cs{prop_gpop:NnNTF} \meta{property list} \Arg{key} \meta{tl~var} \\
% ~~\Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{key} is not present in the \meta{property list}, leaves
% the \meta{false code} in the input stream. The value of the
-% \meta{token list variable} is not defined in this case and should
+% \meta{tl~var} is not defined in this case and should
% not be relied upon. If the \meta{key} is present in
% the \meta{property list}, pops the corresponding \meta{value}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from
% the \meta{property list}.
% The \meta{property list} is modified globally, while the
-% \meta{token list variable} is assigned locally.
+% \meta{tl~var} is assigned locally.
% \end{function}
%
% \section{Mapping over property lists}
diff --git a/macros/latex-dev/required/l3kernel/l3quark.dtx b/macros/latex-dev/required/l3kernel/l3quark.dtx
index 136596a3fe..5c6b0ca2d4 100644
--- a/macros/latex-dev/required/l3kernel/l3quark.dtx
+++ b/macros/latex-dev/required/l3kernel/l3quark.dtx
@@ -32,7 +32,7 @@
%
% \title{^^A
% The \pkg{l3quark} module\\ Quarks and scan marks^^A
-% }
+% }\ifdefined\thechapter\label{sec:l3quarks}\fi
%
% \author{^^A
% The \LaTeX{} Project\thanks
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3regex.dtx b/macros/latex-dev/required/l3kernel/l3regex.dtx
index 6ca9c8eeed..1fa9f71f08 100644
--- a/macros/latex-dev/required/l3kernel/l3regex.dtx
+++ b/macros/latex-dev/required/l3kernel/l3regex.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -643,7 +643,7 @@
% \end{syntax}
% Determines which of the \meta{regular expressions} matches at the
% earliest point in the \meta{token list}, and leaves the
-% corresponding \meta{code_i} followed by the \meta{true code} in the
+% corresponding \meta{code} followed by the \meta{true code} in the
% input stream. If several \meta{regex} match starting at the same
% point, then the first one in the list is selected and the others are
% discarded. If none of the \meta{regex} match, the \meta{false code}
@@ -5970,7 +5970,7 @@
% corresponding to the initial value of
% \cs{l_@@_replacement_category_tl}.
% The argument |#1| is a single character (including the case of a catcode-other space).
-% In case no specific catcode is requested, we taked into account the
+% In case no specific catcode is requested, we take into account the
% current catcode regime (at the time the replacement is performed)
% as much as reasonable, with all impossible catcodes (escape,
% newline, etc.) being mapped to \enquote{other}.
diff --git a/macros/latex-dev/required/l3kernel/l3seq.dtx b/macros/latex-dev/required/l3kernel/l3seq.dtx
index 38fc9471a9..120081197b 100644
--- a/macros/latex-dev/required/l3kernel/l3seq.dtx
+++ b/macros/latex-dev/required/l3kernel/l3seq.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -249,78 +249,78 @@
% For implementation reasons, the actions at the left of the sequence are
% faster than those acting on the right. These functions all assign the
% recovered material locally, \emph{i.e.}~setting the
-% \meta{token list variable} used with \cs{tl_set:Nn} and \emph{never}
+% \meta{tl~var} used with \cs{tl_set:Nn} and \emph{never}
% \cs{tl_gset:Nn}.
%
% \begin{function}[updated = 2012-05-14]{\seq_get_left:NN, \seq_get_left:cN}
% \begin{syntax}
-% \cs{seq_get_left:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_get_left:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Stores the left-most item from a \meta{seq~var} in the
-% \meta{token list variable} without removing it from the
-% \meta{seq~var}. The \meta{token list variable} is assigned locally.
-% If \meta{seq~var} is empty the \meta{token list variable}
+% \meta{tl~var} without removing it from the
+% \meta{seq~var}. The \meta{tl~var} is assigned locally.
+% If \meta{seq~var} is empty the \meta{tl~var}
% is set to the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-19]{\seq_get_right:NN, \seq_get_right:cN}
% \begin{syntax}
-% \cs{seq_get_right:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_get_right:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Stores the right-most item from a \meta{seq~var} in the
-% \meta{token list variable} without removing it from the
-% \meta{seq~var}. The \meta{token list variable} is assigned locally.
-% If \meta{seq~var} is empty the \meta{token list variable}
+% \meta{tl~var} without removing it from the
+% \meta{seq~var}. The \meta{tl~var} is assigned locally.
+% If \meta{seq~var} is empty the \meta{tl~var}
% is set to the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-14]{\seq_pop_left:NN, \seq_pop_left:cN}
% \begin{syntax}
-% \cs{seq_pop_left:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_pop_left:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the left-most item from a \meta{seq~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% sequence and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% sequence and stores it in the \meta{tl~var}.
% Both of the variables are assigned locally. If \meta{seq~var} is
-% empty the \meta{token list variable} is set to
+% empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-14]{\seq_gpop_left:NN, \seq_gpop_left:cN}
% \begin{syntax}
-% \cs{seq_gpop_left:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_gpop_left:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the left-most item from a \meta{seq~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% sequence and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% sequence and stores it in the \meta{tl~var}.
% The \meta{seq~var} is modified globally, while the assignment of
-% the \meta{token list variable} is local.
-% If \meta{seq~var} is empty the \meta{token list variable} is set to
+% the \meta{tl~var} is local.
+% If \meta{seq~var} is empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-19]{\seq_pop_right:NN, \seq_pop_right:cN}
% \begin{syntax}
-% \cs{seq_pop_right:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_pop_right:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the right-most item from a \meta{seq~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% sequence and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% sequence and stores it in the \meta{tl~var}.
% Both of the variables are assigned locally. If \meta{seq~var} is
-% empty the \meta{token list variable} is set to
+% empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-19]{\seq_gpop_right:NN, \seq_gpop_right:cN}
% \begin{syntax}
-% \cs{seq_gpop_right:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_gpop_right:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the right-most item from a \meta{seq~var} into the
-% \meta{token list variable}, \emph{i.e.}~removes the item from the
-% sequence and stores it in the \meta{token list variable}.
+% \meta{tl~var}, \emph{i.e.}~removes the item from the
+% sequence and stores it in the \meta{tl~var}.
% The \meta{seq~var} is modified globally, while the assignment of
-% the \meta{token list variable} is local.
-% If \meta{seq~var} is empty the \meta{token list variable} is set to
+% the \meta{tl~var} is local.
+% If \meta{seq~var} is empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
@@ -371,92 +371,92 @@
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]
% {\seq_get_left:NN, \seq_get_left:cN}
% \begin{syntax}
-% \cs{seq_get_left:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_get_left:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, stores the left-most item from the
% \meta{seq~var}
-% in the \meta{token list variable} without removing it from the
+% in the \meta{tl~var} without removing it from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
-% The \meta{token list variable} is assigned locally.
+% The \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-19]
% {\seq_get_right:NN, \seq_get_right:cN}
% \begin{syntax}
-% \cs{seq_get_right:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_get_right:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, stores the right-most item from the
% \meta{seq~var}
-% in the \meta{token list variable} without removing it from the
+% in the \meta{tl~var} without removing it from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
-% The \meta{token list variable} is assigned locally.
+% The \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]
% {\seq_pop_left:NN, \seq_pop_left:cN}
% \begin{syntax}
-% \cs{seq_pop_left:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_pop_left:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the left-most item from the
% \meta{seq~var}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
-% Both the \meta{seq~var} and the \meta{token list variable} are assigned
+% Both the \meta{seq~var} and the \meta{tl~var} are assigned
% locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]
% {\seq_gpop_left:NN, \seq_gpop_left:cN}
% \begin{syntax}
-% \cs{seq_gpop_left:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_gpop_left:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the left-most item from the \meta{seq~var}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
-% The \meta{seq~var} is modified globally, while the \meta{token list variable}
+% The \meta{seq~var} is modified globally, while the \meta{tl~var}
% is assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-19]
% {\seq_pop_right:NN, \seq_pop_right:cN}
% \begin{syntax}
-% \cs{seq_pop_right:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_pop_right:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the right-most item from the \meta{seq~var}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
-% Both the \meta{seq~var} and the \meta{token list variable} are assigned
+% Both the \meta{seq~var} and the \meta{tl~var} are assigned
% locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-19]
% {\seq_gpop_right:NN, \seq_gpop_right:cN}
% \begin{syntax}
-% \cs{seq_gpop_right:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_gpop_right:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the right-most item from the \meta{seq~var}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from the
% \meta{seq~var}, then leaves the \meta{true code} in the input stream.
% The \meta{seq~var} is modified globally, while the
-% \meta{token list variable} is assigned locally.
+% \meta{tl~var} is assigned locally.
% \end{function}
%
% \section{Modifying sequences}
@@ -747,7 +747,7 @@
% Applies \meta{inline function} to every \meta{item} stored
% within the \meta{seq~var_2}. The \meta{inline function} should
% consist of code which will receive the \meta{item} as |#1|.
-% The sequence resulting applying \meta{inline function} to each
+% The sequence resulting from applying \meta{inline function} to each
% \meta{item} is assigned to \meta{seq~var_1}.
% \begin{texnote}
% Contrarily to other mapping functions, \cs{seq_map_break:} cannot
@@ -852,72 +852,72 @@
%
% \begin{function}[updated = 2012-05-14]{\seq_get:NN, \seq_get:cN}
% \begin{syntax}
-% \cs{seq_get:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_get:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Reads the top item from a \meta{seq~var} into the
-% \meta{token list variable} without removing it from the
-% \meta{seq~var}. The \meta{token list variable} is assigned locally.
-% If \meta{seq~var} is empty the \meta{token list variable} is set to
+% \meta{tl~var} without removing it from the
+% \meta{seq~var}. The \meta{tl~var} is assigned locally.
+% If \meta{seq~var} is empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-14]{\seq_pop:NN, \seq_pop:cN}
% \begin{syntax}
-% \cs{seq_pop:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_pop:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the top item from a \meta{seq~var} into the
-% \meta{token list variable}. Both of the variables are assigned
-% locally. If \meta{seq~var} is empty the \meta{token list variable}
+% \meta{tl~var}. Both of the variables are assigned
+% locally. If \meta{seq~var} is empty the \meta{tl~var}
% is set to the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[updated = 2012-05-14]{\seq_gpop:NN, \seq_gpop:cN}
% \begin{syntax}
-% \cs{seq_gpop:NN} \meta{seq~var} \meta{token list variable}
+% \cs{seq_gpop:NN} \meta{seq~var} \meta{tl~var}
% \end{syntax}
% Pops the top item from a \meta{seq~var} into the
-% \meta{token list variable}. The \meta{seq~var} is modified globally,
-% while the \meta{token list variable} is assigned locally. If
-% \meta{seq~var} is empty the \meta{token list variable} is set to
+% \meta{tl~var}. The \meta{seq~var} is modified globally,
+% while the \meta{tl~var} is assigned locally. If
+% \meta{seq~var} is empty the \meta{tl~var} is set to
% the special marker \cs{q_no_value}.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]{\seq_get:NN, \seq_get:cN}
% \begin{syntax}
-% \cs{seq_get:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_get:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, stores the top item from a
-% \meta{seq~var} in the \meta{token list variable} without removing it from
-% the \meta{seq~var}. The \meta{token list variable} is assigned locally.
+% \meta{seq~var} in the \meta{tl~var} without removing it from
+% the \meta{seq~var}. The \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]{\seq_pop:NN, \seq_pop:cN}
% \begin{syntax}
-% \cs{seq_pop:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_pop:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the top item from the
-% \meta{seq~var} in the \meta{token list variable}, \emph{i.e.}~removes the
+% \meta{seq~var} in the \meta{tl~var}, \emph{i.e.}~removes the
% item from the \meta{seq~var}. Both the \meta{seq~var} and the
-% \meta{token list variable} are assigned locally.
+% \meta{tl~var} are assigned locally.
% \end{function}
%
% \begin{function}[TF, added = 2012-05-14, updated = 2012-05-19]{\seq_gpop:NN, \seq_gpop:cN}
% \begin{syntax}
-% \cs{seq_gpop:NNTF} \meta{seq~var} \meta{token list variable} \Arg{true code} \Arg{false code}
+% \cs{seq_gpop:NNTF} \meta{seq~var} \meta{tl~var} \Arg{true code} \Arg{false code}
% \end{syntax}
% If the \meta{seq~var} is empty, leaves the \meta{false code} in the
-% input stream. The value of the \meta{token list variable} is
+% input stream. The value of the \meta{tl~var} is
% not defined in this case and should not be relied upon. If the
% \meta{seq~var} is non-empty, pops the top item from the \meta{seq~var}
-% in the \meta{token list variable}, \emph{i.e.}~removes the item from the
+% in the \meta{tl~var}, \emph{i.e.}~removes the item from the
% \meta{seq~var}. The \meta{seq~var} is modified globally, while the
-% \meta{token list variable} is assigned locally.
+% \meta{tl~var} is assigned locally.
% \end{function}
%
% \begin{function}
@@ -2409,6 +2409,7 @@
\exp_after:wN \@@_map_pairwise_function:wNw #2 \s_@@_stop #3
#1 { ? \prg_break: } { }
\prg_break_point:
+ \prg_break_point:Nn \seq_map_break: { }
}
\cs_new:Npn \@@_map_pairwise_function:wNw \s_@@ #1 \s_@@_stop #2
{
diff --git a/macros/latex-dev/required/l3kernel/l3skip.dtx b/macros/latex-dev/required/l3kernel/l3skip.dtx
index 6e96b41326..2e15eb2866 100644
--- a/macros/latex-dev/required/l3kernel/l3skip.dtx
+++ b/macros/latex-dev/required/l3kernel/l3skip.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -124,7 +124,10 @@
% \end{function}
%
% \begin{function}[updated = 2011-10-22]
-% {\dim_set:Nn, \dim_set:cn, \dim_gset:Nn, \dim_gset:cn}
+% {
+% \dim_set:Nn, \dim_set:cn, \dim_set:NV, \dim_set:cV,
+% \dim_gset:Nn, \dim_gset:cn, \dim_gset:NV, \dim_gset:cV
+% }
% \begin{syntax}
% \cs{dim_set:Nn} \meta{dimension} \Arg{dim expr}
% \end{syntax}
@@ -277,7 +280,8 @@
% \end{syntax}
% This function evaluates the \meta{test dim expr} and
% compares this in turn to each of the
-% \meta{dim expr cases}. If the two are equal then the
+% \meta{dim expr case}s until a match is found.
+% If the two are equal then the
% associated \meta{code} is left in the input stream
% and other cases are discarded. If any of the
% cases are matched, the \meta{true code} is also inserted into the
@@ -297,6 +301,10 @@
% { No idea! }
% \end{verbatim}
% leaves \enquote{\texttt{Medium}} in the input stream.
+% Since evaluation of the test expressions stops at the first
+% successful case, the order of possible matches should normally
+% be that the most likely are earlier: this will reduce the average
+% steps required to complete expansion.
% \end{function}
%
% \section{Dimension expression loops}
@@ -752,7 +760,10 @@
% \end{function}
%
% \begin{function}[updated = 2011-10-22]
-% {\skip_set:Nn, \skip_set:cn, \skip_gset:Nn, \skip_gset:cn}
+% {
+% \skip_set:Nn, \skip_set:cn, \skip_set:NV, \skip_set:cV,
+% \skip_gset:Nn, \skip_gset:cn, \skip_gset:NV, \skip_gset:cV
+% }
% \begin{syntax}
% \cs{skip_set:Nn} \meta{skip} \Arg{skip expr}
% \end{syntax}
@@ -988,7 +999,10 @@
% \end{function}
%
% \begin{function}[updated = 2011-10-22]
-% {\muskip_set:Nn, \muskip_set:cn, \muskip_gset:Nn, \muskip_gset:cn}
+% {
+% \muskip_set:Nn, \muskip_set:cn, \muskip_set:Nn, \muskip_set:cn,
+% \muskip_gset:Nn, \muskip_gset:cn, \muskip_gset:NV, \muskip_gset:cV
+% }
% \begin{syntax}
% \cs{muskip_set:Nn} \meta{muskip} \Arg{muskip expr}
% \end{syntax}
@@ -1245,8 +1259,8 @@
%
% \subsection{Setting \texttt{dim} variables}
%
-% \begin{macro}{\dim_set:Nn, \dim_set:cn}
-% \begin{macro}{\dim_gset:Nn, \dim_gset:cn}
+% \begin{macro}{\dim_set:Nn, \dim_set:cn, \dim_set:NV, \dim_set:cV}
+% \begin{macro}{\dim_gset:Nn, \dim_gset:cn, \dim_gset:NV, \dim_gset:cV}
% Setting dimensions is easy enough but when debugging we want both to
% check that the variable is correctly local/global and to wrap the
% expression in some code. The \cs{scan_stop:} deals with the case
@@ -1257,8 +1271,8 @@
{ #1 = \@@_eval:w #2 \@@_eval_end: \scan_stop: }
\cs_new_protected:Npn \dim_gset:Nn #1#2
{ \tex_global:D #1 = \@@_eval:w #2 \@@_eval_end: \scan_stop: }
-\cs_generate_variant:Nn \dim_set:Nn { c }
-\cs_generate_variant:Nn \dim_gset:Nn { c }
+\cs_generate_variant:Nn \dim_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \dim_gset:Nn { NV , c , cV }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2208,16 +2222,16 @@
%
% \subsection{Setting \texttt{skip} variables}
%
-% \begin{macro}{\skip_set:Nn, \skip_set:cn}
-% \begin{macro}{\skip_gset:Nn, \skip_gset:cn}
+% \begin{macro}{\skip_set:Nn, \skip_set:cn, \skip_set:NV, \skip_set:cV}
+% \begin{macro}{\skip_gset:Nn, \skip_gset:cn, \skip_gset:NV, \skip_gset:cV}
% Much the same as for dimensions.
% \begin{macrocode}
\cs_new_protected:Npn \skip_set:Nn #1#2
{ #1 = \tex_glueexpr:D #2 \scan_stop: }
\cs_new_protected:Npn \skip_gset:Nn #1#2
{ \tex_global:D #1 = \tex_glueexpr:D #2 \scan_stop: }
-\cs_generate_variant:Nn \skip_set:Nn { c }
-\cs_generate_variant:Nn \skip_gset:Nn { c }
+\cs_generate_variant:Nn \skip_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \skip_gset:Nn { NV , c , cV }
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -2459,16 +2473,16 @@
%
% \subsection{Setting \texttt{muskip} variables}
%
-% \begin{macro}{\muskip_set:Nn, \muskip_set:cn}
-% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn}
+% \begin{macro}{\muskip_set:Nn, \muskip_set:cn, \muskip_set:NV, \muskip_set:cV}
+% \begin{macro}{\muskip_gset:Nn, \muskip_gset:cn, \muskip_gset:NV, \muskip_gset:cV}
% This should be pretty familiar.
% \begin{macrocode}
\cs_new_protected:Npn \muskip_set:Nn #1#2
{ #1 = \tex_muexpr:D #2 \scan_stop: }
\cs_new_protected:Npn \muskip_gset:Nn #1#2
{ \tex_global:D #1 = \tex_muexpr:D #2 \scan_stop: }
-\cs_generate_variant:Nn \muskip_set:Nn { c }
-\cs_generate_variant:Nn \muskip_gset:Nn { c }
+\cs_generate_variant:Nn \muskip_set:Nn { NV , c , cV }
+\cs_generate_variant:Nn \muskip_gset:Nn { NV , c , cV }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex-dev/required/l3kernel/l3sort.dtx b/macros/latex-dev/required/l3kernel/l3sort.dtx
index 47cebcad25..c599739d56 100644
--- a/macros/latex-dev/required/l3kernel/l3sort.dtx
+++ b/macros/latex-dev/required/l3kernel/l3sort.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3str-convert.dtx b/macros/latex-dev/required/l3kernel/l3str-convert.dtx
index baf705fe0c..1976b092b1 100644
--- a/macros/latex-dev/required/l3kernel/l3str-convert.dtx
+++ b/macros/latex-dev/required/l3kernel/l3str-convert.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -139,10 +139,10 @@
%
% \begin{function}{\str_set_convert:Nnnn, \str_gset_convert:Nnnn}
% \begin{syntax}
-% \cs{str_set_convert:Nnnn} \meta{str~var} \Arg{string} \Arg{name~1} \Arg{name~2}
+% \cs{str_set_convert:Nnnn} \meta{str~var} \Arg{string} \Arg{name_1} \Arg{name_2}
% \end{syntax}
% This function converts the \meta{string} from the encoding given by
-% \meta{name~1} to the encoding given by \meta{name~2}, and stores the
+% \meta{name_1} to the encoding given by \meta{name_2}, and stores the
% result in the \meta{str~var}. Each \meta{name} can have the form
% \meta{encoding} or \meta{encoding}\texttt{/}\meta{escaping}, where
% the possible values of \meta{encoding} and \meta{escaping} are given
@@ -177,14 +177,14 @@
%
% \begin{function}[TF]{\str_set_convert:Nnnn, \str_gset_convert:Nnnn}
% \begin{syntax}
-% \cs{str_set_convert:NnnnTF} \meta{str~var} \Arg{string} \Arg{name~1} \Arg{name~2} \Arg{true code} \Arg{false code}
+% \cs{str_set_convert:NnnnTF} \meta{str~var} \Arg{string} \Arg{name_1} \Arg{name_2} \Arg{true code} \Arg{false code}
% \end{syntax}
% As \cs{str_set_convert:Nnnn}, converts the \meta{string} from the
-% encoding given by \meta{name~1} to the encoding given by
-% \meta{name~2}, and assigns the result to \meta{str~var}. Contrarily
+% encoding given by \meta{name_1} to the encoding given by
+% \meta{name_2}, and assigns the result to \meta{str~var}. Contrarily
% to \cs{str_set_convert:Nnnn}, the conditional variant does not raise
% errors in case the \meta{string} is not valid according to the
-% \meta{name~1} encoding, or cannot be expressed in the \meta{name~2}
+% \meta{name_1} encoding, or cannot be expressed in the \meta{name_2}
% encoding. Instead, the \meta{false code} is performed.
% \end{function}
%
@@ -195,7 +195,7 @@
%
% \begin{function}[EXP]{\str_convert_pdfname:n}
% \begin{syntax}
-% \cs{str_convert_pdfname:n} \meta{string}
+% \cs{str_convert_pdfname:n} \Arg{string}
% \end{syntax}
% As \cs{str_set_convert:Nnnn}, converts the \meta{string} on a byte-by-byte
% basis with non-ASCII codepoints escaped using hashes.
diff --git a/macros/latex-dev/required/l3kernel/l3str.dtx b/macros/latex-dev/required/l3kernel/l3str.dtx
index f4f7b94b88..94a74b17d1 100644
--- a/macros/latex-dev/required/l3kernel/l3str.dtx
+++ b/macros/latex-dev/required/l3kernel/l3str.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -303,7 +303,8 @@
% ~~\Arg{false code}
% \end{syntax}
% Compares the \meta{test string} in turn with each
-% of the \meta{string case}s (all token lists are converted to strings).
+% of the \meta{string case}s until a match is found
+% (all token lists are converted to strings).
% If the two are equal (as described for
% \cs{str_if_eq:nnTF}) then the associated \meta{code} is left in the
% input stream and other cases are discarded. If any of the
@@ -557,7 +558,7 @@
% \end{function}
%
% \begin{function}[EXP, added = 2015-09-18]
-% {\str_item:Nn, \str_item:nn, \str_item_ignore_spaces:nn}
+% {\str_item:Nn, \str_item:cn, \str_item:nn, \str_item_ignore_spaces:nn}
% \begin{syntax}
% \cs{str_item:nn} \Arg{token list} \Arg{integer expression}
% \end{syntax}
@@ -757,7 +758,7 @@
% \item Case changing text for typesetting: see the
% \cs[index=text_lowercase:n]{text_lowercase:n(n)},
% \cs[index=text_uppercase:n]{text_uppercase:n(n)} and
-% \cs[index=text_titlecase_all:n]{text_titlecase_(all|once):n(n)} functions which
+% \cs[index=text_titlecase_all:n]{text_titlecase_(all|first):n(n)} functions which
% correctly deal with context-dependence and other factors appropriate
% to text case changing.
% \end{itemize}
@@ -789,7 +790,7 @@
% \end{quote}
% The folding approach implemented by \cs{str_casefold:n} follows the
% \enquote{full} scheme defined by the Unicode Consortium
-% (\emph{e.g.}~\SS folds to \texttt{SS}). As case-folding is
+% (\emph{e.g.}~\SS{} folds to \texttt{SS}). As case-folding is
% a language-insensitive process, there is no special treatment of
% Turkic input (\emph{i.e.}~\texttt{I} always folds to \texttt{i} and
% not to \texttt{\i}).
@@ -797,9 +798,9 @@
%
% \begin{function}[added = 2023-05-19, EXP]{\str_mdfive_hash:n, \str_mdfive_hash:e}
% \begin{syntax}
-% \cs{str_mdfive_hash:n} \Arg{tl}
+% \cs{str_mdfive_hash:n} \Arg{tokens}
% \end{syntax}
-% Expands to the MD5 sum generated from the \meta{tl}, which is converted
+% Expands to the MD5 sum generated from the \meta{tokens}, which is converted
% to a \meta{string} as described for \cs{tl_to_str:n}.
% \end{function}
%
diff --git a/macros/latex-dev/required/l3kernel/l3styleguide.pdf b/macros/latex-dev/required/l3kernel/l3styleguide.pdf
index 2142c73e77..3e78786fc3 100644
--- a/macros/latex-dev/required/l3kernel/l3styleguide.pdf
+++ b/macros/latex-dev/required/l3kernel/l3styleguide.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3styleguide.tex b/macros/latex-dev/required/l3kernel/l3styleguide.tex
index bcea3de06e..32395f1377 100644
--- a/macros/latex-dev/required/l3kernel/l3styleguide.tex
+++ b/macros/latex-dev/required/l3kernel/l3styleguide.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-11-02}
\begin{document}
diff --git a/macros/latex-dev/required/l3kernel/l3syntax-changes.pdf b/macros/latex-dev/required/l3kernel/l3syntax-changes.pdf
index a44d06c052..0818159036 100644
--- a/macros/latex-dev/required/l3kernel/l3syntax-changes.pdf
+++ b/macros/latex-dev/required/l3kernel/l3syntax-changes.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3syntax-changes.tex b/macros/latex-dev/required/l3kernel/l3syntax-changes.tex
index 30d8d47747..d86cba73d8 100644
--- a/macros/latex-dev/required/l3kernel/l3syntax-changes.tex
+++ b/macros/latex-dev/required/l3kernel/l3syntax-changes.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-11-02}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex-dev/required/l3kernel/l3sys.dtx b/macros/latex-dev/required/l3kernel/l3sys.dtx
index b2228c7fd9..4a600987da 100644
--- a/macros/latex-dev/required/l3kernel/l3sys.dtx
+++ b/macros/latex-dev/required/l3kernel/l3sys.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -336,9 +336,9 @@
% \begin{function}[added = 2024-03-08, updated = 2024-04-08]
% {\sys_get_query:nN, \sys_get_query:nnN, \sys_get_query:nnnN}
% \begin{syntax}
-% \cs{sys_get_query:nN} \Arg{cmd} \Arg{tl var}
-% \cs{sys_get_query:nnN} \Arg{cmd} \Arg{spec} \Arg{tl var}
-% \cs{sys_get_query:nnnN} \Arg{cmd} \Arg{options} \Arg{spec} \Arg{tl var}
+% \cs{sys_get_query:nN} \Arg{cmd} \meta{tl var}
+% \cs{sys_get_query:nnN} \Arg{cmd} \Arg{spec} \meta{tl var}
+% \cs{sys_get_query:nnnN} \Arg{cmd} \Arg{options} \Arg{spec} \meta{tl var}
% \end{syntax}
% Sets the \meta{tl var} to the information returned by the
% \texttt{l3sys-query} \meta{cmd}, potentially supplying the \meta{options}
@@ -374,11 +374,11 @@
% \begin{function}[added = 2024-03-08]
% {\sys_split_query:nN, \sys_split_query:nnN, \sys_split_query:nnnN}
% \begin{syntax}
-% \cs{sys_split_query:nN} \Arg{cmd} \Arg{seq}
-% \cs{sys_split_query:nnN} \Arg{cmd} \Arg{spec} \Arg{seq}
-% \cs{sys_split_query:nnnN} \Arg{cmd} \Arg{options} \Arg{spec} \Arg{seq}
+% \cs{sys_split_query:nN} \Arg{cmd} \meta{seq var}
+% \cs{sys_split_query:nnN} \Arg{cmd} \Arg{spec} \meta{seq var}
+% \cs{sys_split_query:nnnN} \Arg{cmd} \Arg{options} \Arg{spec} \meta{seq var}
% \end{syntax}
-% Works as described for \cs{sys_split_query:nnnN}, but sets the \meta{seq}
+% Works as described for \cs{sys_split_query:nnnN}, but sets the \meta{seq var}
% to contain one entry for each line returned by \texttt{l3sys-query}.
% This function should therefore be preferred where multi-line return is
% expected, e.g.~for the \texttt{ls} command.
@@ -1030,7 +1030,7 @@ end
% \begin{variable}{\c_sys_timestamp_str}
% A simple expansion: Lua\TeX{} chokes if we use \tn{pdffeedback} here,
% hence the direct use of Lua. Notice that the function there is in the
-% \texttt{pdf} library but isn actually tied to PDF.
+% \texttt{pdf} library but isn't actually tied to PDF.
% \begin{macrocode}
\@@_everyjob:n
{
diff --git a/macros/latex-dev/required/l3kernel/l3term-glossary.pdf b/macros/latex-dev/required/l3kernel/l3term-glossary.pdf
index 6d014af4e7..9a8b1ecba2 100644
--- a/macros/latex-dev/required/l3kernel/l3term-glossary.pdf
+++ b/macros/latex-dev/required/l3kernel/l3term-glossary.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/l3term-glossary.tex b/macros/latex-dev/required/l3kernel/l3term-glossary.tex
index 141749aa6b..cb01e6f812 100644
--- a/macros/latex-dev/required/l3kernel/l3term-glossary.tex
+++ b/macros/latex-dev/required/l3kernel/l3term-glossary.tex
@@ -32,7 +32,7 @@ The released version of this bundle is available from CTAN.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-11-02}
\newcommand{\TF}{\textit{(TF)}}
diff --git a/macros/latex-dev/required/l3kernel/l3text-case.dtx b/macros/latex-dev/required/l3kernel/l3text-case.dtx
index 89cdb9e2b1..a9847bf900 100644
--- a/macros/latex-dev/required/l3kernel/l3text-case.dtx
+++ b/macros/latex-dev/required/l3kernel/l3text-case.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3text-map.dtx b/macros/latex-dev/required/l3kernel/l3text-map.dtx
index 3573002244..52e304ec15 100644
--- a/macros/latex-dev/required/l3kernel/l3text-map.dtx
+++ b/macros/latex-dev/required/l3kernel/l3text-map.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3text-purify.dtx b/macros/latex-dev/required/l3kernel/l3text-purify.dtx
index 35390811aa..8163fead6a 100644
--- a/macros/latex-dev/required/l3kernel/l3text-purify.dtx
+++ b/macros/latex-dev/required/l3kernel/l3text-purify.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3text.dtx b/macros/latex-dev/required/l3kernel/l3text.dtx
index bcfd15cb62..559bc158ae 100644
--- a/macros/latex-dev/required/l3kernel/l3text.dtx
+++ b/macros/latex-dev/required/l3kernel/l3text.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -65,11 +65,11 @@
% \end{syntax}
% Takes user input \meta{text} and expands the content.
% Protected commands (typically
-% formatting) are left in place, and no processing takes place of
+% formatting) are left in place, and no processing of
% math mode material (as delimited by pairs given in
% \cs{l_text_math_delims_tl} or as the argument to commands listed
-% in \cs{l_text_math_arg_tl}). Commands which are neither engine-
-% nor \LaTeX{} protected are expanded exhaustively.
+% in \cs{l_text_math_arg_tl}) takes place. Commands which are neither engine-
+% nor \LaTeX{}-protected are expanded exhaustively.
% Any commands listed in \cs{l_text_expand_exclude_tl} are excluded from
% expansion, as are those in \cs{l_text_case_exclude_arg_tl} and
% \cs{l_text_math_arg_tl}.
@@ -114,8 +114,8 @@
% \end{function}
%
% Upper- and lowercase have the obvious meanings. Titlecasing may be regarded
-% informally as converting the first character of the \meta{tokens} to
-% uppercase. However, the process is more complex
+% informally as converting the first \emph{non-space} character of the
+% \meta{tokens} to uppercase. However, the process is more complex
% than this as there are some situations where a single lowercase character
% maps to a special form, for example \texttt{ij} in Dutch which becomes
% \texttt{IJ}. There are two functions available for titlecasing: one which
@@ -214,8 +214,9 @@
% \text_declare_uppercase_mapping:nnn
% }
% \begin{syntax}
-% \cs{text_declare_lowercase_mapping:nn} \Arg{codeppoint} \Arg{replacement}
-% \cs{text_declare_lowercase_mapping:nnn} \Arg{BCP-47} \Arg{codeppoint} \Arg{replacement}
+% \cs{text_declare_lowercase_mapping:nn} \Arg{codepoint} \Arg{replacement}
+% \cs{text_declare_lowercase_mapping:nnn} \Arg{BCP-47} \Arg{codepoint} \\
+% ~~\Arg{replacement}
% \end{syntax}
% Declares that the \meta{replacement} tokens should be used when case mapping
% the \meta{codepoint}, rather than the standard mapping given in the
@@ -305,7 +306,7 @@
%
% \begin{function}[rEXP, added = 2022-08-04]{\text_map_function:nN}
% \begin{syntax}
-% \cs{text_map_function:nN} \meta{text} \Arg{function}
+% \cs{text_map_function:nN} \Arg{text} \meta{function}
% \end{syntax}
% Takes user input \meta{text} and expands as described for
% \cs{text_expand:n}, then maps over the \emph{graphemes} within the
@@ -323,7 +324,7 @@
%
% \begin{function}[added = 2022-08-04]{\text_map_inline:nn}
% \begin{syntax}
-% \cs{text_map_inline:nn} \meta{text} \Arg{inline function}
+% \cs{text_map_inline:nn} \Arg{text} \Arg{inline function}
% \end{syntax}
% Takes user input \meta{text} and expands as described for
% \cs{text_expand:n}, then maps over the \emph{graphemes} within the
diff --git a/macros/latex-dev/required/l3kernel/l3tl-analysis.dtx b/macros/latex-dev/required/l3kernel/l3tl-analysis.dtx
index 4df9ee68a3..d3342eb876 100644
--- a/macros/latex-dev/required/l3kernel/l3tl-analysis.dtx
+++ b/macros/latex-dev/required/l3kernel/l3tl-analysis.dtx
@@ -44,7 +44,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3tl-build.dtx b/macros/latex-dev/required/l3kernel/l3tl-build.dtx
index 6cd9822ad2..e3c615f5b2 100644
--- a/macros/latex-dev/required/l3kernel/l3tl-build.dtx
+++ b/macros/latex-dev/required/l3kernel/l3tl-build.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
diff --git a/macros/latex-dev/required/l3kernel/l3tl.dtx b/macros/latex-dev/required/l3kernel/l3tl.dtx
index 71d68d532c..3d08f2354b 100644
--- a/macros/latex-dev/required/l3kernel/l3tl.dtx
+++ b/macros/latex-dev/required/l3kernel/l3tl.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -55,7 +55,7 @@
% \begin{verbatim}
% \foo:n { a collection of \tokens }
% \end{verbatim}
-% or may be stored in a so-called \enquote{token list variable}, which
+% or may be stored in a so-called \enquote{tl~var} (\meta{tl~var}), which
% have the suffix \texttt{tl}: a token list variable can also be used as
% the argument to a function, for example
% \begin{verbatim}
@@ -1110,7 +1110,7 @@
%
% Within token lists, replacement takes place at the top level: there is
% no recursion into brace groups (more precisely, within a group defined by
-% a categroy code $1$/$2$ pair).
+% a category code $1$/$2$ pair).
%
% \begin{function}[updated = 2011-08-11]
% {
diff --git a/macros/latex-dev/required/l3kernel/l3token.dtx b/macros/latex-dev/required/l3kernel/l3token.dtx
index 03bf46b101..8dc792cab5 100644
--- a/macros/latex-dev/required/l3kernel/l3token.dtx
+++ b/macros/latex-dev/required/l3kernel/l3token.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -660,7 +660,10 @@
% \cs{token_if_long_macro_p:N} \meta{token} \\
% \cs{token_if_long_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token} is a long macro.
+% Tests if the \meta{token} is a long macro with no other prefix; to
+% test for a macro that is both long and protected, use
+% \cs[index = token_if_protected_long_macro:NTF]^^A
+% {token_if_protected_long_macro:N(TF)}.
% \end{function}
%
% \begin{function}[EXP,pTF, updated=2012-01-20]{\token_if_protected_macro:N}
@@ -668,8 +671,10 @@
% \cs{token_if_protected_macro_p:N} \meta{token} \\
% \cs{token_if_protected_macro:NTF} \meta{token} \Arg{true code} \Arg{false code}
% \end{syntax}
-% Tests if the \meta{token} is a protected macro: for a macro which
-% is both protected and long this returns \texttt{false}.
+% Tests if the \meta{token} is a protected macro with no other prefix; to
+% test for a macro that is both protected and long, use
+% \cs[index = token_if_protected_long_macro:NTF]^^A
+% {token_if_protected_long_macro:N(TF)}.
% \end{function}
%
% \begin{function}[EXP,pTF, updated=2012-01-20]{\token_if_protected_long_macro:N}
@@ -776,7 +781,7 @@
% ~~\Arg{false code}
% \end{syntax}
% This function compares the \meta{test token} in turn with each of
-% the \meta{token cases}. If the two are equal (as described for
+% the \meta{token case}s. If the two are equal (as described for
% \cs{token_if_eq_catcode:NNTF}, \cs{token_if_eq_charcode:NNTF} and
% \cs{token_if_eq_meaning:NNTF}, respectively) then the associated
% \meta{code} is left in the input stream and other cases are
diff --git a/macros/latex-dev/required/l3kernel/l3unicode.dtx b/macros/latex-dev/required/l3kernel/l3unicode.dtx
index 179817d490..5708992806 100644
--- a/macros/latex-dev/required/l3kernel/l3unicode.dtx
+++ b/macros/latex-dev/required/l3kernel/l3unicode.dtx
@@ -43,7 +43,7 @@
% }^^A
% }
%
-% \date{Released 2024-05-27}
+% \date{Released 2024-11-02}
%
% \maketitle
%
@@ -719,15 +719,22 @@
\tl_set:ce { l_@@_ #1 _block_tl }
{ \int_eval:n { \tl_use:c { l_@@_ #1 _block_tl } + 1 } }
}
- \prg_replicate:nn {#2}
+% \end{macrocode}
+% Here, we avoid \cs{prg_replicate:nn} as the number of tokens generated would be
+% high: that shows in the format dump (although \TeX{} recovers memory during
+% the subsequent runs).
+% \begin{macrocode}
+ \int_step_inline:nnn
+ { \tl_use:c { l_@@_ #1 _pos_tl } + 1 }
+ { \tl_use:c { l_@@_ #1 _pos_tl } + #2 }
{
- \tl_set:ce { l_@@_ #1 _pos_tl }
- { \int_eval:n { \tl_use:c { l_@@_ #1 _pos_tl } + 1 } }
\exp_args:Nc \__kernel_intarray_gset:Nnn
{ g_@@_ #1 _index_intarray }
- { \tl_use:c { l_@@_ #1 _pos_tl } }
+ {##1}
\l_@@_matched_block_tl
}
+ \tl_set:ce { l_@@_ #1 _pos_tl }
+ { \int_eval:n { \tl_use:c { l_@@_ #1 _pos_tl } + #2 } }
\clist_clear:c { l_@@_ #1 _block_clist }
}
% \end{macrocode}
diff --git a/macros/latex-dev/required/l3kernel/source3.pdf b/macros/latex-dev/required/l3kernel/source3.pdf
index b0795ec6c1..d78e72b9da 100644
--- a/macros/latex-dev/required/l3kernel/source3.pdf
+++ b/macros/latex-dev/required/l3kernel/source3.pdf
Binary files differ
diff --git a/macros/latex-dev/required/l3kernel/source3.tex b/macros/latex-dev/required/l3kernel/source3.tex
index 00095ad319..08d3319b5e 100644
--- a/macros/latex-dev/required/l3kernel/source3.tex
+++ b/macros/latex-dev/required/l3kernel/source3.tex
@@ -57,7 +57,7 @@ for those people who are interested.
{latex-team@latex-project.org}%
}%
}
-\date{Released 2024-05-27}
+\date{Released 2024-11-02}
\pagenumbering{roman}
\maketitle
diff --git a/macros/latex-dev/required/l3kernel/source3body.tex b/macros/latex-dev/required/l3kernel/source3body.tex
index 8471296227..44b67816d6 100644
--- a/macros/latex-dev/required/l3kernel/source3body.tex
+++ b/macros/latex-dev/required/l3kernel/source3body.tex
@@ -285,7 +285,7 @@ pass it to |\foo:N|.
Variables are named in a similar manner to functions, but begin with
a single letter to define the type of variable:
-\begin{description}
+\begin{description}[leftmargin=2\parindent, labelindent*=-\parindent]
\item[\texttt{c}] Constant: global parameters whose value should not
be changed.
\item[\texttt{g}] Parameters whose value should only be set globally.
@@ -302,7 +302,7 @@ function, typically starting with the module\footnote{The module names are
\texttt{\string\l_int_tmpa_int} would be very unreadable.} name
and then a descriptive part.
Variables end with a short identifier to show the variable type:
-\begin{description}%
+\begin{description}[leftmargin=2\parindent, labelindent*=-\parindent]
\item[\texttt{bitset}] a set of bits (a string made up of a series of \texttt{0}
and \texttt{1} tokens that are accessed by position).
\item[\texttt{clist}] Comma separated list.
@@ -318,7 +318,7 @@ Variables end with a short identifier to show the variable type:
Applying \texttt{V}-type or \texttt{v}-type expansion to variables of
one of the above types is supported, while it is not supported for the
following variable types:
-\begin{description}
+\begin{description}[leftmargin=2\parindent, labelindent*=-\parindent]
\item[\texttt{bool}] Either true or false.
\item[\texttt{box}] Box register.
\item[\texttt{coffin}] A \enquote{box with handles} --- a higher-level
@@ -344,6 +344,19 @@ are never used by the core code. The nature of \TeX{} grouping means that as
with any other scratch variable, these should only be set and used with no
intervening third-party code.
+There are two more special types of constants:
+\begin{description}[leftmargin=2\parindent, labelindent*=-\parindent]
+ \item[\texttt{q}] Quark constants.
+ \item[\texttt{s}] Scan mark constants.
+\end{description}
+Similarly, each quark or scan mark name starts with the module name,
+but doesn't end with a variable type, because the type is already
+marked by the prefix \texttt{q} or \texttt{s}.
+Some general quarks and scan marks provided by \LaTeX3 don't start
+with a module name, for example \cs{s_stop}.
+See documentation of quarks and scan marks in Chapter~\ref{sec:l3quarks}
+for more info.
+
\subsection{Terminological inexactitude}
A word of warning. In this document, and others referring to the \pkg{expl3}
diff --git a/macros/latex-dev/required/latex-lab/README.md b/macros/latex-dev/required/latex-lab/README.md
index fb930aa965..66bc30af6f 100644
--- a/macros/latex-dev/required/latex-lab/README.md
+++ b/macros/latex-dev/required/latex-lab/README.md
@@ -1,6 +1,6 @@
# LaTeX laboratory
-Release 2024-11-01 pre-release 0
+Release 2025-06-01 pre-release 0
## Overview
diff --git a/macros/latex-dev/required/latex-lab/blocks-code.pdf b/macros/latex-dev/required/latex-lab/blocks-code.pdf
index a5d58887f2..60623a63de 100644
--- a/macros/latex-dev/required/latex-lab/blocks-code.pdf
+++ b/macros/latex-dev/required/latex-lab/blocks-code.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/blocks-doc.pdf b/macros/latex-dev/required/latex-lab/blocks-doc.pdf
index e62b76f5e3..7e75622f6b 100644
--- a/macros/latex-dev/required/latex-lab/blocks-doc.pdf
+++ b/macros/latex-dev/required/latex-lab/blocks-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/changes.txt b/macros/latex-dev/required/latex-lab/changes.txt
index cd53086b2b..35c77075d6 100644
--- a/macros/latex-dev/required/latex-lab/changes.txt
+++ b/macros/latex-dev/required/latex-lab/changes.txt
@@ -1,12 +1,154 @@
+2024-10-25 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-math.dtx: reorganized luamml and mathml options
+ to support also structure elements and extended the documentation. Corrected
+ handling of alt-texts. Added examples for the various options.
+
+2024-10-16 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-firstaid.dtx: correct amsthm firstaid (tagging/733),
+ remove now unneeded code for cleveref.
+
+2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org>
+ * latex-lab-math.dtx: Sync with protected-begin status
+
+2024-10-11 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-toc.dtx, latex-lab-sec.dtx, latex-lab-toc-kernel-changes: move target
+ handling (\MakeLinkTarget patches) into the kernel.
+
+2024-10-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex-lab-block.dtx (subsubsection{verse environment}):
+ Update \@itemlabel in \l_@@_legacy_env_params_tl and not at the start of
+ the environment (tagging/730)
+
+ Set the defaults for \@itemlabel, \@listctr and @nmbrlist early in the
+ block code before the setup code gets executed (tagging/730)
+
+ (subsubsection{Implementation of list templates ...):
+ Correct logic for setting up the list counter (tagging/730)
+
+2024-10-04 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-firstaid.dtx: add first support for fancyvrb environments.
+
+2024-10-04 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-sec.dtx (subsection{Sockets}):
+ add missing braces around optional arg (tagging/725)
+
+2024-10-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * latex-lab-block.dtx (subsubsection{Implementation of list templates ...}):
+ Pass user keys on list to \item for evaluation
+
+2024-10-02 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-math.dtx (subsection{Sockets}):
+ disable paratagging in inline math (tagging/711)
+
+2024-09-30 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-footnotes.dtx: remove unneeded NonStruct structure.
+
+2024-09-30 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * latex-lab-math.dtx (subsection{Content grabbing}):
+ Correct logic for inserting below skips after displays (tagging/721)
+
+2024-09-26 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-firstaid.dtx: add support for theorems declared with
+ amsthm, amsart, amsbook, amsproc.
+
+2024-09-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-sec.dtx,latex-lab-footnotes.dtx:
+ correct and improve footnotes in longtable
+
+2024-09-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-toc.dtx,latex-lab-footnotes.dtx: adapt Ref handling to tagpdf 0.99f
+
+2024-09-18 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-amsmath.dtx,latex-lab-graphic.dtc,
+ latex-lab-marginpar.dtx,latex-lab-math.dtx,latex-lab-mathtools.dtx,
+ latex-lab-minipage.dtx,latex-lab-sec.dtx,latex-lab-table.dtx,latex-lab-text.dtx:
+ switch to \tag_suspend:n and \tag_resume:n
+
+2024-09-17 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-float.dtx: switch to tagging sockets
+
+2024-09-13 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * documentmetadata-support.dtx: change warning to error if pdfstandard is unknown,
+ see https://github.com/latex3/pdfresources/issues/77#issuecomment-2329522654.
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * documentmetadata-support.dtx: switch to T1 encoding by default for non-Unicode
+ engines.
+
+2024-09-02 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * latex-lab-block.dtx (subsubsection{List tags}):
+ Do not close LI and LBody if they were never opened because of a
+ missing \item (issue tagging/641)
+
+ (subsubsection{Implementation of \cs{item} template(s)}):
+ Set @newlist to false after the first \item (issue tagging/36)
+
+ Call \@noitemerr in para/begin hook if hmode is started before
+ the first item
+
+ (subsubsection{Implementation of block templates \ldots}):
+ Drop \@noitemerr from \addvspace and \addpenalty
+
+2024-08-29 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-math.dtx: avoid loosing math if tagging is suspended,
+ tagging-project issue #661
+
+2024-08-22 Joseph Wright <Joseph.Wright@latex-project.org>
+ * latex-lab-math.dtx: correct handling of empty math processing
+
+2024-08-21 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-math.dtx: correct luamml patches for array,
+ allow to use luamml without unicode-math
+
+2024-08-14 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-math.dtx: add luamml support for automatic mathml generation
+
+2024-08-12 Joseph Wright <Joseph.Wright@latex-project.org>
+ * latex-lab-math.dtx: add support for math in tabulars
+
+2024-08-11 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-firstaid.dtx: amsproc support, discussion in PR #517
+
+2024-08-11 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-block.dtx: preset verbatim para-instance, issue #119
+
+2024-08-10 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-block.dtx, latex-lab-table.dtx: reset flattened level in para/restore, issue #544
+
+2024-08-08 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-minipage.dtx, latex-lab-table.dtx: improve support for minipage in tables.
+ handle issue #37
+
+2024-08-06 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-table.dtx: add support for header-columns
+ * latex-lab-table.dtx: add support for multirows
+ * latex-lab-table.dtx: handle issue #432
+ * latex-lab-marginpar.dtx: handle issue #444
+
+2024-07-11 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-footnote.dtx: restore paragraph defaults at the begin of the footnote
+ tagging-project#262
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex-lab-table.dtx (subsection{Tagging support sockets}):
+ add plugs for tbl/leaders/begin and /end
+ (subsection{Misc stuff}): drop unused socket
+
+2024-07-11 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * latex-lab-toc.dtx, latex-lab-toc-kernel-changes: switch from configuration points
+ to sockets.
+
2024-05-25 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
* latex-lab-table.dtx: disable table headers in presentation tables.
2024-05-25 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
- * latex-lab-firstaid.dtx: add firstaid for booktabs cmidrules,
+ * latex-lab-firstaid.dtx: add firstaid for booktabs cmidrules,
see tagging-issue 69.
2024-04-18 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
- * documentmetadata-support.dtx: change handling of default language.
+ * documentmetadata-support.dtx: change handling of default language.
The code now tries to detect languages set by babel/polyglossia.
2024-04-16 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
diff --git a/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf b/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf
index bc995e7cce..8d04289fae 100644
--- a/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf
+++ b/macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf b/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf
index 9466a187ff..316250b84a 100644
--- a/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf
+++ b/macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx b/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx
index a629d9c551..6752e8098a 100644
--- a/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx
+++ b/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx
@@ -18,8 +18,8 @@
% for those people who are interested or want to report an issue.
%
% \begin{macrocode}
-\def\documentmetadatasupportversion{1.0h}
-\def\documentmetadatasupportdate{2024-03-26}
+\def\documentmetadatasupportversion{1.0j}
+\def\documentmetadatasupportdate{2024-09-13}
% \end{macrocode}
%
%
@@ -314,6 +314,19 @@
{ \tl_new:N \g_@@_testphase_tl }
% \end{macrocode}
% \end{variable}
+%
+% \subsection{Kernel changes with \cs{DocumentMetadata}}
+% \begin{macro}{\@kernel@before@DocumentMetadata}
+% \begin{macrocode}
+\cs_new_protected:Npn \@kernel@before@DocumentMetadata
+ {
+ \ifx\Umathcode\@undefined
+ \fontencoding{T1}
+ \renewcommand\encodingdefault{T1}
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
% \subsection{\cs{DocumentMetadata}}
%
@@ -330,6 +343,10 @@
{ \msg_error:nn { meta } { after-class } }
{
% \end{macrocode}
+% Load general format changes
+% \begin{macrocode}
+ \@kernel@before@DocumentMetadata
+% \end{macrocode}
%
% The wanted backend must be detected first, we read the init
% key and then force the loading of the backend.
@@ -481,7 +498,7 @@
}
,_pdfstandard / unknown .code:n =
{
- \msg_warning:nnn{pdf}{unknown-standard}{#1}
+ \msg_error:nnn{pdf}{unknown-standard}{#1}
}
,testphase .multichoice:
,testphase / tagpdf .code:n =
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx
index 57e27067cb..8591b39b39 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.dtx
@@ -66,7 +66,7 @@
% \subsection{File declaration}
% \begin{macrocode}
\ProvidesFile{latex-lab-amsmath.ltx}
- [2024-02-12 v0.1b amsmath adaptions]
+ [2024-09-18 v0.1c amsmath adaptions]
% \end{macrocode}
% \subsection{Tagpdf support}
% To make the code independent from tagging being loaded and active
@@ -99,7 +99,7 @@
% \end{macrocode}
% Stop tagging when measuring:
% \begin{macrocode}
- \ifmeasuring@\tag_stop:\fi
+ \ifmeasuring@\tag_suspend:n{\measuring}\fi
\normalbaselines
\ifdim\linewidth=\columnwidth
\else \parshape\@ne \@totalleftmargin \linewidth
@@ -174,7 +174,7 @@
\def\text@#1
{{
\int_gincr:N\g__math_mathchoice_int
- \tag_stop:
+ \tag_suspend:n{\text@}
\mathchoice
{
\@@_tag_if_mathstyle:en{mathchoice-\int_use:N\g__math_mathchoice_int}{0}
@@ -200,8 +200,8 @@
% \end{macrocode}
%
% \subsection{\cs{pmb}}
-% \cs{pmb} prints is argument three times. For tagging we must mark
-% two of occurences as artifact.
+% \cs{pmb} prints its argument three times. For tagging we must mark
+% two of occurrences as artifact.
% For luatex the attributes in the box must be reset, for this
% we switch to expl3-boxes.
% \begin{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf
index 794d259d4c..d50132e367 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-amsmath.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx b/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx
index e8ee192a7b..9d336aba20 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-bib.dtx
@@ -16,7 +16,7 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabbibdate{2024-02-12}
+\def\ltlabbibdate{2024-07-05}
\def\ltlabbibversion{0.81b}
%<*driver>
\documentclass{l3doc}
@@ -128,7 +128,7 @@
%
% \begin{function}{\@extra@binfo,\@extra@b@citeb}
%
-% These are taken from hyperref, they are for chapterbib compability (and also
+% These are taken from hyperref, they are for chapterbib compatibility (and also
% signal to chapterbib not to change the citation commands)
% \end{function}
%
@@ -157,7 +157,7 @@
% \end{macrocode}
% \begin{macro}{\@extra@binfo,\@extra@b@citeb}
-% These are taken from hyperref, they are for chapterbib compability (and also
+% These are taken from hyperref, they are for chapterbib compatibility (and also
% signal to chapterbib not to change the citation commands)
% \begin{macrocode}
\providecommand*\@extra@binfo{}%
@@ -270,7 +270,7 @@
% \end{macrocode}
% Now we add the tagging structure.
% TODO: with the next tagpdf version it should no longer be
-% needed to exand the ref key.
+% needed to expand the ref key.
% \begin{macrocode}
\AddToHookWithArguments{bibcite/before}
{
@@ -305,7 +305,7 @@
% We need in part different code for both systems:
% with biblatex we have to take care that only the first
% structure sets a label, and if
-% hyperref is not loaded (or deactived) we will need additional code
+% hyperref is not loaded (or deactivated) we will need additional code
% but this currently doesn't exist.
% We assume that no document loads both package -- that will probably break.
% \begin{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf b/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf
index 7eb16beaf9..98add81cad 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-bib.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-block.dtx b/macros/latex-dev/required/latex-lab/latex-lab-block.dtx
index 7d08b270d2..74d68c495a 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-block.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-block.dtx
@@ -9,8 +9,8 @@
%
% https://www.latex-project.org/lppl.txt
%
-\def\ltlabblockdate{2024-03-23}
-\def\ltlabblockversion{0.8n}
+\def\ltlabblockdate{2024-10-11}
+\def\ltlabblockversion{0.8v}
%<*driver>
\documentclass[kernel]{l3doc}
\usepackage{amstext}
@@ -331,6 +331,8 @@
% \TemplateKey{par-skip}{skip}{}{\cs{parsep}}
% \TemplateKey{end-skip}{skip}{}{\valuefrom{beginsep}}
% \TemplateKey{end-par-skip}{skip}{}{\valuefrom{begin-par-skip}}
+% \TemplateKey{item-skip}{skip}{The space in front of an item if the
+% block is a list; if not the setting has no effect}{\cs{itemsep}}
% \TemplateKey{beginpenalty}{integer}{}{\cs{@beginparpenalty}}
% \TemplateKey{endpenalty}{integer}{}{\cs{@endparpenalty}}
% \TemplateKey{leftmargin}{length}{}{\cs{leftmargin}}
@@ -341,7 +343,7 @@
%
% The idea of a \key{heading} key needs some further
% thoughts. Maybe instead the object type should accept a second
-% argument and receive input for such a headding from the document
+% argument and receive input for such a heading from the document
% level instead.
%
% The names of the keys need further thoughts and some
@@ -390,7 +392,7 @@
% {Instance of type \texttt{item} to be used to format
% the label string}{basic}
% \TemplateKey{item-skip}{skip}{The space in front of an item in the
-% list.\fmi{May need to be on a different template level}}{\cs{itemsep}}
+% list. If not specified the value specified in the block template instance is used}{}
% \TemplateKey{item-indent}{length}{Horizontal displacement of the item.}{0pt}
% \TemplateKey{item-penalty}{integer}
% {Penalty for breaking before an
@@ -474,7 +476,7 @@
% \>\>\> The paragraph text before the display element \ldots\\
% \>\> \struct{/text}\\
% \>\> \struct{display element structure}\\
-% \>\>\> Content of the display structure possiblly involving inner \struct{text-unit} tags\\
+% \>\>\> Content of the display structure possibly involving inner \struct{text-unit} tags\\
% \>\> \struct{/display element structure}\\
% \>\> \struct{text}\\
% \>\>\> \ldots{} continuing the outer paragraph text\\
@@ -722,7 +724,7 @@
blockenv implementation]
% \end{macrocode}
%
-% Generell kernel changes, also loaded by the sec and toc code.
+% General kernel changes, also loaded by the sec and toc code.
% \begin{macrocode}
\RequirePackage{latex-lab-kernel-changes}
% \end{macrocode}
@@ -756,8 +758,9 @@
%
%
%
-% \begin{macro}{\@doendpe}
+% \begin{macro}{\@doendpe,\__kernel_displayblock_doendpe:}
% The original \LaTeXe{} command is augmented to allow for tagging.
+% TODO: use sockets for this and move to the kernel eventually.
% \begin{macrocode}
\def\@doendpe{\@endpetrue
\def\par
@@ -792,15 +795,10 @@
% \begin{macrocode}
\cs_new_eq:NN \__kernel_displayblock_doendpe: \prg_do_nothing:
% \end{macrocode}
-% The flag itself should be set globally not locally.\fmi{verify
-% that this claim is actually correct!}
-% \begin{macrocode}
-\def\@endpetrue {\global\let\if@endpe\iftrue}
-\def\@endpefalse{\global\let\if@endpe\iffalse}
-% \end{macrocode}
-% \end{macro}
%
%
+% \end{macro}
+%
%
% \subsection{Object and template interfaces}
%
@@ -847,6 +845,7 @@
%
% \begin{template}{block display}
%
+% \changes{v0.8s}{2024/10/03}{Offer item-skip key also on block templates}
% \begin{macrocode}
\DeclareTemplateInterface{block}{display}{1}
{
@@ -856,6 +855,7 @@
par-skip : skip = \parsep ,
end-skip : skip = \KeyValue{beginsep} , % conflict with name below
end-par-skip : skip = \KeyValue{begin-par-skip} ,
+ item-skip : skip = \itemsep ,
beginpenalty : integer = \UseName{@beginparpenalty} ,
endpenalty : integer = \UseName{@endparpenalty} ,
leftmargin : length = \leftmargin ,
@@ -1269,9 +1269,15 @@
% We do this by storing them away and then call the list
% instance. Inside this instance the \texttt{setup-code} key
% contains \cs{legacylistsetupcode}, which makes use of the stored values.
+% \changes{v0.8v}{2024/10/11}{Update \cs{@itemlabel} in
+% \cs{l_@@_legacy_env_params_tl} and not at the start of the
+% environment (tagging/730)}
% \begin{macrocode}
- \tl_set:Nn \@itemlabel {#2}
- \tl_set:Nn \l_@@_legacy_env_params_tl {#3}
+ \tl_set:Nn \l_@@_legacy_env_params_tl
+ {
+ \tl_set:Nn \@itemlabel {#2}
+ #3
+ }
% \end{macrocode}
%
% \begin{macrocode}
@@ -1285,14 +1291,6 @@
%
%
%
-% \begin{variable}{\l_@@_env_params_tl}
-% Declare the variable for the parameter argument; \cs{@itemlabel}
-% is already declared in \LaTeXe{}.
-% \begin{macrocode}
-\tl_new:N \l_@@_env_params_tl
-% \end{macrocode}
-% \end{variable}
-%
%
% \begin{macro}{\legacylistsetupcode}
%
@@ -1308,10 +1306,14 @@
\dim_zero:N \itemindent
% \end{macrocode}
%
-% By default a \env{list} environment is not numbered:
+% By default a \env{list} environment is not numbered, but this
+% happens already in the block template.
+% \changes{v0.8v}{2024/10/11}{Set the defaults for \cs{@itemlabel},
+% \cs{@listctr} and \texttt{@nmbrlist} early in the block code
+% before the setup code gets executed (tagging/730)}
% \begin{macrocode}
- \tl_set:Nn \@listctr {}
- \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested
+% \tl_set:Nn \@listctr {}
+% \legacy_if_set_false:n { @nmbrlist } % needed if lists are nested
% \end{macrocode}
% By default there is a simple definition for \cs{makelabel}. It can be
% overwritten in the second mandatory argument to the list
@@ -1569,7 +1571,7 @@
% \end{macrocode}
% We need to know later if we have nested blockenvs inside
% a flattened environment. Whenever we start a new blockenv we
-% increment \cs{\l_@@_flattened_level_int} if it is already
+% increment \cs{l__tag_block_flattened_level_int} if it is already
% different from zero. If it is zero we increment it if flattening
% is requested.
% Thus a value of \texttt{0} means no flattening requested so far
@@ -1578,14 +1580,14 @@
% is surrounded by a \texttt{text-unit} tag, while for any value above
% \texttt{1} we have to omit the \texttt{text-unit}.
% \begin{macrocode}
- \int_compare:nNnTF \l_@@_flattened_level_int > 0
+ \int_compare:nNnTF \l__tag_block_flattened_level_int > 0
{
- \int_incr:N \l_@@_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
{
\bool_if:NT \l__tag_para_flattened_bool
{
- \int_incr:N \l_@@_flattened_level_int
+ \int_incr:N \l__tag_block_flattened_level_int
}
}
%
@@ -1623,6 +1625,23 @@
% \begin{macrocode}
\tag_if_active:T { \use:c { @@_recipe_ \l_@@_tagging_recipe_tl : } }
% \end{macrocode}
+% The default for \env{list} environments is that they have an
+% empty label and are not numbered (something that is then
+% overwritting by the setup of a specific list). We ensure
+% this here even for non-lists, because we need a defined state
+% that then can be overwritting by the legacy setup code for
+% the \env{list} environment in \cs{l_@@_setup_code_tl}.
+% This is needed in case lists are nested as they otherwise would
+% inherit outer values (and suddenly an \env{itemize} would start
+% incrementing an outer \env{enumerate} counter, etc.
+% \changes{v0.8v}{2024/10/11}{Set the defaults for \cs{@itemlabel},
+% \cs{@listctr} and \texttt{@nmbrlist} early in the block code
+% before the setup code gets executed (tagging/730)}
+% \begin{macrocode}
+ \tl_clear:N \@itemlabel
+ \tl_clear:N \@listctr
+ \legacy_if_set_false:n { @nmbrlist }
+% \end{macrocode}
% Then run the setup code if any is given in the instance.
% \begin{macrocode}
\l_@@_setup_code_tl
@@ -1681,11 +1700,15 @@
% \end{template}
%
%
-% \begin{macro}{\l_@@_flattened_level_int}
+% \begin{macro}{\l__tag_block_flattened_level_int}
% Count the levels of nested blockenvs starting with the first that
-% is \enquote{flattened}.
+% is \enquote{flattened}. The counter is defined in lttagging.dtx,
+% but until the next release 11/24 we set it up here too
% \begin{macrocode}
-\int_new:N \l_@@_flattened_level_int
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
% \end{macrocode}
% \end{macro}
%
@@ -1725,15 +1748,19 @@
\legacy_if_gset_false:n { @inlabel }
}
% \end{macrocode}
-% In a pure ``displayblock'' scenario \texttt{@newlist} will be
-% always false and the code bypassed, but we may have an outer list
-% followed immediately by a displayblock (with the \cs{item} missing)
+% If we are ending a list environment and we have not seen any
+% \cs{item}, i.e., \texttt{@newlist} is still true, we raise an
+% error. In basic a ``displayblock'' scenario \texttt{@newlist} will
+% always be false, but if such an environment appears inside an outer
+% list then \cs{noitemerr} could still be triggered and that is undesirable
+% (as the missing item will be detected at the wrong point and again later,
+% during the outer list processing). We
+% therefore run it only if the current environment is a list.
+% \changes{v0.8q}{2024/09/03}{Raise a \cs{@noitemerr} if appropriate}
+% \begin{macrocode}
+ \@@_if_list:T { \legacy_if:nT { @newlist } { \@noitemerr } }
+% \end{macrocode}
% \begin{macrocode}
- \legacy_if:nT { @newlist }
- {
- \@noitemerr
- \legacy_if_gset_false:n { @newlist }
- }
\mode_if_horizontal:TF
{ \@@_skip_remove_last: \@@_skip_remove_last: \par }
{ \@inmatherr{\end{\@currenvir}} }
@@ -1743,6 +1770,13 @@
% \begin{macrocode}
\__kernel_displayblock_end:
% \end{macrocode}
+% Resetting the \texttt{@newlist} switch is also only done if the
+% current enviornment is a list and not unconditionally.
+% \changes{v0.8q}{2024/09/03}{Setting \texttt{@newlist} to false
+% moved after tagging code if in a list}
+% \begin{macrocode}
+ \@@_if_list:T { \legacy_if_gset_false:n { @newlist } }
+% \end{macrocode}
% What to do in terms of vertical spacing in different situations
% is still somewhat open to debate, right now this is more or less
% implementing what \LaTeXe{} list environment have been
@@ -1789,6 +1823,19 @@
% \end{macro}
%
%
+% \begin{macro}{\@@_if_list:T}
+% The following code may need some redesigning, as there is no good test for \enquote{is
+% this environment a \enquote{list} that has \cs{item}s}. For now
+% this here does the trick well enough.\fmi{revisit}
+% \changes{v0.8q}{2024/09/03}{Provide a test for: Am I in a list?}
+% \begin{macrocode}
+\cs_new:Npn \@@_if_list:T
+ { \tl_if_eq:NnT \l_@@_block_instance_tl {list} }
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
% \begin{macro}{\__kernel_displayblock_end:}
% The kernel hook for tagging at the end of the block.
% \begin{macrocode}
@@ -1814,9 +1861,13 @@
% and should not inherit the setting from the outer environment.
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/block-endpe}{on}
- { \legacy_if_gset_true:n { @endpe } }
+% \end{macrocode}
+% We can't use \cs{legacy_if_gset_true:n} because this is now doing
+% more than setting the legacy switch
+% \begin{macrocode}
+ { \@endpetrue }
\socket_new_plug:nnn{tagsupport/block-endpe}{off}
- { \legacy_if_gset_false:n { @endpe } }
+ { \@endpefalse }
% \end{macrocode}
%
% \begin{macrocode}
@@ -1864,6 +1915,7 @@
%
% \begin{template}{block display}
%
+% \changes{v0.8s}{2024/10/03}{Offer item-skip key also on block templates}
% \begin{macrocode}
\DeclareTemplateCode{block}{display}{1}
{
@@ -1873,6 +1925,7 @@
par-skip = \parsep ,
end-skip = \l_@@_botsep_skip ,
end-par-skip = \l_@@_parbotsep_skip ,
+ item-skip = \itemsep ,
beginpenalty = \@beginparpenalty ,
endpenalty = \@endparpenalty ,
rightmargin = \rightmargin ,
@@ -1981,7 +2034,7 @@
% \cs{parskip} and some other housekeeping, unless this block is inside a list and the list
% \cs{item} has not yet placed. In that case the vertical
% space and penalty us suppressed. This
-% is controled through the legacy switches \texttt{@noparitem},
+% is controlled through the legacy switches \texttt{@noparitem},
% \texttt{minipage}, and \texttt{@nobreak}.
% \begin{macrocode}
\legacy_if:nTF { @noparitem }
@@ -2028,7 +2081,6 @@
% \end{template}
%
%
-%
% \begin{macro}{\__kernel_displayblock_begin:,
% \__kernel_displayblock_beginpar_hmode:w,
% \__kernel_displayblock_beginpar_vmode:}
@@ -2073,6 +2125,40 @@
%
%
%
+% \begin{macro}{\@@_evaluate_saved_user_keys:nn}
+% Keys set on individual list environments may be intended to alter
+% the behavior of the template instance that defines the \cs{item}
+% command. If meant to alter only a single \cs{item} command one
+% would specify them in the optional argument of the \cs{item}, but
+% if they should alter all items the right place would be the list
+% environment. For this reason we need to store the values and then
+% set them inside the \cs{item} template code using
+% \cs{SetTemplateKeys} in the appropriate context (template type
+% and template name). This is done in
+% \cs{@@_evaluate_saved_user_keys:nn}. The context is provided in
+% the two arguments (because different list environments may use
+% different \cs{item} instances based on different templates. By
+% default the command does
+% nothing because most environments do not have user key settings.
+% \changes{v0.8s}{2024/10/03}{Pass user keys on list to \cs{item} for
+% evaluation}
+% \begin{macrocode}
+\cs_new_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn
+% \end{macrocode}
+% Maybe something like this should become a public function, but
+% for now this is a one-off for the \cs{item} command and therefore
+% coded inline and internal to the block code.
+% \begin{macrocode}
+%\cs_new:Npn \@@_save_user_keys:n #1 {
+% \tl_if_empty:nTF {#1}
+% { \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
+% {
+% \cs_set:Npe \@@_evaluate_saved_user_keys:nn ##1##2
+% { \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
+% }
+%}
+% \end{macrocode}
+% \end{macro}
%
%
% \begin{template}{list std}
@@ -2098,36 +2184,48 @@
{
\@@_debug_typeout:n{template:list:std}
%
- \tl_if_empty:nF {#1} { \SetTemplateKeys{list}{std}{#1} }
+% \end{macrocode}
+% We start by looking at the user supplied keys in \texttt{\#1}. If
+% there aren't any we reset \cs{@@_evaluate_saved_user_keys:nn} to
+% do nothing. Otherwise we evaluate and set the keys in the contect
+% of the current list template. In addition we prepare
+% \cs{@@_evaluate_saved_user_keys:nn} for execution in the
+% template for \cs{item}.
+% \changes{v0.8s}{2024/10/03}{Prepare \cs{@@_evaluate_saved_user_keys:nn}
+% for use in \cs{item}}
+% \begin{macrocode}
+ \tl_if_empty:nTF {#1}
+ { \cs_set_eq:NN \@@_evaluate_saved_user_keys:nn \use_none:nn }
+ {
+ \SetTemplateKeys{list}{std}{#1}
+ \cs_set:Npe \@@_evaluate_saved_user_keys:nn ##1##2
+ { \SetTemplateKeys{##1}{##2}{ \exp_not:n{#1} } }
+ }
% \end{macrocode}
% Has this list a counter name defined in the instance?
% \begin{macrocode}
\tl_if_empty:NTF \l_@@_counter_tl
{
% \end{macrocode}
-% If not we check if \cs{@listctr} has a non-empty value to be used
-% for the list counter.
-%
-% We better test for blank not empty in case somebody had defined
-% \cs{@listctr} using \cs{renewcommand} or \cs{cs_set:Npn}.
+% If not we check if \cs{@nmbrlist} is true which may be the case
+% in legacy environments that used \cs{usecounter} in the argument
+% to the \env{list} environment.
+% \changes{v0.8v}{2024/10/11}{Correct logic for setting up the list
+% counter (tagging/730)}
% \begin{macrocode}
- \tl_if_blank:oF \@listctr
- {
+ \legacy_if:nT { @nmbrlist }
+ {
% \end{macrocode}
-% In that case \texttt{@nmbrlist} should have been set too, for
-% example, through \cs{usecounter}, so we do not set it
-% explicitly. However, we check if we should resume a previous list.
+% In that case we only check if we should resume a previous list
+% (\cs{@listctr} should be set in that case through the legacy
+% method as well so we should be able to use it).
% \begin{macrocode}
\bool_if:NF \l_@@_resume_bool
{
\int_gset:cn{ c@ \@listctr }
{ \l_@@_counter_start_int - 1 }
}
- }
-% \end{macrocode}
-% If \cs{@listctr} is not set then we have definitely an unnumbered list.
-% \begin{macrocode}
- { \@nmbrlistfalse }
+ }
}
% \end{macrocode}
% If a counter is set in the list instance we use that
@@ -2157,12 +2255,28 @@
\tl_set_eq:NN \@itemlabel \l_@@_item_label_tl
}
% \end{macrocode}
-% finally, we signal that we are at the start of a new list (which
-% effects how the first \cs{item} is handled and how \cs{par}
+% Finally, we signal that we are at the start of a new list (which
+% affects how the first \cs{item} is handled and how \cs{par}
% commands are interpreted.
% \begin{macrocode}
\legacy_if_gset_true:n { @newlist }
% \end{macrocode}
+% If we encounter horizontal material before the first \cs{item} we
+% do want a \cs{@noitemerr} straight away, because afterwards we
+% end up with tagging structure faults whose cause is the
+% missing \cs{item}. So we setup up \cs{@@_item_everypar:} to test
+% for this; when the first \cs{item} is encountered this will get
+% reset. This is only relevant for vertical lists, when dealing with
+% inline lists one would need to test for something else to
+% identify that there is horizontal material between the start of the list and
+% the first \cs{item} (maybe some \cs{spacefactor} trick could be
+% used then, or the material is boxed first and the width is
+% inspected as suggested by Joseph).\fmi{Think about a better
+% implementation at some point.}
+% \changes{v0.8q}{2024/09/02}{}
+% \begin{macrocode}
+ \cs_set_eq:NN \@@_item_everypar: \@@_item_everypar_first:
+% \end{macrocode}
%
% \begin{macrocode}
\@@_debug_typeout:n{template:list:std~end}
@@ -2251,8 +2365,19 @@
% was given.
% \begin{macrocode}
\tl_set_eq:NN \l_@@_label_given_tl \c_novalue_tl
+% \end{macrocode}
+% First we evaluate and set any keys specified on the list
+% environment by calling
+% \cs{@@_evaluate_saved_user_keys:nn}. Then we do the same
+% with all keys specified on this \cs{item} command (which may
+% overwrite one or the other setting just made).
+% \changes{v0.8s}{2024/10/03}{Use \cs{@@_evaluate_saved_user_keys:nn}
+% to make use of user keys on the list level}
+% \begin{macrocode}
+ \@@_evaluate_saved_user_keys:nn {item}{std}
\tl_if_empty:nF{#1}{ \SetTemplateKeys{item}{std}{#1} }
% \end{macrocode}
+%
% If no optional argument was given then \cs{l_@@_label_given_tl}
% is still equal to \cs{c_novalue_tl} and so we can distinuish
% that from \verb=\item[]=.
@@ -2404,16 +2529,16 @@
%
%
%
-% \begin{macro}{\@@_item_everypar:, \@@_item_everypar_std:}
+% \begin{macro}{\@@_item_everypar:, \@@_item_everypar_std:, \@@_item_everypar_first:}
% The \cs{@@_item_everypar:} command is executed as part of \hook{para/begin}
% but most of the time does nothing, i.e., it has the following
-% default definition.
+% default definition outside of lists (and most of the time within lists).
% \begin{macrocode}
\cs_new_eq:NN \@@_item_everypar: \prg_do_nothing:
% \end{macrocode}
-%
+%
% \begin{macrocode}
-\AddToHook{para/begin}[lists]{\@@_item_everypar:}
+\AddToHook{para/begin}[items]{\@@_item_everypar:}
% \end{macrocode}
%
% Note that we have to make sure that the above code is executed
@@ -2421,9 +2546,9 @@
% \texttt{@inlabel} to make a decision.
%
% By the end of the day both should probably move into the kernel
-% hook instead!
+% hook instead or, better, into sockets.
% \begin{macrocode}
-\DeclareHookRule{para/begin}{lists}{after}{tagpdf}
+\DeclareHookRule{para/begin}{items}{after}{tagpdf}
% \end{macrocode}
%
%
@@ -2475,6 +2600,16 @@
}
% \end{macrocode}
%
+% This is the definition of \cs{@@_item_everypar:} before the first
+% \cs{item} is encountered.
+% \changes{v0.8q}{2024/09/02}{Call \cs{@noitemerr} if hmode is
+% started before the first item}
+% \begin{macrocode}
+\cs_new:Npn \@@_item_everypar_first: {
+ \legacy_if:nT { @newlist } { \@noitemerr }
+}
+% \end{macrocode}
+%
% \end{macro}
%
%
@@ -2520,7 +2655,7 @@
%
% \begin{macro}{\item}
% Here we already have all the building blocks. Complain in math
-% mode. Distingusih between first item (do necessary tagging) and
+% mode. Distinguish between first item (do necessary tagging) and
% later items \cs{@@_inter_item:} to
% cleanly close what's before, then call \cs{@@_item_instance:n} (which
% calls \cs{UseInstance}\{item\}\marg{instance}) to prepare the
@@ -2541,8 +2676,16 @@
}
{
\legacy_if:nTF { @newlist }
- { \__kernel_list_item_begin: }
- { \@@_inter_item: }
+ {
+ \__kernel_list_item_begin:
+% \end{macrocode}
+% The first item of a list also has to change the \texttt{@newlist} switch.
+% \changes{v0.8q}{2024/09/02}{Set \texttt{@newlist} to false after
+% the first \cs{item}}
+% \begin{macrocode}
+ \legacy_if_gset_false:n { @newlist }
+ }
+ { \@@_inter_item: }
% \end{macrocode}
% To avoid unnecessary key/val processing we make a quick check if
% there was an optional argument.
@@ -2751,7 +2894,7 @@
\socket_assign_plug:nn{tagsupport/block-endpe}{on}
% \end{macrocode}
%
-% Handle the tag name and attribute classess using the key values
+% Handle the tag name and attribute classes using the key values
% from the current list instance.
% \begin{macrocode}
\tl_if_empty:NTF \l_@@_tag_name_tl
@@ -2994,6 +3137,7 @@
block-instance = verbatimblock ,
inner-instance = ,
final-code = \legacyverbatimsetup ,
+ para-instance = justify
}
% \end{macrocode}
% \end{instance}
@@ -3173,7 +3317,7 @@
% block quoteblock-4,
% block quoteblock-5,
% block quoteblock-6 }
-% Default layout is to indent equaly from both side.
+% Default layout is to indent equally from both sides.
% \begin{macrocode}
\DeclareInstance{block}{quoteblock-1}{display}
{ rightmargin = \KeyValue{leftmargin} }
@@ -3468,7 +3612,7 @@
% then have to avoid adding another \texttt{text-unit}.
% \begin{macrocode}
{
- \int_compare:nNnT \l_@@_flattened_level_int < 2
+ \int_compare:nNnT \l__tag_block_flattened_level_int < 2
{
\__tag_gincr_para_main_begin_int:
\tag_struct_begin:n
@@ -3917,15 +4061,37 @@
% Finally, at the list end we have to close the open
% \texttt{LBody}, \texttt{LI}, \texttt{L}, and possibly a
% \struct{text} if the last item ends with a list.
+% However, if the user forgot to add an \cs{item} then there will be no
+% \texttt{LI} and \texttt{LBody} open, so we check for the status
+% of \texttt{@newlist}. The corresponding no-item error was
+% generated earlier outside the tagging code.
+%
+% One could argue that it doesn't matter if the tagging is wrong
+% after a \cs{@noitemerr} was issued. However, there is one case
+% where it isn't an error: In the \texttt{thebibliography}
+% environment (which is internally a list) it is often the case
+% that documents start out with an empty environment, not
+% containing any \cs{bibitem}s. For that reason \cs{@noitemerr} is
+% redefined inside that environment to only produce a warning;
+% hence we have to produce correct tag structures in that case.
+% \changes{v0.8q}{2024/09/02}{Do not close LI and LBody if they
+% never were opened.}
% \begin{macrocode}
\cs_set:Npn \@@_list_end: {
- \legacy_if:nT { @endpe }
+% \end{macrocode}
+% If \texttt{@newlist} is true (i.e., when we have an error or warning
+% situation) there is not much to close.
+% \begin{macrocode}
+ \legacy_if:nF { @newlist }
{
- \__tag_gincr_para_main_end_int:
- \tagstructend % text-unit
- \@@_debug_typeout:n{Structure-end~ P~ at~ list-end \on@line }
+ \legacy_if:nT { @endpe }
+ {
+ \__tag_gincr_para_main_end_int:
+ \tagstructend % text-unit
+ \@@_debug_typeout:n{Structure-end~ P~ at~ list-end \on@line }
+ }
+ \tagstructend\tagstructend % end LBody, LI
}
- \tagstructend\tagstructend % end LBody, LI
\tagstructend % end L
}
% \end{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-block.pdf b/macros/latex-dev/required/latex-lab/latex-lab-block.pdf
index d13acb45d3..64f79fb74e 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-block.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-block.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
index ce0d46f815..118baccd79 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfirstaiddate{2024-05-25}
-\def\ltlabfirstaidversion{0.85d}
+\def\ltlabfirstaiddate{2024-10-16}
+\def\ltlabfirstaidversion{0.85h}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -53,7 +53,9 @@
%
% Similar to the main firstaid package the goal is to remove the
% patches once the packages have been updated.
-
+%
+% \changes{v0.85g}{2024/10/04}{Removed firstaid for blindtext. No longer needed with new doenpe-code.}
+% \changes{v0.85g}{2024/10/04}{Added firstaid for fancyvrb.}
% \section{Implementation}
%
% \begin{macrocode}
@@ -87,12 +89,11 @@
} }
\exp_args:Ncx\str_if_eq:onT{ver@#1.#2}{#3}
}
-\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
% \subsection{ams classes}
-% The amsart and amsbook classes do not use \cs{@author} to store the author list
+% The amsart, amsbook and amsproc classes do not use \cs{@author} to store the author list
% but a command \cs{authors}. To be able to nevertheless use the authors in the
% xmp-metadata we map \cs{@author} to this new command.
%
@@ -101,9 +102,179 @@
{\def\@author{\authors}}
\AddToHook{class/amsbook/after}
{\def\@author{\authors}}
+\AddToHook{class/amsproc/after}
+ {\def\@author{\authors}}
% \end{macrocode}
%
+% \subsection{ams classes and amsthm}
+% The amsart, amsbook and amsproc classes redefine the theorem code
+% and this breaks the tagging added by the block code. The following
+% reenables tagging. It does \emph{not} give a completly identical output
+% (similar to the new theorem code,
+% see \url{https://github.com/latex3/tagging-project/issues/715}).
+% The code also does not try to use sockets yet, as the theorem definitions
+% in the block code don't do that yet either.
%
+% \begin{macrocode}
+\AddToHook{class/amsart/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+\AddToHook{class/amsbook/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+\AddToHook{class/amsproc/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+\AddToHook{package/amsthm/after}[latex-lab-testphase-firstaid/amsthm]
+ {\tag_if_active:T{\@@_firstaid_amsthm:}}
+% \end{macrocode}
+% \changes{v0.85h}{2024/10/16}{moved Caption tag into \@begintheorem, tagging issue\#733}
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_firstaid_amsthm:
+ {
+% \end{macrocode}
+% \cs{@endtheorem} must use the endblock code
+% \begin{macrocode}
+ \def\@endtheorem{\endblockenv}
+% \end{macrocode}
+% In \cs{@thm} we have to remove the \cs{trivlist}
+% \begin{macrocode}
+ \RenewDocumentCommand\@thm{mmmO{}}{%
+ \ifhmode\unskip\unskip\par\fi
+ \normalfont
+ \let\thmheadnl\relax
+ \let\thm@swap\@gobble
+ \thm@notefont{\fontseries\mddefault\upshape}%
+ \thm@headpunct{.}% add period after heading
+ \thm@headsep 5\p@ plus\p@ minus\p@\relax
+ \thm@space@setup
+ ##1% style overrides
+ \@topsep \thm@preskip % used by thm head
+ \@topsepadd \thm@postskip % used by \@endparenv
+% \end{macrocode}
+% We store the counter name so that the anchor can make use of it.
+% \begin{macrocode}
+ \tl_set:Nn \l__block_thm_current_counter_tl{##2}
+ \tl_if_empty:nTF{##2}
+ {
+ \@begintheorem{##3}{}[##4]
+ }
+ {
+ \@kernel@refstepcounter{##2}
+ \@begintheorem{##3}{\csname the##2\endcsname}[##4]
+ }
+ }
+% \end{macrocode}
+% \cs{@begintheorem} has a larger number of changes
+% \begin{macrocode}
+ \def\@begintheorem##1##2[##3]{%
+% \end{macrocode}
+% We use the theorem instance.
+% \changes{v0.85h}{2024/10/16}{Added pre and post skips tagging/733}
+% \begin{macrocode}
+ \UseInstance{blockenv}{theorem}{beginsep=\thm@preskip}
+% \end{macrocode}
+% There is no working key to set the endskip, so we set the skip directly
+% similar to what amsthm is doing after the \cs{trivlist}.
+% \begin{macrocode}
+ \skip_set:Nn\l__block_topsepadd_skip { \thm@postskip }
+% \end{macrocode}
+% While create the caption/label we disable para-tagging.
+% \begin{macrocode}
+ \tagpdfparaOff
+ \mode_leave_vertical:
+% \end{macrocode}
+% The anchor for links. amsthm allows for unnumbered theorems so we have to test
+% for an empty counter.
+% \changes{v0.85h}{2024/10/16}{add test if counter is empty tagging/736}
+% \begin{macrocode}
+ \tl_if_empty:NTF \l__block_thm_current_counter_tl
+ {\MakeLinkTarget[theorem]{}}
+ {\MakeLinkTarget{\l__block_thm_current_counter_tl}}
+ \group_begin:
+ \normalfont
+ \the\thm@headfont \thm@indent
+ \@ifempty{##1}
+ {\let\thmname\@gobble}
+% \end{macrocode}
+% we insert the MC and the Lbl structure into \cs{thmname},
+% \cs{thmnumber} and \cs{thmnote}. This will also work
+% with new theorem style as long as they use these command.
+% \begin{macrocode}
+ {\def\thmname####1{\tag_mc_begin:n {}####1\tag_mc_end:}}%
+ \@ifempty{##2}
+ {\let\thmnumber\@gobble}
+ {\def\thmnumber####1
+ {\tag_struct_begin:n{tag=Lbl}\tag_mc_begin:n {}
+ ####1
+ \tag_mc_end:\tag_struct_end:}}%
+ \@ifempty{##3}
+ {\let\thmnote\@gobble}
+ {\def\thmnote####1{\tag_mc_begin:n{}####1\tag_mc_end:}}%
+ \tag_struct_begin:n{tag=Caption}
+ \thm@swap\swappedhead\thmhead{##1}{##2}{##3}%
+ \tag_mc_begin:n{}\the\thm@headpunct\tag_mc_end:
+ \tag_struct_end:
+ \thmheadnl % possibly a newline.
+ \hskip\thm@headsep
+ \group_end:
+% \end{macrocode}
+% Now we restart para tagging and start a paragraph. The socket
+% is currently defined in tagpdf, so the code should only
+% be used if tagging is active!
+% \begin{macrocode}
+ \tagpdfparaOn
+ \UseTaggingSocket{para/begin} %
+ \ignorespaces}
+% \end{macrocode}
+% This redefines the standard styles for the theorem heads.
+% \cs{thm@headpunct} has been moved into the head code
+% to make tagging more easier.
+% \begin{macrocode}
+ \def\thmhead@plain##1##2##3{%
+ \thmname{##1}
+ \thmnumber{
+ \@ifnotempty{##1}{~}\@upn{##2}
+ }%
+ \thmnote{\pdffakespace\space{\the\thm@notefont(##3)}}
+ }
+ \let\thmhead\thmhead@plain
+ \def\swappedhead##1##2##3{%
+ \thmnumber{##2}
+ \thmname{\@ifnotempty{##2}{\nobreakspace}##1}
+ \thmnote{\pdffakespace\space{\the\thm@notefont(##3)}}
+ }
+ \let\swappedhead@plain=\swappedhead
+% \end{macrocode}
+% At last some adjustments for the proof environment.
+% The qed symbols use a drawn box by default. We add an actualtext.
+% \begin{macrocode}
+ \renewcommand{\openbox}{\leavevmode
+ \hbox to.77778em{\pdf_bdc:nn{Span}{/ActualText<FEFF220E>}%
+ \pdffakespace\hfil\vrule
+ \vbox to.675em{\hrule width.6em\vfil\hrule}%
+ \vrule\hfil\pdf_emc:}}
+% \end{macrocode}
+% And redefine proof to no longer use a trivlist.
+% \begin{macrocode}
+ \renewenvironment{proof}[1][\proofname]{\par
+ \pushQED{\qed}%
+ \UseInstance{blockenv}{theorem}{beginsep=6\p@\@plus6\p@}
+ \normalfont
+ \tagpdfparaOff
+ \AddToHookNext{para/begin}
+ {\tag_struct_begin:n{tag=Caption}
+ \tag_mc_begin:n{}%
+ \textit{##1\@addpunct{.}}%
+ \tag_mc_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+ \UseTaggingSocket{para/begin}
+ \pdffakespace\hspace{\labelsep}}
+ \ignorespaces
+ }{%
+ \popQED\endblockenv\par
+ }
+ }
+\ExplSyntaxOff
+% \end{macrocode}
%
% \subsection{verse}
%
@@ -210,54 +381,12 @@
%\end{verbatim}
%
%
-% \subsection{blindtext}
-%
-% The blindtext package generates lists with nested \cs{loop} command.
-% The inner loop introduces a group around the list which error when lists are tagged
-% as \cs{@doendpe} is lost.
-% \begin{macrocode}
-\AddToHook{file/blindtext.sty/after}[latex-lab-firstaid]{%
- \FirstAidNeededT{blindtext}{sty}{\blindfiledate\space\blindfileversion\space%
- blindtext-Package}%
- {%
- \renewcommand{\blind@items}{%
- \setcounter{blind@listcount}{1}%
- \loop
- \ifblind@optional
- \ifblind@long
- \item[\blindtext@countitem] \blindtext@text
- \else
- \item[\blindtext@count] \blindtext@item
- \fi
- \else % \blind@optionalfalse
- \ifblind@long
- \item \blindtext@text
- \else
- \item \blindtext@countitem
- \fi
- \fi % \ifblind@optional
- {%
- \loop
- \ifnum\value{blindlistlevel}>\value{blindlist@level}%
- \stepcounter{blind@levelcount}%
- \blind@list[\value{blindlist}]\relax
- \addtocounter{blind@levelcount}{-1}%
- \setcounter{blind@listcount}{1}%
- \repeat
- \expandafter}\if@endpe\@doendpe\fi % <----------changed
- \ifnum\value{blind@listcount}<\value{blindlist}%
- \stepcounter{blind@listcount}%
- \repeat
- }
- }%
- }
-% \end{macrocode}
-%
-%
% \subsection{cleveref}
%
% The cleveref package redefines \cs{@makefntext} and this means that the patches in
-% the new footnote code fails. We use a hook instead
+% the new footnote code fails. We use a hook instead.
+% \changes{v0.85h}{2024/10/16}{Remove redefinition of refstepcounter. It no longer uses
+% the hook.}
% \begin{macrocode}
\AddToHook{package/cleveref/after}
{
@@ -267,16 +396,6 @@
\protected@edef\cref@currentlabel{%
[footnote][\arabic{footnote}][\cref@result]%
\p@footnote\@thefnmark}}
-% \end{macrocode}
-% The second problem is that it redefines \cs{refstepcounter} to use an argument.
-% In itself this isn't a problem but as the new definition doesn't grab the arguments
-% directly it fails over the generic hook inserted at the end of the definition
-% \begin{macrocode}
- \RenewDocumentCommand\refstepcounter{om}{%
- \IfNoValueTF{#1}%
- {\refstepcounter@noarg{#2}}%
- {\refstepcounter@optarg[#1]{#2}}%
- }%
}
% \end{macrocode}
%
@@ -290,6 +409,7 @@
% See also issue \url{https://github.com/latex3/tagging-project/issues/69}
%
%
+% \begin{macrocode}
\ExplSyntaxOn
\AddToHook{package/booktabs/after}
{
@@ -314,8 +434,145 @@
\tag_mc_end: \int_gdecr:N \g__tbl_row_int
\cr}
}
-\ExplSyntaxOff
+\ExplSyntaxOff
+% \end{macrocode}
+
%
+% \subsection{fancyvrb}
+% The firstaid adds first partial tagging support to the environments
+% of fancyvrb (inline verbatim is untested).
+% This supports then also packages like minted which internally uses fancyvrb
+% and classes like l3doc (where currently the verbatim environment based on fancyvrb
+% is overwritten by the block code).
+% The environments are surrounded by a \texttt{verbatim} structure,
+% every line by a \texttt{codeline}
+% structure (this requires the block code, but firstaid should be used only with
+% phase-III anyway). Line numbers are tagged as Lbl, currently outside of the
+% \texttt{codeline} structure. The frame lines are marked as artifact.
+%
+% \begin{macro}{\FV@LeaveVMode}
+% If we are in vmode we have to open a text-unit structure, if we are
+% in hmode we have to set para mode to flattened before the fancyhdr code
+% issues the\cs{par}. The closing of the text-unit structure is handled by the
+% doendpe code in the block code.
+% \begin{macrocode}
+\ExplSyntaxOn
+\AddToHook{package/fancyvrb/after}
+{
+ \def\FV@LeaveVMode{%
+ \if@noskipsec
+ \leavevmode
+ \else
+ \if@FV@ResetMargins\if@inlabel\leavevmode\fi\fi
+ \fi
+ \ifvmode
+ \@noparlisttrue
+ \__tag_gincr_para_main_begin_int:
+ \tag_struct_begin:n{tag=\l__tag_para_main_tag_tl}
+ \else
+ \bool_set_true:N\l__tag_para_flattened_bool
+ \@noparlistfalse
+ \unskip\par
+ \fi
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FV@List}
+% At the begin of the list code we have to tag the frame as artifact
+% and start the \texttt{verbatim} structure
+% \begin{macrocode}
+ \def\FV@List#1{%
+ \begingroup
+ \FV@UseKeyValues
+ \FV@LeaveVMode
+ \if@inlabel\else\setbox\@labels=\box\voidb@x\fi
+ \FV@ListNesting{#1}%
+ \FV@ListParameterHook
+ \FV@ListVSpace
+ \FV@SetLineWidth
+ \FV@InterLinePenalty
+ \let\FV@ProcessLine\FV@ListProcessLine@i
+ \FV@CatCodes
+ \FV@FormattingPrep
+ \FV@ObeyTabsInit
+ \cs_if_exist:NT \FV@BeginListFrame
+ {
+ \tag_mc_begin:n{artifact}
+ \FV@BeginListFrame
+ \tag_mc_end:
+ }
+ \tag_struct_begin:n{tag=verbatim}
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\FV@EndList}
+% At the end of the list code we close the \texttt{verbatim} structure and
+% tag the frame as artifact.
+% \begin{macrocode}
+ \def\FV@EndList{%
+ \FV@ListProcessLastLine
+ \tag_struct_end:
+ \cs_if_exist:NT \FV@EndListFrame
+ {
+ \tag_mc_begin:n{artifact}
+ \FV@EndListFrame
+ \tag_mc_end:
+ }
+ \@endparenv
+ \endgroup
+ \@endpetrue
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\FV@ListProcessLine}
+% At last the tagging of the code lines. Here we have to tag also
+% numbers and frame parts if they exist.
+% \begin{macrocode}
+ \def\FV@ListProcessLine#1{%
+ \hbox to \hsize{%
+ \kern\leftmargin
+ \hbox to \linewidth{%
+ \cs_if_exist:NT \FV@LeftListNumber
+ {
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n{}
+ \FV@LeftListNumber
+ \tag_mc_end:
+ \tag_struct_end:
+ }
+ \cs_if_exist:NT \FV@LeftListFrame
+ {
+ \tag_mc_begin:n{artifact}
+ \FV@LeftListFrame
+ \tag_mc_end:
+ }
+ \tag_struct_begin:n{tag=codeline}
+ \tag_mc_begin:n{}%
+ \FancyVerbFormatLine{#1}%
+ \tag_mc_end:
+ \tag_struct_end:\hss
+ \cs_if_exist:NT \FV@RightListFrame
+ {
+ \tag_mc_begin:n{artifact}
+ \FV@RightListFrame
+ \tag_mc_end:
+ }
+ \cs_if_exist:NT \FV@RightListNumber
+ {
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n{}
+ \FV@RightListNumber
+ \tag_mc_begin:n{}
+ \tag_struct_end:
+ }
+ }
+ \hss}}
+ }
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
% \begin{macrocode}
%</package>
% \end{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdf b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdf
index c035081f6b..8c65ca2d75 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-firstaid.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-float.dtx b/macros/latex-dev/required/latex-lab/latex-lab-float.dtx
index a817133713..536aa09cfa 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-float.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-float.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfloatdate{2024-03-23}
-\def\ltlabfloatversion{0.81e}
+\def\ltlabfloatdate{2024-09-20}
+\def\ltlabfloatversion{0.81f}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -43,6 +43,9 @@
% customizations}}
%
% \providecommand\hook[1]{\texttt{#1}}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+%
% \begin{documentation}
% \begin{abstract}
% The following code implements a first draft for the tagging of float
@@ -64,7 +67,7 @@
%
% A special type, called a H-float, (provided by the float package)
% is always placed in the main text stream and does not
-% necessarly preserve the order with normal floats of the same type: It is basically
+% necessarily preserve the order with normal floats of the same type: It is basically
% a minipage with a caption.
%
% Floats typically contain a figure (or a table, etc.) and a caption,
@@ -125,7 +128,10 @@
%
% \section{Kernel commands}
% \begin{function}{\@current@float@struct}
-% This variable holds the structure number of current float structure.
+% This variable holds the number of the current float structure. With tagging
+% this is the structure number, without tagging a unique counter. A float
+% can contain more than one float structure (e.g. if there is more than one
+% caption).
% \end{function}
%
% \begin{function}{\@makecaption}
@@ -146,22 +152,28 @@
{Code related to the tagging of floats}
% \end{macrocode}
% \subsection{Variables}
-% We rolemap to float to Aside, and float sections to Sect.
+% We rolemap floats to Aside, and float sections to Sect.
%
% \begin{variable}{
% \g_@@_float_sect_prop,
% \g_@@_float_types_seq,
-% \@current@float@struct
+% \@current@float@struct,
+% \g_@@_float_int
% }
% These variables will hold the structure number for the float container
% and the list of float types. Currently only figure and table are supported
% TODO: interface to declare new float types.
+% To set the target for links we need also a unique counter.
+% With tagging we could use the structure number, but
+% the structure commands now are hidden inside tagging sockets
+% so we use a dedicated counter.
% \begin{macrocode}
\prop_new:N \g_@@_float_sect_prop
\seq_new:N \g_@@_float_types_seq
\seq_gput_right:Nn \g_@@_float_types_seq {figure}
\seq_gput_right:Nn \g_@@_float_types_seq {table}
\tl_new:N\@current@float@struct
+\int_new:N\g_@@_float_int
% \end{macrocode}
% \end{variable}
%
@@ -176,6 +188,19 @@
% \end{macrocode}
% \end{variable}
%
+% \begin{macro}{\@@_float_init:}
+% To be able to set unique targets for links, we
+% need a counter outside the tagging sockets.
+% TODO: check if this command should be public or
+% a socket or a hook.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_float_init:
+ {
+ \int_gincr:N \g_@@_float_int
+ \tl_set:Ne \@current@float@struct { \int_use:N \g_@@_float_int}
+ }
+% \end{macrocode}
+% \end{macro}
%
%\subsection{Moving float structures}
%
@@ -260,15 +285,71 @@
{
split-float .code:n =
{
- \@@_float_end:
- \@@_float_begin:
- \MakeLinkTarget*{floatstructure.\int_use:N\c@g__tag_struct_abs_int}
+ \UseTaggingSocket{float/end}
+ \@@_float_init:
+ \UseTaggingSocket{float/begin}
+ \MakeLinkTarget*{floatstructure.\@current@float@struct}
}
}
% \end{macrocode}
% \end{macro}
-
-% \subsection{Patching}
+%
+% \subsection{Tagging sockets}
+% For now we test if the sockets are already defined
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/float/begin_plug_str }
+ {
+ \NewSocket{tagsupport/float/hmode/begin}{0}
+ \NewSocket{tagsupport/float/hmode/end}{0}
+ \NewSocket{tagsupport/float/begin}{0}
+ \NewSocket{tagsupport/float/end}{0}
+ }
+% \end{macrocode}
+%
+% \begin{plugdecl}{default (tagsupport/float/hmode/begin)}
+% This plug should be used if a float is called in hmode.
+% In then closes the MC-chunks and starts the structure.
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/float/hmode/begin}{default}
+ {
+ \@@_float_stop_par:
+ }
+\AssignSocketPlug{tagsupport/float/hmode/begin}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default (tagsupport/float/hmode/end)}
+% This plug should be used if a float is called in hmode
+% and the end of the float it then restarts the MC.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/float/hmode/end}{default}
+ {
+ \@@_float_start_par:
+ }
+\AssignSocketPlug{tagsupport/float/hmode/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default (tagsupport/float/begin)}
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/float/begin}{default}
+ {
+ \@@_float_begin:
+ }
+\AssignSocketPlug{tagsupport/float/begin}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default (tagsupport/float/end)}
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/float/end}{default}
+ {
+ \@@_float_end:
+ }
+\AssignSocketPlug{tagsupport/float/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
% \begin{macro}{\@@_float_stop_par:,\@@_float_start_par:}
% if a float is in a par, we need commands to stop and restart the P-mc
% \begin{macrocode}
@@ -287,8 +368,7 @@
\tag_struct_begin:n{tag=text}%
}
\tag_mc_begin:n{tag=P}
- }
-
+ }
% \end{macrocode}
% \end{macro}
% These commands are the main commands to start and end the float tagging.
@@ -315,6 +395,7 @@
\cs_new_protected:Npn\@@_float_end:{\tag_struct_end:} %end Aside
% \end{macrocode}
+% \subsection{Patching}
% This patches the main command \cs{@xfloat}.
% There is a : in the code, so we disable expl3 syntax
% \begin{macrocode}
@@ -337,7 +418,7 @@
% \end{macrocode}
% If the float is in hmode we have to interrupt the P
% \begin{macrocode}
- \@nameuse{@@_float_stop_par:}% <---end P
+ \UseTaggingSocket{float/hmode/begin}%
\@floatpenalty -\@Mii
\else
\@floatpenalty-\@Miii
@@ -383,7 +464,8 @@
% \end{macrocode}
% This starts the structure for the float.
% \begin{macrocode}
- \@nameuse{@@_float_begin:}%
+ \csname @@_float_init:\endcsname
+ \UseTaggingSocket{float/begin}%
\global \setbox\@currbox
\color@vbox
\normalcolor
@@ -394,14 +476,14 @@
% \end{macrocode}
% We add a target for links. TODO: check that it doesn't affect spacing!!
% \begin{macrocode}
- \MakeLinkTarget*{floatstructure.\number\value{g__tag_struct_abs_int}}%
+ \MakeLinkTarget*{\@captype.struct.\@current@float@struct}%
}%
% \end{macrocode}
% The end code of the float ...
% \begin{macrocode}
\def\end@float{%
\@endfloatbox
- \@nameuse{@@_float_end:}%
+ \UseTaggingSocket{float/end}%
\ifnum\@floatpenalty <\z@
\@largefloatcheck
\@cons\@currlist\@currbox
@@ -413,7 +495,7 @@
\penalty\@floatpenalty
\else
\vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
- \@nameuse{@@_float_start_par:}% restart P safe here??
+ \UseTaggingSocket{float/hmode/end}%
\fi
\fi
}
@@ -423,7 +505,7 @@
\def\end@dblfloat{%
\if@twocolumn
\@endfloatbox
- \@nameuse{@@_float_end:}%
+ \UseTaggingSocket{float/end}%
\ifnum\@floatpenalty <\z@
\@largefloatcheck
\global\dp\@currbox1sp %
@@ -436,7 +518,7 @@
\penalty\@floatpenalty
\else
\vadjust{\penalty -\@Miv \vbox{}\penalty\@floatpenalty}\@Esphack
- \@nameuse{@@_float_start_par:}% restart P safe here??
+ \UseTaggingSocket{float/hmode/end}%
\fi
\fi
\else
@@ -453,10 +535,113 @@
\def\hyper@nopatch@caption{}
% \end{macrocode}
%
+% \subsubsection{(Tagging) sockets}
+%
+% First some temporary sockets.
+% These sockets are in lttagging.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/caption/begin_plug_str }
+ {
+ \NewSocket{tagsupport/caption/begin}{1}
+ \NewSocket{tagsupport/caption/end}{0}
+ \NewSocket{tagsupport/caption/label/begin}{0}
+ \NewSocket{tagsupport/caption/label/end}{0}
+ }
+% \end{macrocode}
+% These socket are currently defined in tagpdf.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/para/begin_plug_str }
+ {
+ \NewSocket{tagsupport/para/begin}
+ \NewSocket{tagsupport/para/end}
+ }
+% \end{macrocode}
+%
+% \begin{socketdecl}{caption/label}
+% This socket is a lightweight start for
+% some interface to format the label or add a font command.
+% The argument is the label text.
+% The default plug \texttt{kernel} adds a colon
+% and a space.
+% TODO: revisit after checking float and caption packages
+% to identify which sockets and hooks are needed.
+% \begin{macrocode}
+\NewSocket{caption/label}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{plugdecl}{kernel (caption/label)}
+% The standard label formatting from the kernel.
+% \begin{macrocode}
+\NewSocketPlug{caption/label}{kernel}
+ {
+ #1:~
+ }
+\AssignSocketPlug{caption/label}{kernel}
+% \end{macrocode}
+% \end{plugdecl}
+% \begin{plugdecl}{default}
+% The caption begin socket takes an argument: the structure number of
+% the parent float. If the argument is empty, the current structure is used.
+% TODO: a tagpdf key that moves a structure to the begin of the parent.
+% The caption is moved to the first position with the firstkid option.
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/begin}{default}
+ {
+ \tl_if_empty:eTF {#1}
+ {
+ \tag_struct_begin:n{tag=Caption,firstkid}
+ }
+ {
+ \tag_struct_begin:n{tag=Caption,parent=#1,firstkid}
+ }
+ \bool_set_true:N \l__tag_para_flattened_bool
+ }
+\AssignSocketPlug{tagsupport/caption/begin}{default}
+% \end{macrocode}
+% \end{plugdecl}
+% \begin{plugdecl}{default}
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/end}{default}
+ {
+ \tag_struct_end:
+ }
+\AssignSocketPlug{tagsupport/caption/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default (tagsupport/caption/label/begin)}
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/label/begin}{default}
+ {
+% \end{macrocode}
+% suppress para tagging at the begin.
+% \begin{macrocode}
+ \tagpdfparaOff
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n{}
+ }
+\AssignSocketPlug{tagsupport/caption/label/begin}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{default (tagsupport/caption/label/end)}
+% \begin{macrocode}
+\NewSocketPlug {tagsupport/caption/label/end}{default}
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ \tagpdfparaOn
+ }
+\AssignSocketPlug{tagsupport/caption/label/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \subsubsection{Redefinitions}
+%
% With hyperref that means that the \cs{refstepcounter} now can affect spacing so we
% change that to the kernel refstepcounter:
% \begin{macrocode}
-\let\@kernel@refstepcounter\refstepcounter %as long it is not in the kernel
\def\caption{%
\ifx\@captype\@undefined
\@latex@error{\noexpand\caption\c_space_tl outside~float}\@ehd
@@ -474,22 +659,16 @@
\@kernel@refstepcounter\@captype
% \end{macrocode}
% we need to reset the target for \cs{addcontentsline}.
+% We use \cs{@captype} to support autoref.
% \begin{macrocode}
- \xdef\@currentHref{floatstructure.\@current@float@struct}%
+ \xdef\@currentHref{\@captype.struct.\@current@float@struct}%
}
\expandafter\@firstofone
\fi
{\@dblarg{\@caption\@captype}}%
}
% \end{macrocode}
-% As we will use the structure number in the target, we need to provide a
-% theH-representation. (Once the kernel will create
-% theH-representation generally this will be provided automatically, as tagpdf uses
-% \cs{newcounter})
-% \begin{macrocode}
-\providecommand\theHg__tag_struct_abs_int{\int_use:N\c@g__tag_struct_abs_int}
-% \end{macrocode}
-
+%
% \begin{macro}{\@makecaption}
% \cs{@makecaption} is defined by the classes so we overwrite it for now
% at begin document.
@@ -501,53 +680,36 @@
% \end{macrocode}
% we don't want tagging when storing the caption for the singleline check
% \begin{macrocode}
- \tag_stop:n{caption}
+ \SuspendTagging{\@makecaption}
\sbox\@tempboxa{#1:~#2}%
- \tag_start:n{caption}
+ \ResumeTagging{\@makecaption}
% \end{macrocode}
-% we stop paratagging. TODO: check
+% We pass \cs{@current@float@struct} as parent structure
+% number. If that is empty the socket will use the parent structure and hope ...
% \begin{macrocode}
- \tagtool{para=false}
-% \end{macrocode}
-% if caption is used outside a float there is perhaps no number, then we use
-% the parent structure and hope ...
-% \begin{macrocode}
- \tl_if_empty:NT \@current@float@struct
- { \tl_set:Ne \@current@float@struct {\tag_get:n{struct_num}} }
- \tag_struct_begin:n{tag=Caption,parent=\@current@float@struct}
-% \end{macrocode}
-% move the caption to the begin of the float structure:
-% \begin{macrocode}
- \tag_if_active:T
- {
- \seq_gpop_right:cN {g__tag_struct_kids_\@current@float@struct _seq}\l_@@_tmpa_tl
- \seq_gput_left:cV {g__tag_struct_kids_\@current@float@struct _seq}\l_@@_tmpa_tl
- }
+ \UseTaggingSocket{caption/begin}{\@current@float@struct}
\ifdim \wd\@tempboxa >\hsize
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n{}
- #1:~
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n{}
- #2\par
- \tag_mc_end:
+ \UseTaggingSocket{caption/label/begin}
+ \UseSocket{caption/label}{#1}
+ \UseTaggingSocket{caption/label/end}
+ \UseTaggingSocket{para/begin}
+ #2
+ \par
\else
% \end{macrocode}
% we don't reuse the box as it doesn't contain tagging, but set the text explicitly.
% \begin{macrocode}
\global \@minipagefalse
\hb@xt@\hsize{\hfil
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n{}
- #1:~
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n{}
+ \UseTaggingSocket{caption/label/begin}
+ \UseSocket{caption/label}{#1}
+ \UseTaggingSocket{caption/label/end}
+ \UseTaggingSocket{para/begin}
#2
- \tag_mc_end:\hfil}%
+ \UseTaggingSocket{para/end}
+ \hfil}%
\fi
- \tag_struct_end: %caption
+ \UseTaggingSocket{caption/end}
\vskip\belowcaptionskip}
}
% \end{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-float.pdf b/macros/latex-dev/required/latex-lab/latex-lab-float.pdf
index edc88f0b2a..f15a6f4d42 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-float.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-float.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx
index a3d044ab87..f4ad7edd9d 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx
@@ -17,8 +17,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabfootnotedate{2024-03-12}
-\def\ltlabfootnoteversion{0.8d}
+\def\ltlabfootnotedate{2024-09-30}
+\def\ltlabfootnoteversion{0.8g}
%<*driver>
\documentclass{l3doc}
@@ -228,7 +228,8 @@
%
% To cater for different layout configurations there are four
% sockets that can be set by a package or
-% class but there should be only one per document setting them, i.e., if two packages/classes set them they are mutually
+% class but there should be only one per document setting them,
+% i.e., if two packages/classes set them they are mutually
% incompatible (or rather the last one wins most likely).
% These are:
% \begin{description}
@@ -491,11 +492,21 @@
% \subsection{Technical details for the tagging}
%
% The following sockets are set up for kernel use, when doing tagging:
+% There name and/or function will probably change as they currently
+% mix tagging with the link support.
+%
+% TODO: review this sockets
% \begin{description}
% \item[\socket{tagsupport/fnmark} (1 argument)]
%
% \DescribeSocket[noprint]{tagsupport/fnmark}
-%
+%
+% The socket is used in \cs{@footnotemark}/\cs{fnote_footnotemark:}
+% and takes \cs{@makefnmark} as argument. It prints the mark in the text
+% and surrounds it with a tagging structure and a link. As such it is
+% not solely for tagging and so should not be used with \cs{UseTaggingSocket}
+% as this would swallow the argument and loose the link support.
+%
% \fmi{describe and decide on names}
%
%
@@ -503,31 +514,45 @@
%
% \DescribeSocket[noprint]{tagsupport/fntext/begin}
%
+% This socket is used before the main processing socket
+% (so before the \cs{insert} command). It opens the FEnote structure.
+% As it sets also the tl-var for the current structure and this is used
+% in destinations it should not use as tagging socket.
+%
%
% \item[\socket{tagsupport/fntext/end} (no argument)]
%
% \DescribeSocket[noprint]{tagsupport/fntext/end}
%
+% This socket is used after the main processing socket
+% (so after the \cs{insert} command). It closes the FEnote structure.
%
% \item[\socket{tagsupport/fntext/mark} (1 argument)]
%
% \DescribeSocket[noprint]{tagsupport/fntext/mark}
-%
+%
+% This socket is used around the mark in the footnote text.
+% It adds tagging support but also link support, so like the other
+% tagsupport sockets it should be always active.
%
% \item[\socket{tagsupport/fntext/text} (1 argument)]
%
% \DescribeSocket[noprint]{tagsupport/fntext/text}
%
+% This socket handles mc-chunks around the text of the footnote. As it
+% takes an argument (the text) is should not be use as tagging socket either.
%
% \end{description}
%
%
% The \emph{footnotemark} should create a \texttt{/Lbl} structure\footnote{to make it easier
-% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}} that should contain a \texttt{/Ref} entry pointing
+% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}}
+% that should contain a \texttt{/Ref} entry pointing
% to the structure of the \emph{footnotetext}.
%
-% The \emph{footnotetext} should create a \texttt{/FENote}\footnote{We tag it as \texttt{/footnote} and role map it.}
-% structure with a \texttt{/Ref}
+% The \emph{footnotetext} should create a \texttt{/FENote}%
+% \footnote{We tag it as \texttt{/footnote} and role map it.}
+% structure with a \texttt{/Ref}
% entry pointing to the structures of \emph{all} marks related to the note.
% The mark at the begin of the
% note is in a \texttt{/Lbl}\footnote{We tag it as \texttt{/footnotelabel}.}
@@ -582,8 +607,8 @@
% with their own structure number as a key in a property.
%
% A following \cs{footnotetext} compares its own \cs{@thefnmark} with the values in
-% the prop. If there is a match it stores the structure numbers and removes the entries
-% from the properties (so in a normal document the property will never contain more than
+% the prop. If there is one or more match it stores the structure numbers and removes the entries
+% from the property (so in a normal document the property will never contain more than
% a few entries).
%
% This works well as long as the \cs{footnotemark} commands are issued before the \cs{footnotetext} and
@@ -626,9 +651,9 @@
%
% \subsubsection{\cs{footref}}
%
-% \cs{footref} use internally the same command to set the mark as \cs{footnotemark}, it only
+% \cs{footref} uses internally the same command to set the mark as \cs{footnotemark}, it only
% defines \cs{@thefnmark} differently. This \cs{@thefnmark} is not suitable for the method described
-% above, as it contains a reference command it can't be used to match a note, also \cs{footref} can
+% above: as it contains a reference command it can't be used to match a note, also \cs{footref} can
% be used after the note has already been set. \cs{footref} disables therefore the automatic detection.
%
% Instead the \cs{label} command is
@@ -636,7 +661,7 @@
% number to setup the reference and the link.
%
% The structure related to the \cs{footref} is added to the end of the \texttt{/Ref} array of the note and so the
-% \texttt{/Ref} array doesn't necessarly reflect the order of the marks in the document. It would probably
+% \texttt{/Ref} array doesn't necessarily reflect the order of the marks in the document. It would probably
% be possible to change this, but it is not clear if it actually matters and so it worth the additional coding
% and processing.
%
@@ -672,7 +697,7 @@
%
% A \cs{footnotetext} creates a bunch of destinations (in most cases this sums up to
% two destinations): one for every structure number in the \texttt{/Ref} (used as target
-% by the mark commands) and one for the structure number of the footnotetest itself
+% by the mark commands) and one for the structure number of the footnotetext itself
% (used as target by \cs{footref}s commands).
%
% \subsection{Implementation details regarding tagging}
@@ -899,8 +924,8 @@
% This is used to pass the structure number of the note around, e.g.
% to a label inside the note.
% \begin{macrocode}
-\tl_new:N \l_@@_currentstruct_tl
-\tl_set:Nn \l_@@_currentstruct_tl {1}
+\tl_new:N \l_@@_currentstruct_tl
+\tl_set:Nn \l_@@_currentstruct_tl {2}
% \end{macrocode}
%
%
@@ -1150,6 +1175,21 @@
%
%
% \begin{macro}{\fnote_footnotetext:n}
+% We temporarily test for the tagging socket until it is in the next release:
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/para/restore_plug_str }
+ {
+ \NewSocket{tagsupport/para/restore}{0}
+ \NewSocketPlug{tagsupport/para/restore}{default}
+ {
+ \tl_set:Nn \l__tag_para_main_tag_tl {text-unit}
+ \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \bool_set_false:N\l__tag_para_flattened_bool
+ }
+ \AssignSocketPlug{tagsupport/para/restore}{default}
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
\cs_new_protected:Npn \fnote_footnotetext:n #1 {
\@@_debug_footnotetext:
@@ -1191,6 +1231,7 @@
\floatingpenalty \@MM
\hsize\columnwidth
\@parboxrestore
+ \UseTaggingSocket{para/restore}
\parindent 1em % typical default used in \@makefntext moved up here
\def\@currentcounter{footnote}
\protected@edef \@currentlabel { \p@footnote \@thefnmark }
@@ -1673,7 +1714,7 @@
%
% \subsubsection{\pkg{memoir}}
% The \pkg{memoir} class redefines various internal commands to inject its
-% hooks and addtional code. The following reinstates the kernel command and
+% hooks and additional code. The following reinstates the kernel command and
% so probably breaks various options of \pkg{memoir}, but without the
% changes it errors anyway. The \pkg{footmisc} package should be used to change
% for example to para footnotes.
@@ -1937,10 +1978,7 @@
% \begin{macrocode}
\cs_new_protected:Npn \@@_gput_ref:nn #1 #2 %#1 the structure number receiving the ref #2
{
- \tag_if_active:T
- {
- \tag_struct_gput:nne {#1}{ref}{\tag_struct_object_ref:e { #2 }}
- }
+ \tag_struct_gput:nnn {#1}{ref_num}{#2}
}
\cs_new_protected:Npn \fnote_gput_refs:nn #1 #2 % pair of numbers
{
@@ -1951,11 +1989,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macrocode}
-\tl_new:N \l_@@_dflt_struct_tl
-\tl_set:Nn \l_@@_dflt_struct_tl {1}
-% \end{macrocode}
-% kernel hooks for taggin
+% kernel hooks for tagging
% this sets the structure around the whole text
%
%
@@ -1965,25 +1999,30 @@
{
\tag_mc_end_push:
% \end{macrocode}
-% test if a footnote is allowed, if not move up to the document structure.
+% test if a footnote is allowed, if not move up to the next sect or
+% the document structure.
% \begin{macrocode}
\tag_check_child:nnTF {FENote}{pdf2}
{
\tag_struct_begin:n { tag=footnote }
}
{
- \tag_struct_begin:n { tag=footnote,parent=\l_@@_dflt_struct_tl }
+ \tag_struct_begin:n
+ {
+ tag=footnote,
+% \end{macrocode}
+% We add 0 for now to ensure to get a number even if the sec code is not loaded
+% or if the seq is empty (which it shouldn't unless there is an coding error)
+% \begin{macrocode}
+ parent=\int_max:nn{2}{\tag_get:n{current_Sect}+0}
+ }
}
% \end{macrocode}
% Store the current structure number for labels.
% \begin{macrocode}
\tl_set:Ne \l_@@_currentstruct_tl { \tag_get:n{struct_num} }
% \end{macrocode}
-% We want to move the label structure here. So we provide a container
-% It number is |\l__fnote_currentstruct_tl| plus 1.
-% \begin{macrocode}
- \tag_struct_begin:n { tag=footnotelabel }\tag_struct_end:
-% \end{macrocode}
+%
% after we have opened the structure we can use the structure number to
% try to detect the connected marks. As with the marks we assume that sometimes
% no auto detection is done.
@@ -2066,12 +2105,9 @@
\MakeLinkTarget*{footnote*.\l_@@_currentstruct_tl}
% \end{macrocode}
% Now we add the tagging commands. We move the structure of the label to
-% to the container at the begin of the note.
-% \begin{NOTE}{UF}
-% Check if the NonStruct is really needed. Perhaps we can simply move the mc.
-% \end{NOTE}
+% the begin of the footnote structure.
% \begin{macrocode}
- \tag_struct_begin:n { tag=NonStruct,parent=\l_@@_currentstruct_tl +1 }
+ \tag_struct_begin:n { tag=footnotelabel,parent=\l_@@_currentstruct_tl,firstkid }
\tag_mc_begin:n { tag=Lbl }
#1
\tag_mc_end:
@@ -2446,7 +2482,7 @@
% This can use the default interface, except that a negative value for
% \footnotemargin makes little sense, so we test for this and warn if
-% necessary. But -\maxdimen is ok again, so would need to be a litte bit more elaborate.
+% necessary. But -\maxdimen is ok again, so would need to be a little bit more elaborate.
%
%\AddToHook{fntext/para}{
@@ -2483,7 +2519,7 @@
\leavevmode
% \end{macrocode}
% Typesetting the mark twice means that one can't have any material
-% inside that gets unhappy in that case. Tha shouldn't be a
+% inside that gets unhappy in that case. That shouldn't be a
% problem, but perhaps we have to come up with a more elaborate
% solution in the end.
% \begin{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf
index 6fa73ecf8b..3c41ce694a 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx b/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx
index 5ea4a2db9c..b3ee3eb6c6 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-graphic.dtx
@@ -15,8 +15,8 @@
% https://github.com/latex3/latex2e/required/latex-lab
%
% for those people who are interested or want to report an issue.
-\def\ltlabgraphicdate{2024-03-13}
-\def\ltlabgraphicversion{0.80d}
+\def\ltlabgraphicdate{2024-09-18}
+\def\ltlabgraphicversion{0.80e}
%
%<*driver>
\documentclass{l3doc}
@@ -78,7 +78,7 @@
% The value of a \texttt{BBox} is an array of four numbers that gives the
% coordinates of the left, bottom, right, and top edges
% of the structure element’s bounding box. That is the rectangle that completely encloses
-% its \emph{visible} content so not necessarly the TeX bounding box:
+% its \emph{visible} content so not necessarily the TeX bounding box:
% if \texttt{viewport} or \texttt{trim} is used and the
% graphic is not clipped, the visible content can be larger.
%
@@ -146,8 +146,8 @@
% \item[\texttt{artifact}] When used the graphic will be tagged as artifact. This doesn't
% require a \texttt{BBox} and so works also in some of the not yet supported cases described
% above.
-% \item[\texttt{false}] When used tagging will be stopped completly. It is then the
-% responsability of the surrounding code to add appropriate tagging commands.
+% \item[\texttt{false}] When used tagging will be stopped completely. It is then the
+% responsibility of the surrounding code to add appropriate tagging commands.
% \item[\meta{name}] Other values will be used as tag names in the structure. If the tag is not
% known as a structure tag you will get an warning from tagpdf. The default name is currently
% \texttt{Figure}
@@ -291,7 +291,7 @@
% ,\l_@@_graphic_trim_uy_fp
% }
% A bunch of fp-variables (we don't use tl-vars,
-% to avoid to have to take care about minus signs everwhere)
+% to avoid to have to take care about minus signs everywhere)
% \begin{macrocode}
\fp_new:N\l_@@_graphic_sin_fp
\fp_new:N\l_@@_graphic_cos_fp
@@ -489,7 +489,7 @@
\bool_set_true:N \l_@@_graphic_artifact_bool
\bool_set_false:N \l_@@_graphic_BBox_bool
}
- {false}{\tag_stop:}
+ {false}{\tag_suspend:n{Gin}}
}
{\tl_set:Nn\l_@@_graphic_struct_tl{#1}}
}
@@ -528,7 +528,7 @@
\bool_set_true:N \l_@@_graphic_artifact_bool
\bool_set_false:N \l_@@_graphic_BBox_bool
}
- {false}{\tag_stop:}
+ {false}{\tag_suspend:n{picture}}
}
{\tl_set:Nn\l_@@_graphic_struct_tl{#1}}
}
@@ -1012,7 +1012,7 @@
\@defaultunitsset\@tempdimc{#1}\unitlength
\Gin@tag@struct@begin
\setbox\@picbox\hb@xt@\@tempdimc\bgroup
- \tag_stop: %do not tag inside the picture box
+ \tag_suspend:n{\@picture} %do not tag inside the picture box
\@defaultunitsset\@tempdimc{#3}\unitlength
\hskip -\@tempdimc
\@defaultunitsset\@tempdimc{#4}\unitlength
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf b/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf
index 04e6d424d0..ab90c91a27 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-graphic.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx b/macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx
index ca79d8a67f..2f293ee492 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-marginpar.dtx
@@ -18,8 +18,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabmarginpardate{2024-02-12}
-\def\ltlabmarginparversion{0.85b}
+\def\ltlabmarginpardate{2024-09-18}
+\def\ltlabmarginparversion{0.85d}
%<*driver>
\documentclass[kernel]{l3doc}
@@ -72,7 +72,7 @@
% They can be tagged either as artifacts (if they are merely distracting decoration),
% as small headings before the paragraph, or as |Aside|. Unlike the PDF 1.7 fallback |Note|
% the structure |Aside| is not allowed inside |P|,
-% so if |Aside| is used, it must be placed before or after the current |P| in the surounding |text-unit|,
+% so if |Aside| is used, it must be placed before or after the current |P| in the surrounding |text-unit|,
% or it must split the |P|. Splitting is probably not so good as
% |\marginpar| is often used somewhere in the middle of sentence.
% The best default is probably to use |Aside|, find the parent |text-unit| and add it there.
@@ -153,13 +153,38 @@
\socket_new:nn {tagsupport/marginpar/end}{0}
% \end{macrocode}
% \end{socketdecl}
+%
+% \begin{macro}{\@@_get_marginpar_parent:N,\@@_get_marginpar_parent_aux:nn}
+% In a paragraph we must retrieve
+% the structure number of the surrounding Part structure
+% TODO: if this is needed in more places this should
+% go into tagpdf.
+% \begin{macrocode}
+\cs_new_protected:Npn\@@_get_marginpar_parent_aux:nn #1 #2
+ {
+ \str_if_eq:eeT{\use_ii:nn #1}{Part}{\seq_put_right:Nn\l_@@_tmpa_seq {#2}}
+ }
+\cs_new_protected:Npn \@@_get_marginpar_parent:N #1
+ {
+ \seq_clear:N\l_@@_tmpa_seq
+ \seq_map_pairwise_function:NNN
+ \g_@@_struct_tag_stack_seq
+ \g_@@_struct_stack_seq
+ \@@_get_marginpar_parent_aux:nn
+ \seq_put_right:Nn\l_@@_tmpa_seq {2}
+ \seq_get_left:NN \l_@@_tmpa_seq #1
+ }
+\cs_generate_variant:Nn \tag_struct_begin:n {e}
+% \end{macrocode}
+% \end{macro}
% \begin{plugdecl}{tagsupport/marginpar/begin,tagsupport/marginpar/end}
% \begin{macrocode}
\socket_new_plug:nnn {tagsupport/marginpar/begin}{default}
{
\if_mode_horizontal:
- \tag_mc_end:
- \tag_struct_begin:n{tag=Aside,parent=\g__tag_para_main_struct_tl}%
+ \tag_mc_end:
+ \@@_get_marginpar_parent:N \l_@@_tmpa_tl
+ \tag_struct_begin:e{tag=Aside,parent=\l_@@_tmpa_tl}%
\else:
\tag_struct_begin:n{tag=Aside}%
\fi:
@@ -202,9 +227,9 @@
\long\def\@ympar#1{%
\@savemarbox\@marbox{#1}%
\global\setbox\@currbox\copy\@marbox
- \tag_stop:
+ \tag_suspend:n{\@ympar}
\@xympar
- \tag_start:}
+ \tag_resume:n{\@ympar}}
% \end{macrocode}
% \end{macro}
%
@@ -223,9 +248,9 @@
\property_record:ee
{ tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}
}%
- \tag_stop:
+ \tag_suspend:n{\@xmpar}
\@savemarbox\@currbox{#2}%
- \tag_start:
+ \tag_resume:n{\@xmpar}
}
% \end{macrocode}
% order matters! the tagged box should be first so that it can pick up
@@ -233,15 +258,15 @@
% \begin{macrocode}
{
\@savemarbox\@currbox{#2}%
- \tag_stop:
+ \tag_suspend:n{\@xmpar}
\@savemarbox\@marbox{#1
\property_record:ee
{ tag_marginpar-opt-\int_use:N\g__kernel_marginpar_int }{page}}
- \tag_start:
+ \tag_resume:n{\@xmpar}
}
- \tag_stop:
+ \tag_suspend:n{\@xmpar}
\@xympar
- \tag_start:
+ \tag_resume:n{\@xmpar}
}
%</package>
% \end{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdf b/macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdf
index 1e9317d8f4..deb9172c2f 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-marginpar.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-math.dtx b/macros/latex-dev/required/latex-lab/latex-lab-math.dtx
index 0dbc591185..94d31c817b 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-math.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-math.dtx
@@ -19,13 +19,13 @@
% for those people who are interested or want to report an issue.
%
%
-\def\ltlabmathdate{2024-04-16}
-\def\ltlabmathversion{0.5j}
+\def\ltlabmathdate{2024-10-25}
+\def\ltlabmathversion{0.6i}
%
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
-\CodelineIndex
+\CodelineIndex
\usepackage{todonotes}
@@ -40,7 +40,7 @@
% \title{The \texttt{latex-lab-math} code\thanks{}}
% \author{Frank Mittelbach, Joseph Wright, \LaTeX{} Project}
% \date{v\ltlabmathversion\ \ltlabmathdate}
-%
+%
% \maketitle
%
% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
@@ -77,21 +77,21 @@
% \tableofcontents
%
% \section{Introduction}
-% \car*{Todo: update all the documentation! Both here and
+% \car*{Todo: update all the documentation! Both here and
% (what little there is!) in the implementation section.}
%
% Tagging math involves a variety of tasks that require that math is captured before the
% typesetting
-% \begin{itemize}
-% \item When typesetting the math MC-tags and structure commands must
-% be inserted at the begin and the end, and perhaps also around lines
-% or other subparts of the equation.
+% \begin{itemize}
+% \item When typesetting the math MC-tags and structure commands must
+% be inserted at the begin and the end, and perhaps also around lines
+% or other subparts of the equation.
% \item The source and/or a mathml-representation of the source must be available
% so that it can be (perhaps after some preprocessing) be used in an associated file
% or in an alternate text
-% \item It must be possible to measure the math for e.g. a bbox setting.
+% \item It must be possible to measure the math for, e.g., a bbox setting.
% \end{itemize}
-%
+%
% This file implements capture of all math mode material at the outer
% level, i.e., a formula is captured in its entirety with inner text
% blocks (possibly containing further math) absorbed as part of the
@@ -101,24 +101,24 @@
%\end{verbatim}
% would only result in a single capture of the tokens
% ``\verb*/a \in A \text{ for all $a<5$}/''.
-%
+%
%
% \section{Math capture} \label{sec:mathcapture}
-% In the current setup
+% In the current setup
% \begin{itemize}
% \item |$|, |\(...\)| and |$$| grab (through a command in \cs{everymath}/cs{everydisplay})
% if the boolean \cs{l_@@_collected_bool} is false.
% If the boolean is true they behave normally and can for example contain verbatim.
-%
-% \item All (registered) environments grab their body
+%
+% \item All (registered) environments grab their body
% regardless of the state of the boolean. For
-% |equation|, |equation*| and |math| this is a change as they no longer can
+% |equation|, |equation*| and |math| this is a change as they no longer can
% contain verbatim.
-%
+%
% \item BUG: |\[...\]| grabs if \cs{l_@@_collected_bool} is false. If it is
-% true it falls back to |equation*| and then errors because this can't find the end.
-% \end{itemize}
-%
+% true it falls back to |equation*| and then errors because this can't find the end.
+% \end{itemize}
+%
% \subsection{Code level interfaces}
%
% \begin{function}{\math_register_env:n, \math_register_env:nn}
@@ -163,49 +163,52 @@
% material.
% \end{itemize}
% \end{function}
-%
+%
% \section{Math tagging}
-%
-% The tagging code has to handle
+%
+% \subsection{Code requirements}
+% The tagging code has to handle
% \begin{itemize}
-% \item the embedding into the surrounding. This means
-% \begin{itemize}
-% \item closing and reopening MC-chunks
+% \item the embedding into the surrounding. This means
+% \begin{itemize}
+% \item closing and reopening MC-chunks
% \item closing and reopening text/P-structures
% \item handling interferences of the tagging code with penalties and spacing.
% \end{itemize}
% \item the actual tagging which means to do some or all of the following tasks:
% \begin{itemize}
% \item setup content for an associated source file
-% \item setup content for an associated mathml file
+% \item setup content for an associated mathml file
% \item setup content for the /Alt key
% \item setup content for the /ActualText key
% \item setup attributes
-% \item add associated files
+% \item add associated files
% \item add a Formula structure
-% \item surround subparts (e.g. lines) with Formula sub structures
+% \item surround subparts (e.g., lines) with Formula sub structures
% (perhaps with their own set of additional content)
-% \item surround elements of the equation with mathml structure elements
+% \item surround elements of the equation with mathml structure elements
% (currently only luatex with luamml)
% \end{itemize}
% \end{itemize}
-%
+%
% \subsection{Inline math}
-%
+%
% The embedding code is added through
-% the sockets
+% the sockets
% \begin{itemize}
-% \item |tagsupport/math/inline/begin|
+% \item |tagsupport/math/inline/begin|
% \item |tagsupport/math/inline/end|
-% \end{itemize}
+% \end{itemize}
% The sockets simply push and pop the MC currently. Without
-% tagging they use the noop-plug.
-%
+% tagging they use the noop-plug.
+%
% The actual tagging is in done through the sockets
% \begin{itemize}
% \item |tagsupport/math/inline/formula/begin|
% This socket takes the math as argument and its code
-% should output it for typesetting. Without tagging the
+% should output it for typesetting.
+% It is not \emph{used} as a tagging socket as the math argument should
+% not be lost without tagging, so without tagging the
% socket uses the identity plug.
% The |default| plug of the socket calls these three internal sockets
% for the tagging support:
@@ -216,55 +219,62 @@
% \item |tagsupport/math/struct/begin| This calls \cs{tag_struct_begin:n}.
% It should also write the associated files if needed.
% \item |tagsupport/math/substruct/begin| this handles subparts.
-% TODO: does it really make sense in inline math to have that??
+% TODO: does it really make sense in inline math to have that??
% \end{itemize}
% \item |tagsupport/math/inline/formula/end|
% This socket ends the formula structure(s). The |default|
% plug calls these internal sockets:
% \begin{itemize}
% \item |tagsupport/math/substruct/end|
-% \item |tagsupport/math/struct/end|
+% \item |tagsupport/math/struct/end|
% \end{itemize}
-% \end{itemize}
-%
+% \end{itemize}
+%
% \subsection{Display math}
-%
+%
% \textit{to be written}
-%
+%
% \subsection{Associated Files}
-%
+%
% The current code allows the attachment of two types of associated file to the
% Formula structure:
-% the \LaTeX\ source and a MathML representation.
+% the \LaTeX\ source and a MathML representation.
% Technically both can be attached---AF is an array
-% of file references---practically there can be problems with PDF consumers:
-% e.g. ngpdf used both and so showed the equation twice
-% (this has been corrected in the newest version) and
+% of file references-----in practice there can be problems with PDF consumers:
+% e.g., ngpdf used both and so showed the equation twice
+% (this has been corrected in the newest version) and
% Foxit seems to see only the first AF in the array (so we attach the
% mathml as first file).
-%
-% The \LaTeX\ source can be (and is) attached automatically.
+%
+% The \LaTeX\ source can be (and is) attached automatically.
% It can be suppressed by an option with
-% \texttt{math/tex/AF=false}, see below.
-%
-% The MathML is attached if a file |\jobname-mathml.html| is found and
-% if it contains a suitable MathML snippet for the current formula.
+% \texttt{math/tex/AF=false}, see below.
+%
+% The MathML is attached if the files |\jobname-mathml.html| and/or
+% |\jobname-luamml-mathml.html| are found
+% and if they contains a suitable MathML snippet for the current formula.
+% If the files contain more than one suitable snippet (as identified by the hash)
+% the first one is used.
+% |\jobname-luamml-mathml.html| is automatically generated (see below section~\ref{sec:luamml})
+% and read after |\jobname-mathml.html|. This means that |\jobname-mathml.html| can contain
+% improved versions of a formula.
+%
% The MathML processing can be suppressed globally by emptying the list of
% mathml files with |math/mathml/sources=|. Locally for a formula |math/mathml/AF=false|
-% can be used.
-%
-% For a MathML representation a file with such representations must be provided.
-% If the equation is numbered the numbering should be part of the MathML as
+% can be used.
+%
+% For a MathML representation a file with such representations must be provided.
+% If the equation is numbered the numbering should be part of the MathML as
% the |Lbl| substructure is ignored if an MathML is used (see https://github.com/foxitsoftware/PDF_UA-2).
-%
-% The MathML representation is given in a special format.
+%
+% The MathML representation is given in a special format.
% It is meant to be a valid html file
% that can be viewed in a browser.
% For this it can start with |<!DOCTYPE html><html>| and end with |</html>|
-% It should have the extension \texttt{.html}. The \meta{mathml} content
+% It should have the extension \texttt{.html}. The \meta{mathml} content
% is read with special catcodes, so can contain ambersands, hashes, comment chars
% and unmatched braces such as |<mo>{</mo>|
-%
+%
% The file should contain a number of representations in this format:
% \begin{quote}
% |<div>| \\
@@ -278,176 +288,338 @@
% \end{quote}
% The keywords |<div>|, |<h2>\mml|, |<p>|, |<math|, |</math>| |</div>| are required as
% they are used to delimit the arguments by the \LaTeX{} code.
-%
+%
% \meta{key} and \meta{source} are only used for debugging, they help to identify
% the equation referred by this representation. The source should be used correctly escaped
% |&| and |<| so that if gives valid html!
-%
-% \meta{attributes} is not required either, but can e.g. contain attributes
+%
+% \meta{attributes} is not required either, but can, e.g., contain attributes
% to improve the display in a browser:
% \begin{verbatim}
% <math alttext="\mathbf{G}" class="ltx_Math" display="inline">
% \end{verbatim}
% It can also contain the name space declaration: |xmlns="http://www.w3.org/1998/Math/MathML"|%
% \footnote{But it is probably not needed and only blows up the PDF.}
-%
-%
-% By default the code tries at the begin of the document
-% to read a file |\jobname-mathml.html| in the |html|-format.
-% The file name can be changed with |mathml/setfiles={filename1,filename2}|
-% (without extension, |html| is added automatically).
-% If there is a list, all files are loaded.
+%
+%
+% By default the code tries at the begin of the document
+% to read a file |\jobname-mathml.html| in the |html|-format.
+% The file name can be changed with |mathml/setfiles={filename1,filename2}|
+% (without extension, |html| is added automatically).
+% If there is a list, all files are loaded.
% If a file doesn't exist it is ignored, only an info is written to the log.
-%
-% Currently every MathML-snippet from a file is embedded into the PDF,
-% it is not checked first if it is actually used (simply writing everything to the PDF
-% is a bit easier than keeping everything in memory and also means that
-% the snippets are one after the other in the PDF).
-%
-% As mentioned above the MathML-AF can be suppressed for the equations in a group with
+%
+% Currently every MathML-snippet from a file is embedded into the PDF,
+% it is not checked first if it is actually used (simply writing everything to the PDF
+% is a bit easier than keeping everything in memory and also means that
+% the snippets are one after the other in the PDF).
+%
+% As mentioned above the MathML-AF can be suppressed for the equations in a group with
% |math/mathml/AF=false|, or
-% completly by setting |math/mathml/sources=| in the preamble.
-%
+% completely by setting |math/mathml/sources=| in the preamble.
+%
% Files embedded in a PDF can be listed in the attachments panel of a PDF viewer.
% This is probably not so useful for lots of small files (but one could create
-% collections), but as long as PDF editors or viewers don't offer
+% collections), but as long as PDF editors or viewers don't offer
% proper support to access the AF it can help so have them there. The MathML are
% added by default, but the \LaTeX{} source not. This can be changed with
% |viewer/pane/mathsource=true| (anywhere in the document) and |viewer/pane/mathml=false| (in the
-% preamble, before the external file is read).
+% preamble, before the external file is read).
+%
+%
+% \subsection{Automatic mathml creation with luamml}\label{sec:luamml}
+%
+% If lualatex and the package \pkg{unicode-math} is used
+% the package \texttt{luamml} is loaded and
+% will automatically generate the file |\jobname-luamml-mathml.html|
+% with mathml representations of all math formulas.
+% This file is then used in subsequent compilations and works also with
+% pdflatex.
+%
+% The generation of the file can be suppressed (in the preamble)
+% with |math/mathml/luamml/write=false|.
%
-% \subsection{Options}
-%
-%
+% If the package \pkg{unicode-math} is not used,
+% the loading of \pkg{luamml} and with it the generation of the file can be forced
+% with |math/mathml/luamml/load=true| or |math/mathml/luamml/write=true|
+% but be aware that it is then possible that various symbols
+% are mapped to the wrong Unicode code points.
+%
+% The package \pkg{luamml} is still quite experimental and the output should be checked.
+% The |\jobname-luamml-mathml.html| file may be previewed in a browser although
+% you may need to add additional css or javascript declarations
+% to enable browser support for all mathml constructs.
+%
+%
+% \subsection{Summary of math options}
+% The following options exist to make math more accessible:
+% \begin{description}
+% \item[ActualText] An \texttt{ActualText} can be placed on structure elements,
+% but can also be added in the stream on a \texttt{BDC} marker with a \texttt{Span}
+% tag (normally an independant marker without an MCID number, it is not clear yet
+% if it can be used on a MC-chunk).
+% The content is a text string, typically one or a few Unicode characters.
+% \texttt{ActualText} is meant to replaces the content
+% and should only be used on small entities,
+% e.g., to define the semantic or the Unicode code point of a symbol.
+% \texttt{ActualText} is not supported by all PDF reader.
+% It is also unknown where it should be used at best (in a structure element,
+% or on an independent Span-BDC) and what happens if it is used in more than
+% one place.
+% \begin{description}
+% \item[enabled by default?] False
+% \item[how to enable/disable] No interface yet.
+% \texttt{ActualText} can only be added on the Formula structure element by
+% changing the \texttt{tagsupport/math/content} or some other socket.
+% For a BDC marker one can, e.g., use
+% \begin{verbatim}
+% \pdf_string_from_unicode:nnN{utf16/hex}{€}\l_tmpa_tl
+% \pdf_bdc:ee{Span}{/ActualText\l_tmpa_tl}content\pdf_emc:
+% \end{verbatim}
+% There should be no pagebreak in the \meta{content} and the BDC should be correctly
+% nested into tagging, so, e.g., a \cs{leavevmode} should be issued before the bdc command.
+% \item[Consumer support] in part and in part buggy, needs tests \ldots
+% \end{description}
+%
+% \item[Alt] Like \texttt{ActualText} the \texttt{Alt} key can be used on
+% structure elements and on \texttt{Span} in the stream. It should contain a description
+% of the content and is mainly meant for images. PDF/UA-1,
+% which views math formulas as illustrations, mandates the key
+% also for \texttt{Formula} structure elements.
+% \begin{description}
+% \item[enabled by default?] false unless PDF/UA-1 is detected,
+% then it is enabled in the begindocument/end hook
+% (this will reconsidered when it is clear, that
+% the use of \texttt{Alt} does not shadow mathml). It can be enabled for
+% all engines and PDF versions.
+% \item[enable/disable] \verb+\tagpdfsetup{math/alt/use}+ (local boolean,
+% so can be used on individual equations)
+% \item[default value] A template text (stored in \cs{l_@@_content_template_tl})
+% starting with \texttt{LaTeX formula starts}.
+% \item[user value] No interface currently provided. This needs optional arguments
+% or an external setup command.
+% See \url{https://github.com/latex3/tagging-project/discussions/717}.
+%
+% \end{description}
+%
+% \item[source-AF] The \LaTeX{}-source of the equation can
+% be attached as an associated file with mime-type
+% application/Fx-tex. The \texttt{AFRelationship} is \texttt{Source}.
+% The source is embedded without expansion. This means that targets of
+% references and macros are not resolved.
+% The files are by default not shown in the EmbeddedFiles pane,
+% this can be enabled with |viewer/pane/mathsource=true|.
+% If an A-standard is used, it must be one that allows embedded files, e.g., A-4f.
+%
+% \begin{description}
+% \item[enabled by default?] true for all engines and PDF versions
+% \item[enable/disable] \verb+\tagpdfsetup{math/tex/AF}+ (local boolean, so can
+% be used on individual equations)
+% \item[default value] source code including dollars or environment name.
+% \item[consumer support] Currently only ngpdf makes
+% use of it: if there is no mathml it passes the source to mathjax.
+% \end{description}
+%
+% \item[luamml] The following options make (with lualatex) use
+% of the \pkg{luamml} package. \pkg{luamml} is currently automatically
+% loaded (at the end of the preamble) if \pkg{unicode-math} has been detected.
+% The loading can be forced or suppressed
+% with \verb+\tagpdfsetup{math/mathml/luamml/load=true/false}+.
+%
+% \pkg{luamml} affects all math, locally it can be stopped with |math/mathml/ignore|,
+% or by using the commands described in the package.
+%
+% \item[mathml-AF] A mathml representation of the equation can be attached
+% to the structure. The configuration possibilities are rather complex as the
+% keys have to control three different tasks:
+% The \emph{generation} of the file with the mathml fragments,
+% the \emph{reading} and \emph{embedding} of the mathml fragments,
+% and the \emph{association} of a mathml fragment to a specific equation.
+%
+% \begin{description}
+% \item[generation]
+% With pdf\LaTeX{} mathml fragments can not be generated automatically,
+% but a file with dummy fragments for every equation will be written if
+% \verb+\tagpdfsetup{math/mathml/write-dummy}+ is issued in the preamble.
+%
+% With lua\LaTeX{} a file with mathml fragments will be created automatically
+% if the package \pkg{luamml} has been loaded (see above).
+%
+% \item[reading and embedding]
+% By default the code will read and embed
+% mathml from |\jobname-mathml.html| and |\jobname-luamml-mathml.html| in this order and
+% the first fragment with a new hash value will be inserted.%
+% The list of sources and their order can be changed with the key
+% |math/mathml/sources|, setting that to an empty value suppresses
+% the loading mathml associated files completely. For efficiency reasons
+% it embeds math fragments directly, there is no check yet if the fragment is
+% actually used.
+%
+% The files are by default shown in the EmbeddedFiles pane,
+% this can be disabled with |viewer/pane/mathml=false|.
+%
+% \item[attaching] A mathml fragment is currently
+% attached as an associated file to an Formula if the hash of
+% the source matches the hash of the fragment. This is not a perfect test:
+% equations with the same source and so the same hash
+% can have different mathml representation, e.g.,
+% if there are references or commands or counters in the equation. This
+% will change in a feature version.
+% The attachment can be suppressed locally with |math/mathml/AF=false|.
+% The mathml fragment will still be embedded in the PDF!
+%
+% % TODO: adapt test
+% \end{description}
+%
+% \item[mathml structure elements]
+% Mathml structure elements can be used in PDF~2.0 directly.
+% In PDF~1.7. one could theoretically
+% use them if one declares a role mapping first,
+% (this can be done with \verb+\tagpdfsetup{role/mathml-tags}+)
+% which maps all to \texttt{Span}. But such a role mapping currently breaks reading,
+% e.g. in Adobe, and so it is not recommended.
+%
+% Automatic generation of structure elements is only possible with
+% lualatex. It requires that the packages \pkg{luamml} and \pkg{tagpdf}
+% have been loaded.
+% \begin{description}
+% \item[enabled by default?] false
+% \item[enable/disable] \verb+\tagpdfsetup{math/mathml/structelem}+
+% (local setting, so can be used with grouping on individual equations).
+% \item[consumer support] Needs more tests.
+% \end{description}
+%
+% \end{description}
+%
+%
+%
% \section{Known current bugs, etc.}
-% \car*{New Section, now with subsections.\\
-% As indicated, these lists are probably incomplete.\\
-% Some of these have been addressed in a more recent branch.}
%
% \subsection{Capture/grabbing problems}
-%
+%
% \begin{enumerate}
-% \item Incorrect grabbing of |$|-math when there is also
-% explicit |$|-math within a \textit{text environment}
+% \item Incorrect grabbing of |$|-math when there is also
+% explicit |$|-math within a \textit{text environment}
% that is itself within the math that should all be grabbed.
% For example,
% \begin{verbatim}
% $a\begin{minipage}{1cm}$b$\end{minipage}$
% \end{verbatim}
% would only result in the capture of the tokens
-% ``\verb*/a\begin {minipage}{1cm}/''.
+% ``\verb*/a\begin {minipage}{1cm}/''.
% This can be avoided by an additional brace group:
% \begin{verbatim}
% $a{\begin{minipage}{1cm}$b$\end{minipage}}$
-% \end{verbatim}
-%
+% \end{verbatim}
+%
% \item Similar incorrect grabbing with |$$| also.
-%
+%
% \item The grabbing, for all the display environments (and |\) \]|), needs
-% to deal with nesting: \pkg{amsmath} contains code for this.
-%
-% \item The math can't contain verbatim and verbatim-like commands. This is
+% to deal with nesting: \pkg{amsmath} contains code for this.
+%
+% \item The math can't contain verbatim and verbatim-like commands. This is
% nothing new for the \pkg{amsmath} environments but changes |$| and |\[\]|
-% and |equation*| (see e.g. tagging-project issue \#30).
-%
+% and |equation*| (see, e.g., tagging-project issue \#30).
+%
% \item Begin and end of the math or math environment can not be hidden in commands.
-% For example \verb+>{$}l<{$}+ in a tabular would lead to errors.
-% Defining |\[| to fall back to |equation*| doesn't work if |equation*| is
+% For example \verb+>{$}l<{$}+ in a tabular would lead to errors.
+% Defining |\[| to fall back to |equation*| doesn't work if |equation*| is
% a grabbing environment.
-%
+%
% \item The behaviour of |\[...\]| is faulty. See above.
-% \end{enumerate}
+% \end{enumerate}
%
% \subsection{Fake math}
-% In a number of places in \LaTeX{} math commands (mainly |$|) is used
-% only for technical reason, e.g. to access a math font, to setup a symbol
-% or to use \cs{vcenter}.
-%
+% In a number of places in \LaTeX{} math commands (mainly |$|) is used
+% only for technical reason, e.g., to access a math font, to setup a symbol
+% or to use \cs{vcenter}.
+%
% The code identifies such fake math mostly by making use of the \cs{m@th} command
% where two methods are used for the automatic detection:
-%
+%
% \begin{itemize}
-% \item After grabbing math content the code checks if the content contains the token
+% \item After grabbing math content the code checks if the content contains the token
% \cs{m@th} and if yes it doesn't call the processor before reinserting
% the content and perhaps adding tagging code.
% This method requires that the math can be grabbed (e.g. that the end dollar is visible)
% and that the \cs{m@th} is visible. It applies for example in \cs{@iiiparbox} where the
% code from |$\vcenter| to |\m@th$| is grabbed an put back. It does not work for
% example for |tabular| where the dollars and the \cs{m@th} token are spread around
-% over three commands. |tabular| needs therefore manual intervention.
-%
+% over three commands. |tabular| needs therefore manual intervention.
+%
% A look in the list of usages (in \texttt{usage-of-m@th.md}) justifies this approach.
% All usages are either not math at all, or related to small elements that probably
-% shouldn't be grabbed and processed on their own.
+% shouldn't be grabbed and processed on their own.
%
% \item \cs{m@th} is redefined so that it sets the boolean \cs{l_@@_collected_bool}
% to true. If \cs{m@th} is used inside math that has been grabbed
% this doesn't change much as the boolean is set by the grabbing anyway. For usages
% outside math the benefit is not so clear: The setting avoids that in \cs{LaTeXe}
% the epsilon is processed as math, but it also prevents that the content of the amsmath
-% command \cs{boxed} is processed as math.
+% command \cs{boxed} is processed as math.
% It means that if one wants to reenable math processing inside some (fake) math
% one has to do it after \cs{m@th} calls.
% \end{itemize}
-%
-% Open problems
+%
+% \subsubsection{Open problems}
+%
% \begin{enumerate}
% \item The grabbing code doesn't pass the info that it detected a \cs{m@th} token.
% This means that the tagging code has to do the same check (and doesn't do this
% in all cases yet).
-%
-% \item Commands are missing to locally disable the grabbing and processing, e.g.
+%
+% \item Commands are missing to locally disable the grabbing and processing, e.g.,
% to handle |tabular|.
-%
+%
% \item It must be checked if setting the boolean in \cs{m@th} really makes sense
-% or if commands like \cs{LaTeXe} should be handled manually.
-%
+% or if commands like \cs{LaTeXe} should be handled manually.
+%
% \end{enumerate}
-%
+%
% \subsection{Processor}
-%
+%
% The grabbed math is at first passed to the processor. The processor is not called
-% in a measuring phase (from the amsmath \cs{ifmeasuring@}) and if the \cs{m@th}
-% token is detected.
+% in a measuring phase (from the amsmath \cs{ifmeasuring@}) and if the \cs{m@th}
+% token is detected.
% It is not quite clear what purpose the processor has. As it is a public interface
% it can't be used for internal code. And typesetting happens later and the processor
% can't really change this. Currently it is mostly used for debugging and messages.
% If the \cs{m@th} is found the \cs{l_@@_fakemath_bool} is set, so if the code
% is changed this must be preserved.
-%
+%
% \subsection{Other problems}
-%
-% \begin{enumerate}
-% \item
+%
+% \begin{enumerate}
+% \item
% The presence of \cs{m@th} in association with \cs{ensuremath}
-% does not necessarily indicate fakemath. This is because
-% wanting mathsurround to be zero is very reasonable and common,
+% does not necessarily indicate fakemath. This is because
+% wanting mathsurround to be zero is very reasonable and common,
% \emph{even when the math is genuine} (and hence needs to be collected).
-%
-% TODO: this claim needs some examples.
-%
-% \item User-defined environments can create problems; but this area, of
-% new, copied and changed environments, has not yet been developed.
-%
+%
+% TODO: this claim needs some examples.
+%
+% \item User-defined environments can create problems; but this area, of
+% new, copied and changed environments, has not yet been developed.
+%
% \car*{Joseph wrote, inter alia:\\
% My thinking [regarding] \cs{RegisterMathEnvironment}\\
% - (New) Math environments should not be created-then-patched, but only
-% generated by a [(future)] dedicated command (\cs{DeclareMathEnvironment},
+% generated by a [(future)] dedicated command (\cs{DeclareMathEnvironment},
% presumably)\\
% - Math environments created with \pkg{ltcmd} [commands] should not be copied, . . .\\
% - Package authors should be able to manually set up math environments with a public boolean.}
-% \end{enumerate}
+% \end{enumerate}
%
%
% \subsection{Other ToDos}
%
% \begin{enumerate}
-% \item Add (some of) the math display commands that were \enquote{lifted from
+% \item Add (some of) the math display commands that were \enquote{lifted from
% plain}, e.g., \cs{displaylines} \cs{eqalign}(??).
% \item The breqn packages changes catcodes and that isn't yet covered
% by our mechanism.
% \item \cs{intertext} is not correctly taken into account by the
-% code splitting multiline math into subformulas.
+% code splitting multiline math into subformulas.
% \end{enumerate}
%
%
@@ -494,7 +666,7 @@
% neatly.
% \begin{macrocode}
\AddToHook{begindocument/before}{ \RequirePackage { amsmath } }
-% \end{macrocode}
+% \end{macrocode}
%
%
% \subsection{Data structures}
@@ -502,7 +674,7 @@
% \begin{variable}{\l_@@_collected_bool}
% Tracks whether math mode material has been collected, which happens inside
% \pkg{amsmath} environments as well as those handled directly here.
-% If true following math will not grab and/or process.
+% If true following math will not grab and/or process.
% See \ref{sec:mathcapture} for details.
% \begin{macrocode}
\bool_new:N \l_@@_collected_bool
@@ -511,7 +683,7 @@
%
% \begin{variable}{\l_@@_fakemath_bool}
% Tracks whether math mode material has been identified as fake math during
-% the grabbing phase, which happens currently if the
+% the grabbing phase, which happens currently if the
% grabbed contents contains the \cs{m@th} token.
%
% \begin{macrocode}
@@ -532,20 +704,21 @@
\tl_new:N \g_@@_grabbed_math_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{\l_@@_tmpa_tl,\l_@@_tmpa_skip,\l_@@_tmpa_str}
% Temporary variables
% \begin{macrocode}
\tl_new:N \l_@@_tmpa_tl
\skip_new:N \l_@@_tmpa_skip
+\str_new:N \l_@@_tmpa_str
% \end{macrocode}
% \end{variable}
%
% \begin{variable}{\l_@@_content_alt_tl,
% \l_@@_content_actual_tl,
% \l_@@_content_AF_tl}
-% Temporary variables to hold math content that should
-% be used in actual or alt text and stored as AF.
+% Temporary variables to hold math content that should
+% be used in actual or alt text and stored as AF.
% \begin{macrocode}
\tl_new:N \l_@@_content_alt_tl
\tl_new:N \l_@@_content_actual_tl
@@ -554,15 +727,15 @@
\tl_new:N \l_@@_content_AF_mathml_tl
% \end{macrocode}
% \end{variable}
-%
+%
% \subsection{Tagging tools}
-% The following commands implement small tagging code chunks.
+% The following commands implement small tagging code chunks.
% This should probably be collected and moved into tagpdf later.
% \begin{macro}{\__tag_tool_close_P:}
% This closes a P/text-chunk, both the MC and the structure and
% increases the counter manually.
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_tool_close_P:
+\cs_new_protected:Npn \__tag_tool_close_P:
{
\tag_if_active:T
{
@@ -574,14 +747,14 @@
}
% \end{macrocode}
% \end{macro}
-%
-% We add also an attribute.
-% \begin{macrocode}
+%
+% We add also an attribute.
+% \begin{macrocode}
\tl_new:N\l_@@_attribute_class_tl
\tagpdfsetup
{role/new-attribute = {inline} {/O /Layout /Placement/Inline},
role/new-attribute = {display} {/O /Layout /Placement/Block},
- }
+ }
% \end{macrocode}
%
% \subsection{Code related to AF}
@@ -592,8 +765,12 @@
% \l__tag_math_mathml_AF_bool,
% \g__tag_math_mathml_AF_bool,
% \l__tag_math_mathml_pane_bool,
-% \l__tag_math_alt_bool
+% \l__tag_math_alt_bool,
+% \g__tag_math_luamml_tl,
% }
+% The variable \cs{g__tag_math_luamml_tl} is initially 0 and
+% the user key can set it to -1 or 1. This allows to distinguish
+% the unset case from a value set by the user.
% \begin{macrocode}
\bool_new:N\l__tag_math_texsource_AF_bool
\bool_new:N\l__tag_math_texsource_pane_bool
@@ -601,9 +778,11 @@
\bool_new:N\g__tag_math_mathml_AF_bool
\bool_new:N\l__tag_math_mathml_pane_bool
\bool_new:N\l__tag_math_alt_bool
+\tl_new:N\g__tag_math_luamml_tl
+\tl_gset:Nn\g__tag_math_luamml_tl {0}
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{variable}{
% \g_@@_mathml_total_int,
% \g_@@_mathml_int,
@@ -613,13 +792,13 @@
% }
% \cs{g_@@_mml_total_int} records the mathml fragments read in.
% \cs{g_@@_mml_int} records the mathml fragments read in with a different hash.
-% \cs{g_@@_AF_total_int} records the number of math structures that try to
-% attach a mathml AF.
+% \cs{g_@@_AF_total_int} records the number of math structures that try to
+% attach a mathml AF.
% \cs{g_@@_AF_found_int} records the number of math structures for which a fitting
-% mathml is found.
+% mathml is found.
% \cs{g_@@_AF_attached_int} records the number of math structures which got a mathml fragment
% (if mathml-AF are not disabled locally this should be the equal to the previous number.
-%
+%
% \begin{macrocode}
\int_new:N\g_@@_mathml_total_int
\int_new:N\g_@@_mathml_int
@@ -631,13 +810,15 @@
%
% \begin{variable}{\l__tag_math_mathml_files_clist}
% A sequence to store the file list for the mathml.
+% We also check the luamml file.
% \begin{macrocode}
\clist_new:N\l__tag_math_mathml_files_clist
-\clist_put_right:Ne\l__tag_math_mathml_files_clist {\c_sys_jobname_str-mathml}
+\clist_put_right:Ne\l__tag_math_mathml_files_clist
+ {\c_sys_jobname_str-mathml,\c_sys_jobname_str-luamml-mathml}
% \end{macrocode}
% \end{variable}
-
-% This is the internal variant of the \cs{mml} command.
+%
+% This is the internal variant of the \cs{mml} command.
% \begin{macro}{\@@_AF_mml:nnnn}
% \begin{macrocode}
\cs_new_protected:Npn \@@_AF_mml:nnnn #1 #2 #3 #4
@@ -653,22 +834,22 @@
% \end{macrocode}
% a simple Desc key, take care that it is a valid string!
% \begin{macrocode}
- \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(mathml-#1)}
+ \pdfdict_put:nne {l_pdffile/Filespec} {Desc}{(mathml-#1)}
\pdffile_embed_stream:nnN {#4}{mathml-#1.xml}\l_@@_tmpa_tl
% \end{macrocode}
-% not strictly necessary but makes the files visible in the file attachment
-% page
+% not strictly necessary but makes the files visible in the file attachment
+% page
% \begin{macrocode}
\bool_if:NT \l__tag_math_mathml_pane_bool
{\pdfmanagement_add:nne {Catalog/Names}{EmbeddedFiles}{\l_@@_tmpa_tl}}
\tl_new:c{g_@@_mathml_#3_tl}
- \tl_gset_eq:cN{g_@@_mathml_#3_tl}\l_@@_tmpa_tl
+ \tl_gset_eq:cN{g_@@_mathml_#3_tl}\l_@@_tmpa_tl
}
- }
+ }
% \end{macrocode}
% \end{macro}
%
-% The html reader.
+% The html reader.
% \begin{macrocode}
\cs_new_protected:Npn \@@_AF_html_reader:w#1</h2>#2<p>#3</p>#4<p>#5</p>#6<math{
\begingroup
@@ -685,39 +866,382 @@
\@@_AF_mml:nnnn{#1}{#2}{#3}{#4}
}
% \end{macrocode}
+%
+% As with luatex we write two files we define a few constants for
+% the shared texts.
+%
+% \begin{macro}
+% {\c_@@_mathml_write_init_tl,\l_@@_mathml_write_before_tl,
+% \c_@@_mathml_write_after_tl,\c_@@_mathml_write_final_tl}
+% \begin{macrocode}
+\tl_const:Nn \c_@@_mathml_write_init_tl
+ {
+ <!DOCTYPE~html>
+ \iow_newline:
+ <html>
+ \iow_newline:
+ }
+\tl_new:N \l_@@_mathml_write_before_tl
+\tl_const:Nn \c_@@_mathml_write_after_tl
+ {
+ \iow_newline:
+ </div>
+ \iow_newline:
+ }
+\tl_const:Nn \c_@@_mathml_write_final_tl
+ {
+ </html>
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{socketdecl}{tagsupport/math/mathml/write/prepare}
+% To prepare the hash and the starting command we use a socket, so
+% that both the dummy and luamml can make use of it.
+% \begin{macrocode}
+\socket_new:nn {tagsupport/math/mathml/write/prepare}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{plugdecl}{On}
+% \begin{macrocode}
+\socket_new_plug:nnn{tagsupport/math/mathml/write/prepare}{On}
+ {
+ \str_set:NV\l_@@_tmpa_str\l_@@_content_AF_source_tl
+ \str_replace_all:Nnn\l_@@_tmpa_str{&}{&amp;}
+ \str_replace_all:Nnn\l_@@_tmpa_str{<}{&lt;}
+ \tl_set:Nn \l_@@_mathml_write_before_tl
+ {
+ <div>
+ \iow_newline:
+ <h2>\c_backslash_str mml\c_space_tl \int_use:N \g_@@_math_total_int </h2>
+ \iow_newline:
+ <p>\l_@@_tmpa_str</p>
+ \iow_newline:
+ <p>\l_@@_content_hash_tl </p>
+ \iow_newline:
+ }
+ }
+% \end{macrocode}
+% \end{plugdecl}
+%
+% With luatex we automatically generate mathml with \pkg{luamml} if the package
+% can be loaded and \pkg{unicode-math} is detected.
+% We start the process in the begindocument/end hook
+% so that the reading from a previous compilation can happen before!
%
+% For other engines, for future name changes
+% and in case luamml is not loaded we provide
+% some commands
+% \begin{macrocode}
+\cs_new_protected:Npn\@@_provide_luamml_commands:
+ {
+ \providecommand\luamml_flag_structelem:{}
+ \cs_if_free:NT \luamml_structelem:
+ {
+ \cs_set_eq:NN\luamml_structelem:\luamml_flag_structelem:
+ }
+ \providecommand\luamml_flag_process:{}
+ \cs_if_free:NT \luamml_process:
+ {
+ \cs_set_eq:NN\luamml_process:\luamml_flag_process:
+ }
+ \providecommand\luamml_flag_ignore:{}
+ \cs_if_free:NT \luamml_ignore:
+ {
+ \cs_set_eq:NN\luamml_ignore:\luamml_flag_ignore:
+ }
+ }
+% \end{macrocode}
+% \begin{macrocode}
+\sys_if_engine_luatex:TF
+ {
+% \end{macrocode}
+% Temporary (!) fixes for endarray
+% \begin{macrocode}
+ \cs_new_protected:Npn \@@_correct_luamml_array_patches:
+ {
+ \AddToHook{package/array/after}
+ {
+ \cs_set:Npn \endarray
+ {
+ \tbl_crcr:n{endarray}
+ \__luamml_array_save_array:
+ \egroup
+ \UseTaggingSocket{tbl/finalize}
+ \tbl_restore_outer_cell_data:
+ \egroup
+ \mode_if_math:T { \__luamml_array_finalize_array: }
+ \@arrayright
+ \gdef \@preamble {}
+ }
+ \cs_set:Npn \@classz
+ {
+ \@classx
+ \@tempcnta \count@
+ \prepnext@tok
+ \@addtopreamble {
+ \ifcase \@chnum
+ \hfil
+ \hskip 1sp
+ \d@llarbegin
+ \cs_if_eq:NNTF \d@llarbegin \begingroup {
+ \insert@column
+ \d@llarend
+ } {
+ \__luamml_array_init_col:
+ \insert@column
+ \luamml_flag_save:nn {} {mtd}
+ \d@llarend
+ \__luamml_array_finalize_col:w 0~
+ }
+ \do@row@strut
+ \hfil
+ \or
+ \hskip 1sp
+ \d@llarbegin
+ \cs_if_eq:NNTF \d@llarbegin \begingroup {
+ \insert@column
+ \d@llarend
+ } {
+ \__luamml_array_init_col:
+ \insert@column
+ \luamml_flag_save:nn {} {mtd}
+ \d@llarend
+ \__luamml_array_finalize_col:w 1~
+ }
+ \do@row@strut
+ \hfil
+ \or
+ \hfil
+ \hskip 1sp
+ \d@llarbegin
+ \cs_if_eq:NNTF \d@llarbegin \begingroup {
+ \insert@column
+ \d@llarend
+ } {
+ \__luamml_array_init_col:
+ \insert@column
+ \luamml_flag_save:nn {} {mtd}
+ \d@llarend
+ \__luamml_array_finalize_col:w 2~
+ }
+ \do@row@strut
+ \or
+ \setbox \ar@mcellbox \vbox \@startpbox { \@nextchar }
+ \insert@pcolumn
+ \@endpbox
+ \ar@align@mcell
+ \do@row@strut
+ \or
+ \vtop \@startpbox { \@nextchar }
+ \insert@pcolumn
+ \@endpbox
+ \do@row@strut
+ \or
+ \vbox \@startpbox { \@nextchar }
+ \insert@pcolumn
+ \@endpbox
+ \do@row@strut
+ \fi
+ }
+ \prepnext@tok
+ }
+ }
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \AddToHook{begindocument/before}
+ {
+ \str_case:on \g_@@_luamml_load_tl
+ {
+ { 1 } {
+ \RequirePackage { luamml }
+ \@@_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \@@_luamml_activate_write:
+ }
+ }
+ {-1 } {
+ \AddToHook{begindocument/end}
+ {
+ \msg_note:nnnn { tag }
+ { luamml-status }{ disabled }{ not~create }
+ }
+ }
+ { 0 }
+ {
+ \@ifpackageloaded { unicode-math }
+ {
+ \RequirePackage { luamml }
+ \@@_correct_luamml_array_patches:
+ \AddToHook{begindocument/end}
+ {
+ \@@_luamml_activate_write:
+ }
+ }
+ { \msg_warning:nn { tag }{ unicode-math-missing } }
+ }
+ }
+ \@@_provide_luamml_commands:
+ }
+ }
+ {
+ \@@_provide_luamml_commands:
+ }
+\msg_new:nnn { tag }{ luamml-status }
+ {
+ luamml~has~been~#1~and~will~#2~an~MathML~file.
+ }
+
+\msg_new:nnn { tag }{ unicode-math-missing }
+ {
+ The~package~unicode-math~is~missing\\
+ luamml~will~not~create~an~MathML~file.\\
+ To~avoid~this~warning~load~unicode-math~\\
+ or~disable~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=false}}\\
+ or~force~luamml~with~\\
+ \tl_to_str:n{\tagpdfsetup{math/mathml/luamml/load=true}}
+ }
+\cs_new_protected:Npn \@@_luamml_activate_write:
+ {
+ \bool_if:NT \g_@@_luamml_write_bool
+ {
+% \end{macrocode}
+% to avoid that nothing is written in the first run, we must activate the sockets:
+% \begin{macrocode}
+ \bool_gset_true:N\g__tag_math_mathml_AF_bool
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/substruct/begin}{single}
+ \AssignSocketPlug{tagsupport/math/substruct/end}{single}
+ \int_set:Nn \l__luamml_pretty_int { 7 }
+ \RegisterFamilyMapping\symsymbols{oms}
+ \RegisterFamilyMapping\symletters{oml}
+ \AssignSocketPlug{tagsupport/math/mathml/write/prepare}{On}
+ \iow_new:N \g_@@_luamml_iow
+ \iow_open:Nn \g_@@_luamml_iow {\c_sys_jobname_str-luamml-mathml.html}
+ \iow_now:Ne \g_@@_luamml_iow { \c_@@_mathml_write_init_tl }
+ \cs_new:Npn \@@_luamml_output_hook:n ##1
+ {
+ \tl_if_empty:NF \l_@@_mathml_write_before_tl
+ {
+ \iow_now:Ne \g_@@_luamml_iow
+ {
+ \l_@@_mathml_write_before_tl
+ ##1
+ \c_@@_mathml_write_after_tl
+ }
+ }
+ }
+ \__luamml_register_output_hook:N \@@_luamml_output_hook:n
+% \end{macrocode}
+% At the end of the document we must finish and close the file:
+% \begin{macrocode}
+ \AddToHook{enddocument/afterlastpage}
+ {
+ \iow_now:Ne \g_@@_luamml_iow
+ { \c_@@_mathml_write_final_tl }
+ \iow_close:N \g_@@_luamml_iow
+ }
+ \msg_note:nnnn { tag }
+ { luamml-status }{ enabled }{ create }
+ }
+ }
+% \end{macrocode}
+% And now keys to activate/deactivate luamml feature
+% \begin{variable}{\g_@@_luamml_load_tl}
+% This variable will be used to suppress the loading of luamml
+% altogether.
+% \begin{macrocode}
+\tl_new:N \g_@@_luamml_load_tl
+\tl_gset:Nn \g_@@_luamml_load_tl {0}
+% \end{macrocode}
+% \end{variable}
+% \begin{variable}{\g_@@_luamml_write_bool}
+% This variable decides if luamml writes a mathml
+% altogether.
+% \begin{macrocode}
+\bool_new:N \g_@@_luamml_write_bool
+\bool_gset_true:N \g_@@_luamml_write_bool
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macrocode}
+\msg_new:nnn { tag }{ PDF-2.0-recommended }
+ {
+ The~key~#1~will~not~work~properly~with~PDF~#2.\\
+ Switching~to~PDF~2.0~is~recommended.
+ }
+\keys_define:nn { __tag / setup }
+ {
+% \end{macrocode}
+% At first a key to suppress the loading altogether
+% \begin{macrocode}
+ math/mathml/luamml/load .choice: ,
+ math/mathml/luamml/load/true .code:n = {\tl_gset:Nn \g_@@_luamml_load_tl{1}},
+ math/mathml/luamml/load/false .code:n = {\tl_gset:Nn \g_@@_luamml_load_tl{-1}},
+ math/mathml/luamml/load .default:n = true,
+ math/mathml/luamml/load .usage:n=preamble,
+% \end{macrocode}
+% A key to activate math structure elements. It shouldn't
+% be issued in the preamble as luamml is not yet loaded.
+% \begin{macrocode}
+ math/mathml/structelem .code:n =
+ {
+ \pdf_version_compare:NnT < {2.0}
+ {
+ \msg_warning:nnne { tag }{ PDF-2.0-recommended }
+ { math/mathml/structelem }{ \pdf_version: }
+ }
+ \AddToHook{begindocument/end}{\luamml_structelem:}
+ },
+% \end{macrocode}
+% and a key to call the ignore flag. This should only be used locally.
+% \begin{macrocode}
+ math/mathml/ignore .code:n = {\luamml_ignore:},
+% \end{macrocode}
+% \begin{macrocode}
+ math/mathml/luamml/write .choice:,
+ math/mathml/luamml/write/true .code:n =
+ {
+ \tl_gset:Nn \g_@@_luamml_load_tl{1}
+ \bool_gset_true:N \g_@@_luamml_write_bool
+ },
+ math/mathml/luamml/write/false .code:n =
+ {
+ \bool_gset_false:N \g_@@_luamml_write_bool
+ },
+ math/mathml/luamml/write .default:n = true,
+ math/mathml/luamml/write .usage:n=preamble,
+% \end{macrocode}
+% alias keys for compatibility
+% \begin{macrocode}
+ math/mathml/luamml .bool_gset:N = \g_@@_luamml_write_bool,
+ math/mathml/luamml .usage:n=preamble
+ }
+% \end{macrocode}
% \begin{socketdecl}{tagsupport/math/mathml/write}
% This writes a html-dummy with the hash and the math content.
% This should be optional, so it uses a socket that can be disabled
-%
+%
% \begin{macrocode}
\socket_new:nn {tagsupport/math/mathml/write}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% \begin{plugdecl}{On}
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/math/mathml/write}{On}
{
- \str_set:NV\l_@@_tmpa_str\l_@@_content_AF_source_tl
- \str_replace_all:Nnn\l_@@_tmpa_str{&}{&amp;}
- \str_replace_all:Nnn\l_@@_tmpa_str{<}{&lt;}
- \iow_now:Ne \g_@@_writedummy_iow
+ \iow_now:Ne \g_@@_writedummy_iow
{
- \iow_newline:
- <div>
- \iow_newline:
- <h2>\c_backslash_str mml\c_space_tl \int_use:N \g_@@_math_total_int </h2>
- \iow_newline:
- <p>\l_@@_tmpa_str</p>
- \iow_newline:
- <p>\l_@@_content_hash_tl </p>
- \iow_newline:
+ \l_@@_mathml_write_before_tl
<math></math>
- \iow_newline:
- </div>
- \iow_newline:
+ \c_@@_mathml_write_after_tl
}
}
% \end{macrocode}
@@ -727,32 +1251,32 @@
\keys_define:nn { __tag / setup }
{
- math/mathml/write-dummy .code:n =
+ math/mathml/write-dummy .code:n =
{
\bool_gset_true:N \g__tag_math_mathml_AF_bool
- \tl_if_exist:NF\g_@@_writedummy_iow
+ \tl_if_exist:NF\g_@@_writedummy_iow
{
\iow_new:N \g_@@_writedummy_iow
- \iow_open:Nn \g_@@_writedummy_iow
- {
+ \iow_open:Nn \g_@@_writedummy_iow
+ {
\c_sys_jobname_str-mathml-dummy.html
}
\iow_now:Ne \g_@@_writedummy_iow
{
- <!DOCTYPE~html>
- \iow_newline:
- <html>
+ \c_@@_mathml_write_init_tl
}
+ \AssignSocketPlug {tagsupport/math/mathml/write/prepare}{On}
\AssignSocketPlug {tagsupport/math/mathml/write}{On}
\AddToHook{enddocument/afterlastpage}
{
- \iow_now:Nn \g_@@_writedummy_iow {</html>}
+ \iow_now:Ne \g_@@_writedummy_iow
+ { \c_@@_mathml_write_final_tl }
\iow_close:N \g_@@_writedummy_iow
}
- }
+ }
},
- math/mathml/write-dummy .usage:n=preamble
- }
+ math/mathml/write-dummy .usage:n=preamble
+ }
% \end{macrocode}
%
% \begin{macro}{\@@_AF_process_mathml_files:}
@@ -763,9 +1287,9 @@
\hbox_set:Nn \l_@@_tmpa_box
{
\pdfdict_put:nnn { l_pdffile/Filespec }{AFRelationship} { /Supplement }
- \pdfdict_put:nne
- { l_pdffile }{Subtype}
- { \pdf_name_from_unicode_e:n{application/mathml+xml} }
+ \pdfdict_put:nne
+ { l_pdffile }{Subtype}
+ { \pdf_name_from_unicode_e:n{application/mathml+xml} }
\char_set_catcode_other:N \#
\cs_set_eq:NN\mml \@@_AF_html_reader:w
\clist_map_inline:Nn \l__tag_math_mathml_files_clist
@@ -779,13 +1303,13 @@
{
\typeout{Info:~mathml~file~##1~does~not~exist}%info message
}
- }
+ }
}
\bool_if:NT\g__tag_math_mathml_AF_bool
{
\typeout{Info:~Activating~mathml~support}
- \AssignSocketPlug{tagsupport/math/struct/begin}{test-mathml}
- \AssignSocketPlug{tagsupport/math/struct/end}{test-mathml}
+ \AssignSocketPlug{tagsupport/math/struct/begin}{mathml-AF}
+ \AssignSocketPlug{tagsupport/math/struct/end}{mathml-AF}
% \end{macrocode}
% mathml handling doesn't like subparts, so we disable them for now:
% \begin{macrocode}
@@ -795,29 +1319,29 @@
{
\iow_term:n{MathML~statistic}
\iow_term:n{================}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_total_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_total_int\c_space_tl
MathML~fragments~read}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_int\c_space_tl
different~MathML~fragments}
- \iow_term:e{==>~\int_use:N\g_@@_math_total_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_math_total_int\c_space_tl
math~fragments~found}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_found_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_found_int\c_space_tl
fitting~MathML~AF~found}
- \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_attached_int\c_space_tl
+ \iow_term:e{==>~\int_use:N\g_@@_mathml_AF_attached_int\c_space_tl
MathML~AF~attached}
}
- }
+ }
}
-\AddToHook{begindocument}{\@@_AF_process_mathml_files:}
+\AddToHook{begindocument}{\@@_AF_process_mathml_files:}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Mathstyle detection}
% In some cases we need to detect the mathstyle used in a \cs{mathchoice}
-% command and to disable/enable tagging in the unused branches.
+% command and to disable/enable tagging in the unused branches.
% This is currently only used in the amstext command \cs{text}
% but is perhaps also needed in other cases, so we create a general command.
-%
+%
%\begin{macro}{\l_@@_mathstyle_int,\g_@@_mathchoice_int,mathstyle}
% \begin{macrocode}
\int_new:N \l_@@_mathstyle_int
@@ -828,43 +1352,64 @@
% For now internal, but perhaps will need a public version.
% The command should be used in every branch of a \cs{mathchoice}
% (with the correct mathstyle number) and with an unique label (which should
-% be the same in every branch).
-% \cs{g_@@_mathchoice_int} can be e.g. increased before the mathchoice and
+% be the same in every branch).
+% \cs{g_@@_mathchoice_int} can be, e.g., increased before the mathchoice and
% then used.
% \begin{macro}{\@@_tag_if_mathstyle:nn}
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tag_if_mathstyle:nn #1 #2
+\cs_new_protected:Npn \@@_tag_if_mathstyle:nn #1 #2
%#1 refers to label
%#2 is a number for the mathstyle (typically 0,2,4,6)
{
\int_set:Nn \l_@@_mathstyle_int {#2}
\property_record:nn {#1} { mathstyle }
\int_compare:nNnTF { \property_ref:nn {#1}{ mathstyle} } = { #2 }
- { \tag_start: }{ \tag_stop: }
+ { \tag_resume:n{\mathchoice} }{ \tag_suspend:n{\mathchoice} }
}
-\cs_generate_variant:Nn \@@_tag_if_mathstyle:nn {en}
+\cs_generate_variant:Nn \@@_tag_if_mathstyle:nn {en}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Tagging options}
% \begin{macrocode}
\keys_define:nn { __tag / setup }
{
math/mathml/sources .clist_set:N = \l__tag_math_mathml_files_clist,
- math/alt/use .bool_set:N = \l__tag_math_alt_bool,
+ math/alt/use .bool_set:N = \l__tag_math_alt_bool,
viewer/pane/mathml .bool_set:N = \l__tag_math_mathml_pane_bool,
viewer/pane/mathml .initial:n = true,
- viewer/pane/mathsource .bool_set:N = \l__tag_math_texsource_pane_bool,
+ viewer/pane/mathsource .bool_set:N = \l__tag_math_texsource_pane_bool,
math/mathml/AF .bool_set:N = \l__tag_math_mathml_AF_bool,
math/mathml/AF .initial:n = true,
math/tex/AF .bool_set:N = \l__tag_math_texsource_AF_bool,
math/tex/AF .initial:n = true
- }
+ }
+% \end{macrocode}
+% alt is required for pdf/UA-1.
+% TODO: l3pdfmeta should support this test.
+% \begin{macrocode}
+\AddToHook{begindocument/end}
+ {
+ \str_if_eq:eeT
+ {1}
+ {
+ \exp_last_unbraced:Ne\use_i:nn
+ {\GetDocumentProperties{document/pdfstandard-UA}}
+ \c_empty_tl\c_empty_tl
+ }
+ {
+ \bool_if:NF \l__tag_math_alt_bool
+ {
+ \typeout{PDF/UA-1~detected.~Enabling~alt~text~on~Formula}
+ }
+ \bool_set_true:N\l__tag_math_alt_bool
+ }
+ }
% \end{macrocode}
%
% \subsection{Sockets}
% \subsubsection{Main inline math sockets}
-%
+%
% \begin{socketdecl}
% {
% tagsupport/math/inline/begin,
@@ -873,11 +1418,11 @@
% tagsupport/math/inline/formula/end,
% }
% The first two sockets are meant to embed inline
-% math into the surrounding (so to close/reopen e.g. MC-chunks).
-% The other two implement the actual formula structure.
+% math into the surrounding (so to close/reopen, e.g., MC-chunks).
+% The other two implement the actual formula structure.
% The formula sockets are despite their naming not symmetric:
-% the begin socket is issued after the math has started, while
-% the end socket is after the math!
+% the begin socket is issued after the math has started, while
+% the end socket is after the math!
% \begin{macrocode}
\socket_new:nn {tagsupport/math/inline/begin}{0}
\socket_new:nn {tagsupport/math/inline/end}{0}
@@ -885,8 +1430,8 @@
\socket_new:nn {tagsupport/math/inline/formula/end}{0}
% \end{macrocode}
%\end{socketdecl}
-%
-%
+%
+%
% \begin{plugdecl}{MC}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -896,39 +1441,42 @@
\socket_new_plug:nnn
{tagsupport/math/inline/end}
{MC}
- {\tag_mc_begin_pop:n{}}
+ {\tag_mc_begin_pop:n{}}
% \end{macrocode}
% \end{plugdecl}
-%
-% We probably will want to test different tagging receipes.
+%
+% We probably will want to test different tagging recipes.
% \begin{plugdecl}{default}
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/inline/formula/begin}
{default}
- {
- \socket_use:n{tagsupport/math/content}
- \socket_use:n{tagsupport/math/struct/begin}
+% \end{macrocode}
+% \changes{v0.6g}{2024-10-02}{disable paratagging, issue \#711}
+% \begin{macrocode}
+ { \tagpdfparaOff
+ \tag_socket_use:n{math/content}
+ \tag_socket_use:n{math/struct/begin}
% \end{macrocode}
% TODO: does inline math need subformula handling?
% \begin{macrocode}
% inner formula if multiple parts (not really implemented yet)
- \socket_use:n{tagsupport/math/substruct/begin}
+ \tag_socket_use:n{math/substruct/begin}
#1
- \socket_use:n{tagsupport/math/end}
+ \tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
{tagsupport/math/inline/formula/end}
{default}
- {
+ {
\socket_use:n{tagsupport/math/substruct/end}
\socket_use:n{tagsupport/math/struct/end}
- }
+ }
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \subsubsection{Main display math sockets}
-%
+%
% \begin{socketdecl}
% {
% tagsupport/math/display/begin,
@@ -937,12 +1485,15 @@
% tagsupport/math/display/formula/end,
% }
% The first two sockets are meant to embed display
-% math into the surrounding (so to close/reopen e.g. MC-chunks and
+% math into the surrounding (so to close/reopen, e.g., MC-chunks and
% P-structure).
-% The other two implement the actual formula structure.
+% The other two implement the actual formula structure.
% The formula sockets are despite their naming not symmetric:
-% the begin socket is issued after the math has started, while
-% the end socket is after the math!
+% the begin socket is issued after the math has started, while
+% the end socket is after the math!
+% The socket |tagsupport/math/display/formula/begin| should similar to
+% the inline version not be used as tagging socket so that the argument, the math,
+% is not lost.
% \begin{macrocode}
\socket_new:nn {tagsupport/math/display/begin}{0}
\socket_new:nn {tagsupport/math/display/end}{0}
@@ -961,7 +1512,7 @@
{tagsupport/math/display/end}
{default}
{
- }
+ }
% \end{macrocode}
% \end{plugdecl}
@@ -971,25 +1522,25 @@
\socket_new_plug:nnn
{tagsupport/math/display/formula/begin}
{default}
- {
- \socket_use:n{tagsupport/math/content}
- \socket_use:n{tagsupport/math/struct/begin}
- \socket_use:n{tagsupport/math/substruct/begin}
- #1
- \socket_use:n{tagsupport/math/end}
+ {
+ \tag_socket_use:n{math/content}
+ \tag_socket_use:n{math/struct/begin}
+ \tag_socket_use:n{math/substruct/begin}
+ #1
+ \tag_socket_use:n{math/end}
}
\socket_new_plug:nnn
{tagsupport/math/display/formula/end}
{default}
- {
+ {
\socket_use:n{tagsupport/math/substruct/end}
\socket_use:n{tagsupport/math/struct/end}
- }
+ }
% \end{macrocode}
% \end{plugdecl}
%
% \subsubsection{Internal sockets}
-%
+%
% \begin{variable}{\l_@@_content_template_tl}
% The default text used as alt or actual text.
% \begin{macrocode}
@@ -1003,7 +1554,7 @@
\c_space_tl
\exp_not:N\end{\g_@@_grabbed_env_tl}
\c_space_tl LaTeX~ formula~ ends~
- }
+ }
% \end{macrocode}
% \end{variable}
@@ -1013,7 +1564,7 @@
\tl_new:N\l_@@_texsource_template_tl
\tl_const:Nn\c_@@_inline_env_tl {math}
\tl_set:Nn \l_@@_texsource_template_tl
- {
+ {
\tl_if_eq:NNTF\g_@@_grabbed_env_tl\c_@@_inline_env_tl
{
$
@@ -1024,29 +1575,29 @@
\exp_not:N\begin{\g_@@_grabbed_env_tl}
\exp_not:V\g_@@_grabbed_math_tl
\exp_not:N\end{\g_@@_grabbed_env_tl}
- }
- }
+ }
+ }
% \end{macrocode}
% \end{variable}
-%
+%
% \begin{socketdecl}{tagsupport/math/content}
-% The math content is stored in associated files and used for
+% The math content is stored in associated files and used for
% actual and alternative text. As the exact text is still
% unclear we use a socket to be able to test variants.
% The socket should set all four tl vars above, if needed
-% to identical values. It can use the two variables
+% to identical values. It can use the two variables
% \cs{g_@@_grabbed_env_tl} and \cs{g_@@_grabbed_math_tl}
% \begin{macrocode}
\socket_new:nn {tagsupport/math/content}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% Some default sockets to set the contents.
-% TODO: think about naming convention.
+% TODO: think about naming convention.
% TODO: think how this should organized so that one
% has options to change from the outside and so that
-% there are less repetitions.
+% there are less repetitions.
% \begin{plugdecl}{actual+source}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1056,17 +1607,17 @@
\tl_set:Ne\l_@@_content_actual_tl
{
\l_@@_content_template_tl
- }
- \tl_set:Ne \l_@@_content_AF_source_tl
+ }
+ \tl_set:Ne \l_@@_content_AF_source_tl
{
\l_@@_texsource_template_tl
- }
+ }
\tl_set:Nn \l_@@_content_AF_mathml_tl {}
\tl_set:Nn \l_@@_content_alt_tl {}
}
% \end{macrocode}
-% \end{plugdecl}
-%
+% \end{plugdecl}
+%
% \begin{plugdecl}{alt+source}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1076,26 +1627,26 @@
\tl_set:Ne\l_@@_content_alt_tl
{
\l_@@_content_template_tl
- }
- \tl_set:Ne \l_@@_content_AF_source_tl
+ }
+ \tl_set:Ne \l_@@_content_AF_source_tl
{
\l_@@_texsource_template_tl
- }
+ }
\tl_set:Nn \l_@@_content_AF_mathml_tl {}
\tl_set:Nn \l_@@_content_actual_tl {}
}
% \end{macrocode}
% \end{plugdecl}
% \begin{macrocode}
-\socket_assign_plug:nn {tagsupport/math/content}{alt+source}
+\socket_assign_plug:nn {tagsupport/math/content}{alt+source}
% \end{macrocode}
%
% \begin{socketdecl}{tagsupport/math/struct/begin,
% tagsupport/math/struct/end}
-% For the main structure we use a socket too.
-% This allow e.g. to create a special one for luamml
-% which setups additional objects.
-% The begin socket can use the two variables
+% For the main structure we use a socket too.
+% This allows, e.g., to create a special one for luamml
+% which setups additional objects.
+% The begin socket can use the two variables
% \cs{g_@@_grabbed_env_tl} and \cs{g_@@_grabbed_math_tl}
% \begin{macrocode}
\socket_new:nn {tagsupport/math/struct/begin}{0}
@@ -1110,12 +1661,22 @@
{tagsupport/math/struct/begin}
{default}
{
- \bool_if:NTF\l__tag_math_texsource_AF_bool
+ \bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
{ \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
+ \tl_if_eq:NnTF\g_@@_grabbed_env_tl {math}
+ {
+ \tl_set:Nn\l_@@_attribute_class_tl{inline}
+ }
+ {
+ \tl_set:Nn\l_@@_attribute_class_tl{display}
+ }
+ \bool_if:NF\l__tag_math_alt_bool
+ { \tl_set:Nn \l_@@_content_alt_tl{} }
\tag_struct_begin:n
{
tag=Formula,
+ attribute-class=\l_@@_attribute_class_tl,
texsource = \l_@@_content_AF_source_tmpa_tl,
title-o = \g_@@_grabbed_env_tl,
actualtext = \l_@@_content_actual_tl,
@@ -1126,19 +1687,18 @@
{tagsupport/math/struct/end}
{default}
{ \tag_struct_end: }
-
-\socket_assign_plug:nn {tagsupport/math/struct/begin}{default}
-\socket_assign_plug:nn {tagsupport/math/struct/end}{default}
-% \end{macrocode}
-% \end{plugdecl}
-%
-% \begin{plugdecl}{test-mathml}
-% This (test-)socket tries to add a mathml-AF to formula.
-% It is activated if a mathml.html has been found and loaded.
-% Additionally it also sets an attribute
-% (this can perhaps be done by default anyway.)
-% As it disturbs the reading of the AF it currently deactivates the /Alt key,
-% unless it has been reenabled with |math/alt/use=true|
+
+\socket_assign_plug:nn {tagsupport/math/struct/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/struct/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{plugdecl}{mathml-AF}
+% This socket tries to add a mathml-AF to formula.
+% It is activated if a mathml.html has been found and loaded.
+% As it disturbs the reading of the AF
+% it currently deactivates the /Alt key,
+% unless it has been reenabled with |math/alt/use=true|
% \begin{macrocode}
\cs_generate_variant:Nn \str_mdfive_hash:n {o}
\tl_new:N\l_@@_content_hash_tl
@@ -1151,48 +1711,52 @@
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/struct/begin}
- {test-mathml}
- {
- \int_gincr:N\g_@@_math_total_int
- \tl_set:Ne\l_@@_content_hash_tl
- {\str_mdfive_hash:o { \l_@@_content_AF_source_tl }}
- \tl_set_eq:NN\l_@@_grabbed_math_tl\g_@@_grabbed_math_tl
+ {mathml-AF}
+ {
+ \int_gincr:N\g_@@_math_total_int
+ \tl_set:Ne\l_@@_content_hash_tl
+ {\str_mdfive_hash:o { \l_@@_content_AF_source_tl }}
+ \tl_set_eq:NN\l_@@_grabbed_math_tl\g_@@_grabbed_math_tl
\tl_if_eq:NnTF\g_@@_grabbed_env_tl {math}
{
- \tl_set:Nn\l_@@_attribute_class_tl{inline}
+ \tl_set:Nn\l_@@_attribute_class_tl{inline}
}
{
\tl_set:Nn\l_@@_attribute_class_tl{display}
}
\bool_if:NF\l__tag_math_alt_bool
- { \tl_set:Nn \l_@@_content_alt_tl{} }
+ { \tl_set:Nn \l_@@_content_alt_tl{} }
% \end{macrocode}
% debugging option. TODO: hide in debug key.
% \begin{macrocode}
\tl_if_exist:cTF { g_@@_mathml_ \l_@@_content_hash_tl _tl }
- {
- \int_gincr:N\g_@@_mathml_AF_found_int
- \bool_if:NTF \l__tag_math_mathml_AF_bool
- {
- \int_gincr:N\g_@@_mathml_AF_attached_int
- \typeout {Inserting~mathml~with~Hash~\l_@@_content_hash_tl}
- }
- {
- \typeout {Ignoring~mathml~with~Hash~\l_@@_content_hash_tl}
- }
- }
- {
- \typeout{WARNING:~mathml~missing~for~hash~\l_@@_content_hash_tl}
- }
- \socket_use:n {tagsupport/math/mathml/write} % write hash if request
- \bool_if:NTF\l__tag_math_texsource_AF_bool
+ {
+ \int_gincr:N\g_@@_mathml_AF_found_int
+ \bool_if:NTF \l__tag_math_mathml_AF_bool
+ {
+ \int_gincr:N\g_@@_mathml_AF_attached_int
+ \typeout {Inserting~mathml~with~Hash~\l_@@_content_hash_tl}
+ }
+ {
+ \typeout {Ignoring~mathml~with~Hash~\l_@@_content_hash_tl}
+ }
+ }
+ {
+ \bool_if:NT \l__tag_math_mathml_AF_bool
+ {
+ \typeout {WARNING:~mathml~missing~for~hash~\l_@@_content_hash_tl}
+ }
+ }
+ \socket_use:n {tagsupport/math/mathml/write/prepare}
+ \socket_use:n {tagsupport/math/mathml/write} % write hash if request
+ \bool_if:NTF\l__tag_math_texsource_AF_bool
{ \tl_set_eq:NN \l_@@_content_AF_source_tmpa_tl \l_@@_content_AF_source_tl }
- { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
+ { \tl_clear:N \l_@@_content_AF_source_tmpa_tl }
\tag_struct_begin:n
{
tag=Formula,
attribute-class=\l_@@_attribute_class_tl, %
- AFref =
+ AFref =
\bool_if:NT\l__tag_math_mathml_AF_bool
{
\cs_if_exist_use:c {g_@@_mathml_ \l_@@_content_hash_tl _tl}
@@ -1207,13 +1771,13 @@
% \begin{macrocode}
\socket_new_plug:nnn
{tagsupport/math/struct/end}
- {test-mathml}
+ {mathml-AF}
{
\tag_struct_end:
- }
+ }
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \begin{socketdecl}{tagsupport/math/substruct/begin,
% tagsupport/math/substruct/end}
% This holds the code to handle subparts of the formula.
@@ -1222,7 +1786,7 @@
\socket_new:nn {tagsupport/math/substruct/end}{0}
% \end{macrocode}
% \end{socketdecl}
-%
+%
% \begin{plugdecl}{default}
% \begin{macrocode}
\socket_new_plug:nnn
@@ -1232,16 +1796,16 @@
\socket_new_plug:nnn
{tagsupport/math/substruct/end}
{default}
- {
+ {
\tagmcend
\if@subformulas
\tagstructend
\fi
- }
-\socket_assign_plug:nn {tagsupport/math/substruct/begin}{default}
-\socket_assign_plug:nn {tagsupport/math/substruct/end}{default}
-% \end{macrocode}
-% \end{plugdecl}
+ }
+\socket_assign_plug:nn {tagsupport/math/substruct/begin}{default}
+\socket_assign_plug:nn {tagsupport/math/substruct/end}{default}
+% \end{macrocode}
+% \end{plugdecl}
% \begin{plugdecl}{single}
% We need an option to disable subparts as it is unclear
@@ -1253,7 +1817,7 @@
{
\typeout{====>subpart~splitting~deactivated}
\typeout{====>grabbed~math=\meaning\g_@@_grabbed_math_tl}
- \tag_mc_begin:n{}
+ \tag_mc_begin:n{}
}
\socket_new_plug:nnn
{tagsupport/math/substruct/end}
@@ -1261,21 +1825,21 @@
{ \tag_mc_end:}
% \end{macrocode}
% \end{plugdecl}
-%
+%
% \begin{socketdecl}{tagsupport/math/end}
% A socket used at the end of the math (before the closing dollar(s))
-% which can e.g. set a flag for luamml.
+% which can, e.g., set a flag for luamml.
% \begin{macrocode}
\socket_new:nn {tagsupport/math/end}{0}
% \end{macrocode}
% \end{socketdecl}
-
-%
+
+%
% \begin{macro}{\__tag_math_disable:}
% Similar to the table code we collect the plugs that should be
% assigned to do nothing if we don't want tagging
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_math_disable:
+\cs_new_protected:Npn \__tag_math_disable:
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{noop}
\socket_assign_plug:nn {tagsupport/math/inline/end}{noop}
@@ -1284,16 +1848,16 @@
\socket_assign_plug:nn {tagsupport/math/display/begin}{noop}
\socket_assign_plug:nn {tagsupport/math/display/end}{noop}
\socket_assign_plug:nn {tagsupport/math/display/formula/begin}{identity}
- \socket_assign_plug:nn {tagsupport/math/display/formula/end}{noop}
- }
+ \socket_assign_plug:nn {tagsupport/math/display/formula/end}{noop}
+ }
% \end{macrocode}
% \end{macro}
-%
+%
% \begin{macro}{\__tag_math_enable:}
% Similar to the table code we collect the default plugs that should be
% assigned if we want tagging
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_math_enable:
+\cs_new_protected:Npn \__tag_math_enable:
{
\socket_assign_plug:nn {tagsupport/math/inline/begin}{MC}
\socket_assign_plug:nn {tagsupport/math/inline/end}{MC}
@@ -1303,7 +1867,7 @@
\socket_assign_plug:nn {tagsupport/math/display/end}{default}
\socket_assign_plug:nn {tagsupport/math/display/formula/begin}{default}
\socket_assign_plug:nn {tagsupport/math/display/formula/end}{default}
- }
+ }
% \end{macrocode}
% \end{macro}
% At begin document we can activate:
@@ -1349,49 +1913,65 @@
% \subsection{Content grabbing}
%
% \begin{macro}{\@@_grab_dollar:w}
-% Grab up to a single |$|, for inline math mode, suppressing
-% any processing if the token is \tn{m@th} found in the content.
-%
-% \fmi{what's that test doing?}
-%
-% \car{It is some kind of fix, to avoid the remote
-% possibility that the math is empty, making the code
-% produce an unwanted \texttt{\$\$}.}
-%
-%\car{cf.~the code for this in \cs{@ensuredmath}}
-%
-%\car{It is harmless but unnecessary in the dollardollar grabbing below.}
-%
+% \begin{macro}{\@@_grab_dollar:n}
+% \changes{v0.6c}{2024-08-22}{Correct handling of empty math segments}
+% Top-level function to handle grabbing of inline math mode delimited by
+% |$| tokens. We provide two different ways to do that: a token-by-token
+% one that can be used everywhere, and a fast delimited one that does not
+% work anywhere that the end |$| token may be hidden, most obviously in
+% tabulars. The function here is therefore set up as a variable starting
+% point.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_grab_dollar:w % $
- #1 $
+\cs_new_protected:Npn \@@_grab_dollar:w { \@@_grab_dollar_delim:w }
+% \end{macrocode}
+% After grabbing inline math material, there is again common processing
+% independent of mechanism of collection.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar:n #1
{
% \end{macrocode}
-% \fmi{what's that test doing?}
+% We need to do processing first as this picks up \enquote{fake} math mode:
+% that information is needed below.
% \begin{macrocode}
- \tl_if_blank:nF {#1}
- {
- \@@_process:nn { math } {#1} % $
+ \@@_process:nn { math } {#1}
% \end{macrocode}
% We do not want math tagging in fakemath or when measuring,
% We also do not want math tagging if tagging has been suspended.
% \begin{macrocode}
- \bool_lazy_or:nnTF
- {\legacy_if_p:n { measuring@ }}
- { \l_@@_fakemath_bool }
- { #1 $ }
+ \bool_lazy_any:nTF
+ {
+ {\legacy_if_p:n { measuring@ }}
+ { \l_@@_fakemath_bool }
+ { \tl_if_blank_p:n {#1} }
+ }
+ {
+ #1 $ % $
+ }
{
- \tag_socket_use:n {math/inline/begin} %end P-MC
- \tag_socket_use:nn {math/inline/formula/begin}{#1}
- $
+ \tag_socket_use:n {math/inline/begin} %end P-MC
+% \end{macrocode}
+% We do no use a tagging socket here, so that the argument (the
+% math) is not lost, tagging-project issue 661.
+% \begin{macrocode}
+ \socket_use:nn {tagsupport/math/inline/formula/begin}{#1}
+ $ % $
\tag_socket_use:n {math/inline/formula/end}
\tag_socket_use:n {math/inline/end} % restart P-MC
- }
- }
+ }
}
% \end{macrocode}
% \end{macro}
-%
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_dollar_delim:w}
+% Grab up to a single |$|, for inline math mode, suppressing
+% any processing if the token is \tn{m@th} found in the content.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar_delim:w #1 $ % $
+ { \@@_grab_dollar:n {#1} }
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@@_grab_dollardollar:w}
% And for the classical \TeX{} display structure.
% \begin{macrocode}
@@ -1401,17 +1981,17 @@
\tl_if_blank:nF {#1}
{
\@@_process:nn { equation* } {#1}
- \socket_use:n {tagsupport/math/display/begin}
+ \tag_socket_use:n {math/display/begin}
\socket_use:nn{tagsupport/math/display/formula/begin}{#1}
- $$
}
+ $$
}
% \end{macrocode}
-%
+%
% The end code is added through a \cs{aftergroup} so we
% store it inside a command.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_tag_dollardollar_display_end:
+\cs_new_protected:Npn \@@_tag_dollardollar_display_end:
{
% \typeout{== tag dollarldollar display end}
% \ShowTagging{struct-stack}
@@ -1420,15 +2000,30 @@
% TODO why is that needed? where is para-tagging disabled?
% \begin{macrocode}
\tagpdfparaOn
+% \end{macrocode}
+% The \cs{postdisplaypenalty} was temporarily set to 10000 inside
+% the display and the \cs{belowdisplayskip} and the
+% \cs{belowdisplayshortskip} was negated, so whatever was inserted
+% it should have been a negative skip. Whatever skip was added we
+% pick it ups value up here, so that we can correct the spacing
+% after the tagging code was inserted.
+% \begin{macrocode}
\l_@@_tmpa_skip \lastskip
- \socket_use:n{tagsupport/math/display/formula/end}
- \penalty \postdisplaypenalty
+ \tag_socket_use:n{math/display/formula/end}
% \end{macrocode}
-% This reinserts the below display skips. It must be doubled to
-% get the right amount:
+% Now we add a skip without indroducing a page break possibility,
+% that should bring the current vertical position back to the point
+% where \TeX{} would add the penalty and the \enquote{below skip}.
+% \changes{v0.6f}{2024-09-30}{Correct logic for inserting below skips
+% after displays (tagging/721)}
% \begin{macrocode}
- \skip_vertical:n { -\l_@@_tmpa_skip * 2 }
-%
+ \nobreak
+ \skip_vertical:n { -\l__math_tmpa_skip } % remove the negative belowdisplayskip
+% \end{macrocode}
+% Then we finally add the real stuff:
+% \begin{macrocode}
+ \penalty \postdisplaypenalty
+ \skip_vertical:n { -\l__math_tmpa_skip } % insert the correct skip
\@doendpe % this has no \end{...} to take care of it
}
@@ -1463,6 +2058,164 @@
% \end{macrocode}
% \end{macro}
%
+% \subsection{Token-by-token inline grabbing}
+%
+% Grabbing inline math token-by-token is more involved. The mechanism here
+% is essentially a simplified version of that originally seen in
+% \pkg{collcell} and refined in \pkg{siunitx}. We make use of the fact that
+% in math mode spaces are ignored, so we have to deal with only \texttt{N}-type
+% tokens and groups. Furthermore, there is no need to look inside groups, so
+% the only special cases are a small selection of \texttt{N}-type tokens.
+%
+% \begin{variable}{\l_@@_grabbed_tl}
+% For collection of the material piecewise.
+% \begin{macrocode}
+\tl_new:N \l_@@_grabbed_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{variable}{\l_@@_grab_env_int}
+% Needed to count up the number of nested environments encountered.
+% \begin{macrocode}
+\int_new:N \l_@@_grab_env_int
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\@@_grab_dollar_loop:}
+% \begin{macro}{\@@_grab_loop:}
+% The lead-off here establishes a group: we need that as we will have to
+% be careful in the way \tn{cr} is handled and ensure this is only
+% manipulated whilst grabbing. The main loop is then started.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_dollar_loop:
+ {
+ \group_begin:
+ \tl_clear:N \l_@@_grabbed_tl
+ \@@_grab_loop:
+ }
+\cs_new_protected:Npn \@@_grab_loop:
+ {
+ \peek_remove_spaces:n
+ {
+ \peek_meaning:NTF \c_group_begin_token
+ { \@@_grab_loop_group:n }
+ { \@@_grab_loop_token:N }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_group:n}
+% \begin{macro}{\@@_grab_loop_store:n}
+% Handling of grabbed groups is pretty easy.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_group:n #1
+ { \@@_grab_loop_store:n { {#1} } }
+\cs_new_protected:Npn \@@_grab_loop_store:n #1
+ {
+ \tl_put_right:Nn \l_@@_grabbed_tl {#1}
+ \@@_grab_loop:
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_token:N}
+% \begin{macro}
+% {
+% \@@_grab_loop_$: ,
+% \@@_grab_loop_\\: ,
+% \@@_grab_loop_\begin: ,
+% \@@_grab_loop_\end: ,
+% \@@_grab_loop_\ignorespaces: ,
+% \@@_grab_loop_\unskip: ,
+% \@@_grab_loop_\textonly@unskip:
+% }
+% Filter out the special cases: for performance reasons, use a hash table
+% approach rather than a loop (\emph{cf.}~\pkg{collcell}).
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_token:N #1
+ {
+ \cs_if_exist_use:cF
+ { @@_grab_loop_ \token_to_str:N #1 : }
+ { \@@_grab_loop_store:n {#1} }
+ }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N $ : }
+ { \@@_grab_loop_end: }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \\ : }
+ {
+ \int_compare:nNnTF \l_@@_grab_env_int = 0
+ { \@@_grab_loop_newline: }
+ { \@@_grab_loop_store:n { \\ } }
+ }
+% \end{macrocode}
+% In contrast to \pkg{collcell}, nesting is tracked by counting
+% \cs{begin}/\cs{end} pairs: this is needed in case there is a tabular-like
+% construct containing |\\| inside a cell. As a result, the end-of-tabular
+% can be detected without checking the name argument: if \cs{end} is
+% encountered at nesting level~0, we've hit the end of a cell. In that case,
+% end the row and leave the environment to clean up.
+% \begin{macrocode}
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \begin : }
+ {
+ \int_incr:N \l_@@_grab_env_int
+ \@@_grab_loop_store:n { \begin }
+ }
+\cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N \end : }
+ {
+ \int_compare:nNnTF \l_@@_grab_env_int = 0
+ {
+ \@@_grab_loop_newline:
+ \end
+ }
+ {
+ \int_decr:N \l_@@_grab_env_int
+ \@@_grab_loop_store:n { \end }
+ }
+ }
+\tl_map_inline:nn { \ignorespaces \unskip \textonly@unskip }
+ {
+ \cs_new_protected:cpn { @@_grab_loop_ \token_to_str:N #1 : }
+ { \@@_grab_loop: }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_newline:}
+% To allow collection of tokens in the part of the \tn{halign} template after
+% |#|, we need \TeX{} to see the primitive with the loop token in the right
+% place. That is done by re-defining \tn{cr} at present. Ideally there would
+% be a socket in the definition of \texttt{tabular}, etc., to handle this:
+% there is also the need to examine in interaction with \pkg{longtable}, which
+% also redefines \tn{cr}.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_newline:
+ {
+ \if_false: { \fi:
+ \cs_set_protected:Npn \cr
+ {
+ \@@_grab_loop:
+ \tex_cr:D
+ }
+ \if_false: } \fi:
+ \\
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_grab_loop_end:}
+% Clean up and pass on.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_grab_loop_end:
+ {
+ \exp_args:NNV \group_end:
+ \@@_grab_dollar:n \l_@@_grabbed_tl
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Marking math environments}
%
% A general mechanism for math mode environments that do not grab their
@@ -1644,7 +2397,7 @@
}
{
% \typeout{==>A3}
- \__tag_tool_close_P:
+ \__tag_tool_close_P:
}
\socket_use:nn{tagsupport/math/display/formula/begin}{}
\tagpdfparaOff
@@ -1662,7 +2415,7 @@
\cs_new_protected:Npn \math_register_env:n #1
{ \math_register_env:nn {#1} { } }
-
+
\NewDocumentCommand \RegisterMathEnvironment { O{} m }
{ \math_register_env:nn {#2} {#1} }
% \end{macrocode}
@@ -1749,7 +2502,7 @@
{
\cs_gset_protected:Npn \[ % \]
{
- \@@_grab_eqn:w
+ \@@_grab_eqn:w
% \bool_if:NTF \l_@@_collected_bool
% { \begin { equation* } }
% { \@@_grab_eqn:w }
@@ -1847,7 +2600,7 @@
% \end{macrocode}
%
% Tabulars currently contain a \$ that shouldn't trigger math
-% tagging.
+% tagging.
% \begin{macrocode}
\RequirePackage{array}
\tl_if_in:NnT\@tabular{$}
@@ -1856,11 +2609,15 @@
\leavevmode
\UseTaggingSocket{tbl/hmode/begin}%
\hbox \bgroup
- \bool_set_true:N \l_@@_collected_bool
+ \bool_set_true:N \l_@@_collected_bool
$
\bool_set_false:N \l_@@_collected_bool
\col@sep\tabcolsep \let\d@llarbegin\begingroup
\let\d@llarend\endgroup
+% \end{macrocode}
+% A proper switching mechanism is needed: for the present, do directly.
+% \begin{macrocode}
+ \cs_set_protected:Npn \@@_grab_dollar:w { \@@_grab_dollar_loop: }
\@tabarray}
}
% \end{macrocode}
@@ -1877,10 +2634,10 @@
}
% \end{macrocode}
% \end{macro}
-%
+%
% \subsection{Disable math grabbing in the begindocument hook}
% For example amsart uses math to measure text there.
-%
+%
% \begin{macrocode}
\tl_gput_right:Nn\@kernel@before@begindocument
{
@@ -1996,7 +2753,7 @@
% \end{macrocode}
% Also for "false?"
% \begin{macrocode}
-\def\measuring@true{\let\ifmeasuring@\iftrue\tag_stop:}
+\def\measuring@true{\let\ifmeasuring@\iftrue\tag_suspend:n{\measuring}}
% \end{macrocode}
%
% \begin{macrocode}
@@ -2004,7 +2761,7 @@
\math_register_halign_env:nn {align}{}
\math_register_halign_env:nn {align*}{}
\math_register_halign_env:nn {alignat}{}
- \math_register_halign_env:nn {alignat*}{}
+ \math_register_halign_env:nn {alignat*}{}
\math_register_halign_env:nn {flalign}{}
\math_register_halign_env:nn {flalign*}{}
\math_register_halign_env:nn {gather}{}
@@ -2085,8 +2842,8 @@
%
% \begin{macro}{\@@_split_at_nl:NN}
-% This splits grabbed math at newlines.
-%
+% This splits grabbed math at newlines.
+%
% \begin{macrocode}
\cs_new:Npn \@@_split_at_nl:NN #1#2 {
\tl_set:Nf \l_@@_tmpa_tl {
@@ -2105,14 +2862,14 @@
#2 \\ #3 \s_stop
}
}
-
+
\cs_new_protected:Npn \@@_split_at_nl_aux:nnNN #1 #2 #3 #4
{
\tl_gset:Nn #4 {#1}
\tl_gset:Nn #3 {#2}
}
-\cs_new:Npn \@@_split_chk_if_begin:ww
+\cs_new:Npn \@@_split_chk_if_begin:ww
#1 \begin #2 #3 \s_mark #4 \\ \q_nil \\ \s_stop
{
\quark_if_nil:nTF {#2}
@@ -2163,11 +2920,11 @@
{ \exp_end: { #4 #1 } }
{ \@@_split_final_cleanup:w #3 \s_mark { #4 #1 #2 } }
}
-
+
\cs_new:Npn \@@_split:n #1 {
\@@_split_at_nl_first:w #1 \\ \q_nil \\ \s_stop }
-
-% this looks unused.
+
+% this looks unused.
%\NewDocumentCommand \splitnl { mm +m }
% {
% \tl_set:Nf \l_@@_tmpa_tl { \split:n {#3} }
@@ -2179,12 +2936,12 @@
%
%
% \begin{macro}{\maybestartnewformulatag}
-%
+%
% \begin{macrocode}
\newif\if@subformulas
-\tl_new:N \result
-
+\tl_new:N \result
+
\cs_new_protected:Npn\grabaformulapartandstart {
\@@_split_at_nl:NN \g_@@_grabbed_math_tl \result
\typeout{====>first-result=\meaning\result}
@@ -2204,7 +2961,7 @@
% but we add a short text to satisfy the pdf/ua-2 validator
% \begin{macrocode}
% alt=\result,
- alt = subformula,
+ alt = subformula,
title-o=\resulttitle
}
}
@@ -2242,7 +2999,7 @@
%
\tl_if_empty:NF \g_@@_grabbed_math_tl
{
- \tagmcend
+ \tagmcend
\tagstructend
\grabaformulapartandmayberestart
}
@@ -2258,21 +3015,21 @@
% \typeout{===>~ in~ hook}
% \math_register_halign_env:nn {dmath}{}
% \math_register_halign_env:nn {dgroup*}{}
-%}
+%}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\ExplSyntaxOff
% \end{macrocode}
-%
+%
% \begin{macrocode}
%<@@=>
% \end{macrocode}
-%
+%
% \begin{macrocode}
%</kernel>
% \end{macrocode}
%
% \Finale
%
-%
+%
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-math.pdf b/macros/latex-dev/required/latex-lab/latex-lab-math.pdf
index 355c1b35db..fa243be249 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-math.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-math.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf b/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf
index daa20cf2e2..1b8c8c9c5d 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-mathpkg.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.dtx b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.dtx
index aa27cbf01d..ed8b6e467e 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.dtx
@@ -18,12 +18,14 @@
%
% for those people who are interested or want to report an issue.
%
+\def\ltlabmathtoolsdate{2024-09-18}
+\def\ltlabmathtoolsversion{0.80a}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
\CodelineIndex
\begin{document}
- \DocInput{latex-lab-amsmath.dtx}
+ \DocInput{latex-lab-mathtools.dtx}
\end{document}
%</driver>
%
@@ -32,7 +34,7 @@
%
% \title{The \texttt{latex-lab-mathtools} code\thanks{}}
% \author{\LaTeX{} Project}
-%
+% \date{v\ltlabmathtoolsversion\ \ltlabmathtoolsdate}
% \maketitle
%
% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
@@ -66,7 +68,7 @@
% \subsection{File declaration}
% \begin{macrocode}
\ProvidesFile{latex-lab-mathtools.ltx}
- [2023-01-05 v0.1a mathtools adaptions]
+ [2024-07-13 v0.1a mathtools adaptions]
% \end{macrocode}
% \subsection{Tagpdf support}
% To make the code independent from tagging being loaded and active
@@ -117,7 +119,7 @@
% \end{macrocode}
% Stop tagging when measuring:
% \begin{macrocode}
- \ifmeasuring@\tag_stop:\fi
+ \ifmeasuring@\tag_suspend:n{\measuring}\fi
\normalbaselines
\ifdim
\ifdim\@totalleftmargin=\z@
@@ -156,7 +158,7 @@
\noalign{%
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip
\vbox{%
- \ifmeasuring@\tag_stop:\fi
+ \ifmeasuring@\tag_suspend:n{\measuring}\fi
\normalbaselines
\MH_if_dim:w
\MH_if_dim:w \@totalleftmargin=\z@
@@ -185,7 +187,7 @@
\vskip\normallineskiplimit
\vskip\l_MT_above_shortintertext_sep
\vbox{%
- \ifmeasuring@\tag_stop:\fi
+ \ifmeasuring@\tag_suspend:n{\measuring}\fi
\normalbaselines
\MH_if_dim:w
\MH_if_dim:w \@totalleftmargin=\z@
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf
index aae05b3b63..808002a82a 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-mathtools.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx b/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx
index ffbe5357e7..eed595a531 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-minipage.dtx
@@ -18,8 +18,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabminipagedate{2023-10-30}
-\def\ltlabminipageversion{0.81c}
+\def\ltlabminipagedate{2024-09-18}
+\def\ltlabminipageversion{0.81e}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -120,12 +120,18 @@
% \end{macrocode}
% insert the socket
% \begin{macrocode}
- \socket_use:n{tagsupport/minipage/before}% new
+ \UseTaggingSocket{minipage/before}% new
\setbox\@tempboxa\vbox\bgroup
\color@begingroup
\hsize\@tempdima
\textwidth\hsize \columnwidth\hsize
\@parboxrestore
+% \end{macrocode}
+% minipages are perhaps used in environments where the tagging of paragraphs
+% has been altered. So we try to restore this. TODO: this should
+% perhaps be done in \cs{@parboxrestore} directly.
+% \begin{macrocode}
+ \UseTaggingSocket{para/restore}
\def\@mpfn{mpfootnote}\def\thempfn{\thempfootnote}\c@mpfootnote\z@
\socket_assign_plug:nn{fntext/process}{mp}%
\let\@listdepth\@mplistdepth \@mplistdepth\z@
@@ -150,10 +156,10 @@
% As the parbox command is called, we must prevent that it adds its
% additional tagging commands:
% \begin{macrocode}
- \tag_stop:n{minipage}
+ \tag_suspend:n{minipage}
\expandafter\@iiiparbox\@mpargs{\unvbox\@tempboxa}%
- \tag_start:n{minipage}
- \socket_use:n{tagsupport/minipage/after} %new end ...
+ \tag_resume:n{minipage}
+ \UseTaggingSocket{minipage/after} %new end ...
}
% \end{macrocode}
%
@@ -164,8 +170,15 @@
\leavevmode
\@pboxswfalse
\setlength\@tempdima{#4}%
- \socket_use:n{tagsupport/parbox/before}
- \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore#5\@@par}%
+ \UseTaggingSocket{parbox/before}
+ \@begin@tempboxa\vbox{\hsize\@tempdima\@parboxrestore
+% \end{macrocode}
+% parbox are perhaps used in environments where the tagging of paragraphs
+% has been altered. So we try to restore this. TODO: this should
+% perhaps be done in \cs{@parboxrestore} directly.
+% \begin{macrocode}
+ \UseTaggingSocket{para/restore}
+ #5\@@par}%
\ifx\relax#2\else
\setlength\@tempdimb{#2}%
\edef\@parboxto{to\the\@tempdimb}%
@@ -179,7 +192,7 @@
\csname bm@#3\endcsname}%
\if@pboxsw \m@th$\fi
\@end@tempboxa%
- \socket_use:n{tagsupport/parbox/after}
+ \UseTaggingSocket{parbox/after}
}
% \end{macrocode}
%
@@ -191,9 +204,11 @@
\socket_new_plug:nnn{tagsupport/minipage/before}{tag/dflt}
{
% \end{macrocode}
-% As there was a \cs{leavevmode} before that is a P/text open that we have to close.
+% As there was a \cs{leavevmode} before that is a P/text open that we have to close
+% if para tagging is active:
% \begin{macrocode}
- \tag_mc_end_push:\tag_struct_end:
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
% \end{macrocode}
% TODO: the P can be further up, we need a proper method to test and handle this.
% \begin{macrocode}
@@ -203,13 +218,25 @@
% similar for the other sockets:
% \begin{macrocode}
\socket_new_plug:nnn{tagsupport/minipage/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
\socket_new_plug:nnn{tagsupport/parbox/before}{tag/dflt}
- {\tag_mc_end_push:\tag_struct_end:\tag_struct_begin:n{tag=\l__ltboxes_tag_tl}}
+ {
+ \tag_mc_end_push:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_end:}
+ \tag_struct_begin:n{tag=\l__ltboxes_tag_tl}
+ }
\socket_new_plug:nnn{tagsupport/parbox/after}{tag/dflt}
- {\tag_struct_end:\tag_struct_begin:n{tag=\l__tag_para_tag_tl}\tag_mc_begin_pop:n{}}
+ {
+ \tag_struct_end:
+ \bool_if:NT \l__tag_para_bool {\tag_struct_begin:n{tag=\l__tag_para_tag_tl}}
+ \tag_mc_begin_pop:n{}
+ }
% \end{macrocode}
% Activate the default tagging plug
% \begin{macrocode}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf b/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf
index 68aeacb9ec..2bcf0ba455 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-minipage.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-namespace.dtx b/macros/latex-dev/required/latex-lab/latex-lab-namespace.dtx
index cfc06c7b09..d76dd8d489 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-namespace.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-namespace.dtx
@@ -26,7 +26,7 @@
% \fi
% \title{Prototype reimplementation of \LaTeXe{}'s role mapping}
% \author{\LaTeX{} Project, initial implementation Ulrike Fischer}
-% \date{v0.8b 2024-03-24}
+% \date{v0.8b 2024-07-05}
%
% \maketitle
%
@@ -37,7 +37,7 @@
% \section{Introduction}
%
% This short file collects tag names from the \LaTeX{} namespace and their role mapping used
-% in the latex-lab files. The names and the roles are not necessarly the final ones!
+% in the latex-lab files. The names and the roles are not necessarily the final ones!
%
% Later settings of the same tag overwrite previous settings.
% The syntax of a line is a list of three strings ending with commas:
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-namespace.pdf b/macros/latex-dev/required/latex-lab/latex-lab-namespace.pdf
index c172554fd8..1944d86751 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-namespace.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-namespace.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf
index ae453a241c..47ea20aff3 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-new-or-1.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf b/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf
index 87d097a831..51a6f6e707 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-new-or-2.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
index f3786c2ddb..936eee9ed2 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-sec.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabsecdate{2024-02-12}
-\def\ltlabsecversion{0.84c}
+\def\ltlabsecdate{2024-10-04}
+\def\ltlabsecversion{0.84f}
%<*driver>
\documentclass[kernel]{l3doc}
\EnableCrossrefs
@@ -121,7 +121,7 @@
% commands must be at the right grouping level.
% \end{itemize}
%
-% \subsection{Funktions and keys}
+% \subsection{Functions and keys}
%
% \begin{function}{\tag_tool:n,\tagtool}
%
@@ -138,7 +138,7 @@
% to allow e.g. to put an epigraph or similar in front.
%
% \item The number in \cs{part} and \cs{chapter} is currently not correctly
-% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependant)
+% tagged as a \texttt{Lbl} as this requires to redefine the internal (class dependent)
% commands too.
%
% \end{itemize}
@@ -198,28 +198,31 @@
% We must ensure that manual targets (e.g. in unnumbered sections)
% correctly update \cs{@currentHref}. For this we extend the kernel definition of
% \cs{MakeLinkTarget}
-%
+% TODO: remove after release 2024/11
% \begin{macrocode}
%<*kernelchange>
\ExplSyntaxOn
-\int_new:N\g__kernel_target_int
-\RenewDocumentCommand\MakeLinkTarget{sO{}m}
- {%
- \ifvmode
- \special{}%
- \else
- \@savsf\spacefactor
- \smash{}%
- \spacefactor\@savsf
- \fi
- \IfBooleanTF {#1}
- {
- \tl_gset:Ne \@currentHref {#3}
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
+ {
+ \int_new:N\g__kernel_target_int
+ \RenewDocumentCommand\MakeLinkTarget{sO{}m}
+ {%
+ \ifvmode
+ \special{}%
+ \else
+ \@savsf\spacefactor
+ \smash{}%
+ \spacefactor\@savsf
+ \fi
+ \IfBooleanTF {#1}
+ {
+ \tl_gset:Ne \@currentHref {#3}
+ }
+ {
+ \int_gincr:N\g__kernel_target_int
+ \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+ }
}
- {
- \int_gincr:N\g__kernel_target_int
- \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
- }
}
\ExplSyntaxOff
%</kernelchange>
@@ -227,45 +230,56 @@
%
% \begin{macrocode}
%<*package>
+%<@@=tag>
% \end{macrocode}
% \subsubsection{Tagging commands}
%
%
-% \begin{variable}{\g__tag_sec_stack_seq}
-% The stack holds the tag and the level.
+% \begin{variable}{\g_@@_sec_stack_seq}
+% The stack holds the tag, the level and the structure number.
% \begin{macrocode}
-\seq_new:N \g__tag_sec_stack_seq
-\seq_gpush:Nn\g__tag_sec_stack_seq {{Document}{-100}}
+\seq_new:N \g_@@_sec_stack_seq
+\seq_gpush:Nn\g_@@_sec_stack_seq {{Document}{-100}{2}}
% \end{macrocode}
% \end{variable}
%
-% \begin{variable}{\l__tag_sec_Sect_bool}
+% \begin{macro}{\@@_get_data_current_Sect:}
+% This allows to retrieve the number of the current Sect structure (or
+% Document if we are outside any Sect) with |\tag_get:n{current_Sect}|
+% \begin{macrocode}
+\cs_new:Npn \@@_get_data_current_Sect:
+ {
+ \exp_last_unbraced:Ne\use_iii:nnn{\seq_item:Nn\g_@@_sec_stack_seq{1}}
+ }
+% \end{macrocode}
+% \end{macro}
+% \begin{variable}{\l_@@_sec_Sect_bool}
% This boolean controls if a Sect structure is opened.
% \begin{macrocode}
-\bool_new:N \l__tag_sec_Sect_bool
-\bool_set_true:N\l__tag_sec_Sect_bool
+\bool_new:N \l_@@_sec_Sect_bool
+\bool_set_true:N\l_@@_sec_Sect_bool
% \end{macrocode}
% \end{variable}
-
-%
-% \begin{macro}{\__tag_sec_begin:nn}
+%
+% \begin{macro}{\@@_sec_begin:nn}
% This starts a sectioning structure.
% Currently the tag is fix, either Sect or Part, depending on the level,
% but this will perhaps change. The second argument is currently unused.
% \begin{macrocode}
-\cs_new_protected:Npn\__tag_sec_begin:nn #1 #2 %#1 level #2 keyval
+\cs_new_protected:Npn\@@_sec_begin:nn #1 #2 %#1 level #2 keyval
{
\tag_struct_begin:n
{
tag= {\int_compare:nNnTF {#1}={-1}{Part}{Sect}}
,#2
}
- \seq_gpush:Ne \g__tag_sec_stack_seq {{\g__tag_struct_tag_tl}{\int_eval:n{#1}}}
+ \seq_gpush:Ne \g_@@_sec_stack_seq
+ {{\g_@@_struct_tag_tl}{\int_eval:n{#1}}{\g_@@_struct_stack_current_tl}}
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\__tag_sec_end:n}
+% \begin{macro}{\@@_sec_end:n}
% \begin{macrocode}
\msg_new:nnn { tag } {wrong-sect-nesting}
{
@@ -273,65 +287,65 @@
It~is~not~equal~to~the~current~structure~#2~on~the~main~stack
}
-\cs_new_protected:Npn\__tag_sec_end:n #1 % #1 level
+\cs_new_protected:Npn\@@_sec_end:n #1 % #1 level
{
- \seq_get:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
- \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nn\l__tag_tmpa_tl+1}
+ \seq_get:NN \g_@@_sec_stack_seq \l_@@_tmpa_tl
+ \int_compare:nNnT {#1}<{\exp_last_unbraced:NV\use_ii:nnn\l_@@_tmpa_tl+1}
{
- \seq_get:NN\g__tag_struct_tag_stack_seq \l__tag_tmpb_tl
+ \seq_get:NN\g_@@_struct_tag_stack_seq \l_@@_tmpb_tl
\exp_args:Nee
\tl_if_eq:nnTF
- {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpa_tl}
- {\exp_last_unbraced:NV\use_i:nn\l__tag_tmpb_tl}
+ {\exp_last_unbraced:NV\use_i:nnn\l_@@_tmpa_tl}
+ {\exp_last_unbraced:NV\use_i:nn\l_@@_tmpb_tl}
{
- \seq_gpop:NN \g__tag_sec_stack_seq \l__tag_tmpa_tl
+ \seq_gpop:NN \g_@@_sec_stack_seq \l_@@_tmpa_tl
\tag_struct_end:
- \__tag_sec_end:n {#1}
+ \@@_sec_end:n {#1}
}
{
\msg_warning:nnee {tag}{wrong-sect-nesting}
- { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpa_tl }
- { \exp_last_unbraced:NV\use_i:nn \l__tag_tmpb_tl }
+ { \exp_last_unbraced:NV\use_i:nnn \l_@@_tmpa_tl }
+ { \exp_last_unbraced:NV\use_i:nn \l_@@_tmpb_tl }
}
}
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\__tag_tool_para_split:}
+% \begin{macro}{\@@_tool_para_split:}
% Runin-sectioning command must separate the heading from the following text.
%
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_tool_para_split:
+\cs_new_protected:Npn \@@_tool_para_split:
{
\tag_mc_end:
\tag_struct_end:
- \tag_struct_begin:n{tag=\l__tag_para_tag_default_tl}
+ \tag_struct_begin:n{tag=\l_@@_para_tag_default_tl}
\tag_mc_begin:n{}
- \__tag_setup_restore_para_default:
+ \@@_setup_restore_para_default:
}
% \end{macrocode}
% \end{macro}
-% \begin{macro}{\__tag_setup_restore_para_default:}
+% \begin{macro}{\@@_setup_restore_para_default:}
% We change the para tagging in the sectioning code.
% This here restores the default. Currently it only resets the
% the tag, but perhaps more will be needed later.
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_setup_restore_para_default:
+\cs_new_protected:Npn \@@_setup_restore_para_default:
{
- \tl_set:Nn \l__tag_para_main_tag_tl {text-unit}
- \tl_set_eq:NN\l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \tl_set:Nn \l_@@_para_main_tag_tl {text-unit}
+ \tl_set_eq:NN\l_@@_para_tag_tl\l_@@_para_tag_default_tl
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\__tag_sec_end_display:}
+% \begin{macro}{\@@_sec_end_display:}
% \begin{macrocode}
-\cs_new_protected:Npn \__tag_sec_end_display:
+\cs_new_protected:Npn \@@_sec_end_display:
{
\tag_struct_end: %P = Hn
- \__tag_setup_restore_para_default:
+ \@@_setup_restore_para_default:
}
% \end{macrocode}
% \end{macro}
@@ -339,17 +353,17 @@
% Open sec structures should be closed at the end of the document. This should
% be done before tagpdf closes the Document structure.
% \begin{macrocode}
-\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\__tag_sec_end:n{-10}}
+\hook_gput_code:nnn{tagpdf/finish/before}{tagpdf/sec}{\@@_sec_end:n{-10}}
\hook_gset_rule:nnnn {tagpdf/finish/before}{tagpdf/sec}{before}{tagpdf}
% \end{macrocode}
%
% The commands \cs{mainmatter}, \cs{backmatter}, \cs{frontmatter} and
% \cs{appendix} close all \texttt{Sect} and \texttt{Part} structures.
% \begin{macrocode}
-\AddToHook{cmd/frontmatter/before}{\__tag_sec_end:n{-10}}
-\AddToHook{cmd/mainmatter/before} {\__tag_sec_end:n{-10}}
-\AddToHook{cmd/backmatter/before} {\__tag_sec_end:n{-10}}
-\AddToHook{cmd/appendix/before} {\__tag_sec_end:n{-10}}
+\AddToHook{cmd/frontmatter/before}{\@@_sec_end:n{-10}}
+\AddToHook{cmd/mainmatter/before} {\@@_sec_end:n{-10}}
+\AddToHook{cmd/backmatter/before} {\@@_sec_end:n{-10}}
+\AddToHook{cmd/appendix/before} {\@@_sec_end:n{-10}}
% \end{macrocode}
%
% \subsection{Tagging tools}
@@ -368,57 +382,57 @@
{
,sec-start-part .code:n =
{
- \bool_if:NT\l__tag_sec_Sect_bool
+ \bool_if:NT\l_@@_sec_Sect_bool
{
- \__tag_sec_end:n {-1}
- \__tag_sec_begin:nn{-1}{tag=Part}
+ \@@_sec_end:n {-1}
+ \@@_sec_begin:nn{-1}{tag=Part}
}
\tag_struct_begin:n{tag=part,title=#1}
% \end{macrocode}
% We remap here the text-unit from the paragraph to NonStruct.
-% It would be better to suppress it completly as with the other
+% It would be better to suppress it completely as with the other
% sectioning commands, but this would require to redefine \cs{@spart}
% and \cs{@part}, as there is the grouping, and these commands are
% all slightly different in the standard classes. So this is delayed
% to the time when sectioning commands are redefined with templates.
% \begin{macrocode}
- \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct}
- \tl_set:Nn\l__tag_para_tag_tl {Span}
+ \tl_set:Nn\l_@@_para_main_tag_tl {NonStruct}
+ \tl_set:Nn\l_@@_para_tag_tl {Span}
}
- ,sec-stop-part .code:n = {\__tag_sec_end_display:}
+ ,sec-stop-part .code:n = {\@@_sec_end_display:}
,sec-start-chapter .code:n =
{
- \bool_if:NT\l__tag_sec_Sect_bool
+ \bool_if:NT\l_@@_sec_Sect_bool
{
- \__tag_sec_end:n {0}
- \__tag_sec_begin:nn{0}{tag=Sect}
+ \@@_sec_end:n {0}
+ \@@_sec_begin:nn{0}{tag=Sect}
}
\tag_struct_begin:n{tag=chapter,title=#1}
% \end{macrocode}
% similar to part we remap to NonStruct for now ...
% \begin{macrocode}
- \tl_set:Nn\l__tag_para_main_tag_tl {NonStruct}
- \tl_set:Nn\l__tag_para_tag_tl {Span}
+ \tl_set:Nn\l_@@_para_main_tag_tl {NonStruct}
+ \tl_set:Nn\l_@@_para_tag_tl {Span}
}
,sec-stop-chapter .meta:n = { sec-stop-part}
,sec-start .code:n = % #1 is a name like "section"
{
- \bool_if:NT\l__tag_sec_Sect_bool
+ \bool_if:NT\l_@@_sec_Sect_bool
{
- \__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0}
- \__tag_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect}
+ \@@_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0}
+ \@@_sec_begin:nn {\cs_if_exist_use:c{toclevel@#1}+0}{tag=Sect}
}
- \tl_set:Nn\l__tag_para_tag_tl{#1}
+ \tl_set:Nn\l_@@_para_tag_tl{#1}
}
,sec-start .value_required:n = true
- ,sec-split-para .code:n = {\__tag_tool_para_split:}
- ,restore-para .code:n = {\__tag_setup_restore_para_default:}
+ ,sec-split-para .code:n = {\@@_tool_para_split:}
+ ,restore-para .code:n = {\@@_setup_restore_para_default:}
,sec-stop .code:n =
{
- \par\__tag_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0}
+ \par\@@_sec_end:n {\cs_if_exist_use:c{toclevel@#1}+0}
}
,sec-stop .value_required:n = true
- ,sec-add-grouping .bool_set:N = \l__tag_sec_Sect_bool
+ ,sec-add-grouping .bool_set:N = \l_@@_sec_Sect_bool
}
% \end{macrocode}
%
@@ -433,6 +447,7 @@
% The tagging inside relies on the para tagging.
% We do not yet use keyval in the optional argument, as this requires latex-dev
% and the naming of the keys and their key family is unclear.
+% \changes{v0.84f}{2024/10/04}{Added braces around optional arg (tagging/725)}
% \begin{macrocode}
\AddToHook{class/after}
{
@@ -476,7 +491,7 @@
\IfBooleanTF
{#1}
{ \@spart {#3} }
- { \@part [#2]{#3} }
+ { \@part [{#2}]{#3} }
% \end{macrocode}
% and now the closing command for the tagging of the title.
% \begin{macrocode}
@@ -528,7 +543,7 @@
\IfBooleanTF
{#1}
{ \@schapter {#3} }
- { \@chapter [#2]{#3} }
+ { \@chapter [{#2}]{#3} }
% \end{macrocode}
% and now the closing command for the tagging of the title.
% \begin{macrocode}
@@ -583,7 +598,7 @@
\IfBooleanTF
{#1}
{ \@spart {#3} }
- { \@part [#2]{#3} }
+ { \@part [{#2}]{#3} }
% \end{macrocode}
% and now the closing command for the tagging of the title.
% \begin{macrocode}
@@ -669,8 +684,8 @@
% \begin{macrocode}
\cs_new_protected:Npn \@kernel@tag@hangfrom #1
{
- \tagstructbegin{tag=\l__tag_para_tag_tl}
- \cs_if_exist_use:N \__tag_gincr_para_begin_int:
+ \tagstructbegin{tag=\l_@@_para_tag_tl}
+ \cs_if_exist_use:N \@@_gincr_para_begin_int:
\tagstructbegin{tag=Lbl}
\setbox\@tempboxa
\hbox
@@ -680,7 +695,7 @@
% \begin{macrocode}
\bool_lazy_and:nnT
{\tag_if_active_p:}
- {\g__tag_mode_lua_bool}
+ {\g_@@_mode_lua_bool}
{\tagmcbegin{tag=Lbl}}
{#1}
}
@@ -689,12 +704,12 @@
% the paratagging. We do not disable paratagging completely, to
% avoid that the numbering goes wrong.
% \begin{macrocode}
- \tag_stop:n{hangfrom}
+ \tag_suspend:n{hangfrom}
\hangindent \wd\@tempboxa\noindent
% \end{macrocode}
% Restart tagging and insert the box.
% \begin{macrocode}
- \tag_start:n{hangfrom}
+ \tag_resume:n{hangfrom}
\tagmcbegin{}\box\@tempboxa\tagmcend\tagstructend\tagmcbegin{}}
% \end{macrocode}
% This command is used to tag the numbers of runin. We do not try
@@ -715,6 +730,7 @@
% \cs{@sect} is only changed to replace the hyperref patches
% and to use the new \cs{@kernel@tag@hangfrom} and \cs{@kernel@tag@svsec}
% \begin{macrocode}
+%<@@=>
\def\@sect#1#2#3#4#5#6[#7]#8{%
\ifnum #2>\c@secnumdepth
\def\@svsec{\@hyp@section@target@nnn{[section]}{}{#3}}
@@ -727,7 +743,7 @@
\@tempskipa #5\relax
\ifdim \@tempskipa>\z@
\begingroup
- \tagtool{para-flattened=true} % or \bool_set_true\l__tag_para_flattened_bool
+ \tagtool{para-flattened=true} % or \bool_set_true\l_@@_para_flattened_bool
#6{%
\ifnum #2>\c@secnumdepth
\@hangfrom {\hskip #3\relax\@svsec}%
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf b/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf
index d7e97aa25c..14a27d4f1d 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-sec.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-table.dtx b/macros/latex-dev/required/latex-lab/latex-lab-table.dtx
index 38596478ae..c65667e8ed 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-table.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-table.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabtbldate{2024-05-25}
-\def\ltlabtblversion{0.85i}
+\def\ltlabtbldate{2024-09-18}
+\def\ltlabtblversion{0.85n}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -100,6 +100,7 @@
% support for the tagging of tables. A list of the known limitations
% is shown below.
%
+% \subsection{Loading}
% The module is not loaded automatically (i.e., not yet integrated
% into any \texttt{phase-XX}) and by itself it doesn't activate
% tagging. For experimenting with table tagging it is therefore best
@@ -113,7 +114,26 @@
% It will then automatically tag all table environments it already supports with
% the exception of tables in the header and footer of the page (where tagging is disabled).
% Such tables can be nested.
+%
+% Inside cells the automatic tagging of paragraphs is disabled with the exception of
+% p/m/b-type cells.
%
+% Rows do not need to contain a full number of \&, missing cells are automatically
+% added with an empty TD-structure.
+%
+% You should not insert meaningful text with \verb+!{...}+ or \verb+@{...}+ or \cs{noalign}
+% between the rows or columns of the table.
+% With pdflatex such text will be unmarked, with lualatex it will be marked as artifact.
+% Either case means that it will be currently ignored in the
+% structure.\footnote{While it is theoretically possible
+% to collect such text and move it into a structure it would require manual markup
+% from the author to clarify where this text belongs too.}
+%
+% As mentioned below the \pkg{colortbl} doesn't work fully with the tagging,
+% but when it does, colors inside the table are currently ignored. If such a color
+% has a semantic meaning (like \enquote{important value}) this meaning will be lost.
+%
+% \subsection{Untagged and presentation tables}
% If a table should not be tagged as table, for example because it is merely used
% as a layout to ensure that the content is properly aligned
% or because it is a not yet (fully) supported table structure,
@@ -130,41 +150,43 @@
% The key should currently only be used in a group as there is no key (yet) to reset to the default
% tag names.
%
-% Inside cells the automatic tagging of paragraphs is disabled with the exception of
-% p/m/b-type cells.
-%
-% Rows do not need to contain a full number of \&, missing cells are automatically
-% added with an empty TD-structure.
-%
+% \subsection{Header rows and columns}
% There is some basic support\footnote{This is not meant to be the
% final interface, though.} for headers. With\footnote{The old key name \texttt{table-header-rows} still
% works but is deprecated.}
% \begin{quote}
% \verb|\tagpdfsetup{table/header-rows={|\meta{list of row numbers}\verb|}|
+% \verb|\tagpdfsetup{table/header-columns={|\meta{list of column numbers}\verb|}|
% \end{quote}
% you can
-% declare which (absolute) row numbers should be tagged as header rows.
-% It applies to all tables until it is changed to a different list of row numbers or undone by setting
-% the key to \meta{empty}.
-% A row number can be
-% negative, then the counting starts from the end of the table. There is no support
-% for header columns yet. In a \env{longtable} the code will currently use the \cs{endhead} or
+% declare which (absolute) row and column numbers should be tagged as header rows and header columns.
+% It applies to all tables until it is changed to a different list of row or
+% columns numbers or undone by setting
+% the keys to \meta{empty}.
+% A row or column number can be
+% negative, then the counting starts from the end of the table.
+% In a \env{longtable} the code will currently use the \cs{endhead} or
% \cs{endfirsthead} rows as header if one of these commands has been
% used and in that case the code
% ignores a \texttt{table/header-rows} setting.
%
-% You should not insert meaningful text with \verb+!{...}+ or \verb+@{...}+ or \cs{noalign}
-% between the rows or columns of the table.
-% With pdflatex such text will be unmarked, with lualatex it will be marked as artifact.
-% Either case means that it will be currently ignored in the
-% structure.\footnote{While it is theoretically possible
-% to collect such text and move it into a structure it would require manual markup
-% from the author to clarify where this text belongs too.}
+% \subsection{Spanning of cells}
%
-% As mentioned below the \pkg{colortbl} doesn't yet work properly with the tagging,
-% but once it does, then colors inside the table will probably be
-% simply ignored (at least initially). If such a color
-% has a semantic meaning (like \enquote{important value}) this meaning will be lost.
+% \cs{multicolumn} is supported out of the box and will create a structure with a
+% suitable \texttt{ColSpan} attribute\footnote{The code uses actually an attribute \emph{class}.
+% The validator PAC doesn't handle this correctly currently and complains about a missing attribute.}
+%
+% For cells spanning rows some preliminary support exists\footnote{The interface is bound to change!}:
+% If you add
+% \begin{quote}
+% \verb|\tagpdfsetup{table/multirow={|\meta{number of rows}\verb|}|
+% \end{quote}
+% to a cell the code will add the suitable \texttt{RowSpan} attribute and suppress the tagging of affected
+% cells in the following rows. This will also work if the current cell is a \cs{multicolumn}, then
+% the cell will span both rows and columns. It is the duty of the author to
+% ensure that all cells below and covered by a \texttt{RowSpan} are empty!
+% The code neither checks that nor does
+% it tries to suppress content.
%
% Feedback and problems with the code can be reported at
% \url{https://github.com/latex3/tagging-project} either in form of
@@ -183,19 +205,19 @@
% \item the \env{array} environment is assumed to be part of math and tagging as a table is disabled for
% it.
%
-% \item Row spans are not yet supported (and the \pkg{multirow} package is untested).
+% \item Row spans can only be added manually (the \pkg{multirow} package is untested).
%
-% \item The \pkg{colortbl} package breaks tagging if there are nested tables. It also breaks
-% the filling up of incomplete rows.
+% \item The \pkg{colortbl} package breaks tagging if there are nested tables.
%
% \item The \pkg{tabularray} package use a completed different
% method to create tables and will not be supported by this code.
%
% \item The \pkg{nicematrix} package is currently incompatible.
%
-% \item Most other packages related to tables in \LaTeX{} are not yet tested,
+% \item Most other packages related to tables in \LaTeX{} are not fully tested,
% that includes packages that change rules like \pkg{booktabs}, \pkg{hhline},
-% \pkg{arydshln}, \pkg{hvdashln}.
+% \pkg{arydshln}, \pkg{hvdashln}. Some problems have been resolved, either
+% in the packages or through a firstaid which can be loaded the \verb+testphase=firstaid+.
%
% \item \env{longtable} currently only works with lualatex.
% With other engines it breaks as its output
@@ -208,9 +230,9 @@
% the tagging of the table must be deactivated with \verb|\tagpdfsetup{table/tagging=false}|
% or \verb|\tagpdfsetup{table/tagging=presentation}|.
%
-% \item Only simple header rows are currently supported. Columns and complex headers with
+% \item Only simple header rows and columns are currently supported. Complex headers with
% subheaders will be handled later as that needs some syntax changes. Tables
-% with more than one header row are probably not pdf/UA as the headers array in
+% with more than one header row or column are probably not pdf/UA as the headers array in
% the cells is missing.
%
% \item A \pkg{longtable} \cs{caption} is currently simply formatted as a multicolumn and
@@ -259,9 +281,6 @@
%
% \item Longtable captions should be properly supported.
%
-% \item Handle p-cells better. para-tagging should probably be enabled,
-% but Part can't be a child of TD, so this should probably be changed to Div here.
-% Also there is a stray MC somewhere.
%
% \item More packages must be tested.
% \end{itemize}
@@ -292,8 +311,8 @@
% ,\l_@@_cellattribute_tl
% ,\l_@@_rowattribute_tl
% ,\l_@@_tmpa_clist
-% ,\l_@@_tmpa_seq
% ,\l_@@_tmpa_tl
+% ,\l_@@_tmpa_str
% }
% This is for the celltag, e.g. TD or TH:
% \begin{macrocode}
@@ -319,10 +338,16 @@
\tl_new:N \l_@@_rowattribute_tl
\tl_set:Nn \l_@@_rowattribute_tl {}
% \end{macrocode}
+% Variable to store cell info like which cell must be skipped when tagging multirows.
+% \begin{macrocode}
+\prop_new:N\g_@@_untagged_cells_prop
+\prop_new:N\l_@@_saved_untagged_cells_prop
+% \end{macrocode}
% Temp variables
% \begin{macrocode}
\clist_new:N \l_@@_tmpa_clist
\tl_new:N \l_@@_tmpa_tl
+\str_new:N \l_@@_tmpa_str
% \end{macrocode}
% \end{macro}
%
@@ -330,7 +355,41 @@
%
%
% This are the standard plugs for tagging of cells and rows.
-%
+%
+% The following two sockets are defined in lttagging, but we check
+% for their existence until the release 11/2024.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/tbl/init/celldata_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/init/celldata}{0}
+ \NewSocket{tagsupport/tbl/restore/celldata}{0}
+ }
+% \end{macrocode}
+% \begin{plugdecl}{default}
+% This socket is used inside \cs{tbl_init_cell_data_for_table} for the
+% case that this a nested table in a cell.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/tbl/init/celldata}{default}
+ {
+ \prop_set_eq:NN\l_@@_saved_untagged_cells_prop \g_@@_untagged_cells_prop
+ \prop_gclear:N \g_@@_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/init/celldata}{default}
+% \end{macrocode}
+% \end{plugdecl}
+
+% \begin{plugdecl}{default}
+% This socket is used inside \cs{tbl_restore_outer_cell_data:} and restores
+% values when a nested table is ended.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/tbl/restore/celldata}{default}
+ {
+ \prop_gset_eq:NN\g_@@_untagged_cells_prop \l_@@_saved_untagged_cells_prop
+ }
+\AssignSocketPlug{tagsupport/tbl/restore/celldata}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
% \begin{plugdecl}{TD}
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/cell/begin}{TD}
@@ -340,21 +399,44 @@
% always even if the noop plug is in force this needs a different solution.
% \begin{macrocode}
\@@_show_curr_cell_data:
- \tag_struct_begin:n
+% \end{macrocode}
+% We test if the cell should be tagged at all.
+% \begin{macrocode}
+ \@@_if_tag_cell:nnT {\g_@@_row_int } { \g_@@_col_int }
{
- tag =\l_@@_celltag_tl,
- attribute-class =\l_@@_cellattribute_tl
- }
- \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
+% \end{macrocode}
+% this sets row headers
+% \begin{macrocode}
+ \clist_if_in:NVT \l_@@_header_columns_clist\g_@@_col_int
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+% \end{macrocode}
+% Here we handle negative value for row headers:
+% \begin{macrocode}
+ \tl_set:Ne \l_@@_tmpa_tl {\int_eval:n { \g_@@_col_int - 1 - \g_@@_table_cols_tl }}
+ \clist_if_in:NoT \l_@@_header_columns_clist { \l_@@_tmpa_tl }
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l_@@_celltag_tl,
+ attribute-class ={\l_@@_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
% \end{macrocode}
% we store the cells of multicolumns as negative number. This allow to skip them
% or to use them as needed.
% \begin{macrocode}
- \int_step_inline:nn { \g_@@_span_tl - 1 }
- {
- \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tag_mc_begin:n{}
+ \int_step_inline:nn { \g_@@_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tag_mc_begin:n{}
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -363,8 +445,11 @@
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/cell/end}{TD}
{
- \tag_mc_end:
- \tag_struct_end:
+ \@@_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -376,18 +461,26 @@
\NewSocketPlug{tagsupport/tbl/pcell/begin}{TDpbox}
{
\@@_show_curr_cell_data:
- \tag_struct_begin:n
+ \@@_if_tag_cell:nnT {\g__tbl_row_int } { \g__tbl_col_int }
{
- tag =\l__tbl_pcelltag_tl,
- attribute-class =\l__tbl_cellattribute_tl
- }
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { \tag_get:n {struct_num} }
- \int_step_inline:nn { \g__tbl_span_tl - 1 }
- {
- \seq_gput_right:Ne \g__tbl_struct_cur_seq { -\tag_get:n {struct_num} }
- }
- \tagpdfparaOn
- \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \clist_if_in:NVT \l_@@_header_columns_clist\g_@@_col_int
+ {
+ \tl_set:Nn \l_@@_celltag_tl {TH}
+ \tl_set:Ne \l_@@_cellattribute_tl {\l_@@_cellattribute_tl,TH-row}
+ }
+ \tag_struct_begin:n
+ {
+ tag =\l_@@_pcelltag_tl,
+ attribute-class ={\l_@@_cellattribute_tl}
+ }
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { \tag_get:n {struct_num} }
+ \int_step_inline:nn { \g_@@_span_tl - 1 }
+ {
+ \seq_gput_right:Ne \g_@@_struct_cur_seq { -\tag_get:n {struct_num} }
+ }
+ \tagpdfparaOn
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -396,7 +489,12 @@
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/pcell/end}{TDpbox}
{
- \tag_struct_end:
+ \@@_if_tag_cell:nnT {\g_@@_row_int } { \g_@@_col_int }
+ {
+ \tag_struct_end:
+ \legacy_if:nT {@endpe}{\par}
+ \mode_if_vertical:T{ \tagpdfparaOff }
+ }
}
% \end{macrocode}
% \end{plugdecl}
@@ -432,7 +530,7 @@
{
\@@_trace:n
{==>~
- stucture~stored~for~row~\int_use:N\g_@@_row_int :~
+ structure~stored~for~row~\int_use:N\g_@@_row_int :~
\seq_use:Nn \g_@@_struct_cur_seq {,}
}
}
@@ -447,21 +545,49 @@
% normal tables which can also be used inline and nested and
% \enquote{vmode} tables like longtable.
%
+% \begin{macro}{\l__tag_block_flattened_level_int}
+% Count the levels of nested blockenvs starting with the first that
+% is \enquote{flattened}. The counter is defined in lttagging.dtx,
+% but until the next release 11/24 we set it up here too so that we can
+% use it in the following socket
+% \begin{macrocode}
+\int_if_exist:NF \l__tag_block_flattened_level_int
+ {
+ \int_new:N \l__tag_block_flattened_level_int
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{plugdecl}{Table}
+% Inside a TD or TR Part is not allowed as child. For structures that restore
+% paragraph settings we therefore need a special plug that adjust the settings.
+% Currently we set the para main tag to Div. This leads to double Div-structures
+% but flattening the paragraph doesn't work, it errors if there is a list inside.
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/para/restore}{Table}
+ {
+ \tl_set:Nn \l__tag_para_main_tag_tl {Div}
+ \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \bool_set_true:N \l__tag_para_bool
+ \bool_set_false:N \l__tag_para_flattened_bool
+ \int_zero:N \l__tag_block_flattened_level_int
+ }
+% \end{macrocode}
+% \end{plugdecl}
+%
% \begin{plugdecl}{Table}
% Inside a table we currently only disable paratagging. We assume
-% that these sockets are in an environment group, so there is no
+% that these sockets are called in a group, so there is no
% need to reenable paratagging.
% \begin{macrocode}
\NewSocketPlug{tagsupport/tbl/init}{Table}
{
- \tag_if_active:T
- {
- \bool_set_false:N \l__tag_para_bool
+ \bool_set_false:N \l__tag_para_bool
+ \AssignSocketPlug{tagsupport/para/restore}{Table}
% \end{macrocode}
% We also initialize the structure data variables a this point.
% \begin{macrocode}
- \@@_init_struct_data:
- }
+ \@@_init_struct_data:
}
% \end{macrocode}
% \end{plugdecl}
@@ -573,7 +699,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l_@@_tmpa_tl _prop }
{
- \exp_args:No \__tag_struct_prop_gput:nnn {\l_@@_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn { \l_@@_tmpa_tl } {S}{/Artifact}
}
}
}
@@ -664,7 +790,7 @@
\prop_if_exist:cT
{ g__tag_struct_ \l_@@_tmpa_tl _prop }
{
- \exp_args:No\__tag_struct_prop_gput:nnn {\l_@@_tmpa_tl} {S}{/Artifact}
+ \__tag_struct_prop_gput:onn {\l_@@_tmpa_tl} {S}{/Artifact}
}
}
}
@@ -711,7 +837,7 @@
\tag_mc_end_push:
% \end{macrocode}
% Close the P-chunk. This assumes that para-tagging is active.
-% For nested tables that is not necessarly true, so we test for it.
+% For nested tables that is not necessarily true, so we test for it.
% \begin{macrocode}
\bool_lazy_and:nnT
{ \bool_if_exist_p:N \l__tag_para_bool } { \l__tag_para_bool }
@@ -729,7 +855,7 @@
\tag_struct_end:
% \end{macrocode}
% reopen the P-chunk. This assumes that para-tagging is active.
-% For nested tables that is not necessarly true, so we test for it.
+% For nested tables that is not necessarily true, so we test for it.
% \begin{macrocode}
\bool_lazy_and:nnT
{ \bool_if_exist_p:N \l__tag_para_bool } { \l__tag_para_bool }
@@ -778,15 +904,32 @@
{/O /Table /ColSpan~\int_eval:n{#1}}
}
\tl_set:Ne \l_@@_cellattribute_tl
- {colspan-\int_eval:n{#1}}
+ {\l_@@_cellattribute_tl,colspan-\int_eval:n{#1}}
}
}
% \end{macrocode}
-% TODO: move to tagpdf
+% \end{plugdecl}
+%
+%
+%
+%
+% \begin{plugdecl}{code}
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/tbl/leaders/end_plug_str }
+ {
+ \NewSocket{tagsupport/tbl/leaders/begin}{0}
+ \NewSocket{tagsupport/tbl/leaders/end}{0}
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
-\tag_if_active:T
- { \cs_generate_variant:Nn \__tag_attr_new_entry:nn {ee} }
-
+\NewSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ { \tag_mc_begin:n{artifact} }
+\NewSocketPlug{tagsupport/tbl/leaders/end}{code}
+ { \tag_mc_end: }
% \end{macrocode}
% \end{plugdecl}
%
@@ -810,8 +953,7 @@
% \subsection{Interfaces to tagging}
%
% \subsubsection{Tagging helper commands}
-%
-%
+
% \subsubsection{Disabling/enabling}
%
% For now we have only the option true/false but this will probably be extended
@@ -839,6 +981,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{noop}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{noop}
\AssignSocketPlug{tagsupport/tbl/colspan}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{noop}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{noop}
}
% \end{macrocode}
% \end{macro}
@@ -866,6 +1010,8 @@
\AssignSocketPlug{tagsupport/tbl/vmode/begin}{Table}
\AssignSocketPlug{tagsupport/tbl/vmode/end}{Table}
\AssignSocketPlug{tagsupport/tbl/colspan}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/begin}{code}
+ \AssignSocketPlug{tagsupport/tbl/leaders/end}{code}
}
% \end{macrocode}
% \end{macro}
@@ -886,14 +1032,15 @@
\tl_set:Nn\l_@@_pcelltag_tl {NonStruct}
\tl_set:Nn\l_@@_celltag_tl {text}
\tl_set:Nn\l_@@_tabletag_tl {Div}
- \clist_clear:N \l_@@_header_rows_clist
+ \clist_clear:N \l_@@_header_rows_clist
+ \clist_clear:N \l_@@_header_columns_clist
},
table/tagging .default:n = true,
table/tagging .initial:n = true
}
% \end{macrocode}
% This are the old key names kept for now for
-% compability. They will got at some time.
+% compatibility. They will got at some time.
% \begin{macrocode}
\keys_define:nn { __tag / setup }
{
@@ -955,11 +1102,12 @@
% \end{macrocode}
%
-% \begin{variable}{\l_@@_header_rows_clist}
-% This holds the numbers of the header rows. Negative numbers are
+% \begin{variable}{\l_@@_header_rows_clist,\l_@@_header_columns_clist}
+% This holds the numbers of the header rows and columns. Negative numbers are
% possible and count from the last column backwards.
% \begin{macrocode}
\clist_new:N \l_@@_header_rows_clist
+\clist_new:N \l_@@_header_columns_clist
% \end{macrocode}
% \end{variable}
%
@@ -982,14 +1130,26 @@
{
\__tag_struct_prop_gput:nnn{ ####1 }{S}{/TH}
% \end{macrocode}
-% This need refinement once row headers (and perhaps other attributes)
-% are used too, but for now it should be ok.
+% This sets the scope class. If the header has already a row attribute
+% we replace by TH-both.
% \begin{macrocode}
\prop_get:cnNTF
{ g__tag_struct_####1_prop }
{ C }
\l_@@_tmpa_tl
- {\__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l_@@_tmpa_tl]} }
+ {
+ \str_set:Ne \l_@@_tmpa_str {\l_@@_tmpa_tl}
+ \str_remove_once:Nn \l_@@_tmpa_str {[}
+ \str_remove_once:Nn \l_@@_tmpa_str {]}
+ \str_if_in:NnTF\l_@@_tmpa_str{/TH-row}
+ {
+ \str_replace_once:Nnn \l_@@_tmpa_str {/TH-row}{/TH-both}
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[\l_@@_tmpa_str]}
+ }
+ {
+ \__tag_struct_prop_gput:nne{ ####1 }{C}{[/TH-col~\l_@@_tmpa_str]}
+ }
+ }
{\__tag_struct_prop_gput:nnn{ ####1 }{C}{/TH-col}}
}
}
@@ -1004,6 +1164,7 @@
\keys_define:nn { __tag / setup }
{
table/header-rows .clist_set:N = \l_@@_header_rows_clist,
+ table/header-columns .clist_set:N = \l_@@_header_columns_clist,
% \end{macrocode}
% obsolete older name:
% \begin{macrocode}
@@ -1011,8 +1172,114 @@
}
% \end{macrocode}
%
+% \subsection{Multirow support}
+%
+% \begin{macro}{\@@_multirow:n}
+% This command makes the current cell into a multirow cell:
+% it creates, if needed, an RowSpan-attribute, adds it to the attributes
+% of the cell structure, and marks all following cells spanned by the multirow
+% as cells that should not be tagged. The argument is the number of spanned row
+% (including the current row).
+% \begin{macrocode}
+\cs_if_exist:NT \__tag_struct_prop_gput:nnn
+ {
+ \cs_generate_variant:Nn \__tag_struct_prop_gput:nnn {one}
+ }
+\cs_new_protected:Npn \@@_multirow:n #1
+ {
+% \end{macrocode}
+% Create an attribute if needed:
+% \begin{macrocode}
+ \prop_get:NeNF \g__tag_attr_entries_prop
+ {rowspan-\int_eval:n{#1}}
+ \l_@@_tmpa_tl
+ {
+ \__tag_attr_new_entry:ee
+ {rowspan-\int_eval:n{#1}}
+ {/O /Table /RowSpan~\int_eval:n{#1}}
+ }
+% \end{macrocode}
+% ensure that the attribute is marked as used:
+% \begin{macrocode}
+ \seq_gput_left:Ne\g__tag_attr_class_used_seq
+ {\pdf_name_from_unicode_e:n{rowspan-\int_eval:n{#1}}}
+% \end{macrocode}
+% Get the structure number of the current cell
+% \begin{macrocode}
+ \seq_get_right:NN\g_@@_struct_cur_seq \l_@@_tmpb_tl
+% \end{macrocode}
+% If we are in a multicolumn the number can be negative and
+% this must be changed
+% \begin{macrocode}
+ \tl_set:Ne \l_@@_tmpb_tl { \int_abs:n{\l_@@_tmpb_tl} }
+% \end{macrocode}
+% no we must update an existing attribute.
+% TODO: simplify this ... (see also colspan handling).
+% \begin{macrocode}
+ \prop_get:cnNTF
+ { g__tag_struct_\l_@@_tmpb_tl _prop }
+ { C }
+ \l_@@_tmpa_tl
+ {
+ \tl_remove_once:Nn \l_@@_tmpa_tl {[}
+ \tl_remove_once:Nn \l_@@_tmpa_tl {]}
+ \__tag_struct_prop_gput:one{ \l_@@_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}~\l_@@_tmpa_tl]}
+ }
+ {
+ \__tag_struct_prop_gput:one{ \l_@@_tmpb_tl }
+ {C}
+ {[/rowspan-\int_eval:n{#1}]}
+ }
+% \end{macrocode}
+% Now mark the spanned cells that should be ignored.
+% \begin{macrocode}
+ \@@_gset_untagged_row_cells:nn {#1-1}{\g_@@_span_tl}
+ }
+% \end{macrocode}
+% \end{macro}
%
+% \begin{macrocode}
+\keys_define:nn{ __tag / setup }
+ { table/multirow .code:n = {\@@_multirow:n {#1} }
+ ,table/multirow .default:n = 1
+ }
+% \end{macrocode}
%
+% \begin{macro}{\@@_gset_untagged_row_cells:nn}
+% This command stores the row and column numbers of the cells in the following row(s)
+% that should not be tagged as they are a part of a rowspan.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_gset_untagged_row_cells:nn #1 #2 % #1 number of rows, #2 number of columns
+ {
+ \int_step_inline:nn {#1}
+ {
+ \int_step_inline:nn {#2}
+ {
+ \prop_gput:Nee \g_@@_untagged_cells_prop
+ { \int_eval:n {\g_@@_row_int + ##1},\int_eval:n{\g_@@_col_int + ####1 -1 } }{}
+ }
+ }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@@_if_tag_cell:nn}
+% We must be able to detect if a cell should be tagged. For this
+% we define a conditional --- if more options are needed it can be extended.
+% \begin{macrocode}
+\prg_new_protected_conditional:Npnn\@@_if_tag_cell:nn #1 #2 %#1 row, #2 col
+ { T,TF }
+ {
+ \prop_get:NeNTF \g_@@_untagged_cells_prop
+ {\int_eval:n{#1},\int_eval:n{#2}}\l__tbl_tmpa_tl
+ { \prg_return_false:}
+ { \prg_return_true: }
+ }
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Misc stuff}
%
% \begin{macro}{\@@_show_curr_cell_data:}
@@ -1037,13 +1304,6 @@
% cell of a row, but still inside that cell, so we use two
% commands. The one adding is used in the row/end socket.
% \begin{macrocode}
-\NewSocket{tbl/celldata/missingcount}{1}
-\NewSocketPlug{tbl/celldata/missingcount}{code}{\tbl_count_missing_cells:n{#1}}
-\AssignSocketPlug{tbl/celldata/missingcount}{code}
-
-% \end{macrocode}
-%
-% \begin{macrocode}
\cs_new:Npn \@@_add_missing_cells:
{
% \end{macrocode}
@@ -1058,6 +1318,7 @@
additional~cell(s)~into~previous~row:}
\int_step_inline:nn { \g_@@_missing_cells_int }
{
+ \int_gincr:N\g_@@_col_int
\UseTaggingSocket{tbl/cell/begin}
\UseTaggingSocket{tbl/cell/end}
}
@@ -1164,9 +1425,9 @@
}
\hbox to\z@{\hss\parbox[t]\LTcapwidth{%
\reset@font
- \tag_stop:n{caption}
+ \tag_suspend:n{caption}
\sbox\@tempboxa{#1{#2:~}#3}%
- \tag_start:n{caption}
+ \tag_resume:n{caption}
\ifdim\wd\@tempboxa>\hsize
#1{#2:~}#3%
\else
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-table.pdf b/macros/latex-dev/required/latex-lab/latex-lab-table.pdf
index 199232ce63..7afc4ddccf 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-table.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-table.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx b/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
index f0a6fe65d0..1134654cd6 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
@@ -47,7 +47,7 @@
%
% Currently the values |phase-I|, |phase-II|, |phase-III| and |new-or| (bundles |new-or-1|
% and |new-or-2|) are provided.
-% |tagpdf| is an undocumented alias for |phase-II| which is kept for compability.
+% |tagpdf| is an undocumented alias for |phase-II| which is kept for compatibility.
% The value |math| combines various math related files.
%
% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf b/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf
index 531eff4508..c06a7d9687 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-testphase.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-text.dtx b/macros/latex-dev/required/latex-lab/latex-lab-text.dtx
index fe9b6ababc..7ca99191dc 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-text.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-text.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabtextdate{2023-07-20}
-\def\ltlabtextversion{0.85a}
+\def\ltlabtextdate{2024-09-18}
+\def\ltlabtextversion{0.85b}
%<*driver>
\documentclass{l3doc}
@@ -78,11 +78,11 @@
\tag_mc_end_push:
\tag_struct_begin:n{tag=Span,actualtext=LaTeX}
\tag_mc_begin:n{}
- \tag_stop:n{LaTeX}
+ \tag_suspend:n{LaTeX}
}
\AddToHook{cmd/LaTeX/after}
{
- \tag_start:n{LaTeX}
+ \tag_resume:n{LaTeX}
\tag_mc_end:
\tag_struct_end:
\tag_mc_begin_pop:n{}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-text.pdf b/macros/latex-dev/required/latex-lab/latex-lab-text.pdf
index ded11a05be..8a936402cc 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-text.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-text.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-title.pdf b/macros/latex-dev/required/latex-lab/latex-lab-title.pdf
index 934b25bdda..ea09bc34bb 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-title.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-title.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf
index 58690a8fa9..c1bebcd1c5 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-hyperref-changes.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx
index bb88ffdcb0..2934a26168 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.dtx
@@ -17,8 +17,8 @@
% for those people who are interested or want to report an issue.
%
% dates for latex-lab-kernel-changes.sty (pulled from various sources, see ins)
-\def\ltlabkerneldate{2024-02-12}
-\def\ltlabkernelversion{0.85c}
+\def\ltlabkerneldate{2024-07-11}
+\def\ltlabkernelversion{0.85d}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -44,6 +44,11 @@
%
% \providecommand\hook[1]{\texttt{#1}}
%
+%
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
+%
% \begin{abstract}
% \end{abstract}
%
@@ -68,67 +73,14 @@
% \end{macrocode}
%
% \subsection{Providing the counter representation \cs{theHxx} generally}
-% [kernel?]
-%
-% The \cs{theHxx} representation allows to create a unique representation of a counter
-% that is for example used to create destination names. It will also be needed
-% to add |/Ref| keys to various tagging structures. It makes therefore sense
-% to provide it by default as soon as a counter is created. The |\@addtoreset| change
-% (taken also from hyperref) tries to ensure the counter stays unique if it is reset.
-%
-% At first we suppress the patches from hyperref:
+%
+% This has been moved to base.
+%
+% We still suppress the patches from hyperref:
% \begin{macrocode}
\def\hyper@nopatch@counter{}
% \end{macrocode}
-%
-% \begin{macrocode}
-\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
- \setcounter{#1}\z@
- \global\expandafter\let\csname cl@#1\endcsname\@empty
- \@addtoreset{#1}{@ckpt}%
- \global\expandafter\let\csname p@#1\endcsname\@empty
- \expandafter\gdef\csname theH#1\endcsname{\the\value{#1}}%new
- \expandafter
- \gdef\csname the#1\expandafter\endcsname\expandafter
- {\expandafter\@arabic\csname c@#1\endcsname}}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
- \expandafter\gdef\csname theH#1\endcsname{\csname theH#2\endcsname.\the\value{#1}}%
-}
-% \end{macrocode}
-% The following counters are defined in the kernel
-% \begin{macrocode}
-\gdef\theHenumi{\the\value{enumi}}
-\gdef\theHenumii{\the\value{enumii}}
-\gdef\theHenumiii{\the\value{enumiii}}
-\gdef\theHenumiv{\the\value{enumiv}}
-\gdef\theHequation{\the\value{equation}}
-\gdef\theHfootnote{\the\value{footnote}}
-\gdef\theHmpfootnote{\the\value{mpfootnote}}
-% \end{macrocode}
-%
-% \subsection{Providing and updating \cs{@currentHref}}
-% [kernel?]
-%
-% \cs{@currentHref} contains the current unique representation of a counter.
-% It is useful also without hyperref as it allows to connect with a |/Ref|
-% key a toc entry with the heading it refers too. So \cs{refstepcounter}
-% is extended to update the command. This is done at the begin so that the
-% hyperref code can still adapt it later (using the cmd/refstepcounter/after hook
-% would be too late, and could also break with cleverref.)
-%
-% We also provide a kernel version that hyperref doesn't touch and so will never
-% set a target.
-% \begin{macrocode}
-\def\@currentHref{}
-\def\refstepcounter#1{\stepcounter{#1}%
- \edef\@currentcounter{#1}%
- \xdef\@currentHref {#1.\csname theH#1\endcsname}%
- \protected@edef\@currentlabel
- {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
-}
-\let\@kernel@refstepcounter\refstepcounter
-% \end{macrocode}
-%
+
% \subsection{Assigning the headings level numbers}
% [kernel?]
%
@@ -160,17 +112,21 @@
% catch as much as possible, see also tagging issue \#20. This should work also
% without hyperref. The property is defined in tagpdf-base, so the code would
% work also without tagging but we add a test anyway, this is probably faster.
+% TODO: remove
% \begin{macrocode}
\ExplSyntaxOn
-\AddToHookWithArguments{cmd/MakeLinkTarget/after}
- {
- \tag_if_active:T
- {
- \tl_if_blank:VF \@currentHref
- {
- \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
- }
- }
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_str }
+ {
+ \AddToHookWithArguments{cmd/MakeLinkTarget/after}
+ {
+ \tag_if_active:T
+ {
+ \tl_if_blank:VF \@currentHref
+ {
+ \prop_gput:Nee \g__tag_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+ }
+ }
+ }
}
\ExplSyntaxOff
% \end{macrocode}
@@ -187,12 +143,24 @@
% \subsection{\cs{contentsline} extension}
% [latex-lab]
% The tagging code must add code at the begin and end of \cs{contentsline}.
-% This code must have access to the arguments. We set it up as config point
-% for now.
+% This code must have access to the arguments. They are passed
+% together in tagging socket.
+% \begin{socketdecl}{tagsupport/toc/contentsline/before,
+% tagsupport/toc/contentsline/after}
+% Tagging sockets at the begin and end of contentsline.
+% They receive \emph{all} contentsline arguments as one argument
+% in four brace groups. The socket code should then use the parts it needs.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
% \begin{macrocode}
-\def\@contentsline@cfgpoint@before#1#2#3#4{}
-\def\@contentsline@cfgpoint@after#1#2#3#4{}
+\str_if_exist:cF { l__socket_tagsupport/toc/contentsline/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/contentsline/before}{1}
+ \NewSocket{tagsupport/toc/contentsline/after}{1}
+ }
% \end{macrocode}
+% \end{socketdecl}
% for the hooks we need that the \cs{l@XX} pass also the destination and
% that \cs{l@XX} takes three arguments.
% TODO: test that, if there are two many problems we should pass the
@@ -200,10 +168,10 @@
% \begin{macrocode}
\def\contentsline#1#2#3#4%
{%
- \@contentsline@cfgpoint@before{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/before}{{#1}{#2}{#3}{#4}}%
\gdef\@contentsline@destination{#4}%
\csname l@#1\endcsname{#2}{#3}%
- \@contentsline@cfgpoint@after{#1}{#2}{#3}{#4}%
+ \UseTaggingSocket{toc/contentsline/after}{{#1}{#2}{#3}{#4}}%
}
% \end{macrocode}
%
@@ -225,17 +193,33 @@
% \subsection{\cs{@starttoc}}
% [kernel?]
%
-% We add a configuration point before and after reading the file
+% We add a tagging socket before and after reading the file
% for the tagging.
+% \begin{socketdecl}{tagsupport/toc/starttoc/before,
+% tagsupport/toc/starttoc/after}
+% Tagging sockets for the begin and end of start of \cs{@starttoc}.
+% They take one argument, the extension.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/toc/starttoc/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/starttoc/before}{1}
+ \NewSocket{tagsupport/toc/starttoc/after}{1}
+ }
+% \end{macrocode}
+% \begin{macrocode}
+% \end{macrocode}
+% \end{socketdecl}
+%
% \begin{macrocode}
-\def\@starttoc@cfgpoint@before#1{}
-\def\@starttoc@cfgpoint@after#1{}
\def\@starttoc#1{%
\begingroup
\makeatletter
- \@starttoc@cfgpoint@before{#1}%
+ \UseTaggingSocket{toc/starttoc/before}{#1}%
\@input{\jobname.#1}%
- \@starttoc@cfgpoint@after{#1}%
+ \UseTaggingSocket{toc/starttoc/after}{#1}%
\if@filesw
\expandafter\newwrite\csname tf@#1\endcsname
\immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
@@ -269,15 +253,32 @@
\NewMirroredHookPairWithArguments{contentsline/page/before}{contentsline/page/after}{4}%
% \end{macrocode}
%
-% The dot in the leader must be set as artifact.
+% The dots in the leader must be set as artifact.
% But luatex requires that the mc are set outside the leaders.
-% So we need a config point.
+% So we need sockets.
%
% \cs{@dottedtocline} needs hooks and formatting commands.
-% We add a sixth argument so that it can grab the destination too.
+% To make the leaders into artifact we use tagging sockets.
+% The declaration should perhaps be moved into lttagging so that
+% it can be used also by external packages even if the tagging code is not
+% loaded?
+% \begin{socketdecl}{tagsupport/toc/leaders/before,
+% tagsupport/toc/leaders/after}
+% Tagging sockets to make the dot leaders an artifact.
+% They do not take an argument.
+% The sockets will be in lttagging.dtx, but that may only happen in
+% the next main release, so for now we test if they are in the
+% format and if not define them now.
+% \begin{macrocode}
+\str_if_exist:cF { l__socket_tagsupport/toc/leaders/before_plug_str }
+ {
+ \NewSocket{tagsupport/toc/leaders/before}{0}
+ \NewSocket{tagsupport/toc/leaders/after}{0}
+ }
+% \end{macrocode}
+% \end{socketdecl}
+% The destination is accessed through \cs{@contentsline@destination}.
% \begin{macrocode}
-\def\@dottedtocline@cfgpoint@leaders#1{#1}
-
\def\@dottedtocline#1#2#3#4#5{%
\ifnum #1>\c@tocdepth \else
\vskip \z@ \@plus.2\p@
@@ -291,10 +292,11 @@
\csname contentsline@text@#1@format\endcsname{#4}%
\UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline@destination}%
\nobreak
- \@dottedtocline@cfgpoint@leaders{%
+ \UseTaggingSocket{toc/leaders/before}\SuspendTagging{toc/leaders}%
\leaders\hbox{$\m@th
\mkern \@dotsep mu\hbox{.}\mkern \@dotsep
- mu$}\hfill}%
+ mu$}\hfill
+ \ResumeTagging{toc/leaders}\UseTaggingSocket{toc/leaders/after}%
\nobreak
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor
\UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline@destination}%
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf
index c3dc4523e5..acbeb4b619 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-toc-kernel-changes.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc.dtx b/macros/latex-dev/required/latex-lab/latex-lab-toc.dtx
index 7235eb9ed9..15dd403bdf 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-toc.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-toc.dtx
@@ -16,8 +16,8 @@
%
% for those people who are interested or want to report an issue.
%
-\def\ltlabtocdate{2023-10-16}
-\def\ltlabtocversion{0.85b}
+\def\ltlabtocdate{2024-09-26}
+\def\ltlabtocversion{0.85e}
%<*driver>
\documentclass{l3doc}
\EnableCrossrefs
@@ -42,7 +42,10 @@
% \newcommand{\docclass}{document class \marginpar{\raggedright document class
% customizations}}
%
-% \providecommand\hook[1]{\texttt{#1}}
+%
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
%
% \begin{abstract}
% \end{abstract}
@@ -111,66 +114,32 @@
% Defined by tagpdf.
% \end{variable}
%
-% \cs{refstepcounter} doesn't use \cs{MakeLinkTarget} (yet) so
-% we have to patch it too to store the relation between
-% destination names/\cs{@currentHref} and structure numbers
+% We have to to store the relation between
+% destination names/\cs{@currentHref} and structure numbers.
+% With a current kernel this is done in \cs{refstepcounter}
+% through the |recordtarget| socket. If that doesn't exist yet
+% we patch:
%
-% The property is set up in tagpdf-test so that one
-% doesn't has to check if the prop exists or not.
+% TODO remove after release 2024/11
% \begin{macrocode}
-\AddToHook{cmd/refstepcounter/after}
- {
- \tl_if_blank:VF \@currentHref
- {
- \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
- }
- }
-\AddToHook{cmd/H@refstepcounter/after}
- {
- \tl_if_blank:VF \@currentHref
- {
- \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
- }
- }
-% \end{macrocode}
-% \begin{variable}{\g_@@_struct_ref_by_dest_prop}
-% This variable contains structures whose Ref key should be updated
-% at the end to point to structured related with this destination.
-% As this is probably need in other places too, it is not only a toc-variable.
-% Moved into tagpdf!
-% \end{variable}
-%
-% \begin{macro}{\g_@@_struct_ref_by_dest:}
-% This command is executed and update the Ref keys
-% of the structures listed in |\g_@@_struct_ref_by_dest_prop|.
-% It is currently only relevant for the |TOCI|. But other structures
-% could need that later too.
-% The command is executed in the |tagpdf/finish/before| hook.
-% \begin{macrocode}
-\msg_new:nnn { tag } {struct-dest-unknown}
- {
- Destination~#1~has~no~related~structure.\\
- /Ref~for~structure~#2~not~updated
- }
-
-\cs_new_protected:Npn \g_@@_struct_ref_by_dest:
+\str_if_exist:cF { l__socket_tagsupport/recordtarget_plug_str }
{
- \prop_map_inline:Nn\g_@@_struct_ref_by_dest_prop
- {
- \prop_get:NnNTF \g_@@_struct_dest_num_prop {##2} \l_@@_tmpa_tl
- {
- \@@_struct_gput_data_ref:ee
- { ##1 }
- { \tag_struct_object_ref:e{ \l_@@_tmpa_tl }}
- }
- {
- \msg_warning:nnnn {tag}{struct-dest-unknown}{##2}{ ##1}
- }
- }
- }
-\hook_gput_code:nnn {tagpdf/finish/before}{tagpdf/struct/Ref}{\g_@@_struct_ref_by_dest:}
+ \AddToHook{cmd/refstepcounter/after}
+ {
+ \tl_if_blank:VF \@currentHref
+ {
+ \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+ }
+ }
+ \AddToHook{cmd/H@refstepcounter/after}
+ {
+ \tl_if_blank:VF \@currentHref
+ {
+ \prop_gput:Nee \g_@@_struct_dest_num_prop {\@currentHref}{\tag_get:n{struct_num}}
+ }
+ }
+ }
% \end{macrocode}
-% \end{macro}
%
% \section{Toc code}
% \begin{variable}{\g_@@_toc_level_int,\g_@@_toc_stack_seq}
@@ -196,14 +165,17 @@
\tag_struct_begin:n{tag=TOC,title=#1}
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@starttoc@cfgpoint@before#1
- {
- \@@_toc_starttoc_init:n{#1}
- }
+\NewSocketPlug{tagsupport/toc/starttoc/before}{default}
+ {
+ \@@_toc_starttoc_init:n{#1}
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/before}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
% \begin{macro}{\@@_toc_starttoc_finalize:}
% \begin{macrocode}
\cs_new_protected:Npn \@@_toc_starttoc_finalize:
@@ -215,15 +187,18 @@
\seq_gclear:N \g_@@_toc_stack_seq
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@starttoc@cfgpoint@after#1
- {
- \@@_toc_starttoc_finalize:
- }
+\NewSocketPlug{tagsupport/toc/starttoc/after}{default}
+ {
+ \@@_toc_starttoc_finalize:
+ }
+\AssignSocketPlug{tagsupport/toc/starttoc/after}{default}
% \end{macrocode}
-% \end{macro}
-
+% \end{plugdecl}
+%
% \begin{macro}{\@@_toc_end:n}
% This commands ends all TOC on the stack with a level higher than the argument
% \begin{macrocode}
@@ -249,10 +224,11 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@@_toc_contentsline_begin:nnn}
+% \begin{macro}{\@@_toc_contentsline_begin:nnnn}
% This is main command executed at the begin of a |\contentsline|.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_toc_contentsline_begin:nnn #1 #2 #3 %#1 level, #2 content, #3 destination
+\cs_new_protected:Npn \@@_toc_contentsline_begin:nnnn #1 #2 #3 #4
+ %#1 level, #2 content, #3 page number (unused) #4 destination
{
\tag_if_active:T
{
@@ -298,40 +274,44 @@
% \begin{macrocode}
\group_begin:
\text_declare_expand_equivalent:Nn \numberline \use_none:n
- \exp_args:Ne \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
+ \exp_args:Ne
+ \tag_struct_begin:n{tag=TOCI,title={\text_purify:n {#2}}}
% \end{macrocode}
-% The TOCI structure should get a /Ref, so we put a request with its destination
-% name into the prop.
+% The TOCI structure should get a /Ref, we use a destination
+% to retrieve it.
% \begin{NOTE}{UF}
% This only works with hyperref currently. Without hyperref we
% need to store fake names.
% \end{NOTE}
% \begin{macrocode}
- \prop_gput:Nee \g_@@_struct_ref_by_dest_prop
- { \tag_get:n {struct_num} }{#3}
+ \tag_struct_gput:nnn { \tag_get:n {struct_num} }{ref_dest}{#4}
\seq_gpush:Ne \g_@@_toc_stack_seq {{TOCI}\use:c{toclevel@#1}}
\group_end:
}
}
}
% \end{macrocode}
-% Now map it into the config point:
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn\@contentsline@cfgpoint@before#1#2#3#4
+\NewSocketPlug{tagsupport/toc/contentsline/before}{default}
{
- \@@_toc_contentsline_begin:nnn {#1}{#2}{#4}
- }
+ \@@_toc_contentsline_begin:nnnn #1
+ }
+\AssignSocketPlug{tagsupport/toc/contentsline/before}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
%
-% \begin{macro}{\@@_toc_contentsline_end:n}
+% \begin{macro}{\@@_toc_contentsline_end:nnnn}
% This is the closing code of a |\contentsline|.
% If the contentsline was actually printed, the code has to
% close the TOCI structure and to update the stack.
% \begin{macrocode}
\msg_new:nnn {tag}{toc-no-TOCI}{Missing~TOCI~structure~on~toc~stack}
-\cs_new_protected:Npn \@@_toc_contentsline_end:n #1 %#1 level name
+\cs_new_protected:Npn \@@_toc_contentsline_end:nnnn #1 #2 #3 #4
+% #1 level, #2 content (unused), #3 page number (unused) #4 destination (unused)
{
\int_compare:nNnF { \use:c{toclevel@#1} } > {\use:c{c@tocdepth}}
{
@@ -348,14 +328,17 @@
}
}
% \end{macrocode}
-% Now we map it to the config point
+% \end{macro}
+% Now define the tagging plug and assign it to the socket.
+% \begin{plugdecl}{default}
% \begin{macrocode}
-\cs_set_protected:Npn \@contentsline@cfgpoint@after #1#2#3#4
- {
- \@@_toc_contentsline_end:n {#1}
- }
+\NewSocketPlug{tagsupport/toc/contentsline/after}{default}
+ {
+ \@@_toc_contentsline_end:nnnn #1
+ }
+\AssignSocketPlug{tagsupport/toc/contentsline/after}{default}
% \end{macrocode}
-% \end{macro}
+% \end{plugdecl}
%
% \subsection{Tagging of the content}
% This need discussion.
@@ -380,12 +363,16 @@
\tag_struct_end:
\tag_mc_begin:n{tag=Reference}}
% \end{macrocode}
-%
+% \begin{plugdecl}{artifact}
% \begin{macrocode}
-\def\@dottedtocline@cfgpoint@leaders#1{%
- \tag_mc_begin:n{artifact}\tag_stop:n{leaders}\nobreak#1\nobreak\tag_start:n{leaders}\tag_mc_end:}
+\NewSocketPlug{tagsupport/toc/leaders/before}{artifact}
+ {\tag_mc_begin:n{artifact}\nobreak}
+\NewSocketPlug{tagsupport/toc/leaders/after}{artifact}
+ {\nobreak\tag_mc_end:}
+\AssignSocketPlug{tagsupport/toc/leaders/before}{artifact}
+\AssignSocketPlug{tagsupport/toc/leaders/after}{artifact}
% \end{macrocode}
-
+% \end{plugdecl}
%
% \begin{macrocode}
%</package>
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-toc.pdf b/macros/latex-dev/required/latex-lab/latex-lab-toc.pdf
index ba23989257..0bd2ab5c15 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-toc.pdf
+++ b/macros/latex-dev/required/latex-lab/latex-lab-toc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/README.md b/macros/latex-dev/required/tools/README.md
index 69e0112887..a99116cada 100644
--- a/macros/latex-dev/required/tools/README.md
+++ b/macros/latex-dev/required/tools/README.md
@@ -1,7 +1,7 @@
The LaTeX `tools` bundle
========================
-Release 2024-11-01 pre-release 0
+Release 2025-06-01 pre-release 0
Overview
--------
diff --git a/macros/latex-dev/required/tools/afterpage.pdf b/macros/latex-dev/required/tools/afterpage.pdf
index a7679b78a3..debb5d41df 100644
--- a/macros/latex-dev/required/tools/afterpage.pdf
+++ b/macros/latex-dev/required/tools/afterpage.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/array.dtx b/macros/latex-dev/required/tools/array.dtx
index e77ef0a3bf..f4c8ab28d8 100644
--- a/macros/latex-dev/required/tools/array.dtx
+++ b/macros/latex-dev/required/tools/array.dtx
@@ -39,7 +39,7 @@
% \begin{macrocode}
%<+package>\NeedsTeXFormat{LaTeX2e}[2024/06/01]
%<+package>\ProvidesPackage{array}
-%<+package> [2024/05/23 v2.6c Tabular extension package (FMi)]
+%<+package> [2024/10/17 v2.6g Tabular extension package (FMi)]
%
% \fi
%
@@ -259,7 +259,7 @@
% \begin{table}[!t]
% \begin{center}
% \setlength{\extrarowheight}{1pt}
-% \begin{tabular}{|>{\tt}c|m{9cm}|}
+% \begin{tabular}{|>{\ttfamily}c|m{9cm}|}
% \hline
% \multicolumn{2}{|c|}{Unchanged options}\\
% \hline
@@ -382,6 +382,20 @@
% \end{itemize}
%
%
+%
+% \subsection{A note on the allowed content of \texttt{>\{...\}} and
+% \texttt{<\{...\}}}
+%
+% These specifiers are meant to hold declarations, such as
+% \verb=>{\itshape}=. They cannot end in commands that take arguments
+% without providing these arguments as part of the \verb={...}=. It
+% would be a mistaken assumption that they pick up all or parts of the
+% alignment entry data if their argument is not provided. E.g.,
+% \verb=>{\textbf}= would not make the whole column bold nor would it
+% make the first character bold (technically it would try to
+% bolden \cs{ignorespaces}). Thus, it would not fail with an error,
+% but effectively the output would be wrong and not as expected.
+%
% \subsection{The behavior of the \texttt{\string\\} command}
%
% In the basic \texttt{tabular} implementation of \LaTeX{} the \cs{\bslash}
@@ -464,16 +478,16 @@
% "\newcolumntype{L}{>{$}l<{$}}" \\
% "\newcolumntype{R}{>{$}r<{$}}"
% \end{quote}
-% Then we can use \texttt{C} to get centred LR-mode in an
-% \texttt{array}, or centred math-mode in a \texttt{tabular}.
+% Then we can use \texttt{C} to get centered LR-mode in an
+% \texttt{array}, or centered math-mode in a \texttt{tabular}.
%
-% The example given above for `centred decimal points' could be
+% The example given above for `center decimal points' could be
% assigned to a \texttt{d} specifier with the following command.
% \begin{quote}
% "\newcolumntype{d}{>{\centerdots}c<{\endcenterdots}}"
% \end{quote}
%
-% The above solution always centres the dot in the
+% The above solution always centers the dot in the
% column. This does not look too good if the column consists of large
% numbers, but to only a few decimal places. An alternative definition
% of a \texttt{d} column is
@@ -715,7 +729,7 @@
%
% A similar problem happened when "\extrarowheight" was used. For that
% reason m-cells now manually position the cell content which
-% allows to ignore this extra space request during the vertical aligment.
+% allows to ignore this extra space request during the vertical alignment.
%
%
% \subsection{Bugs and Features}
@@ -734,7 +748,7 @@
% user the opportunity of overriding the settings of a
% "\newcolumntype" defined using these declarations. For example,
% suppose in an \texttt{array} environment we use a \texttt{C}
-% column defined as above. The \texttt{C} specifies a centred text
+% column defined as above. The \texttt{C} specifies a centered text
% column, however ">{\bfseries}C", which re-writes to
% ">{\bfseries}>{$}c<{$}" would not specify a bold column as might
% be expected, as the preamble would essentially expand to
@@ -896,14 +910,14 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% \section{A note on the updates done December 2023}
%
-% We introduced support for tagged PDf and at the same time we added
+% We introduced support for tagged PDF and at the same time we added
% code to determine row and column numbers for each cell in
% preparation for supporting formatting or type specifications for individual
% cells (or group of cells) from the outside, e.g., \enquote{rows 1,
% 2, and 10 are header rows} (syntax to be decided).
%
% This new code is already written with L3 programming layer conventions
-% while most of the legay code is still as it was before. This make the code
+% while most of the legacy code is still as it was before. This make the code
% currently somewhat clattered, unfortunately. Eventually this will all move to L3
% programming layer but this will take time.
%
@@ -1345,7 +1359,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% of \textsf{token} register $15$ instead of $1$ later on.
%
% The example above referred to an older version of =\save@decl= which
-% inserted a =\relex= inside the token register. This is now moved to
+% inserted a =\relax= inside the token register. This is now moved to
% the places where the actual token registers are inserted (look for
% =\the@toks=) because the old version would still make =@=
% expressions to moving arguments since after expanding the second
@@ -1373,6 +1387,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macro}{\insert@column}
% \begin{macro}{\@sharp}
% \begin{macro}{\textonly@unskip}
+% \begin{macro}{\@protected@firstofone}
% We now define the macro =\insert@column= which will do
% this work for us.
% \begin{macrocode}
@@ -1385,10 +1400,116 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\UseTaggingSocket{tbl/cell/begin}%
% \end{macrocode}
-% Here, we assume that the \textsf{count} register
+% Next we have to insert the toks register holding the content of
+% \verb=>{...}=. Here, we assume that the \textsf{count} register
% =\@tempcnta= has saved the value $=\count@= - 1$.
+%
+% To keep \TeX{} happy if there is a look ahead in the tabular
+% preamble, i.e., starting in \verb=>{...}=, which uses the
+% Appendix~D trick (for example, anything with a trailing optional
+% argument defined by \pkg{ltcmd}), we wrap everything here in a
+% protected version of \cs{@firstofone}. \TeX{} otherwise can get
+% confused about the value of the master counter, and we get some
+% strange errors. We suspected that there was an underlying issue
+% is the \TeX{} engine, but it turned out to be rather hard to get
+% to the bottom of it, because the master counter is not accessible
+% through \TeX{}'s tracing tools. Thus, all we could do was
+% producing various example documents, observing results, as well
+% as staring at a printout of the \TeX{} program. As an example,
+% without this approach, something like
+% \begin{verbatim}
+% \NewDocumentCommand\foo{o}{x}
+% \begin{tabular}{>{\foo}l}
+% Foo
+% \end{tabular}
+% \end{verbatim}
+% failed. That can be fixed by adding a \cs{relax} after the
+% \cs{@tempcnta}, but that then leads to issues if you are
+% collecting whole cells (tagging code or \pkg{collcell}), where
+% you can no longer alter the meaning of \cs{cr} as the master
+% counter goes wrong due to an obscure bug (or perhaps, say, an
+% undocumented feature of \TeX{}). Eventually, we were able to pin
+% down the root cause and really understand why
+% \cs{@protected@firstofone} solves the problem, even though it
+% looks like a nonsense addition to the code that does nothing
+% useful.\footnote{So it is a \TeX{} engine bug that was in there
+% from day one, or if you like, it is a hidden feature that is not
+% explained; neither in the \TeX{}book nor in the program code. We
+% don't really expect this to change in \TeX{} after such a long
+% time, other than perhaps documenting it as a feature, so this is
+% a proper solution to the problem and not just a workaround.}
+%
+% The problem is that \TeX{} tries to conserve stack space, and
+% when the last token of an existing token list is a macro, then
+% this token list is \emph{first} removed from memory (reducing the
+% stack) \emph{before} the macro replacement text (as a new
+% token list) is given to the parser adding a new stack level. This
+% is done using the routine \texttt{end\_token\_list} in the \TeX{}
+% program and ending the u-part of an \cs{halign} column with this
+% routine immediately sets the \emph{master counter} used by alignments to
+% zero (see chapter~22 and Appendix~D of the \TeX{}book). This
+% means that technically the expansion of the last token in the u-part (if it
+% is a macro) is not executed in the context of the u-part, but in
+% the context of the alignment entry in the document. That normally
+% doesn't make any difference whatsoever --- unless you play
+% around (as we sometimes have to) with tricks like those from
+% Appendix~D.
+%
+% To illustrate the issue we show a bit of strange low-level plain
+% \TeX{} code.\footnote{If all of this looks mighty strange to you,
+% don't worry. You will be unlikely to need to know about it. It is
+% just there so that programmers at some point in the future do not
+% have to wonder too much why there is this odd
+% \cs{@protected@firstofone} that apparently does nothing
+% useful. It took us several nights of head scratching to come up
+% with these minimal examples and then some more time to understand
+% what the heck is going on inside \TeX{}---thanks to Bruno for the
+% right ideas on the latter.} Below are two very special grouping
+% commands that are like \cs{bgroup} and \cs{egroup} but also
+% affect the alignment master counter when expanded (see
+% \TeX{}book p.385). If one of them is used as the
+% last macro in the u-part of a column, then you get strange errors
+% that you shouldn't get.
+% \begin{verbatim}
+% \def\bbgroup{{\ifnum0=`}\fi}
+% \def\eegroup{\ifnum0=`{\fi}}
+%
+% % Fails with an error message, but there should be none:
+% \halign{%
+% \message{u-part^^J}%
+% \bbgroup % <-- in the u-part
+% \eegroup % <-- in the u-part
+% #%
+% \message{v-part^^J}%
+% \hfill\cr
+% \message{body^^J}x
+% \cr
+% }
+%
+% % Fails but should work, the v-part is never reached:
+% \halign{%
+% \message{u-part^^J}%
+% \bbgroup % <-- in the u-part
+% #%
+% \message{v-part^^JJ}%
+% \eegroup % <-- in the v-part
+% \hfill\cr
+% \message{body^^J}x
+% \cr
+% }
+% \end{verbatim}
+%
+% So the trick we use now is making \cs{@protected@firstofone} the
+% last macro in the u-part, i.e., before the \cs{@sharp}. That way
+% its argument is always fully expanded as part of the alignment
+% entry and not as part of the u-part and this way we know exactly
+% what the master counter value is at this point, regardless of the content of
+% \verb=>{...}=.
+%
+% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)}
+% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)}
% \begin{macrocode}
- \the@toks \the \@tempcnta
+ \@protected@firstofone { \the@toks \the \@tempcnta \ignorespaces }
% \end{macrocode}
% Next follows the =#= sign which specifies the place
% where the text of the column shall be inserted. To avoid
@@ -1396,14 +1517,16 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% =\@addtopreamble= we hide this sign in the command
% =\@sharp= which is temporarily occupied with
% =\relax= during the build-up of the preamble.
-% To remove unwanted spaces before and after the column text, we set
-% an =\ignorespaces= in front and a =\unskip= afterwards.
+% To remove unwanted spaces before and after the column in text mode,
+% we set an =\ignorespaces= in front (see above) and a =\unskip=
+% afterwards; in math mode, the latter is suppressed while the
+% \cs{ignorespaces} makes no difference.
% \changes{v2.0e}{1991/02/07}{Added \{\} around \cs{@sharp} for new ftsel}
-% \changes{v2.0h}{1992/06/22}{Removed \{\} again in favour of
+% \changes{v2.0h}{1992/06/22}{Removed \{\} again in favor of
% \cs{d@llarbegin}}
% \changes{v2.6b}{2024/04/08}{Do not \cs{unskip} if in math mode (gh/1323)}
% \begin{macrocode}
- \ignorespaces \@sharp \textonly@unskip
+ \@sharp \textonly@unskip
% \end{macrocode}
% Then the second \textsf{token} register follows whose number should
% be saved in =\count@=.
@@ -1428,10 +1551,15 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\protected\def\textonly@unskip{\ifhmode\unskip\fi}
% \end{macrocode}
+% \changes{v2.6g}{2024/10/12}{Further work to support optional args in preamble (gh/1468)}
+% We need an engine-protected function that is just \cs{@firstofone}:
+% \begin{macrocode}
+\protected\long\def\@protected@firstofone#1{#1}
+% \end{macrocode}
+% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
-%
%
% \begin{macro}{\insert@pcolumn}
% Handling pcolumn-cells needs slightly different handling when
@@ -1442,7 +1570,10 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\def\insert@pcolumn{%
\UseTaggingSocket{tbl/pcell/begin}%
- \the@toks \the \@tempcnta
+% \end{macrocode}
+% \changes{v2.6f}{2024/09/13}{Stop parsing for optional argument (gh/1468)}
+% \begin{macrocode}
+ \the@toks \the \@tempcnta \relax
\ignorespaces \@sharp \unskip
\the@toks \the \count@ \relax
\UseTaggingSocket{tbl/pcell/end}%
@@ -1882,7 +2013,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% For that reason the new implementation does the centering
% manually: First we check the height of the cell and if that is
% less or equal to =\ht\strutbox= we assume that this is a
-% single line cell. In that case we don't do any vertical maneuvre
+% single line cell. In that case we don't do any vertical maneuver
% and simply output the box, i.e., make it behave like a single
% line p-cell.
%
@@ -1900,7 +2031,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% is how much do we need to move down? If there is any
% =\arraystretch= in place then the first line will have some
% unusual height and we don't want to consider that when finding
-% the middle point. So we substract from the cell height the height
+% the middle point. So we subtract from the cell height the height
% of that strut. But of course we want to include the normal height
% of the first line (which would be something like =\ht\strutbox=)
% so we need to add that. On the other hand, when centering around
@@ -2325,7 +2456,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
\lineskip \z@
\baselineskip \z@
% \end{macrocode}
-% Don't use \cs{m@th} here as that signals to the math taggingg
+% Don't use \cs{m@th} here as that signals to the math tagging
% code that this is fake math that should not be tagged.
% \changes{v2.6a}{2023/12/11}{Support for tagged PDF}
% \begin{macrocode}
@@ -2451,7 +2582,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
%
% We then start a special brace which I have directly
% copied from the original definition. It is
-% necessary, because the =\futurlet= in =\@ifnextchar=
+% necessary, because the =\futurelet= in =\@ifnextchar=
% might
% expand a following =&= \textsf{token} in a construction like
% =\\ &=. This would otherwise end the alignment template at a
@@ -2464,7 +2595,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% that a =&= will not be considered belonging to the current
% =\halign= while we are looking for a =*= or =[=.
% For further information see
-% \cite[Appendix D]{bk:knuth}.
+% \cite[Appendix~D]{bk:knuth}.
% \begin{macrocode}
\iffalse{\fi\ifnum 0=`}\fi
% \end{macrocode}
@@ -2649,14 +2780,14 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \section{The Environment Definitions}
%
% After these preparations we are able to define the environments. They
-% only differ in the initialisations of =\d@llar...=, =\col@sep=
+% only differ in the initializations of =\d@llar...=, =\col@sep=
% and =\@halignto=.
%
% \begin{macro}{\@halignto}
% \begin{macro}{\d@llarbegin}
% \begin{macro}{\d@llarend}
% =\d@llar= has to be
-% locally asigned since otherwise nested \textsf{tabular} and \textsf{array}
+% locally assigned since otherwise nested \textsf{tabular} and \textsf{array}
% environments (via =\multicolumn=) are impossible.
% For 25 years or so =\@halignto= was set globally (to save space on the
% save stack, but that was a mistake: if there is a tabular in the
@@ -2664,7 +2795,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% able overwrite the =\@halignto=
% setting of a tabular in the main text resulting in a very weird error.
% \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)}
-% \changes{v2.0g}{1992/06/18}{`d@llarbegin defined on toplevel.}
+% \changes{v2.0g}{1992/06/18}{`d@llarbegin defined on top-level.}
% When the new font selection scheme is in force we have to
% we surround all =\halign= entries
% with braces. See remarks in TUGboat 10\#2. Actually we are going
@@ -2714,7 +2845,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macro}{\tabular}
% \begin{macro}{\tabular*}
% The environments \textsf{tabular} and \textsf{tabular$*$} differ
-% only in the initialisation of the command =\@halignto=. Therefore
+% only in the initialization of the command =\@halignto=. Therefore
% we define
% \changes{v2.4d}{2016/10/06}{\cs{@halignto} set locally (pr/4488)}
% \begin{macrocode}
@@ -2852,11 +2983,13 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macro}{\@preamerr}
+% \changes{v2.6d}{2024/06/14}{Keep message sources out of L3 code (gh/1378)}
% We also have to redefine the error routine =\@preamerr= since
% new kind of errors are possible.
% The code for this macro is not perfect yet;
% it still needs too much memory.
% \begin{macrocode}
+\ExplSyntaxOff
\def\@preamerr#1{\def\@tempd{{..} at wrong position: }%
\PackageError{array}{%
\ifcase #1 Illegal pream-token (\@nextchar): `c' used\or %0
@@ -2905,7 +3038,6 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% to define letters, to be used in the same way as the primitive
% column specifiers, `c' `p' etc.
% \begin{macrocode}
-\ExplSyntaxOff % this is really oldstyle using \@tfor :=
\def\newcolumntype#1{%
% \end{macrocode}
% "\NC@char" was added in V2.01 so that active characters, like "@" in
@@ -2995,7 +3127,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% rewrites (in the token register "\NC@list") will look like
% "\NC@do *" "\NC@do C" "\NC@do L".
% So we need to define "\NC@do" as a one argument macro which
-% initialises the rewriting of the specified column. Let us assume that
+% initializes the rewriting of the specified column. Let us assume that
% `C' is the argument.
% \begin{macrocode}
\def\NC@do#1{%
@@ -3063,7 +3195,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macro}
%
% \subsection{The $*$--form}
-% We view the $*$-form as a slight generalisation of the system
+% We view the $*$-form as a slight generalization of the system
% described in the previous subsection. The idea is to define a $*$
% column by a command of the form:
% \begin{verbatim}
@@ -3439,7 +3571,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \subsection{Implementing column types \texttt{w} and \texttt{W}}
%
% In TugBoat 38/2 an extension was presented that implemented two
-% aditional column types \texttt{w} and \texttt{W}. These have now
+% additional column types \texttt{w} and \texttt{W}. These have now
% been added to the package itself.
%
%
@@ -3501,7 +3633,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% the cell content is too wide.
% \changes{v2.4f}{2017/11/07}{Column type added}
% \changes{v2.5a}{2020/04/06}{Use \cs{d@llarbegin} and \cs{d@llarend} so
-% that cell is typeset in mathmode inside \texttt{array} (gh/297)}
+% that cell is typeset in math mode inside \texttt{array} (gh/297)}
% \begin{macrocode}
\newcolumntype{W}[2]
{>{\begin{lrbox}\ar@cellbox\d@llarbegin}%
@@ -3516,7 +3648,46 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macro}
%
%
+% \subsection{Handling \cs{cline}}
+%
+% In the past \pkg{array} did not have to concern itself with
+% \cs{cline} but simply used the definition already provided in the
+% kernel. However, for tagged PDF output this definition is
+% insufficient, because it causes incorrect row counting and the rules
+% it generates would need to be marked as artifacts.
+% We therefore update it here.
+%
%
+% \begin{macro}{\@cline}
+% Tagging support for \cs{cline}
+% \changes{v2.6e}{2024/07/13}{Support for tagging \cs{cline} (tagging/134)}
+% \begin{macrocode}
+\ExplSyntaxOn
+\def\@cline#1-#2\@nil{
+ \omit
+ \@multicnt#1
+ \advance\@multispan\m@ne
+ \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
+ \@multicnt#2
+ \advance\@multicnt-#1
+ \advance\@multispan\@ne
+% \end{macrocode}
+% The rule needs artifact tagging in tagged PDF.
+% \begin{macrocode}
+ \UseTaggingSocket{tbl/leaders/begin}
+ \leaders\hrule\@height\arrayrulewidth\hfill
+ \UseTaggingSocket{tbl/leaders/end}
+% \end{macrocode}
+% To the row counting the above appears like an extra row, so we
+% have to correct the count.
+% \begin{macrocode}
+ \tbl_gdecr_row_count:
+ \cr
+ \noalign{\vskip-\arrayrulewidth}
+}
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{macro}
%
%
% \begin{macrocode}
diff --git a/macros/latex-dev/required/tools/array.pdf b/macros/latex-dev/required/tools/array.pdf
index 715f3284ec..a0c2ac36ee 100644
--- a/macros/latex-dev/required/tools/array.pdf
+++ b/macros/latex-dev/required/tools/array.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/bm.pdf b/macros/latex-dev/required/tools/bm.pdf
index a92141480e..8ec653ce6c 100644
--- a/macros/latex-dev/required/tools/bm.pdf
+++ b/macros/latex-dev/required/tools/bm.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/calc.pdf b/macros/latex-dev/required/tools/calc.pdf
index c5424a2a9f..d9473573a2 100644
--- a/macros/latex-dev/required/tools/calc.pdf
+++ b/macros/latex-dev/required/tools/calc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/changes.txt b/macros/latex-dev/required/tools/changes.txt
index afd942a4e7..9a3c944b20 100644
--- a/macros/latex-dev/required/tools/changes.txt
+++ b/macros/latex-dev/required/tools/changes.txt
@@ -10,7 +10,73 @@ All changes above are only part of the development branch for the next release.
================================================================================
#########################
-# 2023-11-01 Release
+# 2024-11-01 Release
+#########################
+
+2024-10-30 David Carlisle <David.Carlisle@latex-project.org>
+
+ * amsmath.dtx: Guard the \protect tests from primitive if tokens
+ in the definition (gh/1448)
+
+2024-10-27 David Carlisle <David.Carlisle@latex-project.org>
+
+ * longtable.dtx Guard against increasing \pagegoal past \maxdimen (gh/1495)
+
+
+2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * array.dtx (section{The insertion of declarations ...}):
+ Further work on handling optional arguments in the argument
+ of >{...} to work around a master counter oddity (gh/1468)
+
+2024-09-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (section{The insertion of declarations ...}):
+ Stop parsing too far for an optional argument if >{...} ends in a command
+ with a trailing optional arg (gh/1468)
+
+2024-09-17 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * multicol.dtx: add tagging support (tagging/705)
+
+2024-09-12 David Carlisle <David.Carlisle@latex-project.org>
+
+ * build.lua, tools.ins:
+ Modify fileerr extraction to write rename-to-empty-base.tex rather than .tex
+ to comply with expected security change in texlive 2025
+ build.lua modified to rename rename-to-empty-base.tex to .tex after unpacking.
+
+2024-08-13 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * longtable.dtx:
+ store row number of head also if it ends with a \cr
+ (tagging-project-gh/554).
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * array.dtx (subsection{Handling \cs{cline}}):
+ Support for tagging \cline (tagging/134)
+
+2024-07-04 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * longtable.dtx:
+ Added \LTcaptype (from package ltcaption) to support other types
+ beside table and to support unnumbered longtables (gh/1377).
+
+
+2024-06-28 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * multicol.dtx:
+ Update documentation to reflect that \sloppy isn't using
+ \tolerance=10000 any longer (it did in the early days of LaTeX)
+ (gh/1385)
+
+2024-06-14 David Carlisle <David.Carlisle@latex-project.org>
+
+ * array.dtx move \ExplSyntaxOff earlier so error message spaces preserved gh/1378
+
+
+#########################
+# 2024-06-01 Release
#########################
2024-05-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
diff --git a/macros/latex-dev/required/tools/dcolumn.pdf b/macros/latex-dev/required/tools/dcolumn.pdf
index 537bc4d21c..10f2294281 100644
--- a/macros/latex-dev/required/tools/dcolumn.pdf
+++ b/macros/latex-dev/required/tools/dcolumn.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/delarray.pdf b/macros/latex-dev/required/tools/delarray.pdf
index 47b5a5fa9a..4d04a17628 100644
--- a/macros/latex-dev/required/tools/delarray.pdf
+++ b/macros/latex-dev/required/tools/delarray.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/enumerate.pdf b/macros/latex-dev/required/tools/enumerate.pdf
index fc9d77d6af..1ed3d1b597 100644
--- a/macros/latex-dev/required/tools/enumerate.pdf
+++ b/macros/latex-dev/required/tools/enumerate.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/fileerr.pdf b/macros/latex-dev/required/tools/fileerr.pdf
index 574edfdb38..7913b9cf33 100644
--- a/macros/latex-dev/required/tools/fileerr.pdf
+++ b/macros/latex-dev/required/tools/fileerr.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/fontsmpl.pdf b/macros/latex-dev/required/tools/fontsmpl.pdf
index 8d4fe68316..59e9847d69 100644
--- a/macros/latex-dev/required/tools/fontsmpl.pdf
+++ b/macros/latex-dev/required/tools/fontsmpl.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/ftnright.pdf b/macros/latex-dev/required/tools/ftnright.pdf
index 9f2da32d26..d26f051387 100644
--- a/macros/latex-dev/required/tools/ftnright.pdf
+++ b/macros/latex-dev/required/tools/ftnright.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/hhline.pdf b/macros/latex-dev/required/tools/hhline.pdf
index b2b7bc6adb..f3cbce3767 100644
--- a/macros/latex-dev/required/tools/hhline.pdf
+++ b/macros/latex-dev/required/tools/hhline.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/indentfirst.pdf b/macros/latex-dev/required/tools/indentfirst.pdf
index c95cef137f..7a348886f0 100644
--- a/macros/latex-dev/required/tools/indentfirst.pdf
+++ b/macros/latex-dev/required/tools/indentfirst.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/l3sys-query.pdf b/macros/latex-dev/required/tools/l3sys-query.pdf
index e333418672..fa700e08e7 100644
--- a/macros/latex-dev/required/tools/l3sys-query.pdf
+++ b/macros/latex-dev/required/tools/l3sys-query.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/layout.pdf b/macros/latex-dev/required/tools/layout.pdf
index 6cbbc763ca..e289eeceff 100644
--- a/macros/latex-dev/required/tools/layout.pdf
+++ b/macros/latex-dev/required/tools/layout.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/longtable.dtx b/macros/latex-dev/required/tools/longtable.dtx
index cc3a939e7a..061d7b5610 100644
--- a/macros/latex-dev/required/tools/longtable.dtx
+++ b/macros/latex-dev/required/tools/longtable.dtx
@@ -28,7 +28,7 @@
%</dtx>
%<package>\NeedsTeXFormat{LaTeX2e}[1995/06/01]
%<package>
-% Try the 2020 version for any rollback before that date:
+% Try the 2020 version for any rollback before that date:
%<package>\DeclareRelease{}{1994-06-01}{longtable-2020-01-07.sty}
%<package>
%<package>\DeclareRelease{v4.13}{2020-01-02}{longtable-2020-01-07.sty}
@@ -38,7 +38,7 @@
%<driver> \ProvidesFile{longtable.drv}
% \fi
% \ProvidesFile{longtable.dtx}
- [2024-04-26 v4.20 Multi-page Table package (DPC)]
+ [2024-10-27 v4.22 Multi-page Table package (DPC)]
%
% \iffalse
%<*driver>
@@ -179,7 +179,7 @@
% \env{longtable}, which has most of the features of the \env{tabular}
% environment, but produces tables which may be broken by \TeX's
% standard page-breaking algorithm. It also shares some features with
-% the \env{table} environment. In particular it uses the same counter,
+% the \env{table} environment. In particular it uses by default the same counter,
% \texttt{table}, and has a similar "\caption" command. Also, the
% standard "\listoftables" command lists tables produced by either the
% \env{table} or \env{longtable} environments.
@@ -335,6 +335,29 @@
% \caption{A floating table}
% \end{table}
%
+% \section{Counter and Caption Types}
+%
+% As mentioned in the introduction \env{longtable} uses and updates by default
+% the \texttt{table} counter, the "\caption" command creates a table caption
+% which is added to the list of tables.
+% Packages like \pkg{ltcaption} added more flexibility here by adding the
+% command "\LTcaptype" which allowed to change the type, e.g. to a listing.
+% Starting with version 4.21 \pkg{longtable} supports this command directly.
+% \DescribeMacro{\LTcaptype}%
+% By redefining this command it is possible to change the counter and caption type.
+% After "\renewcommand\LTcaptype{"\meta{counter}"}" \env{longtable} will update
+% the counter \meta{counter}, use "\fnum@"\meta{counter} in the caption (which
+% typically will make use of "\"\meta{counter}"name" and "\the"\meta{counter}), and
+% write content line entries into the file with the extension stored in the
+% command "\ext@"\meta{counter}. When \pkg{hyperref} is loaded the name of
+% the anchor will use \meta{counter} too. Packages or documents that change
+% "\LTcaptype" to some nonstandard value must ensure that the counter
+% \meta{counter} and the commands "\fnum@"\meta{counter}
+% and "\ext@"\meta{counter} exist and do not error.
+% If "\LTcaptype" is empty no counter is advanced and "\"\meta{counter}"name" in
+% the caption is suppressed.
+%
+%
% \section{Captions and Headings}
%
% At the start of the table one may specify lines which are to appear at
@@ -907,6 +930,15 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\LTcaptype}
+% The name used as counter, in caption, "\addcontentsline" and in targets.
+% "\providecommand" is used for compability with \pkg{ltcaption}
+% \changes{v4.21}{2024/07/04}
+% {Added \cs{LTcaptype} to support other types beside table.}
+% \begin{macrocode}
+\providecommand\LTcaptype{table}
+% \end{macrocode}
+% \end{macro}
% \subsection{Internal Parameters}
%
% \begin{macro}{\LT@head}
@@ -957,8 +989,11 @@
% are preserved correctly when "\includeonly" is used. In the rest of
% the file "\LT@tables" has been replaced by "\c@LT@tables" without
% further comment.
+% \changes{v4.21}{2024/07/04}
+% {Provide a \cs{theH}-representation for targets.}
% \begin{macrocode}
\newcounter{LT@tables}
+\providecommand\theHLT@tables{\theLT@tables}
% \end{macrocode}
% \end{macro}
%
@@ -1050,12 +1085,12 @@
\LT@err{longtable not in 1-column mode}\@ehc
\fi
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/vmode/begin}%
% \end{macrocode}
-%
+%
% \begin{macrocode}
\begingroup
% \end{macrocode}
@@ -1080,6 +1115,9 @@
% Since Version 3.02, \package{longtable} has used the internal counter
% "\c@LT@tables". The \LaTeX\ counter "table" is still incremented
% so that "\caption" works correctly.
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} instead of \texttt{table} in various places
+% to support other types beside table.}
% \begin{macrocode}
\def\LT@array[#1]#2{%
% \end{macrocode}
@@ -1097,25 +1135,31 @@
% TODO: When a line is killed the structure subtree is there already
% too and must be removed. If hard to do, then maybe at first warn if the
% construction is used.
-%
+%
% \cs{LT@array} is executed in a group, so we can disable para-tagging here.
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/init}
- \@kernel@refstepcounter{table}\stepcounter{LT@tables}
+ \tl_if_empty:eTF { \LTcaptype }
+ {
+ \tl_gset:Ne \@currentHref {LT@tables.\theHLT@tables}
+ }
+ {
+ \@kernel@refstepcounter{\LTcaptype}\stepcounter{LT@tables}
% \end{macrocode}
-% The target is created rather late and a \cs{label} can come earlier,
+% The target is created rather late and a \cs{label} can come earlier,
% so we have to define \cs{@currentHref} explicitly. We can't currently
% assume that \cs{theHtable} is defined always.
% \begin{macrocode}
- \tl_gset:Ne \@currentHref {table.\cs_if_exist_use:N\theHtable}
+ \tl_gset:Ne \@currentHref {\LTcaptype.\cs_if_exist_use:c {theH\LTcaptype}}
+ }
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_gzero_row_count:
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/init}
@@ -1225,7 +1269,7 @@
\begingroup
\@mkpream{#2}%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_count_table_cols:
@@ -1271,12 +1315,12 @@
\tabskip\z@ \@arstrut
% \end{macrocode}
% Insert the tagging socket to start the row and initialize the cell
-% data for the row.
+% data for the row.
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/row/begin}%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_init_cell_data_for_row:
@@ -1314,7 +1358,7 @@
column:~ \the\g_@@_col_int
}
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\tbl_if_row_was_started:T
@@ -1399,7 +1443,7 @@
% We also have to make sure that this breakpoint doesn't affect how the next
% page is broken, so we make the penalty 9999 (10000 is infinite and thus not
% a legal breakpoint) and cancel out the "\kern" with a new "\kern".
-%
+%
% I don't think this is the \emph{right} solution to the problem (that would be
% that the standard output routine has a feature for syncronizing with
% typesetting, as part of the preparations for switching output routine), but
@@ -1476,9 +1520,17 @@
\maxdepth\z@
\fi
% \end{macrocode}
-%
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} to support other types beside table and handle
+% the case if it is empty.}
% \begin{macrocode}
- \MakeLinkTarget{table}
+ \tl_if_empty:eTF{\LTcaptype}
+ {
+ \MakeLinkTarget{LT@tables}
+ }
+ {
+ \MakeLinkTarget{\LTcaptype}
+ }
% \end{macrocode}
% Put the table head on the page, and then switch to the new output
% routine.
@@ -1487,12 +1539,12 @@
% \begin{macrocode}
\ifvoid\LT@firsthead\copy\LT@head\else\box\LT@firsthead\fi\nobreak
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/head}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\output{\LT@output}}
\ExplSyntaxOff
@@ -1524,18 +1576,18 @@
% \begin{macrocode}
\tbl_crcr:n {endlongtable}
% \end{macrocode}
-%
+%
% \changes{v4.01}{1996/04/11}
% {(DPC) use \cs{noalign} to sneak in \cs{LT@entry@chop}}
% \begin{macrocode}
\noalign{%
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/longtable/finalize}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\let\LT@entry\LT@entry@chop
\xdef\LT@save@row{\LT@save@row}}%
@@ -1579,19 +1631,28 @@
\ifx\LT@save@row\LT@@@@save@row
\else
\LT@warn{Column~ widths~ have~ changed\MessageBreak
- in~ table~ \thetable}%
+ in~
+ \tl_if_empty:eTF{\LTcaptype}
+ {longtable~ \theLT@tables}
+ {\LTcaptype\c_space_tl\use:c{the\LTcaptype}}
+ }
\LT@final@warn
\fi
% \end{macrocode}
-% Force one more go with the \env{longtable} output routine.
+% Force one more go with the \env{longtable} output routine.
+% Guard the special start of page value of "\pagegoal".
% \changes{v4.14}{2020/02/07}
% {Rearrange vertical space tests for tools/3512 (floats on same page)}
+% \changes{v4.22}{2024/10/27}
+% {Keep \cs{pagegoal} below \cs{maxdimen} gh1495}
% \begin{macrocode}
\endgraf\penalty -\LT@end@pen
\ifvoid\LT@foot\else
\global\advance\vsize\ht\LT@foot
\global\advance\@colroom\ht\LT@foot
- \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@
+ \ifdim\pagegoal<\maxdimen
+ \dimen@\pagegoal\advance\dimen@\ht\LT@foot\pagegoal\dimen@
+ \fi
\fi
% \end{macrocode}
% Now close the group to return to the standard routine.
@@ -1613,7 +1674,7 @@
% \begin{macrocode}
\ifvoid\footins\else\insert\footins{}\fi
% \end{macrocode}
-%
+%
% \changes{v4.19}{2023/12/16}{Support for tagged PDF}
% \begin{macrocode}
\UseTaggingSocket{tbl/vmode/end}%
@@ -2161,7 +2222,6 @@
\tbl_gdecr_row_count:
\penalty\@M}
\@gtempa}
-\ExplSyntaxOff
%<@@=>
% \end{macrocode}
% \end{macro}
@@ -2187,14 +2247,22 @@
% {Add new control argument}
% \changes{v4.16}{2021/05/07}
% {use \cs{ext@table} gh/561}
-% \begin{macrocode}
-\def\LT@c@ption#1[#2]#3{%
- \LT@makecaption#1\fnum@table{#3}%
- \def\@tempa{#2}%
- \ifx\@tempa\@empty\else
- {\let\\\space
- \addcontentsline{\ext@table}{table}{\protect\numberline{\thetable}{#2}}}%
- \fi}
+% \changes{v4.21}{2024/07/04}
+% {Use \cs{LTcaptype} to support other types beside table.}
+% \begin{macrocode}
+\def\LT@c@ption#1[#2]#3{
+ \tl_if_empty:eTF{\LTcaptype}
+ {\LT@makecaption\@gobble{}{#3}}
+ {\LT@makecaption#1{\csname fnum@\LTcaptype\endcsname}{#3}
+ \def\@tempa{#2}
+ \ifx\@tempa\@empty\else
+ {\let\\\space
+ \addcontentsline
+ {\@nameuse{ext@\LTcaptype}}
+ {\LTcaptype}
+ {\protect\numberline{\@nameuse{the\LTcaptype}}{#2}}}
+ \fi}}
+\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
%
@@ -2375,7 +2443,7 @@
\ExplSyntaxOn
\def\LT@end@hd@ft#1{%
% \end{macrocode}
-%
+%
% This command is used to store the head and foot boxes.
% We need to retrieve and store the row so that we can clean
% up the structure in the finalize code.
@@ -2388,7 +2456,7 @@
% \end{macrocode}
% TODO: This is exposing internal counters, so it should be encapsulated
% in some interface command (but I'm not sure what that should be
-% called, so not done yet.
+% called, so not done yet.
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_count_missing_cells:n {head/foot}
@@ -2413,19 +2481,28 @@
% To get out of this trap we run \cs{crcr} (which would normally
% come inside \cs{LT@echunk}. That will then trigger \cs{everycr}
% and update row counter unnecessarily, but now we have a defined state, so
-% we can use \cs{noalign} to undo that.
+% we can use \cs{noalign} to undo that.
% We also change \cs{LT@rows} so that further \cs{cr}s do not do
% any harm (as explained above.
%
% The \cs{crcr} inside \cs{LT@echunk} will be bypassed in that case
% as we have just executed a \cs{crcr} and are still in scanning modus for
-% \cs{omit} or \cs{noalign}.
+% \cs{omit} or \cs{noalign}.
% \begin{macrocode}
{
\crcr
\noalign{
% \end{macrocode}
-%
+% \changes{v4.22}{2024/08/13}{Store header row numbers}
+% \begin{macrocode}
+ \int_step_inline:nn
+ { \LT@rows }
+ {
+ \seq_gput_left:ce
+ {g_@@_\cs_to_str:N #1 _rows_seq }
+ { \int_eval:n {\g_@@_row_int - ##1 } }
+ }
+% \end{macrocode}
% \changes{v4.19}{2023/12/16}{Managing cell indexes}
% \begin{macrocode}
\tbl_gdecr_row_count: % undo the increment
@@ -2442,7 +2519,7 @@
{Increase~ LTchunksize}%
\fi
\setbox#1\box\z@
- \@@_trace:n {-->>~ Saving~\noexpand#1}
+ \@@_trace:n {-->>~ Saving~\noexpand#1}
\LT@get@widths
\LT@bchunk}
% \end{macrocode}
@@ -2501,7 +2578,7 @@
\bgroup
% \end{macrocode}
% \changes{v4.12}{2019/02/06}{Color group to match array package}
-% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}%
+% \changes{v4.18}{2023/08/25}{Use \cs{everypar} to match array package, github 1128}
% \begin{macrocode}
\color@begingroup
\let\@footnotetext\LT@p@ftntext
@@ -2509,7 +2586,7 @@
\@arrayparboxrestore
\everypar{%
\vrule \@height \ht\@arstrutbox \@width \z@
- \everypar{}}%
+ \everypar{}}%
}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/required/tools/longtable.pdf b/macros/latex-dev/required/tools/longtable.pdf
index f0823ed03f..ed86fc5b48 100644
--- a/macros/latex-dev/required/tools/longtable.pdf
+++ b/macros/latex-dev/required/tools/longtable.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/manifest.txt b/macros/latex-dev/required/tools/manifest.txt
index 004245d1d5..c07b6cd831 100644
--- a/macros/latex-dev/required/tools/manifest.txt
+++ b/macros/latex-dev/required/tools/manifest.txt
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 1993-2021
+% Copyright (C) 1993-2024
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -49,7 +49,7 @@ bm.dtx
Access bold math symbols.
calc.dtx
- Infix arithmetic expresions. Contributed to the distribution by
+ Infix arithmetic expressions. Contributed to the distribution by
Kresten Krab Thorup and Frank Jensen.
enumerate.dtx
@@ -60,7 +60,7 @@ fileerr.dtx
missing file error loop.
fontsmpl.dtx
- Package and test file for producing `font samples'
+ Package and test file for producing `font samples'.
ftnright.dtx
Place footnotes in the right hand column in two-column mode.
@@ -77,7 +77,7 @@ multicol.dtx
rawfonts.dtx
Preload fonts under the old internal font names of LaTeX2.09.
- Not recomended for new packages, but may help when updating old
+ Not recommended for new packages, but may help when updating old
files.
shellesc.dtx
@@ -103,7 +103,7 @@ verbatim.dtx
Flexible version of verbatim environment.
xr.dtx
- eXternall References. Extend \ref to access \label commands in
+ eXternal References. Extend \ref to access \label commands in
other documents.
xspace.dtx
diff --git a/macros/latex-dev/required/tools/multicol.dtx b/macros/latex-dev/required/tools/multicol.dtx
index 4d86448002..90decb3bb1 100644
--- a/macros/latex-dev/required/tools/multicol.dtx
+++ b/macros/latex-dev/required/tools/multicol.dtx
@@ -20,7 +20,7 @@
% \iffalse This is a METACOMMENT
%
%% Package `multicol' to use with LaTeX2e
-%% Copyright 1989-2023 Frank Mittelbach
+%% Copyright 1989-2024 Frank Mittelbach
%%
%% In addition to the terms of LPPL any distributed version
%% (unchanged or modified) of multicol has to keep the statement
@@ -77,7 +77,7 @@
%% not for the payment of a license fee per se (which might or might
%% not follow from this evaluation).
%%
-%% The license fee, if any, can be payed either to the LaTeX fund
+%% The license fee, if any, can be paid either to the LaTeX fund
%% (see ltx3info.txt in the base LaTeX distribution) or to the author of
%% the program who can be contacted at
%%
@@ -98,7 +98,7 @@
%<driver> \ProvidesFile{multicol.drv}
% \fi
% \ProvidesFile{multicol.dtx}
- [2024/05/23 v1.9h multicolumn formatting (FMi)]
+ [2024/09/14 v1.9i multicolumn formatting (FMi)]
%
%
%
@@ -403,12 +403,17 @@
% the most important is called |\tolerance|: this controls the
% allowed `looseness' (i.e.\ the amount of blank space between words).
% Its default value is 200 (the \LaTeX{} |\fussy|) which is too
-% small for narrow columns. On the other hand the |\sloppy|
-% declaration (which sets |\tolerance| to $10000=\infty$) is too
-% large, allowing really bad spacing.\footnote{Look at the next
-% paragraph, it was set with the \cs{sloppy} declaration.}
-%
-% \begin{sloppypar}
+% small for narrow columns.
+
+% Setting it to \texttt{10000} (a.k.a.\ $\infty$) means arbitrary bad
+% lines are possible. With that setting \LaTeX{} will make most lines
+% perfect but intermix them with really bad lines. This was the
+% setting originally used by \cs{sloppy} (nowadays it is a bit more
+% cautious and used \texttt{9999} which makes a huge
+% difference).\footnote{Look at the next paragraph, it was set with
+% the \cs{tolerance}\texttt{=10000}.}
+%
+% \begin{sloppypar}\tolerance=10000
% \DescribeMacro\multicoltolerance \DescribeMacro\multicolpretolerance
% We therefore use a |\multicoltolerance| parameter for the
% |\tolerance| value inside the \mc{} environment. Its default value
@@ -417,10 +422,10 @@
% be done outside the \mc{} environment. Since |\tolerance| is set
% to |\multicoltolerance| at the beginning of every \textsf{multicols}
% environment one can locally overwrite this default by assigning
-% \verb*+\tolerance = +\meta{desired value}. There also exists a
+% \cs{tolerance}\texttt{=}\meta{desired value}. There also exists a
% |\multicolpretolerance| parameter holding the value for
% |\pretolerance| within a \mc{} environment. Both parameters are
-% usually used only by package designers.
+% usually used only by package or class designers.
% \end{sloppypar}
%
% Generation of multicolumn output can be divided into two parts. In
@@ -679,7 +684,7 @@
% this value will additionally trace the mark handling
% algorithm. It will show what marks are found, what marks are
% considered, etc. To fully understand this information you will
-% probably have to read carefully trough the implementation.
+% probably have to read carefully through the implementation.
% \item[$\meta{number}\geq 4$.] Setting \meta{number}\pagebreak[2] to
% such a high value will additionally place an |\hrule| into your
% output, separating the part of text which had already been
@@ -1945,7 +1950,7 @@
% the balancing happened in the output routine then \TeX{} reverts
% to the |\prevdepth| that was current before the OR once the OR has
% finished. In short |\prevdepth| is something you can't set
-% globally it is alway local to the current list being built. Thus
+% globally it is always local to the current list being built. Thus
% we need to set it back to zero here to avoid incorrect spacing.
% \changes{v1.8h}{2014/09/12}{Set \cs{prevdepdth} for current vlist
% when returning from multicols environment}
@@ -2216,7 +2221,7 @@
% \begin{macro}{\multicolmindepthstring}
% The default minimum depth of each column corresponds to the depth
% of a `p' in the current font. This makes sense for Latin-based
-% languages and was hard-wired intitially, but for Asian languages
+% languages and was hard-wired initially, but for Asian languages
% it is better to use a zero depth (and alternatively one might
% want to use the depth of a strut or a parentheses). So we now
% offer a way to adjust this while maintaining backward
@@ -2462,7 +2467,7 @@
% If |\kept@firstmark| is non-empty then |\kept@botmark| must be
% non-empty too so we can use their values. Otherwise we use the
% value of |\kept@topmark| which was first initialized when we
-% gathered the |\partical@page| and later on was updated to the
+% gathered the |\partial@page| and later on was updated to the
% |\botmark| for the preceding page.
%
% \changes{v1.4a}{1992/02/14}{\cs{botmark} set to \cs{splitbotmark}}
@@ -2938,7 +2943,7 @@
% marks from this box. This has to be done \emph{before} we add a
% penalty of $-10000$ to the top of the box, otherwise only an
% empty box will be considered. But even that is not enough: the box
-% may contain \cs{columnbreak}s in which case doing some artifical
+% may contain \cs{columnbreak}s in which case doing some artificial
% splitting to get the marks out still fails to see all marks
% unless we take some special precaution in \cs{get@keptmarks}
% (which is now done).
@@ -3625,12 +3630,22 @@
% \changes{v1.6g}{2006/02/23}{Added \cs{@minipagefalse}}
% \changes{v1.6h}{2008/12/05}{Use \cs{@endfloatbox} to better support
% the modifications done by the float package}
+% \changes{v1.9i}{2024/09/14}{Added tagging support}
% Even if this should be used as a hook we use a |@| in the
% name since it is more for experts.
-% \begin{macrocode}
+% 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@floatcmds{%
\let\@dblfloat\@dbflt
\def\end@dblfloat{\@endfloatbox
+ \UseTaggingSocket{float/end}%
\@largefloatcheck
\outer@nobreak
% \end{macrocode}
@@ -3652,6 +3667,7 @@
\fi
\ifnum\@floatpenalty=-\@Mii
\@Esphack
+ \UseTaggingSocket{float/hmode/end}%
\fi}}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/required/tools/multicol.pdf b/macros/latex-dev/required/tools/multicol.pdf
index 88f6d24fb9..f363031b49 100644
--- a/macros/latex-dev/required/tools/multicol.pdf
+++ b/macros/latex-dev/required/tools/multicol.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/rawfonts.pdf b/macros/latex-dev/required/tools/rawfonts.pdf
index 4b70b5fb34..c616510fa7 100644
--- a/macros/latex-dev/required/tools/rawfonts.pdf
+++ b/macros/latex-dev/required/tools/rawfonts.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/shellesc.pdf b/macros/latex-dev/required/tools/shellesc.pdf
index 4a7b48325a..d5459e42a1 100644
--- a/macros/latex-dev/required/tools/shellesc.pdf
+++ b/macros/latex-dev/required/tools/shellesc.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/showkeys.pdf b/macros/latex-dev/required/tools/showkeys.pdf
index bc179092e4..907ec14272 100644
--- a/macros/latex-dev/required/tools/showkeys.pdf
+++ b/macros/latex-dev/required/tools/showkeys.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/somedefs.pdf b/macros/latex-dev/required/tools/somedefs.pdf
index 350af16103..e094300ab8 100644
--- a/macros/latex-dev/required/tools/somedefs.pdf
+++ b/macros/latex-dev/required/tools/somedefs.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/tabularx.pdf b/macros/latex-dev/required/tools/tabularx.pdf
index 3a9261846c..f26fce05bc 100644
--- a/macros/latex-dev/required/tools/tabularx.pdf
+++ b/macros/latex-dev/required/tools/tabularx.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/theorem.dtx b/macros/latex-dev/required/tools/theorem.dtx
index a9c3ccae3e..3fbba473ba 100644
--- a/macros/latex-dev/required/tools/theorem.dtx
+++ b/macros/latex-dev/required/tools/theorem.dtx
@@ -24,7 +24,7 @@
%%
%
%
-\def\FMithmInfo{2023/07/05 v2.2c Theorem extension package (FMi)}
+\def\FMithmInfo{2024/08/06 v2.2c Theorem extension package (FMi)}
%
% \ProvidesFile{theorem.dtx}[\FMithmInfo]
%\iffalse % this is a METACOMMENT !
@@ -952,7 +952,6 @@
%
% \subsubsection{The \texttt{changebreak} style}
%
-% \begin{macrocode}
% This style option is stored in the file |thcb.sty|.
% \begin{macrocode}
%<*thcb>
diff --git a/macros/latex-dev/required/tools/theorem.pdf b/macros/latex-dev/required/tools/theorem.pdf
index ef3fde6039..6476a27f32 100644
--- a/macros/latex-dev/required/tools/theorem.pdf
+++ b/macros/latex-dev/required/tools/theorem.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/tools-overview.pdf b/macros/latex-dev/required/tools/tools-overview.pdf
index fc09cbdfb7..76e1a11505 100644
--- a/macros/latex-dev/required/tools/tools-overview.pdf
+++ b/macros/latex-dev/required/tools/tools-overview.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/tools-overview.tex b/macros/latex-dev/required/tools/tools-overview.tex
index 54f4b5ed63..3d45a5e2fc 100644
--- a/macros/latex-dev/required/tools/tools-overview.tex
+++ b/macros/latex-dev/required/tools/tools-overview.tex
@@ -132,7 +132,7 @@
Access bold math symbols.
}%
\entry{calc}{%
- Infix arithmetic expresions. Contributed to the distribution by
+ Infix arithmetic expressions. Contributed to the distribution by
Kresten Krab Thorup and Frank Jensen.
}%
\entry{dcolumn}{%
@@ -149,7 +149,7 @@
missing file error loop.
}%
\entry{fontsmpl}{%
- Package and test file for producing \emph{font samples}
+ Package and test file for producing \emph{font samples}.
}%
\entry{ftnright}{%
Place footnotes in the right hand column in two-column mode.
@@ -173,7 +173,7 @@
}%
\entry{rawfonts}{%
Preload fonts under the old internal font names of \LaTeX{}2.09.
- Not recomended for new packages, but may help when updating old
+ Not recommended for new packages, but may help when updating old
files.
}%
\entry{shellesc}{%
@@ -206,7 +206,7 @@
Flexible version of verbatim environment.
}%
\entry{xr}{%
- eXternall References. Extend \cs{ref} to access \cs{label} commands in
+ eXternal References. Extend \cs{ref} to access \cs{label} commands in
other documents.
}%
\entry{xspace}{%
diff --git a/macros/latex-dev/required/tools/tools.ins b/macros/latex-dev/required/tools/tools.ins
index 8687d49d7f..776215ff2e 100644
--- a/macros/latex-dev/required/tools/tools.ins
+++ b/macros/latex-dev/required/tools/tools.ins
@@ -195,6 +195,8 @@ given in the file `manifest.txt'.
\file{r.tex}{\from{fileerr.dtx}{run}}
\file{x.tex}{\from{fileerr.dtx}{exit}}}
+\generate{\file{rename-to-empty-base.tex}{\from{fileerr.dtx}{return}}}
+
\Msg{***********************************************************}
\Msg{*}
@@ -202,8 +204,9 @@ given in the file `manifest.txt'.
\Msg{* files into a directory searched by TeX:}
\Msg{*}
\Msg{* All the files with extension `.sty' and `.tex'}
-\Msg{* Note there also may be a file .tex which is `invisible'}
-\Msg{* on some operating systems.}
+\Msg{* TeX may be blocked from writing a file called `.tex',}
+\Msg{* so generated a file with name `rename-to-empty-base.tex'.}
+\Msg{* Rename that file to `.tex' after the docstrip generation.}
\Msg{*}
\Msg{* To produce the documentation run the .dtx files through LaTeX.}
\Msg{*}
@@ -211,14 +214,4 @@ given in the file `manifest.txt'.
\Msg{***********************************************************}
-\Msg{}
-\Msg{* Finally trying to make a file `.tex'.}
-\Msg{* (Placed at the end of this run, as this}
-\Msg{* may fail on some operating systems.)}
-
-\let\oldopenout\openout
-\def\openout{\batchmode\immediate\oldopenout}
-
-\generate{\file{.tex}{\from{fileerr.dtx}{return}}}
-
\endbatchfile
diff --git a/macros/latex-dev/required/tools/trace.pdf b/macros/latex-dev/required/tools/trace.pdf
index 986e0b9765..5d2b59e432 100644
--- a/macros/latex-dev/required/tools/trace.pdf
+++ b/macros/latex-dev/required/tools/trace.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/varioref.pdf b/macros/latex-dev/required/tools/varioref.pdf
index 3888f90501..b13fb17b39 100644
--- a/macros/latex-dev/required/tools/varioref.pdf
+++ b/macros/latex-dev/required/tools/varioref.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/verbatim.pdf b/macros/latex-dev/required/tools/verbatim.pdf
index 6158390d2b..dc610ac976 100644
--- a/macros/latex-dev/required/tools/verbatim.pdf
+++ b/macros/latex-dev/required/tools/verbatim.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/xr.pdf b/macros/latex-dev/required/tools/xr.pdf
index 1c051e4a12..2b8777235d 100644
--- a/macros/latex-dev/required/tools/xr.pdf
+++ b/macros/latex-dev/required/tools/xr.pdf
Binary files differ
diff --git a/macros/latex-dev/required/tools/xspace.pdf b/macros/latex-dev/required/tools/xspace.pdf
index cacc2639aa..5066924d3e 100644
--- a/macros/latex-dev/required/tools/xspace.pdf
+++ b/macros/latex-dev/required/tools/xspace.pdf
Binary files differ