[latex3-commits] [latex3/latex2e] latexlab/rcb: more docu updates and adding sockets for tagging (2b2dc950)
github at latex-project.org
github at latex-project.org
Wed Jul 26 00:06:29 CEST 2023
Repository : https://github.com/latex3/latex2e
On branch : latexlab/rcb
Link : https://github.com/latex3/latex2e/commit/2b2dc9500f9560363437a9e1ac60a496c12d4916
>---------------------------------------------------------------
commit 2b2dc9500f9560363437a9e1ac60a496c12d4916
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Wed Jul 26 00:06:29 2023 +0200
more docu updates and adding sockets for tagging
>---------------------------------------------------------------
2b2dc9500f9560363437a9e1ac60a496c12d4916
required/latex-lab/latex-lab-footnotes.dtx | 294 ++++++++++++++-------
required/latex-lab/latex-lab-new-or-2.dtx | 6 +-
.../testfiles-OR/footmisc-007-rollback.tlg | 6 +-
.../testfiles-OR/footmisc-013-scrartcl.tlg | 2 +-
4 files changed, 201 insertions(+), 107 deletions(-)
diff --git a/required/latex-lab/latex-lab-footnotes.dtx b/required/latex-lab/latex-lab-footnotes.dtx
index b9a859fe..707f064d 100644
--- a/required/latex-lab/latex-lab-footnotes.dtx
+++ b/required/latex-lab/latex-lab-footnotes.dtx
@@ -38,12 +38,14 @@
% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
% \providecommand\class[1]{\texttt{#1.cls}}
% \providecommand\pkg[1]{\texttt{#1}}
-% \providecommand\hook[1]{\texttt{#1}}
-% \providecommand\socket[1]{\texttt{#1}}
-% \providecommand\plug[1]{\texttt{#1}}
+%
+% \providecommand\hook[1]{\texttt{#1\DescribeHook[noprint]{#1}}}
+% \providecommand\socket[1]{\texttt{#1\DescribeSocket[noprint]{#1}}}
+% \providecommand\plug[1]{\texttt{#1\DescribePlug[noprint]{#1}}}
%
% \NewDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
% \NewDocElement[printtype=\textit{hook},idxtype=hook,idxgroup=Hooks]{Hook}{hookdecl}
+% \NewDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
%
% \begin{abstract}
% \emph{to be written}
@@ -146,6 +148,8 @@
% \begin{description}
% \item[\hook{fnmark/before}]
%
+% \DescribeHook[noprint]{fnmark/before}
+%
% Executed at the very beginning of \cs{footnotemark}. Currently
% there are two packages (\pkg{bibarts} and \pkg{chextras}) that
% prepend material at this point (not necessarily correctly, e.g.,
@@ -155,6 +159,8 @@
%
% \item[\hook{fnmark}]
%
+% \DescribeHook[noprint]{fnmark}
+%
% Executed in horizontal mode and after the current space factor
% has been saved away for reuse. This is where currently code for multiple
% marks does its preparation (as done by \pkg{footmisc} and
@@ -170,6 +176,8 @@
%
% \item[\hook{fnmark/begin}]
%
+% \DescribeHook[noprint]{fnmark/begin}
+%
% This hook is executed directly in front of the typeset mark.
% This is the place where \pkg{hyperref} would have added
% part of its code, i.e., after the \cs{nobreak} mentioned above.
@@ -178,6 +186,8 @@
%
% \item[\hook{fnmark/end}]
%
+% \DescribeHook[noprint]{fnmark/end}
+%
% This hook is executed directly after the typeset mark. It is
% used by \pkg{memhfixc}, \pkg{scrlttr2}, and
% \pkg{footmisc}. Used, for example, to implement support for
@@ -188,6 +198,8 @@
%
% \item[\hook{fnmark/after}]
%
+% \DescribeHook[noprint]{fnmark/after}
+%
% This hook is executed at the very end of the \cs{footnotemark} command.
%
% It is a reversed hook to pair with \hook{fnmark/before}
@@ -219,6 +231,8 @@
% \begin{description}
% \item[\socket{@footnotetext/process} (1 argument)]
%
+% \DescribeSocket[noprint]{@footnotetext/process}
+%
% This socket receives all material that is to be processed (or
% stored) including color protection code and what have you.
% The \plug{default} executes \cs{insert}\cs{footins}.
@@ -228,6 +242,8 @@
%
% \item[\socket{@footnotetext/make} (1 argument)]
%
+% \DescribeSocket[noprint]{@footnotetext/make}
+%
% The \plug{default} plug runs \cs{@makefntext} which contains
% various hooks for customization. For most scenarios this is
% sufficient. However, when running all footnotes as a single
@@ -239,6 +255,8 @@
%
% \item[\socket{@footnotetext/begin} (no argument)]
%
+% \DescribeSocket[noprint]{@footnotetext/begin}
+%
% By \plug{default} this socket adds a strut to the footnote
% material so that consecutive footnotes are properly spaced
% vertically. In some use cases this is not appropriate (e.g.,
@@ -253,6 +271,8 @@
%
% \item[\socket{@footnotetext/end} (no argument)]
%
+% \DescribeSocket[noprint]{@footnotetext/end}
+%
% This socket is executed at the very end of the argument passed
% to socket \socket{@footnotetext/make}. By \plug{default} it
% adds a final strut as long as we are still in horizontal mode
@@ -272,6 +292,8 @@
% \begin{description}
% \item[\socket{@makefntext/mark} (0 arguments)]
%
+% \DescribeSocket[noprint]{@makefntext/mark}
+%
% This socket has no input arguments but uses \cs{@makefnmark} to
% typeset the mark in front of the footnote text. Its
% \plug{default} uses code that examines the value of
@@ -289,13 +311,11 @@
%
% Available plugs are \plug{default} and \plug{noop} (no mark is produced).
%
-%^^A If tagging is produced this configuration point is also
-%^^A responsible for surrounding the mark with the appropriate tags
-%^^A marking the mark as an Lbl. It does this using the command
-%^^A \cs{tag at FENoteLbl}.
%
% \item[\socket{@makefntext/text} (1 argument)]
%
+% \DescribeSocket[noprint]{@makefntext/text}
+%
% This socket manages the formatting of the footnote text
% (presented as an argument) once the mark has been typeset. In
% all cases we can think of this formatting is better configured
@@ -304,12 +324,7 @@
% action. It is really only there to allow for some fancy stuff
% that some design comes up with.
%
-% Available plug is \plug{default}.
-%
-%^^A If tagging is produced this configuration point is also
-%^^A responsible for surrounding the mark with the appropriate tags
-%^^A marking the mark as an MC of type FENote. It does this using
-%^^A the command \cs{tag at FENotetext}.
+% Available plugs are \plug{identity} (default) and \plug{noop}.
%
% \end{description}
%
@@ -326,6 +341,8 @@
% \begin{description}
% \item[\hook{fntext/before}]
%
+% \DescribeHook[noprint]{fntext/before}
+%
% Executed at the very beginning of \cs{footnotetext}. Currently
% there is on package (\pkg{linguex}) that
% prepends material at this point.
@@ -334,6 +351,8 @@
%
% \item[\hook{fntext}]
%
+% \DescribeHook[noprint]{fntext}
+%
% Executed at the beginning of the material passed to the first
% configuration point. Typically used to set any baseline
% stretch for the footnote text, e.g., by \pkg{setspace},
@@ -345,6 +364,8 @@
%
% \item[\hook{fntext/para}]
%
+% \DescribeHook[noprint]{fntext/para}
+%
% After the font is set (by the previous hook), some default
% paragraph parameters
% are set up
@@ -368,12 +389,17 @@
%
% \item[\hook{fntext/begin} \& \hook{fntext/end}]
%
+% \DescribeHook[noprint]{fntext/begin}
+% \DescribeHook[noprint]{fntext/end}
+%
% The footnote text itself is surrounded by the hooks
% \hook{fntext/begin} and \hook{fntext/end}. The two hooks are
% not paired as they are typically used independently.
%
% \item[\hook{fntext/after}]
%
+% \DescribeHook[noprint]{fntext/after}
+%
% At the very end of \cs{footnotetext} we execute the hook
% \hook{fntext/after} which is a reversed hook paired with
% \hook{fntext/before}. Some packages, e.g., \pkg{linguex}, have
@@ -449,6 +475,38 @@
%
% \subsection{Technical details for the tagging}
%
+% The following sockets are set up fr kernel use, when doing tagging:
+% \begin{description}
+% \item[\socket{tagsupport/fnmark} (1 argument)]
+%
+% \DescribeSocket[noprint]{tagsupport/fnmark}
+%
+% \fmi{describe and decide on names}
+%
+%
+% \item[\socket{tagsupport/fntext/begin} (no argument)]
+%
+% \DescribeSocket[noprint]{tagsupport/fntext/begin}
+%
+%
+% \item[\socket{tagsupport/fntext/end} (no argument)]
+%
+% \DescribeSocket[noprint]{tagsupport/fntext/end}
+%
+%
+% \item[\socket{tagsupport/fntext/mark} (1 argument)]
+%
+% \DescribeSocket[noprint]{tagsupport/fntext/mark}
+%
+%
+% \item[\socket{tagsupport/fntext/text} (1 argument)]
+%
+% \DescribeSocket[noprint]{tagsupport/fntext/text}
+%
+%
+% \end{description}
+%
+%
% The \emph{footnotemark} should create a \texttt{/Lbl} structure\footnote{to make it easier
% to identify the role we use \texttt{/footnotemark} which we rolemap to \texttt{/Lbl}} that should contain a \texttt{/Ref} entry pointing
% to the structure of the \emph{footnotetext}.
@@ -606,28 +664,28 @@
%
% \subsection{Handling the mark}
%
-% The mark in the text is handled by redefining the kernel
-% hook \cs{@kernel at process@makefnmark} to
-% \cs{tag at FEMark}. It takes one argument, \cs{@makefnmark}, the
+% The mark in the text is handled by assigning an appropriate
+% plug to the socket \socket{tagsupport/fnmark}.
+% It takes one argument, \cs{@makefnmark}, the
% command which formats the mark, and surrounds it by link and tagging
-% commands. At the point where \cs{@kernel at process@makefnmark} is
-% issued \cs{@thefnmark} has already been defined and can be used to
+% commands. At the point where the socket is
+% executed, \cs{@thefnmark} has already been defined and can be used to
% setup the reference detections.
%
%
% \subsection{Handling the footnotetext}
%
-% The main part is done by redefining
-% \cs{@kernel at process@footnotetext at begin} and
-% \cs{@kernel at process@footnotetext at end} surrounding the footnote text.
-% These kernel hooks are used to start and end the structure and
+% The main part is done by assigning a different plug to socket \socket{tagsupport/fntext/begin}
+% and \socket{tagsupport/fntext/end}
+% surrounding the footnote text.
+% These sockets are used to start and end the structure and
% attempt to detect to which mark the note is related.
%
% The actual typesetting of the note text is done by
% \cs{fnote_makefntext:n} (or its \LaTeXe{} name \cs{@makefntext}). In
-% the new implementation this contains two kernel hooks for tagging:
-% \cs{@kernel at process@makefntext at mark} and
-% \cs{@kernel at process@makefntext at text}. These are redefined to add the
+% the new implementation this contains two further kernel sockets for tagging:
+% \socket{tagsupport/fntext/mark} and
+% \socket{tagsupport/fntext/text}. They get plugs assigned that add the
% tagging commands around note mark and note text.
%
% \subsection{Footnotes in minipages}
@@ -897,6 +955,7 @@
% \subsection{Hooks}
%
% \begin{hookdecl}{fnmark/before,fnmark/after,
+% fnmark,
% fnmark/begin,fnmark/end}
% Hooks in the footnotemark command.
% \begin{macrocode}
@@ -908,6 +967,7 @@
% \end{hookdecl}
%
% \begin{hookdecl}{fntext/before,fntext/after,
+% fntext,
% fntext/begin,fntext/end,fntext/para}
% Hooks in the footnotetext command:
% \begin{macrocode}
@@ -1002,10 +1062,10 @@
\UseHook{fnmark/begin}
%-------
% \end{macrocode}
-% The kernel hook for tagging. It picks up \cs{@makefnmark} as its
-% argument if tagging is active.
+% The kernel socket for tagging. It picks up \cs{@makefnmark} as its
+% argument and if tagging is not active it contains the \plug{identity} plug.
% \begin{macrocode}
- \@kernel at process@makefnmark \@makefnmark
+ \UseSocket{tagsupport/fnmark} \@makefnmark
%-------
% \end{macrocode}
% If a footnote mark is placed by its own then it should finish by
@@ -1039,21 +1099,23 @@
\UseHook{fnmark/after}
%-------
}
-
+% \end{macrocode}
+%
+% \begin{macrocode}
\cs_new_eq:NN \@@_footnotemark_finish: \@@_footnotemark_default_finish:
% \end{macrocode}
% \end{macro}
%
-% \begin{macro}{\@kernel at process@makefnmark}
-% Not a public config point but the kernel hook to add tagging. By
-% default it does nothing and is redefined if tagging is active.
+% \begin{socketdecl}{tagsupport/fnmark}
+% Not a public socket but reserved for tagging. By
+% default it contains \plug{identity} and is reassigned if tagging is active.
% \begin{macrocode}
-\cs_new_protected:Npn \@kernel at process@makefnmark { }
+\NewSocket{tagsupport/fnmark}{1}
% \end{macrocode}
-% \end{macro}
+% \end{socketdecl}
%
% \begin{macro}{\@footnotemark}
-% Here we provide the traditional \LaTeXe{} name in case it is used
+% Here we provide the traditional \LaTeXe{} name in case it is directly used
% in some legacy class.
% \begin{macrocode}
\cs_set_eq:NN \@footnotemark \fnote_footnotemark:
@@ -1073,9 +1135,9 @@
\UseHook{fntext/before}
%-------
% \end{macrocode}
-% Execute a kernel hook for tagging.
+% Execute a kernel socket for tagging.
% \begin{macrocode}
- \@kernel at process@footnotetext at begin
+ \UseSocket{tagsupport/fntext/begin}
% \end{macrocode}
%
% \begin{macrocode}
@@ -1156,7 +1218,7 @@
% The corresponding kernel hook that ends the tagging structure if
% tagging is active.
% \begin{macrocode}
- \@kernel at process@footnotetext at end
+ \UseSocket{tagsupport/fntext/end}
%-------
% ./linguex/linguex.sty
\UseHook{fntext/after}
@@ -1179,6 +1241,7 @@
% \end{socketdecl}
%
%
+%
% \begin{socketdecl}{@footnotetext/make}
%
% \begin{macrocode}
@@ -1240,14 +1303,13 @@
% \end{macrocode}
% \end{socketdecl}
%
-% \begin{macro}{\@kernel at process@footnotetext at begin,
-% \@kernel at process@footnotetext at end}
-% Kernel hooks for tagging.
+% \begin{socketdecl}{tagsupport/fntext/begin,tagsupport/fntext/end}
+% Kernel sockets for tagging.
% \begin{macrocode}
-\cs_new_protected:Npn \@kernel at process@footnotetext at begin {}
-\cs_new_protected:Npn \@kernel at process@footnotetext at end {}
+\NewSocket{tagsupport/fntext/begin}{0}
+\NewSocket{tagsupport/fntext/end}{0}
% \end{macrocode}
-% \end{macro}
+% \end{socketdecl}
%
% Provide the name \LaTeXe{} is used to and do this unconditionally
% (no patching of class code if any). This means that if a class
@@ -1296,8 +1358,8 @@
% \end{macrocode}
%
% \begin{macrocode}
- \@kernel at process@makefntext at mark { \UseSocket{@makefntext/mark} }
- \@kernel at process@makefntext at text { \UseSocket{@makefntext/text}{#1} }
+ \UseSocket{tagsupport/fntext/mark} { \UseSocket{@makefntext/mark} }
+ \UseSocket{tagsupport/fntext/text} { \UseSocket{@makefntext/text}{#1} }
}
% \end{macrocode}
% \end{macro}
@@ -1342,6 +1404,16 @@
%
%
%
+% \begin{socketdecl}{tagsupport/fntext/mark,tagsupport/fntext/text}
+% Not a public socket but reserved for tagging. By
+% default it contains \plug{identity} and is reassigned if tagging is active.
+% \begin{macrocode}
+\NewSocket{tagsupport/fntext/mark}{1}
+\NewSocket{tagsupport/fntext/text}{1}
+% \end{macrocode}
+% \end{socketdecl}
+%
+%
%
% \subsubsection{Making documents use the new \cs{@makefntext}}
%
@@ -1380,8 +1452,8 @@
% where ``BBB'' is something like \texttt{to 1em} or similar. It then
% replaces that with
%\begin{verbatim}
-% {AAA \@kernel at process@makefntext at mark{\hbox BBB { CCC }} DDD
-% \@kernel at process@makefntext at text{#1} EEE }
+% {AAA \UseSocket{tagsupport/fntext/mark}{\hbox BBB { CCC }} DDD
+% \UseSocket{tagsupport/fntext/text}{#1} EEE }
%\end{verbatim}
% The patching is not very careful, i.e., it assumes there is only
% one \verb=#1= in the replacement text and that the first \cs{hbox} found
@@ -1399,7 +1471,7 @@
\cs_new_protected:Npn \@@_patch:
{
- \tl_set:No \l_@@_patch_tl { \@makefntext { \@kernel at process@makefntext at text{##1} } }
+ \tl_set:No \l_@@_patch_tl { \@makefntext { \UseSocket{tagsupport/fntext/text}{##1} } }
\tl_if_in:NnTF \l_@@_patch_tl { \hbox }
{ \cs_set_eq:NN \@@_tmp:w \@@_patch_hbox:w }
{
@@ -1443,7 +1515,7 @@
% not a patch person, so this is the simple way out for now:
%
% \begin{macrocode}
-\cs_new:Npn \@makefntext at processX #1#2{\@kernel at process@makefntext at mark{#1{#2}}}
+\cs_new:Npn \@makefntext at processX #1#2{\UseSocket{tagsupport/fntext/mark}{#1{#2}}}
% \end{macrocode}
%
% At \verb=\begin{document}= check if the current definition is
@@ -1740,17 +1812,25 @@
\cs_generate_variant:Nn\fnote_mark_gpop:nnN {ooN}
% \end{macrocode}
% \end{macro}
-
-
+%
+%
+%
+%
% \subsubsection{Enabling tagging and links for the mark command}
-% To handle the mark in the text, we define a special command
-% which will surround \cs{@makefntext}.
-% At this time \cs{@thefnmark} is already set.
+%
+%
+% \begin{plugdecl}{FEMark}
+%
+% To handle the mark in the text, we define a a special plug for
+% the socket \socket{tagsupport/fnmark} that receives
+% \cs{@makefntext} as its argument. At this time \cs{@thefnmark}
+% is already set.
+%
% \begin{macrocode}
-\cs_new_protected:Npn \tag at FEMark #1 %#1 content
+\NewSocketPlug{tagsupport/fnmark}{FEMark}
{
% \end{macrocode}
-% end an open mc and start the structure.
+% End an open mc and start the structure.
% \begin{macrocode}
\tag_mc_end_push:
\tag_struct_begin:n { tag=footnotemark }
@@ -1811,11 +1891,15 @@
\tag_mc_begin_pop:n{}
}
% \end{macrocode}
-% At last set the kernel command to this one
+% At last assign the plug:
% \begin{macrocode}
-\cs_set_eq:NN \@kernel at process@makefnmark \tag at FEMark
+\AssignSocketPlug{tagsupport/fnmark}{FEMark}
% \end{macrocode}
-
+% \end{plugdecl}
+%
+%
+%
+%
% \subsubsection{The footnote text}
% We need a public command to append values to the Ref keys
@@ -1844,8 +1928,10 @@
% kernel hooks for taggin
% this sets the structure around the whole text
%
+%
+% \begin{plugdecl}{FENote}
% \begin{macrocode}
-\cs_new_protected:Npn \tag at FENote@begin
+\NewSocketPlug{tagsupport/fntext/begin}{FENote}
{
\tag_mc_end_push:
% \end{macrocode}
@@ -1900,43 +1986,46 @@
}
% \end{macrocode}
% This finish the setup of the tagging structure.
+% \end{plugdecl}
+
+
+
% Now we process the text. The destinations for the links are set with the label
% so that we can be sure that we are in hmode.
% \begin{macrocode}
-\cs_new_protected:Npn \tag at FENote@end
+\NewSocketPlug{tagsupport/fntext/end}{FENote}
{
\tag_struct_end:
\tag_mc_begin_pop:n{}
}
% \end{macrocode}
-% At last set the kernel commands:
+% At last assign the plugs:
% \begin{macrocode}
-\cs_set_eq:NN \@kernel at process@footnotetext at begin \tag at FENote@begin
-\cs_set_eq:NN \@kernel at process@footnotetext at end \tag at FENote@end
+\AssignSocketPlug{tagsupport/fntext/begin}{FENote}
+\AssignSocketPlug{tagsupport/fntext/end}{FENote}
% \end{macrocode}
%
-% The kernel hook \cs{@kernel at process@makefntext at mark} is responsible for
+% The kernel socket \socket{tagsupport/fntext/mark} is responsible for
% tagging the mark in the note. We use it to surround
% the mark with the needed tagging commands.
%
% TODO check if additional kernel configuration points are needed.
% If yes, what about the paragraph start and the paratagging??
%
-% \begin{macrocode}
-\cs_set_protected:Npn \@kernel at process@makefntext at mark #1 %#1 code that typesets the mark.
- {
- \tag_mc_end_push:
- \tag at FENoteLbl { #1 }
- \tag_mc_begin_pop:n{}
- }
-% \end{macrocode}
%
-% \begin{macro}{\tag at FENoteLbl}
-% \cs{tag at FENoteLbl} creates the label in the note on the bottom.
+%
+%^^A If tagging is produced this configuration point is also
+%^^A responsible for surrounding the mark with the appropriate tags
+%^^A marking the mark as an Lbl. It does this using the
+%^^A \socket{tagsupport/fntext/mark} socket.
+%
+% \begin{plugdecl}{FENoteLbl}
+% This plug creates the label in the note on the bottom.
% It also adds link targets for the hyperlinking.
% \begin{macrocode}
-\cs_new_protected:Npn \tag at FENoteLbl #1
+\NewSocketPlug{tagsupport/fntext/mark}{FENoteLbl}
{
+ \tag_mc_end_push:
% \end{macrocode}
% We create a link target for every related mark. The name is
% \texttt{footnote*} \meta{structure number of the mark}. We also add a link
@@ -1957,36 +2046,43 @@
#1
\tag_mc_end:
\tag_struct_end:
+ \tag_mc_begin_pop:n{}
}
% \end{macrocode}
-% \end{macro}
%
-%
-% \cs{@kernel at process@makefntext at text} is the kernel hook
-% around the actual note text.
% \begin{macrocode}
-\cs_set_protected:Npn \@kernel at process@makefntext at text #1
- {
- \tag_mc_end_push:
- \tag at FENotetext { #1 }
- \tag_mc_begin_pop:n{}
- }
+\AssignSocketPlug{tagsupport/fntext/mark}{FENoteLbl}
% \end{macrocode}
+% \end{plugdecl}
+%
+%
+%^^A If tagging is produced this configuration point is also
+%^^A responsible for surrounding the mark with the appropriate tags
+%^^A marking the mark as an MC of type FENote. It does this using
+%^^A the socket \socket{tagsupport/fntext/text}.
%
-% \begin{macro}{\tag at FENotetext}
+% \begin{plugdecl}{FENotetext}
%
-% This command currently only adds an MC chunk,
+% This plug is for the kernel socket \socket{tagsupport/fntext/text}
+% around the actual note text when doing tagging.
+% Currently it only adds an MC chunk.
%
% TODO Should it set a mc or could it rely on the content?
% \begin{macrocode}
-\cs_new_protected:Npn \tag at FENotetext #1
+\NewSocketPlug{tagsupport/fntext/text}{FENotetext}
{
+ \tag_mc_end_push:
\tag_mc_begin:n{}
#1
\tag_mc_end:
+ \tag_mc_begin_pop:n{}
}
% \end{macrocode}
-% \end{macro}
+%
+% \begin{macrocode}
+\AssignSocketPlug{tagsupport/fntext/text}{FENotetext}
+% \end{macrocode}
+% \end{plugdecl}
%-------------------------------------
% \begin{macrocode}
@@ -2003,7 +2099,7 @@
%<*footmisc>
%%
%% Copyright (c) 1995-2011 Robin Fairbairns
-%% Copyright (c) 2018-2022 Robin Fairbairns, Frank Mittelbach
+%% Copyright (c) 2018-2023 Robin Fairbairns, Frank Mittelbach
%%
%% This file is part of the `latex-lab Bundle'.
%% --------------------------------------------
@@ -2018,9 +2114,6 @@
%%
%% This work has the LPPL maintenance status 'maintained'.
%%
-%%
-%% File: footmisc.dtx (C) Copyright 1995-2011 Robin Fairbairns
-%% (C) Copyright 2018-2022 Frank Mittelbach
\NeedsTeXFormat{LaTeX2e}
\providecommand\DeclareRelease[3]{}
\providecommand\DeclareCurrentRelease[2]{}
@@ -2334,10 +2427,7 @@
%}
-\AddToHook{fntext/begin}{\nobreak \hspace{.2em}}
-
-
-
+ \AddToHook{fntext/begin}{\nobreak \hspace{.2em}}
\else
@@ -2394,7 +2484,11 @@
\ifFN at multiplefootnote
\providecommand*{\multiplefootnotemarker}{3sp}
-% we tag the separator as artifact
+% \end{macrocode}
+%
+% We tag the separator as artifact
+% \fmi{why is this done with \cs{providecommand}?}
+% \begin{macrocode}
\ExplSyntaxOn
\providecommand*{\multfootsep}{\tag_mc_end_push:\tag_mc_begin:n{artifact},\tag_mc_end:\tag_mc_begin_pop:n{}}
\ExplSyntaxOff
diff --git a/required/latex-lab/latex-lab-new-or-2.dtx b/required/latex-lab/latex-lab-new-or-2.dtx
index b742f44c..de1df50c 100644
--- a/required/latex-lab/latex-lab-new-or-2.dtx
+++ b/required/latex-lab/latex-lab-new-or-2.dtx
@@ -41,9 +41,9 @@
% \newcommand\NEW[1]{\marginpar{\mbox{}\hfill\fbox{New: #1}}}
% \providecommand\pkg[1]{\texttt{#1}}
%
-% \providecommand\hook[1]{\texttt{#1}\DescribeHook[noprint]{#1}}
-% \providecommand\socket[1]{\texttt{#1}\DescribeSocket[noprint]{#1}}
-% \providecommand\plug[1]{\texttt{#1}\DescribePlug[noprint]{#1}}
+% \providecommand\hook[1]{\texttt{#1\DescribeHook[noprint]{#1}}}
+% \providecommand\socket[1]{\texttt{#1\DescribeSocket[noprint]{#1}}}
+% \providecommand\plug[1]{\texttt{#1\DescribePlug[noprint]{#1}}}
%
% \NewDocElement[printtype=\textit{socket},idxtype=socket,idxgroup=Sockets]{Socket}{socketdecl}
% \NewDocElement[printtype=\textit{plug},idxtype=plug,idxgroup=Plugs]{Plug}{plugdecl}
diff --git a/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg b/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
index 53adb8ec..665ce2c5 100644
--- a/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-007-rollback.tlg
@@ -7,18 +7,18 @@ l. ...\makeatletter\show\@makefnmark
\makeatother
Patched @makefntext
> \@makefntext=\long macro:
-#1->\ifFN at hangfoot \bgroup \setbox \@tempboxa \@makefntext at processX {\hbox }{\ifdim \footnotemargin >0pt \hb at xt@ \footnotemargin {\@makefnmark \hss }\else \@makefnmark \fi }\leftmargin \wd \@tempboxa \rightmargin \z@ \linewidth \columnwidth \advance \linewidth -\leftmargin \parshape \@ne \leftmargin \linewidth \footnotesize \@setpar {{\@@par }}\leavevmode \llap {\box \@tempboxa }\parskip \hangfootparskip \relax \parindent \hangfootparindent \relax \else \parindent 1em \noindent \ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi \footnotelayout \@kernel at process@makefntext at text {#1}\ifFN at hangfoot \par \egroup \fi .
+#1->\ifFN at hangfoot \bgroup \setbox \@tempboxa \@makefntext at processX {\hbox }{\ifdim \footnotemargin >0pt \hb at xt@ \footnotemargin {\@makefnmark \hss }\else \@makefnmark \fi }\leftmargin \wd \@tempboxa \rightmargin \z@ \linewidth \columnwidth \advance \linewidth -\leftmargin \parshape \@ne \leftmargin \linewidth \footnotesize \@setpar {{\@@par }}\leavevmode \llap {\box \@tempboxa }\parskip \hangfootparskip \relax \parindent \hangfootparindent \relax \else \parindent 1em \noindent \ifdim \footnotemargin >\z@ \hb at xt@ \footnotemargin {\hss \@makefnmark }\else \ifdim \footnotemargin =\z@ \llap {\@makefnmark }\else \llap {\hb at xt@ -\footnotemargin {\@makefnmark \hss }}\fi \fi \fi \footnotelayout \UseSocket {tagsupport/fntext/text}{#1}\ifFN at hangfoot \par \egroup \fi .
l. ...\makeatletter\show\@makefntext
\makeatother
Above patching is incomplete, it only patches the first hbox!
Patched @footnotemark
> \@footnotemark=\protected\long macro:
-->\__fnote_debug_footnotemark: \UseHook {fnmark/before}\leavevmode \ifhmode \edef \@x at sf {\the \spacefactor }\UseHook {fnmark}\nobreak \fi \UseHook {fnmark/begin}\@kernel at process@makefnmark \@makefnmark \__fnote_footnotemark_finish: .
+->\__fnote_debug_footnotemark: \UseHook {fnmark/before}\leavevmode \ifhmode \edef \@x at sf {\the \spacefactor }\UseHook {fnmark}\nobreak \fi \UseHook {fnmark/begin}\UseSocket {tagsupport/fnmark}\@makefnmark \__fnote_footnotemark_finish: .
l. ...\makeatletter\show\@footnotemark
\makeatother
Patched @footnotetext
> \@footnotetext=\protected\long macro:
-#1->\__fnote_debug_footnotetext: \UseHook {fntext/before}\@kernel at process@footnotetext at begin \UseSocket {@footnotetext/process}{\UseHook {fntext}\reset at font \footnotesize \interlinepenalty \interfootnotelinepenalty \splittopskip \footnotesep \splitmaxdepth \dp \strutbox \floatingpenalty \@MM \hsize \columnwidth \@parboxrestore \parindent 1em\def \@currentcounter {footnote}\protected at edef \@currentlabel {\p at footnote \@thefnmark }\UseHook {fntext/para}\color at begingroup \UseSocket {@footnotetext/make}{\UseSocket {@footnotetext/begin}\UseHook {fntext/begin}\ignorespaces #1\UseHook {fntext/end}\UseSocket {@footnotetext/end}}\par \color at endgroup }\@kernel at process@footnotetext at end \UseHook {fntext/after}.
+#1->\__fnote_debug_footnotetext: \UseHook {fntext/before}\UseSocket {tagsupport/fntext/begin}\UseSocket {@footnotetext/process}{\UseHook {fntext}\reset at font \footnotesize \interlinepenalty \interfootnotelinepenalty \splittopskip \footnotesep \splitmaxdepth \dp \strutbox \floatingpenalty \@MM \hsize \columnwidth \@parboxrestore \parindent 1em\def \@currentcounter {footnote}\protected at edef \@currentlabel {\p at footnote \@thefnmark }\UseHook {fntext/para}\color at begingroup \UseSocket {@footnotetext/make}{\UseSocket {@footnotetext/begin}\UseHook {fntext/begin}\ignorespaces #1\UseHook {fntext/end}\UseSocket {@footnotetext/end}}\par \color at endgroup }\UseSocket {tagsupport/fntext/end}\UseHook {fntext/after}.
l. ...\makeatletter\show\@footnotetext
\makeatother
-> The hook 'fnmark/before':
diff --git a/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg b/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
index 08e3f5aa..893c5eee 100644
--- a/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
+++ b/required/latex-lab/testfiles-OR/footmisc-013-scrartcl.tlg
@@ -2,7 +2,7 @@ This is a generated file for the l3build validation system.
Don't change this file in any respect.
Patched\nobreakspace {} @makefntext
> \@makefntext=\long macro:
-#1->\ExecuteDoHook {footnote/text/begin}\raggedfootnote \leftskip 1.5em \l at addto@macro \@trivlist {\ifnum \@listdepth =\@ne \advance \leftmargin 1.5em\relax \fi }\parindent 1em\noindent \IfArgIsEmpty {1em}{}{\hskip \dimexpr 1em-1.5em\relax }\ftn at font \@makefntext at processX {\hbox to \z@ }{\hss \@@makefnmark }\@kernel at process@makefntext at text {#1}\ExecuteDoHook {footnote/text/end}.
+#1->\ExecuteDoHook {footnote/text/begin}\raggedfootnote \leftskip 1.5em \l at addto@macro \@trivlist {\ifnum \@listdepth =\@ne \advance \leftmargin 1.5em\relax \fi }\parindent 1em\noindent \IfArgIsEmpty {1em}{}{\hskip \dimexpr 1em-1.5em\relax }\ftn at font \@makefntext at processX {\hbox to \z@ }{\hss \@@makefnmark }\UseSocket {tagsupport/fntext/text}{#1}\ExecuteDoHook {footnote/text/end}.
l. ...\makeatletter\show\@makefntext
\makeatother
-> The hook 'fnmark/before':
More information about the latex3-commits
mailing list.