[latex3-commits] [git/LaTeX3-latex3-latex2e] master: fix for #49 and #50 (3c0d614)
Frank Mittelbach
frank.mittelbach at latex-project.org
Tue Oct 9 09:45:50 CEST 2018
Repository : https://github.com/latex3/latex2e
On branch : master
Link : https://github.com/latex3/latex2e/commit/3c0d61443d906f91d76df71e01b9c5316b62f89e
>---------------------------------------------------------------
commit 3c0d61443d906f91d76df71e01b9c5316b62f89e
Author: Frank Mittelbach <frank.mittelbach at latex-project.org>
Date: Tue Oct 9 09:45:50 2018 +0200
fix for #49 and #50
>---------------------------------------------------------------
3c0d61443d906f91d76df71e01b9c5316b62f89e
required/amsmath/amsmath.dtx | 55 ++++++++++++-
required/amsmath/changes.txt | 8 ++
.../amsmath/testfiles/github-amsmath-0049.lvt | 3 +
.../amsmath/testfiles/github-amsmath-0049.tlg | 86 ++++++++++----------
.../amsmath/testfiles/github-amsmath-0049b.lvt | 3 +-
.../amsmath/testfiles/github-amsmath-0049b.tlg | 70 ++++++++--------
6 files changed, 141 insertions(+), 84 deletions(-)
diff --git a/required/amsmath/amsmath.dtx b/required/amsmath/amsmath.dtx
index d597f74..1fc4351 100644
--- a/required/amsmath/amsmath.dtx
+++ b/required/amsmath/amsmath.dtx
@@ -2,7 +2,7 @@
% \iffalse meta-comment
%
% Copyright 1995, 2000, 2013 American Mathematical Society.
-% Copyright 2016-2017 LaTeX3 Project and American Mathematical Society.
+% Copyright 2016-2018 LaTeX3 Project and American Mathematical Society.
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3c
@@ -74,7 +74,19 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}% LaTeX 2.09 can't be used (nor non-LaTeX)
[1994/12/01]% LaTeX date must be December 1994 or later
-\ProvidesPackage{amsmath}[2017/09/02 v2.17a AMS math features]
+% \end{macrocode}
+%
+% Not yet used but for the future \ldots
+% \begin{macrocode}
+%\providecommand\DeclareRelease[3]{}
+%\providecommand\DeclareCurrentRelease[2]{}
+%
+%\DeclareRelease{}{2017-09-02}{amsmath-2017-09-02.sty}
+%\DeclareCurrentRelease{}{2018-12-01}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\ProvidesPackage{amsmath}[2018/12/01 v2.17b AMS math features]
% \end{macrocode}
%
% \section{Catcode defenses}
@@ -405,9 +417,18 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
% mathstyle, and the result is left in the box named by the first
% arg. It is assumed that we are already in math mode, so we can turn
% off |\everymath| (in particular, |\check at mathfonts|).
+%
+% As of 2018/12 release we don't turn off |\evermath| as this
+% optimization can be harmful.
+% \changes{v2.17b}{2018/12/01}{Don't drop \cs{frozen at everymath}}
% \begin{macrocode}
+\ifx\leavevmode at ifvmode\@undefined % kernel is < 2018/12
\def\@mathmeasure#1#2#3{\setbox#1\hbox{\frozen at everymath\@emptytoks
+ \m at th$#2#3$}}
+\else
+\def\@mathmeasure#1#2#3{\setbox#1\hbox{%
\m at th$#2#3$}}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -440,9 +461,16 @@ For additional information on amsmath, use the \lq ?\rq\space option.%
% them. The standard \cs{relax} before the \cs{ifmmode} is not
% necessary because of the \cs{protect} added by
% \cs{DeclareRobustCommand}.
+% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{thinspace} and
+% friends if necessary (github/49)}
% \begin{macrocode}
+\ifx\leavevmode at ifvmode\@undefined
\DeclareRobustCommand{\tmspace}[3]{%
\ifmmode\mskip#1#2\else\kern#1#3\fi\relax}
+\else
+\DeclareRobustCommand{\tmspace}[3]{%
+ \ifmmode\mskip#1#2\else\leavevmode at ifvmode\kern#1#3\fi\relax}
+\fi
\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}}
\let\thinspace\,
\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}}
@@ -1538,7 +1566,10 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\bBigg@}
% Now we tackle the macro which has to do the real work. It
% actually has two arguments, the factor and the wanted delimiter.
+% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{bigl} and
+% friends if necessary (github/49)}
% \begin{macrocode}
+\ifx\leavevmode at ifvmode\@undefined
\def\bBigg@#1#2{%
% \end{macrocode}
% We start with an extra set of braces because we want
@@ -1548,6 +1579,12 @@ Foreign command \@backslashchar#1;\MessageBreak
{\@mathmeasure\z@{\nulldelimiterspace\z@}%
{\left#2\vcenter to#1\big at size{}\right.}%
\box\z@}}
+\else
+\def\bBigg@#1#2{\leavevmode at ifvmode
+ {\@mathmeasure\z@{\nulldelimiterspace\z@}%
+ {\left#2\vcenter to#1\big at size{}\right.}%
+ \box\z@}}
+\fi
% \end{macrocode}
% \end{macro}
%
@@ -2072,14 +2109,26 @@ Foreign command \@backslashchar#1;\MessageBreak
% \begin{macro}{\smash}
% We add to the \cn{smash} command an optional argument
% denoting the part of the formula to be smashed.
+% \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{smash}
+% if necessary (github/49)}
% \begin{macrocode}
+\ifx\leavevmode at ifvmode\@undefined
\renewcommand{\smash}[1][tb]{%
\def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
- \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@ \box\z@}%
+ \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@\box\z@}%
\ifmmode \@xp\mathpalette\@xp\mathsm at sh
\else \@xp\makesm at sh
\fi
}
+\else
+\renewcommand{\smash}[1][tb]{%
+ \def\mb at t{\ht}\def\mb at b{\dp}\def\mb at tb{\ht\z@\z@\dp}%
+ \edef\finsm at sh{\csname mb@#1\endcsname\z@\z@ \leavevmode at ifvmode\box\z@}%
+ \ifmmode \@xp\mathpalette\@xp\mathsm at sh
+ \else \@xp\makesm at sh
+ \fi
+}
+\fi
% \end{macrocode}
% \end{macro}
%
diff --git a/required/amsmath/changes.txt b/required/amsmath/changes.txt
index 398763e..cd9bf23 100644
--- a/required/amsmath/changes.txt
+++ b/required/amsmath/changes.txt
@@ -1,3 +1,11 @@
+2018-10-09 Frank Mittelbach <Frank.Mittelbach at latex-project.org>
+
+ * amsmath.dtx
+ Don't drop \frozen at everymath
+ Start LR-mode for \thinspace and friends if necessary (github/49)
+ Start LR-mode for \bigl and friends if necessary (github/49)
+ Start LR-mode for \smash if necessary (github/49)
+
2017-09-02 David Carlisle <latex-bugs at latex-project.org>
* amsmath.dtx: ensure that overfull alignments give warnings in more cases
diff --git a/base/testfiles/github-0049.lvt b/required/amsmath/testfiles/github-amsmath-0049.lvt
similarity index 98%
copy from base/testfiles/github-0049.lvt
copy to required/amsmath/testfiles/github-amsmath-0049.lvt
index b3fd0c8..f372ccc 100644
--- a/base/testfiles/github-0049.lvt
+++ b/required/amsmath/testfiles/github-amsmath-0049.lvt
@@ -2,6 +2,8 @@
\documentclass{article}
+\usepackage{amsmath}
+
\input{test2e}
\showoutput
@@ -57,6 +59,7 @@ Another test sentence.
A test sentence.
+
\big(
Another test sentence.
diff --git a/base/testfiles/github-0049b.tlg b/required/amsmath/testfiles/github-amsmath-0049.tlg
similarity index 97%
copy from base/testfiles/github-0049b.tlg
copy to required/amsmath/testfiles/github-amsmath-0049.tlg
index 9cb2e74..d9b5d0e 100644
--- a/base/testfiles/github-0049b.tlg
+++ b/required/amsmath/testfiles/github-amsmath-0049.tlg
@@ -1,9 +1,5 @@
This is a generated file for the LaTeX2e validation system.
Don't change this file in any respect.
-LaTeX Font Info: External font `cmex7' loaded for size
-(Font) <7> on input line ....
-LaTeX Font Info: External font `cmex7' loaded for size
-(Font) <5> on input line ....
Completed box being shipped out [1]
\vbox(633.0+0.0)x407.0
.\glue 16.0
@@ -604,7 +600,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^@
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\penalty 10000
@@ -649,7 +645,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^@
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\OT1/cmr/m/n/10 A
@@ -682,7 +678,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^A
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\glue 3.33333 plus 1.66666 minus 1.11111
@@ -732,7 +728,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^@
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\OML/cmm/m/it/10 a
@@ -741,7 +737,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^A
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\glue(\thickmuskip) 2.77771 plus 2.77771
@@ -785,7 +781,7 @@ Completed box being shipped out [1]
.....\hbox(8.50005+3.50006)x4.58336
......\hbox(0.39998+11.60013)x4.58336, shifted -8.10007
.......\OMX/cmex/m/n/10 ^^A
-......\vbox(8.49998+3.49998)x0.0
+......\vbox(8.49998+3.49997)x0.0
......\hbox(0.0+0.0)x0.0, shifted -2.5
.....\mathoff
....\mathoff
@@ -856,13 +852,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 12.0
-...\hbox(0.0+0.0)x345.0, glue set 321.66641fil
+...\hbox(0.0+0.0)x345.0, glue set 321.66489fil
....\hbox(0.0+0.0)x15.0
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
@@ -898,13 +894,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 79.5824fil
+...\hbox(6.94444+1.94444)x345.0, glue set 79.57935fil
....\hbox(0.0+0.0)x15.0
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66498 minus 1.11221
....\OT1/cmr/m/n/10 f
@@ -928,11 +924,11 @@ Completed box being shipped out [2]
....\OT1/cmr/m/n/10 n
....\OT1/cmr/m/n/10 d
....\glue 3.33333 plus 1.66666 minus 1.11111
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\glue 3.33333 plus 1.66666 minus 1.11111
....\OT1/cmr/m/n/10 i
....\OT1/cmr/m/n/10 n
@@ -1018,13 +1014,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 12.0
-...\hbox(0.0+0.0)x345.0, glue set 338.33359fil
+...\hbox(0.0+0.0)x345.0, glue set 338.33511fil
....\hbox(0.0+0.0)x15.0
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
@@ -1060,13 +1056,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 116.25008fil
+...\hbox(6.94444+1.94444)x345.0, glue set 116.25313fil
....\hbox(0.0+0.0)x15.0
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66498 minus 1.11221
....\OT1/cmr/m/n/10 f
@@ -1090,11 +1086,11 @@ Completed box being shipped out [2]
....\OT1/cmr/m/n/10 n
....\OT1/cmr/m/n/10 d
....\glue 3.33333 plus 1.66666 minus 1.11111
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\OT1/cmr/m/n/10 i
....\OT1/cmr/m/n/10 n
....\glue 3.33333 plus 1.66666 minus 1.11111
@@ -1425,4 +1421,4 @@ Completed box being shipped out [2]
...\glue 0.0 plus 1.0fil
...\OT1/cmr/m/n/10 2
...\glue 0.0 plus 1.0fil
-(github-0049b.aux)
+(github-amsmath-0049.aux)
diff --git a/base/testfiles/github-0049b.lvt b/required/amsmath/testfiles/github-amsmath-0049b.lvt
similarity index 96%
copy from base/testfiles/github-0049b.lvt
copy to required/amsmath/testfiles/github-amsmath-0049b.lvt
index 0ddfbec..5a0ec41 100644
--- a/base/testfiles/github-0049b.lvt
+++ b/required/amsmath/testfiles/github-amsmath-0049b.lvt
@@ -1,7 +1,8 @@
-% test for git #49 (but with exscale
+% test for git #49 (but with exscale)
\documentclass{article}
+\usepackage{amsmath}
\usepackage{exscale}
\input{test2e}
diff --git a/base/testfiles/github-0049b.tlg b/required/amsmath/testfiles/github-amsmath-0049b.tlg
similarity index 98%
copy from base/testfiles/github-0049b.tlg
copy to required/amsmath/testfiles/github-amsmath-0049b.tlg
index 9cb2e74..0cb580e 100644
--- a/base/testfiles/github-0049b.tlg
+++ b/required/amsmath/testfiles/github-amsmath-0049b.tlg
@@ -856,13 +856,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 12.0
-...\hbox(0.0+0.0)x345.0, glue set 321.66641fil
+...\hbox(0.0+0.0)x345.0, glue set 321.66489fil
....\hbox(0.0+0.0)x15.0
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
@@ -898,13 +898,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 79.5824fil
+...\hbox(6.94444+1.94444)x345.0, glue set 79.57935fil
....\hbox(0.0+0.0)x15.0
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66498 minus 1.11221
....\OT1/cmr/m/n/10 f
@@ -928,11 +928,11 @@ Completed box being shipped out [2]
....\OT1/cmr/m/n/10 n
....\OT1/cmr/m/n/10 d
....\glue 3.33333 plus 1.66666 minus 1.11111
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
-....\kern 1.66672
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
+....\kern 1.66702
....\glue 3.33333 plus 1.66666 minus 1.11111
....\OT1/cmr/m/n/10 i
....\OT1/cmr/m/n/10 n
@@ -1018,13 +1018,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 12.0
-...\hbox(0.0+0.0)x345.0, glue set 338.33359fil
+...\hbox(0.0+0.0)x345.0, glue set 338.33511fil
....\hbox(0.0+0.0)x15.0
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\penalty 10000
....\glue(\parfillskip) 0.0 plus 1.0fil
....\glue(\rightskip) 0.0
@@ -1060,13 +1060,13 @@ Completed box being shipped out [2]
....\glue(\rightskip) 0.0
...\glue(\parskip) 0.0 plus 1.0
...\glue(\baselineskip) 5.05556
-...\hbox(6.94444+1.94444)x345.0, glue set 116.25008fil
+...\hbox(6.94444+1.94444)x345.0, glue set 116.25313fil
....\hbox(0.0+0.0)x15.0
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\OT1/cmr/m/n/10 A
....\glue 3.33333 plus 1.66498 minus 1.11221
....\OT1/cmr/m/n/10 f
@@ -1090,11 +1090,11 @@ Completed box being shipped out [2]
....\OT1/cmr/m/n/10 n
....\OT1/cmr/m/n/10 d
....\glue 3.33333 plus 1.66666 minus 1.11111
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
-....\kern -1.66672
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
+....\kern -1.66702
....\OT1/cmr/m/n/10 i
....\OT1/cmr/m/n/10 n
....\glue 3.33333 plus 1.66666 minus 1.11111
@@ -1425,4 +1425,4 @@ Completed box being shipped out [2]
...\glue 0.0 plus 1.0fil
...\OT1/cmr/m/n/10 2
...\glue 0.0 plus 1.0fil
-(github-0049b.aux)
+(github-amsmath-0049b.aux)
More information about the latex3-commits
mailing list