[latex3-commits] [git/LaTeX3-latex3-latex2e] robust-ams: more robustness + ltnews entry (bfb92fcb)

Frank Mittelbach frank.mittelbach at latex-project.org
Fri Apr 8 10:00:03 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : robust-ams
Link       : https://github.com/latex3/latex2e/commit/bfb92fcb9fbc16e1cdbccdbf75618932cba7c825

>---------------------------------------------------------------

commit bfb92fcb9fbc16e1cdbccdbf75618932cba7c825
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Fri Apr 8 10:00:03 2022 +0200

    more robustness + ltnews entry


>---------------------------------------------------------------

bfb92fcb9fbc16e1cdbccdbf75618932cba7c825
 base/changes.txt                                       |  5 +++++
 base/doc/ltnews35.tex                                  | 18 ++++++++++++++++--
 base/ltmath.dtx                                        |  5 +++--
 base/testfiles/github-robust-0123.luatex.tlg           |  2 +-
 base/testfiles/github-robust-0123.tlg                  |  2 +-
 base/testfiles/github-robust-0123.xetex.tlg            |  2 +-
 required/amsmath/amsopn.dtx                            |  4 +++-
 required/amsmath/changes.txt                           |  9 +++++++++
 .../amsmath/testfiles/github-amsrobust-0123.luatex.tlg |  2 +-
 required/amsmath/testfiles/github-amsrobust-0123.tlg   |  2 +-
 10 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 470c1134..5a913493 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -6,6 +6,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 ================================================================================
 
+2022-04-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* ltmath.dtx (subsubsection{The UNSORTED Rest}):
+	Make \openup robust (gh/123)
+
 2022-04-01  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltfiles.dtx (section{File Handling}):
diff --git a/base/doc/ltnews35.tex b/base/doc/ltnews35.tex
index 64ab4cdd..c0917c9e 100644
--- a/base/doc/ltnews35.tex
+++ b/base/doc/ltnews35.tex
@@ -623,7 +623,7 @@ This has finally been corrected and a warning is now generated also in this case
 \section{Changes to packages in the \pkg{amsmath} category}
 
 
-\subsection{\pkg{amsopn} Do not reset \cs{operator at font}}
+\subsection{\pkg{amsopn}: Do not reset \cs{operator at font}}
 
 The package \pkg{amsopn} used to define \cs{operator at font} but this
 command is already provided by the \LaTeX{} format (for at least 14
@@ -644,7 +644,7 @@ after loading the package.
 %
 \githubissue{734}
 
-\subsection{\pkg{amsmath} Error in \cs{shoveleft}}
+\subsection{\pkg{amsmath}: Error in \cs{shoveleft}}
 
 If \cs{shoveleft} started out with the words \enquote{plus} or
 \enquote{minus} it was misunderstood as part of a rubber length and
@@ -655,6 +655,20 @@ is now prevented.
 \githubissue{714}
 
 
+\subsection{\pkg{amsmath} and \pkg{amsopn}: Robustify user commands}
+
+Most user-level commands have been made robust in the \LaTeX{} kernel
+during the last years, but variant definitions in \pkg{amsmath} turned
+them back into fragile beings. We have now made most commands in
+\pkg{amsmath} and \pkg{amsopn} robust as well to match the kernel
+behavior. This also resolves a bug recently discovered in the
+\pkg{mathtools} package, which was due to \cs{big} not being robust after
+\pkg{amsmath} was loaded.
+%
+\githubissue{123}
+
+
+
 \section{Changes to packages in the \pkg{graphics} category}
 
 \subsection{Color in formulas}
diff --git a/base/ltmath.dtx b/base/ltmath.dtx
index 9f000a41..2f2eb101 100644
--- a/base/ltmath.dtx
+++ b/base/ltmath.dtx
@@ -38,7 +38,7 @@
 %<*driver>
 % \fi
 \ProvidesFile{ltmath.dtx}
-              [2021/10/14 v1.2j LaTeX Kernel (Math Setup)]
+              [2022/04/08 v1.2k LaTeX Kernel (Math Setup)]
 % \iffalse
 %</driver>
 %
@@ -467,8 +467,9 @@
 % \end{macro}
 %
 % \begin{macro}{\openup}
+% \changes{v1.2k}{2022/04/08}{Make \cs{protected} (gh/123)}
 %    \begin{macrocode}
-\def\openup{\afterassignment\@penup\dimen@}
+\protected\def\openup{\afterassignment\@penup\dimen@}
 %    \end{macrocode}
 %
 %    \begin{macrocode}
diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg
index 5401e3f8..ac5c04e6 100644
--- a/base/testfiles/github-robust-0123.luatex.tlg
+++ b/base/testfiles/github-robust-0123.luatex.tlg
@@ -216,7 +216,7 @@ l. ...\mruntest{ccc}
 ---------------------------------------
 \ooalign{foo} -> \lineskiplimit -\maxdimen \unhbox \voidb at x \vtop {\baselineskip \z at skip \lineskip .25ex\everycr {}\tabskip \z at skip \halign {##\crcr foo\crcr }}
 ---------------------------------------
-\openup -> \afterassignment \advance \lineskip \dimen@ \advance \baselineskip \dimen@ \advance \lineskiplimit \dimen@ \dimen@ 
+\openup -> \openup 
 ---------------------------------------
 \pagenumbering{arabic} -> \global \c at page \@ne \gdef 1{1}
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg
index 2afb3959..74042dde 100644
--- a/base/testfiles/github-robust-0123.tlg
+++ b/base/testfiles/github-robust-0123.tlg
@@ -216,7 +216,7 @@ l. ...\mruntest{ccc}
 ---------------------------------------
 \ooalign{foo} -> \lineskiplimit -\maxdimen \unhbox \voidb at x \vtop {\baselineskip \z at skip \lineskip .25ex\everycr {}\tabskip \z at skip \halign {##\crcr foo\crcr }}
 ---------------------------------------
-\openup -> \afterassignment \advance \lineskip \dimen@ \advance \baselineskip \dimen@ \advance \lineskiplimit \dimen@ \dimen@ 
+\openup -> \openup 
 ---------------------------------------
 \pagenumbering{arabic} -> \global \c at page \@ne \gdef 1{1}
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg
index d8b5041b..af8401e5 100644
--- a/base/testfiles/github-robust-0123.xetex.tlg
+++ b/base/testfiles/github-robust-0123.xetex.tlg
@@ -216,7 +216,7 @@ l. ...\mruntest{ccc}
 ---------------------------------------
 \ooalign{foo} -> \lineskiplimit -\maxdimen \unhbox \voidb at x \vtop {\baselineskip \z at skip \lineskip .25ex\everycr {}\tabskip \z at skip \halign {##\crcr foo\crcr }}
 ---------------------------------------
-\openup -> \afterassignment \advance \lineskip \dimen@ \advance \baselineskip \dimen@ \advance \lineskiplimit \dimen@ \dimen@ 
+\openup -> \openup 
 ---------------------------------------
 \pagenumbering{arabic} -> \global \c at page \@ne \gdef 1{1}
 ---------------------------------------
diff --git a/required/amsmath/amsopn.dtx b/required/amsmath/amsopn.dtx
index a3f1767d..110a5fa8 100644
--- a/required/amsmath/amsopn.dtx
+++ b/required/amsmath/amsopn.dtx
@@ -58,7 +58,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
 [1994/12/01]% LaTeX date must December 1994 or later
-\ProvidesPackage{amsopn}[2022/01/20 v2.03 operator names]
+\ProvidesPackage{amsopn}[2022/04/08 v2.04 operator names]
 %    \end{macrocode}
 %
 %    What \cs{nolimits@} does is keep a \cn{limits} typed by the user
@@ -151,6 +151,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
 \@onlypreamble\@declmathop
 %    \end{macrocode}
 %
+% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)}
 %    \begin{macrocode}
 \protected\def\arccos{\qopname\relax o{arccos}}
 \protected\def\arcsin{\qopname\relax o{arcsin}}
@@ -226,6 +227,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
 %    vertical spacing may not be optimal in script and scriptscript
 %    sizes. Unfortunately \tex/ provides no easy way to do math mode
 %    vertical spacing that varies with current math style like mu units.
+% \changes{v2.04}{2022/04/08}{Make operators \cs{protected} (gh/123)}
 %    \begin{macrocode}
 \protected\def\varlim@#1#2{%
   \vtop{\m at th\ialign{##\cr
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 95e291d7..388d6585 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,3 +1,12 @@
+2022-04-08  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* amsmath.dtx:
+	Make various math commands robust to match the LaTeX kernel (gh/123)
+
+	* amsopn.dtx:
+	Make various operators \protected (gh/123)
+
+
 2022-02-03  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* amsmath.dtx (subsection{The \env{multline} environment}):
diff --git a/required/amsmath/testfiles/github-amsrobust-0123.luatex.tlg b/required/amsmath/testfiles/github-amsrobust-0123.luatex.tlg
index 63474b1c..3ec7c6bf 100644
--- a/required/amsmath/testfiles/github-amsrobust-0123.luatex.tlg
+++ b/required/amsmath/testfiles/github-amsrobust-0123.luatex.tlg
@@ -578,7 +578,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \omit -> \omit {foo}{bar}{baz}
 ---------------------------------------
-\openup -> \afterassignment \advance \lineskip \dimen@ \advance \baselineskip \dimen@ \advance \lineskiplimit \dimen@ \dimen@ {foo}{bar}{baz}
+\openup -> \openup {foo}{bar}{baz}
 ---------------------------------------
 \operatorfont -> \mathgroup \symoperators {foo}{bar}{baz}
 ---------------------------------------
diff --git a/required/amsmath/testfiles/github-amsrobust-0123.tlg b/required/amsmath/testfiles/github-amsrobust-0123.tlg
index 63474b1c..3ec7c6bf 100644
--- a/required/amsmath/testfiles/github-amsrobust-0123.tlg
+++ b/required/amsmath/testfiles/github-amsrobust-0123.tlg
@@ -578,7 +578,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \omit -> \omit {foo}{bar}{baz}
 ---------------------------------------
-\openup -> \afterassignment \advance \lineskip \dimen@ \advance \baselineskip \dimen@ \advance \lineskiplimit \dimen@ \dimen@ {foo}{bar}{baz}
+\openup -> \openup {foo}{bar}{baz}
 ---------------------------------------
 \operatorfont -> \mathgroup \symoperators {foo}{bar}{baz}
 ---------------------------------------





More information about the latex3-commits mailing list.