summaryrefslogtreecommitdiff
path: root/macros/latex-dev
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-03-16 03:01:05 +0000
committerNorbert Preining <norbert@preining.info>2022-03-16 03:01:05 +0000
commit725ce6a3e602c7516d471df841ea433b8c5bcd9d (patch)
tree6cc54f5bd90984b9b63976a0386ae2681a08b7cb /macros/latex-dev
parentd6f947fa36ed3b76d36a8dfad4e9247319b4d622 (diff)
CTAN sync 202203160301
Diffstat (limited to 'macros/latex-dev')
-rw-r--r--macros/latex-dev/base/README.md4
-rw-r--r--macros/latex-dev/base/alltt.pdfbin223819 -> 223819 bytes
-rw-r--r--macros/latex-dev/base/cfgguide.pdfbin242888 -> 242888 bytes
-rw-r--r--macros/latex-dev/base/changes.txt69
-rw-r--r--macros/latex-dev/base/classes.pdfbin560350 -> 560350 bytes
-rw-r--r--macros/latex-dev/base/clsguide.pdfbin402780 -> 402780 bytes
-rw-r--r--macros/latex-dev/base/cmfonts.pdfbin292376 -> 292376 bytes
-rw-r--r--macros/latex-dev/base/cyrguide.pdfbin239689 -> 239689 bytes
-rw-r--r--macros/latex-dev/base/doc-code.pdfbin1074045 -> 1073837 bytes
-rw-r--r--macros/latex-dev/base/doc.pdfbin747885 -> 747709 bytes
-rw-r--r--macros/latex-dev/base/docstrip.pdfbin503616 -> 503815 bytes
-rw-r--r--macros/latex-dev/base/encguide.pdfbin1316459 -> 1316459 bytes
-rw-r--r--macros/latex-dev/base/exscale.pdfbin204711 -> 204711 bytes
-rw-r--r--macros/latex-dev/base/fix-cm.pdfbin287733 -> 287733 bytes
-rw-r--r--macros/latex-dev/base/fntguide.pdfbin502880 -> 502880 bytes
-rw-r--r--macros/latex-dev/base/graphpap.pdfbin161713 -> 161713 bytes
-rw-r--r--macros/latex-dev/base/ifthen.pdfbin220565 -> 220565 bytes
-rw-r--r--macros/latex-dev/base/inputenc.pdfbin318204 -> 318204 bytes
-rw-r--r--macros/latex-dev/base/lamport-manual.pdfbin170878 -> 170878 bytes
-rw-r--r--macros/latex-dev/base/latexrelease.dtx38
-rw-r--r--macros/latex-dev/base/latexrelease.ins2
-rw-r--r--macros/latex-dev/base/latexrelease.pdfbin281895 -> 281906 bytes
-rw-r--r--macros/latex-dev/base/latexsym.pdfbin200760 -> 200760 bytes
-rw-r--r--macros/latex-dev/base/lb2.pdfbin252140 -> 252140 bytes
-rw-r--r--macros/latex-dev/base/letter.pdfbin337629 -> 337448 bytes
-rw-r--r--macros/latex-dev/base/lgc2.pdfbin215684 -> 215684 bytes
-rw-r--r--macros/latex-dev/base/lppl.pdfbin132382 -> 132382 bytes
-rw-r--r--macros/latex-dev/base/ltbibl.dtx37
-rw-r--r--macros/latex-dev/base/ltcmd.dtx34
-rw-r--r--macros/latex-dev/base/ltcmdhooks-code.pdfbin719840 -> 719912 bytes
-rw-r--r--macros/latex-dev/base/ltcmdhooks-doc.pdfbin478680 -> 478752 bytes
-rw-r--r--macros/latex-dev/base/ltexpl.dtx20
-rw-r--r--macros/latex-dev/base/ltfilehook-code.pdfbin796171 -> 799522 bytes
-rw-r--r--macros/latex-dev/base/ltfilehook-doc.pdfbin546618 -> 546499 bytes
-rw-r--r--macros/latex-dev/base/ltfilehook.dtx51
-rw-r--r--macros/latex-dev/base/ltfinal.dtx34
-rw-r--r--macros/latex-dev/base/lthooks-code.pdfbin1090969 -> 1090905 bytes
-rw-r--r--macros/latex-dev/base/lthooks-doc.pdfbin702594 -> 702540 bytes
-rw-r--r--macros/latex-dev/base/ltkeys.dtx119
-rw-r--r--macros/latex-dev/base/ltluatex.pdfbin317700 -> 317700 bytes
-rw-r--r--macros/latex-dev/base/ltnews.pdfbin1163142 -> 1169020 bytes
-rw-r--r--macros/latex-dev/base/ltnews01.pdfbin161518 -> 161518 bytes
-rw-r--r--macros/latex-dev/base/ltnews02.pdfbin159792 -> 159792 bytes
-rw-r--r--macros/latex-dev/base/ltnews03.pdfbin159332 -> 159332 bytes
-rw-r--r--macros/latex-dev/base/ltnews04.pdfbin152525 -> 152525 bytes
-rw-r--r--macros/latex-dev/base/ltnews05.pdfbin174494 -> 174494 bytes
-rw-r--r--macros/latex-dev/base/ltnews06.pdfbin142849 -> 142849 bytes
-rw-r--r--macros/latex-dev/base/ltnews07.pdfbin137811 -> 137811 bytes
-rw-r--r--macros/latex-dev/base/ltnews08.pdfbin155053 -> 155053 bytes
-rw-r--r--macros/latex-dev/base/ltnews09.pdfbin129570 -> 129570 bytes
-rw-r--r--macros/latex-dev/base/ltnews10.pdfbin169416 -> 169416 bytes
-rw-r--r--macros/latex-dev/base/ltnews11.pdfbin111948 -> 111948 bytes
-rw-r--r--macros/latex-dev/base/ltnews12.pdfbin156551 -> 156551 bytes
-rw-r--r--macros/latex-dev/base/ltnews13.pdfbin182225 -> 182225 bytes
-rw-r--r--macros/latex-dev/base/ltnews14.pdfbin170473 -> 170473 bytes
-rw-r--r--macros/latex-dev/base/ltnews15.pdfbin130309 -> 130309 bytes
-rw-r--r--macros/latex-dev/base/ltnews16.pdfbin138073 -> 138073 bytes
-rw-r--r--macros/latex-dev/base/ltnews17.pdfbin166228 -> 166228 bytes
-rw-r--r--macros/latex-dev/base/ltnews18.pdfbin38033 -> 38033 bytes
-rw-r--r--macros/latex-dev/base/ltnews19.pdfbin230028 -> 230028 bytes
-rw-r--r--macros/latex-dev/base/ltnews20.pdfbin318548 -> 318548 bytes
-rw-r--r--macros/latex-dev/base/ltnews21.pdfbin244867 -> 244867 bytes
-rw-r--r--macros/latex-dev/base/ltnews22.pdfbin317773 -> 317773 bytes
-rw-r--r--macros/latex-dev/base/ltnews23.pdfbin286591 -> 286591 bytes
-rw-r--r--macros/latex-dev/base/ltnews24.pdfbin265279 -> 265279 bytes
-rw-r--r--macros/latex-dev/base/ltnews25.pdfbin204935 -> 204935 bytes
-rw-r--r--macros/latex-dev/base/ltnews26.pdfbin379462 -> 379462 bytes
-rw-r--r--macros/latex-dev/base/ltnews27.pdfbin250592 -> 250592 bytes
-rw-r--r--macros/latex-dev/base/ltnews28.pdfbin376643 -> 376643 bytes
-rw-r--r--macros/latex-dev/base/ltnews29.pdfbin455107 -> 455107 bytes
-rw-r--r--macros/latex-dev/base/ltnews30.pdfbin511909 -> 511909 bytes
-rw-r--r--macros/latex-dev/base/ltnews31.pdfbin526323 -> 526323 bytes
-rw-r--r--macros/latex-dev/base/ltnews32.pdfbin546160 -> 546160 bytes
-rw-r--r--macros/latex-dev/base/ltnews33.pdfbin522412 -> 522412 bytes
-rw-r--r--macros/latex-dev/base/ltnews34.pdfbin508044 -> 508044 bytes
-rw-r--r--macros/latex-dev/base/ltnews35.pdfbin507071 -> 516486 bytes
-rw-r--r--macros/latex-dev/base/ltnews35.tex154
-rw-r--r--macros/latex-dev/base/ltpara-code.pdfbin666453 -> 666388 bytes
-rw-r--r--macros/latex-dev/base/ltpara-doc.pdfbin559920 -> 559858 bytes
-rw-r--r--macros/latex-dev/base/ltshipout-code.pdfbin819275 -> 819211 bytes
-rw-r--r--macros/latex-dev/base/ltshipout-doc.pdfbin564643 -> 564577 bytes
-rw-r--r--macros/latex-dev/base/ltvers.dtx22
-rw-r--r--macros/latex-dev/base/ltx3info.pdfbin219349 -> 219349 bytes
-rw-r--r--macros/latex-dev/base/ltxdoc.pdfbin233208 -> 233208 bytes
-rw-r--r--macros/latex-dev/base/makeindx.pdfbin165821 -> 165821 bytes
-rw-r--r--macros/latex-dev/base/modguide.pdfbin243605 -> 243605 bytes
-rw-r--r--macros/latex-dev/base/nfssfont.pdfbin211180 -> 211180 bytes
-rw-r--r--macros/latex-dev/base/proc.pdfbin227059 -> 227059 bytes
-rw-r--r--macros/latex-dev/base/slides.pdfbin375286 -> 375286 bytes
-rw-r--r--macros/latex-dev/base/slifonts.pdfbin234191 -> 234191 bytes
-rw-r--r--macros/latex-dev/base/source2e.pdfbin5617293 -> 5629371 bytes
-rw-r--r--macros/latex-dev/base/syntonly.pdfbin189707 -> 189527 bytes
-rw-r--r--macros/latex-dev/base/tlc2.pdfbin290615 -> 290615 bytes
-rw-r--r--macros/latex-dev/base/tulm.pdfbin162772 -> 162772 bytes
-rw-r--r--macros/latex-dev/base/usrguide.pdfbin430994 -> 430994 bytes
-rw-r--r--macros/latex-dev/base/usrguide3.pdfbin390416 -> 403394 bytes
-rw-r--r--macros/latex-dev/base/usrguide3.tex58
-rw-r--r--macros/latex-dev/base/utf8ienc.dtx46
-rw-r--r--macros/latex-dev/base/utf8ienc.pdfbin352642 -> 352824 bytes
-rw-r--r--macros/latex-dev/base/webcomp.pdfbin146198 -> 146198 bytes
-rw-r--r--macros/latex-dev/required/amsmath/README.md2
-rw-r--r--macros/latex-dev/required/amsmath/amsbsy.pdfbin174944 -> 174944 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amscd.pdfbin179945 -> 179945 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsgen.pdfbin178187 -> 178187 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsldoc.pdfbin508210 -> 508210 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.dtx25
-rw-r--r--macros/latex-dev/required/amsmath/amsmath.pdfbin418923 -> 419243 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.dtx12
-rw-r--r--macros/latex-dev/required/amsmath/amsopn.pdfbin139709 -> 139917 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amstext.pdfbin217498 -> 217498 bytes
-rw-r--r--macros/latex-dev/required/amsmath/amsxtra.pdfbin113561 -> 113561 bytes
-rw-r--r--macros/latex-dev/required/amsmath/changes.txt12
-rw-r--r--macros/latex-dev/required/amsmath/subeqn.pdfbin109731 -> 109731 bytes
-rw-r--r--macros/latex-dev/required/amsmath/technote.pdfbin147462 -> 147462 bytes
-rw-r--r--macros/latex-dev/required/amsmath/testmath.pdfbin454511 -> 454511 bytes
-rw-r--r--macros/latex-dev/required/firstaid/changes.txt9
-rw-r--r--macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.dtx61
-rw-r--r--macros/latex-dev/required/firstaid/latex2e-first-aid-for-external-files.pdfbin238410 -> 240432 bytes
-rw-r--r--macros/latex-dev/required/graphics/README.md2
-rw-r--r--macros/latex-dev/required/graphics/changes.txt8
-rw-r--r--macros/latex-dev/required/graphics/color.pdfbin212223 -> 212223 bytes
-rw-r--r--macros/latex-dev/required/graphics/drivers.pdfbin286459 -> 286459 bytes
-rw-r--r--macros/latex-dev/required/graphics/epsfig.pdfbin159997 -> 159997 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphics.dtx53
-rw-r--r--macros/latex-dev/required/graphics/graphics.pdfbin303042 -> 303464 bytes
-rw-r--r--macros/latex-dev/required/graphics/graphicx.pdfbin240623 -> 240623 bytes
-rw-r--r--macros/latex-dev/required/graphics/grfguide.pdfbin330978 -> 330978 bytes
-rw-r--r--macros/latex-dev/required/graphics/keyval.pdfbin239823 -> 239823 bytes
-rw-r--r--macros/latex-dev/required/graphics/lscape.pdfbin155986 -> 155986 bytes
-rw-r--r--macros/latex-dev/required/graphics/mathcolor.dtx16
-rw-r--r--macros/latex-dev/required/graphics/mathcolor.pdfbin473568 -> 475918 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotating.pdfbin278466 -> 278405 bytes
-rw-r--r--macros/latex-dev/required/graphics/rotex.pdfbin172228 -> 172227 bytes
-rw-r--r--macros/latex-dev/required/graphics/trig.pdfbin199266 -> 199266 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/README.md10
-rw-r--r--macros/latex-dev/required/latex-lab/changes.txt6
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support-code.pdfbin511324 -> 511154 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support-doc.pdfbin375470 -> 375201 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/documentmetadata-support.dtx4
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx1822
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdfbin0 -> 614456 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-new-or.dtx545
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-new-or.pdfbin0 -> 528960 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-prototype.dtx827
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-prototype.pdfbin0 -> 525128 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx17
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab-testphase.pdfbin304289 -> 291005 bytes
-rw-r--r--macros/latex-dev/required/latex-lab/latex-lab.ins (renamed from macros/latex-dev/required/latex-lab/documentmetadata-support.ins)20
-rw-r--r--macros/latex-dev/required/latex-lab/usage-of-@footnotemark.txt186
-rw-r--r--macros/latex-dev/required/latex-lab/usage-of-@footnotetext.txt842
-rw-r--r--macros/latex-dev/required/latex-lab/usage-of-kern-kern.txt80
-rw-r--r--macros/latex-dev/required/tools/README.md4
-rw-r--r--macros/latex-dev/required/tools/afterpage.pdfbin197738 -> 197738 bytes
-rw-r--r--macros/latex-dev/required/tools/array.dtx10
-rw-r--r--macros/latex-dev/required/tools/array.pdfbin516836 -> 516359 bytes
-rw-r--r--macros/latex-dev/required/tools/bm.pdfbin323432 -> 323432 bytes
-rw-r--r--macros/latex-dev/required/tools/calc.pdfbin370552 -> 370657 bytes
-rw-r--r--macros/latex-dev/required/tools/dcolumn.pdfbin220834 -> 220834 bytes
-rw-r--r--macros/latex-dev/required/tools/delarray.pdfbin191064 -> 191064 bytes
-rw-r--r--macros/latex-dev/required/tools/enumerate.pdfbin215498 -> 215498 bytes
-rw-r--r--macros/latex-dev/required/tools/fileerr.pdfbin187725 -> 187408 bytes
-rw-r--r--macros/latex-dev/required/tools/fontsmpl.pdfbin146446 -> 146446 bytes
-rw-r--r--macros/latex-dev/required/tools/ftnright.pdfbin387226 -> 386912 bytes
-rw-r--r--macros/latex-dev/required/tools/hhline.pdfbin189679 -> 189679 bytes
-rw-r--r--macros/latex-dev/required/tools/indentfirst.pdfbin157954 -> 157954 bytes
-rw-r--r--macros/latex-dev/required/tools/layout.pdfbin259969 -> 259969 bytes
-rw-r--r--macros/latex-dev/required/tools/longtable.pdfbin391313 -> 391313 bytes
-rw-r--r--macros/latex-dev/required/tools/multicol.pdfbin521446 -> 521258 bytes
-rw-r--r--macros/latex-dev/required/tools/rawfonts.pdfbin138963 -> 138963 bytes
-rw-r--r--macros/latex-dev/required/tools/shellesc.pdfbin175929 -> 175929 bytes
-rw-r--r--macros/latex-dev/required/tools/showkeys.pdfbin252158 -> 252158 bytes
-rw-r--r--macros/latex-dev/required/tools/somedefs.pdfbin167572 -> 167572 bytes
-rw-r--r--macros/latex-dev/required/tools/tabularx.pdfbin287073 -> 287073 bytes
-rw-r--r--macros/latex-dev/required/tools/theorem.pdfbin351702 -> 351388 bytes
-rw-r--r--macros/latex-dev/required/tools/tools-overview.pdfbin73672 -> 73672 bytes
-rw-r--r--macros/latex-dev/required/tools/trace.pdfbin222076 -> 222076 bytes
-rw-r--r--macros/latex-dev/required/tools/varioref.pdfbin383856 -> 383856 bytes
-rw-r--r--macros/latex-dev/required/tools/verbatim.pdfbin330963 -> 330963 bytes
-rw-r--r--macros/latex-dev/required/tools/xr.pdfbin169986 -> 169986 bytes
-rw-r--r--macros/latex-dev/required/tools/xspace.pdfbin257018 -> 257018 bytes
180 files changed, 5061 insertions, 200 deletions
diff --git a/macros/latex-dev/base/README.md b/macros/latex-dev/base/README.md
index 6029313c56..65c4673cca 100644
--- a/macros/latex-dev/base/README.md
+++ b/macros/latex-dev/base/README.md
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2022-06-01 pre-release 2
+Release 2022-06-01 pre-release 3
Overview
--------
@@ -94,6 +94,6 @@ version 1.3c or later.
-----
-<p>Copyright (C) 1989-2021 The LaTeX Project <br />
+<p>Copyright (C) 1989-2022 The LaTeX Project <br />
<a href="http://latex-project.org/">http://latex-project.org/</a> <br />
All rights reserved.</p>
diff --git a/macros/latex-dev/base/alltt.pdf b/macros/latex-dev/base/alltt.pdf
index 16f4934d9d..d612e91b3b 100644
--- a/macros/latex-dev/base/alltt.pdf
+++ b/macros/latex-dev/base/alltt.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cfgguide.pdf b/macros/latex-dev/base/cfgguide.pdf
index f1d9b18a00..e96dd1eadd 100644
--- a/macros/latex-dev/base/cfgguide.pdf
+++ b/macros/latex-dev/base/cfgguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/changes.txt b/macros/latex-dev/base/changes.txt
index 0768de673b..b9bea0a54a 100644
--- a/macros/latex-dev/base/changes.txt
+++ b/macros/latex-dev/base/changes.txt
@@ -1,4 +1,3 @@
-
================================================================================
This file lists changes to the LaTeX2e files in reverse chronological order of
publication (therefore the dates might be out of sequence if there are hotfixes).
@@ -7,11 +6,65 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
================================================================================
+2022-03-10 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltfilehook.dtx (subsection{Selecting a file (\cs{set@curr@file})}):
+ Add \set@curr@file@nosearch, to ignore \input@path and \l_file_search_path_seq.
+
+2022-03-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltbibl.dtx (section{Bibliography Generation}):
+ Ensure that an empty argument given to \cite generates
+ a warning (gh/790)
+
+2022-02-28 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * ltvers.dtx (subsection{Declaring an all-new module}):
+ Detect a missing \IncludeInRelease{0000/00/00} in a new module.
+
+2022-02-28 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * latexrelease.dtx, ltexpl.dtx, ltcmd.dtx:
+ Move most make-harmless redefinitions right after ltexpl.dtx.
+
+2022-02-21 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltkeys.dtx:
+ More efficient module expansion
+
+2022-02-19 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltcmd.dtx (subsection{User functions}):
+ Added \IfBlankTF and friends to test if a received argument
+ is empty or contains only normal space characters.
+
+2022-02-19 David Carlisle <David.Carlisle@latex-project.org>
+
+ * utf8ienc.dtx: use \protected definitions.
+ also avoid global definitions for gh/762
+
+2022-02-16 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltkeys.dtx:
+ Allow for active characters in module argument
+ \DeclareUnknownKeyHandler better than with the "s"
+
+2022-02-15 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltkeys.dtx:
+ Expand optional module argument in design-level commands
+ Add \DeclareUnknownKeysHandler
+
+2022-02-07 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltkeys.dtx:
+ Correct definition of .code property
+
2022-02-05 Joseph Wright <Joseph.Wright@latex-project.org>
- * ltkeys.dtx (section{Plain \TeX}):
- Create key properties at the 2e layer
- Add .code property
+ * ltkeys.dtx:
+ Create key properties at the 2e layer
+ Add .code property
2022-01-25 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
@@ -34,12 +87,12 @@ are not part of the distribution.
* ltexpl.dtx (section{Document-level command names for expl3 functions}):
Adjust document-level names for \exp_args:Nc and the like
-2021-12-30 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+2021-12-30 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
* ltmeta.dtx:
Adapted bundle name to new name `LaTeX-lab'
-2021-12-31 Phelype Oleinik <phelype.oleinik@latex-project.org>
+2021-12-31 Phelype Oleinik <phelype.oleinik@latex-project.org>
* ltcmd.dtx (subsubsection{Showing the definition of a command}):
Make \ShowCommand stop for interaction with ltcmd (gh/739)
@@ -169,7 +222,7 @@ All changes above are only part of the development branch for the next release.
# 2021-11-15 Release
#########################
-2021-10-20 Phelype Oleinik <phelype.oleinik@latex-project.org>
+2021-10-20 Phelype Oleinik <phelype.oleinik@latex-project.org>
* ltcmdhooks.dtx (subsubsection{Patching by expansion and redefinition}):
Fix patching of commands that contain parameter tokens (gh/697)
@@ -207,7 +260,7 @@ All changes above are only part of the development branch for the next release.
* classes.dtx, doc.dtx, makeindx.dtx, preload.dtx, slides.dtx, array.dtx
Removed old references to latex.tex or latex.dtx (gh/685)
-2021-09-28 Phelype Oleinik <phelype.oleinik@latex-project.org>
+2021-09-28 Phelype Oleinik <phelype.oleinik@latex-project.org>
* ltcmdhooks.dtx (subsection{Patching commands}):
Make patching of commands with generic cmd hooks a global operation (gh/674)
diff --git a/macros/latex-dev/base/classes.pdf b/macros/latex-dev/base/classes.pdf
index f9554c7255..9d7cd6a797 100644
--- a/macros/latex-dev/base/classes.pdf
+++ b/macros/latex-dev/base/classes.pdf
Binary files differ
diff --git a/macros/latex-dev/base/clsguide.pdf b/macros/latex-dev/base/clsguide.pdf
index bb6d34b20c..77158a1f32 100644
--- a/macros/latex-dev/base/clsguide.pdf
+++ b/macros/latex-dev/base/clsguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cmfonts.pdf b/macros/latex-dev/base/cmfonts.pdf
index 1519514358..a281182d36 100644
--- a/macros/latex-dev/base/cmfonts.pdf
+++ b/macros/latex-dev/base/cmfonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/cyrguide.pdf b/macros/latex-dev/base/cyrguide.pdf
index 6efe42e1b8..f03a3e508b 100644
--- a/macros/latex-dev/base/cyrguide.pdf
+++ b/macros/latex-dev/base/cyrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/doc-code.pdf b/macros/latex-dev/base/doc-code.pdf
index 69c7ad4bbe..d9fa6ad544 100644
--- a/macros/latex-dev/base/doc-code.pdf
+++ b/macros/latex-dev/base/doc-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/doc.pdf b/macros/latex-dev/base/doc.pdf
index 733e15b624..7963d5c27a 100644
--- a/macros/latex-dev/base/doc.pdf
+++ b/macros/latex-dev/base/doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/docstrip.pdf b/macros/latex-dev/base/docstrip.pdf
index d1fb196f58..da31ca03b2 100644
--- a/macros/latex-dev/base/docstrip.pdf
+++ b/macros/latex-dev/base/docstrip.pdf
Binary files differ
diff --git a/macros/latex-dev/base/encguide.pdf b/macros/latex-dev/base/encguide.pdf
index 7581f0b892..5d607801b2 100644
--- a/macros/latex-dev/base/encguide.pdf
+++ b/macros/latex-dev/base/encguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/exscale.pdf b/macros/latex-dev/base/exscale.pdf
index 5ca05e6672..69119b9f01 100644
--- a/macros/latex-dev/base/exscale.pdf
+++ b/macros/latex-dev/base/exscale.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fix-cm.pdf b/macros/latex-dev/base/fix-cm.pdf
index f763dd53f2..eb83169c23 100644
--- a/macros/latex-dev/base/fix-cm.pdf
+++ b/macros/latex-dev/base/fix-cm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/fntguide.pdf b/macros/latex-dev/base/fntguide.pdf
index dadcf600b2..83e562aba3 100644
--- a/macros/latex-dev/base/fntguide.pdf
+++ b/macros/latex-dev/base/fntguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/graphpap.pdf b/macros/latex-dev/base/graphpap.pdf
index 1567c9ceb0..655a201a8d 100644
--- a/macros/latex-dev/base/graphpap.pdf
+++ b/macros/latex-dev/base/graphpap.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ifthen.pdf b/macros/latex-dev/base/ifthen.pdf
index 3580e40dd4..08266fb274 100644
--- a/macros/latex-dev/base/ifthen.pdf
+++ b/macros/latex-dev/base/ifthen.pdf
Binary files differ
diff --git a/macros/latex-dev/base/inputenc.pdf b/macros/latex-dev/base/inputenc.pdf
index 139633cba1..5d0a747d3c 100644
--- a/macros/latex-dev/base/inputenc.pdf
+++ b/macros/latex-dev/base/inputenc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lamport-manual.pdf b/macros/latex-dev/base/lamport-manual.pdf
index 105bf5c869..1e39b271b2 100644
--- a/macros/latex-dev/base/lamport-manual.pdf
+++ b/macros/latex-dev/base/lamport-manual.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexrelease.dtx b/macros/latex-dev/base/latexrelease.dtx
index efdfa8c418..294007553d 100644
--- a/macros/latex-dev/base/latexrelease.dtx
+++ b/macros/latex-dev/base/latexrelease.dtx
@@ -40,7 +40,7 @@
%<*latexrelease>
% \fi
% \ProvidesFile{latexrelease.dtx}
- [2021/04/29 v1.0n LaTeX release emulation and tests
+ [2022/02/28 v1.0o LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
% \iffalse
%</latexrelease>
@@ -487,10 +487,9 @@
% \begin{macro}{\sourceLaTeXdate}
% \changes{v1.0l}{2021/01/23}{\cs{sourceLaTeXdate} added}
% \changes{v1.0m}{2021/03/18}{Define \cs{sourceLaTeXdate} conditionally}
-% Store the original \LaTeX{} format version
-% as a number in the format |YYYYMMDD|. This macro has to
-% be defined conditionally, so that it isn't changed in case
-% \file{latexrelease.sty} is loaded twice (for tests), but it
+% Store the original \LaTeX{} format version as a number in the format
+% |YYYYMMDD |. This macro has to be defined conditionally, so that it
+% isn't changed in case \file{latexrelease.sty} is reloaded, but it
% can't be defined in the kernel only, otherwise
% \file{latexrelease.sty} wouldn't work in older \LaTeX{} due
% to the missing macro.
@@ -619,7 +618,7 @@ of this package available from CTAN}
\catcode58=11 % :
\catcode126=10 % ~
\catcode32=09 % <space>
- \xdef\latexrelease@postexpl{\unexpanded{%
+ \xdef\latexrelease@postltexpl{\unexpanded{%
%<@@=latexrelease>
% \end{macrocode}
%
@@ -691,14 +690,13 @@ of this package available from CTAN}
% store each in \cs{l_@@_restores_tl}, save a copy, and redefine each.
% \begin{macrocode}
\tl_clear_new:N \l_@@_restores_tl
-\cs_gset:Npn \@@_tmp:w #1 #2
+\cs_gset:Npn \@@_redefines:w #1 #2
{
- \quark_if_recursion_tail_stop_do:Nn #1
- { \cs_undefine:N \@@_tmp:w }
+ \quark_if_recursion_tail_stop:N #1
\tl_put_right:Nn \l_@@_restores_tl {#1}
\cs_set_eq:cN { @@_ \cs_to_str:N #1 } #1
\cs_set_eq:NN #1 #2
- \@@_tmp:w
+ \@@_redefines:w
}
% \end{macrocode}
%
@@ -731,12 +729,12 @@ of this package available from CTAN}
% \end{description}
% And here we go:
% \begin{macrocode}
-\@@_tmp:w
+\@@_redefines:w
\__kernel_chk_if_free_cs:N \use_none:n
\e@alloc \@@_e@alloc:NnnnnN
\__kernel_msg_error:nnx \use_none:nnn
\msg_new:nnnn \msg_gset:nnnn
- \NewDocumentCommand \DeclareDocumentCommand
+ % \NewDocumentCommand \DeclareDocumentCommand % after ltcmd.dtx
\newcommand \@@_declare_command:w
% \end{macrocode}
% Temp addition \ldots
@@ -752,6 +750,22 @@ of this package available from CTAN}
\msg_redirect_name:nnn { hooks } { exists } { none }
% \end{macrocode}
%
+% Now a one-off for |ltcmd.dtx|: we need to make \cs{NewDocumentCommand}
+% not complain on an already existing command, but it has to be done
+% after \cs{NewDocumentCommand} is defined, so this is separate from
+% the \cs{latexrelease@postltexpl} actions above:
+% \changes{v1.0o}{2022/02/28}
+% {Move most redefinitions to right after ltexpl.dtx}
+% \begin{macrocode}
+\cs_gset_protected:Npn \latexrelease@postltcmd
+ {
+ \@@_redefines:w
+ \NewDocumentCommand \DeclareDocumentCommand
+ \q_recursion_tail \q_recursion_tail
+ \q_recursion_stop
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
}}%
\endgroup
diff --git a/macros/latex-dev/base/latexrelease.ins b/macros/latex-dev/base/latexrelease.ins
index 42cb588568..cfba0f5c6e 100644
--- a/macros/latex-dev/base/latexrelease.ins
+++ b/macros/latex-dev/base/latexrelease.ins
@@ -93,7 +93,7 @@ extension .ins) which are part of the distribution.
\from{ltluatex.dtx} {latexrelease}% empty
\from{ltexpl.dtx} {latexrelease}% empty
\from{ltdefns.dtx} {latexrelease}%
- \from{ltcmd.dtx} {latexrelease}%
+ \from{ltcmd.dtx} {latexrelease}% L3 layer module
\from{lthooks.dtx} {latexrelease}% L3 layer module
\from{ltcmdhooks.dtx} {latexrelease}% L3 layer module
\from{ltalloc.dtx} {latexrelease}% empty
diff --git a/macros/latex-dev/base/latexrelease.pdf b/macros/latex-dev/base/latexrelease.pdf
index ca626e9ead..c0c395ee65 100644
--- a/macros/latex-dev/base/latexrelease.pdf
+++ b/macros/latex-dev/base/latexrelease.pdf
Binary files differ
diff --git a/macros/latex-dev/base/latexsym.pdf b/macros/latex-dev/base/latexsym.pdf
index 0f5279c10e..5b1fc23b4e 100644
--- a/macros/latex-dev/base/latexsym.pdf
+++ b/macros/latex-dev/base/latexsym.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lb2.pdf b/macros/latex-dev/base/lb2.pdf
index 6e74caa24b..a7ae8aa79c 100644
--- a/macros/latex-dev/base/lb2.pdf
+++ b/macros/latex-dev/base/lb2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/letter.pdf b/macros/latex-dev/base/letter.pdf
index 026c2a5a37..0b843b79a0 100644
--- a/macros/latex-dev/base/letter.pdf
+++ b/macros/latex-dev/base/letter.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lgc2.pdf b/macros/latex-dev/base/lgc2.pdf
index 59fb751186..a644e1fb93 100644
--- a/macros/latex-dev/base/lgc2.pdf
+++ b/macros/latex-dev/base/lgc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lppl.pdf b/macros/latex-dev/base/lppl.pdf
index eea50258ae..cafe15d94c 100644
--- a/macros/latex-dev/base/lppl.pdf
+++ b/macros/latex-dev/base/lppl.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltbibl.dtx b/macros/latex-dev/base/ltbibl.dtx
index 9824ca539f..4c219657b8 100644
--- a/macros/latex-dev/base/ltbibl.dtx
+++ b/macros/latex-dev/base/ltbibl.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltbibl.dtx}
- [2020/12/10 v1.1s LaTeX Kernel (Bibliography)]
+ [2022/03/10 v1.1t LaTeX Kernel (Bibliography)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltbibl.dtx}
@@ -199,8 +199,41 @@
% \begin{macro}{\cite}
% \changes{v1.1j}{1995/10/16}{(DPC) Make robust}
% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\cite}{check for blank}%
\DeclareRobustCommand\cite{%
- \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
+ \@ifnextchar [{\@tempswatrue\@citex@checkblank}{\@tempswafalse\@citex@checkblank[]}}
+% \end{macrocode}
+% Due to the way \cs{@for} as used in \cs{@citex} behaves an empty
+% argument to \cs{cite} did not produce any warning for a missing
+% citation. So we now inject a command before calling \cs{@citex} that
+% does the checking for us. It is not done in \cs{@citex} directly,
+% because that command is altered by a number of packages/classes
+% and this way it is more likely that the check survives.
+% \changes{v1.1t}{2022/03/10}{Ensure that an empty argument generates
+% a warning (gh/790)}
+% \begin{macrocode}
+\def\@citex@checkblank[#1]#2{%
+ \IfBlankTF {#2}%
+ {\@citex[#1]{\space}}%
+ {\@citex[#1]{#2}}%
+}
+%</2ekernel|latexrelease>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\cite}{check for blank}%
+%<latexrelease>
+%<latexrelease>\DeclareRobustCommand\cite{%
+%<latexrelease> \@ifnextchar [{\@tempswatrue\@citex}{\@tempswafalse\@citex[]}}
+%<latexrelease>\let\@citex@checkblank\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/ltcmd.dtx b/macros/latex-dev/base/ltcmd.dtx
index bf7ae4ea24..f52b32479e 100644
--- a/macros/latex-dev/base/ltcmd.dtx
+++ b/macros/latex-dev/base/ltcmd.dtx
@@ -34,8 +34,8 @@
%%% From File: ltcmd.dtx
%
% \begin{macrocode}
-\def\ltcmdversion{v1.0j}
-\def\ltcmddate{2021-12-31}
+\def\ltcmdversion{v1.0k}
+\def\ltcmddate{2022-02-28}
% \end{macrocode}
%
%<*driver>
@@ -4716,6 +4716,27 @@
% \end{macrocode}
% \end{macro}
%
+%
+% \begin{macro}{\IfBlankT, \IfBlankF, \IfBlankTF}
+% Another simple re-naming.
+% \changes{v1.0k}{2022/02/19}{Added \cs{IfBlankTF} and friends}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\IfBlankTF}{Testing~for~empty~or~blank}%
+\cs_new_eq:NN \IfBlankF \tl_if_blank:nF
+\cs_new_eq:NN \IfBlankT \tl_if_blank:nT
+\cs_new_eq:NN \IfBlankTF \tl_if_blank:nTF
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2021/11/15}%
+%<latexrelease> {\IfBlankTF}{Testing~for~empty~or~blank}%
+%<latexrelease>\cs_undefine:N \IfBlankF
+%<latexrelease>\cs_undefine:N \IfBlankT
+%<latexrelease>\cs_undefine:N \IfBlankTF
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\ProcessedArgument}
% Processed arguments are returned using this name, which is reserved
% here although the definition will change.
@@ -4779,7 +4800,14 @@
%<latexrelease>
%<latexrelease>\EndModuleRelease
\ExplSyntaxOff
-%<latexrelease>\@ifundefined{ExplSyntaxOff}{}{\latexrelease@postexpl}
+% \end{macrocode}
+%
+% Now in |latexrelease| mode, redefine \cs{NewDocumentCommand} to not
+% complain on commands already defined.
+% \changes{v1.0k}{2022-02-28}
+% {Move latexrelease redefinitions from ltcmd.dtx}
+% \begin{macrocode}
+%<latexrelease>\@ifundefined{ExplSyntaxOff}{}{\latexrelease@postltcmd}
%<latexrelease>\catcode`\^^@=\@latexrelease@catcode@null\relax
%</2ekernel|latexrelease>
% \end{macrocode}
diff --git a/macros/latex-dev/base/ltcmdhooks-code.pdf b/macros/latex-dev/base/ltcmdhooks-code.pdf
index 1e0744a2a4..12928555fb 100644
--- a/macros/latex-dev/base/ltcmdhooks-code.pdf
+++ b/macros/latex-dev/base/ltcmdhooks-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltcmdhooks-doc.pdf b/macros/latex-dev/base/ltcmdhooks-doc.pdf
index 149ae90ad6..e4e197446f 100644
--- a/macros/latex-dev/base/ltcmdhooks-doc.pdf
+++ b/macros/latex-dev/base/ltcmdhooks-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltexpl.dtx b/macros/latex-dev/base/ltexpl.dtx
index e6a83d5725..aab189bec2 100644
--- a/macros/latex-dev/base/ltexpl.dtx
+++ b/macros/latex-dev/base/ltexpl.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltexpl.dtx}
- [2022/01/06 v1.3e LaTeX Kernel (expl3-dependent code)]
+ [2022/02/28 v1.3f LaTeX Kernel (expl3-dependent code)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltexpl.dtx}
@@ -288,6 +288,14 @@
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
+% Now in |latexrelease| mode, redefine a few commands to avoid ``already
+% defined'' errors.
+% \changes{v1.3f}{2022/02/28}
+% {Move latexrelease redefinitions from ltcmd.dtx}
+% \begin{macrocode}
+%<latexrelease>\@ifundefined{ExplSyntaxOff}{}{\latexrelease@postltexpl}
+% \end{macrocode}
+%
% \changes{v1.3a}{2021/01/21}
% {Move \pkg{xparse} rollback code to \texttt{ltcmd.dtx}}
%
@@ -432,17 +440,17 @@
%<latexrelease>\IncludeInRelease{2022/06/01}%
%<latexrelease> {\fpeval}{fp and int calculations}%
\ExplSyntaxOn
-\cs_new_eq:NN \fpeval \fp_eval:n
+\cs_new_eq:NN \fpeval \fp_eval:n
% \end{macrocode}
% And a few more, this time wrappers around the e\TeX{} primitives.
% \begin{macrocode}
-\cs_new_eq:NN \inteval \int_eval:n
+\cs_new_eq:NN \inteval \int_eval:n
% \end{macrocode}
%
% \changes{v1.3d}{2021/12/07}{Added \cs{dimeval} and \cs{skipeval} (gh/711)}
% \begin{macrocode}
-\cs_new_eq:NN \dimeval \dim_eval:n
-\cs_new_eq:NN \skipeval \skip_eval:n
+\cs_new_eq:NN \dimeval \dim_eval:n
+\cs_new_eq:NN \skipeval \skip_eval:n
\ExplSyntaxOff
% \end{macrocode}
% \end{macro}
@@ -452,7 +460,6 @@
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\fpeval}{fp and int calculations}%
-
%<latexrelease>
%<latexrelease>\let\fpeval\@undefined
%<latexrelease>\let\inteval\@undefined
@@ -503,7 +510,6 @@
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\ExpandArgs}{Some pre-expansion commands}%
-
%<latexrelease>
%<latexrelease>\let\UseName\@undefined
%<latexrelease>\let\ExpandArgs\@undefined
diff --git a/macros/latex-dev/base/ltfilehook-code.pdf b/macros/latex-dev/base/ltfilehook-code.pdf
index d9cbaf1a3d..58f4b7c4a4 100644
--- a/macros/latex-dev/base/ltfilehook-code.pdf
+++ b/macros/latex-dev/base/ltfilehook-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltfilehook-doc.pdf b/macros/latex-dev/base/ltfilehook-doc.pdf
index 5e3ed3d4ab..d2b75528d2 100644
--- a/macros/latex-dev/base/ltfilehook-doc.pdf
+++ b/macros/latex-dev/base/ltfilehook-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltfilehook.dtx b/macros/latex-dev/base/ltfilehook.dtx
index 533aacbf2b..af503b262f 100644
--- a/macros/latex-dev/base/ltfilehook.dtx
+++ b/macros/latex-dev/base/ltfilehook.dtx
@@ -31,8 +31,8 @@
%%% From File: ltfilehook.dtx
%
% \begin{macrocode}
-\providecommand\ltfilehookversion{v1.0l}
-\providecommand\ltfilehookdate{2021/08/27}
+\providecommand\ltfilehookversion{v1.0m}
+\providecommand\ltfilehookdate{2022/03/10}
% \end{macrocode}
%
%<*driver>
@@ -1046,7 +1046,8 @@
%
% \subsection{Selecting a file (\cs{set@curr@file})}
%
-% \begin{macro}{\set@curr@file,\@curr@file,\@curr@file@reqd}
+% \begin{macro}{\set@curr@file,\set@curr@file@nosearch}
+% \begin{macro}{\@curr@file,\@curr@file@reqd}
% \changes{v1.0f}{2021/01/31}{set \cs{protect} to \cs{string} gh/481}
% Now we hook into \cs{set@curr@file} to resolve a possible file
% substitution, and add \cs{@expl@@@filehook@set@curr@file@@nNN}
@@ -1070,13 +1071,23 @@
% control sequence.
% \changes{v1.0i}{2021/04/20}
% {Make \string~ expand to a string (tracks change in l3kernel)}
+% \changes{v1.0m}{2022/03/10}
+% {Add \cs{set@curr@file@nosearch} for \pkg{graphicx}}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
-%<latexrelease>\IncludeInRelease{2021/06/01}%
+%<latexrelease>\IncludeInRelease{2022/06/01}%
%<latexrelease> {\set@curr@file}{Setting current file name}%
-\def\set@curr@file#1{%
+\def\set@curr@file{%
+ \begingroup
+ \set@curr@file@aux}
+\edef\set@curr@file@nosearch{%
\begingroup
+ \let\noexpand\input@path\noexpand\@empty
+ \csname seq_clear:N\endcsname
+ \expandafter\noexpand\csname l_file_search_path_seq\endcsname
+ \noexpand\set@curr@file@aux}
+\def\set@curr@file@aux#1{%
\escapechar\m@ne
\let\protect\string
\edef~{\string~}%
@@ -1117,6 +1128,32 @@
% \end{macrocode}
%
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2021/06/01}%
+%<latexrelease> {\set@curr@file}{Setting current file name}%
+%<latexrelease>\def\set@curr@file#1{%
+%<latexrelease> \begingroup
+%<latexrelease> \escapechar\m@ne
+%<latexrelease> \let\protect\string
+%<latexrelease> \edef~{\string~}%
+%<latexrelease> \expandafter\def\csname\expandafter\endcsname
+%<latexrelease> \expandafter{\csname\endcsname}%
+%<latexrelease> \@expl@@@filehook@if@no@extension@@nTF{#1}%
+%<latexrelease> {\@tempswatrue}{\@tempswafalse}%
+%<latexrelease> \@kernel@make@file@csname\@curr@file
+%<latexrelease> \@expl@@@filehook@resolve@file@subst@@w {#1}%
+%<latexrelease> \@expl@@@filehook@if@file@replaced@@TF
+%<latexrelease> {\@kernel@make@file@csname\@curr@file@reqd
+%<latexrelease> \@expl@@@filehook@normalize@file@name@@w{#1}%
+%<latexrelease> \if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file@reqd \fi}%
+%<latexrelease> {\if@tempswa \@expl@@@filehook@drop@extension@@N\@curr@file \fi
+%<latexrelease> \global\let\@curr@file@reqd\@curr@file}%
+%<latexrelease> \@expl@@@filehook@clear@replacement@flag@@
+%<latexrelease> \endgroup}
+%<latexrelease>\let\set@curr@file@nosearch\@undefined
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\set@curr@file}{Setting current file name}%
%<latexrelease>\def\set@curr@file#1{%
@@ -1136,6 +1173,7 @@
%<latexrelease> \global\let\@curr@file@reqd\@curr@file}%
%<latexrelease> \@expl@@@filehook@clear@replacement@flag@@
%<latexrelease> \endgroup}
+%<latexrelease>\let\set@curr@file@nosearch\@undefined
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
@@ -1152,6 +1190,7 @@
%<latexrelease> \csname\@firstofone#1\@empty\endcsname}}%
%<latexrelease> \endgroup
%<latexrelease>}
+%<latexrelease>\let\set@curr@file@nosearch\@undefined
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
@@ -1159,10 +1198,12 @@
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\set@curr@file}{Setting current file name}%
%<latexrelease>\let\set@curr@file\@undefined
+%<latexrelease>\let\set@curr@file@nosearch\@undefined
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
% \end{macro}
+% \end{macro}
%
%
%
diff --git a/macros/latex-dev/base/ltfinal.dtx b/macros/latex-dev/base/ltfinal.dtx
index 46c7ded4aa..4f3b3f15a1 100644
--- a/macros/latex-dev/base/ltfinal.dtx
+++ b/macros/latex-dev/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2021/12/07 v2.2q LaTeX Kernel (Final Settings)]
+ [2022/02/20 v2.2r LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1037,10 +1037,14 @@
% \begin{macro}{\MakeUppercase}
% \begin{macro}{\MakeUppercase}
% \begin{macro}{\@uclclist}
+% \begin{macro}{\@expl@text@lowercase@@n}
+% \begin{macro}{\@expl@text@uppercase@@n}
+% \begin{macro}{\@uclclist}
+%
%
% \changes{v1.1a}{1997/10/20}{Removed \cs{aa} and \cs{AA} from
% \cs{@uclclist} as these are macros.}
-%
+% \changes{v2.2r}{2022/02/20}{use \cs{text_lowercase:n}}%
% And whilst we're doing things with uc/lc tables, here are two
% commands to upper- and lower-case a string.
%
@@ -1051,7 +1055,18 @@
% mathematics, environment names, labels, etc. A much better
% long-term solution is to use all-caps fonts, but these aren't
% generally available.
+%
+% Two wrappers around the L3 case changing functions.
+% |\protected| to make them mostly safe as replacements for |uppercase|
+% and |\lowercase|.
% \begin{macrocode}
+\ExplSyntaxOn
+\protected\def\@expl@text@lowercase@@n{\text_lowercase:n}
+\protected\def\@expl@text@uppercase@@n{\text_uppercase:n}
+\ExplSyntaxOff
+% \end{macrocode}
+
+%% \begin{macrocode}
\DeclareRobustCommand{\MakeUppercase}[1]{{%
\def\i{I}\def\j{J}%
\def\reserved@a##1##2{\let##1##2\reserved@a}%
@@ -1059,20 +1074,16 @@
% \end{macrocode}
% Tell UTF-8 processing to process chars even though we are in an \cs{protected@edef}.
% \changes{v2.1h}{2019/09/14}{Expand UTF8 chars when case changing (github/177)}
+% \changes{v2.2r}{2022/02/20}
+% {Use \cs{@expl@text@uppercase@@n}, removing local redefinition of \cs{UTF@two@octets@noexpand}}%
% \begin{macrocode}
- \let\UTF@two@octets@noexpand\@empty
- \let\UTF@three@octets@noexpand\@empty
- \let\UTF@four@octets@noexpand\@empty
- \protected@edef\reserved@a{\uppercase{#1}}%
+ \protected@edef\reserved@a{\@expl@text@uppercase@@n{#1}}%
\reserved@a
}}
\DeclareRobustCommand{\MakeLowercase}[1]{{%
\def\reserved@a##1##2{\let##2##1\reserved@a}%
\expandafter\reserved@a\@uclclist\reserved@b{\reserved@b\@gobble}%
- \let\UTF@two@octets@noexpand\@empty
- \let\UTF@three@octets@noexpand\@empty
- \let\UTF@four@octets@noexpand\@empty
- \protected@edef\reserved@a{\lowercase{#1}}%
+ \protected@edef\reserved@a{\@expl@text@lowercase@@n{#1}}%
\reserved@a
}}
% \end{macrocode}
@@ -1108,6 +1119,9 @@
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \changes{v1.0h}{1994/05/13}{Added output enc stuff}
% \changes{v1.0i}{1994/05/16}{moved output enc stuff to lfonts}
diff --git a/macros/latex-dev/base/lthooks-code.pdf b/macros/latex-dev/base/lthooks-code.pdf
index a4b7ca6c7d..41ad4ad269 100644
--- a/macros/latex-dev/base/lthooks-code.pdf
+++ b/macros/latex-dev/base/lthooks-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lthooks-doc.pdf b/macros/latex-dev/base/lthooks-doc.pdf
index 94156c25b5..9c58a21a15 100644
--- a/macros/latex-dev/base/lthooks-doc.pdf
+++ b/macros/latex-dev/base/lthooks-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltkeys.dtx b/macros/latex-dev/base/ltkeys.dtx
index 0ff3d9cfa3..c606d8284d 100644
--- a/macros/latex-dev/base/ltkeys.dtx
+++ b/macros/latex-dev/base/ltkeys.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltkeys.dtx}
- [2022/02/04 v1.0b LaTeX Kernel (Kevyal options)]
+ [2022/02/21 v1.0e LaTeX Kernel (Kevyal options)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{ltkeys.dtx}
@@ -103,6 +103,17 @@
% \cs{ProcessKeyOptions}/\cs{ProcessKeyPackageOptions} act as package options.
% \end{function}
%
+% \begin{function}{\DeclareUnknownKeyHandler}
+% \begin{syntax}
+% \cs{DeclareUnknownKeyHandler} \oarg{family} \marg{code}
+% \end{syntax}
+% The function \cs{DeclareUnknownKeyHandler} may be used to define
+% the behavior when an undefined key is encountered. The \meta{code}
+% will receive the unknown key name as |#1| and the value as |#2|.
+% These can then be processed as appropriate, e.g.~by forwarding
+% to another package.
+% \end{function}
+%
% \begin{function}{\ProcessKeyOptions}
% \begin{syntax}
% \cs{ProcessKeyOptions} \oarg{family}
@@ -153,6 +164,10 @@
% \subsection{Key properties}
%
% \begin{macro}{.code, .if, .store, .usage}
+% \changes{v1.0b}{2022/02/05}
+% {Create properties in \texttt{ltlkeys}}
+% \changes{v1.0c}{2022/02/07}
+% {Correct \texttt.{.code} property}
% \begin{macrocode}
\group_begin:
\cs_set_protected:Npn \@@_tmp:nn #1#2
@@ -164,7 +179,7 @@
\@@_tmp:nn
}
\@@_tmp:nn
- { code } { code }
+ { code:n } { code }
{ legacy_if_set:n } { if }
{ tl_set:N } { store }
{ usage:n } { usage }
@@ -196,7 +211,8 @@
% \end{macrocode}
% \end{variable}
%
-% \begin{macro}{\@@_options:Nn, \@@_options:NV}
+% \begin{macro}{\@@_options:Nn}
+% \begin{macro}{\@@_options:nN}
% \changes{v1.0b}{2022/01/15}
% {Clear option list in end-of-package hook}
% \begin{macro}{\@@_options_end:}
@@ -211,15 +227,17 @@
% in all cases.
% \begin{macrocode}
\cs_new_protected:Npn \@@_options:Nn #1#2
+ { \@@_options_expand_module:Nn \@@_options:nN {#2} #1 }
+\cs_new_protected:Npn \@@_options:nN #1#2
{
- \cs_gset_nopar:cpn { opt@fam@\@currname.\@currext } {#2}
+ \cs_gset_nopar:cpn { opt@fam@\@currname.\@currext } {#1}
\cs_set_protected:Npn \@@_option_end: { }
\clist_clear:N \l_@@_options_clist
- \@@_options_global:Nn #1 {#2}
+ \@@_options_global:Nn #2 {#1}
\@@_options_local:
- \keys_if_exist:nnF {#2} { unknown }
+ \keys_if_exist:nnF {#1} { unknown }
{
- \keys_define:nn {#2}
+ \keys_define:nn {#1}
{
unknown .code:n =
{
@@ -228,16 +246,15 @@
}
}
\cs_set_protected:Npn \@@_option_end:
- { \keys_define:nn {#2} { unknown .undefine: } }
+ { \keys_define:nn {#1} { unknown .undefine: } }
}
\bool_set_true:N \l_@@_options_loading_bool
- \keys_set:nV {#2} \l_@@_options_clist
+ \keys_set:nV {#1} \l_@@_options_clist
\bool_set_false:N \l_@@_options_loading_bool
\AtEndOfPackage { \cs_set_eq:NN \@unprocessedoptions \scan_stop: }
\@@_option_end:
- \@@_options_loaded:n {#2}
+ \@@_options_loaded:n {#1}
}
-\cs_generate_variant:Nn \@@_options:Nn { NV }
\msg_new:nnnn { keys } { option-unknown }
{ Unknown~option~'#1'~for~package~#2. }
{
@@ -247,6 +264,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_global:Nn}
% Global (class) options are handled differently for \LaTeXe{} packages
@@ -355,38 +373,72 @@
%
% \subsection{The document interfaces}
%
+% \begin{macrocode}
+\cs_generate_variant:Nn \keys_define:nn { nx }
+% \end{macrocode}
+%
+% \begin{macro}{\@@_options_expand_module:Nn}
+% \changes{v1.0e}{2022/02/21}
+% {Faster approach to module expansion}
+% \begin{macro}{\@@_options_expand_module:nN}
+% To deal with active characters inside the module argument whilst also
+% expanding that argument, we use a combination of \texttt{c}- and
+% \texttt{f}-type expansion. This works as the definitions for active
+% UTF-8 bytes contain an \cs{ifincsname} test.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_options_expand_module:Nn #1#2
+ {
+ \cs:w @@_options_expand_module:nN \use:e { \cs_end: {#2} } #1
+ }
+\cs_new_protected:Npn \@@_options_expand_module:nN #1#2
+ { #2 {#1} }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
% \begin{macro}{\DeclareKeys}
+% \changes{v1.0c}{2022/02/15}{Expand module argument}
+% \changes{v1.0d}{2022/02/16}{Allow for active characters in module argument}
% Defining key options is quite straight-forward: we have an intermediate
% function to allow for potential set-up steps.
% \begin{macrocode}
-\NewDocumentCommand \DeclareKeys { o +m }
+\NewDocumentCommand \DeclareKeys { O { \@currname } +m }
+ { \@@_options_expand_module:Nn \keys_define:nn {#1} {#2} }
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\DeclareUnknownKeyHandler}
+% \changes{v1.0c}{2022/02/15}{Added \cs{DeclareUnknownKeysHandler}}
+% \changes{v1.0d}{2022/02/16}{Allow for active characters in module argument}
+% \changes{v1.0d}{2022/02/16}
+% {Rename \cs{DeclareUnknownKeysHandler} to \cs{DeclareUnknownKeyHandler}}
+% \begin{macrocode}
+\NewDocumentCommand \DeclareUnknownKeyHandler { O { \@currname } +m }
{
- \IfNoValueTF {#1}
- { \exp_args:NV \keys_define:nn \@currname }
- { \keys_define:nn {#1} }
- {#2}
+ \cs_set_protected:cpn { @@_unknown_handler_ #1 :nn } ##1##2 {#2}
+ \@@_options_expand_module:Nn \keys_define:nx {#1}
+ {
+ unknown .code:n =
+ \exp_not:N \exp_args:NV
+ \exp_not:c { @@_unknown_handler_ #1 :nn }
+ \exp_not:N \l_keys_key_str {####1}
+ }
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\ProcessKeyOptions, \ProcessKeyPackageOptions}
+% \changes{v1.0c}{2022/02/15}{Expand module argument}
+% \changes{v1.0d}{2022/02/16}{Allow for active characters in module argument}
% We need to deal with the older interface from \pkg{l3keys2e} here: it had
% a mandatory argument. We can mop that up using a look-ahead, and then
% exploit that information to determine whether the package option handling
% is set up for the new approach for clash handling.
% \begin{macrocode}
-\NewDocumentCommand \ProcessKeyOptions { o }
- {
- \IfNoValueTF {#1}
- { \@@_options:NV \c_true_bool \@currname }
- { \@@_options:Nn \c_true_bool {#1} }
- }
-\NewDocumentCommand \ProcessKeyPackageOptions { o }
- {
- \IfNoValueTF {#1}
- { \@@_options:NV \c_false_bool \@currname }
- { \@@_options:Nn \c_false_bool {#1} }
- }
+\NewDocumentCommand \ProcessKeyOptions { O { \@currname } }
+ { \@@_options:Nn \c_true_bool {#1} }
+\NewDocumentCommand \ProcessKeyPackageOptions { O { \@currname } }
+ { \@@_options:Nn \c_false_bool {#1} }
\@onlypreamble \ProcessKeyOptions
\@onlypreamble \ProcessKeyPackageOptions
% \end{macrocode}
@@ -462,15 +514,12 @@
% \subsection{General key setting}
%
% \begin{macro}{\SetKeys}
+% \changes{v1.0c}{2022/02/15}{Expand module argument}
+% \changes{v1.0d}{2022/02/16}{Allow for active characters in module argument}
% A simple wrapper.
% \begin{macrocode}
-\NewDocumentCommand \SetKeys { o +m }
- {
- \IfNoValueTF {#1}
- { \keys_set:Vn \@currname }
- { \keys_set:nn {#1} }
- {#2}
- }
+\NewDocumentCommand \SetKeys { O { \@currname } +m }
+ { \@@_options_expand_module:Nn \keys_set:nn {#1} {#2} }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/ltluatex.pdf b/macros/latex-dev/base/ltluatex.pdf
index 7e4f07d3bb..819c98563f 100644
--- a/macros/latex-dev/base/ltluatex.pdf
+++ b/macros/latex-dev/base/ltluatex.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews.pdf b/macros/latex-dev/base/ltnews.pdf
index 628393f727..b841c40b85 100644
--- a/macros/latex-dev/base/ltnews.pdf
+++ b/macros/latex-dev/base/ltnews.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews01.pdf b/macros/latex-dev/base/ltnews01.pdf
index dd2500ff78..ae346eb39f 100644
--- a/macros/latex-dev/base/ltnews01.pdf
+++ b/macros/latex-dev/base/ltnews01.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews02.pdf b/macros/latex-dev/base/ltnews02.pdf
index 6f416864b1..103776ed43 100644
--- a/macros/latex-dev/base/ltnews02.pdf
+++ b/macros/latex-dev/base/ltnews02.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews03.pdf b/macros/latex-dev/base/ltnews03.pdf
index 50442a37c6..06119e7712 100644
--- a/macros/latex-dev/base/ltnews03.pdf
+++ b/macros/latex-dev/base/ltnews03.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews04.pdf b/macros/latex-dev/base/ltnews04.pdf
index d532b318b1..2d752b5815 100644
--- a/macros/latex-dev/base/ltnews04.pdf
+++ b/macros/latex-dev/base/ltnews04.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews05.pdf b/macros/latex-dev/base/ltnews05.pdf
index 2de0565e99..dc337c3faa 100644
--- a/macros/latex-dev/base/ltnews05.pdf
+++ b/macros/latex-dev/base/ltnews05.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews06.pdf b/macros/latex-dev/base/ltnews06.pdf
index 46d4be0fcc..87816972de 100644
--- a/macros/latex-dev/base/ltnews06.pdf
+++ b/macros/latex-dev/base/ltnews06.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews07.pdf b/macros/latex-dev/base/ltnews07.pdf
index a4783c5844..e8992a1f63 100644
--- a/macros/latex-dev/base/ltnews07.pdf
+++ b/macros/latex-dev/base/ltnews07.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews08.pdf b/macros/latex-dev/base/ltnews08.pdf
index 47223098d7..8318a2ae51 100644
--- a/macros/latex-dev/base/ltnews08.pdf
+++ b/macros/latex-dev/base/ltnews08.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews09.pdf b/macros/latex-dev/base/ltnews09.pdf
index b5978dba84..5388d757e3 100644
--- a/macros/latex-dev/base/ltnews09.pdf
+++ b/macros/latex-dev/base/ltnews09.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews10.pdf b/macros/latex-dev/base/ltnews10.pdf
index b4a88ee9d5..628b86746c 100644
--- a/macros/latex-dev/base/ltnews10.pdf
+++ b/macros/latex-dev/base/ltnews10.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews11.pdf b/macros/latex-dev/base/ltnews11.pdf
index 6f5c117b22..a37246fb94 100644
--- a/macros/latex-dev/base/ltnews11.pdf
+++ b/macros/latex-dev/base/ltnews11.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews12.pdf b/macros/latex-dev/base/ltnews12.pdf
index 73ef1dcb79..2e38696a7e 100644
--- a/macros/latex-dev/base/ltnews12.pdf
+++ b/macros/latex-dev/base/ltnews12.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews13.pdf b/macros/latex-dev/base/ltnews13.pdf
index a6c3c88fde..4a04a54aa9 100644
--- a/macros/latex-dev/base/ltnews13.pdf
+++ b/macros/latex-dev/base/ltnews13.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews14.pdf b/macros/latex-dev/base/ltnews14.pdf
index 0662b70afe..7ef8a64932 100644
--- a/macros/latex-dev/base/ltnews14.pdf
+++ b/macros/latex-dev/base/ltnews14.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews15.pdf b/macros/latex-dev/base/ltnews15.pdf
index 2049e1cde6..a4aa674bb8 100644
--- a/macros/latex-dev/base/ltnews15.pdf
+++ b/macros/latex-dev/base/ltnews15.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews16.pdf b/macros/latex-dev/base/ltnews16.pdf
index b3073b168d..d243dc4e78 100644
--- a/macros/latex-dev/base/ltnews16.pdf
+++ b/macros/latex-dev/base/ltnews16.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews17.pdf b/macros/latex-dev/base/ltnews17.pdf
index 306a567782..018b605443 100644
--- a/macros/latex-dev/base/ltnews17.pdf
+++ b/macros/latex-dev/base/ltnews17.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews18.pdf b/macros/latex-dev/base/ltnews18.pdf
index 6b4b445c08..912c134dfa 100644
--- a/macros/latex-dev/base/ltnews18.pdf
+++ b/macros/latex-dev/base/ltnews18.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews19.pdf b/macros/latex-dev/base/ltnews19.pdf
index 551ee12be4..4821f6f528 100644
--- a/macros/latex-dev/base/ltnews19.pdf
+++ b/macros/latex-dev/base/ltnews19.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews20.pdf b/macros/latex-dev/base/ltnews20.pdf
index e0b015c09e..1a198102ad 100644
--- a/macros/latex-dev/base/ltnews20.pdf
+++ b/macros/latex-dev/base/ltnews20.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews21.pdf b/macros/latex-dev/base/ltnews21.pdf
index 9ad04a02c5..5c8dcdbf48 100644
--- a/macros/latex-dev/base/ltnews21.pdf
+++ b/macros/latex-dev/base/ltnews21.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews22.pdf b/macros/latex-dev/base/ltnews22.pdf
index 96543a8e39..86b9829d51 100644
--- a/macros/latex-dev/base/ltnews22.pdf
+++ b/macros/latex-dev/base/ltnews22.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews23.pdf b/macros/latex-dev/base/ltnews23.pdf
index f82c5e1aba..d13112eab4 100644
--- a/macros/latex-dev/base/ltnews23.pdf
+++ b/macros/latex-dev/base/ltnews23.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews24.pdf b/macros/latex-dev/base/ltnews24.pdf
index 1eeeb95b92..d33dc9585b 100644
--- a/macros/latex-dev/base/ltnews24.pdf
+++ b/macros/latex-dev/base/ltnews24.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews25.pdf b/macros/latex-dev/base/ltnews25.pdf
index eef51d2b0a..4779fd294e 100644
--- a/macros/latex-dev/base/ltnews25.pdf
+++ b/macros/latex-dev/base/ltnews25.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews26.pdf b/macros/latex-dev/base/ltnews26.pdf
index 98b38ea900..0de0ca04fa 100644
--- a/macros/latex-dev/base/ltnews26.pdf
+++ b/macros/latex-dev/base/ltnews26.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews27.pdf b/macros/latex-dev/base/ltnews27.pdf
index df69fd7649..a395576c01 100644
--- a/macros/latex-dev/base/ltnews27.pdf
+++ b/macros/latex-dev/base/ltnews27.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews28.pdf b/macros/latex-dev/base/ltnews28.pdf
index 7d0afe54d9..1bbcb49c28 100644
--- a/macros/latex-dev/base/ltnews28.pdf
+++ b/macros/latex-dev/base/ltnews28.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews29.pdf b/macros/latex-dev/base/ltnews29.pdf
index 1ef4e3ce57..584d2f88c1 100644
--- a/macros/latex-dev/base/ltnews29.pdf
+++ b/macros/latex-dev/base/ltnews29.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews30.pdf b/macros/latex-dev/base/ltnews30.pdf
index b9955d97fc..543b322d65 100644
--- a/macros/latex-dev/base/ltnews30.pdf
+++ b/macros/latex-dev/base/ltnews30.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews31.pdf b/macros/latex-dev/base/ltnews31.pdf
index 466e2bcf9f..6a97e28863 100644
--- a/macros/latex-dev/base/ltnews31.pdf
+++ b/macros/latex-dev/base/ltnews31.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews32.pdf b/macros/latex-dev/base/ltnews32.pdf
index f99da0ca4c..bf985ad362 100644
--- a/macros/latex-dev/base/ltnews32.pdf
+++ b/macros/latex-dev/base/ltnews32.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews33.pdf b/macros/latex-dev/base/ltnews33.pdf
index 176ced9da8..4825971649 100644
--- a/macros/latex-dev/base/ltnews33.pdf
+++ b/macros/latex-dev/base/ltnews33.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews34.pdf b/macros/latex-dev/base/ltnews34.pdf
index bc02bb3bf1..d2c0df1bd0 100644
--- a/macros/latex-dev/base/ltnews34.pdf
+++ b/macros/latex-dev/base/ltnews34.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews35.pdf b/macros/latex-dev/base/ltnews35.pdf
index 045089749a..34695cb058 100644
--- a/macros/latex-dev/base/ltnews35.pdf
+++ b/macros/latex-dev/base/ltnews35.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews35.tex b/macros/latex-dev/base/ltnews35.tex
index e798d4c2e4..671d6d337a 100644
--- a/macros/latex-dev/base/ltnews35.tex
+++ b/macros/latex-dev/base/ltnews35.tex
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright 2019-2021
+% Copyright 2021-2022
% The LaTeX Project and any individual authors listed elsewhere
% in this file.
%
@@ -186,14 +186,44 @@ and also in the documentation of the \pkg{pdfmanagement-testphase} package.
\section{The \pkg{latex-lab} bundle}
-\emph{write about it}
+We added a new \pkg{latex-lab}oratory bundle in which we place new
+code that is going to be available only through a
+\cs{DocumentMetadata} declaration and that is\Dash most
+importantly\Dash work under development and subject to
+change without further notice. This means, that commands and interfaces provided there may
+get altered or removed again after some public testing. The code can
+be accessed through the \cs{DocumentMetadata} key \texttt{testphase}.
+Currently supported values are \texttt{phase-I} and \texttt{phase-II}
+that enable code of the tagged PDF project (phase-I is frozen and
+phase-II the phase we are currently working on). With
+\begin{verbatim}
+\DocumentMetadata{testphase=phase-II}
+\end{verbatim}
+you currently enable tagging for paragraphs and footnotes, more
+document elements will follow soon.
+
+For more detailed testing it is also possible to pass other values to
+\texttt{testphase}, for example, the first incarnation of a template
+design interface based on \pkg{l3keys} can be accessed through the
+value \texttt{prototype}, thus
+\begin{verbatim}
+\DocumentMetadata{testphase={phase-II,prototype}}
+\end{verbatim}
+will enable all of phase-II plus the draft template interface (which
+is not yet integrated in phase-II).
+
+Eventually, code will move (once considered stable) from the
+testphase into the \LaTeX{} kernel itself. Tagging will continue to
+require a \cs{DocumentMetadata} declaration, but you will then be able
+to drop the \texttt{testphase} key setting.
+
\section{New or improved commands}
-\subsection{A kevyal approach to option handling}
+\subsection{A keyval approach to option handling}
The classical \LaTeXe{} method for handling options, using \cs{ProcessOptions},
treats each entry in the list as a string. Many package authors have sought to
@@ -217,7 +247,7 @@ unless explicitly given as an optional argument.
A version which does not consider global options,
\cs{ProcessKeyPackageOptions}, is also available.
-To support creating key options in for this mechanism, the new command
+To support creating key options for this mechanism, the new command
\cs{DeclareKeys} has been added. This works using the same general
approach as \pkg{l3keys} or \pkg{pgfkeys}: each key has one or more
\emph{properties} which define its behavior.
@@ -315,19 +345,80 @@ layer)) which was also used in the example above.
\githubissue{735}
+\subsection{Testing for (nearly) empty arguments}
+%
+In addition to \cs{IfNoValueTF} to test if an optional argument was
+provided or not, there is now also \cs{IfBlankTF}, which tests if the
+argument is empty or contains only blanks. Based on the result it
+selects a true or false code branch. As usual, the variants
+\cs{IfBlankT} and \cs{IfBlankF} are also provided for use when only one
+branch leads to some action. Further details and examples are given
+in \file{usrguide3.pdf}.
+
+This test can also be useful if you set up key/value options and want
+to test if a key was specified without giving a value or through
+specifying \enquote{\textit{key}\texttt{ = ,}}.
+
+
+\subsection{Better allocator for Lua command ids}
+
+In \LuaTeX\ we already had the \cs{newluafunction} macro which allocates
+a Lua function identifier which can be used to define commands
+with \cs{luadef}. But this always required two steps: \cs{newluafunction}
+defines the passed control sequence as an integer, which then has to be used
+to define the actual Lua command with \cs{luadef}. After that, the integer is
+no longer needed. This was inconsistent with other allocators. Therefore we
+added two new allocators \cs{newluacmd} and \cs{newexpandableluacmd} which
+directly define a control sequences invoking the allocated Lua function.
+The first one defines a non-expandable Lua command, the second one an expandable
+one. Of course, the associated Lua function still has to be defined by assigning
+a function to the \verb|lua.get_functions_table()| table. The required index is
+available in \cs{allocationnumber}.
+
+An example could be
+\begin{verbatim}
+\newluacmd \greeting
+\directlua {
+lua.get_functions_table()
+ [tex.count.allocationnumber]
+ = function()
+ local name = token.scan_argument()
+ tex.sprint('Hello ', name, '!')
+ end
+}
-\subsection{???}
+\greeting{world}
+\end{verbatim}
%
-\githubissue{???}
+\githubissue{536}
+
+
+
\section{Code improvements}
+\subsection{\cs{protected} UTF-8 character definitions}
+The characters defined via \file{utf8.def} are now defined as \cs{protected}
+macros. This makes them safe to use in expansion contexts where the
+classic \cs{protect} mechanism is not enabled, notably L3 programming
+layer \texttt{e} and \texttt{x} arguments.
+
+Related to this change \cs{MakeUppercase} and \cs{MakeLowercase} have
+been updated to use the Unicode-aware case changing functions
+\cs{text\string_lowercase:n} in place of the \TeX-primitive \cs{lowercase}.
+A similar change will be made in the \pkg{textcase} package.
+
+Note for technical reasons these low level character handling changes
+will not be rolled back if the format version is rolled back using the
+\pkg{latexrelease} package rollback mechanism.
+%
+\githubissue{780}
\subsection{A small update to \cs{obeylines} and \cs{obeyspaces}}
The plain \TeX{} versions of \cs{obeylines} and \cs{obeyspaces} make
-\verb=^^M= and \verb*= = active and force them to execute \cs{par}
+\verb=^^M= and \verb*= = active and force them to execute \cs{par} %*
and \cs{space}, respectively. Don Knuth makes a remark in the \TeX{}book
that one can then use a trick such as
\begin{verbatim}
@@ -445,7 +536,7 @@ displaying different data in the footer line on recto and verso pages.
\subsection{Croatian character support}
The default \pkg{inputenc} support has been extended to support the 9 characters
-D\v Z, D\v z, d\v z, LJ, Lj, lj, NJ, Nj, nj, input as single UTF-8 codepoints
+D\v Z, D\v z, d\v z, LJ, Lj, lj, NJ, Nj, nj, input as single UTF-8 code points
in the range U+01C4 to U+01CC.
%
\githubissue{gh/723}
@@ -455,7 +546,7 @@ in the range U+01C4 to U+01CC.
When declaring encoding specific commands for the Unicode (TU)
encoding some declarations (e.g., \cs{DeclareUnicodeComposite}) do not
-have an explicit argument for the the encoding name, but instead use
+have an explicit argument for the encoding name, but instead use
the command \cs{UnicodeEncodingName} internally. There was one
exception though: \cs{DeclareUnicodeAccent} required an explicit
encoding argument. This inconsistency has now been removed and the
@@ -474,10 +565,6 @@ argument as their general purpose counterparts do.
-\subsection{???}
-%
-\githubissue{???}
-
\section{Bug fixes}
@@ -503,6 +590,21 @@ is now fixed.
+\subsection{Make \cs{cite}\texttt{\textbraceleft\textbraceright} produce a warning}
+
+When the \cs{cite} command can't resolve a citation label it issue a
+warning \enquote{Citation `\meta{label}' on page \meta{page}
+ undefined}. However, due to some implementation details a completely
+empty argument was always silently accepted. Given that there are probably
+people who write \verb=\cite{}= with the intention to fill in the
+correct label later it is rather unfortunate if that is not generating
+a warning that something in the document is still amiss.
+This has finally been corrected and a warning is now generated also in this case.
+%
+\githubissue{790}
+
+
+
\section{Changes to packages in the \pkg{amsmath} category}
@@ -512,7 +614,7 @@ is now fixed.
The package \pkg{amsopn} used to define \cs{operator@font} but this
command is already provided by the \LaTeX{} format (for at least 14
years). As a result the definition in \pkg{amsopn} is equivalent to a
-reset to the kernel definition, which is unnecessary and suprising if
+reset to the kernel definition, which is unnecessary and surprising if
you alter the math setup (e.g., by loading a package) and at a later
stage add \pkg{amsmath}, which then undoes part of your setup. For
this reason the definition was taken out and
@@ -528,9 +630,15 @@ after loading the package.
%
\githubissue{734}
-\subsection{???}
+\subsection{\pkg{amsmath} Error in \cs{shoveleft}}
+
+If \cs{shoveleft} started out with the words \enquote{plus} or
+\enquote{minus} it was misunderstood as part of a rubber length and
+led either to an error or was swallowed without trace. By adding a
+\cs{relax} this erroneous scanning into the argument of \cs{shoveleft}
+is now prevented.
%
-\githubissue{???}
+\githubissue{714}
\section{Changes to packages in the \pkg{graphics} category}
@@ -576,9 +684,19 @@ This command is \emph{only} allowed in formulas.
For details and further examples, see \file{mathcolor.pdf}.
-\subsection{???}
+\subsection{Fix locating files with \cs{graphicspath}}
%
-\githubissue{???}
+
+If a call to \cs{includegraphics} asked for a file (say, \file{image})
+without extension, and if both \file{A/image.pdf} and \file{B/image.tex}
+existed (both \file{A/} and \file{B/} in \cs{graphicspath}, but neither
+in a folder searched by kpse), then \file{A/image.pdf} would not be
+found, and a \enquote{file not found} error would be incorrectly thrown.
+The issue is now fixed and the graphics file is correctly found.
+%
+\githubissue{776}
+\sxissue{q/630167}
+
diff --git a/macros/latex-dev/base/ltpara-code.pdf b/macros/latex-dev/base/ltpara-code.pdf
index ff766c2947..1447a6bfa8 100644
--- a/macros/latex-dev/base/ltpara-code.pdf
+++ b/macros/latex-dev/base/ltpara-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltpara-doc.pdf b/macros/latex-dev/base/ltpara-doc.pdf
index cf0795adb8..11c181ecaa 100644
--- a/macros/latex-dev/base/ltpara-doc.pdf
+++ b/macros/latex-dev/base/ltpara-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltshipout-code.pdf b/macros/latex-dev/base/ltshipout-code.pdf
index a650b930de..fe21c18e00 100644
--- a/macros/latex-dev/base/ltshipout-code.pdf
+++ b/macros/latex-dev/base/ltshipout-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltshipout-doc.pdf b/macros/latex-dev/base/ltshipout-doc.pdf
index cc986f8a19..7ce31427b4 100644
--- a/macros/latex-dev/base/ltshipout-doc.pdf
+++ b/macros/latex-dev/base/ltshipout-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltvers.dtx b/macros/latex-dev/base/ltvers.dtx
index 0bf753f210..e46851de01 100644
--- a/macros/latex-dev/base/ltvers.dtx
+++ b/macros/latex-dev/base/ltvers.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltvers.dtx}
- [2021/08/10 v1.1h LaTeX Kernel (Version Info)]
+ [2022/02/28 v1.1i LaTeX Kernel (Version Info)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltvers.dtx}
@@ -115,7 +115,7 @@
{2022-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{-2}
+\def\patch@level{-3}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
@@ -365,6 +365,8 @@
% \changes{v1.1f}{2021/03/18}{Added \cs{NewModuleRelease}.}
% \changes{v1.1g}{2021/04/16}
% {\cs{NewModuleRelease} with the same arguments as \cs{IncludeInRelease}.}
+% \changes{v1.1i}{2022/02/28}
+% {Detect a missing \cs{IncludeInRelease}\texttt{\{0000/00/00\}}.}
% \begin{macrocode}
\let\if@skipping@module\iffalse
\def\@skipping@moduletrue{\let\if@skipping@module\iftrue}
@@ -379,7 +381,7 @@
\GenericInfo{}{BEGIN module: \new@modulename\space (\new@moduledate)}%
\GenericInfo{}{ \@spaces\@spaces\@spaces\space#3\@gobble}%
\ifnum\sourceLaTeXdate<%
- \expandafter\@parse@version\new@moduledate//00\@nil\relax
+ \expandafter\@parse@version\new@moduledate//00\@nil\relax
\ifnum\expandafter\@parse@version\fmtversion//00\@nil<%
\expandafter\@parse@version\new@moduledate//00\@nil\relax
\GenericInfo{}{Skipping module \new@modulename}%
@@ -394,7 +396,19 @@
\@skipping@moduletrue
\expandafter\new@module@skip
\fi}
-\long\def\new@module@skip#1\IncludeInRelease{\IncludeInRelease}
+\long\def\new@module@skip#1\IncludeInRelease{%
+ \long\def\reserved@a##1\EndModuleRelease{}%
+ \if\relax\detokenize\expandafter{\reserved@a#1{}{}\EndModuleRelease}\relax
+ \else
+ \@latex@error{Missing mandatory \string\IncludeInRelease{0000/00/00}}\@ehc
+ \expandafter\@secondoftwo
+ \fi
+ \@gobble
+ {\@expandtwoargs\IncludeInRelease
+ {0000/00/00}{\new@modulename}%
+ {ERROR! Emergency recovery}%
+ #1}%
+ \IncludeInRelease}
\def\EndModuleRelease{%
\ifx\new@modulename\@empty
\@latex@error{Extra \string\EndModuleRelease.}\@eha
diff --git a/macros/latex-dev/base/ltx3info.pdf b/macros/latex-dev/base/ltx3info.pdf
index 9c8852094d..372a87f113 100644
--- a/macros/latex-dev/base/ltx3info.pdf
+++ b/macros/latex-dev/base/ltx3info.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltxdoc.pdf b/macros/latex-dev/base/ltxdoc.pdf
index 1889d2644c..b2a6e7ec7f 100644
--- a/macros/latex-dev/base/ltxdoc.pdf
+++ b/macros/latex-dev/base/ltxdoc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/makeindx.pdf b/macros/latex-dev/base/makeindx.pdf
index 2c0af1153a..82ecf21cf9 100644
--- a/macros/latex-dev/base/makeindx.pdf
+++ b/macros/latex-dev/base/makeindx.pdf
Binary files differ
diff --git a/macros/latex-dev/base/modguide.pdf b/macros/latex-dev/base/modguide.pdf
index 25abeace24..884f6e754d 100644
--- a/macros/latex-dev/base/modguide.pdf
+++ b/macros/latex-dev/base/modguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/nfssfont.pdf b/macros/latex-dev/base/nfssfont.pdf
index c8702a68de..edcf7dc43f 100644
--- a/macros/latex-dev/base/nfssfont.pdf
+++ b/macros/latex-dev/base/nfssfont.pdf
Binary files differ
diff --git a/macros/latex-dev/base/proc.pdf b/macros/latex-dev/base/proc.pdf
index 575422342c..927dd76514 100644
--- a/macros/latex-dev/base/proc.pdf
+++ b/macros/latex-dev/base/proc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/slides.pdf b/macros/latex-dev/base/slides.pdf
index 52546f7385..0b519f6511 100644
--- a/macros/latex-dev/base/slides.pdf
+++ b/macros/latex-dev/base/slides.pdf
Binary files differ
diff --git a/macros/latex-dev/base/slifonts.pdf b/macros/latex-dev/base/slifonts.pdf
index 624a5b5123..76dd3c9655 100644
--- a/macros/latex-dev/base/slifonts.pdf
+++ b/macros/latex-dev/base/slifonts.pdf
Binary files differ
diff --git a/macros/latex-dev/base/source2e.pdf b/macros/latex-dev/base/source2e.pdf
index c9f5168a05..88211e8807 100644
--- a/macros/latex-dev/base/source2e.pdf
+++ b/macros/latex-dev/base/source2e.pdf
Binary files differ
diff --git a/macros/latex-dev/base/syntonly.pdf b/macros/latex-dev/base/syntonly.pdf
index 3f14932015..7298566aea 100644
--- a/macros/latex-dev/base/syntonly.pdf
+++ b/macros/latex-dev/base/syntonly.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tlc2.pdf b/macros/latex-dev/base/tlc2.pdf
index c9c761680e..f4d49885f2 100644
--- a/macros/latex-dev/base/tlc2.pdf
+++ b/macros/latex-dev/base/tlc2.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tulm.pdf b/macros/latex-dev/base/tulm.pdf
index 4aac3efb42..929194014a 100644
--- a/macros/latex-dev/base/tulm.pdf
+++ b/macros/latex-dev/base/tulm.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide.pdf b/macros/latex-dev/base/usrguide.pdf
index fe712da807..5975d1567f 100644
--- a/macros/latex-dev/base/usrguide.pdf
+++ b/macros/latex-dev/base/usrguide.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide3.pdf b/macros/latex-dev/base/usrguide3.pdf
index 5e0cd66224..a15d3c431b 100644
--- a/macros/latex-dev/base/usrguide3.pdf
+++ b/macros/latex-dev/base/usrguide3.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide3.tex b/macros/latex-dev/base/usrguide3.tex
index 249b708943..efec9ad2a2 100644
--- a/macros/latex-dev/base/usrguide3.tex
+++ b/macros/latex-dev/base/usrguide3.tex
@@ -37,7 +37,7 @@
\author{\copyright~Copyright 2020-2022, \LaTeX\ Project Team.\\
All rights reserved.}
-\date{2022-01-03}
+\date{2022-02-19}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -356,6 +356,8 @@ defaults with testing for missing values.
Optional arguments make use of dedicated variables to return information about
the nature of the argument received.
+
+
\begin{decl}
|\IfNoValueTF| \arg{arg} \arg{true code} \arg{false code} \\
|\IfNoValueT| \arg{arg} \arg{true code} \\
@@ -391,11 +393,12 @@ will be logically \texttt{false}.
When two optional arguments follow each other (a syntax we typically
discourage), it can make sense to allow users of the command to
specify only the second argument by providing an empty first
-argument. Rather than testing separately for emptiness and for
+argument.
+\NEWdescription{2022/06/01}
+Rather than testing separately for emptiness and for
|-NoValue-| it is then best to use the argument type~|O| with an
-empty default value, and simply test for emptiness using the
-\pkg{expl3} conditional \cs{tl_if_blank:nTF} or its \pkg{etoolbox}
-analogue \cs{ifblank}.
+empty default value, and then test for emptiness using the
+conditional \cs{IfBlankTF} (described below) instead.
\begin{decl}
|\IfValueTF| \arg{arg} \arg{true code} \arg{false code} \\
@@ -406,6 +409,51 @@ The reverse form of the \cs{IfNoValue(TF)} tests are also available
as \cs{IfValue(TF)}. The context will determine which logical
form makes the most sense for a given code scenario.
+
+
+
+
+\begin{decl}[2022/06/01]
+ |\IfBlankTF| \arg{arg} \arg{true code} \arg{false code} \\
+ |\IfBlankT| \arg{arg} \arg{true code} \\
+ |\IfBlankF| \arg{arg} \arg{false code}
+\end{decl}
+
+
+The \cs{IfNoValueTF} command chooses the \meta{true code} if the optional argument has not
+been used at all (and it returns the special \texttt{-NoValue-}
+marker), but not if it has been given an empty value. In contrast
+\cs{IfBlankTF} returns true if its argument is either truly empty or
+only contains one or more normal blanks.
+For example
+\begin{verbatim}
+\NewDocumentCommand\foo{m!o}{\par #1:
+ \IfNoValueTF{#2}{No optional}%
+ {\IfBlankTF{#2}{Blanks in or empty}%
+ {Real content in}}%
+ \space argument!}
+\foo{1}[bar] \foo{2}[ ] \foo{3}[] \foo{4}[\space] \foo{5} [x]
+\end{verbatim}
+results
+in the following output:
+\begin{quote}
+ \NewDocumentCommand\foo{m!o}{\par #1:
+ \IfNoValueTF{#2}{No optional}%
+ {\IfBlankTF{#2}{Blanks in or empty}%
+ {Real content in}}%
+ \space argument!}
+ \foo{1}[bar] \foo{2}[ ] \foo{3}[] \foo{4}[\space] \foo{5} [x]
+\end{quote}
+
+Note that the \cs{space} in (4) is considered real content---because it is
+a command and not a \enquote{space} character---even though it results
+in producing a space. You can also observe in (5) the effect of the
+\texttt{!} specifier, preventing the last \cs{foo}
+from interpreting \texttt{[x]} as its optional argument.
+
+
+
+
\begin{decl}
|\BooleanFalse| \\
|\BooleanTrue|
diff --git a/macros/latex-dev/base/utf8ienc.dtx b/macros/latex-dev/base/utf8ienc.dtx
index a0c96357a0..8789dd35ef 100644
--- a/macros/latex-dev/base/utf8ienc.dtx
+++ b/macros/latex-dev/base/utf8ienc.dtx
@@ -216,7 +216,7 @@
%<+ts1> \ProvidesFile{ts1enc.dfu}
%<+x2> \ProvidesFile{x2enc.dfu}
%<+all> \ProvidesFile{utf8enc.dfu}
-%<-utf8-2018> [2021/12/13 v1.2o UTF-8 support]
+%<-utf8-2018> [2022/02/13 v1.3a UTF-8 support]
% \end{macrocode}
%
% \begin{macrocode}
@@ -363,11 +363,12 @@
% \begin{macro}{\UTFviii@two@octets@noexpand}
% \begin{macro}{\UTFviii@three@octets@noexpand}
% \begin{macro}{\UTFviii@four@octets@noexpand}
+% \changes{v1.3a}{2022/02/19}{Use \cs{unexpanded} rather than \cs{noexpand} so only takes one expansion step}%
% These temporarily prevent the active chars from expanding.
% \begin{macrocode}
-\long\def\UTF@two@octets@noexpand#1#2{\noexpand#2\noexpand}
-\long\def\UTF@three@octets@noexpand#1#2#3{\noexpand#2\noexpand#3\noexpand}
-\long\def\UTF@four@octets@noexpand#1#2#3#4{\noexpand#2\noexpand#3\noexpand#4\noexpand}
+\long\def\UTF@two@octets@noexpand#1#2#3{\unexpanded{#2#3}}
+\long\def\UTF@three@octets@noexpand#1#2#3#4{\unexpanded{#2#3#4}}
+\long\def\UTF@four@octets@noexpand#1#2#3#4#5{\unexpanded{#2#3#4#5}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -376,11 +377,12 @@
% \begin{macro}{\UTFviii@two@octets@string}
% \begin{macro}{\UTFviii@three@octets@string}
% \begin{macro}{\UTFviii@four@octets@string}
+% \changes{v1.3a}{2022/02/19}{Use \cs{detokenize} rather than \cs{string} so only takes one expansion step}%
% And the same with \cs{string} for use in \cs{csname} constructions.
% \begin{macrocode}
-\long\def\UTF@two@octets@string#1#2{\string#2\string}
-\long\def\UTF@three@octets@string#1#2#3{\string#2\string#3\string}
-\long\def\UTF@four@octets@string#1#2#3#4{\string#2\string#3\string#4\string}
+\long\def\UTF@two@octets@string#1#2#3{\detokenize{#2#3}}
+\long\def\UTF@three@octets@string#1#2#3#4{\detokenize{#2#3#4}}
+\long\def\UTF@four@octets@string#1#2#3#4#5{\detokenize{#2#3#4#5}}
% \end{macrocode}
% \end{macro}
% \end{macro}
@@ -542,15 +544,24 @@
% |\count@| and ending at |\@tempcnta|${} - 1$, each time executing
% the code in |\UTFviii@tmp|.
%
-% All this is done in a group so that temporary catcode changes
-% etc.~vanish after everything is set up.
+% Store current settings so can restore after the loops without using a group (gh/762).
+%
+% \begin{macrocode}
+\edef\reserved@a{%
+\catcode`\noexpand\~=\the\catcode`\~\relax
+\catcode`\noexpand\"=\the\catcode`\"\relax
+\uccode`\noexpand\~=\the\uccode`\~\relax
+\count@=\the\count@\relax
+\@tempcnta=\the\@tempcnta\relax
+\let\noexpand\reserved@a\relax}
+% \end{macrocode}
%
% \begin{macrocode}
-\begingroup
\catcode`\~13
\catcode`\"12
% \end{macrocode}
%
+% \changes{v1.3a}{2022/02/19}{Use local protected definitions in the character definitions}%
% \begin{macrocode}
\def\UTFviii@loop{%
\uccode`\~\count@
@@ -566,7 +577,7 @@
% C0 controls are valid UTF-8 but defined to give the ``Character not defined error''
% They may be defined with |\DeclareUnicodeCharacter|.
% \begin{macrocode}
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@undefined@err{:\string~}}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@undefined@err{:\string~}}}
% 0 ^^@ null
\count@"1
\@tempcnta9
@@ -588,7 +599,7 @@
% \begin{macrocode}
\count@"80
\@tempcnta"C2
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@invalid@err\string~}}
\UTFviii@loop
% \end{macrocode}
%
@@ -597,7 +608,7 @@
% \begin{macrocode}
\count@"C2
\@tempcnta"E0
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@two@octets\noexpand~}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@two@octets\noexpand~}}
\UTFviii@loop
% \end{macrocode}
%
@@ -605,7 +616,7 @@
% \begin{macrocode}
\count@"E0
\@tempcnta"F0
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@three@octets\noexpand~}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@three@octets\noexpand~}}
\UTFviii@loop
% \end{macrocode}
%
@@ -614,7 +625,7 @@
% \begin{macrocode}
\count@"F0
\@tempcnta"F5
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@four@octets\noexpand~}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@four@octets\noexpand~}}
\UTFviii@loop
% \end{macrocode}
%
@@ -623,12 +634,13 @@
% \begin{macrocode}
\count@"F5
\@tempcnta"100
- \def\UTFviii@tmp{\xdef~{\noexpand\UTFviii@invalid@err\string~}}
+ \def\UTFviii@tmp{\protected\edef~{\noexpand\UTFviii@invalid@err\string~}}
\UTFviii@loop
% \end{macrocode}
%
+% Restore values after the loops.
% \begin{macrocode}
-\endgroup
+\reserved@a
% \end{macrocode}
%
% \end{macro}
diff --git a/macros/latex-dev/base/utf8ienc.pdf b/macros/latex-dev/base/utf8ienc.pdf
index e60bfe78d6..8f58daf638 100644
--- a/macros/latex-dev/base/utf8ienc.pdf
+++ b/macros/latex-dev/base/utf8ienc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/webcomp.pdf b/macros/latex-dev/base/webcomp.pdf
index 4eee052d2b..e8bd3d23b1 100644
--- a/macros/latex-dev/base/webcomp.pdf
+++ b/macros/latex-dev/base/webcomp.pdf
Binary files differ
diff --git a/macros/latex-dev/required/amsmath/README.md b/macros/latex-dev/required/amsmath/README.md
index 76f27a1df6..2568576a49 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 2022-06-01 pre-release 1
+Release 2022-06-01 pre-release 2
Overview
--------
diff --git a/macros/latex-dev/required/amsmath/amsbsy.pdf b/macros/latex-dev/required/amsmath/amsbsy.pdf
index 4c039491e2..2e7b3dadbc 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 806f589986..6d76336aaa 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 b6bb1a8e96..1cf78ad292 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 a5bf7a8e78..68b317117c 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 d810e921db..52509f9544 100644
--- a/macros/latex-dev/required/amsmath/amsmath.dtx
+++ b/macros/latex-dev/required/amsmath/amsmath.dtx
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2021/10/15 v2.17l AMS math features]
+\ProvidesPackage{amsmath}[2022/02/03 v2.17m AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -6130,15 +6130,16 @@ 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)}
% \begin{macrocode}
\iftagsleft@
- \def\shoveright#1{%
+ \protected\def\shoveright#1{%
#1%
\hfilneg
\hskip\multlinegap
}
\else
- \def\shoveright#1{%
+ \protected\def\shoveright#1{%
#1%
\hfilneg
\iftag@
@@ -6153,12 +6154,14 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\fi
}
\fi
-
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Make \cs{shoveleft} robust (if def is not trival)}
+% \begin{macrocode}
\if@fleqn
\def\shoveleft#1{#1}%
\else
\iftagsleft@
- \def\shoveleft#1{%
+ \protected\def\shoveleft#1{%
\setboxz@h{$\m@th\displaystyle{}#1$}%
\setbox\@ne\hbox{$\m@th\displaystyle#1$}%
\hfilneg
@@ -6173,17 +6176,23 @@ Cannot use `split' here;\MessageBreak trying to recover with `aligned'}%
\hskip\multlinegap
\fi
\hskip.5\wd\@ne
- \hskip-.5\wdz@
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)}
+% \begin{macrocode}
+ \hskip-.5\wdz@ \relax
#1%
}
\else
- \def\shoveleft#1{%
+ \protected\def\shoveleft#1{%
\setboxz@h{$\m@th\displaystyle{}#1$}%
\setbox\@ne\hbox{$\m@th\displaystyle#1$}%
\hfilneg
\hskip\multlinegap
\hskip.5\wd\@ne
- \hskip-.5\wdz@
+% \end{macrocode}
+% \changes{v2.17m}{2022/02/03}{Added missing \cs{relax} for (gh/716)}
+% \begin{macrocode}
+ \hskip-.5\wdz@ \relax
#1%
}
\fi
diff --git a/macros/latex-dev/required/amsmath/amsmath.pdf b/macros/latex-dev/required/amsmath/amsmath.pdf
index 7bafbfe1e7..5aab00bfb1 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.dtx b/macros/latex-dev/required/amsmath/amsopn.dtx
index 20e63b63d7..22801e8cf1 100644
--- a/macros/latex-dev/required/amsmath/amsopn.dtx
+++ b/macros/latex-dev/required/amsmath/amsopn.dtx
@@ -58,7 +58,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must December 1994 or later
-\ProvidesPackage{amsopn}[2021/08/26 v2.02 operator names]
+\ProvidesPackage{amsopn}[2022/01/20 v2.03 operator names]
% \end{macrocode}
%
% What \cs{nolimits@} does is keep a \cn{limits} typed by the user
@@ -198,8 +198,16 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% more accessible so that users can call this font for use in special
% constructs that are not ordinary operator names but conceptually
% related.
+%
+% \cs{operator@font} is also declared by the \LaTeX{} kernel (for
+% at least 14 years), thus defining it here effectively means
+% ``resetting it'' to the kernel value, which is counterproductive
+% in situations where the user (or a class) has altered its
+% definition and at a later point \pkg{amsopn} got added.
+% \changes{v2.03}{2022/01/20}{Do not reset \cs{operator@font} it is
+% already defined in the LaTeX kernel (gh/734)}
% \begin{macrocode}
-\def\operator@font{\mathgroup\symoperators}
+%\def\operator@font{\mathgroup\symoperators} % commented out in 2.03
\def\operatorfont{\operator@font}
% \end{macrocode}
% \end{macro}
diff --git a/macros/latex-dev/required/amsmath/amsopn.pdf b/macros/latex-dev/required/amsmath/amsopn.pdf
index d9f5ea9c8f..d6781e3209 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 fc502fd959..1a49d88d88 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 051f596d4f..aa02d6929f 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 e61d8724de..95e291d744 100644
--- a/macros/latex-dev/required/amsmath/changes.txt
+++ b/macros/latex-dev/required/amsmath/changes.txt
@@ -1,3 +1,15 @@
+2022-02-03 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsmath.dtx (subsection{The \env{multline} environment}):
+ Added missing \relax for (gh/716)
+ Also make \shoveleft and \shoveright robust (part of gh/123)
+
+2022-01-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * amsopn.dtx:
+ Do not define/reset \operator@font; it is already defined in
+ the LaTeX kernel (gh/734)
+
2021-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* All *.dtx: Replaced \StopEventually by \MaybeStop
diff --git a/macros/latex-dev/required/amsmath/subeqn.pdf b/macros/latex-dev/required/amsmath/subeqn.pdf
index af000da7d0..25deff1253 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 f5604758fb..8e12a5296b 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 3cf0d8fd29..9332b2032f 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 6f8268c6b6..a3626f83a4 100644
--- a/macros/latex-dev/required/firstaid/changes.txt
+++ b/macros/latex-dev/required/firstaid/changes.txt
@@ -1,3 +1,12 @@
+2022-02-20 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * latex2e-first-aid-for-external-files.dtx:
+ Fixes for biditools because taken out as package is updated
+
+2021-11-18 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * All *.dtx: Replaced \StopEventually by \MaybeStop
+
2021-11-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* latex2e-first-aid-for-external-files.dtx:
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 fb8d340137..1e6e286a73 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
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2021
+%% File: latex2e-first-aid-for-external-files.dtx (C) Copyright 2020-2022
%%
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
@@ -99,7 +99,7 @@
% release we have to make and distribute also a matching
% development release.
%
-% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
%
%
% \section{The Implementation}
@@ -111,8 +111,8 @@
% \end{macrocode}
%
% \begin{macrocode}
-\def\LaTeXFirstAidDate{2021/11/11}
-\def\LaTeXFirstAidVersion{v1.0q}
+\def\LaTeXFirstAidDate{2022/02/20}
+\def\LaTeXFirstAidVersion{v1.0r}
% \end{macrocode}
%
% \begin{macrocode}
@@ -311,11 +311,12 @@
%<*kernel>
% \end{macrocode}
%
+% Bidi is now ar a new version: patches are no longer needed.
% \begin{macrocode}
-\AddToHook{file/biditools.sty/after}[firstaid]{%
- \FirstAidNeededT{biditools}{sty}%
- {2020/05/13 v2 Programming tools for bidi package}%
- {%
+%\AddToHook{file/biditools.sty/after}[firstaid]{%
+% \FirstAidNeededT{biditools}{sty}%
+% {2020/05/13 v2 Programming tools for bidi package}%
+% {%
% \end{macrocode}
% \pkg{bidi} adds some code to the beginning of \cs{document} which
% contains \cs{endgroup} and \cs{begingroup} which is no longer
@@ -324,20 +325,20 @@
% Patching \cs{document} using \cs{bidi@patchcmd} doesn't work so
% we take the extra groups out by hand:
% \begin{macrocode}
- \def\firstaid@bidi@document@patch
- \endgroup#1\begingroup#2\firstaid@bidi@document@patch
- {\unexpanded{#1#2}}%
- \edef\document{\expandafter\firstaid@bidi@document@patch\document
- \firstaid@bidi@document@patch}%
+% \def\firstaid@bidi@document@patch
+% \endgroup#1\begingroup#2\firstaid@bidi@document@patch
+% {\unexpanded{#1#2}}%
+% \edef\document{\expandafter\firstaid@bidi@document@patch\document
+% \firstaid@bidi@document@patch}%
% \end{macrocode}
% There are also some patches into \cs{enddocument}, some continue
% to go in but one fails, so we add that now into the right place.
% \begin{macrocode}
- \AddToHook{enddocument/info}%
- {\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
- \bidi@afterenddocumentchecklabelsrerunhook}%
- }%
-}
+% \AddToHook{enddocument/info}%
+% {\let\bidi@AfterEndDocumentCheckLabelsRerun\@firstofone
+% \bidi@afterenddocumentchecklabelsrerunhook}%
+% }%
+%}
% \end{macrocode}
%
%
@@ -559,6 +560,30 @@
}
% \end{macrocode}
%
+% \subsection{The \pkg{german} class first aid}
+%
+% Handling of \cs{protected} UTF-8
+% \begin{macrocode}
+\AddToHook{file/german.sty/after}[firstaid]{%
+ \FirstAidNeededT{german}{sty}{1998/07/08 v2.5e Support for writing german texts (br)}
+ {%
+\let\grmn@active@dq@\@active@dq
+\def\@active@dq{\protect\grmn@active@dq@}%
+\germanTeX
+}%
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\AddToHook{file/ngerman.sty/after}[firstaid]{%
+ \FirstAidNeededT{ngerman}{sty}{1998/07/08 v2.5e Support for writing german texts (br)}
+ {%
+\let\grmn@active@dq@\@active@dq
+\def\@active@dq{\protect\grmn@active@dq@}%
+\ngermanTeX
+}%
+}
+% \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 9e1f772a22..b1d179b6ed 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 fb478e598d..939930605f 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 2022-06-01 pre-release 1
+Release 2022-06-01 pre-release 2
Overview
--------
diff --git a/macros/latex-dev/required/graphics/changes.txt b/macros/latex-dev/required/graphics/changes.txt
index 72a106c3fd..2a542dca1b 100644
--- a/macros/latex-dev/required/graphics/changes.txt
+++ b/macros/latex-dev/required/graphics/changes.txt
@@ -4,11 +4,17 @@ completeness or accuracy and it contains some references to files that
are not part of the distribution.
=======================================================================
+2022-03-10 Phelype Oleinik <phelype.oleinik@latex-project.org>
+
+ * graphics.dtx:
+ Use \set@curr@file@nosearch to avoid premature inclusion of path
+ from \cs{graphicspath} (gh/776).
+
2022-01-06 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
* mathcolor.dtx:
Support \mathcolor to correctly color parts of formulas without
- spacing problems.
+ spacing problems. This command is *only* supported in math mode.
================================================================================
All changes above are only part of the development branch for the next release.
diff --git a/macros/latex-dev/required/graphics/color.pdf b/macros/latex-dev/required/graphics/color.pdf
index 499c81c1d0..ebf13b6cb9 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 ba45790672..4d06da1f61 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 e5feedc670..3ee5d92b01 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 c9b381adad..92b3c8f335 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}
- [2021/03/04 v1.4d Standard LaTeX Graphics (DPC,SPQR)]
+ [2022/03/10 v1.4e Standard LaTeX Graphics (DPC,SPQR)]
%
% \iffalse
%<*driver>
@@ -1053,33 +1053,39 @@
% \edef{macrocode}
% \end{macro}
%
-% \begin{macro}{\set@curr@file}
+% \begin{macro}{\Gin@set@curr@file}
% \begin{macro}{\quote@name}
% \changes{v1.3c}{2019/10/08}
% {Definitions added for old formats}
+% \changes{v1.4e}{2022/03/10}
+% {Use \cs{Gin@set@curr@file}, and define it appropriately}
+% We have to cope with older formats (rollback as far as 2019-10-01)
+% and Plain. Define a minimal \cs{Gin@set@curr@file} first:
% \begin{macrocode}
-\def\Gin@temp#1{%
- \begingroup
- \escapechar\m@ne
- \xdef\@curr@file{\expandafter\string\csname #1\endcsname}%
- \endgroup
-}
-\ifx\set@curr@file\@Gin@temp
- \let\set@curr@file\@undefined
-\fi
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ifx\set@curr@file\@undefined
-\def\set@curr@file#1{%
+\def\Gin@set@curr@file#1{%
\begingroup
\escapechar\m@ne
\xdef\@curr@file{\expandafter\string\csname\@firstofone#1\@empty\endcsname}%
- \endgroup
-}
-\def\quote@name#1{"\quote@@name#1\@gobble""}
-\def\quote@@name#1"{#1\quote@@name}
-\def\unquote@name#1{\quote@@name#1\@gobble"}
+ \endgroup}
+% \end{macrocode}
+% Then, if \cs{set@curr@file@nosearch} is undefined, we're before
+% 2022-06-01, and if \cs{set@curr@file} is undefined, we're before
+% 2019-10-01 (aka Plain, as far as these tests are concerned). Make
+% \cs{Gin@set@curr@file} be a copy of the most recent macro:
+% \cs{set@curr@file@nosearch} if it exists, and \cs{set@curr@file}
+% otherwise. If neither exist, we also need to define
+% \cs{quote@name} et~al.
+% \begin{macrocode}
+\ifx\set@curr@file@nosearch\@undefined
+ \ifx\set@curr@file\@undefined
+ \def\quote@name#1{"\quote@@name#1\@gobble""}
+ \def\quote@@name#1"{#1\quote@@name}
+ \def\unquote@name#1{\quote@@name#1\@gobble"}
+ \else
+ \let\Gin@set@curr@file\set@curr@file
+ \fi
+\else
+ \let\Gin@set@curr@file\set@curr@file@nosearch
\fi
% \end{macrocode}
% \end{macro}
@@ -1114,8 +1120,11 @@
%
% \changes{v1.3d}{2019/11/01}
% {\cs{curr@name} now unquoted}
+% \changes{v1.4e}{2022/03/10}
+% {Use \cs{set@curr@file@nosearch} to avoid premature inclusion of
+% path from \cs{graphicspath}}
% \begin{macrocode}
- \set@curr@file{#1}%
+ \Gin@set@curr@file{#1}%
\expandafter\filename@parse\expandafter{\@curr@file}%
% \end{macrocode}
% If extension is |.gz| tack on to previous extension, eg |.eps.gz| if available.
diff --git a/macros/latex-dev/required/graphics/graphics.pdf b/macros/latex-dev/required/graphics/graphics.pdf
index d3d880dd69..39927a75eb 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 0a61531244..0a39aa56ce 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 70ed7ac3ac..a0c0914ae2 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 9b60667b03..c95033c86d 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 0eb191d662..51c7be6e47 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.dtx b/macros/latex-dev/required/graphics/mathcolor.dtx
index 6ed53f8f61..2341e71e28 100644
--- a/macros/latex-dev/required/graphics/mathcolor.dtx
+++ b/macros/latex-dev/required/graphics/mathcolor.dtx
@@ -14,8 +14,8 @@
%%% From File: mathcolor.dtx
%
% \begin{macrocode}
-\def\mathcolorversion{v1.0a}
-\def\mathcolordate{2022/01/07}
+\def\mathcolorversion{v1.0b}
+\def\mathcolordate{2022/01/28}
% \end{macrocode}
%<*driver>
\documentclass{l3doc}
@@ -165,7 +165,17 @@
% \begin{macrocode}
\DeclareDocumentCommand \mathcolor { o m m } {
% \end{macrocode}
-% First action is to save the current color value on a stack
+% The \cs{mathcolor} is only supported in math mode because in text
+% mode it has problems scanning away a space after it, for example.
+% We therefore raise an error if it executes
+% anywhere else. The \LaTeXe{} error command is a
+% bit strangely named, because in the kernel it is only used for
+% math alphabets, but the message it gives is fine.
+% \changes{v1.0b}{2022/01/28}{Restrict command to math mode}
+% \begin{macrocode}
+ \mode_if_math:F { \non@alpherr {\mathcolor\space} }
+% \end{macrocode}
+% First real action is to save the current color value on a stack
% (needed if the command is nested or contains some further color
% changes with \cs{color} inside).
% \begin{macrocode}
diff --git a/macros/latex-dev/required/graphics/mathcolor.pdf b/macros/latex-dev/required/graphics/mathcolor.pdf
index 1b5d8683e5..b4646281e4 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 5529771dcd..802e0b4716 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 d7b41106d8..acd205bc79 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 52f717b3f5..6f0312bf7a 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/latex-lab/README.md b/macros/latex-dev/required/latex-lab/README.md
index 3d71aa821c..39f7f74d69 100644
--- a/macros/latex-dev/required/latex-lab/README.md
+++ b/macros/latex-dev/required/latex-lab/README.md
@@ -1,5 +1,9 @@
# LaTeX laboratory
+Release 2022-06-01 pre-release 2
+
+## Overview
+
This bundle holds optional files that are loaded in certain situations
by kernel code (if available). For example, the new (as of 2021/12)
`\DocumentMetadata` command in the kernel loads a file from here holding
@@ -20,6 +24,10 @@ to documents already using the new functionality.
### Support for `\DocumentMetadata`
+### New output routine code (under development)
+
+ - so far there is a first implementation of footnote support
+
## License
@@ -30,5 +38,5 @@ The license is LPPL 1.3c.
This README file is
-Copyright (C) 2021
+Copyright (C) 2021-2022
The LaTeX Project
diff --git a/macros/latex-dev/required/latex-lab/changes.txt b/macros/latex-dev/required/latex-lab/changes.txt
index 9551d74b79..e146c5a0fb 100644
--- a/macros/latex-dev/required/latex-lab/changes.txt
+++ b/macros/latex-dev/required/latex-lab/changes.txt
@@ -1,3 +1,9 @@
+2022-03-08 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * latex-lab-prototype.dtx
+ New file re-implementing ideas from on xtemplate.dtx using updated
+ keyval support
+
2021-12-30 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
* documentmeta-support.dtx:
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 674a5b9731..0f698d8080 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 b7a32c6904..b2eeed8d7e 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 0c7a1d9d80..7501de151f 100644
--- a/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx
+++ b/macros/latex-dev/required/latex-lab/documentmetadata-support.dtx
@@ -126,7 +126,7 @@
% removed or when the code is moved into the kernel.
% \begin{description}
% \item[\texttt{phase-I}]
-% This value loads code implementing the first phase of the project~\cite{blueprint}, i.e., it
+% This value loads code implementing the first phase of the project~\cite{blueprint}, i.e., it
% will load the tagpdf package. It will also activate tagging by issuing
% |\tagpdfsetup{activate,interwordspace}|. This phase
% is frozen.
@@ -336,9 +336,11 @@
{
\tl_gput_right:Nn\g_@@_testphase_tl
{
+ \AddToDocumentProperties [document]{testphase/#1}{loaded}
\file_if_exist_input:nF {#1-latex-lab-testphase.ltx}
{
\msg_warning:nnn{meta}{latex-lab-pkg-missing}{#1}
+ \AddToDocumentProperties [document]{testphase/#1}{missing}
}
}
}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx
new file mode 100644
index 0000000000..330ae7b0cc
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.dtx
@@ -0,0 +1,1822 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-footnotes.dtx
+% Copyright (C) 2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-footnotes.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \title{The \texttt{latex-lab-footnotes} code\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
+% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
+% \providecommand\class[1]{\texttt{#1.cls}}
+% \providecommand\pkg[1]{\texttt{#1}}
+% \providecommand\hook[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \emph{to be written}
+% \end{abstract}
+%
+% \tableofcontents
+%
+%
+% \section{Introduction}
+%
+% This code reimplements the footnote interfaces for \LaTeX{}
+% offering configurable methods for layout and functionality
+% adjustments that avoid overwriting each other when used in
+% classes as well as in packages (as far as possible --- obviously
+% some adjustments are mutally exclusive). This is achieved by
+% providing a a larger number of hooks (for areas where different
+% packages/classes can easily coexist with their adjustments) and a
+% number of configuration points to which only one class or package
+% can write to successfully (in case of multiple changes the the
+% last one wins). The latter are for special functionality, e.g.,
+% if footnote text is typeset as a single paragraph, it can't be configured
+% the same time to be typeset vertically with one footnote below
+% each other.
+%
+% The interfaces are set up to support tagged PDF, but in order
+% for this to work, all packages altering the fontnote setup should
+% use the inferfaces provided here and not do it through the
+% legacy methods (though there is some support for the latter as
+% well, but if will not work in a cases).
+%
+% \subsection{Configuration methods}
+%
+% Historically, the footnote setup in \LaTeX{} was done by
+% providing definitions for \cs{@makefnmark} (format the footnote
+% mark in running text and in front of the footnote text) and
+% \cs{@makefntext} (formatting the footnote text and placing a mark
+% in front of it).
+%
+% There was a default definition for \cs{@makefnmark} in the format
+% that was used by most document classes,
+% but \cs{@makefntext} had to be defined in the class itself because
+% the format didn't provide a default. As a result you will find
+% definitions for the latter in all document classes and defintions
+% for \cs{@makefnmark} only in very few.
+%
+% Furthermore, to enable special footnote layouts or provide
+% additional functionality a few packages (and a few classes)
+% overwrote other internal commands of \LaTeX's footnote
+% mechanism. The commands affected in this way are mainly
+% \cs{@footnotemark} and \cs{@footnotetext}. These overwrites could
+% not be used in combination, so either the packages/classes had to
+% be aware of being loaded together (which they sometimes did or
+% tried to) or they would fail by overwriting each other
+% unconditionally.
+%
+% The present rewrite is an attempt to improve this situation, but
+% of course, it will only work if all packages/classes make use of
+% the new interfaces. Fortunately, the number of problematical
+% packages altering these internal commands are fairly small so
+% arranging for updates is a realistic goal --- to achieve properly
+% tagged PDF it is a requirement.
+%
+%
+%
+% \section{Hooks and configuration points}
+%
+% Note: the configuration points do not have an interface mechanism
+% yet and all their names are temporary right now.
+% Also note that configuration points are of interest only to very
+% few specialized packages, mainly \pkg{footmisc}, and packages
+% providing similar functionality---the current documentation is
+% therefore fairly sketchy.
+%
+% In contrast the hooks are of interest to many classes to provide
+% their layout alterations in a way that it works smoothly with
+% other packages handling aspects of foonote formatting.
+%
+%
+% \subsection{Formatting the mark in the main text}
+%
+% This implements formatting the mark\footnote{Like this one.} and
+% its relation to surrounding text, e.g., if several marks appear
+% in the same place, etc.
+%
+%
+% \subsubsection{Configuration points}
+%
+% None: everything is implemented through a single definition for
+% \cs{@footnotemark} that offers a number of hooks that can be used
+% by packages to implement handling of multiple marks and the
+% formatting of marks.
+%
+%
+% \subsubsection{Hooks}
+%
+% The hooks to customize the marks in the text are the following:
+% \begin{description}
+% \item[\hook{fnmark/before}]
+%
+% Executed at the very beginning of \cs{footnotemark}. Currently
+% there are two packages (\pkg{bibarts} and \pkg{chextras}) that
+% prepend material at this point (not ncessarily correctly, e.g.,
+% they do not all check that they are in horizontal mode).
+%
+% This hook is paired with hook \hook{fnmark/after}.
+%
+% \item[\hook{fnmark}]
+%
+% Executed in horizontal mode and after the current space factor
+% has been saved away for reuse. This is where currently code for multiple
+% marks does its preparation (as done by \pkg{footmisc} and
+% others).
+%
+% The hook is only executed in hmode, i.e., not if the mark is
+% generated in math --- maybe that means the multiple handling
+% should happen later?
+%
+% After the hook \cs{nobreak} is executed, so any
+% ``material'' added in the hook is tied to the following mark
+% unless it contains its own permissible penalty.
+%
+% \item[\hook{fnmark/begin}]
+%
+% This hook is executed directly in front of the typeset mark.
+% This is the place where \pkg{hyperref} adds part of its code,
+% i.e., after the \cs{nobreak} mentioned above. With a closer
+% integration of \pkg{hyperref} this hook may not be necessary at
+% all.
+%
+% \item[\hook{fnmark/end}]
+%
+% This hook is executed directly after the typeset mark. It is
+% used by \pkg{hyperref}, \pkg{memhfixc}, \pkg{scrlttr2}, and
+% \pkg{footmisc}. Used, for example, to implement support for
+% multiple marks in succession.
+%
+% It is \emph{not} a reversed hook.
+%
+%
+% \item[\hook{fnmark/after}]
+%
+% This hook is executed at the very end of the \cs{footnotemark} command.
+%
+% It is a reversed hook to pair with \hook{fnmark/before}
+% \end{description}
+%
+%
+%
+%
+% \subsubsection{Additional configuration possibilities}
+%
+% The actual formatting is done through \cs{@makefnmark} --- no
+% special customization support for now.
+%
+%
+%
+% \subsection{Formatting the footnote text}
+%
+% This implements the formatting of the footnote text the way it
+% appears at the bottom of the page (default case), or possibly
+% elsewhere, e.g. in the margin.
+%
+% \subsubsection{Configuration points}
+%
+% To cater for different layout configurations there are four
+% configuration points which can be set only by one package or
+% class, if two packages/classes set them they are mutually
+% incompatible.
+% These are:
+% \begin{description}
+% \item[\cs{@footnotetext@cfgpoint} (1 argument)]
+%
+% This receives all material that is to be processed (or stored)
+% including color protection code and what have you. The default
+% definition is to run \cs{insert}\cs{footins}.
+%
+% \item[\cs{@footnotetext@cfgpointii} (1 argument)]
+%
+% The default definition runs \cs{@makefntext} which contains
+% various hooks for customization. For most scenarios this is
+% sufficient. However, when running all footnotes as a single
+% paragraph at the bottom, then each footnote needs to be
+% prepared prior to storing in the insert and this configuration
+% point allows running extra code to do that.
+%
+% \item[\cs{@footnotetext@cfgpointiii} (no argument)]
+%
+% By default this configuration point adds a strut to the
+% footnote material. so that consecutive footnotes are properly
+% spaced vertically. In some use cases this is not appropriate
+% (e.g., when running all footnotes s a single paragraph) and so
+% this configuration point can cancel the action or do something
+% else instead.
+%
+% The configuration point is executed near the start of the
+% argument for the configuration point
+% \cs{@footnotetext@cfgpointii}.
+%
+% \item[\cs{@footnotetext@cfgpointiv} (no argument)]
+%
+% This configuration point is executed at the very end of the
+% argument passed to \cs{@footnotetext@cfgpointii}.
+% By default it adds a final strut as long as we are still in
+% horizontal mode (i.e., processing the footnote text paragraph.
+% When running several footnotes in one paragraph some additional
+% material (some horizontal glue) needs adding at this point.
+%
+% \end{description}
+% The configuration point \cs{@footnotetext@cfgpointii} runs
+% \cs{@makefntext} and this command contains two further
+% configuration points (and a few hooks):
+% \begin{description}
+% \item[\cs{@makefntext@cfgpoint} (1 argument)]
+%
+% This configuration point receives the material to typeset the
+% footnote mark. By default, all it does is running \cs{indent}
+% to get a paragraph indentation (if one is set up---in most
+% layouts it is 0~points) and then typesets the mark, but in
+% some designs it executes more elaborate code.
+%
+% If tagging is produced this configuration point is also
+% responsible for surrounding the mark with the appropriate tags
+% marking the mark as an Lbl. It does this using the command \cs{tag@FELbl}.
+%
+% \item[\cs{@makefntext@cfgpointii} (1 argument)]
+%
+% This configuration point manages the formatting of the footnote
+% text once the mark has been typeset.
+%
+% If tagging is produced this configuration point is also
+% responsible for surrounding the mark with the appropriate tags
+% marking the mark as an MC of type FENote. It does this using
+% the command \cs{tag@FENote}.
+%
+% \end{description}
+%
+%
+% The above configuration points are sufficient to implement all
+% commonly used footnote layouts assuming L-R typesetting. For R-L
+% typesetting they or may or may not need some extension (though
+% that is not clear right now).
+%
+%
+%
+% \subsubsection{Hooks}
+%
+% \begin{description}
+% \item[\hook{fntext/before}]
+%
+% Executed at the very beginning of \cs{footnotetext}. Currently
+% there is on package (\pkg{linguex}) that
+% prepends material at this point.
+%
+% This hook is paired with hook \hook{fnmark/after}.
+%
+% \item[\hook{fntext}]
+%
+% Executed at the beginning of the material passed to the first
+% configuration point. Typically used to set any baseline
+% stretch for the footnote text, e.g., by \pkg{setspace},
+% \pkg{footmisc}, \class{uathesis} and others. Could be done in a
+% later hook but is a bit more efficient here.
+%
+% After the hook has run, the font is established, i.e., it can't
+% be used to set a different font size.
+%
+% \item[\hook{fntext/para}]
+%
+% After the font is set default paragraph parameters are set up
+% including \cs{interlinepenalty}, \cs{hsize}, \cs{parindent} and
+% a number of others, as some of them depend on the font
+% size. Then the \hook{fntext/para} is run. If one wants to
+% change the font size, it is probably necessary to reset these
+% other parameters too, e.g., \cs{parindent}, which can be done
+% here.
+%
+% The configuration point \cs{@footnotetext@cfgpointii} normally
+% runs the command \cs{@makefntext} or some code that eventually
+% runs this command, and this then produces the footnote mark (in
+% front of the footnote text) and the formatted footnote text. In
+% front of both the mark and the footnote text some classes have
+% placed paragraph parameter adjustments in their redefinition of
+% \cs{@makefntext}. However, there is no need to place it there
+% it could equally well go into the \hook{fntext/para} hook. We
+% therefore do not provide another hook at this point.
+%
+% \item[\hook{fntext/begin} \& \hook{fntext/end}]
+%
+% The footnote text itself is surrounded by the hooks
+% \hook{fntext/begin} and \hook{fntext/end}. The two hooks are
+% not paired as they are typically used independently.
+%
+% \item[\hook{fntext/after}]
+%
+% At the very end of \cs{footnotetext} we execute the hook
+% \hook{fntext/after} which is a reversed hook paired with
+% \hook{fntext/before}. Some packages, e.g., \pkg{linuex}, have
+% code in that position.
+%
+% \end{description}
+%
+%
+%
+%
+% \subsubsection{Additional configuration possibilities}
+%
+% The formatting of the footnote mark in front of the footnote
+% texts is influenced by the setting of the dimen parameter
+% \cs{footnotemargin}. By default its value is 1.8em in the current
+% text font (or \texttt{-}\cs{maxdimen} when the para option is
+% chosen). The following rules apply:
+% \begin{itemize}
+% \item
+%
+% If it has the value \texttt{-}\cs{maxdimen} then the mark is
+% generated by \cs{@makefnmark}.
+%
+% \item
+%
+% Otherwise, if the value is
+% negative then the mark is placed into an \cs{llap} left aligned
+% in a box of size \texttt{-}\cs{footnotemargin}.
+%
+% \item
+%
+% If the value is zero an \cs{llap} is used without an inner box.
+%
+% \item
+%
+% If the value is greater zero (but less than \cs{maxdimen}) the
+% mark is placed right aligned into a box of size
+% \cs{footnotemargin}.
+%
+% \item
+%
+% The value \cs{maxdimen} is used as a marker to indicate that
+% no value was given and that the default should be used,
+% i.e. 1.8em or \texttt{-}\cs{maxdimen} depending on the chosen
+% option.
+% \end{itemize}
+%
+%
+% \section{Tagging support}
+%
+% \emph{To be documented}
+%
+%
+%
+%
+% \MaybeStop{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% All this is very rough and misses a lot of documentation.
+%
+% \begin{macrocode}
+%<*kernel>
+%<@@=fnote>
+% \end{macrocode}
+%
+% \subsection{File declaration}
+% \begin{macrocode}
+\ProvidesFile{latex-lab-footnotes.ltx}
+ [2022-03-10 v0.6a changes to the footnote interfaces]
+% \end{macrocode}
+%
+% \begin{macrocode}
+
+% latex.ltx
+
+ % not looked at yet
+
+\long\def\@mpfootnotetext#1{%
+ \global\setbox\@mpfootins\vbox{%
+ \unvbox\@mpfootins
+ \reset@font\footnotesize
+ \hsize\columnwidth
+ \@parboxrestore
+ \def\@currentcounter{mpfootnote}%
+ \protected@edef\@currentlabel
+ {\csname p@mpfootnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \par
+ \color@endgroup}}
+
+
+\def\@makefnmark{\hbox{\@textsuperscript{\normalfont\@thefnmark}}}
+
+
+
+\def\@mpfn{footnote}
+\def\thempfn{\thefootnote}
+
+
+
+%-------------------------------------
+
+
+\ExplSyntaxOn
+
+
+\cs_new_protected:Npn \fnote_step_fnmark:nn #1#2 {
+ \tl_if_novalue:nTF {#1}
+ {
+ \stepcounter {#2}
+ \protected@xdef \@thefnmark { \use:c { the#2 } }
+ }
+ {
+ \group_begin:
+% \end{macrocode}
+% Note that this is a local assignment even though \LaTeX{}
+% counters are normally globally changed. This is the way it was in
+% 2e and so far we haven't changed it. The alternative would be to
+% store the current value and restore it after \cs{@thefnmark} is
+% altered.
+% \begin{macrocode}
+ \int_set:cn { c@#2 }{ #1 }
+ \unrestored@protected@xdef \@thefnmark { \use:c { the#2 } }
+ \group_end:
+ }
+}
+
+\cs_new_protected:Npn \fnote_set_fnmark:nn #1#2 {
+ \tl_if_novalue:nTF {#1}
+ {
+ \protected@xdef \@thefnmark { \use:c { the#2 } }
+ }
+ {
+ \group_begin:
+ \int_set:cn { c@#2 }{ #1 }
+ \unrestored@protected@xdef \@thefnmark { \use:c { the#2 } }
+ \group_end:
+ }
+}
+
+%-------------------------------------
+
+% the debugging code is just temp
+\bool_new:N \g_fnote_debug_bool
+\bool_gset_true:N \g_fnote_debug_bool % for now we have debugging turned on by default
+
+%-------------------------------------
+
+
+
+\NewMirroredHookPair{fnmark/before}{fnmark/after}
+\NewHook{fnmark}
+\NewHook{fnmark/begin}
+\NewHook{fnmark/end}
+
+
+\cs_new:Npn \@@_debug_footnotemark: {
+ \bool_if:NT \g_fnote_debug_bool
+ {
+ \LogHook{fnmark/before}
+ \LogHook{fnmark}
+ \LogHook{fnmark/begin}
+ \LogHook{fnmark/end}
+ \LogHook{fnmark/after}
+ \cs_gset_eq:NN \@@_debug_footnotemark: \prg_do_nothing:
+ }
+}
+
+
+\cs_new_protected:Npn \fnote_footnotemark: {
+ \@@_debug_footnotemark:
+%-------
+% bibarts
+% chextras --- actually in the wrong place does an \unskip
+ \UseHook{fnmark/before}
+%-------
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}
+%-------
+% bxjsja-minimal.def --- what they do could be done at ``bibarts''
+% (a bit less efficient)
+% memhfixc.sty
+% footmisc.sty
+ \UseHook{fnmark}
+%-------
+ \nobreak
+ \fi
+%-------
+% hyperref.sty
+ \UseHook{fnmark/begin}
+%-------
+ \@kernel@process@makefnmark
+ \@makefnmark
+%-------
+% \end{macrocode}
+% If a footnote mark is placed by its own then it should finish by
+% executing \hook{fnmark/end}, resetting the space factor, and
+% finishing with \hook{fnmark/after}. However, inf a complete
+% footnote these actions have to happen only after we have handled
+% the footnote text (e.g., by placing it into an \cs{insert}. In
+% such a situation \cs{_@@_footmark_finish:} below does nothing
+% and the action is carried out later.
+% \begin{macrocode}
+ \@@_footnotemark_finish:
+}
+
+
+\cs_new:Npn \@@_finish: {
+% hyperref.sty
+% memhfixc.sty --- could move fnmark/after
+% scrlttr2.cls --- could vanish if footmisc uses a hook
+% footmisc.sty
+ \UseHook{fnmark/end}
+%-------
+ \ifhmode
+ \spacefactor \@x@sf \relax
+ \fi
+%
+%-------
+ \UseHook{fnmark/after}
+%-------
+}
+
+
+\cs_new_eq:NN \@@_footnotemark_finish: \@@_finish:
+
+
+
+% Not a public config point but the kernel hook to add tagging
+\def \@kernel@process@makefnmark { }
+
+
+% alterations not covered:
+%
+% ./arabtex/afoot.sty --- too different (and probably too old)
+
+
+% Provide the name \LaTeXe{} is used to.
+
+\cs_set_eq:NN \@footnotemark \fnote_footnotemark:
+
+
+
+%-------------------------------------
+
+\NewMirroredHookPair{fntext/before}{fntext/after}
+\NewHook{fntext}
+\NewHook{fntext/para}
+\NewHook{fntext/begin}
+\NewHook{fntext/end}
+
+
+\cs_new:Npn \@@_debug_footnotetext: {
+ \bool_if:NT \g_fnote_debug_bool
+ {
+ \cs_log:N\@footnotetext@cfgpoint
+ \cs_log:N\@footnotetext@cfgpointii
+ \cs_log:N\@footnotetext@cfgpointiii
+ \cs_log:N\@footnotetext@cfgpointiv
+ \cs_log:N\@makefntext@cfgpoint
+ \cs_log:N\@makefntext@cfgpointii
+ \LogHook{fntext/before}
+ \LogHook{fntext}
+ \LogHook{fntext/para}
+ \LogHook{fntext/begin}
+ \LogHook{fntext/end}
+ \LogHook{fntext/after}
+% \end{macrocode}
+% Show the info only once (if at all).
+% \begin{macrocode}
+ \cs_gset_eq:NN \@@_debug_footnotetext: \prg_do_nothing:
+ }
+ }
+
+\cs_new_protected:Npn \fnote_footnotetext:n #1 {
+ \@@_debug_footnotetext:
+%-------
+% ./linguex/linguex.sty
+ \UseHook{fntext/before}
+%-------
+ \@kernel@process@footnotetext
+ \@footnotetext@cfgpoint { % config point
+%-------
+% resetting baselinestretch ... (could be done further down)
+% ./uafthesis/uafthesis.cls
+% ./setspace/setspace.sty
+% ./footmisc/footmisc.sty (normal)
+ \UseHook{fntext}
+%-------
+ \reset@font
+ \footnotesize
+%-------
+% some classes use a different font size, e.g.,
+% ./nrc/nrc1.cls ./nrc/nrc2.cls
+% but those could be done in fntext/para instead
+%-------
+% \end{macrocode}
+% In case of sidenotes the next settings are pointless, but as they
+% do not hurt (except for the \cs{hsize} setting) and are needed
+% for all other cases we make them here and overwrite them for side notes
+% \begin{macrocode}
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \parindent 1em % typical default used in \@makefntext moved up here
+ \def\@currentcounter{footnote}
+ \protected@edef \@currentlabel { \p@footnote \@thefnmark }
+%-------
+% for altering para parameters ...
+% code for resphilosophica came earlier but it could go here.
+% Has the advantage that one can also overwrite \cs{@currentcounter}
+% and \cs{@currentlabel} is that is necessary.
+%
+% ./resphilosophica/resphilosophica.cls
+ \UseHook{fntext/para}
+%-------
+ \color@begingroup
+%-------
+% fnpara wants to replace \@makefntext{...} and para and side option of footmisc etc too ...
+% so we make this a config point
+%-------
+ \@footnotetext@cfgpointii % config point
+ {
+%-------
+% ./resphilosophica/resphilosophica.cls
+%-------
+ \@footnotetext@cfgpointiii % config point
+%-------
+% bibarts
+% fnbreak.sty
+ \UseHook{fntext/begin}
+%-------
+ \ignorespaces
+ #1
+%-------
+% bibarts
+% fnbreak.sty
+ \UseHook{fntext/end}
+%-------
+ \@footnotetext@cfgpointiv % config point
+ }
+ \par
+ \color@endgroup
+ }
+%-------
+% ./linguex/linguex.sty
+ \UseHook{fntext/after}
+%-------
+}
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@footnotetext@cfgpoint { \insert\footins }
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@footnotetext@cfgpointii { \@makefntext }
+
+
+% default for config point (0 args)
+\cs_new_protected:Npn \@footnotetext@cfgpointiii { \rule\z@\footnotesep }
+
+% default for config point (0 args)
+\cs_new_protected:Npn \@footnotetext@cfgpointiv { \@finalstrut\strutbox }
+
+
+% kernel hook for tagging (2 args)
+\cs_new_protected:Npn \@kernel@process@footnotetext {}
+
+% Provide the name \LaTeXe{} is used to and do this unconditionally
+% (no patching of class code if any). This means that if a class provides it own
+% definition that gets lost and if necessary needs to be handled
+% with firstaid (or updating of the class.
+
+\AddToHook{begindocument}{
+ \cs_set_eq:NN \@footnotetext \fnote_footnotetext:n
+}
+
+% alterations not covered:
+%
+% ./revtex4-1/revtex4-1.cls ./revtex/ltxutil.sty ./revtex/revtex4-2.cls ... (need analysis)
+% ./bigfoot/bigfoot.sty
+
+
+
+% \footnotemargin is the logic implemented by footmisc. Perhaps we
+% don't want to do this like that in the kernel but for now I have
+% used this interface unchanged.
+
+
+\newdimen\footnotemargin
+\footnotemargin\maxdimen % no value given
+
+\AtBeginDocument{
+ \ifdim \footnotemargin=\maxdimen
+ \setlength\footnotemargin{1.8em}
+ \fi
+}
+
+
+\cs_new_protected:Npn \fnote_makefntext:n #1 {
+% \end{macrocode}
+% Some classes in their redefinition for \cs{@makefntext} have
+% places some paragraph parameters at this point, but those can
+% equally well go into the hook \hook{fntext/para}. We therefore do
+% not provide a further hook at this point.
+% \begin{macrocode}
+ \@makefntext@cfgpoint
+ {
+ \ifdim\footnotemargin>\z@
+ \hb@xt@ \footnotemargin{\hss\@makefnmark}
+ \else
+ \ifdim\footnotemargin=\z@
+ \llap{\@makefnmark}
+ \else
+ \ifdim\footnotemargin=-\maxdimen
+ \@makefnmark
+ \else
+ \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}
+ \fi
+ \fi
+ \fi
+ }
+ \@makefntext@cfgpointii
+ { #1 }
+}
+
+
+
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@makefntext@cfgpoint { \noindent }
+
+% default for config point (1 arg)
+\cs_new_protected:Npn \@makefntext@cfgpointii #1 { #1 }
+% \end{macrocode}
+%
+%
+%
+% If the definition for \cs{@makefntext} is that of the standard
+% classes then replace it with \cs{fnote_makefntext:n}, otherwise
+% try to patch the definition.
+%
+% Here is the the definition the way it is in
+% \texttt{classes.dtx}. Notice that (for saving space) there is no
+% space after \texttt{em} to terminate the assignment. We need to
+% mimic that, otherwise a test would return false even if the
+% definition has not been modified.
+%
+% \begin{macrocode}
+\newcommand\old@std@class@makefntext[1]{%
+ \parindent 1em%
+ \noindent
+ \hb@xt@1.8em{\hss\@makefnmark}#1}
+
+% \end{macrocode}
+% Here is the messy code for patching. Note that this is only there
+% to help classes along that aren't updated yet so it does some
+% minimal patching to hopefully add configuration points in the
+% right place.
+%
+% What it does is roughly the
+% following: It look for a definition of \cs{@makefntext} of the form
+%\begin{verbatim}
+% {AAA \hbox BBB { CCC } DDD #1 EEE }
+%\end{verbatim}
+% where ``BBB'' is something like \texttt{to 1em} or similar. It then
+% replaces that with
+%\begin{verbatim}
+% {AAA \@makefntext@cfgpoint{\hbox BBB { CCC }} DDD
+% \@makefntext@cfgpointii{#1} EEE }
+%\end{verbatim}
+% The patching is not very careful, i.e., it assumes there is only
+% one \verb=#1= in the replacement text and that a \cs{hbox} found
+% is the right one to patch. But that is enough to cater for all
+% definitions of \cs{@makefntext} out there in the TL distribution.
+%
+% If \cs{hbox} is not found it tries the same looking for
+% \cs{hb@xt@} which is what some classes use and if that is not
+% found either it assume that this is a version that uses
+% \cs{@makefnmark} without surrounding it in a box and if that
+% fails it gives up with an \cs{ERROR} (which needs to get a proper definition).
+% \begin{macrocode}
+
+\tl_new:N \l_@@_patch_tl
+\cs_new_eq:NN \@@_tmp:w \ERROR
+
+\cs_new_protected:Npn \@@_patch:
+ {
+ \tl_set:No \l_@@_patch_tl { \@makefntext { \@makefntext@cfgpointii{##1} } }
+ \tl_if_in:NnTF \l_@@_patch_tl { \hbox }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_hbox:w }
+ {
+ \tl_if_in:NnTF \l_@@_patch_tl { \hb@xt@ }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_hb@xt@:w }
+ {
+ \tl_if_in:NnTF \l_@@_patch_tl { \@makefnmark }
+ { \cs_set_eq:NN \@@_tmp:w \@@_patch_@makefnmark:w }
+ { \ERROR
+ \cs_set_eq:NN \@@_tmp:w \exp_stop_f: }
+ }
+ }
+ \tl_set:Nf \l_@@_patch_tl
+ { \exp_after:wN \@@_tmp:w \l_@@_patch_tl }
+ \cs_set:Npn \@@_tmp:w { \long \def \@makefntext ####1 }
+ \exp_after:wN \@@_tmp:w \exp_after:wN { \l_@@_patch_tl }
+ }
+% \end{macrocode}
+%
+% If \cs{@makefntext} contains \cs{hbox} then grab ``AAA'' as
+% \verb=#1= and ``BBB'' (up to the open \verb={=) and return it as
+%\begin{verbatim}
+% AAA \@makefntext@processX { \hbox BBB }
+%\end{verbatim}
+% \begin{macrocode}
+\cs_new:Npn \@@_patch_hbox:w #1 \hbox #2 #
+ { \exp_stop_f: #1 \@makefntext@processX { \hbox #2 } }
+% \end{macrocode}
+% Same for the other cases.
+% \begin{macrocode}
+\cs_new:Npn \@@_patch_hb@xt@:w #1 \hb@xt@ #2 #
+ { \exp_stop_f: #1 \@makefntext@processX { \hb@xt@ #2 } }
+\cs_new:Npn \@@_patch_@makefnmark:w #1 \@makefnmark
+ { \exp_stop_f: #1 \@makefntext@processX { \use:n } { \@makefnmark } }
+% \end{macrocode}
+%
+% The code provided by Bruno above expects 2 arguments but we need a
+% different structure so this is a simple reshuffling. Would be
+% better if we can patch the right structure in directly, but I'm
+% not a patch person, so this is the simple way out for now:
+%
+% \begin{macrocode}
+\cs_new:Npn \@makefntext@processX #1#2{\@makefntext@cfgpoint{#1{#2}}}
+% \end{macrocode}
+% At \verb=\begin{document}= check if the current definition is
+% that of the standard classes and if so replace it by
+% \cs{fnote_makefntext:n} otherwise try and patch the definition
+% using the approach above.
+% \begin{macrocode}
+
+\AddToHook{begindocument}{
+ \cs_if_eq:NNTF \@makefntext \old@std@class@makefntext
+ {
+ \cs_set_eq:NN \@makefntext \fnote_makefntext:n
+ }
+ {
+ \@@_patch:
+ }
+}
+
+
+% possibly add the following to check for multiple \hbox in
+% the definition:
+%
+% \seq_set_split:NnV \l_@@_patch_seq { \hbox } \l_@@_patch_tl
+% \int_compare:nT { \seq_count:N \l_@@_patch_seq } > 2 \ERROR
+%
+% \end{macrocode}
+%
+%
+%
+%
+% \subsection{Document-level commands}
+%
+% \begin{macrocode}
+
+\DeclareDocumentCommand\footnotetext {om} {
+ \fnote_set_fnmark:nn {#1} \@mpfn
+ \@footnotetext {#2}
+}
+
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnote {om} {
+ \fnote_step_fnmark:nn {#1} \@mpfn
+ \cs_set_eq:NN \@@_footnotemark_finish: \prg_do_nothing:
+ \@footnotemark
+ \cs_set_eq:NN \@@_footnotemark_finish: \@@_finish:
+ \@footnotetext {#2}
+ \@@_footnotemark_finish:
+}
+
+%-------------------------------------
+
+
+\DeclareDocumentCommand\footnotemark {o} {
+ \fnote_step_fnmark:nn {#1} { footnote }
+ \@footnotemark
+}
+
+
+%-------------------------------------
+
+\DeclareDocumentCommand\footref {m}{%
+ \begingroup
+ \unrestored@protected@xdef\@thefnmark{\ref{#1}}%
+ \endgroup
+ \@footnotemark
+}
+
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<@@=>
+% \end{macrocode}
+%
+%
+%
+%
+%
+%
+% \subsection{Firstaid for packages and classes}
+%
+% \subsubsection{\pkg{setspace}}
+%
+% It should not overwrite it any longer but use a hook, so for now we
+% do just that here.
+% \begin{macrocode}
+\AddToHook{package/setspace/after}
+ {\let \@footnotetext \fnote_footnotetext:n
+ \AddToHook{fntext}[setspace]{\let\baselinestretch\setspace@singlespace}}
+% \end{macrocode}
+%
+%
+%
+%
+% \subsubsection{\pkg{hyperref}}
+%
+% Prevent hyperref from redefining footnote stuff --- this is a
+% temp solution.
+% \begin{macrocode}
+\AddToHook{package/hyperref/after}{
+ \let\H@@footnotetext\fnote_footnotetext:n
+ \let\H@@footnotemark\fnote_footnotemark:
+ \let \@footnotetext \fnote_footnotetext:n
+ \let \@footnotemark \fnote_footnotemark:
+}
+
+
+
+% \end{macrocode}
+%
+% \subsection{Stuff that needs cleanup and documentation}
+%
+% \begin{macrocode}
+
+
+%-------------------------------------
+
+% use of kerns to mark h-mode positions (unit sp)
+%
+% 1 = CJK
+% 2 = CJK
+% 3 = multiple footnotes (footmisc, koma, eledmac, tufte, memoir,
+% parnotes, sidenotes)
+% 3 = outer kern in letter spacing (letterspace)
+% 3 = beginning of list (examdesign.cls)
+% 4 = CJK pigin
+% 5 = CJK ruby
+
+% 1-4 = polyglossia for korean
+
+%-------------------------------------
+
+
+
+%-------------------------------------
+% Tagging
+%-------------------------------------
+
+% hyperref support only when loaded (improve integration)
+
+\newcounter{absfootnote}
+\AddToHook{fnmark/begin}{\stepcounter{absfootnote}} % too simple (fails with opt args)
+
+
+
+% this is rubbish and should be handled better:
+
+\cs_new_protected:Npn \tag_if_loaded:TF { \cs_if_exist:NTF \tag_struct_begin:n }
+
+
+
+\cs_new_protected:Npn \tag@FEMark #1 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_end_push:
+ \exp_args:Nx
+ \tag_struct_begin:n{tag=Lbl,ref=fn.\the\c@absfootnote}
+ \tag_mc_begin:n{tag=Lbl}
+ \IfPackageLoadedTF{hyperref}{ \hyper@linkstart
+ {link}{fn.\the\c@absfootnote} }{}
+ #1
+ \IfPackageLoadedTF{hyperref}{ \hyper@linkend }{}
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+ { #1 }
+}
+
+% to be done next round around:
+%
+% \the\c@absfootnote should be replaced directly by some command with default meaning
+% \the\c@absfootnote so that the actual reference can be changed from the outside.
+%
+% there are several instances that are curently hardwired.
+
+\cs_set_eq:NN \@kernel@process@makefnmark \tag@FEMark
+
+
+
+% kernel hook for tagging (2 args)
+\cs_set:Npn \@kernel@process@footnotetext #1#2 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_end_push:
+ \tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote }
+ #1 {#2}
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+ { #1 {#2} }
+}
+
+
+
+\cs_set:Npn \@makefntext@cfgpoint #1 {
+ \noindent
+ \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_end_push: }
+ \tag@FELbl { #1 }
+}
+
+\cs_set:Npn \@makefntext@cfgpointii #1 {
+ \tag@FENote { #1 }
+ \cs_if_exist:NT \tag_struct_begin:n { \tag_mc_begin_pop:n{} }
+}
+
+
+
+
+\cs_new_protected:Npn \tag@FELbl #1 {
+ \tag_if_loaded:TF
+ {
+ % target should perhaps be raised ...
+ \IfPackageLoadedTF{hyperref}{ \hypertarget{fn.\the\c@absfootnote}{} }{}
+ %\tag_struct_begin:n { tag=FENote,label=fn.\the\c@absfootnote } %alternativ location for structure
+ \tag_struct_begin:n { tag=Lbl }
+ \tag_mc_begin:n { tag=Lbl }
+ #1
+ \tag_mc_end:
+ \tag_struct_end:
+ }
+ { #1 }
+}
+
+\cs_new_protected:Npn \tag@FENote #1 {
+ \tag_if_loaded:TF
+ {
+ \tag_mc_begin:n{tag=FENote}
+ #1
+ \tag_mc_end:
+ %\tag_struct_end: %alternative location for structure end but ends inside a P
+ }
+ { #1 }
+}
+
+%-------------------------------------
+
+
+\ExplSyntaxOff
+%</kernel>
+% \end{macrocode}
+%
+%
+% \section{Reimplementing the \pkg{footmisc} package}
+%
+% \begin{macrocode}
+%<*footmisc>
+%%
+%% Copyright (c) 1995-2011 Robin Fairbairns
+%% Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
+%%
+%% This file is part of the `latex-lab Bundle'.
+%% --------------------------------------------
+%%
+%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+%% The latest version of this license is in
+%% https://www.latex-project.org/lppl.txt
+%% and version 1.3c or later is part of all distributions of LaTeX
+%% version 2008 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%%
+%% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns
+%% (C) Copyright 2018-2022 Frank Mittelbach
+\NeedsTeXFormat{LaTeX2e}
+\providecommand\DeclareRelease[3]{}
+\providecommand\DeclareCurrentRelease[2]{}
+
+\DeclareRelease{v5}{2011-06-06}{footmisc-2011-06-06.sty}
+\DeclareCurrentRelease{}{2022-02-14}
+\ProvidesPackage{latex-lab-footmisc}%
+ [2022/03/08 v6.0d
+ a miscellany of footnote facilities -- latex-lab version%
+ ]
+
+\NeedsTeXFormat{LaTeX2e}[2020/10/01]
+\newtoks\FN@temptoken
+\providecommand\protected@writeaux{%
+ \protected@write\@auxout
+}
+\def\l@advance@macro{\@@dvance@macro\edef}
+\def\@@dvance@macro#1#2#3{\expandafter\@tempcnta#2\relax
+ \advance\@tempcnta#3\relax
+ #1#2{\the\@tempcnta}%
+}
+\let\@advance@macro\l@advance@macro
+\DeclareOption{symbol}{\renewcommand\thefootnote{\fnsymbol{footnote}}}
+\newif\ifFN@robust \FN@robustfalse
+\DeclareOption{symbol*}{%
+ \renewcommand\thefootnote{\@fnsymbol\c@footnote}%
+ \FN@robusttrue
+ \AtEndOfPackage{\setfnsymbol{lamport*-robust}}%
+}
+\newif\ifFN@para \FN@parafalse
+\DeclareOption{para}{%
+% \end{macrocode}
+% Options are executed in the order of declaration, thus no point in
+% checking for side option as footmisc did in the past
+% \begin{macrocode}
+% \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+% option "side"}%
+% {I shall ignore "\CurrentOption"}%
+ \FN@paratrue
+ \setlength\footnotemargin{-\maxdimen} % default when para is used
+}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\DeclareOption{side}{\ifFN@para
+ \PackageError{footmisc}{Option "\CurrentOption" incompatible with
+ option "para"}%
+ {I shall ignore "\CurrentOption"}%
+ \else
+ \def\@footnotetext@cfgpoint {\marginpar}
+ \AddToHook{fntext/para}{%
+ \hsize\marginparwidth % correct the default \hsize
+ \footnotesep\z@ % don't add a default separation
+ }
+ \def\@footnotetext@cfgpointii {\@makefntext}
+ \def\@footnotetext@cfgpointiii {}
+ \def\@footnotetext@cfgpointiv {}
+ \fi
+}
+\let\footnotelayout\@empty
+\DeclareOption{ragged}{%
+ \@ifundefined{RaggedRight}%
+ {\renewcommand\footnotelayout{\linepenalty50 \raggedright}}%
+ {\renewcommand\footnotelayout{\linepenalty50 \RaggedRight}}%
+}
+\newif\ifFN@perpage
+\FN@perpagefalse
+\DeclareOption{perpage}{%
+ \FN@perpagetrue
+}
+\newif\ifFN@fixskip \FN@fixskipfalse
+
+\let\FN@bottomcases\thr@@
+\newif\ifFN@abovefloats \FN@abovefloatstrue
+\DeclareOption{bottom}{%
+ \let\FN@bottomcases\@ne
+ \FN@abovefloatsfalse
+ \FN@fixskiptrue
+}
+\DeclareOption{bottomfloats}{%
+ \let\FN@bottomcases\tw@
+ \FN@abovefloatstrue \FN@fixskiptrue
+}
+\DeclareOption{abovefloats}{\FN@abovefloatstrue \FN@fixskiptrue}
+\DeclareOption{belowfloats}{\FN@abovefloatsfalse \FN@fixskiptrue}
+\DeclareOption{marginal}{%
+ \footnotemargin-0.8em\relax
+}
+\DeclareOption{flushmargin}{%
+ \footnotemargin0pt\relax
+}
+\newif\ifFN@hangfoot \FN@hangfootfalse
+\DeclareOption{hang}{%
+ \FN@hangfoottrue
+}
+\newcommand*\hangfootparskip{0.5\baselineskip}
+\newcommand*\hangfootparindent{0em}%
+\DeclareOption{norule}{%
+ \renewcommand\footnoterule{}%
+ \advance\skip\footins 4\p@\@plus2\p@\relax
+}
+\DeclareOption{splitrule}{%
+ \gdef\split@prev{0}
+ \let\pagefootnoterule\footnoterule
+ \let\mpfootnoterule\footnoterule
+ \def\splitfootnoterule{\kern-3\p@ \hrule \kern2.6\p@}
+ \def\footnoterule{\relax
+ \ifx \@listdepth\@mplistdepth
+ \mpfootnoterule
+ \else
+ \ifnum\split@prev=\z@
+ \pagefootnoterule
+ \else
+ \splitfootnoterule
+ \fi
+ \xdef\split@prev{\the\insertpenalties}%
+ \fi
+ }%
+}
+\newif\ifFN@stablefootnote \FN@stablefootnotefalse
+\DeclareOption{stable}{\FN@stablefootnotetrue}
+\newif\ifFN@multiplefootnote \FN@multiplefootnotefalse
+\DeclareOption{multiple}{\FN@multiplefootnotetrue}
+\ProcessOptions
+% \end{macrocode}
+% This version of \pkg{footmisc} can assume that the new OR code is
+% already available, thus nothing needs loading at this
+% point. However, as long as we use this code also in a package
+% version that can be loaded by other package while we are in a
+% transition phase it is not clear whether not the kernel code is
+% already available for other packages.
+% \begin{macrocode}
+%\@ifundefined{@kernel@before@cclv}
+% {\input{latex-lab-new-or.ltx}}{}
+% \end{macrocode}
+%
+% Footnote box layout for para footnotes;
+% this would also be the hook to support dblfootnotes (from the
+% \texttt{dblfnote} package if we integrate that).
+% \begin{macrocode}
+\ifFN@para
+ \def\@makecol@cfgpointii {%
+ \global\setbox\footins\vbox{\FN@makefootnoteparagraph}%
+ }
+\fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ifFN@fixskip
+ \def\@outputbox@removebskip{%
+ \ifx\@textbottom\relax \else
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
+ }%
+ \fi
+ }
+\let\@outputbox@reinsertbskip\relax
+\else
+ \let\@outputbox@removebskip \relax
+ \let\@outputbox@reinsertbskip\relax
+\fi
+% \end{macrocode}
+%
+%
+%
+% \begin{macrocode}
+\ifcase \FN@bottomcases\relax
+\ERROR
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@if@bfloats@TF{\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}}%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@outputbox@attachfloats
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}%
+ \@outputbox@appendfootnotes
+ }
+ \fi
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@if@bfloats@TF
+ {\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}%
+ \@outputbox@attachfloats
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@if@footnotes@TF
+ {\@outputbox@append{\vfill}}%
+ {\@if@bfloats@TF{\@outputbox@append{\vfill}}%
+ {\@outputbox@reinsertbskip}}%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ }
+ \fi
+\or
+ \ifFN@abovefloats
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+ \@outputbox@reinsertbskip
+ }
+ \else
+ \def\@makecol@cfgpoint {%
+ \@outputbox@attachfloats
+ \@outputbox@appendfootnotes
+ \@outputbox@reinsertbskip
+}
+ \fi
+\else
+\ERROR
+\fi
+
+% next can be dropped when cleaned up
+\newif\ifFN@setspace
+\@ifpackageloaded{setspace}%
+ {%
+ \FN@setspacetrue
+ \@ifclassloaded{memoir}%
+ {%
+ \AddToHook{fntext}{\let\baselinestretch\m@m@singlespace}%
+ \let\FN@baselinestretch\m@m@singlespace
+ }%
+ {%
+% \AddToHook{fntext}{\let\baselinestretch\setspace@singlespace}%
+ \let\FN@baselinestretch\setspace@singlespace
+ }%
+ }%
+ {%
+ \FN@setspacefalse
+ }
+
+
+
+\ifFN@para
+ \def\@footnotetext@cfgpoint {\insert\footins}
+
+ \long\def\@footnotetext@cfgpointii #1{%
+ \setbox\FN@tempboxa\hbox{\@makefntext{#1}}%
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa
+ \dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip /\columnwidth\relax
+ \box\FN@tempboxa
+ }
+
+
+ \def\@footnotetext@cfgpointiii {}
+ \def\@footnotetext@cfgpointiv {% config point
+ \strut
+ \penalty-10\relax
+ \hskip\footglue
+ }
+\fi
+
+
+
+\ifFN@para
+ \let\FN@tempboxa\@tempboxa
+ \newbox\FN@tempboxb
+ \newbox\FN@tempboxc
+ \newskip\footglue \footglue=1em plus.3em minus.3em
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ \newdimen\footnotebaselineskip
+
+ % establish late:
+
+\AddToHook{begindocument/before} {%
+ {%
+ \footnotesize
+ \global\footnotebaselineskip=\normalbaselineskip
+ }%
+}
+% \end{macrocode}
+% The coding is based on David Kastrup's improvement to Don Knuth's
+% original implementation. You find in the \TeX{}book if you own
+% the latest edition.
+% \begin{macrocode}
+
+ \long\def\FN@makefootnoteparagraph{%
+ \FN@setfootnoteparawidth
+ \@parboxrestore
+ \baselineskip=\footnotebaselineskip
+ \unvbox\footins \FN@removehboxes
+ \RawParEnd
+ }
+ \def\FN@removehboxes{\setbox\FN@tempboxa\lastbox
+ \ifhbox\FN@tempboxa{\FN@removehboxes}%
+ \unhbox\FN@tempboxa
+ \else
+ \RawNoindent
+ \rule\z@\footnotesep
+ \fi
+ }
+\fi
+
+
+\@ifpackageloaded{multicol}
+ {\def\FN@setfootnoteparawidth
+ {\hsize\ifnum\doublecol@number>\@ne
+ \textwidth
+ \else \columnwidth \fi}}
+ {\def\FN@setfootnoteparawidth{\hsize\columnwidth}}
+
+\ifFN@perpage
+ \RequirePackage{perpage}
+ \MakePerPage{footnote}
+% \end{macrocode}
+% Fix a bug in perpage \ldots
+% \begin{macrocode}
+ \def\@stpelt#1{\global\csname c@#1\endcsname \m@ne
+ \stepcounter{#1}%
+ \pp@fix@MakePerPage{#1}%
+ }
+ \def\pp@fix@MakePerPage#1{%
+ \ifnum \value{#1}>\z@
+ \addtocounter{#1}\m@ne\fi
+ }
+% \end{macrocode}
+% The above code may look a bit odd: the \cs{stepcounter} sets the
+% counter to zero and then we alter it if it is not zero. The
+% reason is that \cs{stepcounter} resets other counters and when
+% perpage is loaded this results in updating counters on the reset
+% list to 1 (or to a higher starting value if \cs{MakePerPage} is
+% used with an optional argument, which is precisely the problem
+% here. By subtracting 1 in that case we set it back to 1 lower
+% than the starting value.
+%
+% But to make this fully work we also need to update a support
+% command in \pkg{perpage}:
+% \begin{macrocode}
+ \def\pp@cl@end@iii\stepcounter#1\pp@fix@MakePerPage#2{}
+\fi
+
+
+\ifFN@para
+
+% 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.
+%
+
+%\AddToHook{fntext/para}{
+% \ifdim \footnotemargin >\z@ \else
+% \PackageWarningNoline{footmisc}{Option 'para' needs positive \noexpand\footnotemargin}%
+% \footnotemargin 1.8em\relax
+% \fi
+%}
+
+
+\AddToHook{fntext/begin}{\nobreak \hspace{.2em}}
+
+
+
+
+\else
+
+ \ifFN@hangfoot
+ \long\def\@makefntext#1{%
+ \bgroup
+ \setbox\@tempboxa\hbox{%
+ \ifdim\footnotemargin>\z@
+ \hb@xt@\footnotemargin{\@makefnmark\hss}%
+ \else
+ \@makefnmark
+ \fi
+ }%
+ \leftmargin\wd\@tempboxa
+ \rightmargin\z@
+ \linewidth \columnwidth
+ \advance \linewidth -\leftmargin
+ \parshape \@ne \leftmargin \linewidth
+ \footnotesize
+ \@setpar{{\@@par}}%
+ \leavevmode
+ \llap{\box\@tempboxa}%
+ \parskip\hangfootparskip\relax
+ \parindent\hangfootparindent\relax
+ \footnotelayout#1%
+ \par
+ \egroup
+ }
+
+ \else
+
+% This is now using the default interface:
+%
+% \long\def\@makefntext#1{%
+% \parindent1em
+% \noindent
+% \ifdim\footnotemargin>\z@
+% \hb@xt@ \footnotemargin{\hss\@makefnmark}%
+% \else
+% \ifdim\footnotemargin=\z@
+% \llap{\@makefnmark}%
+% \else
+% \llap{\hb@xt@ -\footnotemargin{\@makefnmark\hss}}%
+% \fi
+% \fi
+% \footnotelayout#1%
+% }
+
+ \fi
+\fi
+
+
+
+
+\ifFN@multiplefootnote
+ \providecommand*{\multiplefootnotemarker}{3sp}
+ \providecommand*{\multfootsep}{,}
+ \AddToHook{fnmark} {\FN@mf@check}
+ \AddToHook{fnmark/end} {\FN@mf@prepare}
+%
+ \def\FN@mf@prepare{%
+ \kern-\multiplefootnotemarker
+ \kern\multiplefootnotemarker\relax
+ }
+ \def\FN@mf@check{%
+ \ifdim\lastkern=\multiplefootnotemarker\relax
+%?? is that necessary or even correct ??
+ \edef\@x@sf{\the\spacefactor}%
+%?? shouldn't that be 2 unkerns ?? (none would also be ok)
+ \unkern % new
+ \unkern
+ \textsuperscript{\multfootsep}%
+ \spacefactor\@x@sf\relax
+ \fi
+ }
+\else
+ \let\FN@mf@prepare\relax
+\fi
+\ifFN@stablefootnote
+\let\FN@sf@@footnote\footnote
+\def\footnote{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnote
+ \else
+ \expandafter\FN@sf@gobble@opt
+ \fi
+}
+\edef\FN@sf@gobble@opt{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@opt \endcsname}
+\expandafter\def\csname FN@sf@gobble@opt \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@twobracket
+ \@gobble
+}
+\def\FN@sf@gobble@twobracket[#1]#2{}
+\let\FN@sf@@footnotemark\footnotemark
+\def\footnotemark{\ifx\protect\@typeset@protect
+ \expandafter\FN@sf@@footnotemark
+ \else
+ \expandafter\FN@sf@gobble@optonly
+ \fi
+}
+\edef\FN@sf@gobble@optonly{\noexpand\protect
+ \expandafter\noexpand\csname FN@sf@gobble@optonly \endcsname}
+\expandafter\def\csname FN@sf@gobble@optonly \endcsname{%
+ \@ifnextchar[%]
+ \FN@sf@gobble@bracket
+ {}%
+}
+\def\FN@sf@gobble@bracket[#1]{}
+\fi
+\newcommand\setfnsymbol[1]{%
+ \@bsphack
+ \@ifundefined{FN@fnsymbol@#1}%
+ {%
+ \PackageError{footmisc}{Symbol style "#1" not known}%
+ \@eha
+ }{%
+ \expandafter\let\expandafter\@fnsymbol\csname
+ FN@fnsymbol@#1\endcsname
+ }%
+ \@esphack
+}
+\let\FN@fnsymbol@lamport\@fnsymbol
+\newif\if@tempswb
+\DeclareDocumentCommand\DefineFNsymbols {smO{text}m}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldef#4\end
+ \def\@tempc{math}%
+ \def\@tempd{#3}%
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
+ \ifx\@tempc\@tempd
+ \noexpand\ensuremath
+ \else
+ \noexpand\nfss@text
+ \fi
+ {%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
+ }%
+ }%
+}
+\def\FN@build@symboldef#1{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or#1}%
+ \expandafter\FN@build@symboldef
+ \fi
+}
+\DeclareDocumentCommand\DefineFNsymbolsTM {smm}{%
+ \expandafter\ifx\csname FN@fnsymbol@#2\endcsname\relax
+ \PackageInfo{footmisc}{Declaring symbol style #2}%
+ \else
+ \PackageWarning{footmisc}{Redeclaring symbol style #2}%
+ \fi
+ \toks@{}%
+ \def\@tempb{\end}%
+ \FN@build@symboldefTM#3\end\@null
+ \expandafter\xdef\csname FN@fnsymbol@#2\endcsname##1{%
+ \noexpand\ifcase##1%
+ \the\toks@
+ \noexpand\else
+ \IfBooleanTF#1{\noexpand\@ctrerr}%
+ {\noexpand\FN@orange##1}%
+ \noexpand\fi
+ }%
+}
+\def\FN@build@symboldefTM#1#2{%
+ \def\@tempa{#1}%
+ \ifx\@tempa\@tempb
+ \else
+ \toks@\expandafter{\the\toks@\or\TextOrMath{#1}{#2}}%
+ \expandafter\FN@build@symboldefTM
+ \fi
+}
+\def\FN@orange#1{%
+ \ifFN@robust
+ \@arabic#1%
+ \@bsphack
+ \PackageInfo{footmisc}{Footnote number \number#1 out of range}%
+ \protect\@fnsymbol@orange
+ \@esphack
+ \else \@ctrerr \fi
+}
+\global\let\@diagnose@fnsymbol@orange\relax
+\AtEndDocument{\@diagnose@fnsymbol@orange}
+\def\@fnsymbol@orange{%
+ \gdef\@diagnose@fnsymbol@orange{%
+ \PackageWarningNoLine{footmisc}{Some footnote number(s)
+ were out of range
+ \MessageBreak
+ see log for details%
+ }%
+ }%
+}
+\DefineFNsymbolsTM{bringhurst}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \textparagraph \mathparagraph
+}%
+\DefineFNsymbolsTM{chicago}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textbardbl \|%
+ \#\#%
+}%
+\DefineFNsymbolsTM{wiley}{%
+ \textasteriskcentered *%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+}%
+\DefineFNsymbolsTM{lamport-robust}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+}
+\DefineFNsymbolsTM*{lamport*}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\setfnsymbol{lamport*}
+\DefineFNsymbolsTM{lamport*-robust}{%
+ \textasteriskcentered *%
+ \textdagger \dagger
+ \textdaggerdbl \ddagger
+ \textsection \mathsection
+ \textparagraph \mathparagraph
+ \textbardbl \|%
+ {\textasteriskcentered\textasteriskcentered}{**}%
+ {\textdagger\textdagger}{\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger}%
+ {\textsection\textsection}{\mathsection\mathsection}%
+ {\textparagraph\textparagraph}{\mathparagraph\mathparagraph}%
+ {\textasteriskcentered\textasteriskcentered\textasteriskcentered}{***}%
+ {\textdagger\textdagger\textdagger}{\dagger\dagger\dagger}%
+ {\textdaggerdbl\textdaggerdbl\textdaggerdbl}{\ddagger\ddagger\ddagger}%
+ {\textsection\textsection\textsection}%%
+ {\mathsection\mathsection\mathsection}%
+ {\textparagraph\textparagraph\textparagraph}%%
+ {\mathparagraph\mathparagraph\mathparagraph}%
+}
+\newcommand\mpfootnotemark{%
+ \@ifnextchar[%
+ \@xmpfootnotemark
+ {%
+ \stepcounter\@mpfn
+ \protected@xdef\@thefnmark{\thempfn}%
+ \@footnotemark
+ }%
+}
+\def\@xmpfootnotemark[#1]{%
+ \begingroup
+ \csname c@\@mpfn\endcsname #1\relax
+ \unrestored@protected@xdef\@thefnmark{\thempfn}%
+ \endgroup
+ \@footnotemark
+}
+% \end{macrocode}
+% TEMP PATCHES FOR TESTING
+% \begin{macrocode}
+
+\endinput
+%</footmisc>
+% \end{macrocode}
+% \Finale
+%
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf b/macros/latex-dev/required/latex-lab/latex-lab-footnotes.pdf
new file mode 100644
index 0000000000..8d905d055b
--- /dev/null
+++ 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-new-or.dtx b/macros/latex-dev/required/latex-lab/latex-lab-new-or.dtx
new file mode 100644
index 0000000000..08b58a7286
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/latex-lab-new-or.dtx
@@ -0,0 +1,545 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-new-or.dtx
+% Copyright (C) 2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-new-or.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+%
+% \title{The \texttt{latex-lab-new-or} code\thanks{}}
+% \author{Frank Mittelbach, \LaTeX{} Project}
+%
+% \maketitle
+%
+% \newcommand\fmi[1]{\begin{quote} TODO: \itshape #1\end{quote}}
+% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
+% \providecommand\pkg[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% This code implements changes to the output routine.
+%
+%
+%
+%
+% \section{Hooks and configuration points}
+%
+% Note: the configuration points do not have an interface mechanism
+% yet and all their names are temporary right now.
+%
+%
+% \subsubsection{Configuration points}
+%
+% To cater for different layouts with respect to text, footnotes,
+% and bottom-floats placements there are two configuration points for
+% now.
+% \begin{description}
+% \item[\cs{@makecol@cfgpoint} (0 arguments)]
+%
+% In this configuration point the \cs{@outputbox} (holding the
+% galley text for the current column or page) is augmented by
+% attaching floats and footnote areas together with appropriate
+% spacing. Before the code is run any existing glue at the bottom
+% of the \cs{@outputbox} is removed and stored in a safe
+% place. If needed, it can be reinserted with one of the helper
+% commands.
+%
+% To support setting this up the following helper commands are available:
+% \begin{description}
+% \item[\cs{@outputbox@append} (1 argument)]
+%
+% This general purpose command alters the \cs{@outputbox} box by
+% appending material to it.
+%
+% \item[\cs{@outputbox@appendfootnotes} (0 arguments)]
+%
+% This command appends the footnotes to the \cs{@outputbox} (if
+% there are any). If not, then it does nothing.
+%
+% \item[\cs{@outputbox@attachfloats} (0 arguments)]
+% \item[\cs{@outputbox@attachtopfloats} (0 arguments)]
+% \item[\cs{@outputbox@attachbottomfloats} (0 arguments)]
+%
+% Attaching top and bottom floats can usually be done in one
+% go, but for special layouts we might want more control so we
+% provide also separate commands.
+%
+% \item[\cs{@outputbox@reinsertbskip} (0 arguments)]
+%
+% Reinsert the bottom skip of the \cs{@outputbox} that was
+% saved before.
+%
+% \item[Testing for existence of material]
+%
+% There are a number of helpers to run conditional code
+% depending on whether or not there are footnotes or bottom
+% floats. They are \cs{@if@footnotes@TF} and
+% \cs{@if@bfloats@TF}
+% (names are likely to change).
+%
+% \end{description}
+% This configuration point needs an appropriate definition; a
+% default is already given in the kernel.
+%
+% \item[\cs{@makecol@cfgpointii} (0 arguments)]
+%
+% This configuration point is used to manipulate the footnote
+% material inside \cs{box}\cs{footins}. It if contains code, it
+% is supposed to do some processing of that box and then write
+% the result back into it (and nothing else!). By default it
+% does nothing.
+%
+% \end{description}
+%
+% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
+%
+%
+% \section{The Implementation}
+%
+% \begin{macrocode}
+%<*code>
+% \end{macrocode}
+%
+% \subsection{File declaration}
+% \begin{macrocode}
+\ProvidesFile{latex-lab-new-or.ltx}
+ [2022-03-09 v0.1b changes to the output routine]
+% \end{macrocode}
+% \subsection{\cs{@makecol} reimplementation}
+%
+% In order for other packages to prepend or append code to
+% \cs{@makecol}, they can use the generic command hooks
+% \texttt{cmd/@makecol/before} and \texttt{cmd/@makecol/after}, so
+% there is nothing we need to do here.
+%
+%
+% \begin{macro}{\@makecol}
+% \cs{@makecol} is shortened a lot, basically all the hardwired
+% code in the middle has moved into a configuration point.
+% \begin{macrocode}
+\def \@makecol {%
+ \@kernel@before@cclv
+ \setbox\@outputbox \box\@cclv
+% \end{macrocode}
+% The only real addition is the next command which either does
+% nothing or removes an infinite glue from the bottom of the
+% \cs{@outputbox}.
+% \begin{macrocode}
+ \@outputbox@removebskip
+% \end{macrocode}
+% Any ``here'' floats in the \cs{@outputbox} are now handled so we
+% recycle their registers and put them back to the \cs{@freelist}.
+% \begin{macrocode}
+ \let\@elt\relax
+ \xdef\@freelist{\@freelist\@midlist}%
+ \global \let \@midlist \@empty
+% \end{macrocode}
+% Here we have the configurable part.
+% \fmi{Interface to configuration points will change in the future}
+% \begin{macrocode}
+ \@makecol@cfgpoint
+% \end{macrocode}
+% The we deal with any \cs{enlargethispage} or run the normal code
+% to build a column.
+% \begin{macrocode}
+ \ifvbox\@kludgeins
+ \@makespecialcolbox
+ \else
+ \@makenormalcolbox
+ \fi
+ \global \maxdepth \@maxdepth
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputbox@depth}
+% We need to know the depth of \cs{@outputbox} once in a
+% while. Rather than using a temp dimen (as it was done in the
+% past), we give it a proper register.
+% \begin{macrocode}
+\newdimen\@outputbox@depth
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\@makenormalcolbox}
+% Taken out of \cs{@makecol} for readability.
+% \begin{macrocode}
+\def \@makenormalcolbox {%
+ \setbox\@outputbox \vbox to\@colht {%
+ \@texttop
+ \@outputbox@depth \dp\@outputbox
+ \unvbox \@outputbox
+ \vskip -\@outputbox@depth
+ \@textbottom
+ }%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@makespecialcolbox}
+% Make the colbox when \cs{enlargethispage} was used.
+% \begin{macrocode}
+\def \@makespecialcolbox {%
+ \@outputbox@append {\vskip-\@outputbox@depth}%
+ \@tempdima \@colht
+ \ifdim \wd\@kludgeins>\z@
+ \advance \@tempdima -\ht\@outputbox
+ \advance \@tempdima \pageshrink
+ \setbox\@outputbox \vbox to \@colht {%
+ \unvbox\@outputbox
+ \vskip \@tempdima
+ \@textbottom
+ }%
+ \else
+ \advance \@tempdima -\ht\@kludgeins
+ \setbox \@outputbox \vbox to \@colht {%
+ \vbox to \@tempdima {%
+ \unvbox\@outputbox
+ \@textbottom}%
+ \vss}%
+ \fi
+ {\setbox \@tempboxa \box \@kludgeins}%
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@outputbox@removebskip}
+%
+% This is really a bug fix for the kernel but one we only
+% automatically make in new documents using \cs{DocumentMetadata}.
+% \fmi{may make optional for legacy docs}
+% If
+% \cs{raggedbottom} is in force, footnotes get attached to the main
+% galley at a distance of \cs{footskip} on all pages except on
+% those that are ended by \cs{newpage} or \cs{clearpage} where the
+% \cs{vfil} from \cs{newpage} pushes the footnotes to the very bottom.
+%
+% This is kind of a weird difference to a page ending with
+% \cs{pagebreak}---in that case the page is also run
+% short, but the footnotes are not pushed to the bottom.
+%
+% In \pkg{footmisc} \cs{@outputbox@removebskip} is only applied when
+% \pkg{footmisc} is called with with an option specifying the
+% footnote placement, i.e., not in the default case.
+% In new documents we apply it always.
+% \begin{macrocode}
+\def\@outputbox@removebskip{%
+% \end{macrocode}
+% We first test if we are in a \cs{raggedbottom} layout. If not we
+% do nothing, but we don't disable the code because
+% \cs{raggedbottom} may get used only for some parts of the
+% document.
+% \begin{macrocode}
+ \ifx\@textbottom\relax \else
+% \end{macrocode}
+% We then append some negative glue at the end of \cs{@outputbox}
+% provided it has a glue stretch order of 1 or more (i.e., contains
+% a \texttt{fil} or \texttt{fill} part).
+% \begin{macrocode}
+ \@outputbox@append{%
+ \@tempskipa\lastskip
+ \ifnum \gluestretchorder\@tempskipa>\z@
+ \vskip-\@tempskipa
+% \end{macrocode}
+% \begin{macro}{\@outputbox@reinsertbskip}
+% We also record the value so that it can be reinserted
+% elsewhere. As we have to do this globally, we also need to
+% explicitly reset it if we don't find any such glue.
+% \begin{macrocode}
+ \xdef\@outputbox@reinsertbskip
+ {\noexpand\@outputbox@append{\vskip\the\@tempskipa}}%
+ \else
+ \global\let\@outputbox@reinsertbskip\relax
+ \fi
+ }%
+ \fi
+}
+% \end{macrocode}
+% We need a trivial top-level definition for
+% \cs{@outputbox@reinsertbskip} in case the first page has no
+% bottom glue and the command gets called.
+% \begin{macrocode}
+\let\@outputbox@reinsertbskip\relax
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@kernel@before@cclv}
+% \begin{macro}{\@kernel@before@footins}
+% These two commands are internal kernel hooks intended for tagging
+% support in case that is active. By default they do nothing (and
+% may have been defined already by \cs{DocumentMetadata}).
+% \begin{macrocode}
+\providecommand\@kernel@before@cclv{}
+\providecommand\@kernel@before@footins{}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \subsection{The output routine configuration components}
+%
+% Here we provide the components that are used to define
+% \cs{@makecol@cfgpoint}.
+%
+%
+% \begin{macro}{\@outputbox@append}
+%
+% This general purpose command alters the \cs{@outputbox} box by
+% appending material to it. As this is a box typesetting operation
+% we make sure that the last line of the box reflects the true
+% depth of the last line (in case that is needed later). We also
+% expose the current depth of \cs{@outputbox} as
+% \cs{@outputbox@depth} before unboxing so that its value can be
+% used by \verb=#1= if wanted.
+% \begin{macrocode}
+\def\@outputbox@append #1{%
+% \if!\detokenize{#1}!\else
+ \setbox\@outputbox \vbox {%
+ \boxmaxdepth \@maxdepth
+ \@outputbox@depth\dp\@outputbox % if needed in #1
+ \unvbox \@outputbox
+ #1%
+ }%
+% \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+%
+%
+% \begin{macro}{\@outputbox@appendfootnotes}
+%
+% This command appends the footnotes to the \cs{@outputbox} (if
+% there are any). If not then it does nothing.
+% \begin{macrocode}
+\def\@outputbox@appendfootnotes {%
+ \ifvoid\footins \else
+% \end{macrocode}
+% First come two configuration points: what to do if we are in a split
+% footnote situation and a second one that does some manipulation
+% of the \cs{footins} box before it gets appended.
+% \fmi{this code will get revised as part of CP handling in the future}
+% \begin{macrocode}
+ \@makecol@handlesplitfootnotes
+ \@makecol@cfgpointii
+% \end{macrocode}
+% Then the footnotes are appended:
+% \begin{macrocode}
+ \@outputbox@append{%
+ \vskip \skip\footins
+ \@kernel@before@footins
+ \color@begingroup
+ \normalcolor
+ \footnoterule
+% \end{macrocode}
+% Support for \pkg{pdfcolfoot}, eventually this can go once color
+% is properly supported.
+% \begin{macrocode}
+ \csname pdfcolfoot@current\endcsname
+ \unvbox \footins
+ \color@endgroup
+ }%
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@outputbox@attachfloats}
+% \begin{macro}{\@outputbox@attachtopfloats}
+% \begin{macro}{\@outputbox@attachbottomfloats}
+% Attaching top and bottom floats can usually be done in one go,
+% but for special layouts we might want more control so we provide
+% also separate commands.
+% \begin{macrocode}
+\let \@outputbox@attachfloats \@combinefloats
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def \@outputbox@attachtopfloats {%
+ \ifx \@toplist\@empty \else \@cflt \fi
+}
+\def \@outputbox@attachbottomfloats {%
+ \ifx \@botlist\@empty \else \@cflb \fi
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+%
+% \begin{macro}{\@makecol@handlesplitfootnotes}
+% \begin{macro}{\@makecol@splitfootnotemessagehook}
+% This is only an early draft and doesn't do much.
+% Contains incomplete preparation for tagging commented out.
+% \fmi{Interfaces and code will change in the future}
+% \begin{macrocode}
+\def\@makecol@handlesplitfootnotes {%
+% \ifx\splitfootnote@continuation\@empty \else
+% \setbox\footins\vbox{\splitfootnote@continuation\unvbox\footins}%
+% \global\let\splitfootnote@continuation\@empty
+% \fi
+ \ifnum\insertpenalties>\z@
+ \@makecol@splitfootnotemessagehook
+% \setbox\footins\vbox{\unvbox\footins --- END at split}%
+% \gdef\splitfootnote@continuation {--- START after split}%
+ \fi
+}
+%\def\splitfootnote@continuation{}
+% \end{macrocode}
+% This could issue warning if split footnotes are encountered.
+% \begin{macrocode}
+\let \@makecol@splitfootnotemessagehook \@empty
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+%
+%
+% \begin{macro}{\@makecol@cfgpointii}
+%
+% Configuration point to support manipulation of footins box
+% (result needs to be moved back in there). Used by the
+% \texttt{para} option.
+% \fmi{Interface will change in the future}
+% \begin{macrocode}
+\let \@makecol@cfgpointii \@empty
+% \end{macrocode}
+%
+% \end{macro}
+%
+%
+%
+% \fmi{Some temp interfaces until configuration points are available.}
+%
+% \begin{macro}{\@if@flushbottom@TF}
+% Test for \cs{flushbottom} (currently not used).
+% \begin{macrocode}
+\def\@if@flushbottom@TF{%
+ \ifx\@textbottom\relax
+ \expandafter\@firstoftwo
+ \else
+ \expandafter\@secondoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@if@footnotes@TF}
+% Test if footnotes are present on the current page.
+% \begin{macrocode}
+\def\@if@footnotes@TF{%
+ \ifvoid\footins
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \begin{macro}{\@if@bfloats@TF}
+% Test if bottom floats are around.
+% \begin{macrocode}
+\def\@if@bfloats@TF{%
+ \ifx \@botlist\@empty
+ \expandafter\@secondoftwo
+ \else
+ \expandafter\@firstoftwo
+ \fi
+}
+% \end{macrocode}
+% \end{macro}
+%
+%
+%
+% \subsection{The \cs{@makecol} configuration}
+%
+%
+% \begin{macro}{\@makecol@cfgpoint}
+%
+% Here is only the configuration for the default case for now,
+% others are provided by \pkg{footmisc}.
+%
+% \begin{macrocode}
+ \def\@makecol@cfgpoint {%
+ \@outputbox@appendfootnotes
+ \@outputbox@attachfloats
+% \end{macrocode}
+% We do, however, reinsert the bottom skip from \cs{newpage} if it
+% was taken out earlier. This is, strictly speaking, not necessary
+% in most cases, but it is a \cs{vfil} while \cs{raggedbottom} is
+% only generating \verb=\vspace{0pt plus .0001fil}=, so if you have
+% several \cs{vfil} on the page before the \cs{newpage} you would
+% alter the space distribution if one is taken out.
+% \begin{macrocode}
+ \@outputbox@reinsertbskip
+ }
+% \end{macrocode}
+% \end{macro}
+%
+%
+% \section {Replacement for the \pkg{footmisc} package}
+%
+% The replacement for \pkg{footmisc}. If the new code is used, we must replace
+% the package if it is loaded by the user:
+% \begin{macrocode}
+\declare@file@substitution{footmisc.sty}{latex-lab-footmisc.ltx}
+% \end{macrocode}
+%
+%
+%
+% \section {Temp stuff that is related but should go to the kernel}
+%
+% \begin{macrocode}
+\input{latex-lab-footnotes.ltx}
+% \end{macrocode}
+%
+%
+% \begin{macrocode}
+%</code>
+% \end{macrocode}
+%
+% \Finale
+%
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-new-or.pdf b/macros/latex-dev/required/latex-lab/latex-lab-new-or.pdf
new file mode 100644
index 0000000000..3d7c9318a1
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/latex-lab-new-or.pdf
Binary files differ
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-prototype.dtx b/macros/latex-dev/required/latex-lab/latex-lab-prototype.dtx
new file mode 100644
index 0000000000..090e6c91a4
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/latex-lab-prototype.dtx
@@ -0,0 +1,827 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-prototype.dtx
+%
+% Copyright (C) 1999 Frank Mittelbach, Chris Rowley, David Carlisle
+% (C) 2004-2010 Frank Mittelbach, The LaTeX Project
+% (C) 2011-2022 The LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+% This file is part of the "latex-lab bundle" (The Work in LPPL)
+% and all files in that bundle must be distributed together.
+%
+% -----------------------------------------------------------------------
+%
+% The development version of the bundle can be found at
+%
+% https://github.com/latex3/latex2e
+%
+% for those people who are interested.
+%
+%<*driver>
+\documentclass[full]{l3doc}
+\begin{document}
+ \DocInput{\jobname.dtx}
+\end{document}
+%</driver>
+% \fi
+%
+% \title{^^A
+% The \textsf{latex-lab-prototype} package\\ Prototype document functions^^A
+% }
+%
+% \author{^^A
+% The \LaTeX{} Project\thanks
+% {^^A
+% E-mail:
+% \href{mailto:latex-team@latex-project.org}
+% {latex-team@latex-project.org}^^A
+% }^^A
+% }
+%
+% \date{Released 2022-03-09}
+%
+% \maketitle
+%
+% \tableofcontents
+%
+% \bigskip
+%
+% \begin{documentation}
+%
+% There are three broad \enquote{layers} between putting down ideas into
+% a source file and ending up with a typeset document. These layers of
+% document writing are
+% \begin{enumerate}
+% \item authoring of the text with mark-up;
+% \item document layout design;
+% \item implementation (with \TeX{} programming) of the design.
+% \end{enumerate}
+% We write the text as an author, and we see the visual output of the design
+% after the document is generated; the \TeX{} implementation in the middle is
+% the glue between the two.
+%
+% \LaTeX{}'s greatest success has been to standardise a system of mark-up that
+% balances the trade-off between ease of reading and ease of writing to suit
+% almost all forms of technical writing. It's
+% other original strength was a good background in typographical design; while
+% the standard \LaTeXe{} classes look somewhat dated now in terms of their
+% visual design, their typography is generally sound. (Barring the occasional
+% minor faults.)
+%
+% However, \LaTeXe{} has always lacked a standard approach to customising
+% the visual design of a document. Changing the looks of the standard classes
+% involved either:
+% \begin{itemize}
+% \item Creating a new version of the implementation code of the class and
+% editing it.
+% \item Loading one of the many packages to customise certain elements of
+% the standard classes.
+% \item Loading a completely different document class, such as
+% \textsf{KOMA-Script} or \textsf{memoir}, that allows easy customisation.
+% \end{itemize}
+% All three of these approaches have their drawbacks and learning curves.
+%
+% The idea behind this module is to cleanly separate the three layers
+% introduced at the beginning of this section, so that document authors who
+% are not programmers can easily change the design of their documents.
+% The approach here also makes it easier for \LaTeX{} programmers to provide
+% their own customisations on top of a pre-existing class.
+%
+% \section{What is a document?}
+%
+% Besides the textual content of the words themselves, the source file
+% of a document contains mark-up elements that add structure to the
+% document. These elements include sectional divisions, figure/table
+% captions, lists of various sorts, theorems/proofs, and so on.
+% The list will be different for every document that can be written.
+%
+% Each element can be represented logically without worrying about the
+% formatting, with mark-up such as \cs{section}, \cs{caption},
+% |\begin{enumerate}| and so on. The output of each one of these
+% document elements will be a typeset representation of the information
+% marked up, and the visual arrangement and design of these elements
+% can vary widely in producing a variety of desired outcomes.
+%
+% For each type of document element, there may be design variations that
+% contain the same sort of information but present it in slightly
+% different ways. For example, the difference between a numbered and an
+% unnumbered section, \cs{section} and |\section*|, or the difference
+% between an itemised list or an enumerated list.
+%
+% There are three distinct layers in the definition of
+% \enquote{a document} at this level
+% \begin{enumerate}
+% \item semantic elements such as the ideas of sections and lists;
+% \item a set of design solutions for representing these elements
+% visually;
+% \item specific variations for these designs that represent the
+% elements in the document.
+% \end{enumerate}
+% In the parlance of the template system, these are called object types,
+% templates, and instances, and they are discussed below in sections
+% \ref{sec:objects}, \ref{sec:templates}, and~\ref{sec:instances},
+% respectively.
+%
+% By formally declaring documents to be composed of mark-up elements
+% grouped into objects, which are interpreted and typeset with a set of
+% templates, each of which has one or more instances with which to
+% compose each and every semantic unit of the text, we can cleanly
+% separate the components of document construction.
+%
+% \section{Object types}
+% \label{sec:objects}
+%
+% An \emph{object type} (sometimes just \enquote{object}) is an
+% abstract idea of a document element that takes a fixed number of
+% arguments corresponding to the information from the document author
+% that it is representing. A sectioning object, for example, might take
+% three inputs: \enquote{title}, \enquote{short title}, and
+% \enquote{label}.
+%
+% Any given document class will define which object types are to be
+% used in the document, and any template of a given object type can be
+% used to generate an instance for the object. (Of course, different
+% templates will produce different typeset representations, but the
+% underlying content will be the same.)
+%
+% \begin{function}{\prototype_declare_object:nn}
+% \begin{syntax}
+% \cs{prototype_declare_object:nn} \Arg{object type} \Arg{no.~of args}
+% \end{syntax}
+% This function defines an \meta{object type} taking
+% \meta{no.~of arguments}, where the \meta{object type} is an
+% abstraction as discussed above. For example,
+% \begin{verbatim}
+% \prototype_declare_object:nn { sectioning } { 3 }
+% \end{verbatim}
+% creates an object type \enquote{sectioning}, where each use of that
+% object type will need three arguments.
+%
+% While not formally verified the semantics of all arguments are part
+% of the object declaration and need to be carefully documented in
+% order to make the use of different templates for the same object
+% type meaningful.
+% \end{function}
+%
+% \section{Templates}
+% \label{sec:templates}
+%
+% A \emph{template} is a generalised design solution for representing
+% the information of a specified object type. Templates that do the same
+% thing, but in different ways, are grouped together by their object type
+% and given separate names. There are two important parts to a template:
+% \begin{itemize}
+% \item the parameters it takes to vary the design it is producing;
+% \item the implementation of the design.
+% \end{itemize}
+%
+% \begin{function}{\prototype_declare_template:nnnn}
+% \begin{syntax}
+% \cs{prototype_declare_template:nnnn}
+% ~~\Arg{object type} \Arg{template}
+% ~~\Arg{key definitions} \Arg{code}
+% \end{syntax}
+% A \meta{template} interface is declared for a particular
+% \meta{object type}. The interface itself is
+% defined by the \meta{key definitions}, which is itself a key--value list
+% using the same interface as \cs{keys_define:nn}. (The keys created
+% here \emph{are} managed \pkg{l3keys} in the tree
+% \texttt{prototype/\meta{object}/\meta{template}}). As described below,
+% the keys should be defined such that they can be set multiple times:
+% first to a default value, then to a specific value for an instance
+% and finally to a per-use override.
+%
+% The \meta{code} argument of \cs{template_declare_template:nnnn} is used
+% as the replacement text for the template when it is used, either
+% directly or as an instance. This may therefore accept arguments
+% |#1|, |#2|, \emph{etc}.~as detailed by the \meta{number of arguments}
+% taken by the object type. The template and instance key values (see
+% below) are assigned before the \meta{code} is inserted.
+% \end{function}
+%
+% \begin{function}{\prototype_declare_defaults:nnn}
+% \begin{syntax}
+% \cs{prototype_declare_template:nnnn}
+% ~~\Arg{object type} \Arg{template} \Arg{defaults}
+% \end{syntax}
+% Sets the default values for each \meta{key} in a \meta{template}. When
+% a template is used, these values are applied first \emph{before} those
+% set by \cs{prototype_use_template:nnn} or
+% \cs{prototype_declare_instance:nnnn}. If not default is given, the
+% prevailing state when the template is used will apply.
+% \end{function}
+%
+% \section{Instances}
+% \label{sec:instances}
+%
+% After a template is defined it still needs to be put to use. The
+% parameters that it expects need to be defined before it can be used in
+% a document. Every time a template has parameters given to it, an
+% \emph{instance} is created, and this is the code that ends up in the
+% document to perform the typesetting of whatever pieces of information
+% are input into it.
+%
+% For example, a template might say \enquote{here is a section with or
+% without a number that might be centred or left aligned and print its
+% contents in a certain font of a certain size, with a bit of a gap
+% before and after it} whereas an instance declares \enquote{this is a
+% section with a number, which is centred and set in $12\,\text{pt}$
+% italic with a $10\,\text{pt}$ skip before and a
+% $12\,\text{pt}$ skip after it}. Therefore, an instance is just a
+% frozen version of a template with specific settings as chosen by the
+% designer.
+%
+% \begin{function}{\prototype_declare_instance:nnnn}
+% \begin{syntax}
+% \cs{prototype_declare_instance:nnnn}
+% ~~\Arg{object type} \Arg{template} \Arg{instance} \Arg{parameters}
+% \end{syntax}
+% This function uses a \meta{template} for an \meta{object type}
+% to create an \meta{instance}. The \meta{instance} will be set
+% up using the \meta{parameters}, which will set some of the
+% \meta{keys} in the \meta{template}.
+%
+% As a practical example, consider an object type for document sections
+% (which might include chapters, parts, sections, \emph{etc}.), which
+% is called \texttt{sectioning}. One possible template for this
+% object type might be called \texttt{basic}, and one instance of this
+% template would be a numbered section. The instance declaration might
+% read:
+% \begin{verbatim}
+% \prototype_declare_instance:nnnn { sectioning } { basic } { section-num }
+% {
+% numbered = true ,
+% justification = center ,
+% font = \normalsize\itshape ,
+% before-skip = 10pt ,
+% after-skip = 12pt ,
+% }
+% \end{verbatim}
+% Of course, the key names here are entirely imaginary, but illustrate
+% the general idea of fixing some settings.
+% \end{function}
+%
+% \section{Document interface}
+%
+% After the instances have been chosen, document commands must be
+% declared to use those instances in the document.
+% \cs{prototype_use_instance:nn}
+% calls instances directly, and this command should be used internally
+% in document-level mark-up.
+%
+% \begin{function}{\prototype_use_instance:nn, \prototype_use_instance:nnn}
+% \begin{syntax}
+% \cs{prototype_use_instance:nn}
+% ~~\Arg{object type} \Arg{instance} \meta{arguments}
+% \cs{prototype_use_instance:nn}n
+% ~~\Arg{object type} \Arg{instance} \Arg{overrides} \meta{arguments}
+% \end{syntax}
+% Uses an \meta{instance} of the \meta{object type}, which will require
+% \meta{arguments} as determined by the number specified for the
+% \meta{object type}. The \meta{instance} must have been declared
+% before it can be used, otherwise an error is raised. The \texttt{nnn}
+% version allows for local overrides of the instance settings using the
+% additional keyval argument.
+% \end{function}
+%
+% \begin{function}{\prototype_use_template:nnnn}
+% \begin{syntax}
+% \cs{prototype_use_template:nnnn} \Arg{object type} \Arg{template}
+% ~~\Arg{settings} \meta{arguments}
+% \end{syntax}
+% Uses the \meta{template} of the specified \meta{object type},
+% applying the \meta{settings} and absorbing \meta{arguments} as
+% detailed by the \meta{object type} declaration. This in effect
+% is the same as creating an instance using
+% \cs{template_declare_instance:nnnn} and immediately using it with
+% \cs{template_use_instance:nnn}, but without the instance having any
+% further existence. It is therefore useful where a template needs to
+% be used once.
+% \end{function}
+%
+% \section{Showing template information}
+%
+% \begin{function}
+% {
+% \prototype_show_template_code:nn ,
+% \prototype_show_template_defaults:nn ,
+% \prototype_show_instance_values:nn
+% }
+% \begin{syntax}
+% \cs{prototype_show_template_code:nn} \Arg{object type} \Arg{template}
+% \cs{prototype_show_template_defaults:nn} \Arg{object type} \Arg{template}
+% \cs{prototype_show_instance_values:nn} \Arg{object type} \Arg{instance}
+% \end{syntax}
+% Show information about a declare template or instance for
+% debugging purposes.
+% \end{function}
+%
+% \section{Open questions and comparison with \pkg{xtemplate}}
+%
+% The approach here is modelled on that from \pkg{xtemplate}, but since it uses
+% \pkg{l3keys} rather than dedicated key handling, there are some differences.
+% There is also a simplification in that collections are not supported
+% (because we now think that they provided the wrong kind of abstraction).
+%
+% The various open questions, including those linked to \pkg{xtemplate}
+% concepts, are collected here.
+%
+% \subsection{Module name}
+%
+% This is currently open for ideas: traditionally \texttt{template} has
+% been used. This may link to the need for both templates and instances
+% (\emph{vide infra}).
+%
+% \subsection{Design-level names}
+%
+% These are currently not provided. That allows both this code and
+% \pkg{xtemplate} to be loaded in the same document. We will likely want
+% to decide on these names: they could for example include
+% \texttt{Prototype} or \texttt{Design}, or could use the existing
+% \pkg{xtemplate} if a compatibility approach can be designed.
+%
+% \subsection{Objects}
+%
+% Is this name clear? A possible alternative is `element'.
+%
+% \subsection{Efficiency and repetition of key setting}
+%
+% In the \pkg{xtemplate} implementation, keys values are stored in property
+% lists before being applied. This means that when creating an instance, the
+% template defaults can be replaced entirely by any instance values. In
+% contrast, the approach here simply precompiles all of the template defaults,
+% then appends the precompiled list from the instance. Some variables are
+% therefore set twice. More importantly, this means that arbitrary code
+% could be executed twice: authors need to be aware of this.
+%
+% \subsection{Key ordering}
+%
+% Linked to the previous idea, in \pkg{xtemplate} keys are set in the
+% order they are declared in the setup. In contrast, using \pkg{l3keys}
+% they are set in the order the keys are given in the input. Is this OK?
+%
+% \subsection{Setting defaults}
+%
+% The current approach requires setting the defaults separately from
+% the key creation. That means listing keys twice. However, it also
+% avoids further overloading of the keyval setup. Is this reasonable?
+%
+% \subsection{The need for templates and instances}
+%
+% In \pkg{xtemplate}, storing keys in a \texttt{prop} means that there
+% is a real efficiency when creating an instance. In contrast, using
+% precompiled keys here, creating a template and creating an instance
+% are almost identical. Could we drop the distinction? That would then
+% work well if we allowed instances to be derived from others: effectively
+% the same as instances from templates, but with a `flatter' approach.
+%
+% \subsection{Assignment of key values}
+%
+% The \pkg{xtemplate} approach uses \cs{AssignTemplateKeys} to
+% specify when keys are assigned. In contrast, here key assignment is
+% automatic. If you look over \TeX{} Live, the only places that
+% \cs{AssignTemplateKeys} is not the first thing in the code are in limited
+% use cases in \pkg{enotez} and \pkg{xgalley}. In both packages, that's because
+% they want to limit the scope of assignment. In \pkg{enotez} the key setting
+% is placed inside a group, whereas in \pkg{xgalley} there is a
+% save-and-restore approach as a group is not possible. Both of those use-cases
+% could be covered in other ways: it's a question of setting up the template
+% keys so they assign to an intermediate variable, then assigning those as
+% necessary to the live ones for these cases.
+%
+% The main reason for not using \cs{AssignTemplateKeys} is that the common
+% case doesn't need it. We could of course stick to an explicit-assignment
+% approach, or have two variants or template-creation, etc., where assignment
+% is manual in one of them.
+%
+% \subsection{Values from other keys}
+%
+% The \pkg{xtemplate} approach offers \cs{KeyValue} to pass the value of
+% one key as the default for another. That relies on the fact that key
+% setting is ordered (\emph{vide supra}). It also means that there is
+% some code to check for this as part of key setting: it's non-trivial
+% to support. The current \pkg{l3keys}-based code doesn't offer this.
+% Instead one could use for example meta keys. That is a different
+% interface and might occasionally be awkward. We can add some
+% \texttt{.store-value:n} property to allow a \cs{keys_value:nn} approach,
+% but without key ordering it might still not work in the same way.
+%
+% \subsection{The nature of debugging data}
+%
+% Due to the differences in data storage, the \pkg{xtemplate} method offers
+% a richer ability to debug template internals than the one here. We can look
+% at \emph{e.g.}\ tracking all keys for a template to make this easier.
+% It is worth noting that much of this data is really something that
+% should be part of the documentation anyway. Also, it would be trivial
+% to save the raw defaults and do the `hard' processing only if asked
+% to show the values (\emph{i.e.}\ using code similar to that in
+% \pkg{xtemplate}).
+%
+% \subsection{Collections}
+%
+% These are not implemented at all: we likely want a new approach to
+% contexts.
+%
+% \end{documentation}
+%
+% \begin{implementation}
+%
+% \section{\pkg{latex-lab-prototype} Implementation}
+%
+% \subsection{File declaration}
+% \begin{macrocode}
+%<*package>
+\ProvidesFile{latex-lab-prototype.sty}
+ [2022-03-09 v0.1b Experimental prototype document functions]
+%</package>
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<*2ekernel>
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOn
+% \end{macrocode}
+%
+% \subsection{\cs{keys_precompile:nnN}}
+%
+% \begin{macrocode}
+%<@@=keys>
+% \end{macrocode}
+%
+% This may not yet be available in \pkg{expl3} so we ensure it is set up
+% here: all temporary. We just redefine those internals that need it.
+% \begin{macrocode}
+\tl_if_exist:NF \l_@@_precompile_tl
+ {
+ \bool_new:N \l_@@_precompile_bool
+ \tl_new:N \l_@@_precompile_tl
+ }
+\cs_gset_protected:Npn \@@_precompile:n #1
+ {
+ \bool_if:NTF \l_@@_precompile_bool
+ { \tl_put_right:Nn \l_@@_precompile_tl }
+ { \use:n }
+ {#1}
+ }
+\cs_gset_protected:Npn \@@_bool_set:Nnnn #1#2#3#4
+ {
+ \bool_if_exist:NF #1 { \bool_new:N #1 }
+ \@@_choice_make:
+ \@@_cmd_set:nx { \l_keys_path_str / true }
+ { \exp_not:c { bool_ #2 set_ #3 :N } \exp_not:N #1 }
+ \@@_cmd_set:nx { \l_keys_path_str / false }
+ { \exp_not:c { bool_ #2 set_ #4 :N } \exp_not:N #1 }
+ \@@_cmd_set_direct:nn { \l_keys_path_str / unknown }
+ {
+ \msg_error:nnx { keys } { boolean-values-only }
+ \l_keys_key_str
+ }
+ \@@_default_set:n { true }
+ }
+\cs_gset_protected:Npn \@@_choice_make_aux:N #1
+ {
+ \cs_set_nopar:cpn { \c_@@_type_root_str \l_keys_path_str }
+ { choice }
+ \@@_cmd_set_direct:nn \l_keys_path_str { #1 {##1} }
+ \@@_cmd_set_direct:nn { \l_keys_path_str / unknown }
+ {
+ \msg_error:nnxx { keys } { choice-unknown }
+ \l_keys_path_str {##1}
+ }
+ }
+\cs_gset_protected:Npn \@@_cmd_set:nn #1#2
+ { \@@_cmd_set_direct:nn {#1} { \@@_precompile:n {#2} } }
+\cs_gset_protected:Npn \@@_cmd_set_direct:nn #1#2
+ { \cs_set_protected:cpn { \c_@@_code_root_str #1 } ##1 {#2} }
+\cs_gset_protected:Npn \@@_cs_set:NNpn #1#2#3#
+ {
+ \cs_set_protected:cpx { \c_@@_code_root_str \l_keys_path_str } ##1
+ {
+ \@@_precompile:n
+ { #1 \exp_not:N #2 \exp_not:n {#3} {##1} }
+ }
+ \use_none:n
+ }
+\cs_gset_protected:Npn \@@_meta_make:n #1
+ {
+ \exp_args:NVo \@@_cmd_set_direct:nn \l_keys_path_str
+ {
+ \exp_after:wN \keys_set:nn \exp_after:wN
+ { \l_@@_module_str } {#1}
+ }
+ }
+\cs_gset_protected:Npn \@@_meta_make:nn #1#2
+ {
+ \exp_args:NV \@@_cmd_set_direct:nn
+ \l_keys_path_str { \keys_set:nn {#1} {#2} }
+ }
+\cs_gset_protected:Npn \keys_precompile:nnN #1#2#3
+ {
+ \bool_set_true:N \l_@@_precompile_bool
+ \tl_clear:N \l_@@_precompile_tl
+ \keys_set:nn {#1} {#2}
+ \bool_set_false:N \l_@@_precompile_bool
+ \tl_set_eq:NN #3 \l_@@_precompile_tl
+ }
+\cs_gset_protected:Npn \@@_show:Nnn #1#2#3
+ {
+ #1 { keys } { show-key }
+ { \@@_trim_spaces:n { #2 / #3 } }
+ {
+ \keys_if_exist:nnT {#2} {#3}
+ {
+ \exp_args:Nnf \msg_show_item_unbraced:nn { code }
+ {
+ \exp_args:Ne \@@_show:n
+ {
+ \exp_args:Nc \cs_replacement_spec:N
+ {
+ \c_@@_code_root_str
+ \@@_trim_spaces:n { #2 / #3 }
+ }
+ }
+ }
+ }
+ }
+ { } { }
+ }
+\cs_gset:Npx \@@_show:n #1
+ {
+ \exp_not:N \@@_show:w
+ #1
+ \tl_to_str:n { \@@_precompile:n }
+ #1
+ \tl_to_str:n { \@@_precompile:n }
+ \exp_not:N \s_@@_stop
+ }
+\use:x
+ {
+ \cs_gset:Npn \exp_not:N \@@_show:w
+ ##1 \tl_to_str:n { \@@_precompile:n }
+ ##2 \tl_to_str:n { \@@_precompile:n }
+ ##3 \exp_not:N \s_@@_stop
+ }
+ {
+ \tl_if_blank:nTF {#2}
+ {#1}
+ { \@@_show:Nw #2 \s_@@_stop }
+ }
+\use:x
+ {
+ \cs_gset:Npn \exp_not:N \@@_show:Nw ##1##2
+ \c_right_brace_str \exp_not:N \s_@@_stop
+ }
+ {#2}
+% \end{macrocode}
+%
+% \subsection{Setup}
+%
+% \begin{macrocode}
+%<@@=prototype>
+% \end{macrocode}
+%
+% \begin{variable}{\l_@@_tmp_tl}
+% \begin{macrocode}
+\tl_new:N \l_@@_tmp_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Data structures}
+%
+% \begin{variable}{\l_@@_object_prop}
+% \begin{macrocode}
+\prop_new:N \l_@@_object_prop
+% \end{macrocode}
+% \end{variable}
+%
+% \subsection{Creating objects}
+%
+% \begin{macro}{\prototype_declare_object:nn, \@@_declare_object:nn}
+% Although the object type is the \enquote{top level} of the template
+% system, it is actually very easy to implement. All that happens is that
+% the number of arguments required is recorded, indexed by the name of the
+% object type.
+% \begin{macrocode}
+\cs_new_protected:Npn \prototype_declare_object:nn #1#2
+ {
+ \exp_args:Nx \@@_declare_object:nn { \int_eval:n {#2} } {#1}
+ }
+\cs_new_protected:Npn \@@_declare_object:nn #1#2
+ {
+ \int_compare:nTF { 0 <= #1 <= 9 }
+ {
+ \msg_info:nnnn { prototype } { declare-object-type } {#2} {#1}
+ \prop_put:Nnn \l_@@_object_prop {#2} {#1}
+ }
+ { \msg_error:nnxx { prototype } { bad-number-of-arguments } {#2} {#1} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Templates and instances}
+%
+% \begin{variable}{\l_@@_assignments_tl}
+% Used to insert the set keys.
+% \begin{macrocode}
+\tl_new:N \l_@@_assignments_tl
+% \end{macrocode}
+% \end{variable}
+%
+% \begin{macro}{\prototype_declare_template:nnnn}
+% \begin{macro}{\prototype_declare_defaults:nnn}
+% Creating a template means defining the keys, storing the defaults and
+% creating the function. The defaults are done separately from the other
+% parts as that fits the \pkg{l3keys} pattern but also makes it easy to
+% alter that aspect without changing the core implementation.
+% \begin{macrocode}
+\cs_new_protected:Npn \prototype_declare_template:nnnn #1#2#3#4
+ {
+ \prop_get:NnNTF \l_@@_object_prop {#1} \l_@@_tmp_tl
+ {
+ \keys_define:nn { prototype / #1 / #2 } {#3}
+ \tl_clear_new:c { l_@@_defaults_ #1 _ #2 _tl }
+ \cs_generate_from_arg_count:cNnn
+ { @@_template_ #1 _ #2 :w }
+ \cs_set_protected:Npn
+ { \l_@@_tmp_tl }
+ {
+ \tl_use:N \l_@@_assignments_tl
+ #4
+ }
+ }
+ { \msg_error:nnn { prototype } { unknown-object-type } {#1} }
+ }
+\cs_new_protected:Npn \prototype_declare_defaults:nnn #1#2#3
+ {
+ \cs_if_exist:cTF { @@_template_ #1 _ #2 :w }
+ { \tl_set:cn { l_@@_defaults_ #1 _ #2 _tl } {#3} }
+ { \msg_error:nnn { prototype } { unknown-template } {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macrocode}
+\cs_generate_variant:Nn \keys_precompile:nnN { v , nv }
+% \end{macrocode}
+%
+% \begin{macro}{\prototype_use_template:nnn}
+% \begin{macro}{\prototype_declare_instance:nnnn}
+% \begin{macro}{\@@_declare_aux:nnnn}
+% Using a template and creating an instance are the same thing other
+% than the final step: using the template or storing the key settings.
+% We do not attempt to maximise efficiency in setting, rather we have
+% a clear approach in which the final assignments may have multiple
+% entries.
+% \begin{macrocode}
+\cs_new_protected:Npn \prototype_use_template:nnn #1#2#3
+ {
+ \@@_declare_aux:nnnn {#1} {#2} {#3}
+ { \use:c { @@_template_ #1 _ #2 :w } }
+ }
+\cs_new_protected:Npn \prototype_declare_instance:nnnn #1#2#3#4
+ {
+ \@@_declare_aux:nnnn {#1} {#2} {#4}
+ {
+ \tl_clear_new:c { l_@@_instance_ #1 _ #3 _pars_tl }
+ \tl_set_eq:cN { l_@@_instance_ #1 _ #3 _pars_tl }
+ \l_@@_assignments_tl
+ \tl_clear_new:c { l_@@_instance_ #1 _ #3 _template_tl }
+ \tl_set:cn { l_@@_instance_ #1 _ #3 _template_tl } {#2}
+ }
+ }
+\cs_new_protected:Npn \@@_declare_aux:nnnn #1#2#3#4
+ {
+ \cs_if_exist:cTF { @@_template_ #1 _ #2 :w }
+ {
+ \keys_precompile:nvN
+ { prototype / #1 / #2 }
+ { l_@@_defaults_ #1 _ #2 _tl }
+ \l_@@_assignments_tl
+ \keys_precompile:nnN { prototype / #1 / #2 } {#3} \l_@@_tmp_tl
+ \tl_put_right:NV \l_@@_assignments_tl \l_@@_tmp_tl
+ #4
+ }
+ { \msg_error:nnn { prototype } { unknown-template } {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\prototype_use_instance:nn}
+% \begin{macro}{\prototype_use_instance:nnn}
+% Recover the values and insert the code.
+% \begin{macrocode}
+\cs_new_protected:Npn \prototype_use_instance:nn #1#2
+ { \prototype_use_instance:nnn {#1} {#2} { } }
+\cs_new_protected:Npn \prototype_use_instance:nnn #1#2#3
+ {
+ \tl_if_exist:cTF { l_@@_instance_ #1 _ #2 _template_tl }
+ {
+ \tl_set_eq:Nc \l_@@_assignments_tl
+ { l_@@_instance_ #1 _ #2 _pars_tl }
+ \tl_if_blank:nF {#3}
+ {
+ \keys_precompile:vnN
+ {
+ prototype / #1 /
+ \tl_use:c { l_@@_instance_ #1 _ #2 _template_tl }
+ }
+ {#3}
+ \l_@@_tmp_tl
+ \tl_put_right:NV \l_@@_assignments_tl
+ \l_@@_tmp_tl
+ }
+ \use:c
+ {
+ @@_template_ #1 _
+ \tl_use:c { l_@@_instance_ #1 _ #2 _template_tl }
+ :w
+ }
+ }
+ { \msg_error:nnn { prototype } { unknown-instance } {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \subsection{Showing information}
+%
+% \begin{macro}
+% {
+% \prototype_show_template_code:nn ,
+% \prototype_show_template_defaults:nn ,
+% \prototype_show_instance_values:nn
+% }
+% \begin{macrocode}
+\cs_new_protected:Npn \prototype_show_template_code:nn #1#2
+ {
+ \prop_if_in:NnTF \l_@@_object_prop {#1}
+ { \cs_show:c { @@_template_ #1 _ #2 :w } }
+ { \msg_error:nnn { prototype } { unknown-object-type } {#1} }
+ }
+\cs_new_protected:Npn \prototype_show_template_defaults:nn #1#2
+ {
+ \cs_if_exist:cTF { @@_template_ #1 _ #2 :w }
+ { \tl_show:c { l_@@_defaults_ #1 _ #2 _tl } }
+ { \msg_error:nnn { prototype } { unknown-template } {#1} {#2} }
+ }
+\cs_new_protected:Npn \prototype_show_instance_values:nn #1#2
+ {
+ \tl_if_exist:cTF { l_@@_instance_ #1 _ #2 _template_tl }
+ { \tl_show:c { l_@@_instance_ #1 _ #2 _pars_tl } }
+ { \msg_error:nnn { prototype } { unknown-instance } {#1} {#2} }
+ }
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Messages}
+%
+% \begin{macrocode}
+\msg_new:nnnn { prototype } { bad-number-of-arguments }
+ { Bad~number~of~arguments~for~object~type~'#1'. }
+ {
+ An~object~may~accept~between~0~and~9~arguments.\\
+ You~asked~to~use~#2~arguments:~this~is~not~supported.
+ }
+\msg_new:nnnn { prototype } { unknown-instance }
+ { The~instance~'#2'~of~type~'#1'~is~unknown. }
+ {
+ You~have~asked~to~use~an~instance~'#2',~
+ but~this~has~not~been~created.
+ }
+\msg_new:nnnn { prototype } { unknown-object-type }
+ { The~object~type~'#1'~is~unknown. }
+ { An~object~type~needs~to~be~declared~prior~to~using~it. }
+\msg_new:nnnn { prototype } { unknown-template }
+ { The~template~'#2'~of~type~'#1'~is~unknown. }
+ {
+ No~interface~has~been~declared~for~a~template~
+ '#2'~of~object~type~'#1'.
+ }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\msg_new:nnn { prototype } { declare-object-type }
+ { Declaring~object~type~'#1'~taking~#2~argument(s). }
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ExplSyntaxOff
+% \end{macrocode}
+%
+% \begin{macrocode}
+%</2ekernel>
+% \end{macrocode}
+%
+% \end{implementation}
diff --git a/macros/latex-dev/required/latex-lab/latex-lab-prototype.pdf b/macros/latex-dev/required/latex-lab/latex-lab-prototype.pdf
new file mode 100644
index 0000000000..06e1e123d6
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/latex-lab-prototype.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 670bbaf481..d8d9c671c3 100644
--- a/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
+++ b/macros/latex-dev/required/latex-lab/latex-lab-testphase.dtx
@@ -41,17 +41,26 @@
% \section{Introduction}
%
% This code implements small files which can be loaded with the |testphase|
-% key of \cs{DocumentMetadata}. Currently it only contains a
-% wrapper for \pkg{tagpdf}, but this will be extended to allow user to load
+% key of \cs{DocumentMetadata}. This will be extended to allow user to load
% well defined parts of the tagged PDF project.
-%
+% Currently the values |phase-I|, |phase-II| and |new-or| are provided.
+% |tagpdf| is an undocumented alias for |phase-II| which is kept for compability.
%
%
% \StopEventually{\setlength\IndexMin{200pt} \PrintIndex }
%
%
% \section{The Implementation}
-%
+% New output routine code is loaded in phase-II and new-or:
+% \begin{macrocode}
+%<*tagpdf|phase-II|new-or>
+\IfFileExists{latex-lab-testphase-new-or.sty}
+ {
+ \RequirePackage{latex-lab-testphase-new-or}
+ }
+ {}
+%</tagpdf|phase-II|new-or>
+% \end{macrocode}
% \begin{macrocode}
%<*tagpdf|phase-I|phase-II>
% \end{macrocode}
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 bd2644efb4..4aa0d75725 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/documentmetadata-support.ins b/macros/latex-dev/required/latex-lab/latex-lab.ins
index 431f88d810..eb0b066af0 100644
--- a/macros/latex-dev/required/latex-lab/documentmetadata-support.ins
+++ b/macros/latex-dev/required/latex-lab/latex-lab.ins
@@ -35,7 +35,7 @@
This is a generated file.
-Copyright 2021 LaTeX Project
+Copyright 2021,2022 LaTeX Project
This file was generated from file(s) of the `LaTeX-lab Bundle'.
------------------------------------------------------------------------------------
@@ -64,8 +64,24 @@ where one can also log issues in case there are any.
\generate{\file{documentmetadata-support.ltx}{\from{documentmetadata-support.dtx}{code}}}
-\generate{\file{tagpdf-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{tagpdf}}}
+% files that should be loadable with the testphase key should use the naming scheme
+% #1-latex-lab-testphase.ltx
\generate{\file{phase-I-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{phase-I}}}
\generate{\file{phase-II-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{phase-II}}}
+\generate{\file{tagpdf-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{tagpdf}}}
+\generate{\file{new-or-latex-lab-testphase.ltx}{\from{latex-lab-testphase.dtx}{new-or}}}
+
+% support files (the new-or code is a private package to make life easier)
+
+\generate{\file{latex-lab-testphase-new-or.sty}{\from{latex-lab-new-or.dtx}{code}}}
+\generate{\file{latex-lab-footmisc.ltx}{\from{latex-lab-footnotes.dtx}{footmisc}}}
+\generate{\file{latex-lab-footnotes.ltx}{\from{latex-lab-footnotes.dtx}{kernel}}}
+
+% for \DocumentMetadata trials
+\generate{\file{prototype-latex-lab-testphase.ltx}{\from{latex-lab-prototype.dtx}{2ekernel}}}
+
+% for standalone trials
+\generate{\file{latex-lab-prototype.sty}{\from{latex-lab-prototype.dtx}{2ekernel}}}
+
\endbatchfile
diff --git a/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.txt b/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.txt
new file mode 100644
index 0000000000..684a695faa
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/usage-of-@footnotemark.txt
@@ -0,0 +1,186 @@
+% packages that alter \@footnotemark ...
+
+
+% bibarts
+
+\let\ba@footnmark=\@footnotemark
+\def\@footnotemark{\ifhmode{\nobreak \hskip 0.04em plus 0.01em}\else\leavevmode\fi\ba@footnmark}%
+
+
+% ./bxjscls/bxjsja-minimal.def
+
+\def\bxjs@cjk@loaded{%
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax
+ \unkern\unkern
+ \ifdim\lastskip>\z@ \unskip \fi
+ \fi\fi
+ \nobreak
+ \fi
+ \@makefnmark
+ \ifhmode \spacefactor\@x@sf \fi
+ \relax}%
+ \let\bxjs@cjk@loaded\relax
+}
+
+% ./arabtex/afoot.sty
+
+\let \a@@footnotemark \@footnotemark
+
+\def \a@footnotemark {% inside Arabic environment
+\iftrans \unskip \unskip \nobreak \@makefnmark \fi
+\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi }
+
+% ./hyperref/hyperref.sty
+
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+
+
+% ./hypdvips/hypdvips.sty
+
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \ifHy@draft%
+ \@makefnmark%
+ \else%
+ \pp@hyperfootnote%
+ \fi%
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+
+ \newcommand{\pp@hyperfootnote}{%
+ \ifx\pp@activerect\pp@true%
+ \@makefnmark%
+ \else%
+ \ifpp@smallfootnotes%
+ \let\pp@backup@@thefnmark\@thefnmark%
+ \renewcommand{\@thefnmark}{\pdf@rect{\pp@backup@@thefnmark}}%
+ \Hy@colorlink\@footnotecolor%
+ \@makefnmark%
+ \Hy@endcolorlink%
+ \pdfmark{%
+ pdfmark=/ANN,%
+ linktype=footnote,%
+ Subtype=/Link,%
+ AcroHighlight=\@pdfhighlight,%
+ Border=\@pdfborder,%
+ BorderStyle=\@pdfborderstyle,%
+ Color=\@footnotebordercolor,%
+ Dest=\Hy@footnote@currentHref,%
+ Raw=H.B%
+ }%
+ \let\@thefnmark\pp@backup@@thefnmark%
+ \else%
+ \pdfmark[\@makefnmark]{%
+ pdfmark=/ANN,%
+ linktype=footnote,%
+ Subtype=/Link,%
+ AcroHighlight=\@pdfhighlight,%
+ Border=\@pdfborder,%
+ BorderStyle=\@pdfborderstyle,%
+ Color=\@footnotebordercolor,%
+ Dest=\Hy@footnote@currentHref%
+ }%
+ \fi%
+ \fi%
+ }
+
+
+% ./memoir/memhfixc.sty
+
+\ifHy@hyperfootnotes
+ \def\@footnotemark{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}%
+ \m@mmf@check% <--- added
+ \nobreak\fi
+ \stepcounter{Hfootnote}%
+ \global\let\Hy@saved@currentHref\@currentHref
+ \hyper@makecurrent{Hfootnote}%
+ \global\let\Hy@footnote@currentHref\@currentHref
+ \global\let\@currentHref\Hy@saved@currentHref
+ \hyper@linkstart{link}{\Hy@footnote@currentHref}%
+ \@makefnmark
+ \hyper@linkend
+ \m@mmf@prepare% <--- added
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }%
+\fi
+
+
+% caption3.sty
+
+% this is altering the top-level when inside a float
+
+
+% ./koma-script/scrlttr2.cls
+
+\newcommand*{\scr@footnotemark}{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\FN@mf@check\nobreak\fi
+ \@makefnmark
+ \csname FN@mf@prepare\endcsname
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+% tested against this ...
+
+\newcommand*{\scr@saved@footnotemark}{%
+ \leavevmode
+ \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
+ \@makefnmark
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax}
+
+
+% ./chextras/chextras.sty
+
+\ifstd@notes\else
+ \let\std@footnotemark\@footnotemark
+ \def\alt@footnotemark{\unskip\thinspace\std@footnotemark}
+ \let\@footnotemark\alt@footnotemark
+
+% footmisx.sty
+
+ \newcommand*\@footmisxnotemark{%
+ \leavevmode
+ \ifhmode
+ \edef\@x@sf{\the\spacefactor}%
+ \FN@mf@check
+ \nobreak
+ \fi
+ \@footmicx@makefnmark
+ \ifFN@pp@towrite
+ \FN@pp@writetemp
+ \FN@pp@towritefalse
+ \fi
+ \FN@mf@prepare
+ \ifhmode\spacefactor\@x@sf\fi
+ \relax
+ }
+
+
diff --git a/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.txt b/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.txt
new file mode 100644
index 0000000000..48a3172843
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/usage-of-@footnotetext.txt
@@ -0,0 +1,842 @@
+
+% ./bibarts/bibarts.sty
+
+\let\ba@footnotetext=\@footnotetext
+\long\def\@footnotetext#1{\ba@footnotetext{%
+ \global\let\thisto@ba=-%
+ \global\let\thisti@ba=-%
+ \global\let\thisp@ba=-%
+ \global\let\thisvol@ba=-%
+ \global\let\thiss@ba=-%
+ \global\let\thisn@ba=-%
+ \global\let\pos@ba=0%
+ \kern 0.1em\nulskip@ba{\@footnotetrue\ignorespaces
+ #1\nulskip@ba\ba@textmode}\global\let\lastto@ba=\thisto@ba
+ \global\let\lastti@ba=\thisti@ba
+ \global\let\lastp@ba=\thisp@ba
+ \global\let\lastvol@ba=\thisvol@ba
+ \global\let\lasts@ba=\thiss@ba
+ \global\let\lastn@ba=\thisn@ba}}%
+
+
+% ./fnbreak/fnbreak.sty
+
+ \let\fnb@orig@footnotetext\@footnotetext
+ \long\def\@footnotetext#1{\fnb@orig@footnotetext{\fnb@fnstart#1\fnb@fnend}}%
+
+
+% ./revtex4-1/revtex4-1.cls ./revtex/ltxutil.sty ./revtex/revtex4-2.cls ...
+
+\long\def\@footnotetext{%
+ \insert\footins\bgroup
+ \make@footnotetext
+}%
+\long\def\@mpfootnotetext{%
+ \minipagefootnote@pick
+ \make@footnotetext
+}%
+\long\def\make@footnotetext#1{%
+ \set@footnotefont
+ \set@footnotewidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@\@mpfn\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1%
+ \@finalstrut\strutbox\vadjust{\vskip\z@skip}%
+ }%
+ \color@endgroup
+ \minipagefootnote@drop
+}%
+
+
+% ./nrc/nrc1.cls ./nrc/nrc2.cls
+
+% this is missing the \par at the end and \@currentcounter
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \reset@font\smallt
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+}%
+
+%-------------------------------------
+
+% ./bigfoot/bigfoot.sty
+
+ \def\@footnotetext{\Footnotetextdefault{}}%
+
+%-------------------------------------
+
+
+% ./uafthesis/uafthesis.cls
+
+% this is missing the \par at the end and \@currentcounter
+
+%% this little gem provides for single-spaced footnotes
+\long\def\@footnotetext#1{\insert\footins{%
+ \ssp
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}}}
+
+%-------------------------------------
+
+
+
+% ./resphilosophica/resphilosophica.cls
+
+% I wonder if this \, is really intended below ...
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \,\rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+%-------------------------------------
+
+
+
+% ./setspace/setspace.sty
+
+% this is missing the \par at the end and \@currentcounter
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+% GT: Next line added. Hook desired here!
+ \def\baselinestretch {\setspace@singlespace}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+%-------------------------------------
+
+
+
+% ./linguex/linguex.sty
+
+
+\let\predefinedfootnotetext=\@footnotetext
+\long\def\@footnotetext#1{\@noftnotefalse\predefinedfootnotetext{#1}%
+ \@noftnotetrue}
+
+
+%-------------------------------------
+
+
+% ./fnpara/fnpara.sty
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \setbox0=\hbox{%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox
+ \penalty -10
+ \hskip\footglue
+ }%
+ }%
+ \dp0=0pt \ht0=\fudgefactor\wd0 \box0
+ \color@endgroup}}
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (para option)
+
+% this is missing the \par at the end and \@currentcounter
+
+ \long\def\FN@footnotetext#1{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \setbox\FN@tempboxa\hbox{%
+ \@makefntext{\ignorespaces#1\strut
+ \penalty-10\relax
+ \hskip\footglue
+ }% end of \@makefntext parameter
+ }% end of \hbox
+ \dp\FN@tempboxa\z@
+ \ht\FN@tempboxa\dimexpr\wd\FN@tempboxa *%
+ \footnotebaselineskip / \columnwidth\relax
+ \box\FN@tempboxa
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (normal)
+
+% this is missing the \par at the end and \@currentcounter
+
+ \long\def\FN@footnotetext#1{%
+ \insert\footins{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep
+ \ignorespaces#1\@finalstrut\strutbox
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+
+
+
+%-------------------------------------
+
+
+% ./footmisc/footmisc.sty (side option)
+
+ \long\def\FN@footnotetext#1{%
+ \marginpar{%
+ \ifFN@setspace
+ \let\baselinestretch\FN@baselinestretch
+ \fi
+ \reset@font\footnotesize
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \ignorespaces#1%
+ }%
+ \color@endgroup
+ }%
+ \FN@mf@prepare
+ }%
+
+
+
+%-------------------------------------
+
+
+
+% ./bxjscls/bxjsarticle.cls ./bxjscls/bxjsbook.cls ...
+
+\long\def\@footnotetext{%
+ \insert\footins\bgroup
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces}%
+ \futurelet\jsc@next\jsc@fo@t}
+\def\jsc@fo@t{\ifcat\bgroup\noexpand\jsc@next \let\jsc@next\jsc@f@@t
+ \else \let\jsc@next\jsc@f@t\fi \jsc@next}
+\def\jsc@f@@t{\bgroup\aftergroup\jsc@@foot\let\jsc@next}
+\def\jsc@f@t#1{#1\jsc@@foot}
+\def\jsc@@foot{\@finalstrut\strutbox\color@endgroup\egroup
+ \ifx\pltx@foot@penalty\@undefined\else
+ \ifhmode\null\fi
+ \ifnum\pltx@foot@penalty=\z@\else
+ \penalty\pltx@foot@penalty
+ \pltx@foot@penalty\z@
+ \fi
+ \fi}
+
+
+not covered so far supports \footnote{ catcode changes ...} but also
+\foonote A --- the latter is questionable I would say
+
+
+%-------------------------------------
+
+
+% ./fn2end/fn2end.sty
+
+obsolete I guess, ignored in evaluation
+
+
+%-------------------------------------
+
+
+% ./hyperref/hyperref.sty
+
+ \long\def\@footnotetext#1{%
+ \H@@footnotetext{%
+ \ifHy@nesting
+ \expandafter\ltx@firstoftwo
+ \else
+ \expandafter\ltx@secondoftwo
+ \fi
+ {%
+ \expandafter\hyper@@anchor\expandafter{%
+ \Hy@footnote@currentHref
+ }{\ignorespaces #1}%
+ }{%
+ \Hy@raisedlink{%
+ \expandafter\hyper@@anchor\expandafter{%
+ \Hy@footnote@currentHref
+ }{\relax}%
+ }%
+ \let\@currentHref\Hy@footnote@currentHref
+ \let\@currentlabelname\@empty
+ \ignorespaces #1%
+ }%
+ }%
+ }%
+
+
+Handling of anchors (in nested context) I guess. This needs to be
+married with the anchor setting that the tagging currently does and
+the latter improved/adjusted
+
+
+%-------------------------------------
+
+% ./biblatex-gb7714-2015/gb7714-2015ms.bbx ./biblatex-gb7714-2015/gb7714-2015mx.bbx ...
+
+ \long\def\@footnotetext##1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \leftskip \footbibmargin%增加的左侧缩进
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces##1\@finalstrut\strutbox%
+ }%
+ \color@endgroup}}%
+
+fits the structure
+%-------------------------------------
+
+
+% ./amscls/amsbook.cls ./amscls/amsproc.cls ./amscls/amsart.cls ...
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \normalfont\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep \splitmaxdepth \dp\strutbox
+ \floatingpenalty\@MM \hsize\columnwidth
+ \@parboxrestore \parindent\normalparindent \sloppy
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\unskip\strut\par}}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./umich-thesis/umich-thesis.cls
+
+% change LaTeX's footnotes to get vertical spacing correct
+\skip\footins \baselinestretch2\skip\footins
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {\setspace@singlespace}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \vskip 1.2\baselineskip
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./nostarch/nostarch.cls
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@{13.5pt}\ignorespaces#1}%
+ \color@endgroup}}%
+
+fixed \footsep, probably very old
+fits the structure
+%-------------------------------------
+
+
+
+% ./coursepaper/coursepaper.cls
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {1}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./ucthesis/ucthesis.cls
+
+% Single-space footnotes.
+\long\def\@footnotetext#1{\insert\footins{\ssp\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}}}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./jura/jura.cls
+
+\long\def\@footnotetext#1{\insert\footins{%
+ \linespread{\J@FootnoteSpread}\reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+
+fits the structure
+%-------------------------------------
+
+
+% ./asaetr/asaesub.sty
+
+2.09
+
+%-------------------------------------
+
+
+% ./lineno/fnlineno.sty
+
+%% |\FNLN@@text| stores the `\@footnotetext' found,
+%% we might check if it is `\FNLN@ltx@fntext' ... %% TODO
+\let\FNLN@@text\@footnotetext
+\def\@footnotetext{%
+ \ifLineNumbers \expandafter \FNLN@text
+ \else \expandafter \FNLN@@text
+ \fi}
+
+
+\def \FNLN@text {% %% 2010/12/31 arg read later
+ \vadjust{\penalty-\FNLN@M@swap@codepen}%
+%% Standard \LaTeX's `\@footnotetext' expands `\@thefnmark'
+%% to produce the footnote mark at the page bottom,
+%% right after it has been determined for the mark
+%% in the main text. \emph{Here} the footnote text
+%% will be typeset only when \emph{other} footnote marks
+%% may have been formed for typesetting the main text
+%% paragraph before.
+%% %%% (TODO clearer wording)
+%% In the \strong{footnote list}
+%% macro |\FNLN@list|, the (\dqtd{`&\protect'ed})
+%% \emph{current} expansion <mark> of `\@thefnmark'
+%% is stored as an item preceding the footnote text
+%% <text>. One footnote entry in `\FNLN@list'
+%% thus has the form \lq`<mark>\@lt<text>\@lt'\rq.
+%% \LaTeX's internal `\g@addto@macro' is used to \emph{append}
+%% an entry to the list (at the right). The OTR will later
+%% take the entries from the left of the list.
+%%
+%% The argument of the auxiliary/temporary `\@tempa'
+%% will contain the footnote text and thus must be able to
+%% carry `\par' tokens. We therefore need a `\long' version of
+%% `\protected@edef':
+ \let\@@protect\protect
+ \let\protect\@unexpandable@protect
+ \afterassignment\restore@protect
+ \long \edef \@tempa ##1{%
+ \noexpand\g@addto@macro \noexpand\FNLN@list {%
+ \@thefnmark \noexpand\@lt ##1\noexpand \@lt}}%
+%% ... issuing
+%% \lq`\g@addto@macro\FNLN@list{<mark>\elt<text>\@lt}'\rq\ ...
+ \@tempa %% reads arg
+}
+%% Here we initialize |\FNLN@list|:
+\let\FNLN@list\@empty
+
+
+
+probably continues working but needs separate checking
+
+%-------------------------------------
+
+
+
+% ./jurabib/jurabib.sty
+
+ \long\def\@footnotetext#1{%
+ \Orig@tabularx@footnotetext{%
+ \jb@fntrue
+ #1%
+ \setcounter{jb@cites@in@footnote}{0}%
+ }%
+ }%
+
+ \let\jbsaved@footnotetext\@footnotetext
+ \long\def\@footnotetext#1{%
+ \begingroup
+ \jb@fntrue
+ \jbsaved@footnotetext{#1}%
+ \setcounter{jb@cites@in@footnote}{0}%
+ \endgroup
+ }%
+
+
+first is table notes, second
+fits the structure
+%-------------------------------------
+
+
+
+% ./york-thesis/york-thesis.cls
+
+\long\def\@footnotetext#1{%
+ \insert\footins{%
+ \def\baselinestretch {1}%
+ \reset@font\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark}%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}
+
+fits the structure
+%-------------------------------------
+
+
+% ./ucdavisthesis/ucdavisthesis.cls
+
+\long\def\@footnotetext#1{\insert\footins{\renewcommand\baselinestretch{1}
+ \footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}\@makefntext
+ {\rule{\z@}{\footnotesep}\ignorespaces
+ #1\strut}\renewcommand\baselinestretch{\@spacing}}}
+
+looks old ...
+fits the structure
+%-------------------------------------
+
+
+% ./ledmac/afoot.sty
+
+fairly old and buggy in some aspects
+
+%%% Make the LaTeX \cs{footnote} catcode-safe, like in Plain TeX.
+
+\def \@footnotetext {% new, do not yet read footnote text
+ \insert \footins \bgroup
+ \ifx \footglue \undefined % prepare normal footnote
+ \interlinepenalty \interfootnotelinepenalty \floatingpenalty \@MM
+ \splittopskip \footnotesep \splitmaxdepth \dp \strutbox
+ \else
+ \global\long\def \@makefntext ##1{{$^{\@thefnmark }$}##1\nobreak }%
+ \setbox0=\hbox \bgroup % fnpara.sty is present
+ \floatingpenalty=20000 \footnotesize
+ \fi
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \a@fntext }
+
+
+%-------------------------------------
+
+
+% ./toptesi/toptesi.sty
+
+
+\long\def\@footnotetext#1{\insert\footins{\linespread{1}\footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
+ \hsize\columnwidth \@parboxrestore
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{\rule{\z@}{\footnotesep}\ignorespaces#1\strut}}}
+
+
+fits the structure
+%-------------------------------------
+
+
+% ./gb4e/gb4e.sty
+
+\let\@gbsaved@footnotetext=\@footnotetext
+\long\def\@footnotetext#1{%
+ \@noftnotefalse\setcounter{fnx}{0}%
+ \@gbsaved@footnotetext{#1}%
+ \@noftnotetrue}
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./koma-script/scrlttr2.cls ./koma-script/scrextend.sty ./koma-script/scrreprt.cls ...
+
+same bug as footmisc: the @prepare is in the wrong place
+
+fits the structure
+%-------------------------------------
+
+
+
+% ./tabu/tabu.sty
+
+not checked what that does
+
+
+%-------------------------------------
+
+
+% ./uwthesis/uwthesis.cls
+
+does chapter notes -- ignore for now
+
+%-------------------------------------
+
+
+% ./tools/multicol.sty
+
+\long\def\mult@footnotetext#1{\begingroup
+ \columnwidth\textwidth
+ \orig@footnotetext{#1}\endgroup}
+
+
+fits the structure, but need to think what makes sense here as this a
+temporary redefinition for the environment only
+
+%-------------------------------------
+
+
+% ./fancyvrb/fancyvrb.sty
+
+\long\def\V@footnotetext{%
+ \afterassignment\V@@footnotetext
+ \let\@tempa}
+\def\V@@footnotetext{%
+ \insert\footins\bgroup
+ \csname reset@font\endcsname
+ \footnotesize
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\footnotesep
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty \@MM
+ \hsize\columnwidth
+ \@parboxrestore
+ \def\@currentcounter{footnote}%
+ \edef\@currentlabel{\csname p@footnote\endcsname\@thefnmark}%
+ \@makefntext{}%
+ \rule{\z@}{\footnotesep}%
+ \bgroup
+ \aftergroup\V@@@footnotetext
+ \ignorespaces}
+\def\V@@@footnotetext{\strut\egroup}
+
+
+another one of the footnote commands that do not read they argument as an argument
+
+%-------------------------------------
+
+
+% ./savefnmark/savefnmark.sty
+
+obsolete
+
+%-------------------------------------
+
+
+% ./changebar/changebar.sty
+
+\let\ltx@footnotetext\@footnotetext
+\long\def\cb@footnotetext#1{%
+ \cb@trace@stack{end footnote on page \the\c@page}%
+ \cb@pop\cb@currentstack
+ \ifnum\cb@topleft=\cb@nil
+ \ltx@footnotetext{#1}%
+ \else
+ \cb@push\cb@currentstack
+ \edef\cb@temp{\the\cb@curbarwd}%
+ \ltx@footnotetext{\cb@start[\cb@temp]#1\cb@end}%
+ \fi}
+\let\@footnotetext\cb@footnotetext
+
+
+% ./eledmac/eledmac.sty
+
+\apptocmd{\@footnotetext}{\m@mmf@prepare}{}{}
+\pretocmd{\@footnotetext}{%
+ \ifnumberedpar@
+ \edtext{}{\l@dbfnote{#1}}%
+ \else
+ }{}{}
+\apptocmd{\@footnotetext}{\fi}{}{}%
+
+
+% ./yafoot/dblfnote.sty
+
+\long\def\dfn@footnotetext#1{{\setbox\dfn@boxa\vbox{
+ \let\insert\dfn@gobble
+ \columnwidth\DFNcolumnwidth \hbadness\c@DFNsloppiness
+ \def\@makefnmark{\smash{\dfn@makefnmark}}
+ \dfn@latex@footnotetext{#1}\par \boxmaxdepth\dfn@fnmaxdp}%
+ \dfn@dima\ht\dfn@boxa \advance\dfn@dima\dp\dfn@boxa
+ \ifdim\dfn@dima>\z@\else
+ \dfn@dima1sp\relax
+ \setbox\dfn@boxa\vbox{\vbox to1sp{\unvbox\dfn@boxa\vfil}}\fi
+ \global\setbox\dfn@ins\vbox{\boxmaxdepth\dfn@fnmaxdp
+ \ifvoid\dfn@ins\else
+ \unvbox\dfn@ins \allowbreak \nointerlineskip \fi
+ \ifdfn@allowcbreak \unvbox \else \box \fi \dfn@boxa}%
+ \setbox\dfn@boxa\copy\dfn@ins
+ \dfn@split{.5\ht\dfn@boxa}\dfn@boxa\dfn@boxb\dfn@fnmaxdp\footnotesep
+ \advance\@tempdima\@tempdimb \@tempdimb\@tempdima
+ \advance\@tempdima-\dfn@fnht \global\dfn@fnht\@tempdimb
+ \insert\footins{\floatingpenalty\@MM \vbox to\@tempdima{}}%
+ \xdef\dfn@list{\dfn@list\@elt{\number\dfn@dima}{\number\@tempdima}}}}
+\let\dfn@latex@footnotetext\@footnotetext
+\let\@footnotetext\dfn@footnotetext
+
+
+% ./ftnxtra/ftnxtra.sty
+
+not checked what this does
+
+
+% ./acmart/acmart.cls
+
+\if@ACM@sigchiamode
+\long\def\@footnotetext#1{\marginpar{%
+ \reset@font\small
+ \interlinepenalty\interfootnotelinepenalty
+ \protected@edef\@currentlabel{%
+ \csname p@footnote\endcsname\@thefnmark
+ }%
+ \color@begingroup
+ \@makefntext{%
+ \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
+ \color@endgroup}}%
+\fi
+
+
+% ./memoir/memoir.cls
+
+ this needs some further analysis
+
diff --git a/macros/latex-dev/required/latex-lab/usage-of-kern-kern.txt b/macros/latex-dev/required/latex-lab/usage-of-kern-kern.txt
new file mode 100644
index 0000000000..e119197b70
--- /dev/null
+++ b/macros/latex-dev/required/latex-lab/usage-of-kern-kern.txt
@@ -0,0 +1,80 @@
+
+ \ifdim\lastkern>\z@\ifdim\lastkern<5sp\relax
+./bxjscls/bxjsja-minimal.def
+
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/letterspace.sty
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/microtype-pdftex.def
+
+
+ \ifdim\lastkern=-3sp \unkern
+ \ifdim\lastkern=3sp \kern-3sp
+ {\kern\MT@outer@kern\kern3sp\kern-3sp\relax}%
+./microtype/microtype-luatex.def
+
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./eledmac/eledmac.sty
+
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./reledmac/reledmac.sty
+
+
+\edef\CJK@kern{\kern -2sp\kern 2sp}
+\edef\CJK@CJK{\kern -1sp\kern 1sp}
+./cjk/texinput/CJK.sty
+
+
+\edef\ruby@kern{\kern -5sp\kern 5sp}
+./cjk/texinput/ruby.sty
+
+
+% hyphenation between pinyin syllables. Values 1sp-3sp are already used
+\edef\py@sp{\kern -4sp\kern 4sp}
+./cjk/texinput/pinyin.sty
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./tufte-latex/tufte-common.def
+
+
+
+\newcommand*{\multiplefootnotemarker}{3sp}
+./memoir/memoir.cls
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./parnotes/parnotes.sty
+
+
+\providecommand*{\multiplefootnotemarker}{3sp}
+./lwarp/lwarp-footmisc.sty
+
+
+ \bgroup \kern-3sp\kern3sp % kerns so I can test for beginning of list
+./examdesign/examdesign.cls
+
+
+ \kern-1sp \kern1sp }
+ \kern-2sp \kern2sp }
+ \kern-3sp \kern3sp }
+ \kern-4sp \kern4sp }
+./polyglossia/gloss-korean.ldf
+
+
+
+\NewDocumentCommand \@sidenotes@multisign { } {3sp}
+./sidenotes/sidenotes.sty
+
diff --git a/macros/latex-dev/required/tools/README.md b/macros/latex-dev/required/tools/README.md
index 7bef1f9e74..ab2f88188c 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 2022-06-01 pre-release 1
+Release 2022-06-01 pre-release 3
Overview
--------
@@ -51,4 +51,4 @@ of the package.
-----
-<p>Copyright (C) 1993-2021 The LaTeX Project <br />
+<p>Copyright (C) 1993-2022 The LaTeX Project <br />
diff --git a/macros/latex-dev/required/tools/afterpage.pdf b/macros/latex-dev/required/tools/afterpage.pdf
index f84e92a9b6..2a62543a5f 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 acee0ce505..c9f77d77a3 100644
--- a/macros/latex-dev/required/tools/array.dtx
+++ b/macros/latex-dev/required/tools/array.dtx
@@ -33,7 +33,7 @@
%<+package>\DeclareCurrentRelease{}{2020-10-01}
%<+package>
%<+package>\ProvidesPackage{array}
-%<+package> [2021/10/04 v2.5f Tabular extension package (FMi)]
+%<+package> [2022/03/10 v2.5f Tabular extension package (FMi)]
%
% \fi
%
@@ -890,8 +890,8 @@
% c & 0 & 0 \\
% l & 0 & 1 \\
% r & 0 & 2 \\
-% p-arg & 0 & 3 \\
-% t-arg & 0 & 4 \\
+% m-arg & 0 & 3 \\
+% p-arg & 0 & 4 \\
% b-arg & 0 & 5 \\
% | & 1 & 0 \\
% !-arg & 1 & 1 \\
@@ -907,8 +907,8 @@
% @ & 7 & --- \\
% < & 8 & --- \\
% > & 9 & --- \\
-% p & 10 & 3 \\
-% t & 10 & 4 \\
+% m & 10 & 3 \\
+% p & 10 & 4 \\
% b & 10 & 5
% \end{tabular}
% \end{center}
diff --git a/macros/latex-dev/required/tools/array.pdf b/macros/latex-dev/required/tools/array.pdf
index 408ce71a09..1464eeed55 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 88beef01cd..d69a2ff80a 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 160aca5e23..1b268e31ab 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/dcolumn.pdf b/macros/latex-dev/required/tools/dcolumn.pdf
index 507d7422d7..b27ae7d9c1 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 56fc25969f..c104cbde52 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 74229da1af..4c8e557245 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 e8893077a3..9b5f652c8a 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 7672a04196..7748fabbd8 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 1da7644d3f..696be32fd8 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 a5c7d3dd82..b5a6e71e1d 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 386a69ce15..a9e20d6244 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/layout.pdf b/macros/latex-dev/required/tools/layout.pdf
index eba30ca7f0..3fe02fe514 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.pdf b/macros/latex-dev/required/tools/longtable.pdf
index 16112ac0ba..2b265b2073 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/multicol.pdf b/macros/latex-dev/required/tools/multicol.pdf
index 35c3a48364..5b5cc8fa6f 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 6b8d077837..92be34bcb7 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 c9342b80e6..14db60194a 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 1c769e3560..b7e96c8387 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 87faf6ff10..a810649ff5 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 179c1ece88..56f30d5d1e 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.pdf b/macros/latex-dev/required/tools/theorem.pdf
index 7d69fb0ecf..28b67d7788 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 fc84fd7828..12bb07c349 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/trace.pdf b/macros/latex-dev/required/tools/trace.pdf
index 28b75da6e3..1add25be43 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 5c88d95039..952b8bc5a4 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 8b550393ee..d366ab214c 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 0663e1f55e..62f993eab9 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 dcb1e021a8..bfb3a44214 100644
--- a/macros/latex-dev/required/tools/xspace.pdf
+++ b/macros/latex-dev/required/tools/xspace.pdf
Binary files differ