diff options
author | Karl Berry <karl@freefriends.org> | 2021-03-18 21:13:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-03-18 21:13:05 +0000 |
commit | a84deea3010c2ea0d5c007990dc4f35e22b28260 (patch) | |
tree | cfe9f9752379977a88838e0fe5d7d1e6c5f48c4e /Master/texmf-dist/tex | |
parent | 8f60c584b2c1e5e39516a1998602d1f79a720dfe (diff) |
mathtools (18mar21) (branch)
git-svn-id: svn://tug.org/texlive/branches/branch2020.0@58521 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/mathtools.sty | 64 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/mhsetup.sty | 13 |
2 files changed, 44 insertions, 33 deletions
diff --git a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty index 484ed17a818..c3b38d51c6c 100644 --- a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty +++ b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty @@ -10,16 +10,16 @@ %% %% Copyright (C) 2002-2011 by Morten Hoegholm %% Copyright (C) 2012-2019 by Lars Madsen -%% Copyright (C) 2020 by Lars Madsen, the LaTeX3 project +%% Copyright (C) 2020- by Lars Madsen, the LaTeX3 project %% %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either -%% version 1.3 of this license or (at your option) any later +%% version 1.3c of this license or (at your option) any later %% version. The latest version of this license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of -%% LaTeX version 2005/12/01 or later. +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2008/05/04 or later. %% %% This work has the LPPL maintenance status "maintained". %% @@ -31,9 +31,9 @@ %% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv. %% \ProvidesPackage{mathtools}% - [2020/03/24 v1.24 mathematical typesetting tools] + [2021/03/18 v1.25 mathematical typesetting tools] \RequirePackage{keyval,calc} -\RequirePackage{mhsetup}[2017/03/31] +\RequirePackage{mhsetup}[2021/03/18] \MHInternalSyntaxOn % borrowed from fixltx2e \def\EQ_MakeRobust#1{% @@ -634,7 +634,8 @@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ \lineskiplimit\lineskip \ialign\bgroup\ifx c##1\hfil\fi - $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$ + %% $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$ + \span\MT_cramped_internal:Nn \scriptstyle {####}% \hfil\crcr }{% \crcr\egroup\egroup @@ -889,19 +890,19 @@ {\MH_end_cases:\right#6} } \newcases{dcases}{\quad}{% - $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.} + $\m@th\displaystyle##$\hfil}{$\m@th\displaystyle##$\hfil}{\lbrace}{.} \newcases{dcases*}{\quad}{% - $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.} + $\m@th\displaystyle##$\hfil}{##\hfil}{\lbrace}{.} \newcases{rcases}{\quad}{% - $\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace} + $\m@th##$\hfil}{$\m@th##$\hfil}{.}{\rbrace} \newcases{rcases*}{\quad}{% - $\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace} + $\m@th##$\hfil}{##\hfil}{.}{\rbrace} \newcases{drcases}{\quad}{% - $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace} + $\m@th\displaystyle##$\hfil}{$\m@th\displaystyle##$\hfil}{.}{\rbrace} \newcases{drcases*}{\quad}{% - $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace} + $\m@th\displaystyle##$\hfil}{##\hfil}{.}{\rbrace} \newcases{cases*}{\quad}{% - $\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.} + $\m@th##$\hfil}{##\hfil}{\lbrace}{.} \def\MT_matrix_begin:N #1{% \hskip -\arraycolsep \MH_let:NwN \@ifnextchar \MH_nospace_ifnextchar:Nnn @@ -975,10 +976,15 @@ \MHPrecedingSpacesOn \newcommand*\smashoperator[2][lr]{ - \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}} - \toks@{#2} - \expandafter\MT_smop_get_args:wwwNnNn + \@ifundefined{MT_smop_smash_#1:NNNNN}{ + \PackageError{mathtools}{Opt~ arg~ '#1'~ for~ \@backslashchar smashoperator~ + is~ not~ supported.\MessageBreak Use~ l,~r~or~lr~ (default)}{} + }{ + \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}} + \toks@{#2} + \expandafter\MT_smop_get_args:wwwNnNn \the\toks@\@nil\@nil\@nil\@nil\@nil\@nil\@@nil + } } \def\MT_smop_remove_nil_vi:N #1\@nil\@nil\@nil\@nil\@nil\@nil{#1} \def\MT_smop_mathop:n {\mathop} @@ -1090,6 +1096,7 @@ \def\MT_smop_smash_lr:NNNNN #1#2#3#4#5{ \MT_smop_needed_args:NNNNN #1#2#3#4#5 } +\MH_let:NwN \MT_smop_smash_rl:NNNNN \MT_smop_smash_lr:NNNNN \def\MT_vphantom:Nn {\v@true\h@false\MT_internal_phantom:N} \def\MT_hphantom:Nn {\v@false\h@true\MT_internal_phantom:N} \def\MT_phantom:Nn {\v@true\h@true\MT_internal_phantom:N} @@ -1382,21 +1389,21 @@ } \providecommand*\clap[1]{\hb@xt@\z@{\hss#1\hss}} \providecommand*\mathllap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_mathllap:Nn \else \expandafter \MT_mathllap:Nn \expandafter #1 \fi } \providecommand*\mathrlap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_mathrlap:Nn \else \expandafter \MT_mathrlap:Nn \expandafter #1 \fi } \providecommand*\mathclap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_mathclap:Nn \else \expandafter \MT_mathclap:Nn \expandafter #1 @@ -1423,14 +1430,15 @@ \def\mathsm@sh#1#2{% \setbox\z@\hbox{$\m@th#1{#2}$}{}\finsm@sh} \providecommand*\cramped[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_cramped_internal:Nn \else \expandafter \MT_cramped_internal:Nn \expandafter #1 \fi } \def\MT_cramped_internal:Nn #1#2{ - \sbox\z@{$\m@th#1\nulldelimiterspace=\z@\radical\z@{#2}$} + %% \sbox\z@{$\m@th#1\kern-\nulldelimiterspace\radical\z@{#2}$} + \setbox\z@\hbox{$\m@th#1\kern-\nulldelimiterspace\radical\z@{#2}$} \ifx#1\displaystyle \dimen@=\fontdimen8\textfont3 \advance\dimen@ .25\fontdimen5\textfont2 @@ -1447,10 +1455,11 @@ 3 \fi \advance\dimen@-\ht\z@ \ht\z@=-\dimen@ - \box\z@ + \ifvmode\leavevmode\fi + {}\box\z@ } \providecommand*\crampedllap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_cramped_llap_internal:Nn \else \expandafter \MT_cramped_llap_internal:Nn \expandafter #1 @@ -1460,7 +1469,7 @@ {}\llap{\MT_cramped_internal:Nn #1{#2}} } \providecommand*\crampedclap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_cramped_clap_internal:Nn \else \expandafter \MT_cramped_clap_internal:Nn \expandafter #1 @@ -1470,7 +1479,7 @@ {}\clap{\MT_cramped_internal:Nn #1{#2}} } \providecommand*\crampedrlap[1][\@empty]{ - \ifx\@empty#1\@empty + \relax\ifx\@empty#1\@empty \expandafter \mathpalette \expandafter \MT_cramped_rlap_internal:Nn \else \expandafter \MT_cramped_rlap_internal:Nn \expandafter #1 @@ -1487,7 +1496,8 @@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ \lineskiplimit\lineskip \ialign\bgroup\ifx c#1\hfil\fi - $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line + %%$\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line + \span\MT_cramped_internal:Nn \scriptstyle {##}% \hfil\crcr% }{% \crcr\egroup\egroup diff --git a/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty b/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty index cba3e5836b0..56b2dc4a39a 100644 --- a/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty +++ b/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty @@ -14,11 +14,11 @@ %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either -%% version 1.3 of this license or (at your option) any later +%% version 1.3c of this license or (at your option) any later %% version. The latest version of this license is in %% http://www.latex-project.org/lppl.txt -%% and version 1.3 or later is part of all distributions of -%% LaTeX version 2005/12/01 or later. +%% and version 1.3c or later is part of all distributions of +%% LaTeX version 2008/05/04 or later. %% %% This work has the LPPL maintenance status "maintained". %% @@ -30,7 +30,7 @@ %% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv. %% \ProvidesPackage{mhsetup}% - [2017/03/31 v1.3 programming setup (MH)] + [2021/03/18 v1.4 programming setup (MH)] \def\MHInternalSyntaxOn{ \edef\MHInternalSyntaxOff{% \catcode`\noexpand\~=\the\catcode`\~\relax @@ -123,9 +123,10 @@ \def\MH_use_choice_iii:nnnn #1#2#3#4{#3} \def\MH_use_choice_iv:nnnn #1#2#3#4{#4} \long\def\MH_nospace_ifnextchar:Nnn #1#2#3{ + \MH_group_align_safe_begin: % added 2021/01/14 \MH_let:NwN\reserved@d=~#1 - \def\reserved@a{#2} - \def\reserved@b{#3} + \def\reserved@a{\MH_group_align_safe_end: #2} % changed 2021/01/14 + \def\reserved@b{\MH_group_align_safe_end: #3} % changed 2021/01/14 \futurelet\@let@token\MH_nospace_nextchar: } \def\MH_nospace_nextchar:{ |