diff options
Diffstat (limited to 'macros/latex/required/amsmath')
17 files changed, 215 insertions, 32 deletions
diff --git a/macros/latex/required/amsmath/README.md b/macros/latex/required/amsmath/README.md index 86a7b2f9df..91311f7ad9 100644 --- a/macros/latex/required/amsmath/README.md +++ b/macros/latex/required/amsmath/README.md @@ -1,7 +1,7 @@ The amsmath bundle for LaTeX ============================ -Release 2020-02-02 +Release 2020-10-01 Overview -------- diff --git a/macros/latex/required/amsmath/amsbsy.pdf b/macros/latex/required/amsmath/amsbsy.pdf Binary files differindex ea99b7c38b..bea7406f3e 100644 --- a/macros/latex/required/amsmath/amsbsy.pdf +++ b/macros/latex/required/amsmath/amsbsy.pdf diff --git a/macros/latex/required/amsmath/amscd.pdf b/macros/latex/required/amsmath/amscd.pdf Binary files differindex d0ded9a061..15ec33cb58 100644 --- a/macros/latex/required/amsmath/amscd.pdf +++ b/macros/latex/required/amsmath/amscd.pdf diff --git a/macros/latex/required/amsmath/amsgen.pdf b/macros/latex/required/amsmath/amsgen.pdf Binary files differindex c1282031c5..f50fc766d8 100644 --- a/macros/latex/required/amsmath/amsgen.pdf +++ b/macros/latex/required/amsmath/amsgen.pdf diff --git a/macros/latex/required/amsmath/amsldoc.pdf b/macros/latex/required/amsmath/amsldoc.pdf Binary files differindex 104066c062..8ab82551e0 100644 --- a/macros/latex/required/amsmath/amsldoc.pdf +++ b/macros/latex/required/amsmath/amsldoc.pdf diff --git a/macros/latex/required/amsmath/amsldoc.tex b/macros/latex/required/amsmath/amsldoc.tex index 1c2bfbdd8b..b29a8b8468 100644 --- a/macros/latex/required/amsmath/amsldoc.tex +++ b/macros/latex/required/amsmath/amsldoc.tex @@ -64,7 +64,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% \title{User's Guide for the \nipkg{amsmath} Package (Version~2.1)} \author{American Mathematical Society, \LaTeX3 Project} -\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14)} +\date{1999-12-13\\(revised 2002-02-25, 2016-11-14, 2018-04-05, 2019-10-14, 2020-02-18)} \makeatletter \def\@thanks{\bigskip\MaintainedByLaTeXTeam{amslatex}} \makeatother @@ -928,7 +928,11 @@ in accurately calculating the profile of an equation can occasionally result in number movement that doesn't look right. A \cn{raisetag} command is provided to adjust the vertical position of the current equation number, if it has been shifted away from its normal -position. To move a particular number up by six points, write +position. If it is in its normal position the command has no effect whatsoever. +In particular, this means that one can't use it to shift the tag of an \env{equation} +environment. + +To move a particular number up by six points, write |\raisetag{6pt}|. (At the end of a display, this also shifts up the text following the display.) This kind of adjustment is fine tuning like line diff --git a/macros/latex/required/amsmath/amsmath.dtx b/macros/latex/required/amsmath/amsmath.dtx index 42f3088867..7f324700f6 100644 --- a/macros/latex/required/amsmath/amsmath.dtx +++ b/macros/latex/required/amsmath/amsmath.dtx @@ -86,7 +86,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % \end{macrocode} % % \begin{macrocode} -\ProvidesPackage{amsmath}[2020/01/20 v2.17e AMS math features] +\ProvidesPackage{amsmath}[2020/09/23 v2.17i AMS math features] % \end{macrocode} % % \section{Catcode defenses} @@ -466,24 +466,41 @@ For additional information on amsmath, use the \lq ?\rq\space option.% % \cs{DeclareRobustCommand}. % \changes{v2.17b}{2018/12/01}{Start LR-mode for \cs{thinspace} and % friends if necessary (github/49)} +% +% We start by undefining a number of commands (which in a current +% \LaTeX{} kernel will be defined, so that the +% \cs{DeclareRobustCommand} declarations below do not add a +% ``Command redefined'' info into the log. +% \begin{macrocode} +\let\tmspace\@undefined +\let\,\@undefined +\let\!\@undefined +\let\:\@undefined +\let\negmedspace\@undefined +\let\negthickspace\@undefined +% \end{macrocode} +% +% +% \changes{v2.17g}{2020/03/07}{Math/text spacing commands are now in +% the \LaTeX{} kernel and are made robust (gh/303)} % \begin{macrocode} \ifx\leavevmode@ifvmode\@undefined -\DeclareRobustCommand{\tmspace}[3]{% +\DeclareRobustCommand\tmspace[3]{% \ifmmode\mskip#1#2\else\kern#1#3\fi\relax} \else -\DeclareRobustCommand{\tmspace}[3]{% +\DeclareRobustCommand\tmspace[3]{% \ifmmode\mskip#1#2\else\leavevmode@ifvmode\kern#1#3\fi\relax} \fi -\renewcommand{\,}{\tmspace+\thinmuskip{.1667em}} +\DeclareRobustCommand\,{\tmspace+\thinmuskip{.1667em}} \let\thinspace\, -\renewcommand{\!}{\tmspace-\thinmuskip{.1667em}} +\DeclareRobustCommand\!{\tmspace-\thinmuskip{.1667em}} \let\negthinspace\! -\renewcommand{\:}{\tmspace+\medmuskip{.2222em}} +\DeclareRobustCommand\:{\tmspace+\medmuskip{.2222em}} \let\medspace\: -\newcommand{\negmedspace}{\tmspace-\medmuskip{.2222em}} -\renewcommand{\;}{\tmspace+\thickmuskip{.2777em}} +\DeclareRobustCommand\negmedspace{\tmspace-\medmuskip{.2222em}} +\renewcommand\;{\tmspace+\thickmuskip{.2777em}} \let\thickspace\; -\newcommand{\negthickspace}{\tmspace-\thickmuskip{.2777em}} +\DeclareRobustCommand\negthickspace{\tmspace-\thickmuskip{.2777em}} % \end{macrocode} % \end{macro} % \end{macro} @@ -598,8 +615,14 @@ Foreign command \@backslashchar#1;\MessageBreak % abbreviations for some commonly needed mathstyle overrides. To % conserve csnames we avoid making \cn{dfrac} and \cn{tfrac} robust % (\cn{genfrac} is itself robust). +% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} for luatex (moved patch from lualatex-math)} % \begin{macrocode} +% +\ifx\directlua\@undefined \DeclareRobustCommand{\frac}[2]{{\begingroup#1\endgroup\@@over#2}} +\else +\DeclareRobustCommand{\frac}[2]{{\Ustack{\begingroup#1\endgroup\@@over#2}}} +\fi \newcommand{\dfrac}{\genfrac{}{}{}0} \newcommand{\tfrac}{\genfrac{}{}{}1} % \end{macrocode} @@ -732,12 +755,12 @@ Foreign command \@backslashchar#1;\MessageBreak \fi } % \end{macrocode} -% +% \changes{v2.17i}{2020/09/23}{added \cs{Ustack} (moved patch from lualatex-math)} % \begin{macrocode} \DeclareRobustCommand{\genfrac}[6]{{% \@mathstyle{#4}% \genfrac@choice o{#1}% -{\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}% +{\Ustack {\begingroup#5\endgroup\ifx @#3@\@@over\else\@@above\fi#3\relax#6}}% \genfrac@choice c{#2}% }} % \end{macrocode} @@ -1633,13 +1656,15 @@ Foreign command \@backslashchar#1;\MessageBreak % \begin{macro}{\dddot} % \begin{macro}{\ddddot} % Triple and quadruple dot accents. +% \changes{v2.17f}{2020/02/20}{Add a kern so that a single char is not +% vertically shifted and move the dots slightly to the right (gh/126)} % \begin{macrocode} \ams@newcommand{\dddot}[1]{% - {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ - \hbox{\normalfont ...}\vss}}}} + {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ + \hbox{\,\normalfont...}\vss}}}} \ams@newcommand{\ddddot}[1]{% - {\mathop{#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ - \hbox{\normalfont....}\vss}}}} + {\mathop{\kern\z@#1}\limits^{\vbox to-1.4\ex@{\kern-\tw@\ex@ + \hbox{\,\normalfont....}\vss}}}} % \end{macrocode} % \end{macro} % \end{macro} @@ -2184,17 +2209,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@minus\mathcode`\-\relax -\mathchardef\std@equal\mathcode`\=\relax +\@ifundefined{Umathcode} + {% + \mathchardef\std@minus\mathcode`\-\relax + \mathchardef\std@equal\mathcode`\=\relax + } + {% + \Umathcharnumdef\std@minus\Umathcodenum`\-\relax + \Umathcharnumdef\std@equal\Umathcodenum`\=\relax + } % \end{macrocode} % In case some alternative math fonts are loaded later: % \begin{macrocode} -\AtBeginDocument{% - \mathchardef\std@minus\mathcode`\-\relax - \mathchardef\std@equal\mathcode`\=\relax -} +\@ifundefined{Umathcode} + {% + \AtBeginDocument{% + \mathchardef\std@minus\mathcode`\-\relax + \mathchardef\std@equal\mathcode`\=\relax + }% + } + {% + \AtBeginDocument{% + \Umathcharnumdef\std@minus\Umathcodenum`\-\relax + \Umathcharnumdef\std@equal\Umathcodenum`\=\relax + }% + } % \end{macrocode} % % \begin{macro}{\relbar} @@ -2301,7 +2342,9 @@ Foreign command \@backslashchar#1;\MessageBreak % for use in a subscript or superscript. At the moment the supported % arguments are not the full possibilities of \env{array} but only % |c| or |l| for centered or left-aligned. And only one column. +% \changes{v2.17i}{2020/09/23}{moved to version from lualatex-math for luatex} % \begin{macrocode} +\ifx\directlua\@undefined \newenvironment{subarray}[1]{% % \end{macrocode} % Note: The predecessors of \env{subarray} (\env{Sb} and \env{Sp}, @@ -2340,6 +2383,23 @@ Foreign command \@backslashchar#1;\MessageBreak }{% \crcr\egroup\egroup } +\else +\newenvironment{subarray}[1]{% + \vcenter\bgroup + \Let@ \restore@math@cr \default@tag + \baselineskip \Umathstacknumup \scriptstyle + \advance\baselineskip \Umathstackdenomdown \scriptstyle + \lineskip \Umathstackvgap \scriptstyle + \lineskiplimit \lineskip + \ialign\bgroup\ifx c#1\hfil\fi + \Ustartmath + \m@th\scriptstyle## + \Ustopmath + \hfil\crcr +}{% + \crcr\egroup\egroup +} +\fi % \end{macrocode} % \end{environment} % @@ -3438,7 +3498,8 @@ and fix things up.} % \end{macro} % % \begin{macro}{\black@} -% \changes{v2.17a}{2017/09/02}{add fixed width box so overfull warning generated in centred environments in lists} +% \changes{v2.17a}{2017/09/02}{Add fixed width box so overfull warning +% generated in centred environments in lists} % This macro is made to produce an overfull box message and % possibly (depending on the value of \cs{overfullrule}) % a rule in the margin if the total width of an alignment @@ -3654,6 +3715,77 @@ and fix things up.} % \end{macrocode} % \end{macro} % +% +% +% \begin{macro}{\ams@start@box} +% This macro tests the optional positioning argument (in +% \texttt{gathered} or \texttt{aligned}. It explicitly tests for the +% value \texttt{b}, \texttt{c} and \texttt{t} and if the value is +% different, then we assume that it is a bracket group that belongs +% to the formula instead of being an misspelled optional argument. +% (In earlier versions of the code anything other than \texttt{b} +% or \texttt{t} was interpreted as \texttt{c} and the data was +% otherwise dropped.) +% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return +% optional argument is different (gh/5)} +% \begin{macrocode} +\def\ams@start@box#1{% +% \end{macrocode} +% As we may pick up an arbitrary part of the formula by mistake, we +% need to be very careful with the testing to avoid low-level +% errors. This is why we use \cs{detokenize}. But we also need to +% expand the argument (if possible) in case the position value is +% hidden inside a macro. We therefore apply the \cs{romannumeral} +% trick (known as f-expansion in \texttt{expl3}) in its old form. +% The code assumes that +% the default is correctly set up (which in this case is \texttt{c}). +% \begin{macrocode} + \edef\reserved@a{\csname ams@pos@\expandafter\detokenize + \expandafter{\romannumeral-`\0#1}\endcsname}% + \expandafter\ifx\reserved@a\relax +% \end{macrocode} +% If the argument is neither \texttt{b}, \texttt{c} or \texttt{t} +% we save it in \cs{ams@return@opt@arg}, so it can later be +% returned as part of the environment body. We could at this point +% also issue a warning that bracket group was found at the start of +% the formula and that it is safer to add a \cs{relax} before it. +% \begin{macrocode} + \PackageWarning{amsmath}{% + Bracket group \detokenize{[#1]} at formula start!\MessageBreak + It could be a misspelled positional argument.\MessageBreak + If it belongs to the formula add a \relax in\MessageBreak + front to hide it}% + \def\ams@return@opt@arg{[#1]}\vcenter +% \end{macrocode} +% If the argument was identified then we clear +% \cs{ams@return@opt@arg} (just in case somebod ever nests these +% environment. +% \begin{macrocode} + \else + \let\ams@return@opt@arg\@empty\reserved@a + \fi +} +% \end{macrocode} +% +% \begin{macro}{\ams@pos@t} +% \begin{macro}{\ams@pos@b} +% \begin{macro}{\ams@pos@c} +% +% \begin{macrocode} +\def\ams@pos@t{\vtop} +\def\ams@pos@b{\vbox} +\def\ams@pos@c{\vcenter} +% \end{macrocode} +% And we accept an empty argument as a way to get the default (as +% that was the case before as well, albeit by mistake in some sense). +% \begin{macrocode} +\let\ams@pos@\ams@pos@c +% \end{macrocode} +% \end{macro} +% \end{macro} +% \end{macro} +% \end{macro} +% % \begin{macro}{\start@aligned} % The \env{aligned} and \env{alignedat} environments are identical % except that the latter takes a mandatory argument to specify the @@ -3678,7 +3810,10 @@ and fix things up.} % to the margin. % \begin{macrocode} \alignedspace@left - \if #1t\vtop \else \if#1b \vbox \else \vcenter \fi \fi \bgroup +% \end{macrocode} +% Select the right kind of box based on the optional argument \verb=#1=. +% \begin{macrocode} + \ams@start@box{#1}\bgroup \maxfields@#2\relax \ifnum\maxfields@>\m@ne \multiply\maxfields@\tw@ @@ -3721,6 +3856,13 @@ and fix things up.} \hfil \tabskip\alignsep@ \crcr +% \end{macrocode} +% If we picked up a bracket group by mistake here is the place to +% return it for processing. +% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return +% optional argument is different (gh/5)} +% \begin{macrocode} + \ams@return@opt@arg } % \end{macrocode} % \end{macro} @@ -3805,12 +3947,21 @@ and fix things up.} \nonmatherr@{\begin{gathered}}% \fi \alignedspace@left - \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup +% \end{macrocode} +% Select the right kind of box based on the optional argument \verb=#1=. +% \begin{macrocode} + \ams@start@box{#1}\bgroup \Let@ \chardef\dspbrk@context\@ne \restore@math@cr \spread@equation \ialign\bgroup \hfil\strut@$\m@th\displaystyle##$\hfil \crcr +% \end{macrocode} +% And put a mistaking picked up bracket group back: +% \changes{v2.17g}{2020/03/10}{Explicity test for b/t/c and return +% optional argument is different (gh/5)} +% \begin{macrocode} + \ams@return@opt@arg }{% \endaligned } diff --git a/macros/latex/required/amsmath/amsmath.pdf b/macros/latex/required/amsmath/amsmath.pdf Binary files differindex 19f1ab151a..01dad27e8b 100644 --- a/macros/latex/required/amsmath/amsmath.pdf +++ b/macros/latex/required/amsmath/amsmath.pdf diff --git a/macros/latex/required/amsmath/amsopn.pdf b/macros/latex/required/amsmath/amsopn.pdf Binary files differindex d54d81f1e7..b8b5b9e0d1 100644 --- a/macros/latex/required/amsmath/amsopn.pdf +++ b/macros/latex/required/amsmath/amsopn.pdf diff --git a/macros/latex/required/amsmath/amstext.dtx b/macros/latex/required/amsmath/amstext.dtx index a5e8491dc2..5e7e6ca672 100644 --- a/macros/latex/required/amsmath/amstext.dtx +++ b/macros/latex/required/amsmath/amstext.dtx @@ -139,7 +139,7 @@ Bug reports can be opened (category \texttt{#1}) at\\% % The macros \cs{f@size}, \cs{sf@size} and \cs{ssf@size} hold the % sizes which should be used when we are loading a new font for use % in \cs{textfont}, \cs{scriptfont} and \cs{scriptscriptfont}. There -% is some question whether we should use use \cs{tf@size} or +% is some question whether we should use \cs{tf@size} or % \cs{f@size} for the main size, but since the primary purpose of the % \cn{text} macro is to switch back to text within a display, it % seems that \cs{f@size} is the better choice. (Indeed it could be diff --git a/macros/latex/required/amsmath/amstext.pdf b/macros/latex/required/amsmath/amstext.pdf Binary files differindex bd2380c3fb..64bf5378d2 100644 --- a/macros/latex/required/amsmath/amstext.pdf +++ b/macros/latex/required/amsmath/amstext.pdf diff --git a/macros/latex/required/amsmath/amsxtra.pdf b/macros/latex/required/amsmath/amsxtra.pdf Binary files differindex 4ef6bc62d3..0a866cd130 100644 --- a/macros/latex/required/amsmath/amsxtra.pdf +++ b/macros/latex/required/amsmath/amsxtra.pdf diff --git a/macros/latex/required/amsmath/changes.txt b/macros/latex/required/amsmath/changes.txt index 9581bb6606..be86f3c134 100644 --- a/macros/latex/required/amsmath/changes.txt +++ b/macros/latex/required/amsmath/changes.txt @@ -1,3 +1,31 @@ +2020/09/23 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + * amsmath.dtx (subsection{Fractions}): + added \cs{Ustack} to \cs{frac} and \cs{genfrac} for luatex + (moved patch from lualatex-math) + * amsmath.dtx (section{Array-related environments}) + changed subarray for luatex: moved to version from lualatex-math + +2020-08-24 Ulrike Fischer <Ulrike.Fischer@latex-project.org> + + * amsmath.dtx (section{Extensible arrows}): + Detect unicode engines and use \Umathcharnumdef for + \std@minus and \std@equal (acc/135) + + +2020-03-10 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * amsmath.dtx (subsection{Simple aligning environments}): + Explicity test for b,t,c and return optional argument is + different (gh/5) + +2020-03-07 Frank Mittelbach <Frank.Mittelbach@latex-project.org> + + * amsmath.dtx (subsection{Math spacing commands}): + Math/text spacing commands are now in the \LaTeX{} kernel and are + made robust. We still define them here so that the package + continues to work with older formats (gh/303) + + ######################### # 2020-02-02 Release ######################### @@ -28,7 +56,8 @@ 2019-10-11 David Carlisle <David.Carlisle@latex-project.org> - * build.lua: package amsmath-2018-12-01.sty (only ctan build script no source changes) + * build.lua: package amsmath-2018-12-01.sty (only ctan build script + no source changes) ######################### # 2019-10-01 Release @@ -156,4 +185,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/macros/latex/required/amsmath/subeqn.pdf b/macros/latex/required/amsmath/subeqn.pdf Binary files differindex c175feb386..49221aec98 100644 --- a/macros/latex/required/amsmath/subeqn.pdf +++ b/macros/latex/required/amsmath/subeqn.pdf diff --git a/macros/latex/required/amsmath/subeqn.tex b/macros/latex/required/amsmath/subeqn.tex index c34b3f6952..7e07f61d01 100644 --- a/macros/latex/required/amsmath/subeqn.tex +++ b/macros/latex/required/amsmath/subeqn.tex @@ -90,7 +90,7 @@ C=D And that was equation \eqref{e:prevprime}. Notice, by the way, that when a \verb"\ref" occurs inside a \verb"\tag", -and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the the +and that \verb"\tag" is then \verb"\label"'d, a \verb"\ref" for the second \verb"\label" requires \emph{three} runs of \LaTeX{} in order to get the proper value. (If you run through the logic of \LaTeX{}'s cross-referencing mechanisms as they apply in this case, you will see diff --git a/macros/latex/required/amsmath/technote.pdf b/macros/latex/required/amsmath/technote.pdf Binary files differindex 657f930f89..fa7a6fc05e 100644 --- a/macros/latex/required/amsmath/technote.pdf +++ b/macros/latex/required/amsmath/technote.pdf diff --git a/macros/latex/required/amsmath/testmath.pdf b/macros/latex/required/amsmath/testmath.pdf Binary files differindex 5583fa35cf..21ad91ed7d 100644 --- a/macros/latex/required/amsmath/testmath.pdf +++ b/macros/latex/required/amsmath/testmath.pdf |