summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mathtools
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2021-04-04 02:06:51 +0000
committerNorbert Preining <preining@logic.at>2021-04-04 02:06:51 +0000
commit9ad6bb7fd42db1225c0c59f5e2ddfca02b82765a (patch)
tree65c96ddec223178719997c8d458ccce5f9877967 /Master/texmf-dist/tex/latex/mathtools
parent9c51cd2718eb7d5a9952e02d4559100507356786 (diff)
mathtools (4apr21)
git-svn-id: svn://tug.org/texlive/trunk@58725 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathtools')
-rw-r--r--Master/texmf-dist/tex/latex/mathtools/mathtools.sty185
1 files changed, 135 insertions, 50 deletions
diff --git a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
index c3b38d51c6c..0b1a6c5c6ed 100644
--- a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
+++ b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
@@ -31,7 +31,7 @@
%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
%%
\ProvidesPackage{mathtools}%
- [2021/03/18 v1.25 mathematical typesetting tools]
+ [2021/03/28 v1.26 mathematical typesetting tools]
\RequirePackage{keyval,calc}
\RequirePackage{mhsetup}[2021/03/18]
\MHInternalSyntaxOn
@@ -611,53 +611,110 @@
}
\MT_start_mult:N \MT_mult_default_pos:
}
-\newcommand\MultlinedHook{
- \renewenvironment{subarray}[1]{%
- \vcenter\bgroup
- \Let@ \restore@math@cr \default@tag
- \let\math@cr@@\AMS@math@cr@@ % <--- the fix
- \baselineskip\fontdimen10 \scriptfont\tw@
- \advance\baselineskip\fontdimen12 \scriptfont\tw@
- \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
- \lineskiplimit\lineskip
- \ialign\bgroup\ifx c##1\hfil\fi
- $\m@th\scriptstyle####$\hfil\crcr
- }{%
- \crcr\egroup\egroup
- }
- \renewenvironment{crampedsubarray}[1]{%
- \vcenter\bgroup
- \Let@ \restore@math@cr \default@tag
- \let\math@cr@@\AMS@math@cr@@ % <--- the fix
- \baselineskip\fontdimen10 \scriptfont\tw@
- \advance\baselineskip\fontdimen12 \scriptfont\tw@
- \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
- \lineskiplimit\lineskip
- \ialign\bgroup\ifx c##1\hfil\fi
- %% $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
- \span\MT_cramped_internal:Nn \scriptstyle {####}%
- \hfil\crcr
- }{%
- \crcr\egroup\egroup
- }
- % from mathtolls
- \def\MT_smallmatrix_begin:N ##1{%
- \Let@\restore@math@cr\default@tag
- \let\math@cr@@\AMS@math@cr@@ % <--- the fix
- \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
- \csname MT_smallmatrix_##1_begin:\endcsname
+\ifx\directlua\@undefined
+ % THIS IS NORMAL
+ \newcommand\MultlinedHook{
+ \renewenvironment{subarray}[1]{%
+ \vcenter\bgroup
+ \Let@ \restore@math@cr \default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip\fontdimen10 \scriptfont\tw@
+ \advance\baselineskip\fontdimen12 \scriptfont\tw@
+ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
+ \lineskiplimit\lineskip
+ \ialign\bgroup\ifx c##1\hfil\fi
+ $\m@th\scriptstyle####$\hfil\crcr
+ }{%
+ \crcr\egroup\egroup
+ }
+ \renewenvironment{crampedsubarray}[1]{%
+ \vcenter\bgroup
+ \Let@ \restore@math@cr \default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip\fontdimen10 \scriptfont\tw@
+ \advance\baselineskip\fontdimen12 \scriptfont\tw@
+ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
+ \lineskiplimit\lineskip
+ \ialign\bgroup\ifx c##1\hfil\fi
+ \span\MT_cramped_internal:Nn \scriptstyle {####}%
+ \hfil\crcr
+ }{%
+ \crcr\egroup\egroup
+ }
+ % from mathtools
+ \def\MT_smallmatrix_begin:N ##1{%
+ \Let@\restore@math@cr\default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+ \csname MT_smallmatrix_##1_begin:\endcsname
+ }
+ % from amsmath
+ \renewenvironment{smallmatrix}{\null\,\vcenter\bgroup
+ \Let@\restore@math@cr\default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+ \ialign\bgroup\hfil$\m@th\scriptstyle####$\hfil&&\thickspace\hfil
+ $\m@th\scriptstyle####$\hfil\crcr
+ }{%
+ \crcr\egroup\egroup\,%
+ }
}
- % from amsmath
- \renewenvironment{smallmatrix}{\null\,\vcenter\bgroup
- \Let@\restore@math@cr\default@tag
- \let\math@cr@@\AMS@math@cr@@ % <--- the fix
- \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
- \ialign\bgroup\hfil$\m@th\scriptstyle####$\hfil&&\thickspace\hfil
- $\m@th\scriptstyle####$\hfil\crcr
- }{%
- \crcr\egroup\egroup\,%
+\else
+ % THIS IS LUALATEX
+ \newcommand\MultlinedHook{
+ % from amsmath
+ \newenvironment{subarray}[1]{%
+ \vcenter\bgroup
+ \Let@ \restore@math@cr \default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \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
+ }
+ % from mathtools
+ \newenvironment{crampedsubarray}[1]{%
+ \vcenter\bgroup
+ \Let@ \restore@math@cr \default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip \Umathstacknumup \scriptstyle
+ \advance\baselineskip \Umathstackdenomdown \scriptstyle
+ \lineskip \Umathstackvgap \scriptstyle
+ \lineskiplimit \lineskip
+ \ialign\bgroup\ifx c##1\hfil\fi
+ \Ustartmath
+ \crampedscriptstyle{####}
+ \Ustopmath
+ \hfil\crcr
+ }{%
+ \crcr\egroup\egroup
+ }
+ % from mathtools
+ \def\MT_smallmatrix_begin:N ##1{%
+ \Let@\restore@math@cr\default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+ \csname MT_smallmatrix_##1_begin:\endcsname
+ }
+ % from amsmath
+ \renewenvironment{smallmatrix}{\null\,\vcenter\bgroup
+ \Let@\restore@math@cr\default@tag
+ \let\math@cr@@\AMS@math@cr@@ % <--- the fix
+ \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+ \ialign\bgroup\hfil$\m@th\scriptstyle####$\hfil&&\thickspace\hfil
+ $\m@th\scriptstyle####$\hfil\crcr
+ }{%
+ \crcr\egroup\egroup\,%
+ }
}
-}
+\fi
\newenvironment{multlined}[1][]
{\MH_group_align_safe_begin:
@@ -1458,6 +1515,16 @@
\ifvmode\leavevmode\fi
{}\box\z@
}
+\ifx\directlua\@undefined\else
+ \def\MT_cramped_internal:Nn #1#2{
+ {
+ \ensuremath {
+ \use:c { cramped \cs_to_str:N #1 } #2
+ }
+ }
+ }
+\fi
+
\providecommand*\crampedllap[1][\@empty]{
\relax\ifx\@empty#1\@empty
\expandafter \mathpalette \expandafter \MT_cramped_llap_internal:Nn
@@ -1488,6 +1555,7 @@
\def\MT_cramped_rlap_internal:Nn #1#2{
{}\rlap{\MT_cramped_internal:Nn #1{#2}}
}
+\ifx\directlua\@undefined
\newenvironment{crampedsubarray}[1]{%
\vcenter\bgroup
\Let@ \restore@math@cr \default@tag
@@ -1496,12 +1564,29 @@
\lineskip\thr@@\fontdimen8 \scriptfont\thr@@
\lineskiplimit\lineskip
\ialign\bgroup\ifx c#1\hfil\fi
- %%$\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
- \span\MT_cramped_internal:Nn \scriptstyle {##}%
- \hfil\crcr%
+ %%$\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+ \span\MT_cramped_internal:Nn \scriptstyle {##}%
+ \hfil\crcr
+}{%
+ \crcr\egroup\egroup
+}
+\else
+\newenvironment{crampedsubarray}[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
+ \crampedscriptstyle{##}
+ \Ustopmath
+ \hfil\crcr
}{%
-\crcr\egroup\egroup
+ \crcr\egroup\egroup
}
+\fi
\newcommand{\crampedsubstack}[1]{\crampedsubarray{c}#1\endcrampedsubarray}
\newcommand{\MT_prescript_inner:}[4]{
\@mathmeasure\z@#4{\MT_prescript_sup:{#1}}