texlive[54516] Master/texmf-dist: mathtools (24mar20)

commits+karl at tug.org commits+karl at tug.org
Tue Mar 24 21:50:35 CET 2020


Revision: 54516
          http://tug.org/svn/texlive?view=revision&revision=54516
Author:   karl
Date:     2020-03-24 21:50:35 +0100 (Tue, 24 Mar 2020)
Log Message:
-----------
mathtools (24mar20)

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.dtx
    trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx
    trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx
    trunk/Master/texmf-dist/tex/latex/mathtools/empheq.sty
    trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
    trunk/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/mathtools/README.md
    trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins
    trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/latex/mathtools/README

Deleted: trunk/Master/texmf-dist/doc/latex/mathtools/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathtools/README	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/doc/latex/mathtools/README	2020-03-24 20:50:35 UTC (rev 54516)
@@ -1,84 +0,0 @@
-The mathtools bundle
-=============
-Morten Hoegholm (c) 2002-2011
-Lars Madsen     (c) 2012-
-email: daleif at math.au.dk
-License: LaTeX Project Public License
-
-The files in the mathtools bundle are:
-    mhsetup.dtx
-    mathtools.dtx
-    empheq.dtx
-and derived files. The derived files of each .dtx-file are listed
-at the top of the respective .dtx-file.
-
-
-INSTALLATION
-============
-Running TeX on each dtx file extracts the runtime files. See the dtx
-files for details.
-
-DESCRIPTION
-===========
-
-
-mathtools
-=========
-
-The mathtools package provides many useful tools for mathematical
-typesetting. It is based on amsmath and fixes various deficiencies
-of amsmath and standard LaTeX. It provides:
-  -- Extensible symbols, such as brackets, arrows, harpoons, etc.
-  -- Various symbols such as \coloneqq (:=).
-  -- Easy creation of new tag forms.
-  -- Showing only the referenced equations.
-  -- Extensible arrows, harpoons and hookarrows.
-  -- Starred versions of the amsmath matrix environments for
-     specifying the column alignment.
-  -- More building blocks: multlined, cases-like environments, new
-     gathered environments.
-  -- Math versions of \makebox, \llap, \rlap etc.
-  -- Cramped math styles.
-  -- Macro generators.
-  -- and more...
-
-mathtools requires mhsetup.
-
-empheq
-======
-
-The empheq package is a visual markup extension designed to
-function on top of amsmath. It features:
-  -- Boxing multi line math displays while leaving equation
-     numbers untouched at the margin. Any kind of box will do.
-  -- Making the ntheorem package place end-of-theorem markers
-     perfectly.
-  -- Placing arbitrary material on either side of math displays.
-     This includes delimiters that automatically scale to the
-     correct size.
-
-empheq requires mathtools.
-
-
-mhsetup
-=======
-
-The mhsetup package defines various programming tools needed by
-both empheq and mathtools. The syntax is the same as for expl3, 
-but there is no code overlap (anymore as of May 2017).
-In the future, most of these tools will probably be an integral part of LaTeX3 (they were). 
-
-
-BUG REPORTS
-===========
-
-The bundle is maintained by:
-
-  Morten H\o gholm  
-  Lars Madsen <daleif at math.au.dk>
-  
-
-Please report bugs to daleif at math.au.dk
-
-===========
-This README file was last revised 2017/05/24.

Added: trunk/Master/texmf-dist/doc/latex/mathtools/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/mathtools/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/mathtools/README.md	2020-03-24 20:50:35 UTC (rev 54516)
@@ -0,0 +1,56 @@
+The `mathtools` bundle
+======================
+
+`mathtools`
+-----------
+
+The `mathtools` package provides many useful tools for mathematical
+typesetting. It is based on `amsmath` and fixes various deficiencies
+of `amsmath` and standard LaTeX. It provides:
+
+- Extensible symbols, such as brackets, arrows, harpoons, etc.
+- Various symbols such as `\coloneqq` (:=).
+- Easy creation of new tag forms.
+- Showing only the referenced equations.
+- Extensible arrows, harpoons and hook arrows.
+- Starred versions of the `amsmath` matrix environments for
+  specifying the column alignment.
+- More building blocks: multlined, cases-like environments, new
+  gathered environments.
+- Math versions of `\makebox`, `\llap`, `\rlap`, etc.
+- Cramped math styles.
+- and more ...
+
+`mathtools` requires `mhsetup`.
+
+`empheq`
+--------
+
+The `empheq` package is a visual markup extension designed to
+function on top of `amsmath`. It features:
+
+- Boxing multi line math displays while leaving equation
+  numbers untouched at the margin. Any kind of box will do.
+- Making the `ntheorem` package place end-of-theorem markers
+  perfectly.
+- Placing arbitrary material on either side of math displays.
+  This includes delimiters that automatically scale to the
+  correct size.
+
+`empheq` requires `mathtools`.
+
+`mhsetup`
+---------
+
+The `mhsetup` package defines various programming tools needed by
+both `empheq` and `mathtools`. In the future, most of these tools will
+probably be an integral part of LaTeX3.
+
+-----
+
+Copyright (C) 2002-2011 Morten Hoegholm  
+Copyright (C) 2012-2019 Lars Madsen  
+Copyright (C) 2020 Lars Madsen, The LaTeX3 Project  
+<https://latex-project.org/>  
+All rights reserved.
+


Property changes on: trunk/Master/texmf-dist/doc/latex/mathtools/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
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.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/empheq.dtx	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/source/latex/mathtools/empheq.dtx	2020-03-24 20:50:35 UTC (rev 54516)
@@ -1,7 +1,8 @@
 % \iffalse meta-comment
 %
 % Copyright (C) 2002-2007 by Morten Hoegholm
-% Copyright (C) 2012      by Lars Madsen
+% Copyright (C) 2012-2019 by Lars Madsen
+% 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
@@ -14,7 +15,7 @@
 % This work has the LPPL maintenance status "maintained".
 %
 % This Current Maintainer of this work is
-% Lars Madsen
+% Lars Madsen, The LaTeX3 Project
 %
 % This work consists of the main source file empheq.dtx
 % and the derived files
@@ -68,7 +69,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: empheq 2017/03/31 v2.15 empheq}
+\Msg{* Package: empheq 2020/03/24 v2.16 empheq}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -79,7 +80,8 @@
 This is a generated file.
 
 Copyright (C) 2002-2007 by Morten Hoegholm
-Copyright (C) 2012-     by Lars Madsen
+Copyright (C) 2012-2019 by Lars Madsen
+Copyright (C) 2020-     by Lars Madsen, The LaTeX3 Project
 
 
 This work may be distributed and/or modified under the
@@ -93,7 +95,7 @@
 This work has the LPPL maintenance status "maintained".
 
 This Current Maintainer of this work is
-Lars Madsen
+Lars Madsen, The LaTeX3 Project
 
 This work consists of the main source file empheq.dtx
 and the derived files
@@ -131,7 +133,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{empheq.drv}%
-  [2017/03/31 v2.15 Emphasizing equations]
+  [2020/03/24 v2.16 Emphasizing equations]
 \documentclass{ltxdoc}
 \usepackage{mathpazo}
 \usepackage[overload]{empheq}
@@ -142,6 +144,7 @@
 \hyphenation{emph-eq}
 \makeatletter
 \providecommand*\pkg[1]{\textsf{#1}}
+\providecommand*\cls[1]{\textsf{#1}}
 \providecommand*\env[1]{\texttt{#1}}
 \providecommand*\email[1]{\href{mailto:#1}{\texttt{#1}}}
 \providecommand*\mode[1]{\texttt{[#1]}}
@@ -149,6 +152,17 @@
 \addtolength\marginparwidth{-30pt}
 
 
+\newcommand\lineref[1]{
+  \begingroup
+  % \p at CodelineNo \normalfont  \scriptsize  475
+  \let\p at CodelineNo\relax
+  \let\normalfont\relax
+  %\let\scriptsize\relax
+  \ref{#1}
+  \endgroup
+}
+
+
 \newcommand*\AddDescribe[3]{%
   \@namedef{Describe#1}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
     \@nameuse{Describe@#1}}
@@ -323,7 +337,8 @@
 \DocInput{empheq.dtx}
 \end{document}
 %</driver>
-%  \fi
+% \fi
+%  \changes{v2.16}{2020/03/24}{fixed several bugs related to amsart/-book}
 %  \changes{v2.15}{2017/03/31}{Fixed a bug in relation to the AMS
 %  classes and completed prefixing macros belonging to \pkg{mhsetup}
 %  and \pkg{empheq}}
@@ -366,7 +381,7 @@
 %  \title{The \pkg{empheq} package\thanks{This file has version number
 %  \fileversion, last revised \filedate.}\\
 %  Emphasizing equations in \LaTeXe}
-%  \author{Morten H\o gholm, Lars Madsen}
+%  \author{Morten Hoegholm, Lars Madsen, The LaTeX3 Project}
 %  
 %  \date{\filedate}
 %
@@ -1624,11 +1639,10 @@
 %  \section{Contact information}
 %
 %  Should you have any feature request, suggestions, or bug reports
-%  then feel free to contact Lars Madsen at
+%  then feel free to open an issue at (it also covers \pkg{empheq})
 %  \begin{quote}
-%    \email{daleif at math.au.dk}
+%    \url{https://github.com/latex3/mathtools}
 %  \end{quote}
-%  Please put `empheq' in the subject line.
 %
 %  \subsection*{Contributors}
 %
@@ -1874,6 +1888,7 @@
 %  \begin{macro}{\l_EQ_totalwidth_dim}
 %  \begin{macro}{\l_EQ_displaywidth_dim}
 %  \begin{macro}{\l_EQ_temp_linewidth_dim}
+%  \begin{macro}{\l_EQ_linewidth_dim}
 %  \begin{macro}{\EmphEqdelimitershortfall}
 %  \begin{macro}{\EmphEqdelimiterfactor}
 %  \begin{macro}{\g_EQ_toptag_height_dim}
@@ -1889,9 +1904,13 @@
 \newdimen\l_EQ_displaywidth_dim
 %    \end{macrocode}
 %  Just to make it accessible.
+% \changes{v2.16}{2020/03/23}{Added \cs{l_EQ_linewidth_dim} since due
+% to the \AmS\ classes being able to not rely on \cs{linewidth} can be
+% useful.}
 %    \begin{macrocode}
 \def\EmphEqdisplaywidth{\l_EQ_displaywidth_dim}
 \newdimen\l_EQ_temp_linewidth_dim
+\newdimen\l_EQ_linewidth_dim
 \newdimen\EmphEqdelimitershortfall
 \newcount\EmphEqdelimiterfactor
 \EmphEqdelimiterfactor950
@@ -1913,6 +1932,7 @@
 %  \end{macro}
 %  \end{macro}
 %  \end{macro}
+%  \end{macro}
 %
 %  \begin{macro}{\EQ_outerbox:}
 %  \begin{macro}{\EQ_innerbox:}
@@ -2049,8 +2069,8 @@
     \MH_else:
       \setkeys{\MT_options_name:}{multlined-pos=t}
     \MH_fi:
-      \g at addto@macro\EQ_complete_mathdisplay:{
-        \begin{MTmultlined}\relax}
+    \g at addto@macro\EQ_complete_mathdisplay:{
+      \begin{MTmultlined}\relax}
   }
   \g at addto@macro\EQ_complete_mathdisplay:\EQ_mathbody:
   \MH_if_boolean:nT {outer_mult}{
@@ -2220,7 +2240,45 @@
 %    \begin{macrocode}
   \MH_let:NwN\SetTagPlusEndMark\EQ_tag_plus_endmark:
   \MH_let:NwN\SetOnlyEndMark\EQ_only_endmark:
+%    \end{macrocode}
+% \changes{v2.16}{2020/03/19}{Added fix for amsart and amsbook}
+% \changes{v2.16}{2020/03/23}{Added additional length as it is useful
+% against amsart and friends}
+%    \begin{macrocode}
   \l_EQ_temp_linewidth_dim\linewidth
+  \l_EQ_linewidth_dim\linewidth
+%    \end{macrocode}
+% In classes like \cls{amsart} and \cls{amsbook} thye set
+% \cs{displaywidth} to a fixed value. This gives problems inside
+% lists, where these classes want to use the full width, not the
+% effective width. They do this via \cs{everydisplay} 
+% which is actually too late for when \cs{EQ_initialize:} runs! 
+% We know that \cls{amsart/book} defines
+% \begin{verbatim}
+% \def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}
+% \end{verbatim}
+% and then adds this to \cs{everydisplay}. So our fix will be to see
+% if \cs{fullwidthdisplay} is defined, run it locally and then extract
+% the value of \cs{displaywidth} using a global scratch variable. If
+% that size is then larger than the current \cs{linewidth} we will use
+% it. Additionally we also save this value in a static length, so we
+% can use this everywhere instead of \cs{linewidth}.
+%    \begin{macrocode}
+  \@tempdima\z@
+  \begingroup
+  \ifdefined\fullwidthdisplay\relax
+    \fullwidthdisplay
+    \global\@tempdima\displaywidth
+  \fi
+  \endgroup
+  \ifdim\@tempdima>\linewidth\relax
+    \l_EQ_temp_linewidth_dim\@tempdima
+    \l_EQ_linewidth_dim\@tempdima
+  \fi
+  \@tempdima\z@ 
+%    \end{macrocode}
+% -- end of \cls{amsart/-book} fix.
+%    \begin{macrocode}
   \g_EQ_toprow_height_dim\z@
   \g_EQ_bottomrow_depth_dim\z@
   \g_EQ_toptag_height_dim\z@
@@ -2303,7 +2361,9 @@
 %  \subsubsection{Separating Tags and Display}
 %
 %  \begin{macro}{\EQ_typeset_tags:}
-%  Typesetting the tags without the display. 
+%  Typesetting the tags without the display.  The main idea here is to
+%  typeset everything inside a box of a massive width, so wide that
+%  the math part is way outside the area of the text block. 
 %    \begin{macrocode}
 \def\EQ_typeset_tags:{%
   \sbox\EQ_tag_box{%
@@ -2319,7 +2379,7 @@
 %  The AMS classes sets \cs{displaywidth} equal to \cs{columnwidth} in
 %  \cs{everydisplay}. This is bad for us as then the reqno equation
 %  numbers are not typeset at the right edge of the parbox we are
-%  in. Simplest solution: Locally reset \cs{columnwidth}.
+%  in. Simplest solution: Locally reset \cs{columnwidth}.  
 %  \changes{v2.15}{2017/03/28}{Resetting \cs{columnwidth} as a fix for
 %  a setting in AMS classes} 
 %    \begin{macrocode}
@@ -2727,9 +2787,13 @@
 %  math display.
 % \changes{v2.15}{2017/03/31}{added MH\_ prefix}
 % \changes{v2.15}{2017/03/31}{added EQ\_ prefix}
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
 %    \begin{macrocode}
     \setlength{\l_EQ_temp_linewidth_dim}{%
-      \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
+      % \linewidth
+      \l_EQ_linewidth_dim
+      -\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
   \MH_fi:}
 \def\EQ_modify_linewidth_ii:{\EQ_modify_linewidth_i:}
 \def\EQ_find_displaywidth_i:{%
@@ -2777,6 +2841,13 @@
 %  This was fairly easy, but then I had to take care of \ldots
 %
 %  \subsubsection{The \env{multline} Family}
+%
+%  \emph{Note: These next three paragraphs are rather confusing. They
+%  are referring to an older implementation (also available via the
+%  \opt{oldmultline} option, where the \env{multline} feature was
+%  implemented via \env{flalign}, nowadays we use \env{multlined} from
+%  \pkg{mathtools} wrapped inside a \env{gather} for the equation number.}
+%
 %  This was quite a pickle. Its implementation in \pkg{amsmath} is
 %  very strange indeed; for instance the tag is typeset in the
 %  measuring phase! So instead I thought I could fake it, but how
@@ -2798,6 +2869,10 @@
 %  \cs{MakeKeyvalAliasAddon} now}
 %  Then we make \env{multline} into an alias for {flalign} but with
 %  an extra switch \cs{ifEQ_multline:} set to true.
+% 
+%  Note this version of the \env{multline} code is being used when we
+%  use the \emph{bad} \env{multline} implementation, see code line
+%  \lineref{goodandbad} onwards.
 %    \begin{macrocode}
 \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}
   {flalign}{\MH_set_boolean_T:n {multline}}
@@ -2863,7 +2938,8 @@
 \MH_let:NwN \endMTmultlined \endmultlined
 %    \end{macrocode}
 %  \end{environment}
-%  We make a choice here: the good \env{multline} or the bad?
+% We make a choice here: the good \env{multline} or the bad?
+% \refstepcounter{CodelineNo}\label{goodandbad}\addtocounter{CodelineNo}{-1}
 %    \begin{macrocode}
 \MH_if_boolean:nTF {good_mult}{
 %    \end{macrocode}
@@ -2870,71 +2946,100 @@
 %  The good:
 % \changes{v2.15}{2017/03/31}{added MH\_ prefix}
 %  \changes{v2.15}{2017/03/31}{added EQ\_ prefix}
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
 %    \begin{macrocode}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
-  {\MH_set_boolean_T:n {outer_mult}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
-  {\MH_set_boolean_T:n {outer_mult}}
-\def\EQ_modify_linewidth_iii_mult:{
-  \setlength{\l_EQ_temp_linewidth_dim}{%
-    \linewidth-\widthof{\EQ_outerbox:{}}}%
-  \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-    \EQ_multline_modify_linewidth_tag:
-  \MH_else:
-    \EQ_multline_modify_linewidth_notag:
-  \MH_fi:
-  \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
-}
-\def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
-\def\EQ_find_displaywidth_iii_mult:{%
-  \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
-  \MH_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2:
-  \MH_or: % #3:
-    \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
-  \MH_or: % #4:
-    \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
-  \MH_fi:}
-\def\EQ_find_displaywidth_iv_mult:{\EQ_find_displaywidth_iii_mult:}
-\def\EQ_place_display_iii_mult:{
-  \MH_if_case:w \l_EQ_alignmentmode_int
-  \MH_or: % #1:
+  \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
+    {\MH_set_boolean_T:n {outer_mult}}
+  \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
+    {\MH_set_boolean_T:n {outer_mult}}
+  \def\EQ_modify_linewidth_iii_mult:{
+    \setlength{\l_EQ_temp_linewidth_dim}{%
+      % \linewidth
+      \l_EQ_linewidth_dim
+      -\widthof{\EQ_outerbox:{}}}%
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-      \abovedisplayshortskip=\abovedisplayskip
-      \rlap{
-        \kern-.5\linewidth
-        \kern\multlinegap
-        \EQ_use_mathdisplay:
-      }
+      \EQ_multline_modify_linewidth_tag:
     \MH_else:
-      \EQ_use_mathdisplay:
+      \EQ_multline_modify_linewidth_notag:
     \MH_fi:
-  \MH_or: % #2:
-    \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-      \llap{
+    \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
+%    \end{macrocode}
+% Here is an interesting issue. We have just calculated
+% \cs{l_MT_multwidth_dim} which will be the width of the internal
+% \env{multline}. But we are typesetting inside \env{gather} inside a
+% box of width \cs{l_EQ_temp_linewidth_dim} so the effective width of
+% the display is \cs{@mathmargin} less. Solution: add \cs{@mathmargin}
+% back in:
+% \changes{v2.16}{2020/03/23}{Added \cs{@mathmargin} back into the box
+% width}
+%    \begin{macrocode}
+    \MH_if_case:w \l_EQ_alignmentmode_int
+    \MH_or: \MH_or: % 1 and 2
+    \MH_or:
+      \MH_addtolength:dn
+        \l_EQ_temp_linewidth_dim{\@mathmargin}%
+    \MH_or:
+        \MH_addtolength:dn
+          \l_EQ_temp_linewidth_dim{\@mathmargin}%
+    \MH_fi:
+  }
+  \def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
+  \def\EQ_find_displaywidth_iii_mult:{%
+    \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
+    \MH_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2:
+    \MH_or: % #3:
+      \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
+    \MH_or: % #4:
+      \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
+    \MH_fi:}
+  \def\EQ_find_displaywidth_iv_mult:{\EQ_find_displaywidth_iii_mult:}
+%    \end{macrocode}
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
+%    \begin{macrocode}
+  \def\EQ_place_display_iii_mult:{
+    \MH_if_case:w \l_EQ_alignmentmode_int
+    \MH_or: % #1:
+      \MH_if_dim:w \g_EQ_widesttag_dim>\z@
+        \abovedisplayshortskip=\abovedisplayskip
+        \rlap{
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \kern\multlinegap
+          \EQ_use_mathdisplay:
+        }
+      \MH_else:
         \EQ_use_mathdisplay:
-        \kern-.5\linewidth
-        \kern\multlinegap
-      }%
-    \MH_else:
+      \MH_fi:
+    \MH_or: % #2:
+      \MH_if_dim:w \g_EQ_widesttag_dim>\z@
+        \llap{
+          \EQ_use_mathdisplay:
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \kern\multlinegap
+        }%
+      \MH_else:
+        \EQ_use_mathdisplay:
+      \MH_fi:
+    \MH_or: % #3:
       \EQ_use_mathdisplay:
+    \MH_or: % #4:
+      \EQ_use_mathdisplay:
     \MH_fi:
-  \MH_or: % #3:
-    \EQ_use_mathdisplay:
-  \MH_or: % #4:
-    \EQ_use_mathdisplay:
-  \MH_fi:
-}
-\def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
+  }
+  \def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
 %    \end{macrocode}
 %    \begin{macrocode}
-}{
+}{% on to the 'bad' version
 %    \end{macrocode}
 %  The bad
 %    \begin{macrocode}
-\def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
+  \def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
 %    \end{macrocode}
 %  This is a very tricky little detail. If we're in \mode{leqno} mode
-%  we need just a we little width inside the \env{flalign}, so we put
+%  we need just a wee little width inside the \env{flalign}, so we put
 %  in the smallest possible amount. Otherwise we wind up in a
 %  \begin{verbatim}
 %  ! Arithmetic overflow.
@@ -2946,8 +3051,8 @@
 %  how many users can fix this by themselves?
 % \changes{v2.15}{2017/03/31}{added MH\_ prefix}
 %    \begin{macrocode}
-  \hskip1sp#2#3{{}#5}#4%
-  \MH_if:w *#1\relax\MH_else:\notag\MH_fi:}
+    \hskip1sp#2#3{{}#5}#4%
+    \MH_if:w *#1\relax\MH_else:\notag\MH_fi:}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -2958,51 +3063,51 @@
 %  first three are the general purpose ones that also have a starred
 %  version. The other three are for normal use.
 %    \begin{macrocode}
-\def\multleft{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_left:n}
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
-  }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_left:n}%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
-  }
-  \EQ_next:}}%
-\def\multcenter{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_center:n}%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
-  }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_center:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
-  }
-  \EQ_next:}}%
-\def\multright{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
-  }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
-  }
-  \EQ_next:}}
+  \def\multleft{\@ifstar{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_left:n}
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
+    }
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_left:n}%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
+    }
+    \EQ_next:}}%
+  \def\multcenter{\@ifstar{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_center:n}%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
+    }
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_center:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
+    }
+    \EQ_next:}}%
+  \def\multright{\@ifstar{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
+    }
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
+    }
+    \EQ_next:}}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3014,55 +3119,55 @@
 %  be placed in the first line.
 %  \changes{v2.15}{2017/03/31}{added MH\_ prefixes}
 %    \begin{macrocode}
-\def\multfirst{%
-  \MH_if_boolean:nTF {multlined}{
-     \def\EQ_next:{\EQ_multlined_left:n }%
-  }{
-    \MH_if_case:w \l_EQ_alignmentmode_int
-    \MH_or: % #1:
-      \def\EQ_next:{\multleft}%
-    \MH_or: % #2:
-      \def\EQ_next:{\multleft*}%
-    \MH_or: % #3:
-      \def\EQ_next:{\multleft}%
-    \MH_or: % #4:
-      \def\EQ_next:{\multleft*}%
-    \MH_fi:
-  }
-  \EQ_next:}
-%    \end{macrocode}
-%  Pretend the star was never there.
-%    \begin{macrocode}
-\def\multmiddle{%
-  \def\EQ_next:{%
+  \def\multfirst{%
     \MH_if_boolean:nTF {multlined}{
-      \expandafter\EQ_multlined_center:n
+       \def\EQ_next:{\EQ_multlined_left:n }%
     }{
-      \expandafter\multcenter
+      \MH_if_case:w \l_EQ_alignmentmode_int
+      \MH_or: % #1:
+        \def\EQ_next:{\multleft}%
+      \MH_or: % #2:
+        \def\EQ_next:{\multleft*}%
+      \MH_or: % #3:
+        \def\EQ_next:{\multleft}%
+      \MH_or: % #4:
+        \def\EQ_next:{\multleft*}%
+      \MH_fi:
     }
-  }%
-  \@ifstar{\EQ_next:}{\EQ_next:}}
+    \EQ_next:}
 %    \end{macrocode}
+%  Pretend the star was never there.
+%    \begin{macrocode}
+  \def\multmiddle{%
+    \def\EQ_next:{%
+      \MH_if_boolean:nTF {multlined}{
+        \expandafter\EQ_multlined_center:n
+      }{
+        \expandafter\multcenter
+      }
+    }%
+    \@ifstar{\EQ_next:}{\EQ_next:}}
+%    \end{macrocode}
 %  If we're  using the \mode{reqno} option, the equation number
 %  should be placed in the last line.
 %  \changes{v2.15}{2017/03/31}{added MH\_ prefixes}
 %    \begin{macrocode}
-\def\multlast{%
-  \MH_if_boolean:nTF {multlined}{
-     \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \MH_if_case:w \l_EQ_alignmentmode_int
-    \MH_or: % #1:
-      \def\EQ_next:{\multright*}%
-    \MH_or: % #2:
-      \def\EQ_next:{\multright}%
-    \MH_or: % #3:
-      \def\EQ_next:{\multright*}%
-    \MH_or: % #4:
-      \def\EQ_next:{\multright}%
-    \MH_fi:
-  }
-  \EQ_next:}
+  \def\multlast{%
+    \MH_if_boolean:nTF {multlined}{
+       \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \MH_if_case:w \l_EQ_alignmentmode_int
+      \MH_or: % #1:
+        \def\EQ_next:{\multright*}%
+      \MH_or: % #2:
+        \def\EQ_next:{\multright}%
+      \MH_or: % #3:
+        \def\EQ_next:{\multright*}%
+      \MH_or: % #4:
+        \def\EQ_next:{\multright}%
+      \MH_fi:
+    }
+    \EQ_next:}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3069,10 +3174,15 @@
 %  \end{macro}
 %  \begin{macro}{\multlinedwidth}
 %  Here begins the code for \env{multlined}.
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
 %    \begin{macrocode}
-\MH_new_boolean:n {multlined}
-\newdimen\multlinedwidth
-\MH_setlength:dn \multlinedwidth{.7\linewidth}
+  \MH_new_boolean:n {multlined}
+  \newdimen\multlinedwidth
+  \MH_setlength:dn \multlinedwidth{
+    % .7\linewidth
+    0.7\l_EQ_linewidth_dim
+  }
 %    \end{macrocode}
 %  \end{macro}
 %  \begin{environment}{multlined}
@@ -3084,25 +3194,25 @@
 %  Some trickery as we want to scan for two optional arguments that
 %  may be interchanged.
 %    \begin{macrocode}
-\renewenvironment{multlined}%
-  {\MH_nospace_ifnextchar:Nnn [  {\EQ_multlined_I:w}
-                                 {\EQ_multlined_I:w[c]}
-  }
-  { \endaligned }
-\def\EQ_multlined_I:w[#1]{%
-  \MH_nospace_ifnextchar:Nnn[  {\EQ_multlined_II:w[#1]}
-                               {\EQ_multlined_II:w[#1][\multlinedwidth]}}
-\def\EQ_multlined_II:w[#1][#2]{%
+  \renewenvironment{multlined}%
+    {\MH_nospace_ifnextchar:Nnn [  {\EQ_multlined_I:w}
+                                   {\EQ_multlined_I:w[c]}
+    }
+    { \endaligned }
+  \def\EQ_multlined_I:w[#1]{%
+    \MH_nospace_ifnextchar:Nnn[  {\EQ_multlined_II:w[#1]}
+                                 {\EQ_multlined_II:w[#1][\multlinedwidth]}}
+  \def\EQ_multlined_II:w[#1][#2]{%
 %    \end{macrocode}
 %  We tell \LaTeX\ that we're in \env{multlined}.
 %    \begin{macrocode}
-  \MH_set_boolean_T:n {multlined}
+    \MH_set_boolean_T:n {multlined}
 %    \end{macrocode}
 %  \changes{v2.10}{2004/07/26}{Fixed restoration of \cmd{\\}}
 %  Restore the meaning of \cmd{\\} inside \env{multlined}, else it
 %  wouldn't work in the \env{equation} environment.
 %    \begin{macrocode}
-  \MH_let:NwN \Let@\MT_saved_Let:
+    \MH_let:NwN \Let@\MT_saved_Let:
 %    \end{macrocode}
 %  Then check the first optional argument and call
 %  \cs{EQ_multlined_III:w}, which sets \cs{multlinewidth} if
@@ -3110,21 +3220,21 @@
 %  three columns).
 % \changes{v2.15}{2017/03/31}{added MH\_ prefix}
 %    \begin{macrocode}
-  \MH_if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
-  \MH_else:
-    \MH_if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
+    \MH_if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
     \MH_else:
-      \MH_if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
+      \MH_if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
       \MH_else:
-        \EQ_multlined_III:nn {#2}{#1}%
+        \MH_if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
+        \MH_else:
+          \EQ_multlined_III:nn {#2}{#1}%
+        \MH_fi:
       \MH_fi:
     \MH_fi:
-  \MH_fi:
-  \mkern-\thinmuskip
-  \EQ_next:}
-\def\EQ_multlined_III:nn #1#2{%
-  \def\EQ_next:{\setlength\multlinedwidth{#2}%
-                          \start at aligned{#1}{\thr@@}}}
+    \mkern-\thinmuskip
+    \EQ_next:}
+  \def\EQ_multlined_III:nn #1#2{%
+    \def\EQ_next:{\setlength\multlinedwidth{#2}%
+                            \start at aligned{#1}{\thr@@}}}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3136,12 +3246,12 @@
 %  The internal versions of \cs{multleft} etc.\ adapted for
 %  \env{multlined}.
 %    \begin{macrocode}
-\def\EQ_multlined_left:n #1{%
-  \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_center:n #1{%
-  &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_right:n #1{%
-  &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
+  \def\EQ_multlined_left:n #1{%
+    \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
+  \def\EQ_multlined_center:n #1{%
+    &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
+  \def\EQ_multlined_right:n #1{%
+    &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -3155,12 +3265,16 @@
 %  \subsubsection{The Code for \env{flalign} \& \env{multline}}
 % \changes{v2.15}{2017/03/31}{added MH\_ prefix}
 %  \changes{v2.15}{2017/03/31}{added EQ\_ prefix}
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
 %    \begin{macrocode}
 \EQ_new_equationtype:nnn {EmphEqEnv}{flalign}{5}
 \EQ_new_equationtype:nnn {EmphEqEnv}{flalign*}{6}
 \def\EQ_modify_linewidth_v:{%
   \setlength{\l_EQ_temp_linewidth_dim}{%
-    \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
+    % \linewidth
+    \l_EQ_linewidth_dim
+    -\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
   \MH_if_dim:w \g_EQ_widesttag_dim>\z@
     \MH_if_boolean:nTF {multline}{
       \EQ_multline_modify_linewidth_tag:
@@ -3190,16 +3304,24 @@
   \MH_setlength:dn
     \l_EQ_displaywidth_dim{\l_EQ_temp_linewidth_dim}}
 \def\EQ_find_displaywidth_vi:{\EQ_find_displaywidth_v:}
+%    \end{macrocode}
+% \changes{v2.16}{2020/03/23}{switched \cs{linewidth} to
+% \cs{l_EQ_linewidth_dim} due to amsart forcing full width displays}
+%    \begin{macrocode}
 \def\EQ_place_display_v:{%
   \MH_if_case:w \l_EQ_alignmentmode_int
   \MH_or: % #1:
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
       \MH_if_boolean:nTF {multline}{
-        \rlap{\kern\multlinegap  \kern-.5\linewidth
+        \rlap{\kern\multlinegap
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
           \EQ_use_mathdisplay:
           \kern-\mintagsep  \kern\multlinetaggap}%
       }{
-        \rlap{\kern-.5\linewidth\EQ_use_mathdisplay:}%
+        \rlap{%\kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \EQ_use_mathdisplay:}%
       }
     \MH_else:
       \EQ_use_mathdisplay:
@@ -3209,15 +3331,27 @@
       \MH_if_boolean:nTF {multline}{
         \llap{\kern-\mintagsep \kern\multlinetaggap
           \EQ_use_mathdisplay:
-          \kern\multlinegap  \kern-.5\linewidth}%
+          \kern\multlinegap
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+        }%
       }{
-        \llap{\EQ_use_mathdisplay:\kern-.5\linewidth}%
+        \llap{\EQ_use_mathdisplay:
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+        }%
       }
     \MH_else:
       \EQ_use_mathdisplay:
     \MH_fi:
   \MH_or: % #3:
-    \MH_if_boolean:nF {multline}{ \kern-\multlinetaggap }
+%    \end{macrocode}
+% \changes{v2.16}{2020/03/24}{\cs{multlinetaggap} should be added when
+% \opt{multline} is true, and if false \cs{\@mathmargin} should ned
+% kerned away}
+%    \begin{macrocode}
+    \MH_if_boolean:nTF {multline}{ \kern-\multlinetaggap }
+                                 { \kern-\@mathmargin    } 
     \EQ_use_mathdisplay:
   \MH_or: % #4:
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
@@ -3538,6 +3672,81 @@
 %  \end{macro}
 %
 %
+% \subsection{Adjusting for \cls{amsart} and \cls{amsbook}}
+% \label{sec:adjust-clsams-clsams}
+%
+% As mentioned earlier the \AmS{} classes \cls{amsart} and
+% \cls{amsbook} explicitly sets \cs{displaywidth} to
+% \cs{columnwidth}. The main reason for this (1) they use equation
+% numbers on the left and (2) if an equation is inside a list, they
+% still want the equation to use the full width (the standard classes
+% under \opt{leqno} will have their equation number indented to match
+% the effective line width/indentation).
+%
+% Why is problematic for us? Firstly, this messes up our trick to
+% separate the tags (equation numbers) from the display (as we need
+% the construction to follow our \emph{very large} line
+% width). Secondly this messes up the calculations of \cs{alignsep@},
+% since we can no longer assume that \cs{alignsep@} was calculated
+% against the with of the box we wanted. Here is an example that
+% \begin{verbatim}
+% \makeatletter
+%  \begingroup
+%  \fbox{\parbox{0.5\textwidth}{%
+%      \def\maketag@@@#1{\kern1sp\vphantom{#1}}%
+%      \begin{align}
+%        align &= align & align &= align \\   &= align
+%    \end{align}}}
+%  \par\noindent
+%  \def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}
+%  \edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay}
+%  \everydisplay\expandafter{\@tempa}
+%  \fbox{\parbox{0.5\textwidth}{%
+%    \def\maketag@@@#1{\kern1sp\vphantom{#1}}%
+%    \begin{align}
+%      align &= align & align &= align \\  &= align
+%    \end{align}}\vspace{-2\baselineskip}}
+%  \endgroup
+%  \makeatletter
+% \end{verbatim}
+% \makeatletter
+%  \begingroup^^A
+%  \fboxsep=2pt
+%  \abovedisplayskip0pt 
+%  \belowdisplayskip0pt 
+%  \abovedisplayshortskip0pt 
+%  \belowdisplayshortskip0pt
+%  \fbox{\parbox{0.5\textwidth}{%
+%      \def\maketag@@@#1{\kern1sp\vphantom{#1}}%
+%      \begin{align}
+%        align &= align & align &= align \\   &= align
+%    \end{align}}}
+%  \par\noindent
+%  \def\fullwidthdisplay{\displayindent\z@ \displaywidth\columnwidth}^^A
+%  \edef\@tempa{\noexpand\fullwidthdisplay\the\everydisplay}^^A
+%  \everydisplay\expandafter{\@tempa}^^A
+%  \fbox{\parbox{0.5\textwidth}{%
+%    \def\maketag@@@#1{\kern1sp\vphantom{#1}}%
+%    \begin{align}
+%      align &= align & align &= align \\  &= align
+%    \end{align}}\vspace{-2\baselineskip}}
+%  \endgroup
+%  \makeatletter
+%  \par\medskip\noindent
+%  It is pretty obvious that the space between the two alignment
+%  columns are wrong. Like when we handled the tag separation, one
+%  solution could be to explicitly set \cs{columnwidth} to be the
+%  effective line width. Alternatively we could redefine
+%  \cs{fullwidthdisplay} to do nothing. The latter is probably the
+%  less severe.
+%    \begin{macrocode}
+\g at addto@macro\EQ_typeset_display_hook:{
+  % \columnwidth\linewidth
+  \def\fullwidthdisplay{}
+}
+%    \end{macrocode}
+%  
+%  
 %  \section{The \opt{overload} option}
 %  \begin{macro}{\EQ_overload_ams_begin:n}
 %  A helper for saving snapshots:

Added: trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mathtools/empheq.ins	2020-03-24 20:50:35 UTC (rev 54516)
@@ -0,0 +1,94 @@
+%%
+%% This is file `empheq.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% empheq.dtx  (with options: `install')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2002-2007 by Morten Hoegholm
+%% Copyright (C) 2012-2019 by Lars Madsen
+%% 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. 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, The LaTeX3 Project
+%% 
+%% This work consists of the main source file empheq.dtx
+%% and the derived files
+%%    empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
+%% 
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: empheq 2017/03/31 v2.15 empheq}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2002-2007 by Morten Hoegholm
+Copyright (C) 2012-2019 by Lars Madsen
+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. 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, The LaTeX3 Project
+
+This work consists of the main source file empheq.dtx
+and the derived files
+   empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
+
+\endpreamble
+
+\generate{%
+  \file{empheq.ins}{\from{empheq.dtx}{install}}%
+  \file{empheq.drv}{\from{empheq.dtx}{driver}}%
+  \usedir{tex/latex/mh}%
+  \file{empheq.sty}{\from{empheq.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{*     empheq.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `empheq.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+\endinput
+%%
+%% End of file `empheq.ins'.

Modified: trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2020-03-24 20:50:35 UTC (rev 54516)
@@ -1,7 +1,8 @@
 % \iffalse meta-comment
 %
 % Copyright (C) 2004-2011 by Morten Hoegholm
-% Copyright (C) 2012-     by Lars Madsen
+% Copyright (C) 2012-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
@@ -68,7 +69,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: mathtools 2020/01/17 v1.23}
+\Msg{* Package: mathtools 2020/03/24 v1.24}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -79,7 +80,8 @@
 This is a generated file.
 
 Copyright (C) 2002-2011 by Morten Hoegholm
-Copyright (C) 2012-     by Lars Madsen
+Copyright (C) 2012-2019 by Lars Madsen
+Copyright (C) 2020      by Lars Madsen, the LaTeX3 project
 
 
 This work may be distributed and/or modified under the
@@ -93,7 +95,7 @@
 This work has the LPPL maintenance status "maintained".
 
 This Current Maintainer of this work is  
-Lars Madsen
+Lars Madsen and the LaTeX3 project
 
 This work consists of the main source file mathtools.dtx
 and the derived files
@@ -131,7 +133,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{mathtools.drv}%
-  [2020/01/17 v1.23 mathematical typesetting tools]
+  [2020/03/24 v1.24 mathematical typesetting tools]
 \documentclass{ltxdoc}
 \IfFileExists{fourier.sty}{\usepackage{fourier}}{}
 \addtolength\marginparwidth{-25pt}
@@ -319,12 +321,12 @@
 %
 %  \GetFileInfo{mathtools.drv}
 %
-%  \CheckSum{3144}
+%  \CheckSum{3333}
 %
 %  \title{The \pkg{mathtools} package\thanks{This file has version number
 %  \fileversion, last revised \filedate.}}
 %
-%  \author{Morten H\o gholm, Lars Madsen}
+%  \author{Morten Høgholm, Lars Madsen and the \LaTeX3 project}
 %  \date{\filedate}
 %
 %  \maketitle
@@ -354,7 +356,6 @@
 %  lists over the years, although more often than not without being
 %  released as stand-alone packages.
 %
-%
 %  The \pkg{mathtools} package is exactly what its name implies: tools
 %  for mathematical typesetting. It is a collection of many of these
 %  often needed small tweaks---with some big tweaks added as well. It
@@ -361,13 +362,15 @@
 %  can only do so by having harvesting newsgroups for code and/or you
 %  writing the maintainers with wishes for code to be included, so if
 %  you have any good macros or just macros that help you when writing
-%  mathematics, then don't hesitate to report them. It is
-%  easiest to just contact Lars Madsen at
-%  \begin{quote}\email{daleif at math.au.dk}\end{quote}
-%  This is of course also the address to use in case of bug reports.
-%  Please put `\texttt{mathtools}' in the subject line.
-%  
+%  mathematics, then don't hesitate to report them.
 %
+%  As of 2020, \pkg{mathtools} (and \pkg{empheq}) is now hosted at the
+%  \LaTeX3 team GitHub at
+%  \begin{center}
+%    \url{https://github.com/latex3/mathtools}
+%  \end{center}
+%  So if you have any issue, feel free to register an issue there.
+%
 % \medskip\noindent
 % Update 2013: We now make \cs{(}\cs{)} and \cs[\cs]
 % robust (can be disabled via \texttt{nonrobust} package option).
@@ -1117,6 +1120,12 @@
 %    A &\xrightleftharpoons[below]{above} B &
 %    A &\xleftrightharpoons[below]{above} B \\
 %  \end{align*}
+%  Change in 2020: In \cs{xLeftarrow}, \cs{xRightarrow} and
+%  \cs{xLeftrightarrow} we added a space to the argument(s), making
+%  the arrow slightly longer and moving the argument away from the
+%  large arrow head.
+% 
+% 
 %
 %
 %
@@ -1748,17 +1757,23 @@
 % doing this as a normal line in an alignment leaves us with excessive
 % space which \verb?\shortvdotswithin{=}? takes care with for us.
 %
-% \verb?\shortvdotswithin{=}? corresponds to
+% The macro call \verb?\shortvdotswithin{=}? corresponds to
 % \begin{verbatim}
 % \MTFlushSpaceAbove
-% & \vdotswithin{=} \\
+% & \vdotswithin{=} 
 % \MTFlushSpaceBelow
 % \end{verbatim}
-% whereas \verb?\shortvdotswithin*{=}? is the case with 
-% \verb?\vdotswithin{=} & \\?. This also means one cannot write more
-% on the line when using \verb?\shortvdotswithin? or the starred
-% version. But one can de-construct the macro and arrive at
+% whereas \verb?\shortvdotswithin*{=}? is the case with
 % \begin{verbatim}
+% \MTFlushSpaceAbove
+% \vdotswithin{=} &
+% \MTFlushSpaceBelow
+% \end{verbatim}
+% Note how \verb?\MTFlushSpaceBelow?  implicitly adds a \verb?\\? at
+% the end of the line. Thus one cannot have more on the line when
+% using \verb?\shortvdotswithin? or the starred version. But, if
+% needed, one can de-construct the macro and arrive at
+% \begin{verbatim}
 % \begin{alignat*}{3}
 %   A&+ B &&= C &&+ D \\
 %   \MTFlushSpaceAbove
@@ -2635,8 +2650,8 @@
 %  \subsection{Split fractions}
 %
 %  \begin{codesyntax}
-%    \SpecialUsageIndex{\splitfrac}\cs{splitfrac}\marg{numer}\marg{denom}\texttt{~~}
-%    \SpecialUsageIndex{\splitdfrac}\cs{splitdfrac}\marg{numer}\marg{denom}
+%    \SpecialUsageIndex{\splitfrac}\cs{splitfrac}\marg{start line}\marg{continuation}\\
+%    \SpecialUsageIndex{\splitdfrac}\cs{splitdfrac}\marg{start line}\marg{continuation}
 %  \end{codesyntax}
 %  \cttPosting{Michael J.~Downes}{2001/12/06}
 %  These commands provide split fractions e.g., multiline fractions:
@@ -2666,14 +2681,144 @@
 %    }
 %    {z}
 %  \]
+% The difference between \cs{splitfrac} and \cs{splitdfrac} is that
+% the former forces its arguments to be typeset in text-mode math, the
+% latter does not.
 %
+% \medskip\noindent \textbf{Note:} If you try to nest \cs{splitfrac}
+% inside each other you may need to add \cs{mathstrut} to the first
+% argument of the nested fraction to get the spacing look even. It is
+% not added by default as often a more cramped looked is desired:
+% \begin{verbatim}
+%  \[
+%  \frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  =\frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{\mathstrut xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  \]
+% \end{verbatim}
+%  \[
+%  \frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  =\frac{
+%      \splitfrac{xy + xy + xy + xy + xy}
+%      {
+%      \splitfrac{\mathstrut  xy + xy + xy + xy + xy}
+%                {+ xy + xy + xy + xy}
+%      }
+%    }
+%    {z}
+%  \]
+% Note how the line spaces aren't even on the left hand side.
 %
+% For even more control, one can use \env{aligned} or \env{gathered}
+% instead of \cs{splitfrac}.
 %
 %
+%  \newpage
 %
+% \section{New additions}
 %
+% \subsection{Variable math strut}
+%  \begin{codesyntax}
+%    \SpecialUsageIndex{\xmathstrut}\cs{xmathstrut}\oarg{depth increase}\marg{increase}
+%  \end{codesyntax}
+%  \FeatureRequest{Frank Mittelbach}{2020} In typography we use
+%  \emph{struts} to ensure specific line spacing. In text we have the
+%  \cs{strut} and in math \cs{mathstrut}. Both have no width, but
+%  equals the height and depth of an »(« from the current text/math
+%  font and size.  In math we often need to make minute adjustments in
+%  macro definitiones etc. The \emph{extended} math strut
+%  \cs{xmathstrut} allows to \emph{increase} (decrease if negative)
+%  the math strut in two ways.
 %
+%  For an \meta{increase} (a decimal number), say~\verb|0.1|,
+%  \begin{center}
+%      \verb|\xmathstrut{0.1}| 
+%  \end{center}
+%  will give you a new strut where 10\% of the \emph{total height of
+%  the normal math stut} (\verb|\mathstrut=\mathstrut{0}|) will be
+%  added to both \emph{the height} and \emph{the depth} of the
+%  original strut (thus 20\% gets added in total). On the other hand
+%  \begin{center}
+%      \verb|\xmathstrut[0.2]{0.1}| 
+%  \end{center}
+%  will result in a strut where 20\% is added to the depth and 10\% is
+%  added to the height, resulting in a strut that is 30\% larger than
+%  normal. 
 %
+%  The following example is inspired (with permission) from an example
+%  showcasing \cs{xmathstrut} in the upcoming third edition of
+%  \emph{The LaTeX Companion}. The example is very relevant as the
+%  entries of the \env{cases(*)} environment are typeset in \emph{text
+%  style} math and thus may end up looking quite
+%  squished.\footnote{Which is why Frank suggested the macro
+%  (including its implementation) in the first place.}
+%  \[
+%    \begin{cases*}
+%      \frac{\frac{ x-1 }{ x-\sin x} }{ \sqrt{ 1 -x }} & $x >0$ \\
+%      0 & otherwise
+%    \end{cases*}
+%  \qquad\text{vs.}\qquad
+%    \begin{cases*}
+%      \frac{\frac{ \xmathstrut{0.1} x-1 }{ \xmathstrut{0.25} x-\sin x} }{\xmathstrut{0.4} \sqrt{ 1 -x }} & $x >0$ \\
+%      0 & otherwise
+%    \end{cases*}
+%  \]
+% \begin{verbatim}
+%  \[ \begin{cases*}
+%      \frac{\frac{ x-1 }{ x-\sin x} }{ \sqrt{ 1 -x }} & $x >0$ \\
+%      0 & otherwise
+%    \end{cases*}
+%  \qquad\text{vs.}\qquad
+%    \begin{cases*}
+%      \frac{ \frac{ \xmathstrut{0.1} x-1 }
+%                  { \xmathstrut{0.25} x-\sin x} }
+%           {\xmathstrut{0.4} \sqrt{ 1 -x } } & $x >0$ \\
+%      0 & otherwise
+%    \end{cases*} \]
+% \end{verbatim}
+% 
+% To showcase the optional argument, it is
+% probably easiest to make the strut visible. Here you'll see that
+% \verb|\mathstrut| and \verb|\xmathstrut{0}| is the same:
+%  \newcommand\vfb[1]{\begingroup\fboxsep=0pt\boxed{\,#1\,}\endgroup}
+% \[
+%   \llap{\rlap{\rule{18mm}{0.1pt}}\quad}a \vfb{\mathstrut} \ \vfb{\xmathstrut{0}}\
+%   \vfb{\xmathstrut{0.5} } \  \vfb{\xmathstrut{-0.1} }\  \vfb{\xmathstrut[0.5]{0}} a
+% \]
+% \begin{verbatim}
+% \newcommand\vfb[1]{\begingroup\fboxsep=0pt\boxed{\,#1\,}\endgroup}
+% \[
+%  a \vfb{\mathstrut}         \   % normal strut
+%  \vfb{\xmathstrut{0}}       \   % just 0 => normal strut
+%  \vfb{\xmathstrut{0.5} }    \   % twice as large 50% + 50%
+%  \vfb{\xmathstrut{-0.1} }   \   % negative gives something smaller
+%  \vfb{\xmathstrut[0.5]{0}} a    % change only the depth
+% \]
+% \end{verbatim}
+% -- the last box showcases a strut where we have only changed the
+% depth of the strut. One can see \verb|\xmathstrut[B]{0}| kind of the
+% opposite of \verb|\smash[b]{...}|, the former makes the depth larger
+% and the latter ignores the depth.
 %
 %
 %
@@ -2700,6 +2845,7 @@
 %
 %
 %
+% 
 %
 %
 %
@@ -2751,6 +2897,33 @@
 %
 %
 %
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
+%
 % \begin{thebibliography}{9}
 %  \bibitem{Perlis01}
 %    Alexander R. Perlis,
@@ -2789,10 +2962,12 @@
 %     Ellen Swanson,
 %     \emph{Mathematics into type}.
 %     American Mathematical Society, updated edition, 1999.
-%     Updated by Arlene O'Sean and Antoinette Schleyer.
+%     Updated by Arlene O'Sean and Antoinette Schleyer. Available from
+%     the AMS at \url{http://www.ams.org/arc/styleguide/mit-2.pdf}
+%
 %   \bibitem{TBT}
 %   Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's Reference}, 2007. 
-%   Freely available at \url{http://ctan.org/tex-archive/info/texbytopic}.
+%   Freely available at \url{https://ctan.org/pkg/texbytopic}.
 %  \end{thebibliography}
 %
 %
@@ -2806,7 +2981,7 @@
 %    \begin{macrocode}
 %<*package>
 \ProvidesPackage{mathtools}%
-  [2020/01/17 v1.23 mathematical typesetting tools]
+  [2020/03/24 v1.24 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}}
@@ -3361,6 +3536,9 @@
 %  \begin{macro}{\xLeftrightarrow}
 %
 %  These are straight adaptions from \pkg{amsmath}.
+% \changes{v1.24}{2020/03/13}{Added spaces to move the argument away
+% from the arrow head in \cs{xLeftarrow}, \cs{xRightarrow} and
+% \cs{xLeftrightarrow}. Suggested by FM}
 %    \begin{macrocode}
 \providecommand*\xleftrightarrow[2][]{%
   \ext at arrow 3095\MT_leftrightarrow_fill:{#1}{#2}}
@@ -3367,11 +3545,11 @@
 \def\MT_leftrightarrow_fill:{%
   \arrowfill@\leftarrow\relbar\rightarrow}
 \providecommand*\xLeftarrow[2][]{%
-  \ext at arrow 0055{\Leftarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Leftarrowfill@}{\ #1}{\ #2}}
 \providecommand*\xRightarrow[2][]{%
-  \ext at arrow 0055{\Rightarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Rightarrowfill@}{#1\ }{#2\ }}
 \providecommand*\xLeftrightarrow[2][]{%
-  \ext at arrow 0055{\Leftrightarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Leftrightarrowfill@}{\ #1\ }{\ #2\ }}
 %    \end{macrocode}
 %  \end{macro}
 %  \end{macro}
@@ -6138,7 +6316,7 @@
     {\textstyle#1\quad\hfill}%
     {\textstyle\hfill\quad\mathstrut#2}%
 }
-\newcommand*\splitdfrac[2]{%
+\newcommand*\splitdfrac[2]{% 
   \genfrac{}{}{0pt}{0}{#1\quad\hfill}{\hfill\quad\mathstrut #2}%
 }
 %    \end{macrocode}
@@ -6266,6 +6444,66 @@
 %    \end{macrocode}
 %  \end{macro}
 %
+%  \section{Additional features 2020–}
+%
+%  The selection below is meant for additions addeed 2020 onwards that
+%  are not integrated into existing macros.
+%
+%  \subsection{\cs{xmathstrut}}
+% 
+% \begin{macro}{\xmathstrut at box}
+% \begin{macro}{\xmathstrut at dim}
+% \begin{macro}{\xmathstrut}
+% \begin{macro}{\xmathstrut@}
+% \begin{macro}{\xmathstrut at do}
+% Suggested and implemented by Frank Mittelbach. The basic idea is to
+% add (or subtract) a fraction of the total height of the normal math
+% strut to both the height and depth of the new strut. The input from
+% the user is suppose to be a decimal number. The value zero results
+% in no change compared to the normal math strut. 
+%  \changes{v1.24}{2020/03/06}{Added \cs{xmathstrut}}
+%    \begin{macrocode}
+\newbox\xmathstrut at box
+\newdimen\xmathstrut at dim
+\def\xmathstrut{\@dblarg\xmathstrut@}
+\def\xmathstrut@[#1]#2{%
+  \def\xmathstrut at dp{#1}% 
+  \vphantom{\mathpalette\xmathstrut at do{#2}}%
+}
+%    \end{macrocode}
+% The algorithm is simple. Start by recording the size (a box) of \verb|$($|
+% in the current style (via \verb|\mathpalette|)
+%    \begin{macrocode}
+\def\xmathstrut at do#1#2{%
+  \setbox\xmathstrut at box\hbox{$#1($}%)%emacs
+   \xmathstrut at dim\dimexpr\ht\xmathstrut at box+\dp\xmathstrut at box\relax
+%    \end{macrocode}
+% Then manipulate the size of the box by adding the user input times
+% the total height of the original box to the height and depth
+% respectfully. 
+%    \begin{macrocode}
+   \ht\xmathstrut at box\dimexpr\ht\xmathstrut at box
+           +#2\xmathstrut at dim
+           \relax
+   \dp\xmathstrut at box\dimexpr\dp\xmathstrut at box
+         +\xmathstrut at dp\xmathstrut at dim
+         \relax
+%    \end{macrocode}
+% In the end ship the modified box (it is typeset inside a \verb|\vphantom|).
+%    \begin{macrocode}
+   \box\xmathstrut at box}
+
+%    \end{macrocode}
+% Do note that this means that for \verb|\xmathstrut{0.1}| 10\% is
+% added twice. But it make explaining \verb|\xmathstrut[0.2]{0.1}| a
+% lot easier as it is just 10\% added to the height and 20\% added to
+% the depth.
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 %  This is the end of the \pkg{mathtools} package.
 %    \begin{macrocode}
 %</package>

Added: trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mathtools.ins	2020-03-24 20:50:35 UTC (rev 54516)
@@ -0,0 +1,94 @@
+%%
+%% This is file `mathtools.ins',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% mathtools.dtx  (with options: `install')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2002-2011 by Morten Hoegholm
+%% Copyright (C) 2012-2019 by Lars Madsen
+%% Copyright (C) 2012-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. 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 and the LaTeX3 project
+%% 
+%% This work consists of the main source file mathtools.dtx
+%% and the derived files
+%%    mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
+%% 
+\input docstrip.tex
+\Msg{************************************************************************}
+\Msg{* Installation}
+\Msg{* Package: mathtools 2020/01/17 v1.23}
+\Msg{************************************************************************}
+
+\keepsilent
+\askforoverwritefalse
+
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2002-2011 by Morten Hoegholm
+Copyright (C) 2012-2019 by Lars Madsen
+Copyright (C) 2012-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. 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 and the LaTeX3 project
+
+This work consists of the main source file mathtools.dtx
+and the derived files
+   mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
+
+\endpreamble
+
+\generate{%
+  \file{mathtools.ins}{\from{mathtools.dtx}{install}}%
+  \file{mathtools.drv}{\from{mathtools.dtx}{driver}}%
+  \usedir{tex/latex/mh}%
+  \file{mathtools.sty}{\from{mathtools.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{*     mathtools.sty}
+\Msg{*}
+\Msg{* To produce the documentation run the file `mathtools.drv'}
+\Msg{* through LaTeX.}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+\endinput
+%%
+%% End of file `mathtools.ins'.

Modified: trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx	2020-03-24 20:50:35 UTC (rev 54516)
@@ -1,7 +1,8 @@
 % \iffalse meta-comment
 %
 % Copyright (C) 2002-2007,2010 by Morten Hoegholm
-% Copyright (C) 2017           by Lars Madsen
+% 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
@@ -13,7 +14,9 @@
 %
 % This work has the LPPL maintenance status "maintained".
 %
-% This Current Maintainer of this work is Lars Madsen <daleif at math.au.dk>
+% 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
@@ -78,7 +81,8 @@
 This is a generated file.
 
 Copyright (C) 2002-2007,2010 by Morten Hoegholm
-Copyright (C) 2017           by Lars Madsen
+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
@@ -90,7 +94,8 @@
 
 This work has the LPPL maintenance status "maintained".
 
-This Current Maintainer of this work is Lars Madsen <daleif at math.au.dk>
+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
@@ -163,7 +168,7 @@
 %
 %  \title{The \pkg{mhsetup} package\thanks{This package has version
 %  number \fileversion, last revised on \filedate.}}
-%  \author{Morten H\o gholm (maintained by Lars Madsen)}
+%  \author{Morten H\o gholm (maintained by Lars Madsen and The LaTeX3 team)}
 %  \date{\filedate}
 %  \maketitle
 %

Modified: trunk/Master/texmf-dist/tex/latex/mathtools/empheq.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathtools/empheq.sty	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/tex/latex/mathtools/empheq.sty	2020-03-24 20:50:35 UTC (rev 54516)
@@ -9,7 +9,8 @@
 %% This is a generated file.
 %% 
 %% Copyright (C) 2002-2007 by Morten Hoegholm
-%% Copyright (C) 2012-     by Lars Madsen
+%% Copyright (C) 2012-2019 by Lars Madsen
+%% Copyright (C) 2020-     by Lars Madsen, The LaTeX3 Project
 %% 
 %% 
 %% This work may be distributed and/or modified under the
@@ -23,7 +24,7 @@
 %% This work has the LPPL maintenance status "maintained".
 %% 
 %% This Current Maintainer of this work is
-%% Lars Madsen
+%% Lars Madsen, The LaTeX3 Project
 %% 
 %% This work consists of the main source file empheq.dtx
 %% and the derived files
@@ -75,6 +76,7 @@
 \newdimen\l_EQ_displaywidth_dim
 \def\EmphEqdisplaywidth{\l_EQ_displaywidth_dim}
 \newdimen\l_EQ_temp_linewidth_dim
+\newdimen\l_EQ_linewidth_dim
 \newdimen\EmphEqdelimitershortfall
 \newcount\EmphEqdelimiterfactor
 \EmphEqdelimiterfactor950
@@ -117,8 +119,8 @@
     \MH_else:
       \setkeys{\MT_options_name:}{multlined-pos=t}
     \MH_fi:
-      \g at addto@macro\EQ_complete_mathdisplay:{
-        \begin{MTmultlined}\relax}
+    \g at addto@macro\EQ_complete_mathdisplay:{
+      \begin{MTmultlined}\relax}
   }
   \g at addto@macro\EQ_complete_mathdisplay:\EQ_mathbody:
   \MH_if_boolean:nT {outer_mult}{
@@ -190,6 +192,19 @@
   \MH_let:NwN\SetTagPlusEndMark\EQ_tag_plus_endmark:
   \MH_let:NwN\SetOnlyEndMark\EQ_only_endmark:
   \l_EQ_temp_linewidth_dim\linewidth
+  \l_EQ_linewidth_dim\linewidth
+  \@tempdima\z@
+  \begingroup
+  \ifdefined\fullwidthdisplay\relax
+    \fullwidthdisplay
+    \global\@tempdima\displaywidth
+  \fi
+  \endgroup
+  \ifdim\@tempdima>\linewidth\relax
+    \l_EQ_temp_linewidth_dim\@tempdima
+    \l_EQ_linewidth_dim\@tempdima
+  \fi
+  \@tempdima\z@
   \g_EQ_toprow_height_dim\z@
   \g_EQ_bottomrow_depth_dim\z@
   \g_EQ_toptag_height_dim\z@
@@ -420,7 +435,9 @@
   \MH_if_num:w \maxfields@=\tw@
   \MH_else:
     \setlength{\l_EQ_temp_linewidth_dim}{%
-      \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
+      % \linewidth
+      \l_EQ_linewidth_dim
+      -\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
   \MH_fi:}
 \def\EQ_modify_linewidth_ii:{\EQ_modify_linewidth_i:}
 \def\EQ_find_displaywidth_i:{%
@@ -492,191 +509,209 @@
 \MH_let:NwN \MTmultlined \multlined
 \MH_let:NwN \endMTmultlined \endmultlined
 \MH_if_boolean:nTF {good_mult}{
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
-  {\MH_set_boolean_T:n {outer_mult}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
-  {\MH_set_boolean_T:n {outer_mult}}
-\def\EQ_modify_linewidth_iii_mult:{
-  \setlength{\l_EQ_temp_linewidth_dim}{%
-    \linewidth-\widthof{\EQ_outerbox:{}}}%
-  \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-    \EQ_multline_modify_linewidth_tag:
-  \MH_else:
-    \EQ_multline_modify_linewidth_notag:
-  \MH_fi:
-  \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
-}
-\def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
-\def\EQ_find_displaywidth_iii_mult:{%
-  \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
-  \MH_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2:
-  \MH_or: % #3:
-    \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
-  \MH_or: % #4:
-    \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
-  \MH_fi:}
-\def\EQ_find_displaywidth_iv_mult:{\EQ_find_displaywidth_iii_mult:}
-\def\EQ_place_display_iii_mult:{
-  \MH_if_case:w \l_EQ_alignmentmode_int
-  \MH_or: % #1:
+  \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
+    {\MH_set_boolean_T:n {outer_mult}}
+  \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
+    {\MH_set_boolean_T:n {outer_mult}}
+  \def\EQ_modify_linewidth_iii_mult:{
+    \setlength{\l_EQ_temp_linewidth_dim}{%
+      % \linewidth
+      \l_EQ_linewidth_dim
+      -\widthof{\EQ_outerbox:{}}}%
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-      \abovedisplayshortskip=\abovedisplayskip
-      \rlap{
-        \kern-.5\linewidth
-        \kern\multlinegap
-        \EQ_use_mathdisplay:
-      }
+      \EQ_multline_modify_linewidth_tag:
     \MH_else:
-      \EQ_use_mathdisplay:
+      \EQ_multline_modify_linewidth_notag:
     \MH_fi:
-  \MH_or: % #2:
-    \MH_if_dim:w \g_EQ_widesttag_dim>\z@
-      \llap{
-        \EQ_use_mathdisplay:
-        \kern-.5\linewidth
-        \kern\multlinegap
-      }%
-    \MH_else:
-      \EQ_use_mathdisplay:
+    \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
+    \MH_if_case:w \l_EQ_alignmentmode_int
+    \MH_or: \MH_or: % 1 and 2
+    \MH_or:
+      \MH_addtolength:dn
+        \l_EQ_temp_linewidth_dim{\@mathmargin}%
+    \MH_or:
+        \MH_addtolength:dn
+          \l_EQ_temp_linewidth_dim{\@mathmargin}%
     \MH_fi:
-  \MH_or: % #3:
-    \EQ_use_mathdisplay:
-  \MH_or: % #4:
-    \EQ_use_mathdisplay:
-  \MH_fi:
-}
-\def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
-}{
-\def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
-  \hskip1sp#2#3{{}#5}#4%
-  \MH_if:w *#1\relax\MH_else:\notag\MH_fi:}
-\def\multleft{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_left:n}
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
   }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_left:n}%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
-  }
-  \EQ_next:}}%
-\def\multcenter{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_center:n}%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
-  }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_center:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
-  }
-  \EQ_next:}}%
-\def\multright{\@ifstar{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
-  }
-  \EQ_next:}{%
-  \MH_if_boolean:nTF {multlined}{
-    \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \def\EQ_next:{
-      \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
-  }
-  \EQ_next:}}
-\def\multfirst{%
-  \MH_if_boolean:nTF {multlined}{
-     \def\EQ_next:{\EQ_multlined_left:n }%
-  }{
+  \def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
+  \def\EQ_find_displaywidth_iii_mult:{%
+    \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
+    \MH_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2:
+    \MH_or: % #3:
+      \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
+    \MH_or: % #4:
+      \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
+    \MH_fi:}
+  \def\EQ_find_displaywidth_iv_mult:{\EQ_find_displaywidth_iii_mult:}
+  \def\EQ_place_display_iii_mult:{
     \MH_if_case:w \l_EQ_alignmentmode_int
     \MH_or: % #1:
-      \def\EQ_next:{\multleft}%
+      \MH_if_dim:w \g_EQ_widesttag_dim>\z@
+        \abovedisplayshortskip=\abovedisplayskip
+        \rlap{
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \kern\multlinegap
+          \EQ_use_mathdisplay:
+        }
+      \MH_else:
+        \EQ_use_mathdisplay:
+      \MH_fi:
     \MH_or: % #2:
-      \def\EQ_next:{\multleft*}%
+      \MH_if_dim:w \g_EQ_widesttag_dim>\z@
+        \llap{
+          \EQ_use_mathdisplay:
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \kern\multlinegap
+        }%
+      \MH_else:
+        \EQ_use_mathdisplay:
+      \MH_fi:
     \MH_or: % #3:
-      \def\EQ_next:{\multleft}%
+      \EQ_use_mathdisplay:
     \MH_or: % #4:
-      \def\EQ_next:{\multleft*}%
+      \EQ_use_mathdisplay:
     \MH_fi:
   }
-  \EQ_next:}
-\def\multmiddle{%
-  \def\EQ_next:{%
+  \def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
+}{% on to the 'bad' version
+  \def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
+    \hskip1sp#2#3{{}#5}#4%
+    \MH_if:w *#1\relax\MH_else:\notag\MH_fi:}
+  \def\multleft{\@ifstar{%
     \MH_if_boolean:nTF {multlined}{
-      \expandafter\EQ_multlined_center:n
+      \def\EQ_next:{\EQ_multlined_left:n}
     }{
-      \expandafter\multcenter
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
     }
-  }%
-  \@ifstar{\EQ_next:}{\EQ_next:}}
-\def\multlast{%
-  \MH_if_boolean:nTF {multlined}{
-     \def\EQ_next:{\EQ_multlined_right:n }%
-  }{
-    \MH_if_case:w \l_EQ_alignmentmode_int
-    \MH_or: % #1:
-      \def\EQ_next:{\multright*}%
-    \MH_or: % #2:
-      \def\EQ_next:{\multright}%
-    \MH_or: % #3:
-      \def\EQ_next:{\multright*}%
-    \MH_or: % #4:
-      \def\EQ_next:{\multright}%
-    \MH_fi:
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_left:n}%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
+    }
+    \EQ_next:}}%
+  \def\multcenter{\@ifstar{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_center:n}%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
+    }
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_center:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
+    }
+    \EQ_next:}}%
+  \def\multright{\@ifstar{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
+    }
+    \EQ_next:}{%
+    \MH_if_boolean:nTF {multlined}{
+      \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \def\EQ_next:{
+        \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
+    }
+    \EQ_next:}}
+  \def\multfirst{%
+    \MH_if_boolean:nTF {multlined}{
+       \def\EQ_next:{\EQ_multlined_left:n }%
+    }{
+      \MH_if_case:w \l_EQ_alignmentmode_int
+      \MH_or: % #1:
+        \def\EQ_next:{\multleft}%
+      \MH_or: % #2:
+        \def\EQ_next:{\multleft*}%
+      \MH_or: % #3:
+        \def\EQ_next:{\multleft}%
+      \MH_or: % #4:
+        \def\EQ_next:{\multleft*}%
+      \MH_fi:
+    }
+    \EQ_next:}
+  \def\multmiddle{%
+    \def\EQ_next:{%
+      \MH_if_boolean:nTF {multlined}{
+        \expandafter\EQ_multlined_center:n
+      }{
+        \expandafter\multcenter
+      }
+    }%
+    \@ifstar{\EQ_next:}{\EQ_next:}}
+  \def\multlast{%
+    \MH_if_boolean:nTF {multlined}{
+       \def\EQ_next:{\EQ_multlined_right:n }%
+    }{
+      \MH_if_case:w \l_EQ_alignmentmode_int
+      \MH_or: % #1:
+        \def\EQ_next:{\multright*}%
+      \MH_or: % #2:
+        \def\EQ_next:{\multright}%
+      \MH_or: % #3:
+        \def\EQ_next:{\multright*}%
+      \MH_or: % #4:
+        \def\EQ_next:{\multright}%
+      \MH_fi:
+    }
+    \EQ_next:}
+  \MH_new_boolean:n {multlined}
+  \newdimen\multlinedwidth
+  \MH_setlength:dn \multlinedwidth{
+    % .7\linewidth
+    0.7\l_EQ_linewidth_dim
   }
-  \EQ_next:}
-\MH_new_boolean:n {multlined}
-\newdimen\multlinedwidth
-\MH_setlength:dn \multlinedwidth{.7\linewidth}
-\renewenvironment{multlined}%
-  {\MH_nospace_ifnextchar:Nnn [  {\EQ_multlined_I:w}
-                                 {\EQ_multlined_I:w[c]}
-  }
-  { \endaligned }
-\def\EQ_multlined_I:w[#1]{%
-  \MH_nospace_ifnextchar:Nnn[  {\EQ_multlined_II:w[#1]}
-                               {\EQ_multlined_II:w[#1][\multlinedwidth]}}
-\def\EQ_multlined_II:w[#1][#2]{%
-  \MH_set_boolean_T:n {multlined}
-  \MH_let:NwN \Let@\MT_saved_Let:
-  \MH_if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
-  \MH_else:
-    \MH_if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
+  \renewenvironment{multlined}%
+    {\MH_nospace_ifnextchar:Nnn [  {\EQ_multlined_I:w}
+                                   {\EQ_multlined_I:w[c]}
+    }
+    { \endaligned }
+  \def\EQ_multlined_I:w[#1]{%
+    \MH_nospace_ifnextchar:Nnn[  {\EQ_multlined_II:w[#1]}
+                                 {\EQ_multlined_II:w[#1][\multlinedwidth]}}
+  \def\EQ_multlined_II:w[#1][#2]{%
+    \MH_set_boolean_T:n {multlined}
+    \MH_let:NwN \Let@\MT_saved_Let:
+    \MH_if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
     \MH_else:
-      \MH_if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
+      \MH_if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
       \MH_else:
-        \EQ_multlined_III:nn {#2}{#1}%
+        \MH_if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
+        \MH_else:
+          \EQ_multlined_III:nn {#2}{#1}%
+        \MH_fi:
       \MH_fi:
     \MH_fi:
-  \MH_fi:
-  \mkern-\thinmuskip
-  \EQ_next:}
-\def\EQ_multlined_III:nn #1#2{%
-  \def\EQ_next:{\setlength\multlinedwidth{#2}%
-                          \start at aligned{#1}{\thr@@}}}
-\def\EQ_multlined_left:n #1{%
-  \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_center:n #1{%
-  &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_right:n #1{%
-  &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
+    \mkern-\thinmuskip
+    \EQ_next:}
+  \def\EQ_multlined_III:nn #1#2{%
+    \def\EQ_next:{\setlength\multlinedwidth{#2}%
+                            \start at aligned{#1}{\thr@@}}}
+  \def\EQ_multlined_left:n #1{%
+    \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
+  \def\EQ_multlined_center:n #1{%
+    &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
+  \def\EQ_multlined_right:n #1{%
+    &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
 }
 \EQ_new_equationtype:nnn {EmphEqEnv}{flalign}{5}
 \EQ_new_equationtype:nnn {EmphEqEnv}{flalign*}{6}
 \def\EQ_modify_linewidth_v:{%
   \setlength{\l_EQ_temp_linewidth_dim}{%
-    \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
+    % \linewidth
+    \l_EQ_linewidth_dim
+    -\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
   \MH_if_dim:w \g_EQ_widesttag_dim>\z@
     \MH_if_boolean:nTF {multline}{
       \EQ_multline_modify_linewidth_tag:
@@ -711,11 +746,15 @@
   \MH_or: % #1:
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
       \MH_if_boolean:nTF {multline}{
-        \rlap{\kern\multlinegap  \kern-.5\linewidth
+        \rlap{\kern\multlinegap
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
           \EQ_use_mathdisplay:
           \kern-\mintagsep  \kern\multlinetaggap}%
       }{
-        \rlap{\kern-.5\linewidth\EQ_use_mathdisplay:}%
+        \rlap{%\kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+          \EQ_use_mathdisplay:}%
       }
     \MH_else:
       \EQ_use_mathdisplay:
@@ -725,15 +764,22 @@
       \MH_if_boolean:nTF {multline}{
         \llap{\kern-\mintagsep \kern\multlinetaggap
           \EQ_use_mathdisplay:
-          \kern\multlinegap  \kern-.5\linewidth}%
+          \kern\multlinegap
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+        }%
       }{
-        \llap{\EQ_use_mathdisplay:\kern-.5\linewidth}%
+        \llap{\EQ_use_mathdisplay:
+          % \kern-.5\linewidth
+          \kern-.5\l_EQ_linewidth_dim
+        }%
       }
     \MH_else:
       \EQ_use_mathdisplay:
     \MH_fi:
   \MH_or: % #3:
-    \MH_if_boolean:nF {multline}{ \kern-\multlinetaggap }
+    \MH_if_boolean:nTF {multline}{ \kern-\multlinetaggap }
+                                 { \kern-\@mathmargin    }
     \EQ_use_mathdisplay:
   \MH_or: % #4:
     \MH_if_dim:w \g_EQ_widesttag_dim>\z@
@@ -902,6 +948,10 @@
           \rule[-\dp\z at -\shadowsize]{\shadowsize}{\ht\z at +\dp\z@}}}}%
   }{}%
 }
+\g at addto@macro\EQ_typeset_display_hook:{
+  % \columnwidth\linewidth
+  \def\fullwidthdisplay{}
+}
 \def\EQ_overload_ams_begin:n #1{%
   \MH_let:cc {AmS#1}{#1}%
   \MH_let:cc {AmS#1*}{#1*}

Modified: trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2020-03-24 20:50:35 UTC (rev 54516)
@@ -9,7 +9,8 @@
 %% This is a generated file.
 %% 
 %% Copyright (C) 2002-2011 by Morten Hoegholm
-%% Copyright (C) 2012-     by Lars Madsen
+%% Copyright (C) 2012-2019 by Lars Madsen
+%% Copyright (C) 2020      by Lars Madsen, the LaTeX3 project
 %% 
 %% 
 %% This work may be distributed and/or modified under the
@@ -23,7 +24,7 @@
 %% This work has the LPPL maintenance status "maintained".
 %% 
 %% This Current Maintainer of this work is
-%% Lars Madsen
+%% Lars Madsen and the LaTeX3 project
 %% 
 %% This work consists of the main source file mathtools.dtx
 %% and the derived files
@@ -30,7 +31,7 @@
 %%    mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
 %% 
 \ProvidesPackage{mathtools}%
-  [2020/01/17 v1.23 mathematical typesetting tools]
+  [2020/03/24 v1.24 mathematical typesetting tools]
 \RequirePackage{keyval,calc}
 \RequirePackage{mhsetup}[2017/03/31]
 \MHInternalSyntaxOn
@@ -320,11 +321,11 @@
 \def\MT_leftrightarrow_fill:{%
   \arrowfill@\leftarrow\relbar\rightarrow}
 \providecommand*\xLeftarrow[2][]{%
-  \ext at arrow 0055{\Leftarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Leftarrowfill@}{\ #1}{\ #2}}
 \providecommand*\xRightarrow[2][]{%
-  \ext at arrow 0055{\Rightarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Rightarrowfill@}{#1\ }{#2\ }}
 \providecommand*\xLeftrightarrow[2][]{%
-  \ext at arrow 0055{\Leftrightarrowfill@}{#1}{#2}}
+  \ext at arrow 0055{\Leftrightarrowfill@}{\ #1\ }{\ #2\ }}
 \def\MT_rightharpoondown_fill:{%
   \arrowfill@\relbar\relbar\rightharpoondown}
 \def\MT_rightharpoonup_fill:{%
@@ -1702,6 +1703,24 @@
 \MaybeMHPrecedingSpacesOff
 \renewcommand\aligned at a[1][c]{\start at aligned{#1}\m at ne}
 \MHPrecedingSpacesOn
+\newbox\xmathstrut at box
+\newdimen\xmathstrut at dim
+\def\xmathstrut{\@dblarg\xmathstrut@}
+\def\xmathstrut@[#1]#2{%
+  \def\xmathstrut at dp{#1}%
+  \vphantom{\mathpalette\xmathstrut at do{#2}}%
+}
+\def\xmathstrut at do#1#2{%
+  \setbox\xmathstrut at box\hbox{$#1($}%)%emacs
+   \xmathstrut at dim\dimexpr\ht\xmathstrut at box+\dp\xmathstrut at box\relax
+   \ht\xmathstrut at box\dimexpr\ht\xmathstrut at box
+           +#2\xmathstrut at dim
+           \relax
+   \dp\xmathstrut at box\dimexpr\dp\xmathstrut at box
+         +\xmathstrut at dp\xmathstrut at dim
+         \relax
+   \box\xmathstrut at box}
+
 \endinput
 %%
 %% End of file `mathtools.sty'.

Modified: trunk/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty	2020-03-24 20:50:17 UTC (rev 54515)
+++ trunk/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty	2020-03-24 20:50:35 UTC (rev 54516)
@@ -9,7 +9,8 @@
 %% This is a generated file.
 %% 
 %% Copyright (C) 2002-2007,2010 by Morten Hoegholm
-%% Copyright (C) 2017           by Lars Madsen
+%% 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
@@ -21,7 +22,8 @@
 %% 
 %% This work has the LPPL maintenance status "maintained".
 %% 
-%% This Current Maintainer of this work is Lars Madsen <daleif at math.au.dk>
+%% 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



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