summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex-dev
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-06-11 20:40:15 +0000
committerKarl Berry <karl@freefriends.org>2023-06-11 20:40:15 +0000
commita8fcd40df106640933a9d9c1a7851b655c213c60 (patch)
tree84765606037957df8234c5d1aa9d8eec53a2edd5 /Master/texmf-dist/source/latex-dev
parent2ac5e7409822522e1e3ad28a3bc26a5df022f2f5 (diff)
latex-dev (11jun23)
git-svn-id: svn://tug.org/texlive/trunk@67328 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex-dev')
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltcmd.dtx11
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltfinal.dtx10
-rw-r--r--Master/texmf-dist/source/latex-dev/base/lthooks.dtx32
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltoutput.dtx8
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltspace.dtx3
-rw-r--r--Master/texmf-dist/source/latex-dev/base/ltvers.dtx4
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/color.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/drivers.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/epsfig.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/graphics.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/graphicx.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/keyval.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/lscape.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/rotating.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/graphics/trig.dtx2
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx23
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-bib.dtx357
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block-tagging.dtx61
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx147
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx6
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx7
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-testphase.dtx18
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx132
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.dtx43
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx135
-rw-r--r--Master/texmf-dist/source/latex-dev/latex-lab/latex-lab.ins11
26 files changed, 730 insertions, 296 deletions
diff --git a/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx b/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
index 5f019cdc2a0..d6322ff3ee8 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltcmd.dtx
@@ -34,8 +34,8 @@
%%% From File: ltcmd.dtx
%
% \begin{macrocode}
-\def\ltcmdversion{v1.1d}
-\def\ltcmddate{2023-04-13}
+\def\ltcmdversion{v1.1e}
+\def\ltcmddate{2023-05-26}
% \end{macrocode}
%
%<*driver>
@@ -725,6 +725,9 @@
{ \@@_environment_or_command: }
}
% \end{macrocode}
+%
+% \changes{v1.1e}{2023/05/26}
+% {Use simpler variant \cs{cs_generate_from_arg_count:NNno}}
% To construct \cs{@@_tmp:w}, first go through the arguments
% found and the corresponding defaults, building a token list with
% |{#|\meta{arg number}|}| for arguments found in the input (whose
@@ -738,10 +741,10 @@
\int_zero:N \l_@@_current_arg_int
\@@_tl_mapthread_function:NNN \l_@@_args_tl \l_@@_defaults_tl
\@@_defaults_def:nn
- \cs_generate_from_arg_count:NNVo \@@_tmp:w \cs_set:Npn
+ \cs_generate_from_arg_count:NNno \@@_tmp:w \cs_set:Npn
\l_@@_current_arg_int \l_@@_tmpa_tl
}
-\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNVo }
+\cs_generate_variant:Nn \cs_generate_from_arg_count:NNnn { NNno }
\cs_new_protected:Npn \@@_defaults_def:nn
{
\int_incr:N \l_@@_current_arg_int
diff --git a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
index 1e39e293e08..2652f6ce44e 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltfinal.dtx
@@ -33,7 +33,7 @@
%<*driver>
% \fi
\ProvidesFile{ltfinal.dtx}
- [2023/04/20 v2.3b LaTeX Kernel (Final Settings)]
+ [2023/05/30 v2.3c LaTeX Kernel (Final Settings)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltfinal.dtx}
@@ -1201,6 +1201,8 @@
% \changes{v2.2u}{2022/06/30}{Add \cs{AddToNoCaseChangeList}}
% \changes{v2.3b}{2023/04/19}{Add \cs{DeclareLowercaseMapping},
% \cs{DeclareTitlecaseMapping} and \cs{DeclareUppercaseMapping}}
+% \changes{v2.3c}{2023/05/30}{Fix a typo in implementation of
+% \cs{DeclareLowercaseMapping}, etc.}
% |\NoCaseChange| protects its argument from the case change functions.
%
% |\AddToNoCaseChangeList| Allows new commands to protect their arguments, eg
@@ -1216,21 +1218,21 @@
\text_declare_case_equivalent:Nn
\NewDocumentCommand \DeclareLowercaseMapping { o m m }
{
- \IFNoValueTF {#1}
+ \IfNoValueTF {#1}
{ \text_declare_lowercase_mapping:nn }
{ \text_declare_lowercase_mapping:nnn {#1} }
{#2} {#3}
}
\NewDocumentCommand \DeclareTitlecaseMapping { o m m }
{
- \IFNoValueTF {#1}
+ \IfNoValueTF {#1}
{ \text_declare_titlecase_mapping:nn }
{ \text_declare_titlecase_mapping:nnn {#1} }
{#2} {#3}
}
\NewDocumentCommand \DeclareUppercaseMapping { o m m }
{
- \IFNoValueTF {#1}
+ \IfNoValueTF {#1}
{ \text_declare_uppercase_mapping:nn }
{ \text_declare_uppercase_mapping:nnn {#1} }
{#2} {#3}
diff --git a/Master/texmf-dist/source/latex-dev/base/lthooks.dtx b/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
index c0efe2c9038..3807d25c44b 100644
--- a/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/lthooks.dtx
@@ -31,8 +31,8 @@
%%% From File: lthooks.dtx
%
% \begin{macrocode}
-\def\lthooksversion{v1.1d}
-\def\lthooksdate{2023/05/21}
+\def\lthooksversion{v1.1e}
+\def\lthooksdate{2023/06/06}
% \end{macrocode}
%
%<*driver>
@@ -4424,6 +4424,7 @@
% \end{macro}
%
% \begin{macro}{\@@_cs_gput_right:nnn}
+% \begin{macro}{\@@_cs_gput_right_fast:nnn,\@@_cs_gput_right_slow:nnn}
% \begin{macro}{\@@_code_gset_auxi:nnnn,\@@_code_gset_auxi:eeen}
% This macro is used to append code to the \verb|toplevel| and
% \verb|next| token lists, trating them correctly depending on their
@@ -4432,10 +4433,32 @@
% stored as parameter tokens.
% \changes{v1.1a}{2023/04/06}
% {Macro added (hook-args).}
+% \changes{v1.1e}{2023/06/06}
+% {Short-circuit when the hook is declared without args (gh1078).}
% \begin{macrocode}
%<latexrelease>\IncludeInRelease{2023/06/01}{\@@_cs_gput_right:nnn}
%<latexrelease> {Hooks~with~args}
-\cs_new_protected:Npn \@@_cs_gput_right:nnn #1 #2 #3
+% \end{macrocode}
+%
+% Check if the current hook is declared and takes no arguments. In
+% this case, we short-circuit and use the simpler and much faster
+% approach that doesn't require hash-doubling.
+% \begin{macrocode}
+\cs_new_protected:Npn \@@_cs_gput_right:nnn #1 #2
+ {
+ \if:w T
+ \@@_if_declared:nF {#2} { F }
+ \tl_if_empty:cF { c_@@_#2_parameter_tl } { F }
+ T
+ \exp_after:wN \@@_cs_gput_right_fast:nnn
+ \else:
+ \exp_after:wN \@@_cs_gput_right_slow:nnn
+ \fi:
+ {#1} {#2}
+ }
+\cs_new_protected:Npn \@@_cs_gput_right_fast:nnn #1 #2 #3
+ { \cs_gset:cpx { @@#1~#2 } { \exp_not:v { @@#1~#2 } \exp_not:n {#3} } }
+\cs_new_protected:Npn \@@_cs_gput_right_slow:nnn #1 #2 #3
{
% \end{macrocode}
% The auxiliary \cs{@@_code_gset_auxi:eeen} just does the assignment
@@ -4498,11 +4521,14 @@
%<latexrelease>\IncludeInRelease{2020/10/01}{\@@_cs_gput_right:nnn}
%<latexrelease> {Hooks~with~args}
%<latexrelease>\cs_undefine:N \@@_cs_gput_right:nnn
+%<latexrelease>\cs_undefine:N \@@_cs_gput_right_fast:nnn
+%<latexrelease>\cs_undefine:N \@@_cs_gput_right_slow:nnn
%<latexrelease>\cs_undefine:N \@@_code_gset_auxi:nnnn
%<latexrelease>\EndIncludeInRelease
% \end{macrocode}
% \end{macro}
% \end{macro}
+% \end{macro}
%
% \begin{macro}{
% \@@_code_gset:nn,\@@_code_gset:ne,
diff --git a/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx b/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
index 29024dd4d6a..18388b1cc64 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltoutput.dtx
@@ -37,7 +37,7 @@
%<*driver>
% \fi
\ProvidesFile{ltoutput.dtx}
- [2022/08/20 v1.4j LaTeX Kernel (Output Routine)]
+ [2023/05/26 v1.4j LaTeX Kernel (Output Routine)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltoutput.dtx}
@@ -3005,9 +3005,6 @@
%
% There is also an |\addpenalty\interlinepenalty| above.
%
-% Since in 2e |\samepage| is no longer supported, these could be
-% removed.
-%
% Although it is best to use |\addvspace| in case two h floats come
% together, this makes other spacing more difficult to adjust; whereas
% if a user specifies two h floats together then they can more easily
@@ -3227,9 +3224,6 @@
%
% There is also an |\addpenalty\interlinepenalty| above.
%
-% Since in 2e |\samepage| is no longer supported, these could be
-% removed.
-%
% Although it is best to use |\addvspace| in case two h floats come
% together, this makes other spacing more difficult to adjust; whereas
% if a user specifies two h floats together then they can more easily
diff --git a/Master/texmf-dist/source/latex-dev/base/ltspace.dtx b/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
index 1dbfefc7b1d..a77314b1bd1 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltspace.dtx
@@ -32,7 +32,7 @@
%<*driver>
% \fi
\ProvidesFile{ltspace.dtx}
- [2023/03/22 v1.3p LaTeX Kernel (spacing)]
+ [2023/05/26 v1.3p LaTeX Kernel (spacing)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltspace.dtx}
@@ -94,6 +94,7 @@
% inhibits page breaking most places by setting the
% following penalties to 10000:\\
% |\interlinepenalty|\\
+% |\predisplaypenalty|\\
% |\postdisplaypenalty|\\
% |\interdisplaylinepenalty|\\
% |\@beginparpenalty|\\
diff --git a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
index beed347903a..5b124febd9e 100644
--- a/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
+++ b/Master/texmf-dist/source/latex-dev/base/ltvers.dtx
@@ -112,10 +112,10 @@
%</2ekernel>
%<latexrelease>\edef\latexreleaseversion
%<*2ekernel|latexrelease>
- {2023-06-01}
+ {2023-11-01}
%</2ekernel|latexrelease>
%<*2ekernel>
-\def\patch@level{-3}
+\def\patch@level{-0}
% \end{macrocode}
%
% \begin{macro}{\development@branch@name}
diff --git a/Master/texmf-dist/source/latex-dev/graphics/color.dtx b/Master/texmf-dist/source/latex-dev/graphics/color.dtx
index cf3a7efbcf0..bd379714707 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/color.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/color.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% color.dtx Copyright (C) 1994--1999 David Carlisle
-%% Copyright (C) 2005-2022 LaTeX Project
+%% Copyright (C) 2005-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/drivers.dtx b/Master/texmf-dist/source/latex-dev/graphics/drivers.dtx
index e1c19e0296f..19fa2013db8 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/drivers.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/drivers.dtx
@@ -3,7 +3,7 @@
%
%% drivers.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
%% Copyright (C) 1995 1996 1997 1998 1999 David Carlisle
-%% Copyright (C) 2000-2022 LaTeX Project
+%% Copyright (C) 2000-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/epsfig.dtx b/Master/texmf-dist/source/latex-dev/graphics/epsfig.dtx
index b8927f2da55..8a9911c9650 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/epsfig.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/epsfig.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% epsfig.dtx Copyright (C) 1994-1996 1999 Sebastian Rahtz
-%% Copyright (C) 2000-2022 LaTeX Project
+%% Copyright (C) 2000-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/graphics.dtx b/Master/texmf-dist/source/latex-dev/graphics/graphics.dtx
index 92b3c8f335a..d40c70a0340 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/graphics.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/graphics.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphics.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995-2022 LaTeX Project
+%% Copyright (C) 1995-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/graphicx.dtx b/Master/texmf-dist/source/latex-dev/graphics/graphicx.dtx
index 8c200915859..3bce2bdcf06 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/graphicx.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/graphicx.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% graphicx.dtx Copyright (C) 1994 David Carlisle Sebastian Rahtz
-%% Copyright (C) 1995-2022 LaTeX Project
+%% Copyright (C) 1995-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/keyval.dtx b/Master/texmf-dist/source/latex-dev/graphics/keyval.dtx
index 9fce6267e06..6e710a78f92 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/keyval.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/keyval.dtx
@@ -1,7 +1,7 @@
%
% \iffalse
%% keyval.dtx Copyright (C) 1993 1994 1995 1997 1998 1999 David Carlisle
-%% Copyright (C) 2000-2022 David Carlisle, LaTeX Project
+%% Copyright (C) 2000-2023 David Carlisle, LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/lscape.dtx b/Master/texmf-dist/source/latex-dev/graphics/lscape.dtx
index d173af6468a..c30a9f8dbd0 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/lscape.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/lscape.dtx
@@ -2,7 +2,7 @@
% \iffalse
%
%% lscape.dtx Copyright (C) 1994 1999-2000 David Carlisle
-%% Copyright (C) 2000-2022 LaTeX Project
+%% Copyright (C) 2000-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/rotating.dtx b/Master/texmf-dist/source/latex-dev/graphics/rotating.dtx
index ac64086082a..4aefc71156d 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/rotating.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/rotating.dtx
@@ -5,7 +5,7 @@
% File: rotating.dtx
%% Copyright (C) 1995-1999 Sebastian Rahtz and Leonor Barroca
%% Copyright (C) 2001-2003,2007-2009 Robin Fairbairns
-%% Copyright (C) 2016-2022 LaTeX Project
+%% Copyright (C) 2016-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%
diff --git a/Master/texmf-dist/source/latex-dev/graphics/trig.dtx b/Master/texmf-dist/source/latex-dev/graphics/trig.dtx
index 4b673494aff..7e80931d2a0 100644
--- a/Master/texmf-dist/source/latex-dev/graphics/trig.dtx
+++ b/Master/texmf-dist/source/latex-dev/graphics/trig.dtx
@@ -1,6 +1,6 @@
% \iffalse
%% File: trig.dtx Copyright (C) 1993-1999 David Carlisle
-%% Copyright (C) 2000-2022 LaTeX Project
+%% Copyright (C) 2000-2023 LaTeX Project
%% The LaTeX Project and any individual authors listed elsewhere
%% in this file.
%%
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx
index eb99fbd3a9d..0dccdd87cb5 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/documentmetadata-support.dtx
@@ -18,8 +18,8 @@
% for those people who are interested or want to report an issue.
%
% \begin{macrocode}
-\def\documentmetadatasupportversion{1.0c}
-\def\documentmetadatasupportdate{2023-01-07}
+\def\documentmetadatasupportversion{1.0d}
+\def\documentmetadatasupportdate{2023-06-07}
% \end{macrocode}
%
%
@@ -132,7 +132,9 @@
% it is also possible to use the values
% |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1| for
% a PDF/X and PDF/UA standard. These keys currently set \emph{only} the relevant
-% XMP-metadata.
+% XMP-metadata. In version 0.95z support for |UA-2| has been added but
+% note that |UA-2| hasn't been released yet. It should be used only together
+% with pdf version 2.0.
%
% |pdfstandard| can be used more than once to set overlapping standards, e.g:\\
% |pdfstandard=A-2b,pdfstandard=X-4,pdfstandard=UA-1|
@@ -159,11 +161,18 @@
% |\tagpdfsetup{activate,interwordspace}|. This phase
% is frozen.
% \item[\texttt{phase-II}]
-% This is the current development phase.
-% Currently it differs from \texttt{phase-I} only in one point: It will
+% It differs from \texttt{phase-I} only in one point: It will
% additionally activate tagging of paragraphs with
% |\tagpdfsetup{paratagging}|. In the upcoming months it will
% also enable automatic tagging of other basic document elements.
+% \item[\texttt{phase-III}]
+% This is the current development phase.
+% It differs from \texttt{phase-II} \emph{a lot}: It will
+% load new code for the tagging of lists, sectioning commands,
+% table of contents and similar lists, graphics, minipages and floats.
+% As it redefines many internals it is currently restricted to the use of
+% standard classes (article, report, and book)
+% and it supports only a limited number of add-on packages.
% \item[\texttt{new-or-1}] This patches a few commands related
% to the output routine. The patches are needed for the tagging
% of paragraphs, for the tagging of header and footer and
@@ -188,6 +197,10 @@
% \item[\texttt{firstaidoff}] This accepts a comma lists of keywords and disables the patches
% related to them. More information can be found in the documentation of
% \pkg{pdfmanagement-firstaid}.
+% \item[\texttt{xmp-export}] This will export the XMP-metadata to a file \verb+\jobname.xmpi+.
+% with \texttt{debug=\{xmp-export=filename\}} the file name can be changed.
+% More information can be found in the documentation of \pkg{l3pdfmeta} of the \pkg{pdfmanagement-testphase}
+% bundle.
% \end{description}
% \end{description}
%
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-bib.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-bib.dtx
index 20332d1c9e6..9a5ee81720d 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-bib.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-bib.dtx
@@ -31,7 +31,7 @@
% Changes and additions to the kernel related to tagging and links in citations and
% bibliography entries}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{Version 0.80 2023-05-10}
+% \date{Version 0.81 2023-06-07}
%
% \maketitle
%
@@ -50,15 +50,15 @@
% The followings contains small changes to improve tagging of
% bibliography entries and citations.
%
-% The tagging of the bibliography is actually quite straightforward:
-% A bibliography is typically a list with a heading and the sec and block tagging
-% code handles that.
+% The tagging of the standard bibliography is actually quite straightforward:
+% A bibliography is typically a list with a heading and the code which tags sectioning
+% commands and lists handles that.
%
% There are here only two problems:
%
% \begin{itemize}
% \item The structure number of the \texttt{LI} element
-% create by a \cs{bibitem} must be recorded somehow to allow to reference it in
+% created by a \cs{bibitem} must be recorded somehow to allow to reference it in
% a \cs{cite}.
% \item \pkg{hyperref} redefines the item command and so breaks the list structure
% see \url{https://github.com/latex3/latex2e/discussions/1010#discussioncomment-5565418}
@@ -72,13 +72,55 @@
% item in the bibliography. For simple citations like
% \enquote{[1]} or \enquote{Doody (2023)} this is easy, but it is not obvious how
% to handle combined citations like \enquote{Doody (2003,2018)} (or even compressed citations
-% like \enquote{[1-3]}). The implementation follows here the links: whatever hyperref would
+% like \enquote{[1-3]}). The current implementation follows the links: whatever hyperref would
% link is set as the reference.
%
-% An additional problem are the various packages trying to improve citation commands
-% which all should be checked. Currently only natbib has been tried.
+% There exist various packages which over the years tried to improve and extend
+% the bibliography commands. We discuss here three: natbib, chapterbib and biblatex.
%
-% The biblatex package isn't handled yet.
+% \begin{description}
+% \item[natbib] It is rather easy to support natbib: it has hooks for links and the tagging code
+% can follow. Only a bit coordination with hyperref is needed to avoid that hyperref
+% remove the tagging code again.
+%
+% \item[chapterbib] In standard LaTeX every bib entry has an unique label which points to the
+% (mandatory and unique) bibliography and the target created by hyperref
+% has the simple form \texttt{cite.}\meta{key}.
+% If a package that support multiple bibliographies is used (e.g. chapterbib)
+% this is no longer works: a bib entry \texttt{doody}
+% can in one chapter get the label \enquote{[1]}
+% and in the other \enquote{[5]} or even \enquote{Doo19} and naturally links
+% should jump to the relevant chapter bibliography. chapterbib solves this
+% by creating bib keys with a suffix: when reading the \texttt{.aux} files it will
+% create the keys \texttt{doody@-1} and \texttt{doody@-2} where the number is related
+% to the chapter/include, and in the document and in the document \verb+\cite{doody}+
+% will look for \texttt{doody@-1} and \texttt{doody@-2} depending on the number of the
+% current include. For some unknown reason chapterbib uses two commands
+% to handle the suffix: the command \cs{@extra@binfo} is written to the aux-files
+% and used when processing the \cs{bibcite} commands,
+% but in the document \cs{@extra@b@citeb} is used. Supporting this is
+% straightforward: one only has to take care that the tagging code uses
+% \cs{@extra@b@citeb} in the relevant places too.
+%
+% \item[biblatex] biblatex supports multiple bibliographies out-of-the-box.
+% It numbers the link target by refsection and uses then the name
+% \verb+\the\c@refsection @+\meta{key}.
+%
+% Printing a bibliography is not required, in this case you get an engine warning
+% and links jump to the begin of the document:
+% \begin{verbatim}
+% name{cite.0@doody} has been referenced but does not exist
+% \end{verbatim}
+%
+% Bibliographies can be printed more than once by refsection. To avoid duplicated
+% target, biblatex stores the names of the targets in a list and if later
+% it detects that a target name has already been used in a
+% bibliography no new target is created for this item. This means a citation
+% will normally jump to the first bibliography which shows the entry.
+%
+% The tagging code has to mimic this code. This means that it can't label every item,
+% but has to test if this anchor is already known.
+% \end{description}
%
%
% \section{Implementation}
@@ -110,36 +152,38 @@
% \end{macrocode}
% \end{macro}
%
-% \begin{variable}{\l_@@_bib_target_tl}
-% Items should add a target, to avoid that user code
-% interferes we don't rely on \cs{@currentHref}
+% \begin{variable}{\l_@@_bib_citekey_tl}
+% We can't pass the cite key everywhere as argument so we store it:
% \begin{macrocode}
-\tl_new:N\l_@@_bib_target_tl
+\tl_new:N\l_@@_bib_citekey_tl
% \end{macrocode}
% \end{variable}
-
+%
%\subsection{Handling the bibliography}
-% \begin{macro}{\lbibitem}
-% The item command if an optional argument is use.
+% \begin{macro}{\@lbibitem}
+% The item command if an optional argument is used.
%
% We only prepend some code.
-% If we had already generic hooks with arguments
-% we could probably use them \ldots
% \begin{macrocode}
-\def\@lbibitem[#1]#2{%
-% \end{macrocode}
-% we store the target name for the following code.
-% \begin{macrocode}
- \tl_set:Nx\l_@@_bib_target_tl{cite.#2\@extra@b@citeb}
-% \end{macrocode}
-% The target is added at the begin of the paragraph.
-% \begin{macrocode}
- \AddToHookNext{para/begin}{\makebox[0pt][r]{\MakeLinkTarget*{\l_@@_bib_target_tl}\hspace{\leftmargin}}}
- \item[\@biblabel{#1}\hfill]\if@filesw
- {\let\protect\noexpand
- \immediate
- \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces}
+\AddToHookWithArguments{cmd/@lbibitem/before}
+ {
+% \end{macrocode}
+% we store the target name for the label.
+% \begin{macrocode}
+ \tl_set:Nn\l_@@_bib_citekey_tl{#2}
+ }
% \end{macrocode}
+% The target is added at the begin of the paragraph. We give that a label as
+% it perhaps need to be removed by packages
+% \begin{macrocode}
+\AddToHookWithArguments{cmd/@lbibitem/before}[latex-lab-testphase-bib/target]
+ {
+ \AddToHookNext{para/begin}
+ {
+ \makebox[0pt][r]{\MakeLinkTarget*{cite.#2\@extra@b@citeb}\hspace{\leftmargin}}
+ }
+ }
+% \end{macrocode}
% we make a copy to be able to reinstate the definition. This is e.g.
% currently needed with hyperref.
% \begin{macrocode}
@@ -148,26 +192,49 @@
% \end{macro}
%
% \begin{macro}{\@bibitem}
-% Similar for bibitem.
+% Similar for \cs{@bibitem}.
% TODO: If hyperref is loaded we will get a second target from the refstepcounter,
% but this is ignored for now.
% \begin{macrocode}
-\def\@bibitem#1{
- \tl_set:Nx\l_@@_bib_target_tl{cite.#1\@extra@b@citeb}%
- \AddToHookNext{para/begin}{\makebox[0pt][r]{\MakeLinkTarget*{\l_@@_bib_target_tl}\hspace{\leftmargin}}}
- \item\if@filesw \immediate\write\@auxout
- {\string\bibcite{#1}{\the\value{\@listctr}}}\fi\ignorespaces}
+\AddToHookWithArguments{cmd/@bibitem/before}
+ {
+% \end{macrocode}
+% we store the target name for the label.
+% \begin{macrocode}
+ \tl_set:Nn\l_@@_bib_citekey_tl{#1}
+ }
+% \end{macrocode}
+%
+% The target is added at the begin of the paragraph. We give that a label as
+% it perhaps need to be removed by packages
+% \begin{macrocode}
+\AddToHookWithArguments{cmd/@bibitem/before}[latex-lab-testphase-bib/target]
+ {
+ \AddToHookNext{para/begin}
+ {
+ \makebox[0pt][r]{\MakeLinkTarget*{cite.#1\@extra@b@citeb}\hspace{\leftmargin}}
+ }
+ }
+% \end{macrocode}
+% \begin{macrocode}
\let\@kernel@copy@bibitem\@bibitem
% \end{macrocode}
% \end{macro}
%
% TODO The LI-structure should set a label, we redefine the internal command locally for
-% now, but perhaps this need a receipe?
+% now, but perhaps this need a recipe?
%
% \begin{macrocode}
\AddToHook{env/thebibliography/begin}
- {\cs_set:Npn \__block_list_item_begin:
- { \tagstructbegin{tag=\LItag,label=\l_@@_bib_target_tl}}
+ {
+ \cs_set:Npn \__block_list_item_begin:
+ {
+ \tag_struct_begin:n
+ {
+ tag=\LItag,
+ label= cite.\l_@@_bib_citekey_tl\@extra@b@citeb
+ }
+ }
}
% \end{macrocode}
%
@@ -176,7 +243,7 @@
% structure. Even if it looks a bit odd it is now used for many years and so
% hopefully compatible with various packages. But differently to hyperref we use
% the new hooks with arguments.
-% TODO: consider name. Perhaps use the generic names?
+% TODO: consider hook name.
% \begin{macrocode}
\NewMirroredHookPairWithArguments{bibcite/before}{bibcite/after}{2}
\def\bibcite#1#2{%
@@ -189,7 +256,8 @@
\let\@kernel@copy@bibcite\bibcite
% \end{macrocode}
% Now we add the tagging structure.
-% TODO: the ref key should expand its argument directly!
+% TODO: with the next tagpdf version it should no longer be
+% needed to exand the ref key.
% \begin{macrocode}
\AddToHookWithArguments{bibcite/before}
{
@@ -208,126 +276,121 @@
% this can be changed with a rule.
% \begin{macrocode}
\AddToHook{package/hyperref/after}
- {
+ {
+ \AddToHookWithArguments{bibcite/before}
+ {
+ \hyper@linkstart{cite}{cite.#1\@extra@b@citeb}
+ }
+ \AddToHookWithArguments{bibcite/after}{\hyper@linkend}
+ }
% \end{macrocode}
-% the next hyperref will allow to suppress the bib patches, but with older
-% versions we muss reinstated them.
+%
+% \subsection{Natbib and biblatex support}
+% When hyperref is loaded, both natbib and biblatex use \cs{hyper@natlinkstart}
+% and \cs{hyper@natlinkend} to handle the links. We can use the generic hooks to
+% add the tagging code (and the link code from hyperref).
+% We need in part different code for both systems:
+% with biblatex we have to take care that only the first
+% structure sets a label, and if
+% hyperref is not loaded (or deactived) we will need additional code
+% but this currently doesn't exist.
+% We assume that no document loads both package -- that will probably break.
% \begin{macrocode}
- \@ifpackagelater{hyperref}{2023-05-01}{}
- {
- \@ifpackageloaded{natbib}{}
- {\let\@lbibitem\@kernel@copy@lbibitem
- \let\@bibitem\@kernel@copy@bibitem
- \let\bibcite\@kernel@copy@bibcite}
- }
- \AddToHookWithArguments{bibcite/before}{\hyper@linkstart{cite}{cite.#1\@extra@b@citeb}}
- \AddToHookWithArguments{bibcite/after}{\hyper@linkend}
- }
+\newcommand\hyper@natlinkstart[1]{}
+\newcommand\hyper@natlinkend{}
% \end{macrocode}
-%
-% \subsection{Natbib support}
-% natbib offers various hooks that can be used. The main problem is
-% to coordinate with the hyperref use of the same hooks.
-% We also have to add something at the begin of \cs{@lbibitem}.
-% As generic hooks with arguments aren't available yet, we have to copy the definition
-%
+% With natbib we need to change the hooks to avoid duplicated target as it sets
+% the anchor too. We can not simply empty \cs{hyper@natanchorstart} as that is
+% used by biblatex.
% \begin{macrocode}
\AddToHook{package/natbib/after}
- {
- \def\hyper@natanchorstart#1{\MakeLinkTarget*{#1}}
- \def\@lbibitem[#1]#2{%
- \tl_set:Nx\l__tag_bib_target_tl{cite.#2\@extra@b@citeb}
- \if\relax\@extra@b@citeb\relax\else
- \@ifundefined{br@#2\@extra@b@citeb}{}{%
- \@namedef{br@#2}{\@nameuse{br@#2\@extra@b@citeb}}%
- }%
- \fi
- \@ifundefined{b@#2\@extra@b@citeb}{%
- \def\NAT@num{}%
- }{%
- \NAT@parse{#2}%
- }%
- \def\NAT@tmp{#1}%
- \expandafter\let\expandafter\bibitemOpen\csname NAT@b@open@#2\endcsname
- \expandafter\let\expandafter\bibitemShut\csname NAT@b@shut@#2\endcsname
- \@ifnum{\NAT@merge>\@ne}{%
- \NAT@bibitem@first@sw{%
- \@firstoftwo
- }{%
- \@ifundefined{NAT@b*@#2}{%
- \@firstoftwo
- }{%
- \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}%
- \@secondoftwo
- }%
- }%
- }{%
- \@firstoftwo
- }%
- {%
- \global\advance\c@NAT@ctr\@ne
- \@ifx{\NAT@tmp\@empty}{\@firstoftwo}{%
- \@secondoftwo
- }%
- {%
- \expandafter\def\expandafter\NAT@num\expandafter{\the\c@NAT@ctr}%
- \global\NAT@stdbsttrue
- }{}%
- \bibitem@fin
- \item[\hfil\NAT@anchor{#2}{\NAT@num}]%
- \global\let\NAT@bibitem@first@sw\@secondoftwo
- \NAT@bibitem@init
- }%
- {%
- \NAT@anchor{#2}{}%
- \NAT@bibitem@cont
- \bibitem@fin
- }%
- \@ifx{\NAT@tmp\@empty}{%
- \NAT@wrout{\the\c@NAT@ctr}{}{}{}{#2}%
- }{%
- \expandafter\NAT@ifcmd\NAT@tmp(@)(@)\@nil{#2}%
- }%
- }%
+ {
+ \RemoveFromHook{cmd/@bibitem/before} [latex-lab-testphase-bib/target]
+ \RemoveFromHook{cmd/@lbibitem/before}[latex-lab-testphase-bib/target]
+ }
% \end{macrocode}
-% we redefine the hook to use latex hooks.
+% This can be shared by both packages: it will work with natbib with and without hyperref.
+% With biblatex it will work without hyperref as long as \cs{@extra@b@citeb} is empty
% \begin{macrocode}
- \NewMirroredHookPairWithArguments{natbib/linkstart}{natbib/linkend}{1}
- \renewcommand\hyper@natlinkstart[1]{\UseHookWithArguments{natbib/linkstart}{1}{#1}}
- \renewcommand\hyper@natlinkend{\UseHookWithArguments{natbib/linkend}{1}{}}
- \AddToHookWithArguments{natbib/linkstart}
- {
- \leavevmode
- \tag_mc_end_push:
- \exp_args:Nx\tagstructbegin{tag=Reference,ref=cite.#1\@extra@b@citeb}
- \tagmcbegin{}
- }
- \AddToHook{natbib/linkend}
- {
- \tag_mc_end:
- \tagstructend
- \tag_mc_begin_pop:n{}
- }
- }
+\AddToHookWithArguments{cmd/hyper@natlinkstart/before}
+ {
+ \leavevmode
+ \tag_mc_end_push:
+ \exp_args:Nx\tag_struct_begin:n{tag=Reference,ref=cite.#1\@extra@b@citeb}
+ \tag_mc_begin:n{}
+ }
+\AddToHook{cmd/hyper@natlinkend/after}
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+
% \end{macrocode}
-% if hyperref is loaded we have to repeat the definition
+% if hyperref is loaded we have to revert its definition of the natbib hooks
+% and add its code through the generic hooks.
+% TODO: allow to suppress the natbib code in hyperref.
%
% \begin{macrocode}
\AddToHook{package/hyperref/after}
- {
- \renewcommand\hyper@natlinkstart[1]{\UseHookWithArguments{natbib/linkstart}{1}{#1}}
- \renewcommand\hyper@natlinkend{\UseHookWithArguments{natbib/linkend}{1}{}}
- \AddToHookWithArguments{natbib/linkstart}
+ {
+ \renewcommand\hyper@natlinkstart[1]{}
+ \renewcommand\hyper@natlinkend{}
+ \AddToHookWithArguments{cmd/hyper@natlinkstart/before}
{
- \Hy@backout{#1}%
- \hyper@linkstart{cite}{cite.#1}%
- \def\hyper@nat@current{#1}
+ \Hy@backout{#1}%
+% \end{macrocode}
+% natbib passes the \cs{@extra@b@citeb} in the argument, and biblatex
+% the refsection, so we only need to add the prefix \texttt{cite.}.
+% \begin{macrocode}
+ \hyper@linkstart{cite}{cite.#1}%
+ \def\hyper@nat@current{#1}
}
- \AddToHook{natbib/linkend}
+ \AddToHook{cmd/hyper@natlinkend/after}
{
- \hyper@linkend
+ \hyper@linkend
}
- }
+ }
+
+% \end{macrocode}
+% and now special biblatex code. The list item code has to test if the
+% anchor is already known:
+% \begin{macrocode}
+\AddToHook{cmd/blx@bibinit/after}
+ {
+ \cs_set:Npn \__block_list_item_begin:
+ {
+ \xifinlist{\the\c@refsection @\abx@field@entrykey}{\blx@anchors}
+ {
+ \tag_struct_begin:n
+ {
+ tag=\LItag,
+ }
+ }
+ {
+ \tag_struct_begin:n
+ {
+ tag=\LItag,
+ label= cite.\the\c@refsection @\abx@field@entrykey
+ }
+ }
+ }
+ }
+% \end{macrocode}
+% biblatex without hyperref is currently not supported but we at least avoid that it
+% errors:
+% \begin{macrocode}
+\AddToHook{package/biblatex/after}
+ {
+ \appto\blx@mknohyperref
+ {
+ \let\blx@anchors\@empty
+ \protected\def\blx@anchor{%
+ \xifinlist{\the\c@refsection @\abx@field@entrykey}{\blx@anchors}
+ {}
+ {\listxadd\blx@anchors{\the\c@refsection @\abx@field@entrykey}}}%
+ }
+ }
% \end{macrocode}
% \begin{macrocode}
%</package>
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block-tagging.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block-tagging.dtx
index 124c51163cc..63145d929e9 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block-tagging.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-block-tagging.dtx
@@ -26,8 +26,8 @@
% \fi
%
-\def\ltblocksversion{v0.8c}
-\def\ltblocksdate{2023/05/16}
+\def\ltblocksversion{v0.8d}
+\def\ltblocksdate{2023/06/07}
%
% \title{Prototype reimplementation of \LaTeXe{}'s block environments using templates}
@@ -1346,23 +1346,26 @@
% will help with the transion. But instead of using a
% \env{trivlist} we use a blockenv and some tagging for the title
% (as a Caption).
-%
+% We do not want potential tagging from \cs{textbf} here,
+% so we use \cs{bfseries} to set the font.
% \begin{macrocode}
\def\@begintheorem#1#2{
\UseInstance{blockenv}{theorem}{}
\tagpdfparaOff
- \textbf{
- \tag_struct_begin:n{tag=Caption}
+ \mode_leave_vertical:
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
\tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
#2
- \tag_mc_end:
- \tag_struct_end:
- \tag_struct_end:
- }
+ \tag_mc_end:
+ \tag_struct_end:
+ \group_end:
+ \tag_struct_end:
\tagpdfparaOn
% \end{macrocode}
%
@@ -1378,21 +1381,23 @@
\def\@opargbegintheorem#1#2#3{
\UseInstance{blockenv}{theorem}{}
\tagpdfparaOff
- \textbf{
- \tag_struct_begin:n{tag=Caption}
- \tag_mc_begin:n {}
- #1\
- \tag_mc_end:
- \tag_struct_begin:n{tag=Lbl}
- \tag_mc_begin:n {}
- #2
- \tag_mc_end:
- \tag_struct_end:
- \tag_mc_begin:n {}
- \ (#3)
- \tag_mc_end:
- \tag_struct_end:
- }
+ \mode_leave_vertical:
+ \tag_struct_begin:n{tag=Caption}
+ \group_begin:
+ \bfseries
+ \tag_mc_begin:n {}
+ #1\
+ \tag_mc_end:
+ \tag_struct_begin:n{tag=Lbl}
+ \tag_mc_begin:n {}
+ #2
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin:n {}
+ \ (#3)
+ \tag_mc_end:
+ \group_end:
+ \tag_struct_end:
\tagpdfparaOn
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
new file mode 100644
index 00000000000..8f474e6b121
--- /dev/null
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-firstaid.dtx
@@ -0,0 +1,147 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-firstaid.dtx (C) Copyright 2023 LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-firstaid.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+% \title{The \textsf{latex-lab-firstaid} package\\
+% Temporary patches to external packages}
+% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
+% \date{Version 0.80 2023-06-04}
+%
+% \maketitle
+%
+% \newcommand{\xt}[1]{\textsl{\textsf{#1}}}
+% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}}
+% \newcommand{\docclass}{document class \marginpar{\raggedright document class
+% customizations}}
+%
+% \providecommand\hook[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% The followings contains small temporary changes to external packages to avoid
+% errors with the new tagging code.
+%
+% Similar to the main firstaid package the goal is to remove the
+% patches once the packages have been updated.
+
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+%<@@=tag>
+% \end{macrocode}
+% \begin{macrocode}
+\ProvidesPackage {latex-lab-testphase-firstaid} [2023-06-04 v0.8
+ Temporary patches to external packages need for the tagging project]
+% \end{macrocode}
+
+% \subsection{blindtext}
+% The blindtext package generates lists with nested \cs{loop} command.
+% The inner loop introduces a group around the list which error when lists are tagged
+% as \cs{@doendpe} is lost.
+% \begin{macrocode}
+\AddToHook{file/blindtext.sty/after}[latex-lab-firstaid]{%
+ \FirstAidNeededT{blindtext}{sty}{\blindfiledate\space\blindfileversion\space%
+ blindtext-Package}%
+ {%
+ \renewcommand{\blind@items}{%
+ \setcounter{blind@listcount}{1}%
+ \loop
+ \ifblind@optional
+ \ifblind@long
+ \item[\blindtext@countitem] \blindtext@text
+ \else
+ \item[\blindtext@count] \blindtext@item
+ \fi
+ \else % \blind@optionalfalse
+ \ifblind@long
+ \item \blindtext@text
+ \else
+ \item \blindtext@countitem
+ \fi
+ \fi % \ifblind@optional
+ {%
+ \loop
+ \ifnum\value{blindlistlevel}>\value{blindlist@level}%
+ \stepcounter{blind@levelcount}%
+ \blind@list[\value{blindlist}]\relax
+ \addtocounter{blind@levelcount}{-1}%
+ \setcounter{blind@listcount}{1}%
+ \repeat
+ \expandafter}\if@endpe\@doendpe\fi % <----------changed
+ \ifnum\value{blind@listcount}<\value{blindlist}%
+ \stepcounter{blind@listcount}%
+ \repeat
+ }
+ }%
+ }
+% \end{macrocode}
+% \subsection{ltugboat}
+% ltugboat need only a redefinition of \cs{l@section} to add the hooks
+% \begin{macrocode}
+\AddToHook{file/ltugboat.cls/after}
+ {
+ \def\l@section#1#2{\addpenalty{\@secpenalty}%
+ \addvspace{\TBtocsectionspace}%
+ \@tempdima 1.5em
+ \begingroup
+ \parindent\z@ \rightskip\z@ % article style makes \rightskip > 0
+ \parfillskip\z@
+ \TBtocsectionfont
+ \leavevmode\advance\leftskip\@tempdima\hskip-\leftskip
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
+ \csname contentsline@text@1@format\endcsname{#1}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
+ \nobreak\hfil
+ \nobreak\hb@xt@\@pnumwidth{\hss
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
+ #2%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
+ }\par
+ \endgroup}
+ }
+% \end{macrocode}
+
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \begin{macrocode}
+%<*latex-lab>
+\ProvidesFile{firstaid-latex-lab-testphase.ltx}
+ [2023-06-04 v0.8 Temporary patches to external packages need for the tagging project]
+
+\RequirePackage{latex-lab-testphase-firstaid}
+
+%</latex-lab>
+% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
index ed8b8390e26..430b2aec96c 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-float.dtx
@@ -31,7 +31,7 @@
% \title{The \textsf{latex-lab-floats} package\\
% Tagging of floats }
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{v0.8 2023-05-17}
+% \date{v0.81 2023-06-07}
%
% \maketitle
%
@@ -142,7 +142,8 @@
%
% \begin{variable}{
% \g_@@_float_sect_prop,
-% \g_@@_float_types_seq
+% \g_@@_float_types_seq,
+% \@current@float@struct
% }
% These variables will hold the structure number for the float container
% and the list of float types. Currently only figure and table are supported
@@ -152,6 +153,7 @@
\seq_new:N \g_@@_float_types_seq
\seq_gput_right:Nn \g_@@_float_types_seq {figure}
\seq_gput_right:Nn \g_@@_float_types_seq {table}
+\tl_new:N\@current@float@struct
% \end{macrocode}
% \end{variable}
%
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx
index 62a8d4c9bf5..5df3803b548 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-sec.dtx
@@ -31,7 +31,7 @@
% \title{The \textsf{latex-lab-sec} package\\
% Changes related to the tagging of sectioning commands}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{v0.82 2023-05-20}
+% \date{v0.83 2023-06-07}
%
% \maketitle
%
@@ -178,7 +178,8 @@
%<*kernelchange>
\ifdefined\directlua
\pdfvariable gentounicode =1
- \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+ \protected\def\pdfglyphtounicode {\pdfextension glyphtounicode }
+ \protected\edef\pdfgentounicode {\pdfvariable gentounicode}
\input{glyphtounicode}
\fi
\ifdefined\pdfglyphtounicode
@@ -593,7 +594,7 @@
%
% \subsection{Sectioning commands based on \cs{@startsection}}
%
-% The tagging of relies again on the para tagging:
+% The tagging relies again on the para tagging:
% we simply exchange the tag name by the one given as \#1.
% This assumes that a tag with the name of the sectioning type is defined.
% We don't try to pass the title, this will be done together with
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-testphase.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-testphase.dtx
index a2fb65ef4a2..ce882030e8f 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-testphase.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-testphase.dtx
@@ -83,12 +83,18 @@
\ProvidesFile{phase-III-latex-lab-testphase.ltx}
[2023-03-06 v0.1a latex-lab wrapper phase-III]
\input{phase-II-latex-lab-testphase.ltx}
-\RequirePackage{latex-lab-testphase-block-tagging}
-\RequirePackage{latex-lab-testphase-sec}
-\RequirePackage{latex-lab-testphase-toc}
-\RequirePackage{latex-lab-testphase-minipage}
-\RequirePackage{latex-lab-testphase-graphic}
-\RequirePackage{latex-lab-testphase-float}
+\IfFormatAtLeastTF{2023-06-01}
+ {
+ \RequirePackage{latex-lab-testphase-block-tagging}
+ \RequirePackage{latex-lab-testphase-sec}
+ \RequirePackage{latex-lab-testphase-toc}
+ \RequirePackage{latex-lab-testphase-minipage}
+ \RequirePackage{latex-lab-testphase-graphic}
+ \RequirePackage{latex-lab-testphase-float}
+ \RequirePackage{latex-lab-testphase-bib}
+ \RequirePackage{latex-lab-testphase-text}
+ }
+ {\PackageWarning{latex-lab}{Testphase III needs newer format}{}}
%</phase-III>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx
new file mode 100644
index 00000000000..0f31c45969e
--- /dev/null
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-text.dtx
@@ -0,0 +1,132 @@
+% \iffalse meta-comment
+%
+%% File: latex-lab-text.dtx (C) Copyright 2023 LaTeX Project
+%
+% It may be distributed and/or modified under the conditions of the
+% LaTeX Project Public License (LPPL), either version 1.3c of this
+% license or (at your option) any later version. The latest version
+% of this license is in the file
+%
+% https://www.latex-project.org/lppl.txt
+%
+%
+% The development version of the bundle can be found below
+%
+% https://github.com/latex3/latex2e/required/latex-lab
+%
+% for those people who are interested or want to report an issue.
+%
+%<*driver>
+\documentclass{l3doc}
+\EnableCrossrefs
+\CodelineIndex
+\begin{document}
+ \DocInput{latex-lab-text.dtx}
+\end{document}
+%</driver>
+%
+% \fi
+%
+% \title{The \textsf{latex-lab-text} package\\
+% Changes and additions to the kernel related to the tagging of various small text commands}
+% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
+% \date{Version 0.80 2023-05-28}
+%
+% \maketitle
+%
+% \newcommand{\xt}[1]{\textsl{\textsf{#1}}}
+% \newcommand{\TODO}[1]{\textbf{[TODO:} #1\textbf{]}}
+% \newcommand{\docclass}{document class \marginpar{\raggedright document class
+% customizations}}
+%
+% \providecommand\hook[1]{\texttt{#1}}
+%
+% \begin{abstract}
+% \end{abstract}
+%
+% \section{Introduction}
+%
+% The followings contains small changes to improve the tagging of
+% (inline) text commands.
+%
+% While the tagging of the \LaTeX{} logo is quite straightforward, tagging of
+% \cs{emph} as \texttt{EM} and \cs{textbf} as \texttt{Strong}
+% can have unwanted side-effect as both tags are inline tags and so not every inner
+% structure is allowed. Probably both commands will need an optional argument or a
+% starred variant which suppress the tagging.
+%
+% \section{Implementation}
+% \begin{macrocode}
+%<*package>
+%<@@=tag>
+% \end{macrocode}
+% \begin{macrocode}
+\ProvidesExplPackage {latex-lab-testphase-text} {2023-05-28} {0.8}
+ {Code related to the tagging of inline text commands}
+% \end{macrocode}
+
+% \subsection{The \LaTeX\ and \TeX\ logo}
+% This uses the generic hooks, so that it catches also other definitions.
+% For \cs{LaTeX} we stop tagging to avoid that the inner \cs{TeX} leads to a double tagging.
+% \begin{macrocode}
+\AddToHook{cmd/LaTeX/before}
+ {
+ \mode_leave_vertical:
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Span,actualtext=LaTeX}
+ \tag_mc_begin:n{}
+ \tag_stop:n{LaTeX}
+ }
+\AddToHook{cmd/LaTeX/after}
+ {
+ \tag_start:n{LaTeX}
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+\AddToHook{cmd/TeX/before}
+ {
+ \mode_leave_vertical:
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Span,actualtext=TeX}
+ \tag_mc_begin:n{}
+ }
+\AddToHook{cmd/TeX/after}
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+% \end{macrocode}
+%
+% \subsection{Emphasizing}
+% We tag \cs{emph} but leave commands like \cs{textbf} alone, as it is not
+% clear if they always have a semantic meaning.
+% \begin{macrocode}
+\AddToHook{cmd/emph/before}
+ {
+ \mode_leave_vertical:
+ \tag_mc_end_push:
+ \tag_struct_begin:n{tag=Em}
+ \tag_mc_begin:n{}
+ }
+
+\AddToHook{cmd/emph/after}
+ {
+ \tag_mc_end:
+ \tag_struct_end:
+ \tag_mc_begin_pop:n{}
+ }
+% \end{macrocode}
+% \begin{macrocode}
+%</package>
+% \end{macrocode}
+% \begin{macrocode}
+%<*latex-lab>
+\ProvidesFile{text-latex-lab-testphase.ltx}
+ [2023-05-28 v0.8 code related to the tagging of bib and citations]
+
+\RequirePackage{latex-lab-testphase-text}
+
+%</latex-lab>
+% \end{macrocode}
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.dtx
index 0b532c6a9bb..186f388a190 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-hyperref-changes.dtx
@@ -29,7 +29,7 @@
% \title{The \textsf{latex-lab-toc-hyperref-changes} package\\
% Changes and additions to hyperref related to toc entries}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{Version 0.82 2023-05-20}
+% \date{Version 0.83 2023-06-07}
%
% \maketitle
%
@@ -71,27 +71,27 @@
\ExplSyntaxOn
\AddToHook{package/hyperref/after}
{
- \AddToHook{contentsline/text/before}[hyp]
+ \AddToHookWithArguments{contentsline/text/before}[hyp]
{
- \tl_if_blank:VF \@contentsline@arg@two%text
+ \tl_if_blank:nF {#2}%text
{
- \tl_if_blank:VF\@contentsline@arg@four%destination
+ \tl_if_blank:nF {#4}%destination
{
\int_case:nnF {\Hy@linktoc}
{
{0}{} %none
- {1}{\hyper@linkstart{link}{\@contentsline@arg@four}} %section
+ {1}{\hyper@linkstart{link}{#4}} %section
{2}{} %page
}
- {\hyper@linkstart{link}{\@contentsline@arg@four}} %all
+ {\hyper@linkstart{link}{#4}} %all
}
}
}
- \AddToHook{contentsline/text/after}[hyp]
+ \AddToHookWithArguments{contentsline/text/after}[hyp]
{
- \tl_if_blank:VF \@contentsline@arg@two
+ \tl_if_blank:nF {#2}
{
- \tl_if_blank:VF\@contentsline@arg@four
+ \tl_if_blank:nF {#4}
{
\int_case:nnF {\Hy@linktoc}
{
@@ -104,27 +104,27 @@
}
}
- \AddToHook{contentsline/page/before}[hyp]
+ \AddToHookWithArguments{contentsline/page/before}[hyp]
{
- \tl_if_blank:VF \@contentsline@arg@three
+ \tl_if_blank:nF {#3}
{
- \tl_if_blank:VF\@contentsline@arg@two
+ \tl_if_blank:nF {#4} %
{
\int_case:nnF {\Hy@linktoc}
{
{0}{} %none
{1}{} %section
- {2}{\hyper@linkstart{link}{\@contentsline@arg@four}} %page
+ {2}{\hyper@linkstart{link}{#4}} %page
}
- {\hyper@linkstart{link}{\@contentsline@arg@four}} %all
+ {\hyper@linkstart{link}{#4}} %all
} % none
}
}
- \AddToHook{contentsline/page/after}[hyp]
+ \AddToHookWithArguments{contentsline/page/after}[hyp]
{
- \tl_if_blank:VF \@contentsline@arg@three
+ \tl_if_blank:nF {#3}
{
- \tl_if_blank:VF\@contentsline@arg@four
+ \tl_if_blank:nF {#4}
{
\int_case:nnF {\Hy@linktoc}
{
@@ -136,13 +136,12 @@
} % none
}
}
- \AddToHook{cmd/addcontentsline/before}[hyp]
+ \AddToHookWithArguments{cmd/addcontentsline/before}[hyp]
{%
- \ExpandArgs{ooo}
\Hy@addcontentsline@addbookmark
- {\addcontentsline@arg@one}
- {\addcontentsline@arg@two}
- {\addcontentsline@arg@three}%
+ {#1}
+ {#2}
+ {#3}%
}
}
\ExplSyntaxOff
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx
index 3a46b453e5e..1c1ce7f44e1 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab-toc-kernel-changes.dtx
@@ -30,7 +30,7 @@
% \title{The \textsf{latex-lab-toc-kernel-changes} package\\
% Changes and additions to the kernel related to tagging and links in toc entries}
% \author{\LaTeX{} Project\thanks{Initial implementation done by Ulrike Fischer}}
-% \date{Version 0.82 2023-05-20}
+% \date{Version 0.83 2023-06-07}
%
% \maketitle
%
@@ -158,18 +158,16 @@
% \begin{macrocode}
\def\@contentsline@cfgpoint@before#1#2#3#4{}
\def\@contentsline@cfgpoint@after#1#2#3#4{}
-\def\@contentsline@arg@one{}%level
-\def\@contentsline@arg@two{}%text
-\def\@contentsline@arg@three{}%page
-\def\@contentsline@arg@four{}%destination
+% \end{macrocode}
+% for the hooks we need that the \cs{l@XX} pass also the destination and
+% that \cs{l@XX} takes three arguments.
+% TODO: test that, if there are two many problems we should pass the
+% destination through a command name ...
+% \begin{macrocode}
\def\contentsline#1#2#3#4%
{%
- \def\@contentsline@arg@one{#1}%level
- \def\@contentsline@arg@two{#2}%text
- \def\@contentsline@arg@three{#3}%page
- \def\@contentsline@arg@four{#4}%destination
\@contentsline@cfgpoint@before{#1}{#2}{#3}{#4}%
- %\gdef\@contentsline@destination{#4}%
+ \gdef\@contentsline@destination{#4}%
\csname l@#1\endcsname{#2}{#3}%
\@contentsline@cfgpoint@after{#1}{#2}{#3}{#4}%
}
@@ -180,16 +178,11 @@
%
% \cs{addcontentsline} should always write the unique counter representation
% \cs{@currentHref} so that we can create the |/Ref| key. At the same time
-% we need a hook, so that hyperref can add its bookmarks code. The generic hook
-% would be ok, but we need the arguments, so we store them first.
+% we need a hook, so that hyperref can add its bookmarks code, the generic hook
+% with arguments is ok.
%
% \begin{macrocode}
-\NewHook{cmd/addcontentsline/before}
-\def\addcontentsline#1#2#3{% toc extension, type, tag
- \def\addcontentsline@arg@one{#1}% name??
- \def\addcontentsline@arg@two{#2}%
- \def\addcontentsline@arg@three{#3}%
- \UseHook{cmd/addcontentsline/before}%
+\def\addcontentsline#1#2#3{% #1=toc extension, #2= heading type, tag
\addtocontents{#1}{%
\protect\contentsline{#2}{#3}{\thepage}{\@currentHref}\protected@file@percent
}}
@@ -227,10 +220,19 @@
% The text and the page
% hooks are used in manual \cs{l@xx} commands and in \cs{l@xx} defined by
% \cs{@dottedtocline} or by other means.
+% The arguments of the following hooks are:
+% \begin{itemize}
+% \item[\#1] level as a \emph{number} (integer expression), see above for the standard
+% numbering. The standard first argument of \cs{contentsline} is not used, as
+% \cs{@dottedtocline} knows only a number.
+% \item[\#2] content (the second argument of a \cs{contentsline}
+% \item[\#3] page (the third argument of a \cs{contentsline}
+% \item[\#3] target (the fourth argument of a \cs{contentsline}
+% \end{itemize}
% \begin{macrocode}
-\NewMirroredHookPair{contentsline/number/before}{contentsline/number/after}%
-\NewMirroredHookPair{contentsline/text/before}{contentsline/text/after}%
-\NewMirroredHookPair{contentsline/page/before}{contentsline/page/after}%
+\NewMirroredHookPairWithArguments{contentsline/number/before}{contentsline/number/after}{1}%
+\NewMirroredHookPairWithArguments{contentsline/text/before}{contentsline/text/after}{4}%
+\NewMirroredHookPairWithArguments{contentsline/page/before}{contentsline/page/after}{4}%
% \end{macrocode}
%
% The dot in the leader must be set as artifact.
@@ -238,6 +240,7 @@
% So we need a config point.
%
% \cs{@dottedtocline} needs hooks and formatting commands.
+% We add a sixth argument so that it can grab the destination too.
% \begin{macrocode}
\def\@dottedtocline@cfgpoint@leaders#1{#1}
@@ -250,9 +253,9 @@
\leavevmode
\@tempdima #3\relax
\advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}{#1}{#4}{#5}{\@contentsline@destination}%
\csname contentsline@text@#1@format\endcsname{#4}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}{#1}{#4}{#5}{\@contentsline@destination}%
\nobreak
\@dottedtocline@cfgpoint@leaders{%
\leaders\hbox{$\m@th
@@ -260,9 +263,9 @@
mu$}\hfill}%
\nobreak
\hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}{#1}{#4}{#5}{\@contentsline@destination}%
#5%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}{#1}{#4}{#5}{\@contentsline@destination}%
\kern-\p@\kern\p@}%
\par}%
\fi}
@@ -273,19 +276,21 @@
% Inside or outside the box?
% \begin{macrocode}
\def\numberline#1{\hb@xt@\@tempdima{%
- \UseHook{contentsline/number/before}%
+ \UseHookWithArguments{contentsline/number/before}{1}{#1}%
#1\hfil
- \UseHook{contentsline/number/after}%
+ \UseHookWithArguments{contentsline/number/after}{1}{#1}%
}}
% \end{macrocode}
%
% \subsubsection{\cs{l@xx} in the classes}
% Depending on the class we have to redefine also more commands
% For other classes it should be documented what is needed.
+% Let the commands grab also the third arguments. If a class redefines them again
+% it will break tagging anyway.
% \begin{macrocode}
\AddToHook{class/article/after}
{
- \renewcommand*\l@part[2]{%
+ \renewcommand*\l@part[2]{% as in contentsline: content, page
\ifnum \c@tocdepth >-2\relax
\addpenalty\@secpenalty
\addvspace{2.25em \@plus\p@}%
@@ -295,14 +300,18 @@
\parfillskip -\@pnumwidth
{\leavevmode
\large \bfseries
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\csname contentsline@text@-1@format\endcsname{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\hfil
\hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\kern-\p@\kern\p@}}\par
\nobreak
\endgroup
@@ -318,14 +327,18 @@
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@section}{#1}{#2}{\@contentsline@destination}%
\csname contentsline@text@1@format\endcsname{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@section}{#1}{#2}{\@contentsline@destination}%
\nobreak\hfil
\nobreak\hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@section}{#1}{#2}{\@contentsline@destination}%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@section}{#1}{#2}{\@contentsline@destination}%
\kern-\p@\kern\p@}\par
\endgroup
\fi}
@@ -342,14 +355,18 @@
\parfillskip -\@pnumwidth
{\leavevmode
\large \bfseries
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\csname contentsline@text@-1@format\endcsname{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\hfil
- \hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \hb@xt@\@pnumwidth{\hss
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%
\kern-\p@\kern\p@}}\par
\nobreak
\endgroup
@@ -365,15 +382,19 @@
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
\csname contentsline@text@0@format\endcsname
{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
\nobreak\hfil
\nobreak\hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%%
\kern-\p@\kern\p@}\par
\penalty\@highpenalty
\endgroup
@@ -391,14 +412,18 @@
\parfillskip -\@pnumwidth
{\leavevmode
\large \bfseries
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%%
\csname contentsline@text@-1@format\endcsname{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%%
\hfil
\hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@part}{#1}{#2}{\@contentsline@destination}%%
\kern-\p@\kern\p@}}\par
\nobreak
\endgroup
@@ -414,15 +439,19 @@
\leavevmode \bfseries
\advance\leftskip\@tempdima
\hskip -\leftskip
- \UseHook{contentsline/text/before}%
+ \UseHookWithArguments{contentsline/text/before}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
\csname contentsline@text@0@format\endcsname
{#1}%
- \UseHook{contentsline/text/after}%
+ \UseHookWithArguments{contentsline/text/after}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
\nobreak\hfil
\nobreak\hb@xt@\@pnumwidth{\hss
- \UseHook{contentsline/page/before}%
+ \UseHookWithArguments{contentsline/page/before}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
#2%
- \UseHook{contentsline/page/after}%
+ \UseHookWithArguments{contentsline/page/after}{4}
+ {\toclevel@chapter}{#1}{#2}{\@contentsline@destination}%
\kern-\p@\kern\p@}\par
\penalty\@highpenalty
\endgroup
diff --git a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab.ins b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab.ins
index e2ca6049e54..1989ddcfa34 100644
--- a/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab.ins
+++ b/Master/texmf-dist/source/latex-dev/latex-lab/latex-lab.ins
@@ -136,6 +136,17 @@ where one can also log issues in case there are any.
\generate{\file{bib-latex-lab-testphase.ltx}{%
\from{latex-lab-bib.dtx}{latex-lab}}}
+\generate{\file{latex-lab-testphase-text.sty}{%
+ \from{latex-lab-text.dtx}{package}}}
+
+\generate{\file{text-latex-lab-testphase.ltx}{%
+ \from{latex-lab-text.dtx}{latex-lab}}}
+
+\generate{\file{latex-lab-testphase-firstaid.sty}{%
+ \from{latex-lab-firstaid.dtx}{package}}}
+
+\generate{\file{firstaid-latex-lab-testphase.ltx}{%
+ \from{latex-lab-firstaid.dtx}{latex-lab}}}
\endbatchfile