From cdf62b4de8cf4d20f7d91a6fe20ecb1697552fc7 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Wed, 31 Jul 2019 21:01:43 +0000 Subject: mathtools (31jul19) git-svn-id: svn://tug.org/texlive/trunk@51788 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/mathtools/mathtools.dtx | 181 +++++++++++++++++++-- 1 file changed, 168 insertions(+), 13 deletions(-) (limited to 'Master/texmf-dist/source/latex') diff --git a/Master/texmf-dist/source/latex/mathtools/mathtools.dtx b/Master/texmf-dist/source/latex/mathtools/mathtools.dtx index d5facd8df28..c9effb2b782 100644 --- a/Master/texmf-dist/source/latex/mathtools/mathtools.dtx +++ b/Master/texmf-dist/source/latex/mathtools/mathtools.dtx @@ -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 @@ and the derived files %<*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 @@ and the derived files }% } +\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 @@ and the derived files }% }% } + +\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 @@ and the derived files \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 @@ hyperindex=false, % % % \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,6 +642,47 @@ hyperindex=false, % 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 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 @@ hyperindex=false, % 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 @@ hyperindex=false, % (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 @@ hyperindex=false, % 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 @@ hyperindex=false, % \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 @@ hyperindex=false, % \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 @@ hyperindex=false, }{% \crcr\egroup\egroup } + \renewenvironment{crampedsubarray}[1]{% + \vcenter\bgroup + \Let@ \restore@math@cr \default@tag + \let\math@cr@@\AMS@math@cr@@ % <--- the fix + \baselineskip\fontdimen10 \scriptfont\tw@ + \advance\baselineskip\fontdimen12 \scriptfont\tw@ + \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ + \lineskiplimit\lineskip + \ialign\bgroup\ifx c##1\hfil\fi + $\m@th\scriptstyle\kern-\nulldelimiterspace\radical\z@{####}$ + \hfil\crcr + }{% + \crcr\egroup\egroup + } + % from mathtolls + \def\MT_smallmatrix_begin:N ##1{% + \Let@\restore@math@cr\default@tag + \let\math@cr@@\AMS@math@cr@@ % <--- the fix + \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip + \csname MT_smallmatrix_##1_begin:\endcsname + } + % from amsmath + \renewenvironment{smallmatrix}{\null\,\vcenter\bgroup + \Let@\restore@math@cr\default@tag + \let\math@cr@@\AMS@math@cr@@ % <--- the fix + \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip + \ialign\bgroup\hfil$\m@th\scriptstyle####$\hfil&&\thickspace\hfil + $\m@th\scriptstyle####$\hfil\crcr + }{% + \crcr\egroup\egroup\,% + } } % \end{macrocode} @@ -4597,6 +4716,8 @@ hyperindex=false, \MHPrecedingSpacesOn % \end{macrocode} % +% +% % \subsection{Smashing an operator with limits} % % \begin{macro}{\smashoperator} @@ -5665,6 +5786,40 @@ hyperindex=false, % \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@math@cr \default@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@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 -- cgit v1.2.3