[latex3-commits] [git/LaTeX3-latex3-latex2e] develop, lthooks2: Fixstdminus (#377) (f3a3d9ba)

GitHub noreply at github.com
Tue Aug 25 10:31:48 CEST 2020


Repository : https://github.com/latex3/latex2e
On branches: develop,lthooks2
Link       : https://github.com/latex3/latex2e/commit/f3a3d9ba1d819e06f83b83daab3dc7f0680e1e7e

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

commit f3a3d9ba1d819e06f83b83daab3dc7f0680e1e7e
Author: Ulrike Fischer <news3 at nililand.de>
Date:   Tue Aug 25 10:31:48 2020 +0200

    Fixstdminus (#377)
    
    * detect unicode engines and set std at minus and std at equal accordingly
    
    * add text to ltnews32
    
    Co-authored-by: Ulrike Fischer <fischer at troubleshooting-tex.de>


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

f3a3d9ba1d819e06f83b83daab3dc7f0680e1e7e
 base/doc/ltnews32.tex                              |  6 ++++
 required/amsmath/amsmath.dtx                       | 32 ++++++++++++++++------
 required/amsmath/changes.txt                       | 10 +++++--
 .../amsmath/testfiles/tlb-stdminus.luatex.tlg      |  6 ++--
 required/amsmath/testfiles/tlb-stdminus.lvt        | 16 +++++++++++
 .../amsmath/testfiles/tlb-stdminus.tlg             |  6 ++--
 .../amsmath/testfiles/tlb-stdminus.xetex.tlg       |  6 ++--
 7 files changed, 66 insertions(+), 16 deletions(-)

diff --git a/base/doc/ltnews32.tex b/base/doc/ltnews32.tex
index 71d89ecd..c39ff0c0 100644
--- a/base/doc/ltnews32.tex
+++ b/base/doc/ltnews32.tex
@@ -777,6 +777,12 @@ processed as part of the formula.
 %
 \githubissue{5}
 
+\subsection{Detect unicode engines when setting \cs{std at minus} and \cs{std at equal}}
+
+\pkg{amsmath} now detects the unicode engines and use their extended
+commands to define \cs{std at minus} and \cs{std at equal}. This avoids that package like 
+\pkg{unicode-math} have to patch the code in the begin document hook to exchange the commands.
+
 
 \section{Changes to the \pkg{babel} package}
 
diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index e3ad7c60..05b51683 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}[2020/03/17 v2.17g AMS math features]
+\ProvidesPackage{amsmath}[2020/08/24 v2.17h AMS math features]
 %    \end{macrocode}
 %
 % \section{Catcode defenses}
@@ -2203,17 +2203,33 @@ Foreign command \@backslashchar#1;\MessageBreak
 %    The minus sign used in constructing these arrow fills is smashed so
 %    that superscripts above the arrows won't be too high. This
 %    primarily affects the \cn{xleftarrow} and \cn{xrightarrow} arrows.
-%
+% \changes{v2.17h}{2020/08/24}{detect unicode engines and use their commands}
 %    \begin{macrocode}
-\mathchardef\std at minus\mathcode`\-\relax
-\mathchardef\std at equal\mathcode`\=\relax
+\@ifundefined{Umathcode}
+  {%
+    \mathchardef\std at minus\mathcode`\-\relax
+    \mathchardef\std at equal\mathcode`\=\relax
+  }
+  {%
+   \Umathcharnumdef\std at minus\Umathcodenum`\-\relax
+   \Umathcharnumdef\std at equal\Umathcodenum`\=\relax
+  }
 %    \end{macrocode}
 %    In case some alternative math fonts are loaded later:
 %    \begin{macrocode}
-\AtBeginDocument{%
-  \mathchardef\std at minus\mathcode`\-\relax
-  \mathchardef\std at equal\mathcode`\=\relax
-}
+\@ifundefined{Umathcode}
+  {%
+    \AtBeginDocument{%
+      \mathchardef\std at minus\mathcode`\-\relax
+      \mathchardef\std at equal\mathcode`\=\relax
+      }%
+  }
+  {%
+    \AtBeginDocument{%
+      \Umathcharnumdef\std at minus\Umathcodenum`\-\relax
+      \Umathcharnumdef\std at equal\Umathcodenum`\=\relax
+    }%
+  }
 %    \end{macrocode}
 %
 %    \begin{macro}{\relbar}
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index bf5bbfe3..708510e1 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,4 +1,11 @@
-2020-03-10  Frank Mittelbach  <Frank.Mittelbach at latex-project.org>
+2020-08-24 Ulrike Fischer <Ulrike.Fischer at latex-project.org>
+
+	* amsmath.dtx (section{Extensible arrows}):
+	Detect unicode engines and use \Umathcharnumdef for
+    \std at minus and \std at equal (acc/135)
+
+
+2020-03-10 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
 
 	* amsmath.dtx (subsection{Simple aligning environments}):
 	Explicity test for b,t,c and return optional argument is
@@ -171,4 +178,3 @@
        inside indented lists (displaywidth < columnwidth). Changed the
        multline/fleqn/leqno indent to match mathmargin when possible
        instead of always just using multlinetaggap.
-
diff --git a/base/testfiles-disabled/lthooks2-003.tlg b/required/amsmath/testfiles/tlb-stdminus.luatex.tlg
similarity index 90%
copy from base/testfiles-disabled/lthooks2-003.tlg
copy to required/amsmath/testfiles/tlb-stdminus.luatex.tlg
index 3e824a24..08cc8004 100644
--- a/base/testfiles-disabled/lthooks2-003.tlg
+++ b/required/amsmath/testfiles/tlb-stdminus.luatex.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(lthooks2-003.aux)
+(tlb-stdminus.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,5 +15,7 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
+> \std at minus=\Umathchar"2"00"002212.
+l. ...\show\std at minus
 [1
-] (lthooks2-003.aux)
+] (tlb-stdminus.aux)
diff --git a/required/amsmath/testfiles/tlb-stdminus.lvt b/required/amsmath/testfiles/tlb-stdminus.lvt
new file mode 100644
index 00000000..23b00df8
--- /dev/null
+++ b/required/amsmath/testfiles/tlb-stdminus.lvt
@@ -0,0 +1,16 @@
+\input{regression-test}
+\documentclass{article}
+\usepackage{expl3}%avoid path of backend in the log
+{\fontencoding{TS1}\fontfamily{cmr}\selectfont}%avoid path in the log
+\usepackage{amsmath}
+\ifdefined\Umathcodenum
+\Umathcodenum`\-=4203026\relax
+\fi
+\START
+\begin{document}
+
+\makeatletter
+\show\std at minus
+\makeatother
+xxx
+\end{document}
\ No newline at end of file
diff --git a/base/testfiles-disabled/lthooks2-003.tlg b/required/amsmath/testfiles/tlb-stdminus.tlg
similarity index 91%
copy from base/testfiles-disabled/lthooks2-003.tlg
copy to required/amsmath/testfiles/tlb-stdminus.tlg
index 3e824a24..69a1d304 100644
--- a/base/testfiles-disabled/lthooks2-003.tlg
+++ b/required/amsmath/testfiles/tlb-stdminus.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(lthooks2-003.aux)
+(tlb-stdminus.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,5 +15,7 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
+> \std at minus=\mathchar"2200.
+l. ...\show\std at minus
 [1
-] (lthooks2-003.aux)
+] (tlb-stdminus.aux)
diff --git a/base/testfiles-disabled/lthooks2-003.tlg b/required/amsmath/testfiles/tlb-stdminus.xetex.tlg
similarity index 90%
copy from base/testfiles-disabled/lthooks2-003.tlg
copy to required/amsmath/testfiles/tlb-stdminus.xetex.tlg
index 3e824a24..d5decdad 100644
--- a/base/testfiles-disabled/lthooks2-003.tlg
+++ b/required/amsmath/testfiles/tlb-stdminus.xetex.tlg
@@ -1,6 +1,6 @@
 This is a generated file for the l3build validation system.
 Don't change this file in any respect.
-(lthooks2-003.aux)
+(tlb-stdminus.aux)
 LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line ....
@@ -15,5 +15,7 @@ LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
 LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line ....
 LaTeX Font Info:    ... okay on input line ....
+> \std at minus=\Umathchar"2"0"2212.
+l. ...\show\std at minus
 [1
-] (lthooks2-003.aux)
+] (tlb-stdminus.aux)





More information about the latex3-commits mailing list.