[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh206: fix for #216 (93043557)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Nov 16 17:25:03 CET 2019


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh206
Link       : https://github.com/latex3/latex2e/commit/9304355786e2c27b07298b9719fc173f997043cc

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

commit 9304355786e2c27b07298b9719fc173f997043cc
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Nov 16 17:25:03 2019 +0100

    fix for #216


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

9304355786e2c27b07298b9719fc173f997043cc
 required/amsmath/amsmath.dtx                       |  9 ++++++++-
 required/amsmath/changes.txt                       |  6 ++++++
 required/amsmath/testfiles/github-0216.lvt         | 17 +++++++++++++++++
 .../amsmath/testfiles/github-0216.tlg              |  3 +--
 required/amsmath/testfiles/github-amsmath-0216.lvt | 22 ++++++++++++++++++++++
 required/amsmath/testfiles/github-amsmath-0216.tlg |  7 +++++++
 required/amsmath/testfiles/tlb-amsmath-load.tlg    | 11 +++++++++++
 required/amsmath/testfiles/tlb-utex-001.tlg        | 11 +++++++++++
 8 files changed, 83 insertions(+), 3 deletions(-)

diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index d3d47047..8057e658 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}[2019/04/01 v2.17c AMS math features]
+\ProvidesPackage{amsmath}[2019/11/16 v2.17d AMS math features]
 %    \end{macrocode}
 %
 % \section{Catcode defenses}
@@ -1641,10 +1641,17 @@ Foreign command \@backslashchar#1;\MessageBreak
 %    By redefining \cs{set at mathaccent} we ensure that
 %    \cn{DeclareMathAccent} will define accent commands to run our
 %    \cs{mathaccentV} function instead of the primitive \cs{mathaccent}.
+% \changes{v2.17d}{2019/11/16}{Added \cs{MakeRobust} to match kernel
+%                              change (gh/216)}
 %    \begin{macrocode}
 \def\set at mathaccent#1#2#3#4{%
+%    \end{macrocode}
+%    The moment the redefinitions done inside amsmath of the basic accents
+%    are all robust  we can drop the \cs{protect} here, for now it is still needed.
+%    \begin{macrocode}
   \xdef#2{\@nx\protect\@nx\mathaccentV
     {\@xp\@gobble\string#2}\hexnumber@#1#4}%
+  \MakeRobust#2%
 }
 %    \end{macrocode}
 %
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 054633ff..122b3520 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,3 +1,9 @@
+2019-11-16  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* amsmath.dtx (section{Math accents}):
+	Added \MakeRobust inside \DeclareMathAccent to match kernel
+        change (gh/216)
+
 #########################
 # 2019-10-01b Release
 #########################
diff --git a/required/amsmath/testfiles/github-0216.lvt b/required/amsmath/testfiles/github-0216.lvt
new file mode 100644
index 00000000..9d700a6b
--- /dev/null
+++ b/required/amsmath/testfiles/github-0216.lvt
@@ -0,0 +1,17 @@
+% test for git #216 (without amsmath)
+
+\documentclass{article}
+
+
+\input{test2e}
+
+
+\START
+
+\DeclareMathAccent{\foo}{\mathalpha}{operators}{"16}
+
+\DeclareMathAccent{\foo}{\mathalpha}{operators}{"16}
+
+
+\END
+
diff --git a/base/testfiles/github-0094.tlg b/required/amsmath/testfiles/github-0216.tlg
similarity index 59%
copy from base/testfiles/github-0094.tlg
copy to required/amsmath/testfiles/github-0216.tlg
index 982addfb..63cececb 100644
--- a/base/testfiles/github-0094.tlg
+++ b/required/amsmath/testfiles/github-0216.tlg
@@ -1,4 +1,3 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
-[2
-] (github-0094.aux)
+LaTeX Font Info:    Redeclaring math accent \foo on input line ....
diff --git a/required/amsmath/testfiles/github-amsmath-0216.lvt b/required/amsmath/testfiles/github-amsmath-0216.lvt
new file mode 100644
index 00000000..bbdd3244
--- /dev/null
+++ b/required/amsmath/testfiles/github-amsmath-0216.lvt
@@ -0,0 +1,22 @@
+% test for git #216
+
+\documentclass{article}
+
+\usepackage{amsmath}
+
+\input{test2e}
+
+
+\START
+
+\show\acute % this should eventually become protected (but isn't right now)!
+
+
+\DeclareMathAccent{\foo}{\mathalpha}{operators}{"16}
+
+
+\DeclareMathAccent{\foo}{\mathalpha}{operators}{"16}
+
+
+\END
+
diff --git a/required/amsmath/testfiles/github-amsmath-0216.tlg b/required/amsmath/testfiles/github-amsmath-0216.tlg
new file mode 100644
index 00000000..2815770e
--- /dev/null
+++ b/required/amsmath/testfiles/github-amsmath-0216.tlg
@@ -0,0 +1,7 @@
+This is a generated file for the LaTeX2e validation system.
+Don't change this file in any respect.
+> \acute=macro:
+->\protect \mathaccentV {acute}013.
+l. ...\show\acute
+                 % this should eventually become protected (but isn't right ...
+LaTeX Font Info:    Redeclaring math accent \foo on input line ....
diff --git a/required/amsmath/testfiles/tlb-amsmath-load.tlg b/required/amsmath/testfiles/tlb-amsmath-load.tlg
index 4adc64d7..ad601ec2 100644
--- a/required/amsmath/testfiles/tlb-amsmath-load.tlg
+++ b/required/amsmath/testfiles/tlb-amsmath-load.tlg
@@ -31,6 +31,17 @@ LaTeX Info: Redefining \cdots on input line ....
 \big at size=\dimen...
 LaTeX Font Info:    Redeclaring font encoding OML on input line ....
 LaTeX Font Info:    Redeclaring font encoding OMS on input line ....
+LaTeX Info: The control sequence `\hat' is already robust on input line ...
+LaTeX Info: The control sequence `\check' is already robust on input line ...
+LaTeX Info: The control sequence `\tilde' is already robust on input line ...
+LaTeX Info: The control sequence `\acute' is already robust on input line ...
+LaTeX Info: The control sequence `\grave' is already robust on input line ...
+LaTeX Info: The control sequence `\dot' is already robust on input line ...
+LaTeX Info: The control sequence `\ddot' is already robust on input line ...
+LaTeX Info: The control sequence `\breve' is already robust on input line ...
+LaTeX Info: The control sequence `\bar' is already robust on input line ...
+LaTeX Info: The control sequence `\vec' is already robust on input line ...
+LaTeX Info: The control sequence `\mathring' is already robust on input line ....
 \macc at depth=\count...
 \c at MaxMatrixCols=\count...
 \dotsspace@=\muskip...
diff --git a/required/amsmath/testfiles/tlb-utex-001.tlg b/required/amsmath/testfiles/tlb-utex-001.tlg
index e6516cac..d9342a37 100644
--- a/required/amsmath/testfiles/tlb-utex-001.tlg
+++ b/required/amsmath/testfiles/tlb-utex-001.tlg
@@ -31,6 +31,17 @@ LaTeX Info: Redefining \cdots on input line ....
 \big at size=\dimen...
 LaTeX Font Info:    Redeclaring font encoding OML on input line ....
 LaTeX Font Info:    Redeclaring font encoding OMS on input line ....
+LaTeX Info: The control sequence `\hat' is already robust on input line ...
+LaTeX Info: The control sequence `\check' is already robust on input line ...
+LaTeX Info: The control sequence `\tilde' is already robust on input line ...
+LaTeX Info: The control sequence `\acute' is already robust on input line ...
+LaTeX Info: The control sequence `\grave' is already robust on input line ...
+LaTeX Info: The control sequence `\dot' is already robust on input line ...
+LaTeX Info: The control sequence `\ddot' is already robust on input line ...
+LaTeX Info: The control sequence `\breve' is already robust on input line ...
+LaTeX Info: The control sequence `\bar' is already robust on input line ...
+LaTeX Info: The control sequence `\vec' is already robust on input line ...
+LaTeX Info: The control sequence `\mathring' is already robust on input line ....
 \macc at depth=\count...
 \c at MaxMatrixCols=\count...
 \dotsspace@=\muskip...





More information about the latex3-commits mailing list