summaryrefslogtreecommitdiff
path: root/macros/latex-dev/base
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex-dev/base')
-rw-r--r--macros/latex-dev/base/README.md2
-rw-r--r--macros/latex-dev/base/alltt.dtx4
-rw-r--r--macros/latex-dev/base/alltt.pdfbin223861 -> 223766 bytes
-rw-r--r--macros/latex-dev/base/cfgguide.pdfbin264168 -> 264168 bytes
-rw-r--r--macros/latex-dev/base/changes.txt220
-rw-r--r--macros/latex-dev/base/classes.dtx12
-rw-r--r--macros/latex-dev/base/classes.pdfbin560294 -> 560495 bytes
-rw-r--r--macros/latex-dev/base/clsguide-historic.pdfbin415956 -> 415956 bytes
-rw-r--r--macros/latex-dev/base/clsguide.pdfbin490149 -> 495486 bytes
-rw-r--r--macros/latex-dev/base/clsguide.tex149
-rw-r--r--macros/latex-dev/base/cmfonts.pdfbin292600 -> 292600 bytes
-rw-r--r--macros/latex-dev/base/cyrguide.pdfbin257359 -> 257359 bytes
-rw-r--r--macros/latex-dev/base/doc-code.pdfbin1079115 -> 1078843 bytes
-rw-r--r--macros/latex-dev/base/doc.dtx8
-rw-r--r--macros/latex-dev/base/doc.pdfbin758047 -> 757312 bytes
-rw-r--r--macros/latex-dev/base/docstrip.pdfbin506564 -> 506772 bytes
-rw-r--r--macros/latex-dev/base/encguide.pdfbin1318576 -> 1318576 bytes
-rw-r--r--macros/latex-dev/base/exscale.pdfbin204708 -> 204708 bytes
-rw-r--r--macros/latex-dev/base/fix-cm.pdfbin287727 -> 287727 bytes
-rw-r--r--macros/latex-dev/base/fntguide.pdfbin522678 -> 522637 bytes
-rw-r--r--macros/latex-dev/base/fntguide.tex42
-rw-r--r--macros/latex-dev/base/fontdef.dtx18
-rw-r--r--macros/latex-dev/base/graphpap.pdfbin161722 -> 161722 bytes
-rw-r--r--macros/latex-dev/base/ifthen.pdfbin222460 -> 222460 bytes
-rw-r--r--macros/latex-dev/base/inputenc.pdfbin318372 -> 318372 bytes
-rw-r--r--macros/latex-dev/base/lamport-manual.pdfbin170876 -> 170876 bytes
-rw-r--r--macros/latex-dev/base/latexrelease.dtx4
-rw-r--r--macros/latex-dev/base/latexrelease.pdfbin282095 -> 282447 bytes
-rw-r--r--macros/latex-dev/base/latexsym.pdfbin200759 -> 200759 bytes
-rw-r--r--macros/latex-dev/base/lb2.pdfbin252519 -> 252519 bytes
-rw-r--r--macros/latex-dev/base/letter.dtx5
-rw-r--r--macros/latex-dev/base/letter.pdfbin337881 -> 337788 bytes
-rw-r--r--macros/latex-dev/base/lgc2.pdfbin217663 -> 217663 bytes
-rw-r--r--macros/latex-dev/base/lppl.pdfbin132370 -> 132370 bytes
-rw-r--r--macros/latex-dev/base/ltboxes.dtx51
-rw-r--r--macros/latex-dev/base/ltclass.dtx11
-rw-r--r--macros/latex-dev/base/ltcmd.dtx152
-rw-r--r--macros/latex-dev/base/ltcmdhooks-code.pdfbin753775 -> 756067 bytes
-rw-r--r--macros/latex-dev/base/ltcmdhooks-doc.pdfbin498793 -> 505075 bytes
-rw-r--r--macros/latex-dev/base/ltcmdhooks.dtx79
-rw-r--r--macros/latex-dev/base/ltcounts.dtx63
-rw-r--r--macros/latex-dev/base/ltdefns.dtx9
-rw-r--r--macros/latex-dev/base/lterror.dtx11
-rw-r--r--macros/latex-dev/base/ltfilehook-code.pdfbin806888 -> 806610 bytes
-rw-r--r--macros/latex-dev/base/ltfilehook-doc.pdfbin552230 -> 551941 bytes
-rw-r--r--macros/latex-dev/base/ltfinal.dtx4
-rw-r--r--macros/latex-dev/base/ltfssbas.dtx11
-rw-r--r--macros/latex-dev/base/ltfssini.dtx4
-rw-r--r--macros/latex-dev/base/lthooks-code.pdfbin1248844 -> 1254049 bytes
-rw-r--r--macros/latex-dev/base/lthooks-doc.pdfbin758505 -> 762877 bytes
-rw-r--r--macros/latex-dev/base/lthooks.dtx143
-rw-r--r--macros/latex-dev/base/ltkeys.dtx135
-rw-r--r--macros/latex-dev/base/ltlength.dtx24
-rw-r--r--macros/latex-dev/base/ltlists.dtx126
-rw-r--r--macros/latex-dev/base/ltluatex.dtx16
-rw-r--r--macros/latex-dev/base/ltluatex.pdfbin325142 -> 325889 bytes
-rw-r--r--macros/latex-dev/base/ltmarks-code.pdfbin718132 -> 719005 bytes
-rw-r--r--macros/latex-dev/base/ltmarks-doc.pdfbin576121 -> 582809 bytes
-rw-r--r--macros/latex-dev/base/ltmarks.dtx24
-rw-r--r--macros/latex-dev/base/ltmeta.dtx34
-rw-r--r--macros/latex-dev/base/ltmiscen.dtx255
-rw-r--r--macros/latex-dev/base/ltnews.pdfbin1408003 -> 1444433 bytes
-rw-r--r--macros/latex-dev/base/ltnews.tex2
-rw-r--r--macros/latex-dev/base/ltnews01.pdfbin169553 -> 169553 bytes
-rw-r--r--macros/latex-dev/base/ltnews02.pdfbin151773 -> 151773 bytes
-rw-r--r--macros/latex-dev/base/ltnews03.pdfbin151324 -> 151324 bytes
-rw-r--r--macros/latex-dev/base/ltnews04.pdfbin152551 -> 152551 bytes
-rw-r--r--macros/latex-dev/base/ltnews05.pdfbin175211 -> 175211 bytes
-rw-r--r--macros/latex-dev/base/ltnews06.pdfbin142867 -> 142867 bytes
-rw-r--r--macros/latex-dev/base/ltnews07.pdfbin138214 -> 138214 bytes
-rw-r--r--macros/latex-dev/base/ltnews08.pdfbin155442 -> 155442 bytes
-rw-r--r--macros/latex-dev/base/ltnews09.pdfbin130028 -> 130028 bytes
-rw-r--r--macros/latex-dev/base/ltnews10.pdfbin169433 -> 169433 bytes
-rw-r--r--macros/latex-dev/base/ltnews11.pdfbin112208 -> 112208 bytes
-rw-r--r--macros/latex-dev/base/ltnews12.pdfbin156764 -> 156764 bytes
-rw-r--r--macros/latex-dev/base/ltnews13.pdfbin182483 -> 182483 bytes
-rw-r--r--macros/latex-dev/base/ltnews14.pdfbin170722 -> 170722 bytes
-rw-r--r--macros/latex-dev/base/ltnews15.pdfbin130328 -> 130328 bytes
-rw-r--r--macros/latex-dev/base/ltnews16.pdfbin138107 -> 138107 bytes
-rw-r--r--macros/latex-dev/base/ltnews17.pdfbin166269 -> 166269 bytes
-rw-r--r--macros/latex-dev/base/ltnews18.pdfbin39839 -> 39839 bytes
-rw-r--r--macros/latex-dev/base/ltnews19.pdfbin225936 -> 225936 bytes
-rw-r--r--macros/latex-dev/base/ltnews20.pdfbin318193 -> 318193 bytes
-rw-r--r--macros/latex-dev/base/ltnews21.pdfbin245228 -> 245228 bytes
-rw-r--r--macros/latex-dev/base/ltnews22.pdfbin318026 -> 318026 bytes
-rw-r--r--macros/latex-dev/base/ltnews23.pdfbin286824 -> 286824 bytes
-rw-r--r--macros/latex-dev/base/ltnews24.pdfbin265497 -> 265497 bytes
-rw-r--r--macros/latex-dev/base/ltnews25.pdfbin205100 -> 205100 bytes
-rw-r--r--macros/latex-dev/base/ltnews26.pdfbin379733 -> 379733 bytes
-rw-r--r--macros/latex-dev/base/ltnews27.pdfbin251283 -> 251283 bytes
-rw-r--r--macros/latex-dev/base/ltnews28.pdfbin376950 -> 376950 bytes
-rw-r--r--macros/latex-dev/base/ltnews29.pdfbin455437 -> 455437 bytes
-rw-r--r--macros/latex-dev/base/ltnews30.pdfbin512240 -> 512240 bytes
-rw-r--r--macros/latex-dev/base/ltnews31.pdfbin526681 -> 526681 bytes
-rw-r--r--macros/latex-dev/base/ltnews32.pdfbin546540 -> 546540 bytes
-rw-r--r--macros/latex-dev/base/ltnews33.pdfbin522757 -> 522757 bytes
-rw-r--r--macros/latex-dev/base/ltnews34.pdfbin508345 -> 508345 bytes
-rw-r--r--macros/latex-dev/base/ltnews35.pdfbin563305 -> 563305 bytes
-rw-r--r--macros/latex-dev/base/ltnews36.pdfbin517934 -> 517934 bytes
-rw-r--r--macros/latex-dev/base/ltnews37.pdfbin456933 -> 456933 bytes
-rw-r--r--macros/latex-dev/base/ltnews38.pdfbin523675 -> 523675 bytes
-rw-r--r--macros/latex-dev/base/ltnews39.pdfbin540172 -> 541772 bytes
-rw-r--r--macros/latex-dev/base/ltnews39.tex19
-rw-r--r--macros/latex-dev/base/ltnews40.pdfbin323778 -> 476853 bytes
-rw-r--r--macros/latex-dev/base/ltnews40.tex577
-rw-r--r--macros/latex-dev/base/ltnews41.pdfbin0 -> 222785 bytes
-rw-r--r--macros/latex-dev/base/ltnews41.tex190
-rw-r--r--macros/latex-dev/base/ltpara-code.pdfbin672808 -> 672995 bytes
-rw-r--r--macros/latex-dev/base/ltpara-doc.pdfbin560721 -> 560715 bytes
-rw-r--r--macros/latex-dev/base/ltpara.dtx28
-rw-r--r--macros/latex-dev/base/ltpictur.dtx3
-rw-r--r--macros/latex-dev/base/ltproperties-code.pdfbin557481 -> 557320 bytes
-rw-r--r--macros/latex-dev/base/ltproperties-doc.pdfbin432004 -> 431802 bytes
-rw-r--r--macros/latex-dev/base/ltproperties.dtx36
-rw-r--r--macros/latex-dev/base/ltshipout-code.pdfbin821771 -> 821340 bytes
-rw-r--r--macros/latex-dev/base/ltshipout-doc.pdfbin567925 -> 567691 bytes
-rw-r--r--macros/latex-dev/base/ltshipout.dtx4
-rw-r--r--macros/latex-dev/base/ltsockets-code.pdfbin599138 -> 602006 bytes
-rw-r--r--macros/latex-dev/base/ltsockets-doc.pdfbin481972 -> 486428 bytes
-rw-r--r--macros/latex-dev/base/ltsockets.dtx42
-rw-r--r--macros/latex-dev/base/ltspace.dtx184
-rw-r--r--macros/latex-dev/base/lttab.dtx4
-rw-r--r--macros/latex-dev/base/lttagging.dtx397
-rw-r--r--macros/latex-dev/base/lttemplates-code.pdfbin0 -> 751718 bytes
-rw-r--r--macros/latex-dev/base/lttemplates-code.tex5
-rw-r--r--macros/latex-dev/base/lttemplates-doc.pdfbin0 -> 467500 bytes
-rw-r--r--macros/latex-dev/base/lttemplates-doc.tex8
-rw-r--r--macros/latex-dev/base/lttemplates.dtx42
-rw-r--r--macros/latex-dev/base/lttextcomp.dtx4
-rw-r--r--macros/latex-dev/base/ltvers.dtx4
-rw-r--r--macros/latex-dev/base/ltx3info.pdfbin219358 -> 219358 bytes
-rw-r--r--macros/latex-dev/base/ltxdoc.pdfbin244141 -> 244141 bytes
-rw-r--r--macros/latex-dev/base/ltxref.dtx85
-rw-r--r--macros/latex-dev/base/makeindx.pdfbin165816 -> 165816 bytes
-rw-r--r--macros/latex-dev/base/manifest.txt3
-rw-r--r--macros/latex-dev/base/modguide.pdfbin257825 -> 257825 bytes
-rw-r--r--macros/latex-dev/base/nfssfont.pdfbin211314 -> 211314 bytes
-rw-r--r--macros/latex-dev/base/proc.pdfbin227065 -> 227065 bytes
-rw-r--r--macros/latex-dev/base/slides.pdfbin375493 -> 375493 bytes
-rw-r--r--macros/latex-dev/base/slifonts.pdfbin233905 -> 233905 bytes
-rw-r--r--macros/latex-dev/base/source2e.pdfbin6442612 -> 6521205 bytes
-rw-r--r--macros/latex-dev/base/syntonly.pdfbin189555 -> 189462 bytes
-rw-r--r--macros/latex-dev/base/tlc2.pdfbin290257 -> 290257 bytes
-rw-r--r--macros/latex-dev/base/tlc3.err57
-rw-r--r--macros/latex-dev/base/tlc3.pdfbin369936 -> 385504 bytes
-rw-r--r--macros/latex-dev/base/tulm.pdfbin162773 -> 162773 bytes
-rw-r--r--macros/latex-dev/base/usrguide-historic.pdfbin439393 -> 439393 bytes
-rw-r--r--macros/latex-dev/base/usrguide.pdfbin487553 -> 488007 bytes
-rw-r--r--macros/latex-dev/base/usrguide.tex13
-rw-r--r--macros/latex-dev/base/utf8ienc.pdfbin353555 -> 353390 bytes
-rw-r--r--macros/latex-dev/base/webcomp.pdfbin146205 -> 146205 bytes
151 files changed, 2758 insertions, 565 deletions
diff --git a/macros/latex-dev/base/README.md b/macros/latex-dev/base/README.md
index 6827494f25..8e74772593 100644
--- a/macros/latex-dev/base/README.md
+++ b/macros/latex-dev/base/README.md
@@ -1,7 +1,7 @@
The LaTeX kernel
================
-Release 2024-11-01 pre-release 1
+Release 2025-06-01 pre-release 0
Overview
--------
diff --git a/macros/latex-dev/base/alltt.dtx b/macros/latex-dev/base/alltt.dtx
index 4718c004b4..8fd4ac2db3 100644
--- a/macros/latex-dev/base/alltt.dtx
+++ b/macros/latex-dev/base/alltt.dtx
@@ -40,7 +40,7 @@
%<package>\ProvidesPackage{alltt}
%<driver>\ProvidesFile{alltt.drv}
%\ProvidesFile{alltt.dtx}
- [2024/02/08 v2.0g defines alltt environment]
+ [2024/07/07 v2.0g defines alltt environment]
%
%<*driver>
\documentclass{ltxdoc}
@@ -83,7 +83,7 @@
% Here are some things you may want to do in an \Lenv{alltt}
% environment:
% \begin{itemize}
-% \item Change fonts--e.g., by typing |{\em emphasized text\/}|
+% \item Change fonts--e.g., by typing |\emph{emphasized text}|
%
% \item Insert text from a file \file{foo.tex} by typing
% |\input{foo}|. Beware that each |<return>| starts a new line, so
diff --git a/macros/latex-dev/base/alltt.pdf b/macros/latex-dev/base/alltt.pdf
index 9dd2202199..bd3211998e 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 dde0067a4b..7bf7bd0b18 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 a37facbbc9..6321cf6fd8 100644
--- a/macros/latex-dev/base/changes.txt
+++ b/macros/latex-dev/base/changes.txt
@@ -6,6 +6,209 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================
+================================================================================
+All changes above are only part of the development branch for the next release.
+================================================================================
+
+#########################
+# 2024-11-01 Release
+#########################
+
+2024-10-29 Yukai Chou <muzimuzhi@gmail.com>
+ * lthooks.dtx (subsection{Setting rules for hooks code}):
+ Skip mapping over undeclared \g__hook_<hook>_code_prop (gh/1513).
+
+2024-10-27 Marcel Krüger <Marcel.Krueger@latex-project.org>
+ * lttagging.dtx
+ Change tagging sockets with two arguments to drop the first argument
+ but return the second argument when the socket is disabled with \SuspendTagging.
+ Add expandable versions of tagging socket use commands.
+ * ltsocket.dtx
+ Add expandable versions of \socket_use_expandable:n.
+ Make internal plug definitions non-protected to allow expandable use.
+
+2024-10-26 Yukai Chou <muzimuzhi@gmail.com>
+ * ltcounts.dtx (subsection{Environment Counter Macros}):
+ Fully expand counter name in \theH<counter> commands (gh/1508)
+
+2024-10-23 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * doc.dtx:
+ A rollback comment leaked into the documentation (gh1418)
+
+2024-10-22 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+ * ltcmdhooks.dtx:
+ Some clarification why not all
+ commands allow generic cmd hooks (gh/1091, gh/1430 and gh/1501)
+
+2024-10-22 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * ltshipout.dtx: correct documentation (gh/1470).
+
+ 2024-10-21 Matthew Bertucci <bertucci@math.utah.edu>
+ * lthooks.dtx
+ Define \IfHookEmptyT, \IfHookEmptyF
+ * ltmarks.dtx
+ Define \IfMarksEqualT, \IfMarksEqualF
+ * ltproperties.dtx
+ Define \IfPropertyRecordedT, \IfPropertyRecordedF
+
+2024-10-18 Clea Rees <reesc21@cf.ac.uk>
+ * lttextcomp.dtx
+ Fix typo in \ProvidesFile
+
+2024-10-12 Joseph Wright <Joseph.Wright@latex-project.org>
+ * ltmiscen.dtx
+ Define \begin as an engine-protected macro
+
+2024-10-07 Joseph Wright <Joseph.Wright@latex-project.org>
+ * lttemplates.dtx
+ Correct passing of token list content using \KeyValue
+
+2024-10-02 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: restore also paratagging in the para/restore socket,
+ see https://github.com/latex3/tagging-project/issues/723
+
+2024-09-25 Matthew Bertucci <bertucci@math.utah.edu>
+ * ltproperties.dtx: Fix definitions for \IfLabelExistsT and \IfLabelExistsF
+
+2024-09-17 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: dummy for \tag_suspend:n and \tag_resume:n
+ * lttagging.dtx: declare tagging sockets for floats and caption.
+
+2024-09-21 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+
+ * ltcounts.dtx (subsection{Environment Counter Macros}):
+ extend \@definecounter and \@addtoreset so that they define also \theH<counter>
+ * ltxref.dtx (subsection{Cross Referencing}):
+ Use sockets in \refstepcounter for target and tagging support.
+ * ltmeta.dtx: move patches and change of \MakeLinkTarget from latex-lab.
+ * lttagging.dtx: add tagging socket for targets.
+
+2024-09-15 Joseph Wright <Joseph.Wright@latex-project.org>
+ * lttemplates-doc.tex, lttemplates-code.tex:
+ New files
+ * clsguide.tex
+ Link to template documentation
+
+2024-09-12 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * ltproperties.dtx: remove @filesw-test in \__property_record:nn,
+ see https://github.com/latex3/tagging-project/issues/696
+
+2024-09-11 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lterror.dtx (subsection{Specific errors}):
+ Add error message "Not allowed in LR mode"
+
+2024-09-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltspace.dtx (subsection{Vertical spacing}):
+ Drop unnecessary \@noitemerr in \addvspace and \addpenalty and
+ instead generate \@parmodeerr if we are in restricted hmode (gh/1460)
+ Also use \protected definitions for them.
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * ltlength.dtx: suspend tagging in \@settodim
+
+2024-09-03 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * fontdef.dtx: preload t1cmss.fd and t1cmtt.fd
+
+2024-09-02 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * clsguide.tex:
+ Document \IfPackageLoadedTF, \IfPackageAtLeastTF, etc.
+
+2024-08-12 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltluatex.dtx:
+ Allow for missing version string in Lua modules (gh/1443)
+
+2024-08-09 Yukai Chou <muzimuzhi@gmail.com>
+ * lthooks.dtx: (subsection{Parsing a label})
+ Raise different errors for empty label and empty hook (gh/1423)
+
+2024-08-03 Yukai Chou <muzimuzhi@gmail.com>
+ * ltclass.dtx (section{Package/class rollback mechanism}):
+ Add selected release to the file list (gh/1413)
+
+2024-08-12 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * letter.dtx (subsection{The generic letter commands}):
+ Alter sample address in documentation (gh/1439)
+
+2024-08-10 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: reset flattened level in para/restore
+
+2024-07-27 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: (subsection{Tagging support for table/tabular packages}):
+ Two sockets added to store and restore cell data when nesting tables to keep track
+ of multirow settings.
+
+2024-07-27 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: (subsection{Paragraph sockets}): A socket and plug to restore paragraph
+ setting added.
+
+2024-07-23 Yukai Chou <muzimuzhi@gmail.com>
+
+ * ltclass.dtx (section{Implementation}):
+ Trim spaces from unused option added by \OptionNotUsed (gh/1238)
+
+2024-07-13 Ulrike Fischer <Ulrike.Fischer@latex-project.org>
+ * lttagging.dtx: (subsection{Tagging sockets}): toc-related tagging sockets added.
+
+2024-07-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lttagging.dtx (subsection{Tagging support for table/tabular packages}):
+ Sockets for \cs{cline} leaders added (tagging/134)
+
+2024-07-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Drop code chunks before adding them to avoid duplication in
+ rollback (gh/1407)
+
+2024-07-06 Yukai Chou <muzimuzhi@gmail.com>
+
+ * ltcmd.dtx (subsection{User functions}):
+ Trim spaces for envname before existence check (gh/1399)
+ (subsection{Declaring commands and environments}):
+ Simplify \__cmd_declare_env:nnnn, use space-trimmed envname directly
+
+2024-06-24 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * ltlists.dtx:
+ Changes to \@doendpe, \@endpefalse, and \@endpetrue for
+ new @endpe handling. \if@endpe is now a global switch and
+ migration out of groups is handled via \aftergroup
+
+ * ltmiscen.dtx (subsection{Environments}):
+ Adjust \end<space> for new @endpe handling
+
+ * ltboxes.dtx (section{\LaTeX\ Box commands}):
+ Adjust \color@endgroup for new @endpe handling
+
+2024-06-19 David Carlisle <David.Carlisle@latex-project.org>
+
+ * fontdef.dtx:
+ preload ts1cmr.fd in Unicode engines
+
+2024-06-19 Joseph Wright <Joseph.Wright@latex-project.org>
+ * ltkeys.dtx, clsguide.tex
+ Ensure only key name is stored for option handling
+
+2024-06-19 Joseph Wright <Joseph.Wright@latex-project.org>
+ * ltkeys.dtx, clsguide.tex
+ Refactor class option code
+ Add mechanism to exclude class options from package processing
+
+2024-06-17 David Carlisle <David.Carlisle@latex-project.org>
+
+ * ltfssbas.dtx: set \tracinglostchars in \showhyphens. gh/1380
+
+2024-06-13 Frank Mittelbach <Frank.Mittelbach@latex-project.org>
+
+ * lthooks.dtx:
+ Clarify syntax of hook names and behavior of hook rules and default
+ hook rules (gh/1227 & gh/1237)
+
2024-06-04 Yukai Chou <muzimuzhi@gmail.com>
* ltclass.dtx (section{Package/class rollback mechanism}):
@@ -23,6 +226,11 @@ not part of the distribution.
This way the user can still alter \PrintDescribeMacro, etc. in the preamble
(gh/1000)
+2024-06-04 Joseph Wright <Joseph.Wright@latex-project.org>
+
+ * ltluatex.dtx:
+ Mark "v" in provides_module() when logging version string
+
2024-06-04 Yukai Chou <muzimuzhi@gmail.com>
* source2e.tex:
@@ -31,9 +239,15 @@ not part of the distribution.
* lttemplates.dtx:
Fix markup typos.
-================================================================================
-All changes above are only part of the development branch for the next release.
-================================================================================
+#########################
+# 2024-06-01 PL2 Release
+#########################
+
+2024-06-23 Yukai Chou <muzimuzhi@gmail.com>
+
+ * ltpara.dtx
+ Append \everypar toks to \g__parar_standard_everypar_tl, rollback
+ 2023/06/01 (gh/1386)
#########################
# 2024-06-01 PL1 Release
diff --git a/macros/latex-dev/base/classes.dtx b/macros/latex-dev/base/classes.dtx
index f7c53f0f71..ce3d902b21 100644
--- a/macros/latex-dev/base/classes.dtx
+++ b/macros/latex-dev/base/classes.dtx
@@ -53,7 +53,7 @@
%<*driver>
\ProvidesFile{classes.drv}
%</driver>
- [2024/02/08 v1.4n
+ [2024/06/29 v1.4n
%<article|report|book> Standard LaTeX document class]
%<10pt|11pt|12pt> Standard LaTeX file (size option)]
% \end{macrocode}
@@ -257,7 +257,7 @@
%
% \begin{macro}{\@ptsize}
% This control sequence is used to store the second digit of the
-% pointsize we are typesetting in. So, normally, it's value is one
+% pointsize we are typesetting in. So, normally, its value is one
% of 0, 1 or 2.
% \begin{macrocode}
%<*article|report|book>
@@ -362,7 +362,7 @@
% with other packages that use the |\@ptsize| variable to select
% special actions. It makes the declarations of size options less
% than 10pt difficult, although one can probably use \texttt{9}
-% and \texttt{8} assuming that a class wont define both
+% and \texttt{8} assuming that a class won't define both
% \Lopt{8pt} and \Lopt{18pt} options.
%
% \begin{macrocode}
@@ -3122,7 +3122,7 @@
%
% \subsubsection{Theorem}
%
-% This document class does not define it's own theorem environments,
+% This document class does not define its own theorem environments,
% the defaults, supplied by the \LaTeX{} format are available.
%
% \subsubsection{Titlepage}
@@ -3130,12 +3130,12 @@
% \begin{environment}{titlepage}
% In the normal environments, the titlepage environment does nothing
% but start and end a page, and inhibit page numbers. When \LaTeX\ is
-% in two-column mode, the environmont temporarily switches to
+% in two-column mode, the environment temporarily switches to
% one-column mode.
% In the report class, it also resets the page number to one, and
% then, in two-column mode, sets it back to one at the end.
% For the book class the environment makes sure that the title page
-% is on a recto page by issueing a \cs{cleardouplepage}-command.
+% is on a recto page by issuing a \cs{cleardoublepage}-command.
% In compatibility mode, it sets the page number to zero. This is
% incorrect since it results in using the page parameters for a
% right-hand page but it is the way it was.
diff --git a/macros/latex-dev/base/classes.pdf b/macros/latex-dev/base/classes.pdf
index dce87c199f..a43910f485 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-historic.pdf b/macros/latex-dev/base/clsguide-historic.pdf
index ada84a99cd..76ce49be4b 100644
--- a/macros/latex-dev/base/clsguide-historic.pdf
+++ b/macros/latex-dev/base/clsguide-historic.pdf
Binary files differ
diff --git a/macros/latex-dev/base/clsguide.pdf b/macros/latex-dev/base/clsguide.pdf
index cac62ae0c8..1658b6168e 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/clsguide.tex b/macros/latex-dev/base/clsguide.tex
index 6b9e49c4e8..e7adc9da38 100644
--- a/macros/latex-dev/base/clsguide.tex
+++ b/macros/latex-dev/base/clsguide.tex
@@ -42,7 +42,7 @@
\texttt{clsguide.tex} for full details.}%
}
-\date{2024-05-24}
+\date{2024-09-15}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -76,13 +76,13 @@ information for general \LaTeX{} users on up-to-date approaches to creating
commands, etc.
\section{Writing classes and packages}
-\label{Sec:writing}
+\label{sec:writing}
This section covers some general points concerned with writing
\LaTeX{} classes and packages.
\subsection{Is it a class or a package?}
-\label{Sec:classorpkg}
+\label{sec:classorpkg}
The first thing to do when you want to put some new \LaTeX{} commands
in a file is to decide whether it should be a \emph{document class} or a
@@ -211,7 +211,7 @@ introduction to the approach is provided at
\url{https://www.alanshawn.com/latex3-tutorial/}.
\subsection{Box commands and color}
-\label{Sec:color}
+\label{sec:color}
Even if you do not intend to use color in your own documents, by taking note of
the points in this section you can ensure that your class or package is
@@ -243,14 +243,14 @@ regions of the page such as captions or section headings to the `main document
color'.
\subsection{General style}
-\label{Sec:general}
+\label{sec:general}
\LaTeX{} provides many commands designed to help you produce well-structured
class and package files that are both robust and portable. This section
outlines some ways to make intelligent use of these.
\subsubsection{Loading other files}
-\label{Sec:loading}
+\label{sec:loading}
\LaTeX{} provides these commands:
\begin{verbatim}
@@ -331,9 +331,9 @@ example the University of Nowhere classes might begin with |unw|. This helps to
avoid every University having its own thesis class, all called |thesis.cls|.
If you rely on some features of the \LaTeX{} kernel, or on a package,
-please specify the release-date you need. For example, the package
-error commands were introduced in the June 2022 release so, if you use
-them then you should put:
+please specify the release-date you need. For example, the keyval
+options (see Section~\ref{sec:opt:keyval}) were introduced in the June
+2022 release so, if you use them then you should put:
\begin{verbatim}
\NeedsTeXFormat{LaTeX2e}[2022-06-01]
\end{verbatim}
@@ -351,7 +351,7 @@ the interface for using these is described in \texttt{lthooks}. There are
also hooks to apply to files, described in \texttt{ltfilehooks}.
\section{The structure of a class or package}
-\label{Sec:structure}
+\label{sec:structure}
The outline of a class or package file is:
\begin{description}
@@ -366,7 +366,8 @@ The outline of a class or package file is:
declaring new variables, commands and fonts; and loading other files.
\end{description}
-\subsection{Identification}
+\subsection{Identification%
+ \label{sec:ID}}
The first thing a class or package file does is identify itself.
Package files do this as follows:
@@ -389,12 +390,14 @@ For example:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{article}[2022-06-01 Standard LaTeX class]
\end{verbatim}
-The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' and must be
-present if the optional argument is used (this is also true for the
-|\NeedsTeXFormat| command). Any derivation from this syntax will result in
-low-level \TeX{} errors---the commands expect a valid syntax to speed up the
-daily usage of the package or class and make no provision for the case that the
-developer made a mistake!
+The \m{date} should be given in the form `\textsc{yyyy-mm-dd}' or
+`\textsc{yyyy/mm/dd}' and must be present if the optional argument is used.
+Exactly four digits are required for the year and two each for the month and
+day. Where necessary, zeros should be added to pad the month and day
+appropriately. If digits or separators are missing, the date will likely be
+misinterpreted: the commands expect a valid syntax to speed up the routine usage
+of the package or class and make no provision for the case there is an error
+in the date specification.
This date is checked whenever a user specifies a date in their |\documentclass|
or |\usepackage| command. For example, if you wrote:
@@ -467,7 +470,7 @@ the \LaTeX{} source: declaration of options first then processing options in a
second step. Both also allow options to be passed on to other packages or an
underlying class. As the `classical' simple text approach is conceptually more
straight-forward to illustrate, it is used here to show the general structure:
-see Section~\ref{Sec:opt:keyval} for full details of the key--value approach.
+see Section~\ref{sec:opt:keyval} for full details of the key--value approach.
An option is declared as follows:
\begin{verbatim}
@@ -513,7 +516,7 @@ option is used. This can be done by writing:
It is possible to pass options on to another package or class, using the
command |\PassOptionsToPackage| or |\PassOptionsToClass| (note that this is a
specialised operation that works only for option names): see
-Section~\ref{Sec:opmove}. For example, to pass every unknown option on to the
+Section~\ref{sec:opmove}. For example, to pass every unknown option on to the
|article| class, you can use:
\begin{verbatim}
\DeclareOption*{%
@@ -529,7 +532,7 @@ To process the options with which the file was called, you should use:
\ProcessOptions\relax
\end{verbatim}
This executes the \m{code} for each option that was both specified and declared
-(see Section~\ref{Sec:commands.options} for details of how this is done).
+(see Section~\ref{sec:commands.options} for details of how this is done).
For example, if the |jane| package file contains:
\begin{verbatim}
@@ -656,7 +659,7 @@ issue numbers, authors of articles, page styles and so on; but this skeleton
gives a start. The |ltnews| class file is not much more complex than this one.
\section{Commands for class and package writers}
-\label{Sec:commands}
+\label{sec:commands}
This section describes briefly each of the commands for class and package
writers. To find out about other aspects of the system,
@@ -675,8 +678,10 @@ This command tells \TeX{} that this file should be processed using a format
with name \m{format-name}. You can use the optional argument \m{release-date}
to further specify the earliest release date of the format that is needed. When
the release date of the format is older than the one specified a warning will
-be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The date, if
-present, must be in the form \textsc{yyyy-mm-dd}.
+be generated. The standard \m{format-name} is \texttt{LaTeX2e}. The
+\meta{release-date}, if
+present, must be in the form `\textsc{yyyy-mm-dd}' or
+`\textsc{yyyy/mm/dd}'.
Example:
\begin{verbatim}
@@ -732,7 +737,7 @@ identification banner of any file other than those in the standard \LaTeX{}
distribution.
\subsection{Loading files}
-\label{Sec:loadf}
+\label{sec:loadf}
This group of commands can be used to create your own document class or package
by building on existing classes or packages.
@@ -771,10 +776,10 @@ Examples:
The two |WithOptions| versions simply load the class (or package) file with
exactly those options that are being used by the current file (class or
-package). See below, in \ref{Sec:opmove}, for further discussion of their use.
+package). See below, in \ref{sec:opmove}, for further discussion of their use.
\subsection{Delaying code}
-\label{Sec:delays}
+\label{sec:delays}
As noted earlier, a sophisticated hook system is available and described in
\texttt{lthooks}. Here, we document a small set of convenient short names for
@@ -819,7 +824,7 @@ Repeated use of these commands is permitted: the code in the arguments is
stored (and later executed) in the order of their declarations.
\subsection{Creating and using keyval options}
-\label{Sec:opt:keyval}
+\label{sec:opt:keyval}
As with any key--value input, using key--value pairs as package or class
options has two parts: creating the key options and setting (using) them.
@@ -841,6 +846,9 @@ The basic properties provided here are
\item \texttt{.code} --- execute arbitrary code
\item \texttt{.if} --- sets a \TeX{} |\if...| switch
\item \texttt{.ifnot} --- sets an inverted \TeX{} |\if...| switch
+ \item \texttt{.pass-to-packages} --- for class options, this specifies
+ whether the option should be treated \enquote{global} (read by packages
+ from the global list); for package options this property has no effect
\item \texttt{.store} --- stores a value in a macro
\item \texttt{.usage} -- defines whether the option can be given only
when loading (\texttt{load}), in the preamble (\texttt{preamble}) or
@@ -902,7 +910,7 @@ latter is not given, the value of |\@currname| is used. This command may be used
within a package to set options before or after using |\ProcessKeyOptions|.
\subsection{Passing options around}
-\label{Sec:opmove}
+\label{sec:opmove}
These two commands are also very useful within the \m{code} argument of
options.
@@ -929,7 +937,7 @@ Similarly, |\PassOptionsToClass| may be used in a class file to pass options to
another class to be loaded with |\LoadClass|.
The effects and use of these two commands should be contrasted with those of
-the following two (documented above, in \ref{Sec:loadf}):
+the following two (documented above, in \ref{sec:loadf}):
\begin{verbatim}
\LoadClassWithOptions
\RequirePackageWithOptions
@@ -974,6 +982,62 @@ as in that case \textsf{article} is passed options only by the default option
handler, but this handler is not used for |landscape| because that option is
explicitly declared.
+\subsection{Useful status tests}
+
+A number of status tests are available which can be used by package and
+class authors to query the presence and date of other code, the current kernel
+release and other related ideas. Three forms of each test are provided, one
+requiring arguments for both \meta{true} and \meta{false} branches, one
+requiring only a \meta{true} branch and one requiring only a \meta{false}
+branch. These are indicated in their names as |TF|, |T| and |F|, respectively.
+Here, we document only the |TF| versions: the other forms are however also
+available.
+
+\begin{decl}
+ |\IfPackageLoadedTF| \arg{package-name} \arg{true code} \arg{false code}\\
+ |\IfClassLoadedTF| \arg{class-name} \arg{true code} \arg{false code}\\
+ |\IfFileLoadedTF| \arg{file-name} \arg{true code} \arg{false code}
+\end{decl}
+These commands test whether the named package, class or file has been loaded: this is
+done by using information that must be contained in an appropriate
+|\Provides...| line, as described in Section~\ref{sec:ID}. In the case of
+\cs{IfFileLoadedTF}, the full \meta{file-name} must be provided; in contrast,
+no extension should be given if testing for a package or class.
+
+\begin{decl}
+ |\IfPackageLoadedWithOptionsTF| \arg{package-name} \arg{options} \arg{true code} \arg{false code}\\
+ |\IfClassLoadedWithOptionsTF| \arg{class-name} \arg{options} \arg{true code} \arg{false code}
+\end{decl}
+These commands test whether the named package or class has been loaded with
+\emph{exactly} the \meta{options} specified. In order to take the \meta{true}
+branch, the package or class must be loaded (giving a \meta{true} result for
+\cs{If...LoadedT}) and the option list used when loading it must be identical
+to the \meta{options}.
+
+\begin{decl}
+ |\IfPackageAtLeastTF| \arg{package-name} \arg{date} \arg{true code} \arg{false code}\\
+ |\IfClassAtLeastTF| \arg{class-name} \arg{date} \arg{true code} \arg{false code}\\
+ |\IfFileAtLeastTF| \arg{file-name} \arg{date} \arg{true code} \arg{false code}
+\end{decl}
+These tests are used to check whether the date information given in the
+|\Provides...| line of a package, class or file is no earlier than the given
+\meta{date}. The \meta{date} is compared with that in the
+optional argument to \cs{Provides...} (as described in Section~\ref{sec:ID});
+if \cs{Provides...} was missing or had no optional argument, it is treated
+as |0000/00/00| (i.e.~earlier than any other date).
+As for \cs{Provides...}, the \meta{date} should be given in the form
+`\textsc{yyyy-mm-dd}' or `\textsc{yyyy/mm/dd}'. If the package, class or file is not
+loaded, the \meta{false} branch will be taken; in contrast, if the \meta{date}
+is not given in the required form, the behavior is formally undefined.
+
+\begin{decl}
+ |\IfFormatAtLeastTF| \arg{date} \arg{true code} \arg{false code}
+\end{decl}
+Tests the release \meta{date} of the \LaTeX{} format and selects the
+appropriate branch. The date used by the format is adjusted to incorporate any
+roll forward or back that has been applied to it, so that the apparent date
+of the format will be that after roll forward or back.
+
\subsection{Safe file commands}
These commands deal with file input; they ensure that the non-existence of a
@@ -1067,7 +1131,7 @@ prints a space. Also, these should not end with a full stop as one is
automatically added.
\section{Miscellaneous commands, etc.}
-\label{Sec:commands.misc}
+\label{sec:commands.misc}
\subsection{Layout parameters}
@@ -1333,6 +1397,25 @@ modern packages, that use the L3 programming layer of \LaTeX{}. The
\texttt{expl3} commands and more details can be found in
\texttt{ltproperties-doc.pdf}.
+\subsubsection{Templates (protoype document commands)}
+
+\emph{Templates} as defined by \LaTeX{} are a mechanism to cleanly separate the
+three layers needed for writing a document
+\begin{enumerate}
+ \item authoring of the text with mark-up;
+ \item document layout design;
+ \item implementation (with \TeX{} programming) of the design.
+\end{enumerate}
+They allow document authors to modify design without altering code, and allow
+programmers to make portable changes to classes.
+
+Implementing this mechanism requires a number of steps and a family of commands
+which allow variation in outcomes. A typical use of templates will make use of
+most or all of |\NewTemplateType|, |\DeclareTemplateInterface|,
+|\DeclareTemplateCode|, |\DeclareInstance| and |\UseInstance|, plus potentially
+some more specialised commands. These are descrined in \texttt{lttemplates-doc}
+in full detail.
+
\subsection{Preparing link targets}
Active links in a document need targets to which they can jump to. Such
@@ -1428,7 +1511,7 @@ starts altering the definitions of commands. It allows you to check, in
particular, that no other package has redefined the same command.
\subsection{Option declaration}
-\label{Sec:commands.options.dec}
+\label{sec:commands.options.dec}
The following commands deal with the declaration and handling of options to
document classes and packages using a classical `simple text' approach. Every
@@ -1468,7 +1551,7 @@ If a package file contains no |\DeclareOption*| then, by default, each
specified but undeclared option for that package will produce an error.
\subsection{Commands within option code}
-\label{Sec:within.code}
+\label{sec:within.code}
These two commands can be used only within the \m{code} argument of either
|\DeclareOption| or |\DeclareOption*|. Other commands commonly used within
@@ -1485,7 +1568,7 @@ This expands to the name of the current option.
This causes the current option to be added to the list of `unused options'.
\subsection{Option processing}
-\label{Sec:commands.options}
+\label{sec:commands.options}
\begin{decl}
|\ProcessOptions|
diff --git a/macros/latex-dev/base/cmfonts.pdf b/macros/latex-dev/base/cmfonts.pdf
index 2a12c635b4..89de0c3ef6 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 39a4172542..b5f914d9e2 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 e77afc9951..d361838381 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.dtx b/macros/latex-dev/base/doc.dtx
index af4d9508e9..a6af48b88a 100644
--- a/macros/latex-dev/base/doc.dtx
+++ b/macros/latex-dev/base/doc.dtx
@@ -34,7 +34,7 @@
%\catcode`\<=14
%<+package|shortvrb>\NeedsTeXFormat{LaTeX2e}[1994/12/01]
%<+package>
-% Any rollback request before 2016-02-15 we try to fullfil with the 2016 version:
+% ^^A Any rollback request before 2016-02-15 we try to fulfill with the 2016 version:
%<+package>\DeclareRelease{}{1994-06-01}
%<+package> {doc-2016-02-15.sty}
%<+package>\DeclareRelease{v2.1g}{2016-02-15}
@@ -45,7 +45,7 @@
%<+package>
%<+package>\ProvidesPackage{doc}
%<+shortvrb>\ProvidesPackage{shortvrb}
-%<+package|shortvrb> [2024/06/04 v3.0q
+%<+package|shortvrb> [2024/10/23 v3.0q
%<+package|shortvrb> Standard LaTeX documentation package V3 (FMi)]
%\catcode`\<=12
%
@@ -836,7 +836,7 @@
%
% All three above declarations are local to the current group.
%
-% Production (or not) of the index (via the |\makeindex| commend) is
+% Production (or not) of the index (via the |\makeindex| command) is
% controlled by using or omitting the following declarations in the
% driver file preamble; if neither is used, no index is produced.
% \DescribeInterfaceMacro\PageIndex Using |\PageIndex| makes all index
@@ -5565,7 +5565,7 @@
% Since version 2.1g, \texttt{doc} creates a \cs{saved@indexname} command
% which in used by \cs{changes}. We now support that as well. The expansion of
% this command depends on whether the documented item is macrolike or not,
-% which we don't know here (it's only know by \cs{NewDocElement}). That's why we
+% which we don't know here (it's only known by \cs{NewDocElement}). That's why we
% need one specific command generating \cs{saved@indexname} the right way for
% every single item. These commands are
% named\cs{@Save\meta{item}IndexName};
diff --git a/macros/latex-dev/base/doc.pdf b/macros/latex-dev/base/doc.pdf
index 4d7ea93b12..817c4c5a5e 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 ec53a2406d..91ac058a5d 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 64fe5b456b..e01c09a6e3 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 8a921641b1..fceeac65e7 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 86ee185285..dfa6f18896 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 39dd0c620d..4788f8aa5e 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/fntguide.tex b/macros/latex-dev/base/fntguide.tex
index 6106204a55..23471f6f88 100644
--- a/macros/latex-dev/base/fntguide.tex
+++ b/macros/latex-dev/base/fntguide.tex
@@ -52,7 +52,7 @@
\texttt{fntguide.tex} for full details.}%
}
-\date{March 2024}
+\date{Sep 2024}
\begin{document}
@@ -93,28 +93,28 @@ This document contains an overview of the new font commands of \LaTeX.
\begin{description}
-\item[Section~\ref{Sec:text}] describes the commands for selecting fonts
+\item[Section~\ref{sec:text}] describes the commands for selecting fonts
in classes and packages. It lists the five \LaTeX{} font attributes,
and lists the commands for selecting fonts. It also describes how to
customize the author commands such as |\textrm| and |\textit| to suit
your document design.
-\item[Section~\ref{Sec:math}] explains the commands for controlling
+\item[Section~\ref{sec:math}] explains the commands for controlling
\LaTeX{} math fonts. It describes how to specify new math fonts and
new math symbols.
-\item[Section~\ref{Sec:install}] explains how to install new fonts into
+\item[Section~\ref{sec:install}] explains how to install new fonts into
\LaTeX. It shows how \LaTeX{} font attributes are turned into \TeX{}
font names, and how to specify your own fonts using font definition
files.
-\item[Section~\ref{Sec:encode}] discusses text font encodings. It
+\item[Section~\ref{sec:encode}] discusses text font encodings. It
describes how to declare a new encoding and how to define commands,
such as |\AE| or |\"|, which have different definitions in different
encodings, depending on whether ligatures, etc.\ are available in the
encoding.
-\item[Section~\ref{Sec:misc}] covers font miscellanea. It describes how
+\item[Section~\ref{sec:misc}] covers font miscellanea. It describes how
\LaTeX{} performs font substitution, how to customize fonts that are
preloaded in the \LaTeX{} format, and the naming conventions used in
\LaTeX{} font selection.
@@ -143,7 +143,7 @@ same source as your copy of \LaTeX.
The |psnfss| software uses fonts generated by Alan Jeffrey's |fontinst|
software. This can convert fonts from Adobe Font Metric format into a
format readable by \LaTeX, including the generation of the font
-definition files described in Section~\ref{Sec:install}. The |fontinst|
+definition files described in Section~\ref{sec:install}. The |fontinst|
software should be available from the same source as your copy of
\LaTeX.
@@ -175,7 +175,7 @@ Addresses and other details can be found at:
\section{Text fonts}
-\label{Sec:text}
+\label{sec:text}
This section describes the commands available to class and package
writers for specifying and selecting fonts.
@@ -392,14 +392,14 @@ The author commands for fonts set the five attributes as shown in table~\vref{ta
\caption{Author font commands and their effects (article class)}\label{tab:attributes}
\end{table}
The values used by these commands are determined by the document class,
-using the parameters defined in Section~\ref{Sec:text.param}.
+using the parameters defined in Section~\ref{sec:text.param}.
Note that there are no author commands for selecting new encodings.
These should be provided by packages, such as the |fontenc| package.
This section does not explain how \LaTeX{} font specifications are
turned into \TeX{} font names. This is described in
-Section~\ref{Sec:install}.
+Section~\ref{sec:install}.
@@ -483,7 +483,7 @@ commands like |\fontfamily|, |\fontseries|, etc. If you disobey this
warning you might produce code that loops.
\subsection{Parameters for author commands}
-\label{Sec:text.param}
+\label{sec:text.param}
The parameter values set by author commands such as |\textrm| and
|\rmfamily|, etc.\ are not hard-wired into \LaTeX; instead these
@@ -644,7 +644,7 @@ the transcript file.
\section{Math fonts}
-\label{Sec:math}
+\label{sec:math}
This section describes the commands available to class and package
writers for specifying math fonts and math commands.
@@ -658,7 +658,7 @@ Some math fonts are selected explicitly by one-argument commands such as
|\mathsf{max}| or |\mathbf{vec}|; such fonts are called \emph{math
alphabets}. These math alphabet commands affect only the font used
for letters and symbols of type |\mathalpha| (see
-Section~\ref{Sec:math.commands}); other symbols within the argument will
+Section~\ref{sec:math.commands}); other symbols within the argument will
be left unchanged. The predefined math alphabets are:
\begin{center}
\begin{tabular}{ccc}
@@ -730,7 +730,7 @@ packages.
There are no commands for selecting symbol fonts. Instead, these are
selected indirectly through symbol commands like |\oplus|.
-Section~\ref{Sec:math.commands} explains how to define symbol commands.
+Section~\ref{sec:math.commands} explains how to define symbol commands.
\begin{decl}
|\mathnormal{<math>}| \quad
@@ -908,7 +908,7 @@ when it is first declared, a math alphabet uses a \TeX{} math group only
when its command is used within a math formula.
\subsection{Declaring math symbols}
-\label{Sec:math.commands}
+\label{sec:math.commands}
\begin{decl}
|\DeclareMathSymbol| \arg{symbol} \arg{type} \arg{sym-font}
@@ -1040,7 +1040,7 @@ Example:
\end{verbatim}
\section{Font installation}
-\label{Sec:install}
+\label{sec:install}
This section explains how \LaTeX's font attributes are turned into
\TeX{} font specifications.
@@ -1328,7 +1328,7 @@ This example sets up the `empty' size function (simplified):
\section{Encodings}
-\label{Sec:encode}
+\label{sec:encode}
This section explains how to declare and use new font encodings and how
to declare commands for use with particular encodings.
@@ -1353,7 +1353,7 @@ the option list.
The declarations in the encoding definition file |<enc>enc.def| for
encoding \m{ENC} are responsible for declaring this encoding and telling
\LaTeX{} how to produce characters in this encoding; this file should
-contain nothing else (see Section~\ref{Sec:encode.def}.
+contain nothing else (see Section~\ref{sec:encode.def}.
The standard \LaTeX{} format declares the |OT1| and |T1| text encodings
by inputting the files |ot1enc.def| and |t1enc.def|; it also sets up
@@ -1371,7 +1371,7 @@ prevents the system from attempting to load any |T1|-encoded fonts from
the `cmr' family).
\subsection{Encoding definition file commands}
-\label{Sec:encode.def}
+\label{sec:encode.def}
\emph{Note}: An encoding definition file should contain only commands
from this subsection.
@@ -1660,7 +1660,7 @@ encoding scheme is never substituted! They are tried in the order
\NEWdescription{2019/07/10}
This declaration is normally done in an encoding definition file
-(see~\ref{Sec:encode.def}), but can also be used in a class file or the
+(see~\ref{sec:encode.def}), but can also be used in a class file or the
document preamble to alter the default for a specific encoding.
If no defaults are set up for an encoding, the values given by
@@ -1705,7 +1705,7 @@ problems when using other alphabets. As an experiment, it has now been
extended for use with some Cyrillic encodings.
\section{Miscellanea}
-\label{Sec:misc}
+\label{sec:misc}
This section covers the remaining font commands in \LaTeX{} and some
other issues.
diff --git a/macros/latex-dev/base/fontdef.dtx b/macros/latex-dev/base/fontdef.dtx
index 281add29ef..ae11766ca6 100644
--- a/macros/latex-dev/base/fontdef.dtx
+++ b/macros/latex-dev/base/fontdef.dtx
@@ -40,7 +40,7 @@
%<driver, >\ProvidesFile{fontdef.drv}
% \fi
% \ProvidesFile{fontdef.dtx}
- [2024/02/09 v3.0i LaTeX Kernel
+ [2024/09/03 v3.0k LaTeX Kernel
% \iffalse
%<text, > (Text font setup)
%<math, > (Math font setup)
@@ -403,14 +403,29 @@
% (nearly) every \TeX{} installation, while the amount of main memory
% is not a limiting factor at most installations.)
%
+% \changes{v3.0k}{2024/09/03}{Load also t1cmss.fd and t1cmtt.fd}
% \begin{macrocode}
\begingroup
\nfss@catcodes
+\input {t1cmss.fd}
+\input {t1cmtt.fd}
\input {ot1cmss.fd}
\input {ot1cmtt.fd}
\endgroup
% \end{macrocode}
%
+% \changes{v3.0j}{2024/06/24}{load ts1 cmr fd file in Unicode engines}
+% Even though Unicode engines default to |lm| load |ts1cmr|
+% as this may be used for fallback for TS1 encoding.
+% \begin{macrocode}
+\ifx\Umathcode\@undefined\else
+\begingroup
+\nfss@catcodes
+\input {ts1cmr.fd}
+\endgroup
+\fi
+% \end{macrocode}
+%
% Even with all the precautions it is still possible that NFSS will
% run into problems, for example, when a |.fd| file contains
% corrupted data. To guard against such cases NFSS has a very
@@ -527,7 +542,6 @@
%<*text|latexrelease>
%<latexrelease>\IncludeInRelease{2020/02/02}%
%<latexrelease> {\updefault}{font defaults change}%
-% \begin{macrocode}
\renewcommand\updefault{up}
% \end{macrocode}
% We append \cs{@empty} to the series value so that we can detect
diff --git a/macros/latex-dev/base/graphpap.pdf b/macros/latex-dev/base/graphpap.pdf
index da13c1f547..7988bac004 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 e143a42fd7..19a244e1d3 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 5343d44527..9f855b1da3 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 9b8a342b03..c9edf04efd 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 eeda0f8d55..5b5c3648a4 100644
--- a/macros/latex-dev/base/latexrelease.dtx
+++ b/macros/latex-dev/base/latexrelease.dtx
@@ -40,7 +40,7 @@
%<*latexrelease>
% \fi
% \ProvidesFile{latexrelease.dtx}
- [2022/11/14 v1.0p LaTeX release emulation and tests
+ [2024/08/11 v1.0p LaTeX release emulation and tests
(including releases up to \latexreleaseversion)]
% \iffalse
%</latexrelease>
@@ -507,7 +507,7 @@
% \end{macro}
%
% \changes{v1.0c}{2015/02/19}{Swap argument order}
-% \changes{v1.0k}{2018/05/08}{reset \cs{\requestedLaTeXdate} for current
+% \changes{v1.0k}{2018/05/08}{reset \cs{requestedLaTeXdate} for current
% and latest options, github issue 43}
% \begin{macrocode}
\DeclareOption*{%
diff --git a/macros/latex-dev/base/latexrelease.pdf b/macros/latex-dev/base/latexrelease.pdf
index 57b36aae7a..f4d6211ea4 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 16190c92a3..fef1fb9d98 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 0a016ec069..0f5e8979fe 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.dtx b/macros/latex-dev/base/letter.dtx
index 4df9e5ead6..dde59f40e4 100644
--- a/macros/latex-dev/base/letter.dtx
+++ b/macros/latex-dev/base/letter.dtx
@@ -45,7 +45,7 @@
%<*driver>
\ProvidesFile{letter.drv}
%</driver>
- [2021/12/07 v1.3c
+ [2024/08/12 v1.3c
%<+letter> Standard LaTeX document class]
% \end{macrocode}
%
@@ -838,9 +838,10 @@
% $1$, with footnotes starting from $1$ as well.
% (The first page is unnumbered.) It has a single argument, which
% is the addressee and his address, as in
+% \changes{v1.3c}{2024/08/12}{Alter sample address (gh/1439)}
%\begin{verbatim}
% \begin{letter}{Sam Jones \\
-% Institute for Retarded Study\\
+% Institute for Trivial Study\\
% Princeton, N.J.}
%\end{verbatim}
% Local declarations, such as |\address|, can follow the
diff --git a/macros/latex-dev/base/letter.pdf b/macros/latex-dev/base/letter.pdf
index b10f7aac5e..a7f8eb532a 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 85aaa66a3a..acbc7ab359 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 36a2dfddd6..3f025cadbb 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/ltboxes.dtx b/macros/latex-dev/base/ltboxes.dtx
index 9852bc5940..e3620ef1ae 100644
--- a/macros/latex-dev/base/ltboxes.dtx
+++ b/macros/latex-dev/base/ltboxes.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltboxes.dtx}
- [2024/06/10 v1.4g LaTeX Kernel (Box Commands)]
+ [2024/06/23 v1.4h LaTeX Kernel (Box Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltboxes.dtx}
@@ -456,9 +456,6 @@
% \begin{macro}{\color@begingroup}
% \changes{v1.0b}{1994/03/14}
% {macro added for color support}
-% \begin{macro}{\color@endgroup}
-% \changes{v1.0b}{1994/03/14}
-% {macro added for color support}
% \begin{macro}{\color@setgroup}
% \changes{v1.0f}{1994/05/11}
% {macro added for color support}
@@ -491,7 +488,6 @@
%<latexrelease>\IncludeInRelease{2021/06/01}%
%<latexrelease> {\color@begingroup}{color group settings}%
\let\color@begingroup\begingroup
-\def\color@endgroup{\endgraf\endgroup}
\def\color@setgroup{\color@begingroup} % changed further in color package
\let\normalcolor\relax % remains untouched; only changed in a color package
\def\color@hbox{\hbox\bgroup\color@begingroup}
@@ -506,7 +502,6 @@
%<latexrelease> {\color@begingroup}{color group settings}%
%<latexrelease>
%<latexrelease>\let\color@begingroup\relax
-%<latexrelease>\let\color@endgroup\relax
%<latexrelease>\let\color@setgroup\relax
%<latexrelease>\let\normalcolor\relax
%<latexrelease>\let\color@hbox\relax
@@ -522,7 +517,51 @@
% \end{macro}
% \end{macro}
% \end{macro}
+
+
+
+% \begin{macro}{\color@endgroup}
+% This macro is separated out because it received an update in 2024,
+% so requires its own rollback.
+% \changes{v1.0b}{1994/03/14}
+% {macro added for color support}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\color@endgroup}{color group settings}%
+% \end{macrocode}
+% Beside \cs{endgraf} for handling vertical boxes we also reset
+% \cs{if@endpe} as we are leaving the context.
+% \changes{v1.4h}{2024/06/23}{Adjust for new \texttt{@endpe} handling}
+% \begin{macrocode}
+\def\color@endgroup{\endgraf\@endpefalse\endgroup}
+%<latexrelease>
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2021/06/01}%
+%<latexrelease> {\color@endgroup}{color group settings}%
+%<latexrelease>\def\color@endgroup{\endgraf\endgroup}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\color@endgroup}{color group settings}%
+%<latexrelease>
+%<latexrelease>\let\color@endgroup\relax
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
% \end{macro}
+
+
+
%
% \begin{macro}{\newsavebox}
% \changes{v0.1a}{1993/12/03}
diff --git a/macros/latex-dev/base/ltclass.dtx b/macros/latex-dev/base/ltclass.dtx
index c08618b929..6167cf5608 100644
--- a/macros/latex-dev/base/ltclass.dtx
+++ b/macros/latex-dev/base/ltclass.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltclass.dtx}
- [2024/06/04 v1.5l LaTeX Kernel (Class & Package Interface)]
+ [2024/08/28 v1.5m LaTeX Kernel (Class & Package Interface)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltclass.dtx}
@@ -1111,7 +1111,7 @@
% \IfFormatAtLeastT,\IfFormatAtLeastF,
% \IfPackageLoadedWithOptionsT,\IfPackageLoadedWithOptionsF,
% \IfClassLoadedT,\IfClassLoadedF,
-% \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionTF
+% \IfClassLoadedWithOptionsF,\IfClassLoadedWithOptionsTF
% }
% A few more conditionals for convenience
% \changes{v1.5k}{2024/04/10}{Provide T and F conditionals not just TF
@@ -1515,7 +1515,9 @@
%<latexrelease>\IncludeInRelease{2021/06/01}%
%<latexrelease> {\OptionNotUsed}{filter unused option list}%
%<*2ekernel|latexrelease>
-\def\@remove@eq@value#1=#2\@nil{#1}
+\ExplSyntaxOn
+\def\@remove@eq@value#1=#2\@nil{\tl_trim_spaces:n{#1}}
+\ExplSyntaxOff
% \end{macrocode}
%
% \begin{macrocode}
@@ -3931,8 +3933,11 @@
% first line of the |\@@input|!
% \changes{v1.2e}{2018/03/24}
% {Use full file name for old release}
+% \changes{v1.5m}{2024/08/03}
+% {Add selected release to the file list (gh/1413)}
% \begin{macrocode}
\pkgcls@targetdate\z@
+ \@addtofilelist{#1}%
\@@input #1\relax
\endinput
}
diff --git a/macros/latex-dev/base/ltcmd.dtx b/macros/latex-dev/base/ltcmd.dtx
index 69bd162e56..eccb104bb9 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.2e}
-\def\ltcmddate{2024-04-17}
+\def\ltcmdversion{v1.2f}
+\def\ltcmddate{2024-07-06}
% \end{macrocode}
%
%<*driver>
@@ -620,31 +620,51 @@
% \end{macro}
% \end{macro}
%
-% \begin{macro}{\@@_declare_env:nnnn}
+% \begin{macro}{\@@_declare_env:nnnn, \@@_declare_env:ennn}
+% \changes{v1.2f}{2024/07/06}{Use space-trimmed envname directly (gh/1399)}
% \begin{macro}{\@@_declare_env_internal:nnnn}
+% \begin{macro}{\@@_set_environment_end:n}
% The lead-off to creating an environment is much the same as that for
% creating a command: issue the appropriate message, store the argument
% specification then hand off to an internal function.
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@@_declare_env:nnnn}%
+%<latexrelease> {Use~space-trimmed~envname~directly}
\cs_new_protected:Npn \@@_declare_env:nnnn #1#2
{
- \str_set:Nx \l_@@_environment_str {#1}
- \str_set:Nx \l_@@_environment_str
- { \tl_trim_spaces:o { \l_@@_environment_str } }
- \cs_if_exist:cTF { \l_@@_environment_str }
- {
- \msg_info:nnxx { cmd } { redefine-env }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
- {
- \msg_info:nnxx { cmd } { define-env }
- { \l_@@_environment_str } { \tl_to_str:n {#2} }
- }
+ \str_set:Nn \l_@@_environment_str {#1}
+ \cs_if_exist:cTF { #1 }
+ { \msg_info:nnnn { cmd } { redefine-env } { #1 } { #2 } }
+ { \msg_info:nnnn { cmd } { define-env } { #1 } { #2 } }
\bool_set_false:N \l_@@_expandable_bool
\bool_set_true:N \l_@@_environment_bool
- \exp_args:NV \@@_declare_env_internal:nnnn
- \l_@@_environment_str {#2}
+ \@@_declare_env_internal:nnnn {#1} {#2}
}
+\cs_generate_variant:Nn \@@_declare_env:nnnn { e }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/06/01}{\@@_declare_env:nnnn}%
+%<latexrelease> {Use~space-trimmed~envname~directly}
+%<latexrelease>\cs_new_protected:Npn \@@_declare_env:nnnn #1#2
+%<latexrelease> {
+%<latexrelease> \str_set:Nx \l_@@_environment_str {#1}
+%<latexrelease> \str_set:Nx \l_@@_environment_str
+%<latexrelease> { \tl_trim_spaces:o { \l_@@_environment_str } }
+%<latexrelease> \cs_if_exist:cTF { \l_@@_environment_str }
+%<latexrelease> {
+%<latexrelease> \msg_info:nnxx { cmd } { redefine-env }
+%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} }
+%<latexrelease> }
+%<latexrelease> {
+%<latexrelease> \msg_info:nnxx { cmd } { define-env }
+%<latexrelease> { \l_@@_environment_str } { \tl_to_str:n {#2} }
+%<latexrelease> }
+%<latexrelease> \bool_set_false:N \l_@@_expandable_bool
+%<latexrelease> \bool_set_true:N \l_@@_environment_bool
+%<latexrelease> \exp_args:NV \@@_declare_env_internal:nnnn
+%<latexrelease> \l_@@_environment_str {#2}
+%<latexrelease> }
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% Creating a document environment requires a few more steps than creating
% a single command. In order to pass the arguments of the command to the
@@ -685,6 +705,7 @@
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \subsection{Structure of \pkg{xparse} commands}
%
@@ -5022,36 +5043,109 @@
%
% \begin{macro}{\NewDocumentEnvironment}
% \changes{v1.0h}{2021/08/27}{Check for end-of-environment command}
+% \changes{v1.2f}{2024/07/06}{Trim spaces from envname first (gh/1399)}
% \begin{macro}{\RenewDocumentEnvironment}
% \begin{macro}{\ProvideDocumentEnvironment}
% \begin{macro}{\DeclareDocumentEnvironment}
-% Very similar for environments.
-% \begin{macrocode}
+% \begin{macro}{\@@_new_env:nnnn, \@@_renew_env:nnnn, \@@_provide_env:nnnn}
+% \begin{macro}{\@@_new_env:ennn, \@@_renew_env:ennn, \@@_provide_env:ennn}
+% Very similar for environments. Trim spaces from user-specified
+% \meta{envname}, do existence check then hand off to
+% \cs{@@_declare_env:nnnn}.
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}{\NewDocumentEnvironment}%
+%<latexrelease> {Trim~spaces~from~envname~first}
\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
{
+ \@@_new_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+ {
+ \@@_renew_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+ {
+ \@@_provide_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+ {
+ \@@_declare_env:ennn { \tl_trim_spaces:e {#1} } {#2} {#3} {#4}
+ }
+% \end{macrocode}
+% Each of \cs[no-index]{@@_(new|renew|provide)_env:nnnn} is curried.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_new_env:nnnn #1
+ {
\cs_if_exist:cTF {#1}
- { \msg_error:nnx { cmd } { env-already-defined } {#1} }
+ {
+ \msg_error:nnx { cmd } { env-already-defined } {#1}
+ \use_none:nnn
+ }
{
\cs_if_exist:cTF { end #1 }
- { \msg_error:nnx { cmd } { env-end-already-defined } {#1} }
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+ {
+ \msg_error:nnx { cmd } { env-end-already-defined } {#1}
+ \use_none:nnn
+ }
+ { \@@_declare_env:nnnn {#1} }
}
}
-\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+\cs_new_protected:Npn \@@_renew_env:nnnn #1
{
\cs_if_exist:cTF {#1}
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
- { \msg_error:nnx { cmd } { env-undefined } {#1} }
+ { \@@_declare_env:nnnn {#1} }
+ {
+ \msg_error:nnx { cmd } { env-undefined } {#1}
+ \use_none:nnn
+ }
}
-\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
- { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
-\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
- { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+\cs_new_protected:Npn \@@_provide_env:nnnn #1
+ {
+ \cs_if_exist:cTF {#1}
+ { \use_none:nnn }
+ { \@@_declare_env:nnnn {#1} }
+ }
+\cs_generate_variant:Nn \@@_new_env:nnnn { e }
+\cs_generate_variant:Nn \@@_renew_env:nnnn { e }
+\cs_generate_variant:Nn \@@_provide_env:nnnn { e }
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/06/01}{\NewDocumentEnvironment}%
+%<latexrelease> {Trim~spaces~from~envname~first}
+%<latexrelease>\cs_new_protected:Npn \NewDocumentEnvironment #1#2#3#4
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF {#1}
+%<latexrelease> { \msg_error:nnx { cmd } { env-already-defined } {#1} }
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF { end #1 }
+%<latexrelease> { \msg_error:nnx { cmd } { env-end-already-defined } {#1} }
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease> }
+%<latexrelease> }
+%<latexrelease>\cs_new_protected:Npn \RenewDocumentEnvironment #1#2#3#4
+%<latexrelease> {
+%<latexrelease> \cs_if_exist:cTF {#1}
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease> { \msg_error:nnx { cmd } { env-undefined } {#1} }
+%<latexrelease> }
+%<latexrelease>\cs_new_protected:Npn \ProvideDocumentEnvironment #1#2#3#4
+%<latexrelease> { \cs_if_exist:cF {#1} { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} } }
+%<latexrelease>\cs_new_protected:Npn \DeclareDocumentEnvironment #1#2#3#4
+%<latexrelease> { \@@_declare_env:nnnn {#1} {#2} {#3} {#4} }
+%<latexrelease>\cs_undefine:N \@@_new_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_new_env:ennn
+%<latexrelease>\cs_undefine:N \@@_renew_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_renew_env:ennn
+%<latexrelease>\cs_undefine:N \@@_provide_env:nnnn
+%<latexrelease>\cs_undefine:N \@@_provide_env:ennn
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \begin{macro}{\NewExpandableDocumentCommand}
% \begin{macro}{\RenewExpandableDocumentCommand}
diff --git a/macros/latex-dev/base/ltcmdhooks-code.pdf b/macros/latex-dev/base/ltcmdhooks-code.pdf
index 94d74cd3b0..cdf9a60b5b 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 6b2db4b7d6..ebd2c3780b 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/ltcmdhooks.dtx b/macros/latex-dev/base/ltcmdhooks.dtx
index f8a8699d7e..0d14ebfe6b 100644
--- a/macros/latex-dev/base/ltcmdhooks.dtx
+++ b/macros/latex-dev/base/ltcmdhooks.dtx
@@ -20,7 +20,7 @@
%<*driver>
% \fi
\ProvidesFile{ltcmdhooks.dtx}
- [2024/04/17 v1.0j LaTeX Kernel (Command hooks)]
+ [2024/10/22 v1.0j LaTeX Kernel (Command hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -68,7 +68,15 @@
% supported
% for all types of commands, see section~\ref{sec:look-ahead} for
% the restrictions that apply and what happens if one tries to use
-% this with commands for which this is not supported.} These are:
+% this with commands for which this is not supported.}
+%
+% However, this is only true \enquote{in theory}. In practice there
+% are a number of restrictions that makes it impossible to use such
+% generic command hooks in a number of cases, so please read all
+% of section~\ref{sec:restrictions} to understand what may prevent
+% you from using them successfully.
+%
+% The generic command hooks are:
% \begin{description}
% \item[\hook{cmd/\meta{name}/before}]
%
@@ -152,7 +160,55 @@
% and \TeX{} doesn't have a reliable way to see that, so some guesswork
% has to be employed.
%
-% \subsection{Patching}
+% We can do this in most cases when commands are defined using
+% \cs{NewDocumentCommand} or \cs{newcommand} (with a few exceptions).
+% For commands defined with \tn{def} the situation is less good.
+% Common cases where the command hooks will not work are:
+% \begin{itemize}
+% \item
+%
+% Commands that use special catcode settings within their
+% definition. In that case it is usually not possible to augment the
+% definition (see~\ref{sec:patching}).
+%
+% \item
+%
+% If a command is defined while \cs{ExplSyntaxOn} is in force
+% \textbf{and} the command contains \verb=~= characters to represent
+% spaces, then it can't be patched to include the command hooks. In
+% fact in some very special circumstances you might even get a
+% low-level error rather than the information that the command can't
+% be patched (see, for example,
+% \url{https://github.com/latex3/latex2e/issues/1430}.
+%
+% \item
+%
+% Commands that have arguments as far as the user is concerned
+% (e.g., \cs{section} or \cs{caption}), but are defined in a way that these
+% arguments are not read by the user level command but only later
+% during the processing. In that case the \texttt{after} hook
+% doesn't work at all. The \text{before} hook only works with
+% \cs{AddToHook} but not with \cs{AddToHookWithArguments} because the
+% arguments haven't been read at that point where the hook is
+% patched in. See
+% section~\ref{sec:look-ahead}.
+%
+%
+% \item
+% Adding a specific generic command hook is only attempted once per
+% command, thus after redefining a command such hooks will no longer
+% be there and will also not being re-added, see section~\ref{sec:timing}.
+%
+% \end{itemize}
+% All this means that you have to have a good understanding of how
+% commands are defined when you attempt to make use of such hooks and
+% something goes wrong.
+% What can help in that case is to turn on \cs{DebugHooksOn} in which
+% case you get much more (low-level) details on why something fails and
+% what was tried to enable the hooks.
+%
+%
+% \subsection{Patching}\label{sec:patching}
%
% The code here tries to find out if a command was defined with
% \tn{newcommand} or \tn{DeclareRobustCommand} or
@@ -172,7 +228,7 @@
% catcode settings are not the same as the ones at the time of command's
% definition, so not always adding a hook to a command will work.
%
-% \subsubsection{Timing}
+% \subsubsection{Timing}\label{sec:timing}
%
% When \cs{AddToHook} (or its \pkg{expl3} equivalent) is called with
% a generic |cmd| hook, say, \hook{cmd/foo/before}, for the first time
@@ -211,12 +267,14 @@
% hooks attached to them.
%
% One good example is the \tn{section} command. You can add something
-% to the \hook{cmd/section/before} hook, but if you try to add something
-% to the \hook{cmd/section/after} hook, \tn{section} will no longer
-% work. That happens because the \tn{section} macro takes no argument,
-% but instead calls a few internal \LaTeX{} macros to look for the
-% optional and mandatory arguments. By adding code to the
-% \hook{cmd/section/after} hook, you get in the way of that scanning.
+% to the \hook{cmd/section/before} hook (but only with \cs{AddToHook}
+% not \cs{AddToHookWithArguments}),
+% but if you try to add anything to the \hook{cmd/section/after}
+% hook, \tn{section} will no longer work at all. That happens because the
+% \tn{section} macro takes no argument, but instead calls a few
+% internal \LaTeX{} macros to look for the optional and mandatory
+% arguments. By adding code to the \hook{cmd/section/after} hook, you
+% get in the way of that scanning.
%
% In such a case, where it is known that a specific generic command
% hook does not work if code is added to it, the package author can
@@ -1530,6 +1588,7 @@
%<latexrelease> {cmd~hooks~with~args}
\cs_new_protected:Npn \@@_patch_retokenize:Nnnn #1 #2 #3 #4
{
+% \end{macrocode}
% Here, when patching by retokenization, we can only guess the number
% of arguments of the macro.
% \changes{v1.0h}{2023/05/21}
diff --git a/macros/latex-dev/base/ltcounts.dtx b/macros/latex-dev/base/ltcounts.dtx
index 006486d23b..1d3f202489 100644
--- a/macros/latex-dev/base/ltcounts.dtx
+++ b/macros/latex-dev/base/ltcounts.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltcounts.dtx}
- [2021/11/08 v1.1n LaTeX Kernel (Counters)]
+ [2024/10/26 v1.1p LaTeX Kernel (Counters)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltcounts.dtx}
@@ -171,13 +171,15 @@
%
% |\refstepcounter|\marg{foo}\\
% Same as |\stepcounter|, but it also defines
-% |\@currentreference| so that a subsequent
+% |\@currentlabel|, |\@currentHref| and |\@currentcounter|
+% and so that a subsequent
% |\label|\marg{bar} command causes |\ref|\marg{bar} to
% generate the current value of counter \meta{foo}.
%
% |\@definecounter|\marg{foo}\\
% Initializes counter \marg{foo} (with empty reset list), defines
-% |\p@foo| and |\thefoo| to be null. Also adds \meta{foo}
+% |\p@foo| and |\thefoo| to be null and |\theHfoo| to be
+% |\number\value{foo}|. Also adds \meta{foo}
% to |\cl@@ckpt| --
% the reset list of a dummy counter |@ckpt| used for taking
% checkpoints for the |\include| system.
@@ -306,13 +308,20 @@
% \changes{v1.1b}{1995/05/20}{Streamlined code}
% \changes{v1.1c}{1995/05/20}{And do it right}
% \changes{v1.1n}{2023/11/07}{Do not change \cs{the...} if already defined (gh/823)}
-%
+% \changes{v1.1o}{2024/09/20}{define theHfoo (used for internal links)}
% \begin{macrocode}
+% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@definecounter}
+%<latexrelease> {provide theHfoo commands}%
+%<*2ekernel|latexrelease>
\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
\setcounter{#1}\z@
\global\expandafter\let\csname cl@#1\endcsname\@empty
\@addtoreset{#1}{@ckpt}%
\global\expandafter\let\csname p@#1\endcsname\@empty
+ \expandafter\xdef\csname theH#1\endcsname{%
+ \noexpand\the\noexpand\value{#1}}%
% \end{macrocode}
% If \cs{the\#1} is undefined or \cs{relax} we define it with the
% standard definition for counters, otherwise we warn. This will
@@ -328,12 +337,54 @@
\@latex@warning{Command `\string\the#1' already
defined -- not changed}%
\fi}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@definecounter}
+%<latexrelease> {provide theHfoo commands}%%
+%<latexrelease>\def\@definecounter#1{\expandafter\newcount\csname c@#1\endcsname
+%<latexrelease> \setcounter{#1}\z@
+%<latexrelease> \global\expandafter\let\csname cl@#1\endcsname\@empty
+%<latexrelease> \@addtoreset{#1}{@ckpt}%
+%<latexrelease> \global\expandafter\let\csname p@#1\endcsname\@empty
+%<latexrelease> \expandafter
+%<latexrelease> \ifx\csname the#1\endcsname\relax
+%<latexrelease> \expandafter
+%<latexrelease> \gdef\csname the#1\expandafter\endcsname\expandafter
+%<latexrelease> {\expandafter\@arabic\csname c@#1\endcsname}%
+%<latexrelease> \else
+%<latexrelease> \@latex@warning{Command `\string\the#1' already
+%<latexrelease> defined -- not changed}%
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@addtoreset}
+% \changes{v1.1o}{2024/09/20}{add the parent theHfoo if a counter is reset}
+% \changes{v1.1p}{2024/10/26}{Fully expand counter name in theHfoo commands (gh/1508)}
+% If a counter is reset when a parent counter changes it no longer has an unique value
+% across the document. As |\theH<counter>| should be unique
+% this representation is changed to include also the
+% representation of the parent. This is not 100\% guaranteed to work
+% but has been used this way by hyperref for many years without causing problems.
% \begin{macrocode}
-\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+%</2ekernel>
+%<latexrelease>\IncludeInRelease{2024/11/01}{\@addtoreset}
+%<latexrelease> {provide theHfoo commands}%
+%<*2ekernel|latexrelease>
+\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}%
+ \expandafter\xdef\csname theH#1\endcsname{%
+ \expandafter\noexpand\csname theH#2\endcsname.%
+ \noexpand\the\noexpand\value{#1}}%
+}
+%<latexrelease>\EndIncludeInRelease
+%</2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{0000/00/00}{\@addtoreset}
+%<latexrelease> {provide theHfoo commands}%%
+%<latexrelease>\def\@addtoreset#1#2{\expandafter\@cons\csname cl@#2\endcsname {{#1}}}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
% \end{macro}
%
@@ -423,7 +474,7 @@
}%
}
% \end{macrocode}
-%
+%
% \begin{macrocode}
\NewDocumentCommand \counterwithin {sO{\arabic}mm}{%
\@ifbothcounters{#3}{#4}{%
diff --git a/macros/latex-dev/base/ltdefns.dtx b/macros/latex-dev/base/ltdefns.dtx
index d9ec12e75a..5185a076eb 100644
--- a/macros/latex-dev/base/ltdefns.dtx
+++ b/macros/latex-dev/base/ltdefns.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltdefns.dtx}
- [2024/04/17 v1.5t LaTeX Kernel (definition commands)]
+ [2024/09/06 v1.5t LaTeX Kernel (definition commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltdefns.dtx}
@@ -1772,11 +1772,11 @@
%
% Most of the machinery defined for \cs{NewCommandCopy} can be used to show
% the definition of a robust command, in a similar fashion to \texttt{texdef}.
-% The difference is that after the command's is detected to has a given type
+% The difference is that after the command is detected to have a given type
% of robustness, rather than making a copy, we use a separate routine to show
% its definition.
%
-% With all the machinery in place, \cs{ShowCommand} itself is quite simple:
+% With all the machinery in place, \cs{ShowCommand} itself is quite simple: we
% use \cs{robust@command@act} to iterate through the \cs{@showcommandlisthook}
% list, and if nothing is found, fallback to \cs{show}.
% \begin{macrocode}
@@ -1837,7 +1837,8 @@
% tests are heavily based on Heiko's \cs{LetLtxMacro}, but chopped into
% separate macros.
%
-% \cs{@if@DeclareRobustCommand} checks if a command \verb=\cmd= was defined by
+% The command \cs{@if@DeclareRobustCommand} checks if a command
+% \verb=\cmd= was defined by
% \cs{DeclareRobustCommand}. The test returns true if the expansion of
% \verb=\cmd= is exactly \verb*=\protect\cmd =.
%
diff --git a/macros/latex-dev/base/lterror.dtx b/macros/latex-dev/base/lterror.dtx
index 99bdc79e4f..7170e51f8c 100644
--- a/macros/latex-dev/base/lterror.dtx
+++ b/macros/latex-dev/base/lterror.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{lterror.dtx}
- [2021/08/20 v1.2t LaTeX Kernel (errors)]
+ [2024/09/12 v1.2u LaTeX Kernel (errors)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{lterror.dtx}
@@ -766,6 +766,15 @@ Type H <return> for immediate help.}%
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\@LRmoderr}
+% A command is not allowed in restricted horizontal mode, i.e., in LR-mode in \LaTeX{} terminology.
+% \changes{v1.2u}{2024/09/11}{Error message added}
+% \begin{macrocode}
+\gdef\@LRmoderr{%
+ \@latex@error{Not allowed in LR mode}\@ehb}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\@parmoderr}
% Occurs in a float environment or a |\marginpar| when
% encountered in inner vertical mode.
diff --git a/macros/latex-dev/base/ltfilehook-code.pdf b/macros/latex-dev/base/ltfilehook-code.pdf
index c58f34fa2d..18f398e257 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 89da01c33e..fd8a9f3758 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/ltfinal.dtx b/macros/latex-dev/base/ltfinal.dtx
index 648e3e1b8b..2c6b96049b 100644
--- a/macros/latex-dev/base/ltfinal.dtx
+++ b/macros/latex-dev/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2024/02/08 v2.3c LaTeX Kernel (Final Settings)]
+ [2024/07/08 v2.3c LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -930,7 +930,7 @@
%
% \begin{macrocode}
%<*2ekernel>
-% \begin{macrocode}
+% \end{macrocode}
%
% We temporarily define |\reserved@a| to apply |\reserved@c| to all the
% numbers in the range of its arguments.
diff --git a/macros/latex-dev/base/ltfssbas.dtx b/macros/latex-dev/base/ltfssbas.dtx
index df02a5749a..387214e947 100644
--- a/macros/latex-dev/base/ltfssbas.dtx
+++ b/macros/latex-dev/base/ltfssbas.dtx
@@ -35,7 +35,7 @@
%
%
\ProvidesFile{ltfssbas.dtx}
- [2024/02/08 v3.2l LaTeX Kernel (NFSS Basic Macros)]
+ [2024/06/17 v3.2m LaTeX Kernel (NFSS Basic Macros)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -2111,6 +2111,8 @@
% {Suppress unnecessary error when used in preamble}
% \changes{v3.2a}{2017/01/10}
% {Add version of \cs{showhyphens} that works with Xe\TeX.}
+% \changes{v3.2m}{2024/06/17}
+% {set \cs{tracinglostchars} to 0 in \cs{showhyphens}}
% The |\showhyphens| command must be redefined since the version in
% \texttt{plain.tex} uses |\tenrm|. We have also made some further
% adjustments for its use in \LaTeX.
@@ -2142,10 +2144,10 @@
% horizontal list with explicit hyphens to generate the display. Note
% that the |lmr| OpenType font is forced, this works even if the
% characters are not in the font as hyphenation is attempted due to
-% the width of the space and hyphen character. It may generate
+% the width of the space and hyphen character. It would generate
% spurious Missing Character warnings in the log, these are however
-% suppressed from the terminal output by ensuring that
-% |\tracingonline| is locally zero.
+% suppressed from the terminal and log output by ensuring that
+% |\tracinglostchars| is locally zero.
% \begin{macrocode}
\DeclareRobustCommand\showhyphens[1]{%
\setbox0\vbox{%
@@ -2154,6 +2156,7 @@
\hbadness\@M
\hfuzz\maxdimen
\tracingonline\z@
+ \tracinglostchars\z@
\everypar={}%
\leftskip\z@skip
\rightskip\z@skip
diff --git a/macros/latex-dev/base/ltfssini.dtx b/macros/latex-dev/base/ltfssini.dtx
index 255abe03f3..6b0ba91814 100644
--- a/macros/latex-dev/base/ltfssini.dtx
+++ b/macros/latex-dev/base/ltfssini.dtx
@@ -36,7 +36,7 @@
%
%
\ProvidesFile{ltfssini.dtx}
- [2024/02/08 v3.2i LaTeX Kernel (NFSS Initialisation)]
+ [2024/08/28 v3.2i LaTeX Kernel (NFSS Initialisation)]
% \iffalse
\documentclass{ltxdoc}
\begin{document}
@@ -1397,7 +1397,7 @@
% \end{itemize}
% This allows you to define commands like \cs{IfBold}, e.g.,
%\begin{verbatim}
-% \newcommand\IfBold[2]{\IfSeriesContextTF{bf}{#1}{#2}}
+% \NewDocumentCommand\IfBold{mm}{\IfFontSeriesContextTF{bf}{#1}{#2}}
%\end{verbatim}
% and then do
%\begin{verbatim}
diff --git a/macros/latex-dev/base/lthooks-code.pdf b/macros/latex-dev/base/lthooks-code.pdf
index 94956126d3..419be940ec 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 9a4f920b03..d05d264308 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/lthooks.dtx b/macros/latex-dev/base/lthooks.dtx
index d282ff841c..0c33c022e3 100644
--- a/macros/latex-dev/base/lthooks.dtx
+++ b/macros/latex-dev/base/lthooks.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{lthooks.dtx}
- [2024/04/22 v1.1h LaTeX Kernel (hooks)]
+ [2024/10/29 v1.1k LaTeX Kernel (hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -130,6 +130,9 @@
%
% The \meta{hook} can be specified using the dot-syntax to denote
% the current package name. See section~\ref{sec:default-label}.
+% The string \texttt{??} can't be used as a hook name because it
+% has a special significance as a placeholder in hook rules.
+%
% \end{function}
%
% \begin{function}{\NewReversedHook}
@@ -402,11 +405,17 @@
% Removes any code labeled by \meta{label} from the \meta{hook}.
% When the optional argument \meta{label} is not provided, the
% \meta{default label} is used (see section~\ref{sec:default-label}).
+% \end{function}
%
% If there is no code under the \meta{label} in the \meta{hook},
% or if the \meta{hook} does not exist, a warning is issued when
% you attempt to \cs{RemoveFromHook}, and the command is ignored.
-% \cs{RemoveFromHook} should be used only when you know exactly what
+% \cs{RemoveFromHook}\marginpar{\raggedleft\rightskip5pt\itshape
+% \textbf{Important:}\break The \cs{RemoveFromHook} command should be
+% only used if one has full control over the code chunk to be removed.
+% In particular it should not be used to remove code chunks from other
+% packages! For this the \texttt{voids} relation is provided.}
+% should be used only when you know exactly what
% labels are in a hook. Typically this will be when some code gets added to a hook
% by a package, then later this code is removed by that same package.
% If you want to prevent the execution of code from another
@@ -420,16 +429,15 @@
% The \meta{hook} and \meta{label} can be specified using the
% dot-syntax to denote the current package name.
% See section~\ref{sec:default-label}.
-% \end{function}
%
-% \medskip
-%
-% In contrast to the \texttt{voids} relationship between two labels
+% In contrast to the \texttt {voids} relationship between two labels
% in a \cs{DeclareHookRule} this is a destructive operation as the
% labeled code is removed from the hook data structure, whereas the
% relationship setting can be undone by providing a different
% relationship later.
%
+% \medskip
+%
% A useful application for this declaration inside the document body
% is when one wants to temporarily add code to hooks and later remove
% it again, e.g.,
@@ -535,7 +543,6 @@
%
%
%
-%
% \subsubsection{Hook names and default labels}
% \label{sec:default-label}
%
@@ -751,8 +758,6 @@
% given \meta{hook}. If \meta{hook} is \texttt{??} this defines a default
% relation for all hooks that use the two labels, i.e., that have
% chunks of code labeled with \meta{label1} and \meta{label2}.
-% Rules specific to a given hook take precedence over default
-% rules that use \texttt{??} as the \meta{hook}.
%
% Currently, the supported relations are the following:
% \begin{itemize}
@@ -793,9 +798,17 @@
%
% \end{itemize}
% There can only be a single relation between two labels for a
-% given hook,
-% i.e., a later \cs{DeclareHookRule} overwrites any previous
-% declaration.
+% given hook, i.e., a later \cs{DeclareHookRule} overwrites any
+% previous declaration. In all cases rules specific to a given
+% hook take precedence over default rules that use \texttt{??} as
+% the \meta{hook}.
+%
+% If a default rule is applied, it is done before reversing the
+% label order in a reversed hook, e.g., \texttt{before} in a
+% default rule effectively becomes \texttt{after} in such a hook.
+% In contrast, a rule for a specific hook is always applied to the
+% state after any reversal (i.e., the state you see when using
+% \cs{ShowHook} on that hook).
%
% The \meta{hook} and \meta{label} can be specified using the
% dot-syntax to denote the current package name.
@@ -826,6 +839,16 @@
% (Technically it is just a shorthand for using \cs{DeclareHookRule}
% with \texttt{??} as the hook name.)
%
+% If such a rule is applied to a reversed
+% hook it behaves as if the rule is reversed (e.g.,
+% \texttt{after} becomes \texttt{before})
+% because those rules are applied first and then the order is reversed.
+% The rationale is that in hook pairs (in which the ordering in one
+% is reversed) default rules have to be reversed too in nearly all
+% scenarios. If this is not the case, a default rule can't be used
+% or has to be overwritten with an explicit \cs{DeclareHookRule}
+% for that specific hook.
+%
% Declaring default rules is only supported in the document
% preamble.\footnotemark{}
%
@@ -875,7 +898,7 @@
% some variant thereof. Generic hooks such as \hook{file} and \hook{env} hooks are
% automatically declared when code is added to them.
%
-% \begin{function}[EXP]{\IfHookEmptyTF}
+% \begin{function}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF}
% \begin{syntax}
% \cs{IfHookEmptyTF} \Arg{hook} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -1411,7 +1434,7 @@
% This is helpful if you have a pair of hooks where you expect to see
% code added that involves grouping, e.g., starting an environment
% in the first and closing that environment in the second hook.
-% To give a somewhat contrived example\footnote{there are simpler
+% To give a somewhat contrived example\footnote{There are simpler
% ways to achieve the same effect.}, suppose there is a package
% adding the following:
%\begin{verbatim}
@@ -1457,9 +1480,14 @@
% > package-too, package-1.
%\end{verbatim}
%
-% The reversal of the execution order happens before applying any
-% rules, so if you alter the order you will probably have to alter
-% it in both hooks, not just in one, but that depends on the use case.
+% If there is a matching default rule (done with
+% \cs{DeclareDefaultHookRule} or with \texttt{??} for the hook
+% name) then this default rule is applied before the reversal so that the order
+% in the reversed hook mirrors the one in the normal hook. However,
+% all rules specific to a hook happen always after the reversal of the
+% execution order, so if you alter the order you will probably have
+% to alter it in both hooks, not just in one, but that depends on
+% the use case.
%
%
%
@@ -1910,6 +1938,14 @@
% right sequence.
%
% \end{description}
+%
+% Given that these generic hook names involve \texttt{/} as part of
+% their name they would not work if one tries to define an
+% environment using a name that involves a
+% \texttt{/}.\footnote{Officially, \LaTeX{} names for environments
+% should only consist of a sequence of letters, numbers, and the
+% character \texttt{*}, i.e., this is not a new restriction.}
+%
% Generic environment hooks are never one-time hooks even with
% environments that are supposed to appear only once in a
% document.\footnote{Thus if one adds code to such hooks after the
@@ -3266,21 +3302,26 @@
%
% \subsection{Parsing a label}
%
-% \begin{macro}[EXP]{\@@_parse_label_default:n}
+% \begin{macro}[EXP]{\@@_parse_label_default:nN}
% This macro checks if a label was given (not \cs{c_novalue_tl}), and
% if so, tries to parse the label looking for a leading \verb|.| to
% replace by \cs{@@_currname_or_default:}.
+% |#2| is a boolean representing if |#1| is a label name.
+% \changes{v1.1i}{2024/08/09}
+% {Distinguish between empty label and empty hook (gh/1423)}
% \begin{macrocode}
-\cs_new:Npn \@@_parse_label_default:n #1
+\cs_new:Npn \@@_parse_label_default:nN #1#2
{
\tl_if_novalue:nTF {#1}
{ \@@_currname_or_default: }
- { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:n }
+ { \tl_trim_spaces_apply:nN {#1} \@@_parse_dot_label:nN #2 }
}
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}[EXP]{\@@_parse_dot_label:n}
+% \begin{macro}[EXP]{\@@_parse_dot_label:nN}
+% \changes{v1.1i}{2024/08/09}
+% {Distinguish between empty label and empty hook (gh/1423)}
% \begin{macro}[EXP]{
% \@@_parse_dot_label:w,
% \@@_parse_dot_label_cleanup:w,
@@ -3293,12 +3334,15 @@
% If these requirements are fulfilled, the leading
% \verb|.| is replaced with \cs{@@_currname_or_default:}. Otherwise
% the label is returned unchanged.
+% |#2| is a boolean representing if |#1| is a label name.
% \begin{macrocode}
-\cs_new:Npn \@@_parse_dot_label:n #1
+\cs_new:Npn \@@_parse_dot_label:nN #1#2
{
\tl_if_empty:nTF {#1}
{
- \msg_expandable_error:nn { hooks } { empty-label }
+ \bool_if:NTF #2
+ { \msg_expandable_error:nn { hooks } { empty-label } }
+ { \msg_expandable_error:nn { hooks } { empty-hook } }
\@@_currname_or_default:
}
{
@@ -3375,6 +3419,8 @@
% macro does the entire operation within a group so that csnames made
% by \cs{@@_make_name:n} are wiped off before continuing. This means
% that this function cannot be used for \cs{hook_use:n}!
+% \changes{v1.1i}{2024/08/09}
+% {Distinguish between empty label and empty hook (gh/1423)}
% \begin{macrocode}
\cs_new_protected:Npn \@@_normalize_hook_args_aux:Nn #1 #2
{
@@ -3388,24 +3434,24 @@
\cs_new_protected:Npn \@@_normalize_hook_args:Nn #1 #2
{
\@@_normalize_hook_args_aux:Nn #1
- { { \@@_parse_label_default:n {#2} } }
+ { { \@@_parse_label_default:nN {#2} \c_false_bool } }
}
\cs_new_protected:Npn \@@_normalize_hook_args:Nnn #1 #2 #3
{
\@@_normalize_hook_args_aux:Nn #1
{
- { \@@_parse_label_default:n {#2} }
- { \@@_parse_label_default:n {#3} }
+ { \@@_parse_label_default:nN {#2} \c_false_bool }
+ { \@@_parse_label_default:nN {#3} \c_true_bool }
}
}
\cs_new_protected:Npn \@@_normalize_hook_rule_args:Nnnnn #1 #2 #3 #4 #5
{
\@@_normalize_hook_args_aux:Nn #1
{
- { \@@_parse_label_default:n {#2} }
- { \@@_parse_label_default:n {#3} }
+ { \@@_parse_label_default:nN {#2} \c_false_bool }
+ { \@@_parse_label_default:nN {#3} \c_true_bool }
{ \tl_trim_spaces:n {#4} }
- { \@@_parse_label_default:n {#5} }
+ { \@@_parse_label_default:nN {#5} \c_true_bool }
}
}
% \end{macrocode}
@@ -6132,6 +6178,8 @@
}
% \end{macrocode}
%
+% \changes{v1.1k}{2024/10/29}
+% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)}
% \begin{macrocode}
\@@_if_usable:nF {#1}
{ \@@_log_line:x { The~hook~is~not~declared. } }
@@ -6141,7 +6189,9 @@
{ #2 { The~hook~is~empty } }
{
\@@_log_line:x { Code~chunks: }
- \prop_if_empty:cTF { g_@@_#1_code_prop }
+ \bool_lazy_or:nnTF
+ { ! \prop_if_exist_p:c { g_@@_#1_code_prop } }
+ { \prop_if_empty_p:c { g_@@_#1_code_prop } }
{ \@@_log_line_indent:x { --- } }
{
\prop_map_inline:cn { g_@@_#1_code_prop }
@@ -6403,19 +6453,24 @@
% |#2|${}={}$\meta{label_1}\verb=|=\meta{label_2},
% and |#3|${}={}$\meta{hook} (the latter may be the argument |#1| to
% \cs{@@_list_rules:nn}, or \texttt{??} if it is a default rule).
+% \changes{v1.1k}{2024/10/29}
+% {Skip mapping over undeclared \cs{g_@@_\meta{hook}_code_prop} (gh/1513)}
% \begin{macrocode}
\cs_new_protected:Npn \@@_list_rules:nn #1 #2
{
- \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2}
- \prop_map_inline:cn { g_@@_#1_code_prop }
+ \prop_if_exist:cT { g_@@_#1_code_prop }
{
+ \cs_set_protected:Npn \@@_tmp:w ##1 ##2 ##3 {#2}
\prop_map_inline:cn { g_@@_#1_code_prop }
{
- \@@_if_label_case:nnnnn {##1} {####1}
- { \prop_map_break: }
- { \@@_list_one_rule:nnn {##1} {####1} }
- { \@@_list_one_rule:nnn {####1} {##1} }
- {#1}
+ \prop_map_inline:cn { g_@@_#1_code_prop }
+ {
+ \@@_if_label_case:nnnnn {##1} {####1}
+ { \prop_map_break: }
+ { \@@_list_one_rule:nnn {##1} {####1} }
+ { \@@_list_one_rule:nnn {####1} {##1} }
+ {#1}
+ }
}
}
}
@@ -7342,6 +7397,14 @@
}
% \end{macrocode}
%
+% \changes{v1.1i}{2024/08/09}{New message ``empty-hook'' (gh/1423).}
+% \begin{macrocode}
+\msg_new:nnn { hooks } { empty-hook }
+ {
+ Empty~hook~name~\msg_line_context:.
+ }
+% \end{macrocode}
+%
% \begin{macrocode}
\msg_new:nnn { hooks } { no-default-label }
{
@@ -7601,6 +7664,7 @@
% \begin{macrocode}
\NewDocumentCommand \SetDefaultHookLabel { m }
{ \@@_set_default_hook_label:n {#1} }
+% \end{macrocode}
%
% The label is only automatically updated with \cs{@onefilewithoptions}
% (\cs{usepackage} and \cs{documentclass}), but some packages, like
@@ -7713,13 +7777,16 @@
% \end{macro}
%
%
-% \begin{macro}[EXP]{\IfHookEmptyTF}
+% \begin{macro}[EXP]{\IfHookEmptyTF,\IfHookEmptyT,\IfHookEmptyF}
+% \changes{v1.1j}{2024/10/21}{Define \cs{IfHookEmptyT}, \cs{IfHookEmptyF}}
% Here we avoid the overhead of \pkg{xparse}, since \cs{IfHookEmptyTF}
% is used in \cs{end} (that is, every \LaTeX{} environment). As a
% further optimization, use \cs{let} rather than \cs{def} to avoid one
% expansion step.
% \begin{macrocode}
\cs_new_eq:NN \IfHookEmptyTF \hook_if_empty:nTF
+\cs_new_eq:NN \IfHookEmptyT \hook_if_empty:nT
+\cs_new_eq:NN \IfHookEmptyF \hook_if_empty:nF
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/ltkeys.dtx b/macros/latex-dev/base/ltkeys.dtx
index 34a0ab4b47..a9e430206b 100644
--- a/macros/latex-dev/base/ltkeys.dtx
+++ b/macros/latex-dev/base/ltkeys.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltkeys.dtx}
- [2024/01/13 v1.0m LaTeX Kernel (Keyval options)]
+ [2024/06/20 v1.0o LaTeX Kernel (Keyval options)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{ltkeys.dtx}
@@ -73,6 +73,9 @@
% \item \texttt{.code} --- execute arbitrary code
% \item \texttt{.if} --- sets a \TeX{} \cs{if...} switch
% \item \texttt{.ifnot} --- sets an inverted \TeX{} \cs{if...} switch
+% \item \texttt{.pass-to-packages} --- for class options, this specifies
+% whether the option should be treated \enquote{global} (read by packages
+% from the global list); for package options this property has no effect
% \item \texttt{.store} --- stores a value in a macro
% \item \texttt{.usage} -- defines whether the option can be given only
% when loading (\texttt{load}), in the preamble (\texttt{preamble}) or
@@ -182,12 +185,74 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{.pass-to-packages}
+% \changes{v1.0n}{2024/06/19}{New key property}
+% \begin{macro}{\@@_scope:n}
+% \changes{v1.0n}{2024/06/19}{New function}
+% \begin{macro}{\@@_scope:N}
+% \changes{v1.0n}{2024/06/19}{New function}
+% \changes{v1.0o}{2024/06/20}{Ensure only key name is stored}
+% Used to force options to be global: as this property (uniquely) has
+% an \emph{optional} value, there is a bit of work to do.
+% \begin{macrocode}
+\cs_new_protected:cpn { \c_@@_props_root_str .pass-to-packages }
+ {
+ \bool_if:NTF \l_@@_no_value_bool
+ { \@@_scope:n { true } }
+ { \@@_scope:n }
+ }
+\cs_new_protected:Npn \@@_scope:n #1
+ {
+ \str_case:nnF {#1}
+ {
+ { true }
+ { \@@_scope:N \clist_put_right:NV }
+ { false }
+ { \@@_scope:N \clist_remove_all:NV }
+ }
+ {
+ \msg_error:nnnn { keys }
+ { choice-unknown }
+ { .pass-to-packages }
+ {#1}
+ }
+ }
+\cs_new_protected:Npn \@@_scope:N #1
+ {
+ \exp_after:wN \@@_find_key_module:wNN
+ \l_keys_path_str \s_@@_stop
+ \l_keys_key_tl \l_keys_key_str
+ #1 \l_@@_forced_global_clist \l_keys_key_str
+ }
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
% \subsection{Main mechanism}
%
% \begin{macrocode}
+\cs_generate_variant:Nn \clist_if_in:NnT { Ne }
+\cs_generate_variant:Nn \clist_if_in:NnTF { Ne }
\cs_generate_variant:Nn \clist_put_right:Nn { Nv }
% \end{macrocode}
%
+% \begin{macro}{\l_@@_class_only_clist}
+% \changes{v1.0n}{2024/06/19}{New variable}
+% Used to track class-only options.
+% \begin{macrocode}
+\clist_new:N \l_@@_class_only_clist
+% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\l_@@_forced_global_clist}
+% \changes{v1.0n}{2024/06/19}{New variable}
+% Used to force options to be global.
+% \begin{macrocode}
+\clist_new:N \l_@@_forced_global_clist
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\l_@@_options_clist}
% A single list is used for all options, into which they are collected
% before processing.
@@ -295,33 +360,34 @@
% \changes{v1.0h}{2022/06/19}{Further work on handling of option removal}
% \changes{v1.0h}{2022/06/20}{Use raw options data}
% \changes{v1.0m}{2024/01/13}{Trim spaces off key names}
+% \changes{v1.0n}{2024/06/19}{Refactor function}
% \begin{macro}{\@@_options_class:nnn}
% \changes{v1.0h}{2022/06/20}{New function}
% \changes{v1.0i}{2022/07/05}{Correct naming of raw class options storage}
% \changes{v1.0l}{2022/10/22}{Correct handling of unused option list}
+% \changes{v1.0n}{2024/06/19}{Refactor function}
+% \changes{v1.0n}{2024/06/19}{Track options used by classes}
+% \begin{macro}{\@@_options_class:nn}
+% \changes{v1.0n}{2024/06/19}{New function}
% For classes, each option (stripped of any content after |=|)
% is checked for existence as a key. If found, the option is added to
% the combined list for processing. On the other hand, unused options
-% are stored up in \cs{@unusedoptionlist}. Before any of that, though,
-% there is a simple check to see if there is an |unknown| key. If there
-% is, then \emph{everything} will match and the mapping can be skipped.
+% are stored up in \cs{@unusedoptionlist}. An earlier version of
+% this code checked for the \texttt{unknown} key just once and
+% if found short-cutted the loop: that though makes handling more
+% complex situations harder, so we take the performance hit instead.
+% Options used by classes are tracked but the catch-all \texttt{unknown}
+% is excluded (hence not using a lazy evaluation for the key testing).
% \begin{macrocode}
\cs_new_protected:Npn \@@_options_class:n #1
{
\cs_if_free:cF { @raw@opt@ \@currname . \@currext }
{
- \keys_if_exist:nnTF {#1} { unknown }
+ \clist_map_inline:cn { @raw@opt@ \@currname . \@currext }
{
- \clist_put_right:Nv \l_@@_options_clist
- { @raw@opt@ \@currname . \@currext }
- }
- {
- \clist_map_inline:cn { @raw@opt@ \@currname . \@currext }
- {
- \exp_args:Ne \@@_options_class:nnn
- { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } }
- {##1} {#1}
- }
+ \exp_args:Ne \@@_options_class:nnn
+ { \tl_trim_spaces:e { \@@_remove_equals:n {##1} } }
+ {##1} {#1}
}
}
}
@@ -329,17 +395,27 @@
{
\keys_if_exist:nnTF {#3} {#1}
{
- \clist_put_right:Nn \l_@@_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \@@_options_class:nn {#1} {#2}
+ \clist_put_right:Ne \l_@@_class_only_clist { \tl_to_str:n {#1} }
}
{
- \clist_if_in:NnF \@unusedoptionlist {#1}
- { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ \keys_if_exist:nnTF {#3} { unknown }
+ { \@@_options_class:nn {#1} {#2} }
+ {
+ \clist_if_in:NnF \@unusedoptionlist {#1}
+ { \clist_put_right:Nn \@unusedoptionlist {#1} }
+ }
}
}
+\cs_new_protected:Npn \@@_options_class:nn #1#2
+ {
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_package:n}
% \changes{v1.0g}{2022/06/16}{Better handling of option removal}
@@ -348,6 +424,9 @@
% \changes{v1.0m}{2024/01/13}{Trim spaces off key names}
% \begin{macro}{\@@_options_package:nnn}
% \changes{v1.0h}{2022/06/19}{New function}
+% \changes{v1.0n}{2024/06/19}{Skip options given to packages}
+% \begin{macro}{\@@_options_package:nn}
+% \changes{v1.0n}{2024/06/19}{New functions}
% For global options when processing a package, the tasks are slightly
% different from those for a class. The check is the same, but here
% there is nothing to do if the option is not applicable. Each valid
@@ -362,17 +441,31 @@
{##1} {#1}
}
}
+% \end{macrocode}
+% The forced-global test here needs to use \cs{tl_to_str:n} as the data come
+% from a key name, which is always a string.
+% \begin{macrocode}
\cs_new_protected:Npn \@@_options_package:nnn #1#2#3
{
\keys_if_exist:nnT {#3} {#1}
{
- \clist_put_right:Nn \l_@@_options_clist {#2}
- \clist_remove_all:Nn \@unusedoptionlist {#1}
+ \clist_if_in:NeTF \l_@@_class_only_clist { \tl_to_str:n {#1} }
+ {
+ \clist_if_in:NeT \l_@@_forced_global_clist { \tl_to_str:n {#1} }
+ { \@@_options_package:nn {#1} {#2} }
+ }
+ { \@@_options_package:nn {#1} {#2} }
}
}
+\cs_new_protected:Npn \@@_options_package:nn #1#2
+ {
+ \clist_put_right:Nn \l_@@_options_clist {#2}
+ \clist_remove_all:Nn \@unusedoptionlist {#1}
+ }
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{\@@_options_local:}
% \changes{v1.0h}{2022/06/20}{Use raw options data}
diff --git a/macros/latex-dev/base/ltlength.dtx b/macros/latex-dev/base/ltlength.dtx
index c81e6edfb7..75c1f22676 100644
--- a/macros/latex-dev/base/ltlength.dtx
+++ b/macros/latex-dev/base/ltlength.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlength.dtx}
- [2020/12/05 v1.1d LaTeX Kernel (Lengths)]
+ [2024/09/04 v1.1e LaTeX Kernel (Lengths)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlength.dtx}
@@ -133,13 +133,31 @@
% \begin{macro}{\@settodim}
% \changes{LaTeX2e}{1993/11/22}{Macro added}
% \changes{v1.0a}{1994/03/07}{(DPC) Extra group for colour}
+% \changes{v1.1e}{2024/09/04}{(UF) Suspend tagging}
% The obvious analogs of |\settowidth|.
% \begin{macrocode}
-\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\@settodim}{suspend tagging}%
+\def\@settodim#1#2#3{\setbox\@tempboxa\hbox
+ {{\SuspendTagging{\@settodim}#3\ResumeTagging{\@settodim}}}#2#1\@tempboxa
% \end{macrocode}
% Clear the memory afterwards (which might be a lot).
% \begin{macrocode}
- \setbox\@tempboxa\box\voidb@x}
+ \setbox\@tempboxa\box\voidb@x}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@settodim}{suspend tagging}%
+%<latexrelease>\def\@settodim#1#2#3{\setbox\@tempboxa\hbox{{#3}}#2#1\@tempboxa
+%<latexrelease> \setbox\@tempboxa\box\voidb@x}
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \begin{macrocode}
\DeclareRobustCommand\settoheight{\@settodim\ht}
\DeclareRobustCommand\settodepth {\@settodim\dp}
\DeclareRobustCommand\settowidth {\@settodim\wd}
diff --git a/macros/latex-dev/base/ltlists.dtx b/macros/latex-dev/base/ltlists.dtx
index fce6be7754..5858cbddfb 100644
--- a/macros/latex-dev/base/ltlists.dtx
+++ b/macros/latex-dev/base/ltlists.dtx
@@ -31,7 +31,7 @@
%<*driver>
% \fi
\ProvidesFile{ltlists.dtx}
- [2024/06/11 v1.0t LaTeX Kernel (List Environments)]
+ [2024/06/23 v1.0u LaTeX Kernel (List Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltlists.dtx}
@@ -716,6 +716,66 @@
%
% This allows paragraph-making environments to work right when called
% by other environments. (Changed 27 Oct 86)
+%
+% In 2024 this logic was partially replaced with a new algorithm:
+% \begin{itemize}
+% \item
+% \cs{if@endpe} is now set globally to \texttt{true} or \texttt{false}.
+% \item
+% In addition \cs{@endpetrue} initiates an \cs{aftergroup} call
+% to \cs{propagate@doendpe} if it is used inside a group.
+% \item
+% \cs{propagate@doendpe} in turn checks the status of \cs{if@endpe}
+% and if that is \texttt{true} it calls \cs{@doendpe} otherwise it
+% does nothing.
+% \item
+% \cs{@doendpe} in turn calls \cs{@endpetrue} and also makes the
+% necessary changes to
+% \cs{par} and \cs{everypar} so that they handle as before any
+% empty line that follows the environment.
+% \item
+% Because of the \cs{@endpetrue} we get another \cs{aftergroup}, so the
+% mechanisnm slowly migrates out of several groups if those follow
+% immediately after the end of the environment. If, however, there is a new
+% paragraph started or an explicit \cs{par} before the next group ends then this will
+% result in a call to \cs{@endpefalse} and the migration stops
+% (note that \cs{propagate@doendpe} is still called once after the group but does nothing).
+% \item
+% Using this approach something like
+%\begin{verbatim}
+% {% some customization here
+% \begin{equation}
+% x=y
+% \end{equation}}
+% some text
+%\end{verbatim}
+% is still correctly identified as a paragraph continuation so that
+% there is no indentation before \texttt{some text}.
+% \item
+% We can get away with using global settings of \cs{if@endpe} even
+% in nested situations (without keeping track of the status in a
+% stack), because the switch change is made only at
+% the very end of such environments, basically directly before the
+% \cs{endgroup} in \cs{end}, and it is later set back to \texttt{false} by
+% the next \cs{everypar} or the next \cs{par}. Even if the
+% environment is called without using \cs{begin} \cs{end}, the
+% situation doesn't change (or rather cause a problem).
+% \item
+% However, there is one scenario where the new approach would
+% change the behavior. If a box is being built, e.g., with
+% \cs{setbox}, we have now the case that a \cs{@endpetrue}
+% inside would migrate out into a context in which it should not be
+% true (because the box might get used elsewhere, e.g., a float).
+% In the past, due to local switch changes, that didn't happen, i.e.,
+% \cs{if@endpe} would revert to \texttt{false} at the end of the box
+% definition.
+% \item
+% Thus, to avoid that one has to explicitly set it back to false at
+% the end of such constructions, just as we also need to prevent
+% colors from
+% migrating out. Thus the correct place to do this is
+% in \cs{color@endgroup} because that is always called at that point.
+% \end{itemize}
% \begin{macrocode}
\def\@endparenv{%
\addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue}
@@ -733,9 +793,12 @@
% |\clubpenalty| back to its default.
% \changes{v1.0t}{2015/05/10}{Explicitly reset \cs{clubpenalty} before
% clearing \cs{everypar}; see also pr/0462 and pr/4065}
+% \changes{v1.0u}{2024/06/23}{Set \cs{if@endpe} to \texttt{false}
+% before calling \cs{par} (needed for tagging)}
% \begin{macrocode}
\clubpenalty\@clubpenalty
- \everypar{}\par\@endpefalse}\everypar
+ \@endpefalse
+ \everypar{}\par}%
% \end{macrocode}
%
% Use |\setbox0=\lastbox| instead of |\hskip -\parindent|
@@ -744,8 +807,9 @@
% \changes{v1.0k}{1995/11/07}{Enclosed \cs{setbox0} assignment by a
% group so that it leaves the contents of box $0$ intact.}
% \begin{macrocode}
- {{\setbox\z@\lastbox}%
- \everypar{}\@endpefalse}}
+ \everypar
+ {{\setbox\z@\lastbox}%
+ \everypar{}\@endpefalse}}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
@@ -762,12 +826,60 @@
%
% \begin{macro}{\if@endpe}
% \begin{macro}{\@endpefalse}
-% \begin{macro}{\@endpeltrue}
+% \begin{macro}{\@endpetrue}
+% \begin{macro}{\propagate@doendpe}
+% As outlined above these are no longer simple switches, but we
+% keep the name because it is used all over the place.
% \begin{macrocode}
\newif\if@endpe
-\@endpefalse
% \end{macrocode}
-% \end{macro}\end{macro}\end{macro}
+%
+% \changes{v1.0u}{2024/06/23}{Set \cs{if@endpe} globally and also set
+% up migration to the outside}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\@endpetrue}{New @endpe handling}%
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@endpefalse{\global\let\if@endpe\iffalse}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\@endpetrue {%
+ \global\let\if@endpe\iftrue
+% \end{macrocode}
+% If we are inside a group then propagate to the outside:
+% \begin{macrocode}
+ \ifnum\currentgrouplevel>\z@
+ \aftergroup\propagate@doendpe
+ \fi
+}
+% \end{macrocode}
+% If \cs{if@endpe} is still true after the group ends, we run \cs{@doendpe}
+% that in turn runs another \cs{@endpetrue} (besides other things),
+% thus propagating further if necessary.
+% However, if the endpe situation got resolved and \cs{if@endpe} is \texttt{false}
+% then nothing further happens.
+% \begin{macrocode}
+\def\propagate@doendpe{\if@endpe \@doendpe \fi}
+% \end{macrocode}
+% \begin{macrocode}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\@endpetrue}{New @endpe handling}%
+%<latexrelease>
+%<latexrelease>
+%<latexrelease>\def\@endpefalse{\let\if@endpe\iffalse}
+%<latexrelease>\def\@endpetrue{\let\if@endpe\iftrue}
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}\end{macro}\end{macro}\end{macro}
%
%
% \begin{macro}{\@mklab}
diff --git a/macros/latex-dev/base/ltluatex.dtx b/macros/latex-dev/base/ltluatex.dtx
index a15019dcd5..315b62cc9e 100644
--- a/macros/latex-dev/base/ltluatex.dtx
+++ b/macros/latex-dev/base/ltluatex.dtx
@@ -30,7 +30,7 @@
%<*plain>
% \fi
% \ProvidesFile{ltluatex.dtx}
-[2024/02/11 v1.2c
+[2024/08/16 v1.2e
% LaTeX Kernel (LuaTeX support)^^A
%\iffalse
%<plain> LuaTeX support for plain TeX (core)%
@@ -330,6 +330,8 @@
% field |date| in the usual \LaTeX{} format |yyyy/mm/dd|. Optional fields
% |version| (a string) and |description| may be used if present. This
% information will be recorded in the log. Other fields are ignored.
+% If the |version| begins with a digit, a \texttt{v} will be added at the
+% start in the log.
%
% \noindent
% \DescribeMacro{module_info}
@@ -420,7 +422,7 @@
% same callback and descriptions.
%
% The callback functions do not have to be registered yet when the functions is called.
-% Ony the constraints for which both callback descriptions refer to callbacks
+% Only the constraints for which both callback descriptions refer to callbacks
% registered at the time the callback is called will have an effect.
%
% \endgroup
@@ -1004,6 +1006,8 @@ local modules = modules or { }
% \begin{macro}{provides_module}
% \changes{v1.0a}{2015/09/24}{Function added}
% \changes{v1.0f}{2015/10/03}{use luatexbase\_log}
+% \changes{v1.2d}{2024/06/04}{Add \texttt{v} to version string if required (gh/1364)}
+% \changes{v1.2e}{2024/08/16}{Support missing version string (gh/1443)}
% Local function to write to the log.
% \begin{macrocode}
local function luatexbase_log(text)
@@ -1024,7 +1028,7 @@ local function provides_module(info)
luatexbase_log(
"Lua module: " .. info.name
.. spaced(info.date)
- .. spaced(info.version)
+ .. spaced(info.version and string_gsub(info.version or "","^(%d)","v%1"))
.. spaced(info.description)
)
modules[info.name] = info
@@ -1336,7 +1340,7 @@ luatexbase.new_luafunction = new_luafunction
% Additionally |callbackrules| describes the ordering constraints: It contains two
% element tables with the descriptions of the constrained callback implementations.
% It can additionally contain a |type| entry indicating the kind of rule. A missing
-% value indicates a normal ordering contraint.
+% value indicates a normal ordering constraint.
%
% \changes{v1.2a}{2022/10/03}{Add rules for callback ordering}
% \begin{macrocode}
@@ -1398,7 +1402,7 @@ local callbacklist = setmetatable({}, {
end
list[i] = current.value
else
- -- Cycle occured. TODO: Show cycle for debugging
+ -- Cycle occurred. TODO: Show cycle for debugging
-- list[i] = ...
local remaining = {}
for name, entry in next, meta do
@@ -1432,7 +1436,7 @@ local callbacklist = setmetatable({}, {
for i=2, length//2 do
cycle[i], cycle[length + 1 - i] = cycle[length + 1 - i], cycle[i]
end
- error('Cycle occured at ' .. table.concat(cycle, ' -> ', 1, length))
+ error('Cycle occurred at ' .. table.concat(cycle, ' -> ', 1, length))
end
end
end
diff --git a/macros/latex-dev/base/ltluatex.pdf b/macros/latex-dev/base/ltluatex.pdf
index d3b036f4dc..992ee68de4 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/ltmarks-code.pdf b/macros/latex-dev/base/ltmarks-code.pdf
index 6d1fb096a2..61b65bbe12 100644
--- a/macros/latex-dev/base/ltmarks-code.pdf
+++ b/macros/latex-dev/base/ltmarks-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltmarks-doc.pdf b/macros/latex-dev/base/ltmarks-doc.pdf
index 7cb862462a..30a1f71773 100644
--- a/macros/latex-dev/base/ltmarks-doc.pdf
+++ b/macros/latex-dev/base/ltmarks-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltmarks.dtx b/macros/latex-dev/base/ltmarks.dtx
index a9f3bb0184..f769a09324 100644
--- a/macros/latex-dev/base/ltmarks.dtx
+++ b/macros/latex-dev/base/ltmarks.dtx
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmarks.dtx}
- [2024/05/31 v1.0g LaTeX Kernel (Marks)]
+ [2024/10/22 v1.0h LaTeX Kernel (Marks)]
% \iffalse
%
\documentclass{l3doc}
@@ -211,7 +211,7 @@
% The commands are only meaningful inside the output routine, in
% other places their result is (while not random) unpredictable due
% to the way \LaTeX{} cuts text material into pages.
-%% \end{function}
+% \end{function}
%
%
%
@@ -257,7 +257,7 @@
% running headers and footers and shipout out both in one
% go.\footnote{As of now that scenario is not yet officially supported.}
%
-% \begin{function}[EXP]{\IfMarksEqualTF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
+% \begin{function}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF,\mark_if_eq:nnnnTF,\mark_if_eq:nnnnnnTF}
% \begin{syntax}
% \cs{IfMarksEqualTF} \oarg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
% \cs{mark_if_eq:nnnnTF} \Arg{region} \Arg{class} \Arg{pos_1} \Arg{pos_2} \Arg{true} \Arg{false}
@@ -676,7 +676,8 @@
% and adds suitable \cs{mark_insert:nn} in the two token
% lists. These token lists can then be executed at the right place
% to reinsert the marks, e.g., directly after the box. This is, for
-% example, used by \pkg{multicol} when a short balanced
+% example, going to be used\footnote{Probably not before 2025, though.}
+% by \pkg{multicol} when a short balanced
% \env{multicols} is returned to the galley for typesetting.
%
% If the \meta{source} consists of a single vertical box (plus
@@ -806,7 +807,7 @@
\tl_new:c { g_@@_last-column_first_ #1 _tl }
\tl_new:c { g_@@_last-column_last_ #1 _tl }
% \end{macrocode}
-% All marks will have an identication at the beginning of the form
+% All marks will have an identification at the beginning of the form
% \cs{@@_id:n}\texttt\{\meta{number}\texttt\} and therefore the
% initial empty values should have that too, so that data extraction
% is going to be uniform.
@@ -1027,7 +1028,7 @@
%
% We disguise \cs{c_max_dim} in an odd looking csname, which then
% shows up as part of the display of an error message if that error
-% happens. This csname forms part of the error diplay so what
+% happens. This csname forms part of the error display so what
% you get is something like
%\begin{verbatim}
% ! Infinite glue shrinkage found in box being split.
@@ -1799,8 +1800,9 @@
%
%
%
-% \begin{macro}[EXP]{\IfMarksEqualTF}
-% We only provide a CamelCase command for the case with one region
+% \begin{macro}[EXP]{\IfMarksEqualTF,\IfMarksEqualT,\IfMarksEqualF}
+% \changes{v1.0h}{2024/10/21}{Define \cs{IfMarksEqualT}, \cs{IfMarksEqualF}}
+% We only provide CamelCase commands for the case with one region
% (optional) and one class. One could think of also providing a
% version for the general case with several optional arguments, but
% use cases for this are most likely rare, so not done yet.
@@ -1808,6 +1810,12 @@
\NewExpandableDocumentCommand \IfMarksEqualTF {O{page}mmm} {
\mark_if_eq:nnnnTF {#1}{#2}{#3}{#4}
}
+\NewExpandableDocumentCommand \IfMarksEqualT {O{page}mmm} {
+ \mark_if_eq:nnnnT {#1}{#2}{#3}{#4}
+}
+\NewExpandableDocumentCommand \IfMarksEqualF {O{page}mmm} {
+ \mark_if_eq:nnnnF {#1}{#2}{#3}{#4}
+}
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/ltmeta.dtx b/macros/latex-dev/base/ltmeta.dtx
index cc3e62811d..410f6459f5 100644
--- a/macros/latex-dev/base/ltmeta.dtx
+++ b/macros/latex-dev/base/ltmeta.dtx
@@ -16,7 +16,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmeta.dtx}
- [2024/05/16 v1.0b LaTeX Kernel (Document Metadata)]
+ [2024/09/21 v1.0c LaTeX Kernel (Document Metadata)]
% \iffalse
%
\documentclass{l3doc}
@@ -152,11 +152,16 @@
% we provide also the new interface commands of the hyperref package
% for the creation of targets.
% \changes{v1.0b}{2022/05/17}{Default definition for targets added}
+% \changes{v1.0c}{2024/09/21}{Added tagging support}
% \begin{macro}{\MakeLinkTarget}
% \begin{macro}{\LinkTargetOn}
% \begin{macro}{\LinkTargetOff}
% \begin{macro}{\NextLinkTarget}
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\MakeLinkTarget}{Record target name for tagging support}%
+\ExplSyntaxOn
+\int_new:N\g__kernel_target_int
\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
\ifvmode
\special{}%
@@ -164,8 +169,31 @@
\@savsf\spacefactor
\smash{}%
\spacefactor\@savsf
- \fi}
-\NewDocumentCommand\LinkTargetOn{}{}
+ \fi
+ \IfBooleanTF {#1}
+ {
+ \tl_gset:Ne \@currentHref {#3}
+ }
+ {
+ \int_gincr:N\g__kernel_target_int
+ \tl_gset:Ne \@currentHref {target*.\int_use:N\g__kernel_target_int}
+ }
+ \UseTaggingSocket{recordtarget}
+ }
+\ExplSyntaxOff
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\MakeLinkTarget}{Record target name for tagging support}%
+%<latexrelease>\NewDocumentCommand\MakeLinkTarget{sO{}m}{%
+%<latexrelease> \ifvmode
+%<latexrelease> \special{}%
+%<latexrelease> \else
+%<latexrelease> \@savsf\spacefactor
+%<latexrelease> \smash{}%
+%<latexrelease> \spacefactor\@savsf
+%<latexrelease> \fi}
+%<latexrelease>\EndIncludeInRelease
+ \NewDocumentCommand\LinkTargetOn{}{}
\NewDocumentCommand\LinkTargetOff{}{}
\NewDocumentCommand\NextLinkTarget{m}{}
% \end{macrocode}
diff --git a/macros/latex-dev/base/ltmiscen.dtx b/macros/latex-dev/base/ltmiscen.dtx
index accdac24b2..70c374f708 100644
--- a/macros/latex-dev/base/ltmiscen.dtx
+++ b/macros/latex-dev/base/ltmiscen.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltmiscen.dtx}
- [2024/02/08 v1.2c LaTeX Kernel (Misc. Environments)]
+ [2024/10/12 v1.2f LaTeX Kernel (Misc. Environments)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltmiscen.dtx}
@@ -276,6 +276,21 @@
% \changes{v1.0w}{1994/11/30}{(DPC) Use \cs{@dofilelist}}
% \changes{v1.2a}{2022/11/06}{Repeat release info at the end (gh/944)}
% \begin{macrocode}
+% \end{macrocode}
+% If we roll back we have to drop stuff before adding chunks,
+% otherwise the code will just be appended, and thus doubled.
+% This would result in a harmless warning during the format
+% generation, because in that case the code chunk label doesn't
+% exist, and therefore can't be dropped.
+% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
+% avoid duplication in rollback (gh/1407)}
+% \begin{macrocode}
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
+% \end{macrocode}
+%
+% \begin{macrocode}
\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
\AddToHook{enddocument/info}[kernel/release]{%
@@ -389,6 +404,18 @@
%<latexrelease>\NewHook{enddocument/afteraux}
%<latexrelease>\NewHook{enddocument/info}
%<latexrelease>\NewHook{enddocument/end}
+% \end{macrocode}
+% If we roll back we have to drop stuff before adding chunks,
+% otherwise the code will just be appended, and thus doubled.
+% \changes{v1.2e}{2024/07/10}{Drop code chunks before adding them to
+% avoid duplication in rollback (gh/1407)}
+% \begin{macrocode}
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/filelist]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/warnings]
+%<latexrelease>\RemoveFromHook{enddocument/info}[kernel/release]
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\AddToHook{enddocument/info}[kernel/filelist]{\@dofilelist}
%<latexrelease>\AddToHook{enddocument/info}[kernel/warnings]{\@enddocument@kernel@warnings}
%<latexrelease>\AddToHook{enddocument/info}[kernel/release]{%
@@ -719,12 +746,15 @@
% position of non-matching \cs{begin}.}
% \changes{v1.1e}{1996/07/26}{remove \cs{global} before \cs{@ignore...}}
% \changes{v1.1p}{2019/08/27}{Make command robust}
+% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions
+% for individual rollback}
+% \changes{v1.2f}{2024/10/12}{Make \cs{begin} engine-protected}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\begin}{Use hook system}%
-\DeclareRobustCommand*\begin[1]{%
+\protected\def\begin#1{%
\UseHook{env/#1/before}%
\@ifundefined{#1}%
{\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
@@ -758,54 +788,6 @@
}
% \end{macrocode}
%
-% The top level definition for \cs{end}. for an explanation see
-% below (this is the same as the 2019 version where it was
-% introduced, but for rollback we have to repeat it).
-% \begin{macrocode}
-\edef\end
- {\unexpanded{%
- \romannumeral
- \ifx\protect\@typeset@protect
- \expandafter %1
- \expandafter %2
- \expandafter %1
- \expandafter %3 expands the \csname inside \end<space>
- \expandafter %1
- \expandafter %2 expands \end<space>
- \expandafter %1 expands the \else
- \z@
- \else
- \expandafter\z@\expandafter\protect
- \fi
- }%
- \expandafter\noexpand\csname end \endcsname
- }
-% \end{macrocode}
-% Version that adds hooks (so different from the 2019 version). It
-% fixes tlb3722 but the change should perhaps be made in
-% \texttt{tabularx} instead.
-% \begin{macrocode}
-\@namedef{end }#1{%
- \romannumeral
- \IfHookEmptyTF{env/#1/end}%
- {\expandafter\z@}%
- {\z@\UseHook{env/#1/end}}%
- \csname end#1\endcsname\@checkend{#1}%
- \expandafter\endgroup\if@endpe\@doendpe\fi
- \UseHook{env/#1/after}%
- \if@ignore\@ignorefalse\ignorespaces\fi
-}
-% \end{macrocode}
-% Version without the fix for tlb3722 for the record:
-% \begin{macrocode}
-%\@namedef{end }#1{%
-% \UseHook{env/#1/end}%
-% \csname end#1\endcsname\@checkend{#1}%
-% \expandafter\endgroup\if@endpe\@doendpe\fi
-% \UseHook{env/#1/after}%
-% \if@ignore\@ignorefalse\ignorespaces\fi}%
-% \end{macrocode}
-%
% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
@@ -822,6 +804,7 @@
%<latexrelease> \csname #1\endcsname}}%
%<latexrelease> \@ignorefalse
%<latexrelease> \begingroup\@endpefalse\reserved@a}
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% A version that doesn't start out with \cs{relax} when in
% typesetting mode would be the following, but since \cs{begin}
@@ -847,7 +830,45 @@
% \begingroup\@endpefalse\reserved@a}
% \end{macrocode}
%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\begin}{Making \begin/\end robust}%
+%<latexrelease>\def\begin#1{%
+%<latexrelease> \@ifundefined{#1}%
+%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
+%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}%
+%<latexrelease> \edef\@currenvline{\on@line}%
+%<latexrelease> \csname #1\endcsname}}%
+%<latexrelease> \@ignorefalse
+%<latexrelease> \begingroup\@endpefalse\reserved@a}
+%<latexrelease>
+% \end{macrocode}
+% Also undo the internal commands as some packages unfortunately test
+% for their existence instead of using \cs{IfFormatAtLeastTF}.
+% \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin}
+% and \cs{end} in rollback (gh/494)}
+% \begin{macrocode}
+%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined
+%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
+% \end{macrocode}
+% \end{macro}
+%
+
+
+
+
% \begin{macro}{\end}
+% The top level definition for \cs{end}.
+% \changes{v1.2d}{2024/06/23}{Separate \cs{begin} and \cs{end} definitions
+% for individual rollback}
+% \begin{macrocode}
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\end}{Making \begin/\end robust}%
+% \end{macrocode}
% While \cs{begin} was made robust simply by using
% \cs{DeclareRobustCommand} we need to be a bit more subtle with
% \cs{end} as there are packages out there that try to look into
@@ -895,65 +916,129 @@
% \changes{v1.1p}{2019/08/27}{Make command robust}
%
% \begin{macrocode}
-%<latexrelease>\edef\end
-%<latexrelease> {\unexpanded{%
-%<latexrelease> \romannumeral
-%<latexrelease> \ifx\protect\@typeset@protect
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %2
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %3 expands the \csname inside \end<space>
-%<latexrelease> \expandafter %1
-%<latexrelease> \expandafter %2 expands \end<space>
-%<latexrelease> \expandafter %1 expands the \else
-%<latexrelease> \z@
-%<latexrelease> \else
-%<latexrelease> \expandafter\z@\expandafter\protect
-%<latexrelease> \fi
-%<latexrelease> }%
-%<latexrelease> \expandafter\noexpand\csname end \endcsname
-%<latexrelease> }
+\edef\end
+ {\unexpanded{%
+ \romannumeral
+ \ifx\protect\@typeset@protect
+ \expandafter %1
+ \expandafter %2
+ \expandafter %1
+ \expandafter %3 expands the \csname inside \end<space>
+ \expandafter %1
+ \expandafter %2 expands \end<space>
+ \expandafter %1 expands the \else
+ \z@
+ \else
+ \expandafter\z@\expandafter\protect
+ \fi
+ }%
+ \expandafter\noexpand\csname end \endcsname
+ }
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% And here is the original definition of \cs{end} the way it was in
% \LaTeX{} for several decades now hidden in \verb*=\end =.
% \begin{macrocode}
-%<latexrelease>\@namedef{end }#1{%
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\end}{Making \begin/\end robust}%
+%<latexrelease>\def\end#1{%
%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi
%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi}
+%<latexrelease>
%<latexrelease>\EndIncludeInRelease
+%<*2ekernel>
% \end{macrocode}
-% An here the rollback in case that is ever needed.
+% \end{macro}
+
+
+
+% \begin{macro}{\end\verbvisiblespace}
+% The internal version with a space at the end.
% \begin{macrocode}
-%<latexrelease>\IncludeInRelease{0000/00/00}%
-%<latexrelease> {\begin}{Making \begin/\end robust}%
-%<latexrelease>\def\begin#1{%
-%<latexrelease> \@ifundefined{#1}%
-%<latexrelease> {\def\reserved@a{\@latex@error{Environment #1 undefined}\@eha}}%
-%<latexrelease> {\def\reserved@a{\def\@currenvir{#1}%
-%<latexrelease> \edef\@currenvline{\on@line}%
-%<latexrelease> \csname #1\endcsname}}%
-%<latexrelease> \@ignorefalse
-%<latexrelease> \begingroup\@endpefalse\reserved@a}
-%<latexrelease>\def\end#1{%
+%</2ekernel>
+%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\end!space}{New @endpe handling}%
+\@namedef{end }#1{%
+ \romannumeral
+ \IfHookEmptyTF{env/#1/end}%
+ {\expandafter\z@}%
+ {\z@\UseHook{env/#1/end}}%
+ \csname end#1\endcsname\@checkend{#1}%
+% \end{macrocode}
+% We can now close the environment group and due to the new
+% \cs{if@endpe} handling we no longer need to \cs{expandafter}
+% out of the group.
+% \changes{v1.2d}{2024/06/23}{Adjust for new \texttt{@endpe} handling}
+% \begin{macrocode}
+% \expandafter\endgroup\if@endpe\@doendpe\fi
+ \endgroup
+ \UseHook{env/#1/after}%
+ \if@ignore\@ignorefalse\ignorespaces\fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% Version that adds hooks (so different from the 2019 version). It
+% fixes tlb3722 but the change should perhaps be made in
+% \texttt{tabularx} instead.
+% \begin{macrocode}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2020/10/01}%
+%<latexrelease> {\end!space}{Use hook system}%
+%<latexrelease>
+%<latexrelease>\@namedef{end }#1{%
+%<latexrelease> \romannumeral
+%<latexrelease> \IfHookEmptyTF{env/#1/end}%
+%<latexrelease> {\expandafter\z@}%
+%<latexrelease> {\z@\UseHook{env/#1/end}}%
+%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
+%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi
+%<latexrelease> \UseHook{env/#1/after}%
+%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi
+%<latexrelease>}
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% Version without the fix for tlb3722 for the record:
+%\begin{verbatim}
+%\@namedef{end }#1{%
+% \UseHook{env/#1/end}%
+% \csname end#1\endcsname\@checkend{#1}%
+% \expandafter\endgroup\if@endpe\@doendpe\fi
+% \UseHook{env/#1/after}%
+% \if@ignore\@ignorefalse\ignorespaces\fi}%
+% \end{verbatim}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2019/10/01}%
+%<latexrelease> {\end!space}{Making \begin/\end robust}%
+%<latexrelease>
+%<latexrelease>\@namedef{end }#1{%
%<latexrelease> \csname end#1\endcsname\@checkend{#1}%
%<latexrelease> \expandafter\endgroup\if@endpe\@doendpe\fi
%<latexrelease> \if@ignore\@ignorefalse\ignorespaces\fi}
-%<latexrelease>
+%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
-% Also undo the internal commands as some packages unfortunately test
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{0000/00/00}%
+%<latexrelease> {\end!space}{Making \begin/\end robust}%
+% \end{macrocode}
+% Undo the internal command as some packages unfortunately test
% for their existence instead of using \cs{IfFormatAtLeastTF}.
% \changes{v1.1y}{2021/02/08}{Undo the internals for robust \cs{begin}
% and \cs{end} in rollback (gh/494)}
% \begin{macrocode}
-%<latexrelease>\expandafter\let\csname begin \endcsname\@undefined
%<latexrelease>\expandafter\let\csname end \endcsname\@undefined
%<latexrelease>
%<latexrelease>\EndIncludeInRelease
%<*2ekernel>
% \end{macrocode}
% \end{macro}
-% \end{macro}
%
%
%
diff --git a/macros/latex-dev/base/ltnews.pdf b/macros/latex-dev/base/ltnews.pdf
index ce8db0cc98..fc920d24d4 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/ltnews.tex b/macros/latex-dev/base/ltnews.tex
index af21aad00b..7756497289 100644
--- a/macros/latex-dev/base/ltnews.tex
+++ b/macros/latex-dev/base/ltnews.tex
@@ -40,7 +40,7 @@
\ProvidesFile{ltnews.tex}%
[2022/06/10 v1.4e Master file for ltnews*.tex (LaTeX Project)]
-\providecommand*{\lastissue}{40}
+\providecommand*{\lastissue}{41}
\InputIfFileExists{ltnews-lastissue.cfg}{}{}
diff --git a/macros/latex-dev/base/ltnews01.pdf b/macros/latex-dev/base/ltnews01.pdf
index 2183875a25..5fdbbf0d8e 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 3e07fd8d31..482b092195 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 0d090dfef2..3c231187b9 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 61e4de37fd..b0f68211d5 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 fc943e69a0..5e8372a988 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 0989dc6333..b6b3d6465c 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 6e51f990b4..741dd1c092 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 fcd8bf3877..2c2d934244 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 09844b9acd..f20a22d717 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 ba3788772a..8f5a1e7806 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 8d26eb2d6b..7120d140b7 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 ca2ccb564d..0086ef464e 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 e11438a2bf..65ccc95c39 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 64f998af70..4151f2e058 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 ee9da57311..068ffb4a79 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 f17ceb5c1a..b0563d1876 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 9f66ce2523..5eed24de70 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 b78feb4781..ffa8c6ba01 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 2edf525e0d..d33fbb3fb8 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 8aa1ff4dc0..05f877fba5 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 bf0338046a..2654d394fd 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 9950cea60f..4023a9680f 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 9c8a9c489b..d5f7d765bd 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 3f0b1091ef..7393a550ff 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 ef12015b97..c056f4458e 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 e535f146a9..bb8440029b 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 b3db6b1056..bbca3fcd86 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 c5e06267ab..d1f7332f07 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 e288ae9c22..a320b2e899 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 ddc0c7fac2..a7765966ab 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 5553234272..dd27b7e52b 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 f947ebc780..a585387999 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 cd2a122553..ff8b3685b7 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 5bc99059e0..60af644363 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 668e17ae8c..5dfb4fd316 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/ltnews36.pdf b/macros/latex-dev/base/ltnews36.pdf
index 656da798af..7cb9f129f8 100644
--- a/macros/latex-dev/base/ltnews36.pdf
+++ b/macros/latex-dev/base/ltnews36.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews37.pdf b/macros/latex-dev/base/ltnews37.pdf
index 24a7d87196..d7e1a7d554 100644
--- a/macros/latex-dev/base/ltnews37.pdf
+++ b/macros/latex-dev/base/ltnews37.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews38.pdf b/macros/latex-dev/base/ltnews38.pdf
index faac7f6c7a..38985af42d 100644
--- a/macros/latex-dev/base/ltnews38.pdf
+++ b/macros/latex-dev/base/ltnews38.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews39.pdf b/macros/latex-dev/base/ltnews39.pdf
index a23c2e585b..0101d6d37b 100644
--- a/macros/latex-dev/base/ltnews39.pdf
+++ b/macros/latex-dev/base/ltnews39.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews39.tex b/macros/latex-dev/base/ltnews39.tex
index 3af8903515..ab62f12ad4 100644
--- a/macros/latex-dev/base/ltnews39.tex
+++ b/macros/latex-dev/base/ltnews39.tex
@@ -388,7 +388,7 @@ Around 2020 we added a number of conditionals with CamelCase names, i.e.,
%
\cs{IfClassAtLeastTF},
\cs{IfClassLoadedTF},
-\cs{IfClassLoadedWithOptionsFF},
+\cs{IfClassLoadedWithOptionsTF},
\cs{IfFormatAtLeastTF},
\cs{IfPackageAtLeastTF},
\cs{IfPackageLoadedTF}, and
@@ -725,6 +725,22 @@ logic for the strut changes when vertical mode is detected.
\pkg{bigfoot})}
+\subsection{Fix a ``missing \cs{item}'' rollback error}
+
+If \LaTeX{} is rolled back to a date between 2023/06/01 (inclusive) and
+2024/06/01 (exclusive), any list-based environment would raise an
+error:
+%(shown on two lines for \textsl{TUGboat}):
+\begin{verbatim}
+! LaTeX Error: Something's wrong--perhaps
+a missing \item.
+\end{verbatim}
+This has now been corrected as a hotfix in patch level 2, by enhancing
+the 2023/06/01 version rollback code of the new paragraph mechanism.
+%
+\githubissue{1386}
+
+
\section{Changes to packages in the \pkg{amsmath} category}
@@ -812,6 +828,7 @@ of \pkg{amsthm} theorem styles. This extra box has now been avoided.
%
\githubissue{1123}
+\tubcommand{\newpage}
\subsection{\pkg{xr}:\ Support links and properties}
%
The \pkg{xr} package implements a system for eXternal References.
diff --git a/macros/latex-dev/base/ltnews40.pdf b/macros/latex-dev/base/ltnews40.pdf
index 978e04e509..f41370e623 100644
--- a/macros/latex-dev/base/ltnews40.pdf
+++ b/macros/latex-dev/base/ltnews40.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews40.tex b/macros/latex-dev/base/ltnews40.tex
index e6d97757e8..cbb04bcb40 100644
--- a/macros/latex-dev/base/ltnews40.tex
+++ b/macros/latex-dev/base/ltnews40.tex
@@ -73,10 +73,22 @@
{github issue#1 #2}%
)}%
\par\smallskip}
+
+
+% same for issues in the tagging repository:
+
+\providecommand\taggingissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/tagging-project/issues/\getfirstgithubissue#2 \relax}%
+ {github tagging issue#1 #2}%
+ )}%
+ \par\smallskip}
+
%% But Chris has to mostly disable \href for his TEXPAD app:
%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine
-% simple solution right now (just link to the first issue if there are more)
+% simple solution right now (just link to the first issue if there are several)
\def\getfirstgithubissue#1 #2\relax{#1}
\providecommand\sxissue[1]{\ifhmode\unskip
@@ -96,6 +108,8 @@
)}%
\par}
+
+
\let\cls\pkg
\providecommand\env[1]{\texttt{#1}}
\providecommand\acro[1]{\textsc{#1}}
@@ -127,7 +141,8 @@
\tubcommand{\input{tubltmac}}
\publicationmonth{November}
-\publicationyear{2024 --- DRAFT version for upcoming release}
+%\publicationyear{2024 --- DRAFT version for upcoming release}
+\publicationyear{2024}
\publicationissue{40}
@@ -141,14 +156,348 @@
\medskip
-\section{Introduction}
-% To write
+\section{Thirty years of \LaTeXe{}}
+
+In summer 1994, i.e., thirty years ago, \LaTeXe{} saw its first public
+release. Back then it was meant to be an intermediate version (hence
+the $\epsilon$) on the way to a major new version (the mythical
+\LaTeX3) that we expected to take a couple of more years to reach
+maturity. It took much more than that in the end\Dash nominally,
+\LaTeXe{} is still with us today.
+
+However, under the hood, \LaTeXe{} changed a lot throughout these
+thirty years, as one can see, for example, when looking through the
+forty newsletters~\cite{40:ltnews} that accompanied the \LaTeX{}
+releases that happened in the meantime.
+
+During the first two decades, the \LaTeX{} kernel was kept largely
+stable with only minimal bug fix activities. During that period
+additional functionality was mostly provided through new or
+extended packages that could be loaded in the document preamble. This
+included many of the ideas targeted for \LaTeX3{}, e.g., \pkg{expl3}
+(\LaTeX3 programming language), \pkg{xparse} (new document command
+interface), \pkg{xtemplate} (a configuration mechanism), and many
+others.
+
+Initially, this approach worked well and provided good backward
+compatibility; however, over time it became apparent that keeping all
+developments confined to packages was more and more problematical.
+Features or bug fixes that should have been generally available, i.e.,
+part of the kernel, were only available in packages, so a lot of
+dependencies between packages were introduced and resulted in
+convoluted code that was difficult to manage. For example,
+\pkg{hyperref} had to rewrite a lot of kernel (and package) macros, so
+the code and behavior of other packages had to change depending on
+whether or not \pkg{hyperref} was loaded or not.
+
+Thus, in 2015 the \LaTeX{} team decided to change the policy and
+(re)start active kernel development, see~\cite{40:ltnews22}. To ensure
+continuous backward compatibility we introduced at the same time the
+\pkg{latexrelease} package that enables users to roll back changes to
+the \LaTeX{} kernel to an earlier release, in case this is necessary
+to successfully rerun a document produced at that time.
+
+As a consequence of this policy change the last decade saw a larger
+number of enhancements and corrections that were made part of the
+\LaTeX{} kernel. Overall, we can confidently say that the new
+approach has worked well and enabled us to modernize \LaTeX{} and ensure
+that it remains relevant without compromising one of the cornerstones
+of \LaTeX{}: its outstanding ability to reprocess old documents
+written many years ago.
+
+Being able to update and modernize the kernel sources allowed us to
+embark in 2019 on the multi-year \enquote{\LaTeX{} Tagged PDF} project
+with the goal of automatically providing accessible PDF documents with
+\LaTeX{}. While there are several more project phases to complete, the
+milestones already reached allow users to generate PDF/UA compliant
+documents if the input is restricted to a (growing) subset of packages
+and document classes; see next section and previous newsletters.
+
+ A big change happened with the 2020-02-02 release as part of the project activity,
+ albeit somewhat obfuscated by us as \enquote{Improved load-times for
+ \pkg{expl3}}. While technically correct, what it really meant is
+ that we had finally integrated the programming layer of \LaTeX3,
+ i.e., the ideas originally sketched out around 1992. Or saying it
+ differently: with that date the original ideas for \LaTeX3 became a
+ reality as part of the standard \LaTeX{} kernel.
+
+ With the programming layer available under the hood we were then able to
+ provide new concepts and extensions as part of \LaTeX{},
+ e.g., the hook management system, a new mark mechanism, core
+ functionality for tagging and PDF resource management, a consistent
+ key/value interface, and more recently the socket and plug mechanism.
+
+ More will follow while we continue to work on modernizing \LaTeX{} and
+ bringing the Tagged PDF project to a truly successful completion\Dash so
+ stay tuned and watch this space for future announcements in the next
+ newsletters.
+
+
+
+\section{News from the \enquote{\LaTeX{} Tagged PDF} project}
+
+\subsection{Engine support:\ An important update}
+
+As detailed below, work is progressing on the Tagged PDF
+project. There are many drivers for this work, including legal changes
+in many places which will increasingly require well-tagged PDFs
+including full support for mathematics. As part of the work on this,
+we are looking at the technical abilities of the \TeX{} engines.
+
+With \XeTeX{}, it is impossible to reliably produce tagged PDFs due to
+engine limitations. The increasing importance of tagged PDFs means
+that this requires a move away from \XeTeX{}. We will continue to
+address issues with \XeTeX{} support in team-maintained \LaTeX{} code
+on a best-effort basis. No \emph{new} functionality will be added for
+\XeTeX{} by the \LaTeX{} team. It is likely that over time
+functionality may become more restricted, and users are urged to
+migrate \XeTeX{} documents to \LuaTeX{}.
+
+For \pdfTeX{}, tagging is available and we are able to support
+mathematics by including relevant \TeX{} source or by using
+externally-generated MathML. Only \LuaTeX{} is capable of
+\emph{automatic} generation of MathML as part of a \LaTeX{} run. Thus
+\pdfTeX{} continues to be supported for existing material, but for new
+documents, moving to \LuaTeX{} is recommended.
+
+We cannot make statements about the support for other engines such as
+(u)p\TeX{}, as we don't use these programs nor have in depth knowledge
+of their functionalities. To the best of our knowledge, core \LaTeX{}
+works well with these engines, but if and to what extent tagging can
+be supported will remain to be seen. If relevant information becomes
+available to us we will provide an update in future editions of the
+\LaTeX{} newsletter.
+
+
+\subsection{Tagging support for external packages}
+
+At \url{https://latex3.github.io/tagging-project/tagging-status/} we
+show the status of many \LaTeX{} packages and classes with respect to
+PDF tagging. We also started to improve tagging support in external
+packages. If the \texttt{firstaid} key is used in addition to the
+\texttt{phase-III} key basic commands of several packages, including
+\pkg{amsthm} and \pkg{fancyvrb}, can now be used.
+
+
+\subsection{Improved table tagging}
+
+The tagging of tabulars has been extended: it is now possible to tag
+row headers and to create cells that span more than one row.
+
+The interface to this functionality is not finalized but can be
+accessed in the current release by specifying the row and columns to
+be treated as headers. For example
+%
+\begin{verbatim}
+ \tagpdfsetup{
+ table/header-rows={1,2},
+ table/header-columns={1} }
+\end{verbatim}
+would specify that in the following tables the first two rows and
+first column of each row should be tagged as heading entries.
+
+Similarly you may add a RowSpan attributes to tag a cell that spans
+two rows using:
+\begin{verbatim}
+ \tagpdfsetup{table/multirow={2}}
+\end{verbatim}
+
+
+\subsection{Automatic MathML tagging}
+
+When Lua\LaTeX{} is being used, and the \pkg{luamml} package is
+available, and if the document uses the \pkg{unicode-math} package,
+then the math module will automatically convert each math formula to
+MathML and use it to attach MathML associated files (or MathML
+Structure elements) to the tagged PDF. This new feature can be
+disabled with \verb+\tagpdfsetup{math/mathml/luamml/load=false}+. More
+options to configure MathML tagging can be found in the documentation
+of \pkg{latex-lab-math}.
+
+
+\subsection{Change behavior of tagging sockets with two arguments}
+
+When calling tagging sockets with two arguments using
+\cs{UseTaggingSocket} when tagging is suspended, previous versions of
+\LaTeXe{} dropped both arguments. This behavior has been changed to
+drop the first argument and preserve the second one instead, thereby
+allowing tagging sockets to be used to wrap existing content which
+should still appear in a non-tagging context.
+
+Since no tagging sockets currently provided by \LaTeX{} use two
+arguments we do not expect this change to affect any existing
+documents, but if a custom tagging socket has been defined outside of
+the kernel it might need to be adapted to be compatible with the new
+behavior.
+%
+\githubissue{1500}
+
+
+
+
+\section{Changes to the \LaTeX{} kernel}
+
+\subsection{Handling paragraph continuation}
+
+Already \LaTeX~2.09 offered some automation to detect whether or not
+text after a list or some other display environment is meant to be a
+continuation of the current paragraph or should start a new one. The
+document-level syntax for this is that a blank line after such an
+environment signals to \LaTeX{} that it should start a new paragraph;
+whilst no blank line signals that there should be no new paragraph and
+the text should be considered a continuation.
+
+Unfortunately, there were a number of cases where the original 2.09
+approach failed, e.g., with
+\begin{flushleft}
+ \ttfamily
+\ \ \{\meta{local customizations}\\
+\ \ \cs{begin}\{equation\} a<b \cs{end}\{equation\}\} \\
+\ \ \meta{some text}
+\end{flushleft}
+the \meta{some text} incorrectly started a new paragraph. Bug reports
+about this behavior can be traced back to the time \LaTeXe{} was
+developed, e.g., one test file from 1992 has a note that the above
+case was unfortunately not resolvable despite some improvements made
+back then. The main cause of the issue (as you probably guessed) is
+that the mechanism failed whenever the environment was executed within
+a group (\texttt{\{...\}}, \cs{begingroup}/\cs{endgroup}, or
+\cs{bgroup}/\cs{egroup} pair) that was closed before the next blank
+line was reached.
+
+While most of the time this could be visually corrected by adding some
+explicit \cs{noindent}, the situation got worse when we tried to
+implement tagged PDFs resulting in incorrect structures or worse.
+
+We therefore made a new attempt to resolve this problem in every
+situation and this new solution is rolled out in the current release.
+
+
+\subsection{Avoid bogus \enquote{no item} error}
+
+The commands \cs{addvspace} and \cs{addpenalty} generated the famous
+error message \enquote{Something's wrong---perhaps a missing \cs{item}}
+when they were encountered outside vertical mode. Most of the time
+this error was bogus and if not, then it was generated several times
+rather than once.
+
+Once upon a time (in \LaTeX{}~2.09) it was necessary that these
+commands were used only in vertical mode, but with \LaTeXe{} in 1994,
+we changed the internals but simply overlooked that this error message
+then had become useless. In this release, i.e.,~30 years too late, we
+have finally lifted the ban and from now on this error should only
+show up if there is indeed a missing \cs{item}.
+%
+\githubissue{1460}
+
+
+\subsection[Switch to T1 as default encoding in documents
+ using \cs{DocumentMetadata}]
+ {Switch to T1 as default encoding in documents\\\mbox\qquad
+ using \cs{DocumentMetadata}}
+
+As it is well known, the font encoding \texttt{OT1} supports only 128
+characters and has various problems and quirks notably for languages
+different to English. Nevertheless \texttt{OT1} is the default
+encoding in \LaTeX{} and this cannot be easily changed without
+affecting many documents as the \texttt{T1} version of the fonts have
+slightly different metrics.
+
+The introduction of the \cs{DocumentMetadata} command, which announces
+\emph{new} code and changes that can also affect the layout gives us
+now the opportunity to make this step. So with this version a use of
+\cs{DocumentMetadata} with (pdf)\LaTeX{} will setup \texttt{T1} as
+default font encoding.\footnote{The Unicode engines will continue to
+use \texttt{TU} as the encoding.} To ensure that scalable fonts are used,
+the package \pkg{cm-super} has to be installed. Users who want to
+revert to the \texttt{OT1} encoding in their document can do so with
+\verb+\usepackage[OT1]{fontenc}+.
+
+
-\section{New or improved commands}
\section{Code improvements}
+\subsection[Avoiding key--value option clashes between classes and packages]
+ {Avoiding key--value option clashes between classes\\\mbox\qquad and packages}
+
+In \LaTeX{} News~35~\cite{40:ltnews35} we introduced key--value option
+processing to the kernel. Following the standard for \LaTeXe{}
+options, keyval options given to the \cs{documentclass} line were
+treated as global and so parsed by every package. However, with
+keyvals, the likelihood of a name clash between a class-specific
+option and one used by a package is much higher than it is with simple
+strings. We have therefore refined the mechanism in the current
+release.
+
+When a class uses the kernel keyval processor, any options it
+recognizes are recorded and any packages using the keyval processor
+will then \emph{skip} these \enquote{global} options. To allow for the
+case where a class directly uses an option which should be global (for
+example \texttt{draft}), a new key property \texttt{.pass-to-packages}
+has been added. This can then be set to indicate that this key is not
+to be skipped. For example
+\begin{verbatim}
+ \DeclareKeys{
+ draft .if = {ifl@cls@draft},
+ draft .pass-to-packages = true,
+ mode .store = \cls@mode
+ }
+\end{verbatim}
+in a class would create two options, \texttt{draft} and
+\texttt{mode}. The \texttt{draft} option will be treated in the normal
+way by packages using keyvals, but they will ignore the \texttt{mode}
+option: it is effectively marked as \enquote{private} to the class.
+%
+\githubissue{1279}
+
+\subsection{Improvement to \textup{\XeTeX}\ \cs{showhyphens}}
+
+When using \cs{showhyphens} with \XeTeX, missing character warnings
+would be generated for any character not in Latin Modern. This has
+been corrected and the warnings are suppressed.
+%
+\githubissue{1380}
+
+\subsection{Improved error raised by empty hook}
+
+When using the hook management, both hook and label names (if
+specified) should be non-empty. Before, empty hook and empty label names both
+raised the same label-specific error:
+\begin{verbatim}
+! LaTeX hooks Error: Empty code label on line ....
+ Using 'top-level' instead.
+\end{verbatim}
+This has now been improved. Now an empty hook raises
+\begin{verbatim}
+! LaTeX hooks Error: Empty hook on line ....
+\end{verbatim}
+%
+\githubissue{1423}
+
+\subsection{Provide counter representations for link targets}
+
+To create unique target names for links the package \pkg{hyperref}
+uses a special counter representation \verb+\theH+\meta{counter}. To
+ensure that this counter representation exists, \pkg{hyperref}
+redefined the commands \verb+\@definecounter+, \verb+\@addtoreset+ and
+\verb+\refstepcounter+. This counter representation is also needed for
+the Tagged PDF project and so these augmented command definitions
+have now been incorporated into the kernel. Thus from now on every
+\verb+\newcounter{+\meta{counter}\verb+}+ will not only define
+\verb+\the+\meta{counter} but also \verb+\theH+\meta{counter}.
+
+\subsection{Extending \cs{refstepcounter}}
+
+For many years, the package \pkg{hyperref} had been redefining
+\verb+\refstepcounter+ and adding code that creates link targets. The
+kernel definition has now been extended with socket interfaces that
+will allow \pkg{hyperref} to avoid the redefinitions. The new
+interfaces are also used by the Tagged PDF code that needs target
+names to resolve references between structures.
+
+
\section{Bug fixes}
\subsection{Fix wrong file type in a rollback warning}
@@ -157,35 +506,214 @@ When \LaTeX{} is rolled back to date \meta{date1} and a class or
package with minimum date requirement \meta{date2} is to be loaded, a
rollback warning is raised if \meta{date2} is later than \meta{date1}:
\begin{verbatim}
-LaTeX Warning: Suspicious rollback/min-date date given
- A minimal date of YYYY-MM-DD has been specified for package
- '<pkgname>'.
- But this is in conflict with a rollback request to YYYY-MM-DD.
+LaTeX Warning: Suspicious rollback/min-date
+ date given.
+ A minimal date of YYYY-MM-DD has been
+ specified for package '<pkgname>'.
+ But this is in conflict with a rollback
+ request to YYYY-MM-DD.
\end{verbatim}
In some cases this message showed a wrong file type, i.e.,
-\verb|document class '<pkgname>'| or \verb|package '<clsname>'|.
-This has now been corrected.
+\verb|document class '<pkgname>'| or \verb|package '<clsname>'|. This
+has now been corrected.
%
\githubissue{870}
+\subsection*{Fix existence check of document environments}
+
+\cs{NewDocumentEnvironment} and friends define (or redefine) a
+document environment using the space-trimmed \meta{envname}, but the
+existence check for \meta{envname} was done without space
+trimming. Thus when the user-specified \meta{envname} consists of
+leading and/or trailing space(s), it may lead to erroneously silent
+environment declaration. For example, in
+\begin{flushleft}
+\ttfamily
+\ \ \verb=\NewDocumentEnvironment{myenv}{}{begin}{end}=\\
+\ \ \verb*=\NewDocumentEnvironment{ myenv }{}{begin}{end}=\kern-1cm
+\end{flushleft}
+the first line defines a new environment \env{myenv} but the second
+line would check existence for \verb*| myenv | (which is not yet
+defined), then redefine \env{myenv} environment without raising any
+errors. This has now been corrected.
+%
+\githubissue{1399}
+
+\subsection{Handling of global keys with spaces}
+
+If the global (class) options contained spaces around key names,
+\cs{ProcessKeyOptions} would fail to remove known keys from the list
+of unused global options and \cs{OptionNotUsed} would mistakenly add
+space-surrounded key names to that list. The first issue was corrected as
+a hotfix in patch level 1 of the November 2023 release (but
+unfortunately not mentioned in~\cite{40:ltnews38}) and the second in the current
+release.
+%
+\githubissue{1238}
+
+\subsection{File list entries for rolled back packages/classes}
+
+When the rollback mechanism for packages and classes was introduced in
+2018~\cite{40:ltnews28}, loading of the selected historic release was
+not recorded in the file list used by \cs{listfiles}. This has now
+been corrected so that the extended usage~\cite{40:ltnews39}
+\begin{verbatim}
+ \listfiles[hashes,sizes]
+\end{verbatim}
+now gives more complete and less confusing info.
+%
+\githubissue{1413}
+
\subsection{\pkg{doc}:\ \cs{PrintDescribeMacro} in preamble}
-In \pkg{doc} version 2 it was possible alter the definition of
+In \pkg{doc} version 2 it was possible to alter the definition of
\cs{PrintDescribeMacro} and similar commands in preamble. In version 3
-this stopped working because they go reset at the end of the
+this stopped working because they were reset at the end of the
preamble. This has now been implemented differently and changes in the
preamble are possible again.
%
\githubissue{1000}
+\subsection{Avoid low-level error if \cs{ShowHooks} is used late}
+
+If \cs{ShowHooks} was used to examine a package hook after the
+package was loaded, a low level error resulted. This has now been
+corrected.
+%
+\githubissue{1513}
+
+\subsection{Avoid code duplication in rollback}
+
+When the kernel uses \cs{AddToHook} in a region that might be rolled
+back (which happens in a few places) and a document requests a
+rollback, then we have the situation that the hook already contains
+code to which we added the same (or slightly different) code during
+the rollback; this results in code duplication or, worse, in
+errors. This has now been corrected by dropping any such code chunk
+(if there is one) prior to adding the rollback code.
+%
+\githubissue{1407}
+
+
+\subsection{Passing template keys using \cs{KeyValue}}
+
+With the move of the template code to the kernel, internal
+functions were reviewed to improve efficiency. However, there
+was an oversight in how
+passing key values from one setting to another was implemented,
+such that using \cs{KeyValue} could result in an infinite
+loop. This has now been fixed.
+%
+\githubissue{1486}
+
+
+
+\section{Changes to packages in the \pkg{amsmath} category}
+
+\subsection{Extend support for \cs{dots}}
+
+The implementation of \cs{dots} in \pkg{amsmath} has the feature that
+it selects different dots depending on the symbol that follows: e.g.,
+dots between commas would normally be on the baseline, while dots
+between binary or relational symbols would be raised. However, when
+symbols such as \cs{cong} were protected from expansion in moving
+arguments (so that they worked in places such as headings) it had the
+unfortunate side-effect that the \cs{dots} magic stopped working for
+them. This has now been corrected.
+%
+\githubissue{1265}
+
-%\section{Changes to packages in the \pkg{amsmath} category}
%\section{Changes to packages in the \pkg{graphics} category}
-%\section{Changes to packages in the \pkg{tools} category}
+\section{Changes to packages in the \pkg{tools} category}
+
+\subsection{Modification to generation of the \file{.tex} from \pkg{fileerr}}
+
+The \pkg{fileerr} extraction has been modified to write
+\texttt{rename-to-empty-base.tex} rather than \texttt{.tex} to comply
+with an expected security change in \TeX{}~Live 2025. The
+\texttt{build.lua} file for the \pkg{tools} has been modified to
+rename \texttt{rename-to-empty-base.tex} to \texttt{.tex} after
+unpacking. However if using \textsf{docstrip} directly rather than
+using \textsf{l3build} or the unpacked zip file from \CTAN{}, the user
+must now rename the file and install as \texttt{.tex}.
+%
+\githubissue{1412}
+
+
+\subsection{\pkg{array}:\ Improve \texttt{>\{...\}} specifier}
+
+If the argument of \texttt{>\{...\}} ended with a command accepting a
+trailing optional argument, e.g., defined for example with
+\verb=\NewDocumentCommand\foo{o}{...}=, one could get low-level
+parsing errors. This has now been corrected.
+%
+\githubissue{1468}
+
+
+\subsection{\pkg{array}:\ Tagging support for \cs{cline}}
+
+In the last release we added tagging support for \pkg{array},
+\pkg{longtable} and other tabular packages, but we overlooked that the
+kernel definition for \cs{cline} also needs modification because the
+rule generated by the command needs to be tagged as an
+artifact. Furthermore, the processing of a \cs{cline} looks to the
+algorithm as if another row is added (which is technically what
+happens), thus it was also necessary to decrement the internal row
+counter to get a correct row count. This has now been corrected in
+\pkg{array}, which is automatically loaded for tagging, so that all
+these packages are now fully compatible with the tagging code if it is
+turned on.
+%
+\taggingissue{134}
+
+
+
+\subsection{\pkg{longtable}:\ Extend caption type}
+
+The \pkg{longtable} package has been extended and now provides the command
+\cs{LTcaptype} (stemming from the \pkg{ltcaption} package) to change
+the counter and caption type used by the \cs{caption} command from
+longtable. So with \verb+\renewcommand\LTcaptype{figure}+, a
+longtable will step the figure counter instead of the table counter
+and produce an entry in the list of figures. An empty definition,
+\verb+\renewcommand\LTcaptype{}+, will suppress increasing of the
+counter. This makes it easy to define an unnumbered variant of
+longtable:
+\begin{verbatim}
+ \newenvironment{longtable*}
+ {\renewcommand\LTcaptype{}\longtable}
+ {\endlongtable}
+\end{verbatim}
+
+\subsection{\pkg{longtable}:\ Prevent \cs{pagegoal} exceeding maximum value}
+
+An internal guard has been added to avoid \TeX\ errors if
+\verb=\pagegoal= is increased beyond the maximum value for a
+\TeX\ dimension.
+%
+\githubissue{1495}
+
+
+
+\section{Changes to \pkg{l3build}}
+
+To support third-party developers testing their code against pre-release
+\LaTeX{}, a new switch \verb|--dev| has been added to \pkg{l3build}.
+This allows the developer to run
+\begin{verbatim}
+ l3build check
+\end{verbatim}
+to run their test suite against the current release of \LaTeX{} and
+\begin{verbatim}
+ l3build check --dev
+\end{verbatim}
+to run exactly the same tests using the development release of
+\LaTeX{}.
%\section{Changes to files in the \pkg{cyrillic} category}
@@ -202,9 +730,25 @@ Leslie Lamport.
\newblock Reprinted with corrections in 1996.
\bibitem{40:ltnews} \LaTeX{} Project Team.
- \emph{\LaTeXe{} news 1--39}. June, 2024.
+ \emph{\LaTeXe{} news 1--39}. June 2024.
\url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
+\bibitem{40:ltnews22} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 22}. January 2015.
+ \url{https://latex-project.org/news/latex2e-news/ltnews22.pdf}
+
+\bibitem{40:ltnews28} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 28}. April 2018.
+ \url{https://latex-project.org/news/latex2e-news/ltnews28.pdf}
+
+\bibitem{40:ltnews35} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 35}. June 2022.
+ \url{https://latex-project.org/news/latex2e-news/ltnews35.pdf}
+
+\bibitem{40:ltnews38} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 38}. November 2023.
+ \url{https://latex-project.org/news/latex2e-news/ltnews38.pdf}
+
\bibitem{40:ltnews39} \LaTeX{} Project Team.
\emph{\LaTeXe{} news 39}. June 2024.
\url{https://latex-project.org/news/latex2e-news/ltnews39.pdf}
@@ -212,4 +756,3 @@ Leslie Lamport.
\end{thebibliography}
\end{document}
-
diff --git a/macros/latex-dev/base/ltnews41.pdf b/macros/latex-dev/base/ltnews41.pdf
new file mode 100644
index 0000000000..aa6c674964
--- /dev/null
+++ b/macros/latex-dev/base/ltnews41.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltnews41.tex b/macros/latex-dev/base/ltnews41.tex
new file mode 100644
index 0000000000..0c9751704a
--- /dev/null
+++ b/macros/latex-dev/base/ltnews41.tex
@@ -0,0 +1,190 @@
+% \iffalse meta-comment
+%
+% Copyright 2024
+% The LaTeX Project and any individual authors listed elsewhere
+% in this file.
+%
+% This file is part of the LaTeX base system.
+% -——————————————
+%
+% It may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3c
+% of this license or (at your option) any later version.
+% The latest version of this license is in
+% https://www.latex-project.org/lppl.txt
+% and version 1.3c or later is part of all distributions of LaTeX
+% version 2008 or later.
+%
+% This file has the LPPL maintenance status "maintained".
+%
+% The list of all files belonging to the LaTeX base distribution is
+% given in the file `manifest.txt'. See also `legal.txt' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+%
+% \fi
+% Filename: ltnews41.tex
+%
+% This is issue 41 of LaTeX News.
+
+\NeedsTeXFormat{LaTeX2e}[2020-02-02]
+
+\documentclass{ltnews}
+
+%% Maybe needed only for Chris' inadequate system:
+\providecommand\Dash {\unskip \textemdash}
+
+%% NOTE: Chris' preferred hyphens!
+%% \showhyphens{parameters}
+%% \hyphenation{because}
+
+\usepackage[T1]{fontenc}
+
+\usepackage{lmodern,url,hologo}
+
+\usepackage{csquotes}
+\usepackage{multicol}
+\usepackage{color}
+
+\providecommand\hook[1]{\texttt{#1}}
+
+\providecommand\meta[1]{$\langle$\textrm{\itshape#1}$\rangle$}
+\providecommand\option[1]{\texttt{#1}}
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\Arg[1]{\texttt\{\meta{#1}\texttt\}}
+
+
+\providecommand\eTeX{\hologo{eTeX}}
+\providecommand\XeTeX{\hologo{XeTeX}}
+\providecommand\LuaTeX{\hologo{LuaTeX}}
+\providecommand\pdfTeX{\hologo{pdfTeX}}
+\providecommand\MiKTeX{\hologo{MiKTeX}}
+\providecommand\CTAN{\textsc{ctan}}
+\providecommand\TL{\TeX\,Live}
+
+
+\providecommand\githubissue[2][]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://github.com/latex3/latex2e/issues/\getfirstgithubissue#2 \relax}%
+ {github issue#1 #2}%
+ )}%
+ \par\smallskip}
+%% But Chris has to mostly disable \href for his TEXPAD app:
+%% \def\href #1#2{#2} % Only For Chris' deficient TeX engine
+
+% simple solution right now (just link to the first issue if there are more)
+\def\getfirstgithubissue#1 #2\relax{#1}
+
+\providecommand\sxissue[1]{\ifhmode\unskip
+ \else
+ % githubissue preceding
+ \vskip-\smallskipamount
+ \vskip-\parskip
+ \fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(\url{https://tex.stackexchange.com/#1})}\par}
+
+\providecommand\gnatsissue[2]{\ifhmode\unskip\fi
+ \quad\penalty500\strut\nobreak\hfill
+ \mbox{\small\slshape(%
+ \href{https://www.latex-project.org/cgi-bin/ltxbugs2html?pr=#1\%2F\getfirstgithubissue#2 \relax}%
+ {gnats issue #1/#2}%
+ )}%
+ \par}
+
+\let\cls\pkg
+\providecommand\env[1]{\texttt{#1}}
+\providecommand\acro[1]{\textsc{#1}}
+
+\vbadness=1400 % accept slightly empty columns
+
+
+\let\finalpagebreak\pagebreak % for TUB (if they use it)
+\let\finalvspace\vspace % for document layout fixes
+
+\makeatletter
+% maybe not the greatest design but normally we wouldn't have subsubsections
+\renewcommand{\subsubsection}{%
+ \@startsection {subsubsection}{2}{0pt}{1.5ex \@plus 1ex \@minus .2ex}%
+ {-1em}{\@subheadingfont\colonize}%
+}
+\providecommand\colonize[1]{#1:}
+\makeatother
+
+
+% Undo ltnews's \verbatim@font with active < and >
+\makeatletter
+\def\verbatim@font{\normalsize\ttfamily}
+\makeatother
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\providecommand\tubcommand[1]{}
+\tubcommand{\input{tubltmac}}
+
+\publicationmonth{June}
+\publicationyear{2025 --- DRAFT version for upcoming release}
+
+\publicationissue{41}
+
+\begin{document}
+
+\maketitle
+{\hyphenpenalty=10000 \exhyphenpenalty=10000 \spaceskip=3.33pt \hbadness=10000
+\tableofcontents}
+
+\setlength\rightskip{0pt plus 3em}
+
+\medskip
+
+\section{Introduction}
+
+% To write
+
+\section{New or improved commands}
+
+\section{Code improvements}
+
+\section{Bug fixes}
+
+%\subsection{A fix}
+
+%% Some text
+%
+%%\githubissue{XXXX}
+
+%\section{Changes to packages in the \pkg{amsmath} category}
+
+%\section{Changes to packages in the \pkg{graphics} category}
+
+%\section{Changes to packages in the \pkg{tools} category}
+
+%\section{Changes to files in the \pkg{cyrillic} category}
+
+\begin{thebibliography}{9}\frenchspacing
+
+%\fontsize{9.3}{11.3}\selectfont
+
+\bibitem{41:Lamport}
+Leslie Lamport.
+\newblock \emph{{\LaTeX}: {A} Document Preparation System: User's Guide and Reference
+ Manual}.
+\newblock \mbox{Addison}-Wesley, Reading, MA, USA, 2nd edition, 1994.
+\newblock ISBN 0-201-52983-1.
+\newblock Reprinted with corrections in 1996.
+
+\bibitem{41:ltnews} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 1--39}. June, 2024.
+ \url{https://latex-project.org/news/latex2e-news/ltnews.pdf}
+
+\bibitem{41:ltnews40} \LaTeX{} Project Team.
+ \emph{\LaTeXe{} news 40}. November 2024.
+ \url{https://latex-project.org/news/latex2e-news/ltnews40.pdf}
+
+\end{thebibliography}
+
+\end{document}
diff --git a/macros/latex-dev/base/ltpara-code.pdf b/macros/latex-dev/base/ltpara-code.pdf
index cba8970020..9fd9d61978 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 614f1df0b7..2400146a3d 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/ltpara.dtx b/macros/latex-dev/base/ltpara.dtx
index f102d68e0d..b7b895350d 100644
--- a/macros/latex-dev/base/ltpara.dtx
+++ b/macros/latex-dev/base/ltpara.dtx
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpara.dtx}
- [2024/05/16 v1.0m LaTeX Kernel (paragraph hooks)]
+ [2024/06/29 v1.0n LaTeX Kernel (paragraph hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -480,7 +480,7 @@
% ended by \cs{RawParEnd}\footnote{Technical note for those who
% know their \textit{\TeX book\/}: the \cs{RawParEnd} command
% invokes the original \TeX{} engine definition of \cs{par} that
-% (soley) triggers the paragraph builder in \TeX{} when found
+% (solely) triggers the paragraph builder in \TeX{} when found
% inside unrestricted horizontal mode and does nothing in other
% processing modes.}
% and not by \cs{par} (or a blank line), because the latter will execute
@@ -634,7 +634,7 @@
% \glue(\parskip) 0.0 plus 1.0
% \glue(\baselineskip) 5.16669
%\end{verbatim}
-% but now there is anothe \cs{parskip} glue (that is always 0pt):
+% but now there is another \cs{parskip} glue (that is always 0pt):
%\begin{verbatim}
% \glue(\parskip) 0.0 plus 1.0
% \glue(\parskip) 0.0
@@ -819,6 +819,18 @@
\@@_handle_indent:
% \the \everypar % <--- done differently below
}
+% \end{macrocode}
+% \changes{v1.0n}{2024/06/23}
+% {Append \cs{everypar} toks to \cs{g_@@_standard_everypar_tl},
+% rollback 2023/06/01 (gh/1386)}
+% \begin{macrocode}
+%<latexrelease>\cs_set:Npn \@@_tmp:w #1#2#3#4#5 { }
+%<latexrelease>\tl_gput_right:Nx \g_@@_standard_everypar_tl {
+%<latexrelease> \exp_not:N \the
+%<latexrelease> \exp_not:N \toks
+%<latexrelease> \exp_after:wN \@@_tmp:w \token_to_meaning:N \everypar
+%<latexrelease> \c_space_tl
+%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2021/06/01}
%<latexrelease> {\g_@@_standard_everypar_tl}{minipage~ fix}
@@ -917,10 +929,10 @@
% the paragraph text starts.
% \begin{macrocode}
\tl_gput_right:Nx \g_@@_standard_everypar_tl {
- \exp_not:N \the
- \exp_not:N \toks
- \the \allocationnumber
- \c_space_tl
+ \exp_not:N \the
+ \exp_not:N \toks
+ \the \allocationnumber
+ \c_space_tl
}
% \end{macrocode}
% \end{macro}
@@ -1075,7 +1087,7 @@
% it should get removed before the hook code gets added so we have
% to arrange for this removal.
%
-% As in other simular cases, it maybe best to add here
+% As in other similar cases, it may be best to add here
% a \cs{nobreak} in case the hook itself adds glue and thus
% creates a non-explicit and unwanted potential breakpoont.
% On the other hand (as has been argued) the code in the hook
diff --git a/macros/latex-dev/base/ltpictur.dtx b/macros/latex-dev/base/ltpictur.dtx
index ea5ac4205b..c6fc5236a5 100644
--- a/macros/latex-dev/base/ltpictur.dtx
+++ b/macros/latex-dev/base/ltpictur.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpictur.dtx}
- [2021/04/20 v1.2b LaTeX Kernel (Picture Mode)]
+ [2024/07/08 v1.2b LaTeX Kernel (Picture Mode)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpictur.dtx}
@@ -1413,7 +1413,6 @@
% \begin{macrocode}
\newif\if@ovvline \@ovvlinetrue
\newif\if@ovhline \@ovhlinetrue
-% \begin{macrocode}
%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
diff --git a/macros/latex-dev/base/ltproperties-code.pdf b/macros/latex-dev/base/ltproperties-code.pdf
index c03284af62..6ef1abd4fb 100644
--- a/macros/latex-dev/base/ltproperties-code.pdf
+++ b/macros/latex-dev/base/ltproperties-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltproperties-doc.pdf b/macros/latex-dev/base/ltproperties-doc.pdf
index 2e994aa4bf..7411dda4c3 100644
--- a/macros/latex-dev/base/ltproperties-doc.pdf
+++ b/macros/latex-dev/base/ltproperties-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltproperties.dtx b/macros/latex-dev/base/ltproperties.dtx
index 0fd8f22e0e..77d36a43a9 100644
--- a/macros/latex-dev/base/ltproperties.dtx
+++ b/macros/latex-dev/base/ltproperties.dtx
@@ -30,7 +30,7 @@
%<*driver>
% \fi
\ProvidesFile{ltproperties.dtx}
- [2024/04/17 v1.0e LaTeX Kernel (Properties)]
+ [2024/10/21 v1.0h LaTeX Kernel (Properties)]
% \iffalse
%
\documentclass[full]{l3doc}
@@ -94,7 +94,7 @@
% and labels which consist of lists of these properties. The reason for the
% split is that individual labels will want to record some but not all
% properties. For examples, a label concerned with position would track
-% the $x$ and $y$ co-ordinates of the current point, but not for example
+% the $x$ and $y$ coordinates of the current point, but not for example
% the page number.
%
% In the current implementation, properties share a single namespace. This
@@ -363,7 +363,7 @@
% has been set with the standard \cs{label} command.
% \end{function}
%
-% \begin{function}{\IfPropertyRecordedTF}
+% \begin{function}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF}
% \begin{syntax}
% \cs{IfPropertyRecordedTF} \Arg{label} \Arg{property} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -404,7 +404,7 @@
%
% \begin{variable}{pagenum}
% (shipout) The current page as arabic number. This is suitable for integer operations and
-% comparisions.
+% comparisons.
% \end{variable}
%
% \begin{variable}{label}
@@ -560,6 +560,8 @@
% comma at the end of the list as that is easier to deal with than trying
% to tidy up, and there is no real downside.
% \changes{v1.0d}{2024-01-17}{Use \cs{protected@write}}%
+% \changes{v1.0f}{2024-09-05}{Remove \cs{if@filesw} test to be in line with \cs{label},
+% tagging-project issue 696}%
% \begin{macrocode}
\cs_new_protected:Npn \property_record:nN #1#2
{ \property_record:nV {#1} #2 }
@@ -568,14 +570,11 @@
\cs_generate_variant:Nn \property_record:nn { nV , ee, oo }
\cs_new_protected:Npn \@@_record:nn #1#2
{
- \legacy_if:nT { @filesw }
+ \protected@write \@auxout {}
{
- \protected@write \@auxout {}
- {
- \token_to_str:N \new@label@record
- {#1}
- { \clist_map_function:nN {#2} \@@_record_value:n }
- }
+ \token_to_str:N \new@label@record
+ {#1}
+ { \clist_map_function:nN {#2} \@@_record_value:n }
}
}
\cs_generate_variant:Nn \@@_record:nn { e }
@@ -777,11 +776,13 @@
%
% \begin{macro}{\IfLabelExistsTF,\IfLabelExistsT,\IfLabelExistsF}
% \changes{v1.0e}{2024-04-17}{Renamed \cs{IfLabelExistTF} to
-% \cs{IfLabelExistsTF} (gh/1262)}
+% \cs{IfLabelExistsTF} (gh/1262)}
+% \changes{v1.0g}{2024-09-25}{Fixed definitions of \cs{IfLabelExistsT}
+% and \cs{IfLabelExistsF}}
% \begin{macrocode}
\cs_new_eq:NN \IfLabelExistsTF \property_if_recorded:eTF
-\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_exist:eTF {#1}{#2}{} }
-\cs_new:Npn \IfLabelExistsF #1 {\property_if_exist:eTF {#1}{} }
+\cs_new:Npn \IfLabelExistsT #1#2 {\property_if_recorded:eTF {#1}{#2}{} }
+\cs_new:Npn \IfLabelExistsF #1 {\property_if_recorded:eTF {#1}{} }
% \end{macrocode}
% \end{macro}
%
@@ -804,9 +805,12 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\IfPropertyRecordedTF}
+% \begin{macro}{\IfPropertyRecordedTF,\IfPropertyRecordedT,\IfPropertyRecordedF}
+% \changes{v1.0h}{2024-10-21}{Define \cs{IfPropertyRecordedT}, \cs{IfPropertyRecordedF}}
% \begin{macrocode}
-\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new_eq:NN \IfPropertyRecordedTF \property_if_recorded:eeTF
+\cs_new:Npn \IfPropertyRecordedT #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{#3}{} }
+\cs_new:Npn \IfPropertyRecordedF #1#2#3 { \property_if_recorded:eeTF {#1}{#2}{}{#3} }
% \end{macrocode}
% \end{macro}
%
diff --git a/macros/latex-dev/base/ltshipout-code.pdf b/macros/latex-dev/base/ltshipout-code.pdf
index 10aaaa4be1..ed0017f6a5 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 21ce0937ba..3f179f3f17 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/ltshipout.dtx b/macros/latex-dev/base/ltshipout.dtx
index 0c9113ce93..c2e70ba6d5 100644
--- a/macros/latex-dev/base/ltshipout.dtx
+++ b/macros/latex-dev/base/ltshipout.dtx
@@ -34,7 +34,7 @@
%<*driver>
% \fi
\ProvidesFile{ltshipout.dtx}
- [2024/02/11 v1.0n LaTeX Kernel (Shipout)]
+ [2024/10/22 v1.0n LaTeX Kernel (Shipout)]
% \iffalse
%
\documentclass{l3doc}
@@ -469,7 +469,7 @@
%
% \begin{variable}{\PreviousTotalPages}
% \begin{syntax}
-% \cs{thetotalpages}/\cs{PreviousTotalPages}
+% \cs{PreviousTotalPages}
% \end{syntax}
% Command that expands to the number of total pages from the
% previous run. If there was no previous run or if used in the
diff --git a/macros/latex-dev/base/ltsockets-code.pdf b/macros/latex-dev/base/ltsockets-code.pdf
index 8b2f4761b8..db17620914 100644
--- a/macros/latex-dev/base/ltsockets-code.pdf
+++ b/macros/latex-dev/base/ltsockets-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltsockets-doc.pdf b/macros/latex-dev/base/ltsockets-doc.pdf
index f4cd8ffed0..0328fa8758 100644
--- a/macros/latex-dev/base/ltsockets-doc.pdf
+++ b/macros/latex-dev/base/ltsockets-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/ltsockets.dtx b/macros/latex-dev/base/ltsockets.dtx
index 243963f7bc..a977f8f6aa 100644
--- a/macros/latex-dev/base/ltsockets.dtx
+++ b/macros/latex-dev/base/ltsockets.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltsockets.dtx}
- [2024/02/11 v0.9a LaTeX Kernel (Sockets)]
+ [2024/10/27 v0.9b LaTeX Kernel (Sockets)]
% \iffalse
%
\documentclass{l3doc}
@@ -87,7 +87,7 @@
% executing code for each command or environment in the document
% source. Through various steps this code transforms the input and
% eventually generates typeset output appearing in a \enquote{galley}
-% from which individual pages are cut off in an asyncronous way. This
+% from which individual pages are cut off in an asynchronous way. This
% page generating process is normally not directly associated with
% commands in the input\footnote{Excepts for directives such as
% \cs{newpage}.} but is triggered whenever the galley has received
@@ -208,7 +208,7 @@
% simply calls some instance that implements the logic and that instance
% is altered by selecting a different templates and/or adjusting their
% parameters. However, in many cases customization through parameters is
-% overkill in such a case (or otherwise awkward, because paramerization
+% overkill in such a case (or otherwise awkward, because parameterization
% is better done on a higher level instead of individually for small
% blocks of code) and using the template mechanism just to replace one
% block of code with a different one results in a fairly high
@@ -371,7 +371,7 @@
% number of inputs = 2
% available plugs = noop, plug-A, plug-B
% current plug = plug-B
-% definition = \protected\long macro:#1#2->\begin {quote}\sffamily
+% definition = \long macro:#1#2->\begin {quote}\sffamily
% foo-B: #2\textsuperscript {2}\end {quote}
% \end{verbatim}
% \LogSocket{foo}
@@ -400,7 +400,7 @@
%
% However, there is no requirement that sockets and
% hook names have to be different. In fact, if a certain action that
-% could overwise be specified as hook code has to be executed always
+% could otherwise be specified as hook code has to be executed always
% last (or first) one could ensure this by placing a socket (single
% action) after a hook (or vice versa) and using the same name to
% indicate the relationship, e.g.,
@@ -617,6 +617,22 @@
% \end{function}
%
%
+% \begin{function}[EXP]{\socket_use_expandable:nw,\socket_use_expandable:n}
+% \begin{syntax}
+% \cs{socket_use_expandable:n} \Arg{socket-name}
+% \end{syntax}
+% Fully expandable variant of \cs{socket_use:n}. This can be used in macro code
+% to retrieve code from sockets which need to appear in an expandable context.
+%
+% This usually requires the plug to only contain expandable code and should therefore
+% only be used for sockets which are clearly documented to be used in an expandable context.
+% This command does not print any debugging info when \cs{DebugSocketsOn} is active
+% and should therefore be avoided whenever possible.
+%
+% For performance reasons there is no explicit check that the socket was declared!
+% \end{function}
+%
+%
% \begin{function}{\ShowSocket,\LogSocket,\socket_show:n,\socket_log:n}
% \begin{syntax}
% \cs{ShowSocket} \Arg{socket-name}
@@ -820,6 +836,7 @@
%
%
% \begin{macro}{\socket_new_plug:nnn,\socket_set_plug:nnn}
+% \changes{v0.9b}{2024/10/27}{Make plug definition non-protected}
%
% Declaring a code for a socket is just making a definition, taking
% the number of arguments from the saved int.
@@ -834,7 +851,7 @@
{
\cs_generate_from_arg_count:cNnn
{ @@_#1_plug_#2:w }
- \cs_new_protected:Npn
+ \cs_new:Npn
{ \int_use:c { c_@@_#1_args_int } }
{#3}
% \end{macrocode}
@@ -862,7 +879,7 @@
{
\cs_generate_from_arg_count:cNnn
{ @@_#1_plug_#2:w }
- \cs_set_protected:Npn
+ \cs_set:Npn
{ \int_use:c { c_@@_#1_args_int } }
{#3}
\@@_debug_term:n
@@ -942,6 +959,17 @@
% \fmi{Implement?}
% \end{macro}
%
+% \begin{macro}{\socket_use_expandable:nw,\socket_use_expandable:n}
+% \changes{v0.9b}{2024/10/27}{Added \cs{socket_use_expandable:n}}
+% The same as the non-expandable code, except for the missing debug output.
+% \begin{macrocode}
+\cs_new:Npn \socket_use_expandable:nw #1 {
+ \use:c { @@_#1_plug_ \str_use:c { l_@@_#1_plug_str } :w }
+}
+\cs_new_eq:NN \socket_use_expandable:n \socket_use_expandable:nw % socket with no inputs
+% \end{macrocode}
+% \end{macro}
+%
%
%
%
diff --git a/macros/latex-dev/base/ltspace.dtx b/macros/latex-dev/base/ltspace.dtx
index 206e4f3885..03005f5996 100644
--- a/macros/latex-dev/base/ltspace.dtx
+++ b/macros/latex-dev/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2024/02/08 v1.3r LaTeX Kernel (spacing)]
+ [2024/09/12 v1.3s LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -833,25 +833,6 @@
% heading commands to inhibit page breaking after a heading.)
%
%
-%\begin{verbatim}
-% \addvspace{SKIP} ==
-% BEGIN
-% if vmode
-% then if @minipage
-% else if \lastskip =0
-% then \vskip SKIP
-% else if \lastskip < SKIP
-% then \vskip -\lastskip
-% \vskip SKIP
-% else if SKIP < 0 and \lastskip >= 0
-% then \vskip -\lastskip
-% \vskip \lastskip + SKIP
-% fi fi fi fi
-% else useful error message (CAR).
-% fi
-% END
-%\end{verbatim}
-%
% \begin{macro}{\@xaddvskip}
% Internal macro for |\vspace| handling the case that space has
% previously been added.
@@ -880,25 +861,53 @@
% Add vertical space taking into account space already added, as
% described above.
% \changes{v1.3m}{2020/04/21}{Support calc syntax (gh/152)}
+% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and
+% instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)}
% \begin{macrocode}
%</2ekernel>
%<*2ekernel|latexrelease>
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\addvspace}{drop unnecessary no-item error}%
+\protected\def\addvspace#1{%
+% \end{macrocode}
+% When this is encountered in hmode, we check whether we are in an hbox and if so
+% generate a \LaTeX{} error, as otherwise this would cause a bunch
+% of low-level errors. In unrestricted hmode we simply switch to vmode by
+% issuing a \cs{par}.
+% \begin{macrocode}
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+% \end{macrocode}
+%
+% \begin{macrocode}
+ \if@minipage\else
+ \ifdim \lastskip =\z@
+ \@vspace@calcify{#1}%
+ \else
+ \setlength\@tempskipb{#1}%
+ \@xaddvskip
+ \fi
+ \fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
%<latexrelease>\IncludeInRelease{2020/10/01}%
%<latexrelease> {\addvspace}{\addvspace calc support}%
-\def\addvspace#1{%
- \ifvmode
- \if@minipage\else
- \ifdim \lastskip =\z@
- \@vspace@calcify{#1}%
- \else
- \setlength\@tempskipb{#1}%
- \@xaddvskip
- \fi
- \fi
- \else
- \@noitemerr
- \fi}
-%</2ekernel|latexrelease>
+%<latexrelease>\def\addvspace#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \if@minipage\else
+%<latexrelease> \ifdim \lastskip =\z@
+%<latexrelease> \@vspace@calcify{#1}%
+%<latexrelease> \else
+%<latexrelease> \setlength\@tempskipb{#1}%
+%<latexrelease> \@xaddvskip
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@noitemerr
+%<latexrelease> \fi}
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
%
@@ -928,73 +937,116 @@
% \changes{v1.2b}{1994/11/12}{Corrected error message}
% \changes{v1.2c}{1994/11/13}{Recorrected error message}
% \changes{v1.1h}{2015/01/09}{Donald Arseneau's fix from PR/377703 (latexrelease)}
+% \changes{v1.3s}{2024/09/10}{Drop unnecessary \cs{@noitemerr} and
+% instead generate \cs{@LRmoderr} if we are in restricted hmode (gh/1460)}
% \begin{macrocode}
%</2ekernel>
-%<latexrelease>\IncludeInRelease{2015/01/01}%
-%<latexrelease> {\addpenalty}{\addpenalty}%
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\addpenalty}{\addpenalty drop error}%
%<*2ekernel|latexrelease>
% \end{macrocode}
+% \begin{macrocode}
+\protected\def\addpenalty#1{%
+% \end{macrocode}
+% See description of \cs{addvspace} for documentation of the next
+% line of code.
+% \begin{macrocode}
+ \ifhmode \ifinner \@LRmoderr \else \par \fi \fi
+% \end{macrocode}
% Fix provided by Donald (though the original fix was not good
% enough). In 2005 Plamen Tanovski discovered that this fix wasn't
% good enough either as the \cs{vskip} kept getting bigger if
% several \cs{addpenalty} commands followed each other. Donald
% kindly send a new fix.
% \begin{macrocode}
-\def\addpenalty#1{%
- \ifvmode
- \if@minipage
+ \if@minipage
+ \else
+ \if@nobreak
\else
- \if@nobreak
+ \ifdim\lastskip=\z@
+ \penalty#1\relax
\else
- \ifdim\lastskip=\z@
- \penalty#1\relax
- \else
- \@tempskipb\lastskip
+ \@tempskipb\lastskip
% \end{macrocode}
% We have to make sure the final \cs{vskip} seen by \TeX\ is the
-% correct one, namely \cs{@tempskipb}. However we may have to
-% adjust for \cs{prevdepth} when placing the penalty but that
+% correct one, namely \cs{@tempskipb}. However, we may have to
+% adjust for \cs{prevdepth} when placing the penalty; that
% should not affect the skip we pass on to \TeX.
% \changes{v1.3e}{2015/01/14}{Avoid adding redundant skips (DPC)}
% \begin{macrocode}
- \begingroup
- \@tempskipa\@tempskipb
- \advance \@tempskipb
- \ifdim\prevdepth>\maxdepth\maxdepth\else
+ \begingroup
+ \@tempskipa\@tempskipb
+ \advance \@tempskipb
+ \ifdim\prevdepth>\maxdepth\maxdepth\else
% \end{macrocode}
% If |\prevdepth| is -1000pt due to |\nointerlineskip| we better
% not add it!
% \begin{macrocode}
- \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
- \fi
- \vskip -\@tempskipb
- \penalty#1%
- \ifdim\@tempskipa=\@tempskipb
+ \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+ \fi
+ \vskip -\@tempskipb
+ \penalty#1%
+ \ifdim\@tempskipa=\@tempskipb
% \end{macrocode}
% Do nothing if the |\prevdepth| check made no adjustment.
% \begin{macrocode}
- \else
+ \else
% \end{macrocode}
% Combine the prevdepth adjustment into a single skip.
% \begin{macrocode}
- \advance\@tempskipb -\@tempskipa
- \vskip \@tempskipb
- \fi
+ \advance\@tempskipb -\@tempskipa
+ \vskip \@tempskipb
+ \fi
% \end{macrocode}
% The final skip is always the specified length.
% \begin{macrocode}
- \vskip \@tempskipa
- \endgroup
- \fi
+ \vskip \@tempskipa
+ \endgroup
\fi
\fi
- \else
- \@noitemerr
- \fi}%
+ \fi
+}
+%</2ekernel|latexrelease>
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
+%
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2015/01/01}%
+%<latexrelease> {\addpenalty}{\addpenalty}%
+%<latexrelease>\def\addpenalty#1{%
+%<latexrelease> \ifvmode
+%<latexrelease> \if@minipage
+%<latexrelease> \else
+%<latexrelease> \if@nobreak
+%<latexrelease> \else
+%<latexrelease> \ifdim\lastskip=\z@
+%<latexrelease> \penalty#1\relax
+%<latexrelease> \else
+%<latexrelease> \@tempskipb\lastskip
+%<latexrelease> \begingroup
+%<latexrelease> \@tempskipa\@tempskipb
+%<latexrelease> \advance \@tempskipb
+%<latexrelease> \ifdim\prevdepth>\maxdepth\maxdepth\else
+%<latexrelease> \ifdim \prevdepth = -\@m\p@ \z@ \else \prevdepth \fi
+%<latexrelease> \fi
+%<latexrelease> \vskip -\@tempskipb
+%<latexrelease> \penalty#1%
+%<latexrelease> \ifdim\@tempskipa=\@tempskipb
+%<latexrelease> \else
+%<latexrelease> \advance\@tempskipb -\@tempskipa
+%<latexrelease> \vskip \@tempskipb
+%<latexrelease> \fi
+%<latexrelease> \vskip \@tempskipa
+%<latexrelease> \endgroup
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \fi
+%<latexrelease> \else
+%<latexrelease> \@noitemerr
+%<latexrelease> \fi}%
% \end{macrocode}
%
% \begin{macrocode}
-%</2ekernel|latexrelease>
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{0000/00/00}%
%<latexrelease> {\addpenalty}{\addpenalty}%
diff --git a/macros/latex-dev/base/lttab.dtx b/macros/latex-dev/base/lttab.dtx
index a85b4f8cf7..f114757821 100644
--- a/macros/latex-dev/base/lttab.dtx
+++ b/macros/latex-dev/base/lttab.dtx
@@ -31,7 +31,7 @@
%%% From File: lttab.dtx
%<*driver>
% \fi
-\ProvidesFile{lttab.dtx}[2021/04/20 v1.1s LaTeX Kernel (Columns)]
+\ProvidesFile{lttab.dtx}[2024/06/23 v1.1s LaTeX Kernel (Columns)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{lttab.dtx}
@@ -1499,7 +1499,7 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@testpatch}
+% \begin{macro}{\@testpach}
% \begin{macrocode}
\def\@testpach#1{\@chclass \ifnum \@lastchclass=\tw@ 4 \else
\ifnum \@lastchclass=3 5 \else
diff --git a/macros/latex-dev/base/lttagging.dtx b/macros/latex-dev/base/lttagging.dtx
index c70e24f590..6b68cd0e05 100644
--- a/macros/latex-dev/base/lttagging.dtx
+++ b/macros/latex-dev/base/lttagging.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{lttagging.dtx}
- [2024/06/10 v1.0b LaTeX Kernel (tagging support)]
+ [2024/10/21 v1.0k LaTeX Kernel (tagging support)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttagging.dtx}
@@ -56,18 +56,11 @@
% \providecommand\socket[1]{\texttt{#1\DescribeSocket[noprint]{#1}}}
% \providecommand\plug[1]{\texttt{#1\DescribePlug[noprint]{#1}}}
%
-% \let\ProvideDocElement\NewDocElement
-%
% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
%
%
-% \section{}
-%
-%
-%
-% \MaybeStop{}
%
% \begin{macrocode}
%<*2ekernel|latexrelease>
@@ -82,97 +75,110 @@
%
% \DescribeMacro\SuspendTagging
% \DescribeMacro\ResumeTagging
-%
+% \DescribeMacro\tag_suspend:n
+% \DescribeMacro\tag_resume:n
+
+%
% The are places in code where it is import top stop any tagging
% activities, e.g., when we are doing trial typesetting that it is
% done several times. In such a case one must tag only the final
% version that is actually used, otherwise tagging structures are
-% allowed which then do not end up in the PDF and confuse the
+% generated which then do not end up in the PDF and confuse the
% mechanism. For this we have two commands that can be used in
-% packages: \cs{SuspendTagging} and \cs{ResumeTagging}. They are
+% packages: \cs{SuspendTagging} and \cs{ResumeTagging} (with corresponding
+% L3 programming layer commands). They are
% available as part of the \LaTeX{} kernel, so that they can be
-% safely used in packages whether or not tagging is requested .They
-% both take string argument that is used for debugging to easily
+% safely used in packages whether or not tagging is requested. They
+% all take a string argument that is used for debugging to easily
% identify why tagging was suspended or restarted, for example, in
% \pkg{tabularx} you find \verb=\SuspendTagging{tabularx}=. By default
-% they two commands do nothing.
+% these four commands do nothing.
+%
+% The argument is used literally (in \cs{typeout} messages) without any
+% expansion when debugging is turned on and otherwise it is not used at all.
+% This means it is safe to write something like
+% \verb=\SuspendTagging{\foo}= or even \verb=\SuspendTagging\foo=
+% which means \LaTeX{} has to parse only
+% a single token instead of putting a string of characters into the
+% argument. This means a tiny speed improvement but with many such
+% debugging strings\ldots
%
-% TODO: the corresponding L3 layer commands should also have a dummy
-% definition in the kernel!
%
% \DescribeMacro\UseTaggingSocket
% \DescribeMacro\tag_socket_use:n
% \DescribeMacro\tag_socket_use:nn
-% To support tagging in packages we use sockets with names starting
-% with \texttt{tagsupport/}. Usually, these sockets have exactly two
-% plugs defined:
-% \plug{noop} (when no tagging is requested or tagging is not wanted
-% for some reason) and a second plug that enables the tagging. There
-% may be more, e.g., tagging with special debugging, etc., but right
-% now it is usually just on or off.
-%
-% Given that we sometimes have to suspend tagging, it would be fairly
-% inefficient to put different plugs into these sockets whenever that
-% happens. We therefore offer \cs{UseTaggingSocket} which is like
-% \cs{UseSocket} except that the socket name is specified without
-% \texttt{tagsupport/}, i.e.,
+% \DescribeMacro\tag_socket_use:nnn
+% Given that we sometimes have to suspend tagging, it would be fairly
+% inefficient to put different plugs into these sockets whenever that
+% happens. We therefore offer \cs{UseTaggingSocket} which is like
+% \cs{UseSocket} except that is expects a socket starting with
+% \texttt{tagsupport/} but the socket name is specified without
+% this prefix, i.e.,
% \begin{quote}
% \verb=\UseTaggingSocket{foo}= $\to$
% \verb=\UseSocket{tagsupport/foo}=
-% \end{quote}
-% Beside being slightly shorter, the big advantage is that this way
-% we can change \cs{UseTaggingSocket} to do nothing when tagging is
-% suspended with \cs{SuspendTagging} instead of changing the plugs of
-% the tagging support sockets back and forth.
-%
-% It is possible to use the tagging support sockets with
-% \cs{UseSocket} directly, but in this case the socket remains active
-% if \cs{SuspendTagging} is in force. There my be reasons for doing
-% that but in general we expect to always use \cs{UseTaggingSocket}.
-%
-% The L3 programming layer versions \cs{tag_socket_use:n} and
-% \cs{tag_socket_use:nn} are slightly more efficient than
+% \end{quote}.
+%
+% Beside being slightly shorter, the big advantage is that this way
+% we can change \cs{UseTaggingSocket} to do nothing by switching a boolean
+% instead of changing the plugs of the tagging support sockets back and forth.
+%
+% Usually, these sockets have (beside the default plug defined for every socket)
+% one additional plug defined and directly assigned. This plug is used when
+% tagging is active.
+% There may be more plugs, e.g., tagging with special debugging or special behaviour
+% depending on the class or PDF version etc., but right now it is usually just on or off.
+%
+% When tagging is suspended they all have the same predefined behaviour:
+% The sockets with zero arguments do nothing. The sockets with one argument
+% gobble their argument. The sockets with two arguments
+% will drop their first argument and pass the second unchanged.
+%
+% It is possible to use the tagging support sockets with
+% \cs{UseSocket} directly, but in this case the socket remains active
+% if \cs{SuspendTagging} is in force. There may be reasons for doing
+% that but in general we expect to always use \cs{UseTaggingSocket}.
+%
+% \DescribeMacro\UseExpandableTaggingSocket
+% \DescribeMacro\tag_socket_use_expandable:n
+% For special cases like in some \cs{halign} contexts we need a fully expandable
+% version of the commend. For these cases, \cs{UseExpandableTaggingSocket} can be
+% used. To allow being expandable, it does not output any debugging information
+% if \cs{DebugSocketsOn} is in effect and therefore should be avoided whenever possible.
+%
+% The L3 programming layer versions \cs{tag_socket_use_expandable:n},
+% \cs{tag_socket_use:n}, \cs{tag_socket_use:nn}, and \cs{tag_socket_use:nnn}
+% are slightly more efficient than
% \cs{UseTaggingSocket} because they do not have to determine how
-% many arguments the socket takes when disabling it, so in code that
-% is using the L3 programming layer we recommend to use them instead
-% of the CamelCase command.
-%
+% many arguments the socket takes when disabling it.
%
%
-% \begin{macro}{\SuspendTagging,\ResumeTagging}
-%
-% In the kernel, these two commands get dummy definitions so that
-% they can be used without harm in packages. The real definition is
-% used when tagging gets enabled.
-% \begin{macrocode}
-\cs_new_eq:NN \SuspendTagging \use_none:n
-\cs_new_eq:NN \ResumeTagging \use_none:n
-% \end{macrocode}
+% \MaybeStop{}
%
-% A simplified version of this defnition should move to
-% \pkg{tagpdf} and dropped here, eventually.
-% \begin{macrocode}
-\AddToHook{begindocument/before}{
- \cs_if_exist:NT \tag_stop:n
- {
- \cs_set:Npn \SuspendTagging #1 {
-% \end{macrocode}%
-% This stops tagging and also disables all tagging sockets so we are done.
-% \begin{macrocode}
- \tag_stop:n {#1}
- }
-% \end{macrocode}
%
+% \section{Implementation}
+%
+%
+%
+% \begin{macro}{\tag_suspend:n,\tag_resume:n,\SuspendTagging,\ResumeTagging}
+%
+% In the kernel, these commands get dummy definitions so that
+% they can be used without harm in packages. The real definition is
+% used when tagging gets enabled.
% \begin{macrocode}
- \cs_set:Npn \ResumeTagging #1 { \tag_start:n {#1} }
- }
-}
+\cs_new_eq:NN \tag_suspend:n \use_none:n
+\cs_new_eq:NN \tag_resume:n \use_none:n
+\cs_new_protected:Npn \SuspendTagging #1 { \tag_suspend:n {#1} }
+\cs_new_protected:Npn \ResumeTagging #1 { \tag_resume:n {#1} }
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\tag_socket_use:n,
% \tag_socket_use:nn,
+% \tag_socket_use:nnn,
+% \tag_socket_use_expandable:n,
% \UseTaggingSocket,
+% \UseExpandableTaggingSocket,
% }
% Again this is not the final definition for the kernel; it is just
% a version to get going while some parts of the kernel support are
@@ -189,19 +195,21 @@
%
% Dummy definitions in the kernel.
% These definitions will get updated in \pkg{tagpdf}.
+% The default in the kernel is just to get rid of the first argument, the second is preserved if present:
+% \changes{v1.0k}{2024/10/21}{Changed behavior of two argument tagging sockets when disabled.}
+% \changes{v1.0k}{2024/10/21}{Added expandable variants}
% \begin{macrocode}
+\cs_new:Npn \tag_socket_use_expandable:n #1 { }
\cs_new_protected:Npn \tag_socket_use:n #1 { }
\cs_new_protected:Npn \tag_socket_use:nn #1#2 { }
-% \end{macrocode}
-% The default in the kernel is just to get rid of the argument:
-% \begin{macrocode}
+\cs_new_protected:Npn \tag_socket_use:nnn #1#2#3 { #3 }
\cs_new_protected:Npn \UseTaggingSocket #1 {
\int_case:nnF
{ \int_use:c { c__socket_tagsupport/#1_args_int } }
{
0 \prg_do_nothing:
1 \use_none:n
- 2 \use_none:nn
+ 2 \use_ii:nn
% \end{macrocode}
% We do not expect tagging sockets with more than one or two
% arguments, so for now we only provide those.
@@ -209,21 +217,141 @@
}
\ERRORusetaggingsocket % that should get a proper error message
}
-\ExplSyntaxOff
+% \end{macrocode}
+% The same as an expandable command:
+% \begin{macrocode}
+\cs_new:Npn \UseExpandableTaggingSocket #1 {
+ \int_case:nnF
+ { \int_use:c { c__socket_tagsupport/#1_args_int } }
+ {
+ 0 \prg_do_nothing:
+ 1 \use_none:n
+ 2 \use_ii:nn
+ }
+ \ERRORusetaggingsocket % that should get a proper error message
+}
% \end{macrocode}
%
% \end{macro}
%
+% \subsection{Tagging sockets}
+% This collects tagging sockets that should be generally available
+% so that they can also be used even if the tagging code is not loaded.
+%
+% \subsubsection{Tagging support for paragraph setup}
%
+% Paragraphs are tagged through the code in the para/hooks. This code is sometimes
+% adjusted, e.g. to produce a \enquote{flattened} paragraph or to use a different tag.
+% Sockets related to such code parts are collected here.
%
+% \begin{macro}{\l__tag_block_flattened_level_int}
+% The block code needs to know if they are nested blockenvs inside
+% a flattened environment. For this it uses a counter. Inside some contexts,
+% e.g. at the begin of a minipage or a footnote this counter must be reset.
+% We therefore define the counter here so that we can use it in the following
+% socket.
+% \begin{macrocode}
+\int_new:N \l__tag_block_flattened_level_int
+% \end{macrocode}
+% \end{macro}
%
+% \begin{socketdecl}{tagsupport/para/restore}
+% This socket restores the para related settings to their default. It
+% should be used in places where ``normal'' paragraph tagging must be ensured, for example
+% at the begin of a footnote.
+% \begin{macrocode}
+\NewSocket{tagsupport/para/restore}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
+% \begin{plugdecl}{default}
+% \changes{v1.0i}{2024/10/10}{Restore also paratagging (tagging/723)}
+% \begin{macrocode}
+\NewSocketPlug{tagsupport/para/restore}{default}
+ {
+ \tl_set:Nn \l__tag_para_main_tag_tl {text-unit}
+ \tl_set_eq:NN \l__tag_para_tag_tl\l__tag_para_tag_default_tl
+ \bool_set_false:N\l__tag_para_flattened_bool
+ \int_zero:N \l__tag_block_flattened_level_int
+ \bool_set_true:N \l__tag_para_bool
+ }
+\AssignSocketPlug{tagsupport/para/restore}{default}
+% \end{macrocode}
+% \end{plugdecl}
+%
+% \begin{socketdecl}{tagsupport/para/begin,tagsupport/para/end}
+% These sockets are currently defined in tagpdf. They overwrite
+% definitions in the latex-lab-block code. There is also a simpler
+% definition that probably should be a general socket too.
+% TODO: move this into lttagging.
+% \end{socketdecl}
+
+% \subsubsection{Tagging socket for targets}
+
+% \begin{socketdecl}{tagsupport/refstepcounter}
+% When tagging is active we want to track the current structure number
+% when targets are set. This will be mostly used in \cs{refstepcounter}
+% but also if targets are set manually.
+% \begin{macrocode}
+\NewSocket{tagsupport/recordtarget}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
-% \subsection{Tagging support for table/tabular packages}
+% \begin{plugdecl}{kernel (tagsupport/recordtarget)}
+% \begin{macrocode}
+%
+\NewSocketPlug{tagsupport/recordtarget}{kernel}
+ {
+ \tl_if_blank:VF \@currentHref
+ {
+ \prop_gput:Nee
+ \g__tag_struct_dest_num_prop
+ {\@currentHref}
+ {\tag_get:n{struct_num}}
+ }
+ }
+\AssignSocketPlug{tagsupport/recordtarget}{kernel}
+\ExplSyntaxOff
+% \end{macrocode}
+% \end{plugdecl}
+% \subsubsection{Tagging sockets for toc}
+
+% \begin{socketdecl}{tagsupport/toc/contentsline/before,
+% tagsupport/toc/contentsline/after}
+% Tagging sockets at the begin and end of contentsline.
+% They receive \emph{all} contentsline arguments as one argument
+% in four brace groups. The socket code should then use the parts it needs.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/contentsline/before}{1}
+\NewSocket{tagsupport/toc/contentsline/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/toc/starttoc/before,
+% tagsupport/toc/starttoc/after}
+% Tagging sockets for the begin and end of start of \cs{@starttoc}.
+% They take one argument, the extension.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/starttoc/before}{1}
+\NewSocket{tagsupport/toc/starttoc/after}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/toc/leaders/before,
+% tagsupport/toc/leaders/after}
+% Tagging sockets to make the dot leaders an artifact.
+% They do not take an argument.
+% \begin{macrocode}
+\NewSocket{tagsupport/toc/leaders/before}{0}
+\NewSocket{tagsupport/toc/leaders/after}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \subsubsection{Tagging support for table/tabular packages}
%
% The code uses a number of sockets to inject the tagging
% commands. These can be easily set to a noop-plug in case the
-% automated tagging is not wanted.
+% automated tagging is not wanted.
%
% \begin{socketdecl}{tagsupport/tbl/cell/begin,
% tagsupport/tbl/cell/end,
@@ -260,6 +388,14 @@
% \end{macrocode}
% \end{socketdecl}
%
+% \begin{socketdecl}{tagsupport/tbl/init/celldata}
+% This socket is used in \cs{tbl_init_cell_data_for_table}, the command
+% that stores and initialize cell data to handle nested tables.
+% It can be used to restore similar tagging related values
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/init/celldata}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
% \begin{socketdecl}{tagsupport/tbl/finalize}
% To fine tune the structure (change cells to header cells, remove
@@ -273,7 +409,14 @@
% \end{macrocode}
% \end{socketdecl}
%
-
+% \begin{socketdecl}{tagsupport/tbl/restore/celldata}
+% This socket is used in \cs{tbl_restore_outer_cell_data:}, the command
+% that restores cell data when quitting a nested table. It can be used to restore
+% similar tagging related values
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/restore/celldata}{0}
+% \end{macrocode}
+% \end{socketdecl}
% \begin{socketdecl}{tagsupport/tbl/colspan}
% This socket is used to manage spanning cells, e.g., a
@@ -331,12 +474,71 @@
% \end{socketdecl}
%
%
+% \begin{socketdecl}{tagsupport/tbl/leaders/begin,
+% tagsupport/tbl/leaders/end}
+% Sockets around leaders such as rules or dotted lines, that should
+% be tagged as artifacts, used, for example, in \cs{cline}.
+% \changes{v1.0c}{2024/07/13}{Sockets for \cs{cline} leaders added (tagging/134)}
+% \begin{macrocode}
+\NewSocket{tagsupport/tbl/leaders/begin}{0}
+\NewSocket{tagsupport/tbl/leaders/end}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
+% \subsubsection{Tagging Support for floats}
%
+% \begin{socketdecl}{tagsupport/float/hmode/begin,
+% tagsupport/float/hmode/end}
+% These sockets are used if the float is called in
+% hmode.
+% \changes{v1.0h}{2024/09/13}{Sockets for floats added}
+% \begin{macrocode}
+\NewSocket{tagsupport/float/hmode/begin}{0}
+\NewSocket{tagsupport/float/hmode/end}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/float/begin,
+% tagsupport/float/end}
+% These sockets start and stop the float structure.
+% \begin{macrocode}
+\NewSocket{tagsupport/float/begin}{0}
+\NewSocket{tagsupport/float/end}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+%
+% \begin{socketdecl}{tagsupport/caption/begin,
+% tagsupport/caption/end}
+% These sockets are used in \cs{@makecaption}.
+% They open and close the \texttt{Caption} structure.
+% Their default plugs assume that they are used in
+% vmode. The argument of the begin socket is
+% the structure number of the parent float. If it is
+% empty the current structure number is used.
+% \begin{macrocode}
+\NewSocket{tagsupport/caption/begin}{1}
+\NewSocket{tagsupport/caption/end}{0}
+% \end{macrocode}
+% \end{socketdecl}
+%
+% \begin{socketdecl}{tagsupport/caption/label/begin,
+% tagsupport/caption/label/end}
+% These sockets are used in \cs{@makecaption} around the
+% label. Their default plugs ensure that
+% the label is outside the paragraph and that
+% the rest of the caption uses flattened para mode. If the
+% caption is not in a hbox, the \texttt{para/begin}
+% socket should follow to properly start the paragraph.
+% \begin{macrocode}
+\NewSocket{tagsupport/caption/label/begin}{0}
+\NewSocket{tagsupport/caption/label/end}{0}
+% \end{macrocode}
+% \end{socketdecl}
%
% \section{For lttab.dtx parked here for now}
%
-%
+%
% \begin{macrocode}
%<@@=tbl>
\ExplSyntaxOn
@@ -357,7 +559,7 @@
% \g_@@_row_int,
% \g_@@_span_tl,
% \g_@@_table_cols_tl}
-%
+%
% \cs{g_@@_row_int} holds the current row number in the table. The
% value \texttt{0} means we haven't yet processed the table
% preamble (or in case of longtable are just in front of the next
@@ -427,14 +629,14 @@
% \subsection{Tracing/debugging}
%
% \begin{macro}{\DebugTablesOn,\DebugTablesOff}
-%
+%
% \begin{macrocode}
\def\DebugTablesOn{
\cs_set_eq:NN \@@_trace:n \typeout
-}
+}
\def\DebugTablesOff{
\cs_set_eq:NN \@@_trace:n \use_none:n
-}
+}
% \end{macrocode}
%
% \begin{macrocode}
@@ -484,7 +686,7 @@
%
%
% \begin{macro}{\l_@@_tmpa_seq}
-%
+%
% \begin{macrocode}
\seq_new:N \l_@@_tmpa_seq
% \end{macrocode}
@@ -493,7 +695,7 @@
%
%
% \begin{macro}{\tbl_count_missing_cells:n}
-%
+%
% We might have the situation that some table package has not
% implemented the \cs{tbl_count_table_cols:} in which case
% \cs{g_@@_table_cols_tl} would always be zero and we would get an
@@ -529,7 +731,7 @@
%
%
% \begin{macro}{\tbl_save_outer_table_cols:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_save_outer_table_cols: {
\tl_set_eq:NN \l_@@_saved_table_cols_tl \g_@@_table_cols_tl
@@ -539,7 +741,7 @@
%
%
% \begin{macro}{\tbl_init_cell_data_for_table:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_init_cell_data_for_table: {
\tl_set:No \l_@@_saved_col_tl {\int_use:N \g_@@_col_int }
@@ -557,6 +759,10 @@
)
}
% \end{macrocode}
+% Tagging has to initialize cell data too.
+% \begin{macrocode}
+ \UseTaggingSocket{tbl/init/celldata}
+% \end{macrocode}
% These are the initial values when starting a table:
% \begin{macrocode}
\int_gzero:N \g_@@_row_int
@@ -649,13 +855,14 @@
%
%
% \begin{macro}{\tbl_restore_outer_cell_data:}
-%
+%
% \begin{macrocode}
\cs_new_protected:Npn \tbl_restore_outer_cell_data: {
\int_gset:Nn \g_@@_col_int { \l_@@_saved_col_tl }
\int_gset:Nn \g_@@_row_int { \l_@@_saved_row_tl }
\tl_gset_eq:NN \g_@@_span_tl \l_@@_saved_span_tl
\tl_gset_eq:NN \g_@@_table_cols_tl \l_@@_saved_table_cols_tl
+ \UseTaggingSocket{tbl/restore/celldata}
\@@_trace:n { ==>~ restored~cell~data:~
\int_use:N \g_@@_row_int,
\int_use:N \g_@@_col_int,
@@ -717,7 +924,7 @@
% the macro \cs{tbl_count_missing_cells:n} is executed and
% then the row is finished with a final \cs{cr}.
% \begin{macrocode}
-\cs_new:Npn \tbl_crcr:n #1 {
+\cs_new:Npn \tbl_crcr:n #1 {
\int_compare:nNnT \g_@@_col_int > 0
{
\tbl_count_missing_cells:n {#1}
@@ -725,7 +932,7 @@
% \end{macrocode}
% Even if we are at the start of a row we my have to do a \cs{cr},
% so we do a \cs{crcr} always at the end.
-% \changes{v1.ob}{2024/06/10}
+% \changes{v1.0b}{2024/06/10}
% {Always issue a \cs{crcr} even if we are at the start of a
% row to avoid problems with tabulary and similar code}
% \begin{macrocode}
@@ -741,14 +948,10 @@
%<@@=>
% \end{macrocode}
%
+% \changes{v1.0h}{2024/09/20}{moved \cs{@kernel@refstepcounter} into ltxref}
% This is needed for \pkg{longtable} because \cs{refstepcounter} is
% setting up a target when \pkg{hyperref} is loaded and we don't
-% want that in \pkg{longtable}.
-%
-% TODO: move to right .dtx file
-% \begin{macrocode}
-\let\@kernel@refstepcounter\refstepcounter
-% \end{macrocode}
+% want that in \pkg{longtable}.%%
% Prevent longtable patching by hyperref until hyperref does so automatically:
% \begin{macrocode}
\def\hyper@nopatch@longtable{}
diff --git a/macros/latex-dev/base/lttemplates-code.pdf b/macros/latex-dev/base/lttemplates-code.pdf
new file mode 100644
index 0000000000..aa3b6f9c56
--- /dev/null
+++ b/macros/latex-dev/base/lttemplates-code.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lttemplates-code.tex b/macros/latex-dev/base/lttemplates-code.tex
new file mode 100644
index 0000000000..b85e223057
--- /dev/null
+++ b/macros/latex-dev/base/lttemplates-code.tex
@@ -0,0 +1,5 @@
+% This will typeset documentation + code
+%
+
+\AtBeginDocument{\AlsoImplementation}
+\input{lttemplates.dtx}
diff --git a/macros/latex-dev/base/lttemplates-doc.pdf b/macros/latex-dev/base/lttemplates-doc.pdf
new file mode 100644
index 0000000000..76c00342a5
--- /dev/null
+++ b/macros/latex-dev/base/lttemplates-doc.pdf
Binary files differ
diff --git a/macros/latex-dev/base/lttemplates-doc.tex b/macros/latex-dev/base/lttemplates-doc.tex
new file mode 100644
index 0000000000..18b2ac119f
--- /dev/null
+++ b/macros/latex-dev/base/lttemplates-doc.tex
@@ -0,0 +1,8 @@
+% This will typeset only documentation but not the code
+%
+
+\AtBeginDocument{\OnlyDescription
+% \let\tableofcontents\relax
+ \RenewCommandCopy\MaybeStop\StopEventually
+ }
+\input{lttemplates.dtx}
diff --git a/macros/latex-dev/base/lttemplates.dtx b/macros/latex-dev/base/lttemplates.dtx
index 6e950d1ec2..66a69c173e 100644
--- a/macros/latex-dev/base/lttemplates.dtx
+++ b/macros/latex-dev/base/lttemplates.dtx
@@ -36,7 +36,7 @@
%<*driver>
% \fi
\ProvidesFile{lttemplates.dtx}
- [2024-06-04 v1.0c LaTeX Kernel (Prototype document functions)]
+ [2024-10-07 v1.0d LaTeX Kernel (Prototype document functions)]
% \iffalse
\documentclass{l3doc}
\GetFileInfo{lttemplates.dtx}
@@ -471,7 +471,7 @@
% the general idea of fixing some settings.
% \end{function}
%
-% \begin{function}{\IfInstanceExistsT, \IfInstanceExisstF, \IfInstanceExistsTF}
+% \begin{function}{\IfInstanceExistsT, \IfInstanceExistsF, \IfInstanceExistsTF}
% \begin{syntax}
% \cs{IfInstanceExistsTF} \Arg{type} \Arg{instance} \Arg{true code} \Arg{false code}
% \end{syntax}
@@ -2098,30 +2098,44 @@
% \end{macro}
%
% \begin{macro}{\@@_assign_variable:}
-% \begin{macro}{\@@_assign_variable:N, \@@_assign_variable:c}
+% \changes{2024-10-07}{v1.0d}{Correct passing of \cs{KeyValue} contents}
+% \begin{macro}{\@@_assign_variable:n}
% A general-purpose function for all of the other assignments.
% As long as the value is not coming from another variable, the stored
-% value is simply transferred for output.
+% value is simply transferred for output. We use \texttt{V}-type expansion
+% for the \cs{KeyValue} case: for token lists this is essential, whilst
+% for register-based variables, it does no harm and avoids needing a
+% low-level test.
% \begin{macrocode}
\cs_new_protected:Npn \@@_assign_variable:
{
- \@@_assign_variable:c
+ \exp_args:Ne \@@_assign_variable:n
{
- \@@_map_var_type: _
- \bool_if:NT \l_@@_global_bool { g } set:Nn
+ \@@_map_var_type:
+ _
+ \bool_if:NT \l_@@_global_bool { g }
+ set:N
}
}
-\cs_new_protected:Npn \@@_assign_variable:N #1
+\cs_new_protected:Npn \@@_assign_variable:n #1
{
- \@@_if_key_value:VT \l_@@_value_tl
- { \@@_key_to_value: }
- \tl_put_right:Ne \l_@@_assignments_tl
+ \@@_if_key_value:VTF \l_@@_value_tl
{
- #1 \exp_not:V \l_@@_var_tl
- { \exp_not:V \l_@@_value_tl }
+ \@@_key_to_value:
+ \tl_put_right:Ne \l_@@_assignments_tl
+ {
+ \exp_not:c { #1 V } \exp_not:V \l_@@_var_tl
+ \exp_not:V \l_@@_value_tl
+ }
+ }
+ {
+ \tl_put_right:Ne \l_@@_assignments_tl
+ {
+ \exp_not:c { #1 n } \exp_not:V \l_@@_var_tl
+ { \exp_not:V \l_@@_value_tl }
+ }
}
}
-\cs_generate_variant:Nn \@@_assign_variable:N { c }
% \end{macrocode}
% \end{macro}
% \end{macro}
diff --git a/macros/latex-dev/base/lttextcomp.dtx b/macros/latex-dev/base/lttextcomp.dtx
index 7f247747d6..1ee4a18b7a 100644
--- a/macros/latex-dev/base/lttextcomp.dtx
+++ b/macros/latex-dev/base/lttextcomp.dtx
@@ -2357,8 +2357,8 @@
% \changes{v1.1a}{2024/01/27}{Added check file for encoding subset}
% \begin{macrocode}
%<*TS1check>
-\Providesfile{checkencodingsubset.tex}
- [2024/01/27 v0.5a Figure out safe TS1 encoding subsets]
+\ProvidesFile{checkencodingsubset.tex}
+ [2024/10/18 v0.5b Figure out safe TS1 encoding subsets]
% \end{macrocode}
%
% \begin{macrocode}
diff --git a/macros/latex-dev/base/ltvers.dtx b/macros/latex-dev/base/ltvers.dtx
index 9455c56beb..76a16e3528 100644
--- a/macros/latex-dev/base/ltvers.dtx
+++ b/macros/latex-dev/base/ltvers.dtx
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2024-11-01}
+ {2025-06-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{1}
+\def\patch@level{0}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/macros/latex-dev/base/ltx3info.pdf b/macros/latex-dev/base/ltx3info.pdf
index 3f65a85e43..ea8d21b55f 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 17b0b7e26d..f0034affb5 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/ltxref.dtx b/macros/latex-dev/base/ltxref.dtx
index 79cf01be77..4464409abd 100644
--- a/macros/latex-dev/base/ltxref.dtx
+++ b/macros/latex-dev/base/ltxref.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltxref.dtx}
- [2023/05/16 v1.1q LaTeX Kernel (Cross Referencing)]
+ [2024/09/20 v1.1r LaTeX Kernel (Cross Referencing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltxref.dtx}
@@ -56,6 +56,9 @@
%</driver>
% \fi
%
+% \ProvideDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
+% \ProvideDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
+% \ProvideDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
%
% \changes{v1.0c}{1994/03/29}
% {Create file ltcntlen from parts of ltmiscen and ltherest.}
@@ -413,18 +416,55 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{macrocode}
-%<latexrelease>\IncludeInRelease{2022/06/01}%
-%<latexrelease> {\Ref}{Add starred version}%
-% \end{macrocode}
%
% \begin{macro}{\refstepcounter}
% Step the counter and allow for labels to point to its current value.
% \changes{v1.1n}{2020/05/05}{record the counter name in \cs{@currentcounter}}
% \changes{v1.1o}{2020/08/23}{add default definition of \cs{@currentcounter}}
+% \changes{v1.1r}{2024/09/20}{set also \@currentHref}
+% \changes{v1.1r}{2024/09/20}{provide a kernel copy \@kernel@refstepcounter}
+% \changes{v1.1r}{2024/09/20}{add sockets}
% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\Ref}{Add starred version}%
\def\@currentcounter{}
-\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2024/11/01}%
+%<latexrelease> {\@currentHref}{set theHcounter representation}%
+% \end{macrocode}
+% \begin{socketdecl}{refstepcounter}
+% This socket takes the whole code as argument.
+% The default kernel plug is identity. By changing
+% the plug hyperref can add a conditional and e.g.
+% suppress the processing in a PDF context.
+% \begin{macrocode}
+\NewSocket{refstepcounter}{1}
+% \end{macrocode}
+% \end{socketdecl}
+% \begin{socketdecl}{refstepcounter/target}
+% This socket takes an argument, the counter name, and
+% should at least set from it the target name |\@currentHref|.
+% With hyperref it sets also the actual target.
+% This is done with a socket so that the target name
+% is not set more than once to (possibly) different names.
+% The socket is not used in |\@kernel@refstepcounter|.
+% The tagging code needs the target name so it is added after
+% this socket.
+% \begin{macrocode}
+\NewSocket{refstepcounter/target}{1}
+% \end{macrocode}
+% \end{socketdecl}
+% \begin{plugdecl}{kernel (refstepcounter/target)}
+% \begin{macrocode}
+\NewSocketPlug{refstepcounter/target}{kernel}
+ {\xdef\@currentHref {#1.\csname theH#1\endcsname}}%
+\AssignSocketPlug{refstepcounter/target}{kernel}
+% \end{macrocode}
+% \end{plugdecl}
+% \begin{macrocode}
+\def\refstepcounter#1{%
+ \UseSocket{refstepcounter}{%
+ \stepcounter{#1}%
\edef\@currentcounter{#1}%
\protected@edef\@currentlabel
% \end{macrocode}
@@ -449,10 +489,41 @@
% argument}
% \begin{macrocode}
{\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+ \UseSocket{refstepcounter/target}{#1}%
+ \UseTaggingSocket{recordtarget}%
+ }%
}
% \end{macrocode}
-% \end{macro}
+% \begin{macro}{\@kernel@refstepcounter}
+% This is a version of \cs{refstepcounter} which does not set and use
+% targets.
+% \begin{macrocode}
+\def\@kernel@refstepcounter#1{%
+ \UseSocket{refstepcounter}{%
+ \stepcounter{#1}%
+ \edef\@currentcounter{#1}%
+ \protected@edef\@currentlabel
+ {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}}}%
+% \end{macrocode}
+% \end{macro}
+% \begin{macrocode}
+%<latexrelease>\EndIncludeInRelease
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\@currentHref}{set theHcounter representation}%
+%<latexrelease>\def\refstepcounter#1{\stepcounter{#1}%
+%<latexrelease> \edef\@currentcounter{#1}%
+%<latexrelease> \protected@edef\@currentlabel
+%<latexrelease> {\csname p@#1\expandafter\endcsname\csname the#1\endcsname}%
+%<latexrelease>}
+%<latexrelease>\let\@kernel@refstepcounter\refstepcounter
+%<latexrelease>\EndIncludeInRelease
+% \end{macrocode}
%
+% \end{macro}
+% \begin{macrocode}
+%<latexrelease>\IncludeInRelease{2022/06/01}%
+%<latexrelease> {\Ref}{Add starred version}%
+% \end{macrocode}
% \begin{macro}{\labelformat}
% A shortcut to set the |\p@...| macro for a counter. It will pick
% up the counter representation as an argument so that it can be
diff --git a/macros/latex-dev/base/makeindx.pdf b/macros/latex-dev/base/makeindx.pdf
index 9a8a6270aa..7be9058ba3 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/manifest.txt b/macros/latex-dev/base/manifest.txt
index 21b3c0bff3..e393012417 100644
--- a/macros/latex-dev/base/manifest.txt
+++ b/macros/latex-dev/base/manifest.txt
@@ -76,7 +76,8 @@
% ltnews37.tex -- What was new in the release dated 2023/06.
% ltnews38.tex -- What was new in the release dated 2023/11.
% ltnews39.tex -- What was new in the release dated 2024/06.
-%
+% ltnews40.tex -- What was new in the release dated 2024/11.
+% ltnews41.tex -- What was new in the release dated 2025/06.
%
% ltx3info.tex -- Information about the LaTeX3 project.
%
diff --git a/macros/latex-dev/base/modguide.pdf b/macros/latex-dev/base/modguide.pdf
index 72c14d4b29..a176dd214f 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 1c12e35c2d..06fcd085a8 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 5aa128f5e4..5a14431bdd 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 0eb119ca15..8297e59343 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 89beaf002c..e1c640709a 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 e460c8a5d6..87c4de96db 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 8ad9bef081..a711c567f2 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 b60715484b..2174d9c5d3 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/tlc3.err b/macros/latex-dev/base/tlc3.err
index db8d2c5b2f..a7f8af1bfa 100644
--- a/macros/latex-dev/base/tlc3.err
+++ b/macros/latex-dev/base/tlc3.err
@@ -1,4 +1,4 @@
-\newcommand\erratafiledate{2024/06/05} % needs / and not -
+\newcommand\erratafiledate{2024/08/07} % needs / and not -
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% To produce a printed version of this errata file run this file through
@@ -469,6 +469,10 @@ beyond \> \u{B}eyond
\erroronpage{I-xx\ldots I-xxi}{}{FMi}{2023/04/04}{s}
Dot leaders have been changed on all sections.
+\erroronpage{xxv}{footnote}{FMi}{2024/07/11}{s}
+The package implementing the Silly Walk is called \u{\texttt{sillypage}}
+not \u{\texttt{sillywalk}} as claimed in the footnote.
+
\CHAPTER{Bibliography (Part I)}
@@ -558,7 +562,12 @@ ones.
%\CHAPTER{General}
%
-%\CHAPTER{Front matter}
+
+\CHAPTER{Front matter}
+
+\erroronpage{I-xli}{footnote}{FMi}{2024/07/11}{s}
+The package implementing the Silly Walk is called \u{\texttt{sillypage}}
+not \u{\texttt{sillywalk}} as claimed in the footnote.
\CHAPTER{Bibliography}
@@ -689,6 +698,14 @@ so that both text and math usage of \verb=\qty= are compared in the example.
\erroronpage{I-182}{para 4}{BeB}{2024/03/17}{s}
Add sentence: The command \verb+\textcquote+ is used in Example 16-5-50 on page II-535.
+\erroronpage{I-195}{para 2}{FMi}{2024/07/20}{s}
+Replace the whole paragraph with:\\
+For the same reason \texttt{soul} was unable to cope with UTF-8 input
+characters if they are internally represented by several bytes. If you
+used such characters, you had to load \texttt{soulutf8} (by Heiko Oberdiek)
+instead of \texttt{soul} — since 2023, both packages are equivalent, thus you may
+always use the \texttt{soul} package.
+
\CHAPTER{Chapter 4 --- Basic Formatting Tools -- Larger \ldots}
\erroronpage{I-253}{para 2, l.-3}{YEi}{2023/11/27}{s}
@@ -696,6 +713,17 @@ Move comma:\\
and \textsf{thmtools} packages and \textsf{typed-checklist}\u{,} helps you write \> \\
and \textsf{thmtools} packages\u{,} and \textsf{typed-checklist} helps you write
+\erroronpage{I-286}{para 1, l.3}{DPC}{2024/07/15}{s}
+in this case \texttt{shade\u{d}thm} \> in this case \texttt{shadethm}
+
+\erroronpage{I-322}{para -1, l.-2}{MBe/FMi}{2024/08/07}{s}
+
+Change: \texttt{algorithm\u{s}} \> \texttt{algorithm\u{ic}}
+
+\textit{Reason: The package is called \texttt{algorithmic} and there
+is also \texttt{algorithm} to make floats, but the CTAN bundle (and
+its documentation) calls it \texttt{algorithms}.}
+
\erroronpage{I-323}{Table 4.4, left column}{BeB}{2023/07/25}{s}
Typo: Assembler (\u{N}otorola68k, x86masm) \> \\ Assembler (\u{M}otorola68k, x86masm)
@@ -762,9 +790,10 @@ result in ``31.00'', which is probably not desired.
is not really an error, but it looks better---and is consistent with the
`actual' item of `profit' for Booklet 113.)
+\erroronpage{I-492}{footnote}{DPC}{2024/07/15}{s}
+called \u{\texttt{threetableex}} \> called \u{\texttt{threeparttablex}}
\erroronpage{I-494}{para -2, l.3}{MRu}{2024/03/16}{s}
-
Use plural: The allowed key\u{s} are \ldots
@@ -802,6 +831,10 @@ Correct hyphenation: stan-dalone \> stand-alone
\CHAPTER{Chapter 9 --- Font Selection and Encodings}
+\erroronpage{I-687}{table 9.6, l.21}{YvH}{2024/06/19}{s}
+ cmdh \> lmdh
+
+
\erroronpage{I-688}{para -2, l. 1}{BeB}{2023/08/13}{s}
acronym PSNFSS not explained: PSNFSS \> PostScript New Font Selection Scheme (PSNFSS)
@@ -865,6 +898,9 @@ Open Type font is available: \\
There are no italic blackletters (so it should be in blue): \\
\textit{phœnix's official rôle} \> \textit{\bl phœnix's official rôle}
+\erroronpage{II-27}{para 1, l.1}{MBe/FMi}{2024/08/02}{s}
+Package was renamed: \texttt{droidmono} \> \texttt{droid\u{sans}mono}
+
\erroronpage{II-28}{table 10.14, l. 3}{BeB}{2023/08/13}{s}
Inconsistent order: sl, l \> l, sl
@@ -1186,6 +1222,10 @@ point in front of the display, thus \cs{predisplaypenalty} is no
longer honored.
+\erroronpage{II-149}{para 2, l.4}{DPC}{2024/07/15}{s}
+package \texttt{flex\u{y}sym} \>
+package \texttt{flex\u{i}sym}
+
\erroronpage{II-167}{para. 3, l. -2}{BeB}{2023/08/13}{s}
option\u e \> option\u{s}
@@ -1196,7 +1236,8 @@ option\u e \> option\u{s}
\erroronpage{II-178}{Tab. 11.3, l.10}{BeB}{2023/08/13}{s}
in the description column: \u{array}-symbol-arrow \> \u{arrow}-symbol-arrow
-
+\erroronpage{II-189}{footnote}{DPC}{2024/07/15}{s}
+\texttt{oubrace} package \> \texttt{oubrace\u{s}} package
@@ -1363,6 +1404,10 @@ The keyword \texttt{Harf\u{b}uzz} should be spelled
\texttt{Harf\u{B}uzz}. Both names are supported, but the recommended
spelling is \texttt{HarfBuzz}.
+\erroronpage{II-341}{para -4, l.4}{DPC/FMi}{2024/07/15}{s}
+\texttt{devnag} \u{package} \> \texttt{devnag} \u{program}
+
+
\CHAPTER{Chapter 14 --- Index Generation}
% Das Beispiel von S. II-352 als File wäre schön, dann könnte man das mit
@@ -1399,6 +1444,8 @@ Changes the output of example 16-7-31 on page II-560 as well.
the \cs{MakeUpper}\texttt{\u{C}ase} trick \>
the \cs{MakeUpper}\texttt{\u{c}ase} trick
+\erroronpage{II-423}{table 15.9}{MBe/FMi}{2024/08/04}{s}
+Drop \texttt{nature.bst} line. Style no longer supported.
\erroronpage{II-435}{code}{FMi}{2023/05/26}{s}
\verb=\textcolor{See= \> \cs{textcolor}\u{\texttt{\{blue\}}}\texttt{\{See}
@@ -1515,10 +1562,12 @@ Appendix title not properly capitalized.
\contributor{BeB}{Bernd Burghardt}
\contributor{BYu}{Boshi Yuan}
\contributor{CAR}{Chris Rowley}
+\contributor{DPC}{David Carlisle}
\contributor{DC}{Davide Campagnari}
\contributor{DFl}{Daniel Flipo}
\contributor{EOl}{Edgar Olthof}
\contributor{FMi}{Frank Mittelbach}
+\contributor{MBe}{Matthew Bertucci}
\contributor{MJo}{Maciej Jończyk}
\contributor{MRu}{Mark Rudolph}
\contributor{YFu}{FUJIMURA Yukitoshi}
diff --git a/macros/latex-dev/base/tlc3.pdf b/macros/latex-dev/base/tlc3.pdf
index 49f219e445..f7c206a692 100644
--- a/macros/latex-dev/base/tlc3.pdf
+++ b/macros/latex-dev/base/tlc3.pdf
Binary files differ
diff --git a/macros/latex-dev/base/tulm.pdf b/macros/latex-dev/base/tulm.pdf
index 9ebf02c983..d3a865fe6c 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-historic.pdf b/macros/latex-dev/base/usrguide-historic.pdf
index 0af5803f1e..2ebb782a01 100644
--- a/macros/latex-dev/base/usrguide-historic.pdf
+++ b/macros/latex-dev/base/usrguide-historic.pdf
Binary files differ
diff --git a/macros/latex-dev/base/usrguide.pdf b/macros/latex-dev/base/usrguide.pdf
index bbc05226f4..4cdaff2fa3 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/usrguide.tex b/macros/latex-dev/base/usrguide.tex
index 2b9e959627..e4ea6e4e0c 100644
--- a/macros/latex-dev/base/usrguide.tex
+++ b/macros/latex-dev/base/usrguide.tex
@@ -43,7 +43,7 @@
\texttt{usrguide.tex} for full details.}%
}
-\date{2024-05-24}
+\date{2024-10-22}
\NewDocumentCommand\cs{m}{\texttt{\textbackslash\detokenize{#1}}}
\NewDocumentCommand\marg{m}{\arg{#1}}
@@ -265,7 +265,16 @@ These commands work in the same way as \cs{NewDocumentCommand}, etc.\@, but
create environments (\cs{begin}\arg{env} \ldots{}
\cs{end}\arg{env}). Both the \meta{beg-code} and \meta{end-code}
may access the arguments as defined by \meta{arg spec}. The arguments will be
-given following \cs{begin}\arg{env}.
+given following \cs{begin}\arg{env}. Any spaces at the start and end of the
+\arg{env} are removed before the definition takes place, thus
+\begin{verbatim}
+\NewDocumentEnvironment{foo}
+\end{verbatim}
+and
+\begin{verbatim}
+\NewDocumentEnvironment{ foo }
+\end{verbatim}
+both create the same \enquote{\texttt{foo}} environment.
\subsection{Optional arguments}
\label{sec:cmd:opt}
diff --git a/macros/latex-dev/base/utf8ienc.pdf b/macros/latex-dev/base/utf8ienc.pdf
index c58f23dd97..fee976bcfa 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 6b640eb312..5796eaeff8 100644
--- a/macros/latex-dev/base/webcomp.pdf
+++ b/macros/latex-dev/base/webcomp.pdf
Binary files differ