[latex3-commits] [latex3/latex2e] gh1289: fix for #1289 (6370e631)
github at latex-project.org
github at latex-project.org
Mon Mar 11 16:07:25 CET 2024
Repository : https://github.com/latex3/latex2e
On branch : gh1289
Link : https://github.com/latex3/latex2e/commit/6370e6317f642011c17221551c9531ff004027e1
>---------------------------------------------------------------
commit 6370e6317f642011c17221551c9531ff004027e1
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Mon Mar 11 16:07:25 2024 +0100
fix for #1289
>---------------------------------------------------------------
6370e6317f642011c17221551c9531ff004027e1
required/amsmath/amsmath.dtx | 8 +++++++-
required/amsmath/changes.txt | 6 ++++++
required/amsmath/testfiles/github1289.lvt | 27 +++++++++++++++++++++++++++
required/amsmath/testfiles/github1289.tlg | 4 ++++
4 files changed, 44 insertions(+), 1 deletion(-)
diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index f8a83874..ef199266 100644
--- a/required/amsmath/amsmath.dtx
+++ b/required/amsmath/amsmath.dtx
@@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \end{macrocode}
%
% \begin{macrocode}
-\ProvidesPackage{amsmath}[2023/05/13 v2.17o AMS math features]
+\ProvidesPackage{amsmath}[2024/03/11 v2.17p AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -4153,6 +4153,12 @@ and fix things up.}
% cause \cs{row@} to be advanced twice instead of once.
% \begin{macrocode}
\global\advance\row@\@ne
+% \end{macrocode}
+% Also reset \cs{lineht@} to avoid that this is incorrectly picked
+% up by a following environment, such as \env{align}.
+% \changes{v2.17p}{2024/03/11}{Reset \cs{lineht} (gh/1289)}
+% \begin{macrocode}
+ \global\lineht@\z@
\cr
}
% \end{macrocode}
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 10ce2ec8..a15eab5b 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,3 +1,9 @@
+2024-03-11 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * amsmath.dtx (subsection{The \env{gather} environment}):
+ Reset \lineht@ to avoid that this is incorrectly picked
+ up by a following environment, such as align. (gh/1289)
+
================================================================================
All changes above are only part of the development branch for the next release.
================================================================================
diff --git a/required/amsmath/testfiles/github1289.lvt b/required/amsmath/testfiles/github1289.lvt
new file mode 100644
index 00000000..8b141f21
--- /dev/null
+++ b/required/amsmath/testfiles/github1289.lvt
@@ -0,0 +1,27 @@
+\documentclass{article}
+
+\input{test2e}
+
+\usepackage{amsmath}
+
+\begin{document}
+
+\twocolumn %Just for demonstration purpose
+
+ \START
+ \OMIT
+
+\paragraph{Current:}
+\begin{gather}
+ \text{a deep gather line}\quad\frac{a}{\frac{a}{\frac{a}{a}}}
+\end{gather}
+Text inbetween amsmath environments; the following tag “(2)” is set too low.
+\begin{align}
+ \TIMO
+ \typeout{-> \the\csname lineht@\endcsname \space should be zero and then 1.94444pt}%
+ \OMIT
+ \text{a loooooooooooooooong align line}
+\end{align}
+
+\end{document}
+
diff --git a/required/amsmath/testfiles/github1289.tlg b/required/amsmath/testfiles/github1289.tlg
new file mode 100644
index 00000000..c5781e42
--- /dev/null
+++ b/required/amsmath/testfiles/github1289.tlg
@@ -0,0 +1,4 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+-> 0.0pt should be zero and then 1.94444pt
+-> 1.94444pt should be zero and then 1.94444pt
More information about the latex3-commits
mailing list.