texlive[58725] Master/texmf-dist: mathtools (4apr21)

commits+preining at tug.org commits+preining at tug.org
Sun Apr 4 04:06:51 CEST 2021


Revision: 58725
          http://tug.org/svn/texlive?view=revision&revision=58725
Author:   preining
Date:     2021-04-04 04:06:51 +0200 (Sun, 04 Apr 2021)
Log Message:
-----------
mathtools (4apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/mathtools/empheq.pdf
    trunk/Master/texmf-dist/doc/latex/mathtools/mathtools.pdf
    trunk/Master/texmf-dist/doc/latex/mathtools/mhsetup.pdf
    trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins
    trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx
    trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins
    trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty

Removed Paths:
-------------
    trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.ins

Modified: trunk/Master/texmf-dist/doc/latex/mathtools/empheq.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mathtools/mathtools.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/mathtools/mhsetup.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins	2021-04-04 02:05:27 UTC (rev 58724)
+++ trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins	2021-04-04 02:06:51 UTC (rev 58725)
@@ -33,7 +33,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: empheq 2020/03/24 v2.16 empheq}
+\Msg{* Package: empheq 2017/03/31 v2.15 empheq}
 \Msg{************************************************************************}
 
 \keepsilent

Modified: trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2021-04-04 02:05:27 UTC (rev 58724)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2021-04-04 02:06:51 UTC (rev 58725)
@@ -69,7 +69,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: mathtools 2021/03/18 v1.25}
+\Msg{* Package: mathtools 2021/03/28 v1.26}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -133,7 +133,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{mathtools.drv}%
-  [2021/03/18 v1.25 mathematical typesetting tools]
+  [2021/03/28 v1.28 mathematical typesetting tools]
 \documentclass{ltxdoc}
 \IfFileExists{fourier.sty}{\usepackage{fourier}}{}
 \addtolength\marginparwidth{-25pt}
@@ -321,7 +321,7 @@
 %
 %  \GetFileInfo{mathtools.drv}
 %
-%  \CheckSum{3364}
+%  \CheckSum{3529}
 %
 %  \title{The \pkg{mathtools} package\thanks{This file has version number
 %  \fileversion, last revised \filedate.}}
@@ -2982,7 +2982,7 @@
 %    \begin{macrocode}
 %<*package>
 \ProvidesPackage{mathtools}%
-  [2021/03/18 v1.25 mathematical typesetting tools]
+  [2021/03/28 v1.26 mathematical typesetting tools]
 %    \end{macrocode}
 % \changes{v1.10}{2011/02/12}{Might as well make sure that we need the
 % latest version of \texttt{mhsetup}}
@@ -4135,60 +4135,123 @@
 % \changes{v1.22}{2019/07/22}{Also added crampedsubarray}
 % \changes{v1.22}{2019/07/22}{Also added fixes for smallmatrix and the
 % MT versions of these}
+% \changes{v1.26}{2021/03/27}{We need a lualatex branch of this as
+% well. We need to find a better way to manage this. Patching?}
 %    \begin{macrocode}
-\newcommand\MultlinedHook{
-  \renewenvironment{subarray}[1]{%
-    \vcenter\bgroup
-    \Let@ \restore at math@cr \default at tag
-    \let\math at cr@@\AMS at 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 at th\scriptstyle####$\hfil\crcr
-  }{%
-    \crcr\egroup\egroup
-  }
-  \renewenvironment{crampedsubarray}[1]{%
-    \vcenter\bgroup
-    \Let@ \restore at math@cr \default at tag
-    \let\math at cr@@\AMS at 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
+\ifx\directlua\@undefined
+  % THIS IS NORMAL
+  \newcommand\MultlinedHook{
+    \renewenvironment{subarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup
+    }
+    \renewenvironment{crampedsubarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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
 %    \end{macrocode}
 % \changes{v1.25}{2021/03/18}{use \cs{MT_cramped_internal:Nn} instead,
 % see issue \#17}
 % Here we should use the proper cramped internal macro
 %    \begin{macrocode}
-    %% $\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
-    \span\MT_cramped_internal:Nn \scriptstyle {####}%
-    \hfil\crcr
-  }{%
-    \crcr\egroup\egroup
+      \span\MT_cramped_internal:Nn \scriptstyle {####}%
+      \hfil\crcr
+    }{%
+      \crcr\egroup\egroup
+    }
+    % from mathtools
+    \def\MT_smallmatrix_begin:N ##1{%
+      \Let@\restore at math@cr\default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at math@cr@@  % <--- the fix
+      \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+      \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
+      $\m at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup\,%
+    }
   }
-   % from mathtolls
-  \def\MT_smallmatrix_begin:N ##1{%
-    \Let@\restore at math@cr\default at tag
-    \let\math at cr@@\AMS at math@cr@@  % <--- the fix
-    \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
-    \csname MT_smallmatrix_##1_begin:\endcsname
+\else
+%    \end{macrocode}
+% The LuaLaTeX version, only difference is the definition of crampedsubarray
+%    \begin{macrocode}
+  % THIS IS LUALATEX
+  \newcommand\MultlinedHook{
+    % from amsmath
+    \newenvironment{subarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at th\scriptstyle####
+      \Ustopmath
+      \hfil\crcr
+    }{%
+      \crcr\egroup\egroup
+    }
+    % from mathtools
+    \newenvironment{crampedsubarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at math@cr@@  % <--- the fix
+      \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+      \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
+      $\m at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup\,%
+    }
   }
-  % from amsmath
-  \renewenvironment{smallmatrix}{\null\,\vcenter\bgroup
-    \Let@\restore at math@cr\default at tag
-    \let\math at cr@@\AMS at math@cr@@  % <--- the fix
-    \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
-    \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
-    $\m at th\scriptstyle####$\hfil\crcr
-  }{%
-    \crcr\egroup\egroup\,%
-  }
-}
+\fi
 
+
 %    \end{macrocode}
 %  \end{macro}
 %
@@ -5961,6 +6024,25 @@
     {}\box\z@
 }
 %    \end{macrocode}
+% For LuaLaTeX we can use much less code as they have
+% their own direct \cs{cramped...} macros. Directly listed 
+% from \verb|lualatex-math.sty| v1.9 2020/09/25 by Philipp Stephani. Quote: ``Here the
+% additional set of braces is absolutely necessary, otherwise the changed
+% mathematical style would be applied to the material after the
+% \cs{mathchoice} construct.  As the original (mathtools) command works in both text and
+% math mode, we use \cs{ensuremath} here.''
+%    \begin{macrocode}
+\ifx\directlua\@undefined\else
+  \def\MT_cramped_internal:Nn #1#2{
+    {
+      \ensuremath {
+        \use:c { cramped \cs_to_str:N #1 } #2
+      }
+    }
+  }
+\fi
+  
+%    \end{macrocode}
 %  \end{macro}
 %
 %  \subsubsection{Cramped versions of \texttt{\textbackslash
@@ -6019,12 +6101,18 @@
 % \subsubsection{Cramped versions of subarray and \cs{substack}}
 %
 % 
-% \changes{v1.22}{2019/07/22}{Added cramped versions of subarray and \cs{substack}}
-% This was suggested by Henri Menke in
+% \changes{v1.22}{2019/07/22}{Added cramped versions of subarray and
+% \cs{substack}} This was suggested by Henri Menke in
 % \url{https://github.com/latex3/latex2e/issues/149} and
-% \url{https://chat.stackexchange.com/transcript/message/50943985#50943985}. As we are slowly moving away from the expl3 like syntax, we'll implement this with an adjusted copy of \env{subarray} from \pkg{amsmath}.
+% \url{https://chat.stackexchange.com/transcript/message/50943985#50943985}.
+% As we are slowly moving away from the expl3 like syntax, we'll
+% implement this
+% with an adjusted copy of \env{subarray} from \pkg{amsmath}.
+% \changes{v1.26}{2021/03/27}{Fresh copy of subarray from \pkg{amsmath}
+% including the lualatex branch}
 % \begin{environment}{crampedsubarray}
 %    \begin{macrocode}
+\ifx\directlua\@undefined
 \newenvironment{crampedsubarray}[1]{%
   \vcenter\bgroup
   \Let@ \restore at math@cr \default at tag
@@ -6039,13 +6127,33 @@
 % \changes{v1.25}{2021/03/18}{Added \cs{MT_cramped_internal:Nn}, see
 % issue \#17}
 %    \begin{macrocode}
-  %%$\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
-  \span\MT_cramped_internal:Nn \scriptstyle {##}%
-  \hfil\crcr%
+     %%$\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+    \span\MT_cramped_internal:Nn \scriptstyle {##}%
+  \hfil\crcr
 }{%
-\crcr\egroup\egroup
-} 
+  \crcr\egroup\egroup
+}
+\else
+\newenvironment{crampedsubarray}[1]{%
+  \vcenter\bgroup
+  \Let@ \restore at math@cr \default at tag
+  \baselineskip \Umathstacknumup \scriptstyle
+  \advance\baselineskip \Umathstackdenomdown \scriptstyle
+  \lineskip \Umathstackvgap \scriptstyle
+  \lineskiplimit \lineskip
+  \ialign\bgroup\ifx c#1\hfil\fi
+  \Ustartmath
 %    \end{macrocode}
+% Here we simply use the build in cramped command from LuaLaTeX
+%    \begin{macrocode}
+    \crampedscriptstyle{##}
+  \Ustopmath
+  \hfil\crcr
+}{%
+  \crcr\egroup\egroup
+}
+\fi
+%    \end{macrocode}
 % \end{environment}
 % \begin{macro}{\crampedsubstack}
 % And the identical implementation for \cs{crampedsubstack}:

Modified: trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins	2021-04-04 02:05:27 UTC (rev 58724)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins	2021-04-04 02:06:51 UTC (rev 58725)
@@ -10,15 +10,16 @@
 %% 
 %% Copyright (C) 2002-2011 by Morten Hoegholm
 %% Copyright (C) 2012-2019 by Lars Madsen
-%% Copyright (C) 2012-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".
 %% 
@@ -32,7 +33,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: mathtools 2020/03/24 v1.24}
+\Msg{* Package: mathtools 2021/03/18 v1.25}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -44,15 +45,15 @@
 
 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".
 

Deleted: trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.ins	2021-04-04 02:05:27 UTC (rev 58724)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.ins	2021-04-04 02:06:51 UTC (rev 58725)
@@ -1,93 +0,0 @@
-%%
-%% This is file `mhsetup.ins',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mhsetup.dtx  (with options: `install')
-%% 
-%% This is a generated file.
-%% 
-%% Copyright (C) 2002-2007,2010 by Morten Hoegholm
-%% Copyright (C) 2017-2019      by Lars Madsen
-%% Copyright (C) 2020-          by Lars Madsen, The LaTeX3 team
-%% 
-%% 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. 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.
-%% 
-%% This work has the LPPL maintenance status "maintained".
-%% 
-%% This Current Maintainer of this work is Lars Madsen
-%% <daleif at math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools
-%% 
-%% This work consists of the main source file mhsetup.dtx
-%% and the derived files
-%%    mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
-%% 
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: mhsetup 2017/03/31 v1.3 mhsetup}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 2002-2007,2010 by Morten Hoegholm
-Copyright (C) 2017-2019      by Lars Madsen
-Copyright (C) 2020-          by Lars Madsen, The LaTeX3 team
-
-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. 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.
-
-This work has the LPPL maintenance status "maintained".
-
-This Current Maintainer of this work is Lars Madsen
-<daleif at math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools
-
-This work consists of the main source file mhsetup.dtx
-and the derived files
-   mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
-
-\endpreamble
-
-\generate{%
-  \file{mhsetup.ins}{\from{mhsetup.dtx}{install}}%
-  \file{mhsetup.drv}{\from{mhsetup.dtx}{driver}}%
-  \usedir{tex/latex/mh}%
-  \file{mhsetup.sty}{\from{mhsetup.dtx}{package}}%
-}
-
-\obeyspaces
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{*     mhsetup.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `mhsetup.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-\endinput
-%%
-%% End of file `mhsetup.ins'.

Modified: trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2021-04-04 02:05:27 UTC (rev 58724)
+++ trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2021-04-04 02:06:51 UTC (rev 58725)
@@ -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 at math@cr \default at tag
-    \let\math at cr@@\AMS at 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 at th\scriptstyle####$\hfil\crcr
-  }{%
-    \crcr\egroup\egroup
+\ifx\directlua\@undefined
+  % THIS IS NORMAL
+  \newcommand\MultlinedHook{
+    \renewenvironment{subarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup
+    }
+    \renewenvironment{crampedsubarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at math@cr@@  % <--- the fix
+      \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+      \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
+      $\m at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup\,%
+    }
   }
-  \renewenvironment{crampedsubarray}[1]{%
-    \vcenter\bgroup
-    \Let@ \restore at math@cr \default at tag
-    \let\math at cr@@\AMS at 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 at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$
-    \span\MT_cramped_internal:Nn \scriptstyle {####}%
-    \hfil\crcr
-  }{%
-    \crcr\egroup\egroup
+\else
+  % THIS IS LUALATEX
+  \newcommand\MultlinedHook{
+    % from amsmath
+    \newenvironment{subarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at th\scriptstyle####
+      \Ustopmath
+      \hfil\crcr
+    }{%
+      \crcr\egroup\egroup
+    }
+    % from mathtools
+    \newenvironment{crampedsubarray}[1]{%
+      \vcenter\bgroup
+      \Let@ \restore at math@cr \default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at 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 at math@cr\default at tag
+      \let\math at cr@@\AMS at math@cr@@  % <--- the fix
+      \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
+      \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
+      $\m at th\scriptstyle####$\hfil\crcr
+    }{%
+      \crcr\egroup\egroup\,%
+    }
   }
-   % from mathtolls
-  \def\MT_smallmatrix_begin:N ##1{%
-    \Let@\restore at math@cr\default at tag
-    \let\math at cr@@\AMS at 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 at math@cr\default at tag
-    \let\math at cr@@\AMS at math@cr@@  % <--- the fix
-    \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
-    \ialign\bgroup\hfil$\m at th\scriptstyle####$\hfil&&\thickspace\hfil
-    $\m at 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 at math@cr \default at tag
@@ -1496,12 +1564,29 @@
   \lineskip\thr@@\fontdimen8 \scriptfont\thr@@
   \lineskiplimit\lineskip
   \ialign\bgroup\ifx c#1\hfil\fi
-  %%$\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
-  \span\MT_cramped_internal:Nn \scriptstyle {##}%
-  \hfil\crcr%
+     %%$\m at th\scriptstyle\kern-\nulldelimiterspace\radical\z@{##}$% <-- changed line
+    \span\MT_cramped_internal:Nn \scriptstyle {##}%
+  \hfil\crcr
 }{%
-\crcr\egroup\egroup
+  \crcr\egroup\egroup
 }
+\else
+\newenvironment{crampedsubarray}[1]{%
+  \vcenter\bgroup
+  \Let@ \restore at math@cr \default at 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
+}
+\fi
 \newcommand{\crampedsubstack}[1]{\crampedsubarray{c}#1\endcrampedsubarray}
 \newcommand{\MT_prescript_inner:}[4]{
   \@mathmeasure\z@#4{\MT_prescript_sup:{#1}}



More information about the tex-live-commits mailing list.