summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/amsmath
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-12-11 22:32:49 +0000
committerKarl Berry <karl@freefriends.org>2018-12-11 22:32:49 +0000
commitb8f67cb908880c8fdf6b03eb9c4d5219d7409171 (patch)
tree87574d214a3f39e7293bc54e2b40076ae052bed3 /Master/texmf-dist/source/latex/amsmath
parent6ffd766f7627989e12bfb89d63f908de8c052c81 (diff)
latex(2e) (11dec18)
git-svn-id: svn://tug.org/texlive/trunk@49390 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/amsmath')
-rw-r--r--Master/texmf-dist/source/latex/amsmath/amsmath.dtx57
1 files changed, 53 insertions, 4 deletions
diff --git a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx b/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
index d597f74b7cb..8e4943235f0 100644
--- a/Master/texmf-dist/source/latex/amsmath/amsmath.dtx
+++ b/Master/texmf-dist/source/latex/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}
@@ -224,7 +236,7 @@ Bug reports can be opened (category \texttt{#1}) at\\%
% Previously \cn{aligned} and \cn{gathered} inserted a thin space on
% their left but not their right, there is no good reason for this
% that anyone can remember, it has just always been that way
-% inherited from amstex. The usual advice to authors has bben to use
+% inherited from amstex. The usual advice to authors has been to use
% |\!\begin{aligned}| to get better spacing.
%
% Here introduce:
@@ -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@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@everymath}}
% \begin{macrocode}
+\ifx\leavevmode@ifvmode\@undefined % kernel is < 2018/12
\def\@mathmeasure#1#2#3{\setbox#1\hbox{\frozen@everymath\@emptytoks
+ \m@th$#2#3$}}
+\else
+\def\@mathmeasure#1#2#3{\setbox#1\hbox{%
\m@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@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@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@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@size{}\right.}%
\box\z@}}
+\else
+\def\bBigg@#1#2{\leavevmode@ifvmode
+ {\@mathmeasure\z@{\nulldelimiterspace\z@}%
+ {\left#2\vcenter to#1\big@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@ifvmode\@undefined
\renewcommand{\smash}[1][tb]{%
\def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}%
- \edef\finsm@sh{\csname mb@#1\endcsname\z@\z@ \box\z@}%
+ \edef\finsm@sh{\csname mb@#1\endcsname\z@\z@\box\z@}%
\ifmmode \@xp\mathpalette\@xp\mathsm@sh
\else \@xp\makesm@sh
\fi
}
+\else
+\renewcommand{\smash}[1][tb]{%
+ \def\mb@t{\ht}\def\mb@b{\dp}\def\mb@tb{\ht\z@\z@\dp}%
+ \edef\finsm@sh{\csname mb@#1\endcsname\z@\z@ \leavevmode@ifvmode\box\z@}%
+ \ifmmode \@xp\mathpalette\@xp\mathsm@sh
+ \else \@xp\makesm@sh
+ \fi
+}
+\fi
% \end{macrocode}
% \end{macro}
%