[latex3-commits] [latex3/latex2e] tagging36+tagging641: docu and change log (e4818d9f)
github at latex-project.org
github at latex-project.org
Mon Sep 2 18:44:19 CEST 2024
Repository : https://github.com/latex3/latex2e
On branch : tagging36+tagging641
Link : https://github.com/latex3/latex2e/commit/e4818d9f8088a436e17defa695701cbb06366a5d
>---------------------------------------------------------------
commit e4818d9f8088a436e17defa695701cbb06366a5d
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Sep 2 18:44:19 2024 +0200
docu and change log
>---------------------------------------------------------------
e4818d9f8088a436e17defa695701cbb06366a5d
required/latex-lab/changes.txt | 12 ++++++++
required/latex-lab/latex-lab-block.dtx | 56 +++++++++++++++++++++++++++-------
2 files changed, 57 insertions(+), 11 deletions(-)
diff --git a/required/latex-lab/changes.txt b/required/latex-lab/changes.txt
index 43bca22d..72430452 100644
--- a/required/latex-lab/changes.txt
+++ b/required/latex-lab/changes.txt
@@ -1,3 +1,15 @@
+2024-09-02 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * latex-lab-block.dtx (subsubsection{List tags}):
+ Do not close LI and LBody if they were never opened because of a
+ missing \item (issue tagging/641)
+
+ (subsubsection{Implementation of \cs{item} template(s)}):
+ Set @newlist to false after the first \item (issue tagging/36)
+
+ (subsubsection{Implementation of block templates \ldots}):
+ Drop \@noitemerr from \addvspace and \addpenalty
+
2024-08-29 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
* latex-lab-math.dtx: avoid loosing math if tagging is suspended,
tagging-project issue #661
diff --git a/required/latex-lab/latex-lab-block.dtx b/required/latex-lab/latex-lab-block.dtx
index 8eced73e..4d503a2e 100644
--- a/required/latex-lab/latex-lab-block.dtx
+++ b/required/latex-lab/latex-lab-block.dtx
@@ -9,8 +9,8 @@
%
% https://www.latex-project.org/lppl.txt
%
-\def\ltlabblockdate{2024-08-11}
-\def\ltlabblockversion{0.8p}
+\def\ltlabblockdate{2024-09-02}
+\def\ltlabblockversion{0.8q}
%<*driver>
\documentclass[kernel]{l3doc}
\usepackage{amstext}
@@ -1774,15 +1774,11 @@
\legacy_if_gset_false:n { @inlabel }
}
% \end{macrocode}
-% In a pure ``displayblock'' scenario \texttt{@newlist} will be
-% always false and the code bypassed, but we may have an outer list
-% followed immediately by a displayblock (with the \cs{item} missing)
+% The 2e implementation had a \texttt{@newlist} test here, which
+% generated a \cs{@noitemerr} if true. This has been moved to
+% \cs{@@_list_end:}.
+% \changes{v0.8q}{2024/09/02}{\cs{@noitemerr} moved to a better place}
% \begin{macrocode}
-%% \legacy_if:nT { @newlist }
-%% {
-%% \@noitemerr
-%% \legacy_if_gset_false:n { @newlist }
-%% }
\mode_if_horizontal:TF
{ \@@_skip_remove_last: \@@_skip_remove_last: \par }
{ \@inmatherr{\end{\@currenvir}} }
@@ -2082,7 +2078,14 @@
%
%
% \begin{macro}{\addpenalty}
-%
+% The 2e implementation of \cs{addpenalty} (and \cs{addvspace})
+% have a strange \cs{@noitemerr} if they are called in
+% hmode. Generating this error in this case is definitely not
+% necessary and in fact wrong, so below it is commented
+% out. However, one could consider changing the logic and simply
+% issue a \cs{par} in that case rather than omitting the penalty
+% (or the vspace).\fmi{Evaluate if that change makes sense.}
+% \changes{v0.8q}{2024/09/02}{Drop \cs{@noitemerr}}
% \begin{macrocode}
\def\addpenalty#1{%
\ifvmode
@@ -2119,6 +2122,27 @@
% \end{macrocode}
% \end{macro}
%
+%
+% \begin{macro}{\addvspace}
+% See \cs{addpenalty}
+% \changes{v0.8q}{2024/09/02}{Drop \cs{@noitemerr}}
+% \begin{macrocode}
+\def\addvspace#1{%
+ \ifvmode
+ \if at minipage\else
+ \ifdim \lastskip =\z@
+ \@vspace at calcify{#1}%
+ \else
+ \setlength\@tempskipb{#1}%
+ \@xaddvskip
+ \fi
+ \fi
+% \else
+% \@noitemerr
+ \fi}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\__kernel_displayblock_begin:,
% \__kernel_displayblock_beginpar_hmode:w,
% \__kernel_displayblock_beginpar_vmode:}
@@ -2633,6 +2657,11 @@
\legacy_if:nTF { @newlist }
{
\__kernel_list_item_begin:
+% \end{macrocode}
+% The first item of a list also has to change the \texttt{@newlist} switch.
+% \changes{v0.8q}{2024/09/02}{Set \texttt{@newlist} to false after
+% the first \cs{item}}
+% \begin{macrocode}
\legacy_if_gset_false:n { @newlist }
}
{ \@@_inter_item: }
@@ -4011,6 +4040,11 @@
% Finally, at the list end we have to close the open
% \texttt{LBody}, \texttt{LI}, \texttt{L}, and possibly a
% \struct{text} if the last item ends with a list.
+% However, if the user forgot to add an \cs{item} there is no
+% \texttt{LI} and \texttt{LBody} open, so we check for the status
+% of \texttt{@newlist} and generate a no-item error.
+% \changes{v0.8q}{2024/09/02}{Do not close LI and LBody if they
+% never were opened.}
% \begin{macrocode}
\cs_set:Npn \@@_list_end: {
\legacy_if:nTF { @newlist }
More information about the latex3-commits
mailing list.