[latex3-commits] [git/LaTeX3-latex3-latex2e] develop: make alias math declarations independent (#184) (bf7670b2)

Frank Mittelbach frank.mittelbach at latex-project.org
Sat Sep 21 11:25:59 CEST 2019


Repository : https://github.com/latex3/latex2e
On branch  : develop
Link       : https://github.com/latex3/latex2e/commit/bf7670b268760651370c54fb90320f0fb8350e00

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

commit bf7670b268760651370c54fb90320f0fb8350e00
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date:   Sat Sep 21 11:25:59 2019 +0200

    make alias math declarations independent (#184)


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

bf7670b268760651370c54fb90320f0fb8350e00
 base/changes.txt                             |  5 +++++
 base/fontdef.dtx                             | 28 +++++++++++++++++++++++++---
 base/testfiles/github-robust-0123.luatex.tlg |  4 ++--
 base/testfiles/github-robust-0123.tlg        |  4 ++--
 base/testfiles/github-robust-0123.xetex.tlg  |  4 ++--
 5 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/base/changes.txt b/base/changes.txt
index 7ca44f82..385ad8e8 100644
--- a/base/changes.txt
+++ b/base/changes.txt
@@ -4,6 +4,11 @@ completeness or accuracy and it contains some references to files that
 are not part of the distribution.
 =======================================================================
 
+2019-09-21  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+
+	* fontdef.dtx:
+	Make alias definition reobust independently (gh/184)
+
 2019-09-16  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
 
 	* ltxdoc.dtx (section{Old Comments}):
diff --git a/base/fontdef.dtx b/base/fontdef.dtx
index 38d51411..5675f3e4 100644
--- a/base/fontdef.dtx
+++ b/base/fontdef.dtx
@@ -39,7 +39,7 @@
 %<driver, >\ProvidesFile{fontdef.drv}
 % \fi
 %          \ProvidesFile{fontdef.dtx}
-%<-latexrelease>           [2019/08/27 v3.0c LaTeX Kernel
+%<-latexrelease>           [2019/09/21 v3.0d LaTeX Kernel
 % \iftrue  (\else
 %<text,   >(Text
 %<math,   >(Math
@@ -966,7 +966,18 @@
 \DeclareMathSymbol{\Leftrightarrow}{\mathrel}{symbols}{"2C}
 \DeclareMathSymbol{\Leftarrow}{\mathrel}{symbols}{"28}
 \DeclareMathSymbol{\Rightarrow}{\mathrel}{symbols}{"29}
-\DeclareRobustCommand\neq{\not=} \let\ne=\neq
+\DeclareRobustCommand\neq{\not=}
+%    \end{macrocode}
+%    As \cs{neq} is robust we should not use \cs{let} to define
+%    \cs{ne} as then then it would change if \cs{neq} changes.
+% \changes{v3.0d}{2019/09/21}{Distangle alias (gh/184)}
+%   the file} 
+%    \begin{macrocode}
+%\let\ne=\neq
+\DeclareRobustCommand\ne{\not=}
+%    \end{macrocode}
+%    It is ok to use \cs{let} for those declared by \cs{DeclareMathSymbol}.
+%    \begin{macrocode}
 \DeclareMathSymbol{\leq}{\mathrel}{symbols}{"14}
    \let\le=\leq
 \DeclareMathSymbol{\geq}{\mathrel}{symbols}{"15}
@@ -1216,7 +1227,18 @@
    {\mathord}{symbols}{"6B}{largesymbols}{"3D}
 \DeclareMathDelimiter{\Vert}
    {\mathord}{symbols}{"6B}{largesymbols}{"0D}
-\let\|=\Vert
+%    \end{macrocode}
+%    \cs{DeclareMathDelimiter} produces a command that is robust (with
+%    an internal macro containing the payload) so we should not use
+%    \cs{let} for making an alias
+% \changes{v3.0d}{2019/09/21}{Distangle alias (gh/184)}
+%    \begin{macrocode}
+%\let\|=\Vert
+\DeclareMathDelimiter{\|}
+   {\mathord}{symbols}{"6B}{largesymbols}{"0D}
+%    \end{macrocode}
+%
+%    \begin{macrocode}
 \DeclareMathDelimiter{\vert}
    {\mathord}{symbols}{"6A}{largesymbols}{"0C}
 \DeclareMathDelimiter{\uparrow}
diff --git a/base/testfiles/github-robust-0123.luatex.tlg b/base/testfiles/github-robust-0123.luatex.tlg
index db8eb043..f3fcd10c 100644
--- a/base/testfiles/github-robust-0123.luatex.tlg
+++ b/base/testfiles/github-robust-0123.luatex.tlg
@@ -1341,7 +1341,7 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \newline -> \newline 
 ---------------------------------------
-\ne -> \neq 
+\ne -> \ne 
 ---------------------------------------
 \ng -> \ng 
 ---------------------------------------
@@ -2153,7 +2153,7 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \zeta -> \zeta 
 ---------------------------------------
-\| -> \Vert 
+\| -> \|
 ---------------------------------------
 \~ -> \~
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.tlg b/base/testfiles/github-robust-0123.tlg
index 65105166..fda1ffa5 100644
--- a/base/testfiles/github-robust-0123.tlg
+++ b/base/testfiles/github-robust-0123.tlg
@@ -1325,7 +1325,7 @@ l. ......fter\show\csname Downarrow\space\endcsname
 ---------------------------------------
 \newline -> \newline 
 ---------------------------------------
-\ne -> \neq 
+\ne -> \ne 
 ---------------------------------------
 \ng -> \ng 
 ---------------------------------------
@@ -2137,7 +2137,7 @@ l. ......fter\show\csname Downarrow\space\endcsname
 ---------------------------------------
 \zeta -> \zeta 
 ---------------------------------------
-\| -> \Vert 
+\| -> \|
 ---------------------------------------
 \~ -> \~
 ---------------------------------------
diff --git a/base/testfiles/github-robust-0123.xetex.tlg b/base/testfiles/github-robust-0123.xetex.tlg
index 3ce660e7..67abf4c9 100644
--- a/base/testfiles/github-robust-0123.xetex.tlg
+++ b/base/testfiles/github-robust-0123.xetex.tlg
@@ -1341,7 +1341,7 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \newline -> \newline 
 ---------------------------------------
-\ne -> \neq 
+\ne -> \ne 
 ---------------------------------------
 \ng -> \ng 
 ---------------------------------------
@@ -2153,7 +2153,7 @@ and I'll forget about whatever was undefined.
 ---------------------------------------
 \zeta -> \zeta 
 ---------------------------------------
-\| -> \Vert 
+\| -> \|
 ---------------------------------------
 \~ -> \~
 ---------------------------------------





More information about the latex3-commits mailing list