texlive[51788] Master/texmf-dist: mathtools (31jul19)

commits+karl at tug.org commits+karl at tug.org
Wed Jul 31 23:01:44 CEST 2019


Revision: 51788
          http://tug.org/svn/texlive?view=revision&revision=51788
Author:   karl
Date:     2019-07-31 23:01:43 +0200 (Wed, 31 Jul 2019)
Log Message:
-----------
mathtools (31jul19)

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

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/mathtools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2019-07-31 21:01:29 UTC (rev 51787)
+++ trunk/Master/texmf-dist/source/latex/mathtools/mathtools.dtx	2019-07-31 21:01:43 UTC (rev 51788)
@@ -68,7 +68,7 @@
 \input docstrip.tex
 \Msg{************************************************************************}
 \Msg{* Installation}
-\Msg{* Package: mathtools 2018/01/08 v1.21}
+\Msg{* Package: mathtools 2019/07/31 v1.22}
 \Msg{************************************************************************}
 
 \keepsilent
@@ -131,7 +131,7 @@
 %<*driver>
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{mathtools.drv}%
-  [2018/01/08 v1.21 mathematical typesetting tools]
+  [2019/07/31 v1.22 mathematical typesetting tools]
 \documentclass{ltxdoc}
 \IfFileExists{fourier.sty}{\usepackage{fourier}}{}
 \addtolength\marginparwidth{-25pt}
@@ -186,6 +186,17 @@
   }%
 }
 
+\newcommand*\SuggestedBy[2]{%
+  \hskip1sp
+  \marginpar{%
+    \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
+      \strut Suggested by\\#1\\#2%
+    }
+  }%
+}
+
+
+
 \newcommand*\cttPosting[2]{%
   \hskip1sp
   \marginpar{%
@@ -203,6 +214,18 @@
     }%
   }%
 }
+
+\newcommand*\tsxchatPosting[3][Requested on]{%
+  \hskip1sp
+  \marginpar{%
+    \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
+     \strut #1 \texttt{\scriptsize tex.stackexchange.com chat} \\#2\\#3%
+    }%
+  }%
+}
+
+
+
 \newcommand*\CommentAdded[1]{%
   \hskip1sp
   \marginpar{%
@@ -267,8 +290,19 @@
 \let\MTtheindex\theindex
 \def\theindex{\MTtheindex\MakePrivateLetters}
 
+
+%\usepackage[draft]{fixme}
+%\fxsetup{
+% multiuser,
+%layout=marginnote,
+%}
+%\providecommand\fxnote[2][]{}
+
+\usepackage{xurl}
+
 \usepackage[final,
 hyperindex=false,
+colorlinks,
 ]{hyperref}
 \renewcommand*\usage[1]{\textit{\hyperpage{#1}}}
 
@@ -335,7 +369,7 @@
 %  
 %
 % \medskip\noindent
-% Update 2013: We now makes \cs{(}\cs{)} and \cs[\cs]
+% Update 2013: We now make \cs{(}\cs{)} and \cs[\cs]
 % robust (can be disabled via \texttt{nonrobust} package option).
 % 
 %  \section{Package loading}
@@ -608,8 +642,49 @@
 %  one, thus letting \TeX{} make the choice only once rather than
 %  twice.
 %
+%  \begin{codesyntax}
+%    \SpecialEnvIndex{crampedsubarray}\cs{begin}\arg{crampedsubarray}\marg{col}
+%        \meta{contents} \cs{end}\arg{crampedsubarray}\\
+%    \SpecialUsageIndex{\crampedsubstack}
+%    \cs{crampedsubstack}\marg{lines separated by \cs{}\cs{}}
+% \end{codesyntax}
+% \SuggestedBy{Henri Menke}{2019/07/08} If we go back to
+% \eqref{eq:mathclap} and apply \cs{substack}, you'll notice that the
+% cramped style, the sum would normally apply, is now gone:
+% \begin{verbatim}
+%  \[
+%    \sum_{\substack{a^2<b^2<c}}\qquad
+%    \sum_{a^2<b^2<c}
+%  \]
+% \end{verbatim}
+%  \begingroup \fontsize{24}{\baselineskip}\selectfont
+%  \[
+%    \sum_{\substack{a^2<b^2<c}}\qquad
+%    \sum_{a^2<b^2<c}
+%  \]
+%  \endgroup 
+%  We therefore provide a cramped version of
+%  \cs{substack}.\footnote{\cs{substack} is internally implemented via
+%  the \env{subarray}-env, so our cramped version of \cs{substack} is implemented via a
+%  cramped version of this env.}
+% \begin{verbatim}
+%  \[
+%    \sum_{\crampedsubstack{a^2<b^2<c}}\qquad
+%    \sum_{a^2<b^2<c}
+%  \]
+% \end{verbatim}
+%  \begingroup \fontsize{24}{\baselineskip}\selectfont
+%  \[
+%    \sum_{\crampedsubstack{a^2<b^2<c}}\qquad
+%    \sum_{a^2<b^2<c}
+%  \]
+%  \endgroup 
+%  Note: We may need to add a similar hook into multlined. 
 %
 %
+%
+%
+%
 %  \subsubsection{Smashing an operator}
 %
 %
@@ -1238,10 +1313,12 @@
 %
 % As an extra trick the fences will behave as open and closing fences
 % in constract to their auto-scaling nature.\footnote{\cs{left} and
-%   \cs{right} do \emph{not} produce open and closing fences, thus
-%   the space before or after may be too large. Inside this
-%   construction they behave.}
+% \cs{right} creates an \emph{inner} construction, and not as one
+% might expect something where a preceeding \cs{sin} sees an opening
+% fence, thus the space before or after may be too large. Inside this
+% construction they behave.}
 % 
+%
 %  \subsubsection{The \env{multlined} environment}
 %
 %  \begin{codesyntax}
@@ -1347,15 +1424,18 @@
 %  \medskip\noindent
 %  \textbf{Bug 2:}
 %  \CommentAdded{2015/11/12}  
-%  Due to the way \env{multilined} is implemented, certain
+%  Due to the way \env{multlined} is implemented, certain
 %  constructions does not work inside \env{multlined}. We have added a
 %  hook (\cs{MultlinedHook}) that can be added to. The default value
-%  is a fix for \env{subarray} and thus \cs{substack}.
+%  is a fix for \env{subarray} and \env{crampedsubarray} and thus for
+%  \cs{substack} and \cs{crampedsubstack} (and a few others, thus add
+%  to the hook, don't replace it).
 %
 %  This can actually be used to fix Bug~1:
 % \begin{verbatim}
 % \usepackage{mathtools,etoolbox}
-% \newlength\Normalbaselineskip{\baselineskip} 
+% \newlength\Normalbaselineskip
+% \setlength\Normalbaselineskip{\baselineskip} 
 % \appto\MultlinedHook{
 %   \setlength\baselineskip{\Normalbaselineskip}
 % }
@@ -1973,7 +2053,11 @@
 % \end{verbatim}
 % \[ \Set*{ x \in X \given \frac{\sqrt{x}}{x^2+1} > 1 } \]
 % Thus we end up with a syntax much closer to how we read this
-% aloud. Also we hide the `given' symbol for easy replacement.
+% aloud. Also we hide the `given' symbol for easy
+% replacement.\footnote{The \cs{nonscript} construction removes the
+% \cs{:} in sub- and superscript, this might not always be
+% peferable. You can use
+% \cs{mathchoice\{}\cs{:\}\{}\cs{:\}\{}\cs{,\}\{}\cs{,\}} instead of \cs{nonscript}\cs{:}.}
 %
 % Combining with \pkg{etoolbox} it becomes easy to make a function
 % that automatically provide a marker for a blank argument:
@@ -2016,7 +2100,7 @@
 % A probability macro with build in support for conditionals
 % (\cs{given} initialized as above)
 % \begin{verbatim}
-% \DeclarePairedDelimiterXPP\Prop[1]{\mathbb{P}}(){}{
+% \DeclarePairedDelimiterXPP\Prob[1]{\mathbb{P}}(){}{
 %   \renewcommand\given{\nonscript\:\delimsize\vert\nonscript\:\mathopen{}}
 %   #1}
 % \end{verbatim}
@@ -2410,6 +2494,7 @@
 % (Though a package like \pkg{mhchem} might be more suitable for this
 % type of material.)
 %
+%
 %  \subsection{Declaring math sizes}
 %
 %  \begin{codesyntax}
@@ -2698,7 +2783,7 @@
 %     American Mathematical Society, updated edition, 1999.
 %     Updated by Arlene O'Sean and Antoinette Schleyer.
 %   \bibitem{TBT}
-%   Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician’s Reference}, 2007. 
+%   Victor Eijkhout, \emph{\TeX\ by Topic, A Texnician's Reference}, 2007. 
 %   Freely available at \url{http://ctan.org/tex-archive/info/texbytopic}.
 %  \end{thebibliography}
 %
@@ -2713,7 +2798,7 @@
 %    \begin{macrocode}
 %<*package>
 \ProvidesPackage{mathtools}%
-  [2018/01/08 v1.21 mathematical typesetting tools]
+  [2019/07/31 v1.22 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}}
@@ -3858,6 +3943,9 @@
 % \env{multlined}. The default value include a fix to \env{subarray}
 % and thus \cs{substack}. The fix to this environment was suggested by
 % Ulrike Fisher, \url{http://chat.stackexchange.com/transcript/message/25105970#25105970}
+% \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}
 %    \begin{macrocode}
 \newcommand\MultlinedHook{
   \renewenvironment{subarray}[1]{%
@@ -3873,6 +3961,37 @@
   }{%
     \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@{####}$
+    \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\,%
+  }
 }
 
 %    \end{macrocode}
@@ -4597,6 +4716,8 @@
 \MHPrecedingSpacesOn
 %    \end{macrocode}
 %
+%
+%
 %  \subsection{Smashing an operator with limits}
 %
 %  \begin{macro}{\smashoperator}
@@ -5665,6 +5786,40 @@
 %  \end{macro}
 %
 %
+%
+% \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
+% \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}.
+% \begin{environment}{crampedsubarray}
+%    \begin{macrocode}
+\newenvironment{crampedsubarray}[1]{%
+  \vcenter\bgroup
+  \Let@ \restore at math@cr \default at tag
+  \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@{##}$% <-- changed line
+  \hfil\crcr%
+}{%
+\crcr\egroup\egroup
+} 
+%    \end{macrocode}
+% \end{environment}
+% \begin{macro}{\crampedsubstack}
+% And the identical implementation for \cs{crampedsubstack}:
+%    \begin{macrocode}
+\newcommand{\crampedsubstack}[1]{\crampedsubarray{c}#1\endcrampedsubarray}
+%    \end{macrocode}
+% \end{macro}
+%
+%
+%
 %  \section{Macros by Michael J.~Downes}
 %
 %  The macros in this section are all by Michael J.~Downes. Either

Modified: trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2019-07-31 21:01:29 UTC (rev 51787)
+++ trunk/Master/texmf-dist/tex/latex/mathtools/mathtools.sty	2019-07-31 21:01:43 UTC (rev 51788)
@@ -30,7 +30,7 @@
 %%    mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
 %% 
 \ProvidesPackage{mathtools}%
-  [2018/01/08 v1.21 mathematical typesetting tools]
+  [2019/07/31 v1.22 mathematical typesetting tools]
 \RequirePackage{keyval,calc}
 \RequirePackage{mhsetup}[2017/03/31]
 \MHInternalSyntaxOn
@@ -624,6 +624,37 @@
   }{%
     \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@{####}$
+    \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\,%
+  }
 }
 
 \newenvironment{multlined}[1][]
@@ -1447,6 +1478,20 @@
 \def\MT_cramped_rlap_internal:Nn #1#2{
   {}\rlap{\MT_cramped_internal:Nn #1{#2}}
 }
+\newenvironment{crampedsubarray}[1]{%
+  \vcenter\bgroup
+  \Let@ \restore at math@cr \default at tag
+  \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@{##}$% <-- changed line
+  \hfil\crcr%
+}{%
+\crcr\egroup\egroup
+}
+\newcommand{\crampedsubstack}[1]{\crampedsubarray{c}#1\endcrampedsubarray}
 \newcommand{\MT_prescript_inner:}[4]{
   \@mathmeasure\z@#4{\MT_prescript_sup:{#1}}
   \@mathmeasure\tw@#4{\MT_prescript_sub:{#2}}



More information about the tex-live-commits mailing list