[latex3-commits] [git/LaTeX3-latex3-latex2e] hotfix/gh206: prevent warnings that the base accents are already robust (2131d34d)

Frank Mittelbach frank.mittelbach at latex-project.org
Sun Nov 17 11:34:14 CET 2019


Repository : https://github.com/latex3/latex2e
On branch  : hotfix/gh206
Link       : https://github.com/latex3/latex2e/commit/2131d34d52a0348206ace07617b54e3dd3adfb32

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

commit 2131d34d52a0348206ace07617b54e3dd3adfb32
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sun Nov 17 11:34:14 2019 +0100

    prevent warnings that the base accents  are already robust


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

2131d34d52a0348206ace07617b54e3dd3adfb32
 required/amsmath/amsmath.dtx                       | 15 ++++++--
 required/amsmath/changes.txt                       |  4 ++
 .../testfiles/github-amsmath-0216.luatex.tlg       |  7 ----
 required/amsmath/testfiles/github-amsmath-0216.lvt | 11 +++++-
 required/amsmath/testfiles/github-amsmath-0216.tlg | 13 ++++++-
 .../amsmath/testfiles/github-amsrobust-0123.tlg    | 44 +++++++++++-----------
 required/amsmath/testfiles/tlb-amsmath-load.tlg    | 11 ------
 required/amsmath/testfiles/tlb-utex-001.tlg        | 11 ------
 8 files changed, 59 insertions(+), 57 deletions(-)

diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index 8057e658..11b7545c 100644
--- a/required/amsmath/amsmath.dtx
+++ b/required/amsmath/amsmath.dtx
@@ -1646,10 +1646,12 @@ Foreign command \@backslashchar#1;\MessageBreak
 %    \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.
+%    Now that the redefinitions done inside amsmath of the basic accents
+%    are all robust  we can drop the \cs{protect} here.
 %    \begin{macrocode}
-  \xdef#2{\@nx\protect\@nx\mathaccentV
+  \xdef#2{%
+%    \@nx\protect
+    \@nx\mathaccentV
     {\@xp\@gobble\string#2}\hexnumber@#1#4}%
   \MakeRobust#2%
 }
@@ -1721,6 +1723,13 @@ Foreign command \@backslashchar#1;\MessageBreak
       Unable to redefine math accent \string#5}%
   \fi\fi}
 \def\@tempc#1"#2#3#4#5#6\@nil#7{%
+%    \end{macrocode}
+%    Drop the inner part of the robust accent so that it can be recreated
+%    without a warning.
+% \changes{v2.17d}{2019/11/16}{Make temporarily fragile to match kernel
+%                              change (gh/216)}
+%    \begin{macrocode}
+  \@xp\let\csname\@xp\@gobble\string#7\space\endcsname\@undefined
   \chardef\@tempd="#3\relax\set at mathaccent\@tempd{#7}{#2}{#4#5}}
 \def\@tempd#1\@nil#2{%
     \PackageWarningNoLine{amsmath}{%
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 122b3520..9bab3c47 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,3 +1,7 @@
+#########################
+# 2019-10-01c Release
+#########################
+
 2019-11-16  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* amsmath.dtx (section{Math accents}):
diff --git a/required/amsmath/testfiles/github-amsmath-0216.luatex.tlg b/required/amsmath/testfiles/github-amsmath-0216.luatex.tlg
deleted file mode 100644
index bf550091..00000000
--- a/required/amsmath/testfiles/github-amsmath-0216.luatex.tlg
+++ /dev/null
@@ -1,7 +0,0 @@
-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 now)!
-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
index bbdd3244..4519d577 100644
--- a/required/amsmath/testfiles/github-amsmath-0216.lvt
+++ b/required/amsmath/testfiles/github-amsmath-0216.lvt
@@ -2,6 +2,9 @@
 
 \documentclass{article}
 
+\let\oldacute\acute
+\expandafter\let\expandafter\oldacutespace\csname acute \endcsname
+
 \usepackage{amsmath}
 
 \input{test2e}
@@ -9,7 +12,13 @@
 
 \START
 
-\show\acute % this should eventually become protected (but isn't right now)!
+% accent before and after amsmath ...
+
+\show\oldacute          
+\show\oldacutespace
+
+\show\acute 
+\expandafter\show\csname acute \endcsname
 
 
 \DeclareMathAccent{\foo}{\mathalpha}{operators}{"16}
diff --git a/required/amsmath/testfiles/github-amsmath-0216.tlg b/required/amsmath/testfiles/github-amsmath-0216.tlg
index 2815770e..4ae1d0e0 100644
--- a/required/amsmath/testfiles/github-amsmath-0216.tlg
+++ b/required/amsmath/testfiles/github-amsmath-0216.tlg
@@ -1,7 +1,16 @@
 This is a generated file for the LaTeX2e validation system.
 Don't change this file in any respect.
+> \oldacute=macro:
+->\protect \acute  .
+l. ...\show\oldacute
+> \oldacutespace=macro:
+->\mathaccent "7013\relax .
+l. ...\show\oldacutespace
 > \acute=macro:
-->\protect \mathaccentV {acute}013.
+->\protect \acute  .
 l. ...\show\acute
-                 % this should eventually become protected (but isn't right ...
+> \acute =macro:
+->\mathaccentV {acute}013.
+<recently read> \acute  
+l. ...\expandafter\show\csname acute \endcsname
 LaTeX Font Info:    Redeclaring math accent \foo on input line ....
diff --git a/required/amsmath/testfiles/github-amsrobust-0123.tlg b/required/amsmath/testfiles/github-amsrobust-0123.tlg
index 15f7ed35..73952558 100644
--- a/required/amsmath/testfiles/github-amsrobust-0123.tlg
+++ b/required/amsmath/testfiles/github-amsrobust-0123.tlg
@@ -22,7 +22,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \= -> \={foo}{bar}{baz}
 ---------------------------------------
-\Acute -> \mathaccentV{acute}013{foo}{bar}{baz}
+\Acute -> \acute {foo}{bar}{baz}
 ---------------------------------------
 \AmSfont -> \usefont {OMS}{cmsy}{m}{n}{foo}{bar}{baz}
 ---------------------------------------
@@ -32,7 +32,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \AtBeginDocument -> \GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{foo}{bar}{baz}
 ---------------------------------------
-\Bar -> \mathaccentV{bar}016{foo}{bar}{baz}
+\Bar -> \bar {foo}{bar}{baz}
 ---------------------------------------
 \Biggr -> \Biggr {foo}{bar}{baz}
 ---------------------------------------
@@ -42,9 +42,9 @@ Don't change this file in any respect.
 ---------------------------------------
 \Big -> \leavevmode at ifvmode {\setbox \z@ \hbox {\mathsurround \z@ $\nulldelimiterspace \z@ \left foo\vcenter to1.5\big at size {}\right .$}\box \z@ }{bar}{baz}
 ---------------------------------------
-\Breve -> \mathaccentV{breve}015{foo}{bar}{baz}
+\Breve -> \breve {foo}{bar}{baz}
 ---------------------------------------
-\Check -> \mathaccentV{check}014{foo}{bar}{baz}
+\Check -> \check {foo}{bar}{baz}
 ---------------------------------------
 \DOTSB -> \DOTSB {foo}{bar}{baz}
 ---------------------------------------
@@ -52,9 +52,9 @@ Don't change this file in any respect.
 ---------------------------------------
 \DOTSX -> \DOTSX {foo}{bar}{baz}
 ---------------------------------------
-\Ddot -> \mathaccentV{ddot}07F{foo}{bar}{baz}
+\Ddot -> \ddot {foo}{bar}{baz}
 ---------------------------------------
-\Dot -> \mathaccentV{dot}05F{foo}{bar}{baz}
+\Dot -> \dot {foo}{bar}{baz}
 ---------------------------------------
 \ExecuteOptions -> \GenericError {               }{LaTeX Error: Can be used only in preamble}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{foo}{bar}{baz}
 ---------------------------------------
@@ -64,9 +64,9 @@ Don't change this file in any respect.
 ---------------------------------------
 \GenericWarning -> \GenericWarning {foo}{bar}{baz}
 ---------------------------------------
-\Grave -> \mathaccentV{grave}012{foo}{bar}{baz}
+\Grave -> \grave {foo}{bar}{baz}
 ---------------------------------------
-\Hat -> \mathaccentV{hat}05E{foo}{bar}{baz}
+\Hat -> \hat {foo}{bar}{baz}
 ---------------------------------------
 \Leftarrow -> \Leftarrow {foo}{bar}{baz}
 ---------------------------------------
@@ -90,9 +90,9 @@ Don't change this file in any respect.
 ---------------------------------------
 \Rightarrow -> \Rightarrow {foo}{bar}{baz}
 ---------------------------------------
-\Tilde -> \mathaccentV{tilde}07E{foo}{bar}{baz}
+\Tilde -> \tilde {foo}{bar}{baz}
 ---------------------------------------
-\Vec -> \mathaccentV{vec}17E{foo}{bar}{baz}
+\Vec -> \vec {foo}{bar}{baz}
 ---------------------------------------
 \Vert -> \Vert {foo}{bar}{baz}
 ---------------------------------------
@@ -106,7 +106,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \above -> \primfrac {above}{foo}{bar}{baz}
 ---------------------------------------
-\acute -> \mathaccentV{acute}013{foo}{bar}{baz}
+\acute -> \acute {foo}{bar}{baz}
 ---------------------------------------
 \addtocounter -> \GenericError {               }{LaTeX Error: No counter 'foo' defined}{See the LaTeX manual or LaTeX Companion for explanation.}{Your command was ignored.\MessageBreak Type  I <command> <return>  to replace it with another command,\MessageBreak or  <return>  to continue without it.}{baz}
 ---------------------------------------
@@ -140,7 +140,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \badness -> \badness {foo}{bar}{baz}
 ---------------------------------------
-\bar -> \mathaccentV{bar}016{foo}{bar}{baz}
+\bar -> \bar {foo}{bar}{baz}
 ---------------------------------------
 \baselineskip -> \baselineskip {foo}{bar}{baz}
 ---------------------------------------
@@ -186,7 +186,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \box -> \box {foo}{bar}{baz}
 ---------------------------------------
-\breve -> \mathaccentV{breve}015{foo}{bar}{baz}
+\breve -> \breve {foo}{bar}{baz}
 ---------------------------------------
 \cases -> \GenericError {(amsmath)                }{Package amsmath Error: Old form `\cases' should be \begin{cases}}{See the amsmath package documentation for explanation.}{`\cases{...}' is old Plain-TeX syntax whose use is ill-advised in LaTeX.}{foo}{bar}{baz}
 ---------------------------------------
@@ -200,7 +200,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \char -> \char {foo}{bar}{baz}
 ---------------------------------------
-\check -> \mathaccentV{check}014{foo}{bar}{baz}
+\check -> \check {foo}{bar}{baz}
 ---------------------------------------
 \cleaders -> \cleaders {foo}{bar}{baz}
 ---------------------------------------
@@ -232,7 +232,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \dddot -> {\mathop {foo}\limits ^{\vbox to-1.4\ex@ {\kern -\tw@ \ex@ \hbox {\normalfont ...}\vss }}}{bar}{baz}
 ---------------------------------------
-\ddot -> \mathaccentV{ddot}07F{foo}{bar}{baz}
+\ddot -> \ddot {foo}{bar}{baz}
 ---------------------------------------
 \def -> \def {foo}{bar}{baz}
 ---------------------------------------
@@ -274,7 +274,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \dots -> \dots {foo}{bar}{baz}
 ---------------------------------------
-\dot -> \mathaccentV{dot}05F{foo}{bar}{baz}
+\dot -> \dot {foo}{bar}{baz}
 ---------------------------------------
 \do -> {foo}{bar}{baz}
 ---------------------------------------
@@ -322,11 +322,11 @@ Don't change this file in any respect.
 ---------------------------------------
 \global -> \global {foo}{bar}{baz}
 ---------------------------------------
-\grave -> \mathaccentV{grave}012{foo}{bar}{baz}
+\grave -> \grave {foo}{bar}{baz}
 ---------------------------------------
 \halign -> \halign {foo}{bar}{baz}
 ---------------------------------------
-\hat -> \mathaccentV{hat}05E{foo}{bar}{baz}
+\hat -> \hat {foo}{bar}{baz}
 ---------------------------------------
 \hbox -> \hbox {foo}{bar}{baz}
 ---------------------------------------
@@ -494,7 +494,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \mathrel -> \mathrel {foo}{bar}{baz}
 ---------------------------------------
-\mathring -> \mathaccentV{mathring}017{foo}{bar}{baz}
+\mathring -> \mathring {foo}{bar}{baz}
 ---------------------------------------
 \mathsurround -> \mathsurround {foo}{bar}{baz}
 ---------------------------------------
@@ -712,7 +712,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \spdot -> ^{\hbox {\raise \ex@ \hbox {\normalfont .}}}{foo}{bar}{baz}
 ---------------------------------------
-\sphat -> ^{\mathchoice {}{}{\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\smash[b]{\hbox {\lower 4\ex@ \hbox {$\mathsurround \z@ \widehat {\hbox {}}$}}}}{\tmspace +\thinmuskip {.1667em}\smash[b]{\hbox {\lower 3\ex@ \hbox {$\mathsurround \z@ \mathaccentV{hat}05E{\hbox {}}$}}}}}{foo}{bar}{baz}
+\sphat -> ^{\mathchoice {}{}{\tmspace +\thinmuskip {.1667em}\tmspace +\thinmuskip {.1667em}\smash[b]{\hbox {\lower 4\ex@ \hbox {$\mathsurround \z@ \widehat {\hbox {}}$}}}}{\tmspace +\thinmuskip {.1667em}\smash[b]{\hbox {\lower 3\ex@ \hbox {$\mathsurround \z@ \hat {\hbox {}}$}}}}}{foo}{bar}{baz}
 ---------------------------------------
 \sptilde -> ^\sim {foo}{bar}{baz}
 ---------------------------------------
@@ -764,7 +764,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \thinspace -> \tmspace +\thinmuskip {.1667em}{foo}{bar}{baz}
 ---------------------------------------
-\tilde -> \mathaccentV{tilde}07E{foo}{bar}{baz}
+\tilde -> \tilde {foo}{bar}{baz}
 ---------------------------------------
 \tmspace -> \tmspace {foo}{bar}{baz}
 ---------------------------------------
@@ -830,7 +830,7 @@ Don't change this file in any respect.
 ---------------------------------------
 \vcenter -> \vcenter {foo}{bar}{baz}
 ---------------------------------------
-\vec -> \mathaccentV{vec}17E{foo}{bar}{baz}
+\vec -> \vec {foo}{bar}{baz}
 ---------------------------------------
 \vee -> \vee {foo}{bar}{baz}
 ---------------------------------------
diff --git a/required/amsmath/testfiles/tlb-amsmath-load.tlg b/required/amsmath/testfiles/tlb-amsmath-load.tlg
index ad601ec2..4adc64d7 100644
--- a/required/amsmath/testfiles/tlb-amsmath-load.tlg
+++ b/required/amsmath/testfiles/tlb-amsmath-load.tlg
@@ -31,17 +31,6 @@ 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 d9342a37..e6516cac 100644
--- a/required/amsmath/testfiles/tlb-utex-001.tlg
+++ b/required/amsmath/testfiles/tlb-utex-001.tlg
@@ -31,17 +31,6 @@ 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