[latex3-commits] [git/LaTeX3-latex3-latex2e] gh652: guard refstepcounter with mathopen, issue #652 (fba85eed)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Aug 24 11:10:40 CEST 2021


Repository : https://github.com/latex3/latex2e
On branch  : gh652
Link       : https://github.com/latex3/latex2e/commit/fba85eed3afddf85e7c3e03d44c9358e46998603

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

commit fba85eed3afddf85e7c3e03d44c9358e46998603
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Aug 24 11:10:40 2021 +0200

    guard refstepcounter with mathopen, issue #652


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

fba85eed3afddf85e7c3e03d44c9358e46998603
 required/amsmath/amsmath.dtx | 7 ++++---
 required/amsmath/changes.txt | 5 +++++
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index 4300dded..47a4ce5f 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}[2021/07/08 v2.17j AMS math features]
+\ProvidesPackage{amsmath}[2021/08/24 v2.17k AMS math features]
 %    \end{macrocode}
 %
 % \section{Catcode defenses}
@@ -3194,10 +3194,11 @@ ill-advised in LaTeX.%
   \global\@eqnswfalse
 }
 %    \end{macrocode}
-%
+%\changes{v2.17k}{2021/08/24}{Guard the refstepcounter with a mathopen for better
+% compability with hyperref, issue gh/652}
 %    \begin{macrocode}
 \def\print at eqnum{\tagform@\theequation}
-\def\incr at eqnum{\refstepcounter{equation}\let\incr at eqnum\@empty}
+\def\incr at eqnum{\refstepcounter{equation}\ifmmode\mathopen{}\fi\let\incr at eqnum\@empty}
 %    \end{macrocode}
 %  \end{macro}
 %
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 63bea7e7..3f9a2a87 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -2,6 +2,11 @@
 All changes above are only part of the development branch for the next release.
 ================================================================================
 
+2021-08-24 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+	* amsmath.dtx (subsection{Implementing tags and labels}):
+	Guard the refstepcounter in \incr at eqnum with a mathopen for better
+    compability with hyperref, issue gh/652
+
 #########################
 # 2021-06-01 Release
 #########################





More information about the latex3-commits mailing list.