[latex3-commits] [latex3/latex2e] main: Append \everypar toks to \g__para_standard_everypar_tl (70690d893)
github at latex-project.org
github at latex-project.org
Sat Jul 13 18:02:38 CEST 2024
Repository : https://github.com/latex3/latex2e
On branch : main
Link : https://github.com/latex3/latex2e/commit/70690d89347eb8d1af05a1c35885089a9e80ac2a
>---------------------------------------------------------------
commit 70690d89347eb8d1af05a1c35885089a9e80ac2a
Author: Yukai Chou <muzimuzhi at gmail.com>
Date: Fri Jun 21 18:54:46 2024 +0800
Append \everypar toks to \g__para_standard_everypar_tl
Fix rollback 2023/06/01 of \g__para_standard_everypar_tl, labeled "minipage fix".
See #1386.
>---------------------------------------------------------------
70690d89347eb8d1af05a1c35885089a9e80ac2a
base/changes.txt | 6 ++++++
base/doc/ltnews39.tex | 13 +++++++++++++
base/ltpara.dtx | 22 +++++++++++++++++-----
base/testfiles/github-1386.lvt | 17 +++++++++++++++++
base/testfiles/github-1386.tlg | 2 ++
5 files changed, 55 insertions(+), 5 deletions(-)
diff --git a/base/changes.txt b/base/changes.txt
index c4bef2ce6..0b4668a7c 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,12 @@ to completeness or accuracy and it contains some references to files that are
not part of the distribution.
================================================================================
+2024-06-23 Yukai Chou <muzimuzhi at gmail.com>
+
+ * ltpara.dtx
+ Append \everypar toks to \g__parar_standard_everypar_tl, rollback
+ 2023/06/01 (gh/1386)
+
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
diff --git a/base/doc/ltnews39.tex b/base/doc/ltnews39.tex
index 3af890351..6a598b76d 100644
--- a/base/doc/ltnews39.tex
+++ b/base/doc/ltnews39.tex
@@ -725,6 +725,19 @@ logic for the strut changes when vertical mode is detected.
\pkg{bigfoot})}
+\subsection{Fix a ``missing \cs{item}'' rollback error}
+
+If \LaTeX{} is rolled back to a date not newer than 2023/06/01 and
+older than 2024/06/01, any list-based environment would raise an error
+\begin{verbatim}
+! LaTeX Error: Something's wrong--perhaps a missing \item.
+\end{verbatim}
+This has now been corrected as a hotfix in patch level 2, by enhancing
+a 2023/06/01 version rollback code of new paragraph mechanism.
+%
+\githubissue{1386}
+
+
\section{Changes to packages in the \pkg{amsmath} category}
diff --git a/base/ltpara.dtx b/base/ltpara.dtx
index f102d68e0..b91585646 100644
--- a/base/ltpara.dtx
+++ b/base/ltpara.dtx
@@ -17,7 +17,7 @@
%<*driver>
% \fi
\ProvidesFile{ltpara.dtx}
- [2024/05/16 v1.0m LaTeX Kernel (paragraph hooks)]
+ [2024/06/23 v1.0n LaTeX Kernel (paragraph hooks)]
% \iffalse
%
\documentclass{l3doc}
@@ -819,6 +819,18 @@
\@@_handle_indent:
% \the \everypar % <--- done differently below
}
+% \end{macrocode}
+% \changes{v1.0n}{2024/06/23}
+% {Append \cs{everypar} toks to \cs{g_@@_standard_everypar_tl},
+% rollback 2023/06/01 (gh/1386)}
+% \begin{macrocode}
+%<latexrelease>\cs_set:Npn \@@_tmp:w #1#2#3#4#5 { }
+%<latexrelease>\tl_gput_right:Nx \g_@@_standard_everypar_tl {
+%<latexrelease> \exp_not:N \the
+%<latexrelease> \exp_not:N \toks
+%<latexrelease> \exp_after:wN \@@_tmp:w \token_to_meaning:N \everypar
+%<latexrelease> \c_space_tl
+%<latexrelease>}
%<latexrelease>\EndIncludeInRelease
%<latexrelease>\IncludeInRelease{2021/06/01}
%<latexrelease> {\g_@@_standard_everypar_tl}{minipage~ fix}
@@ -917,10 +929,10 @@
% the paragraph text starts.
% \begin{macrocode}
\tl_gput_right:Nx \g_@@_standard_everypar_tl {
- \exp_not:N \the
- \exp_not:N \toks
- \the \allocationnumber
- \c_space_tl
+ \exp_not:N \the
+ \exp_not:N \toks
+ \the \allocationnumber
+ \c_space_tl
}
% \end{macrocode}
% \end{macro}
diff --git a/base/testfiles/github-1386.lvt b/base/testfiles/github-1386.lvt
new file mode 100644
index 000000000..72f38ff27
--- /dev/null
+++ b/base/testfiles/github-1386.lvt
@@ -0,0 +1,17 @@
+
+\RequirePackage[2024-05-01]{latexrelease}
+
+\documentclass{article}
+
+\input{test2e}
+
+\begin{document}
+
+\START
+
+% should not raise errors
+\begin{itemize}
+ \item This is an item.
+\end{itemize}
+
+\END
diff --git a/base/testfiles/github-1386.tlg b/base/testfiles/github-1386.tlg
new file mode 100644
index 000000000..1d0c69753
--- /dev/null
+++ b/base/testfiles/github-1386.tlg
@@ -0,0 +1,2 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
More information about the latex3-commits
mailing list.