diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-02 21:40:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-02 21:40:29 +0000 |
commit | 325d58ddb0e00127903273312ad2f951f9ced74c (patch) | |
tree | 6f218f7c6f02281ff40ba169f586ea915ac45ed3 /Master/texmf-dist/source | |
parent | 318667b26e87038b4b703e3594bb740c2249d745 (diff) |
mathtools (2feb22)
git-svn-id: svn://tug.org/texlive/trunk@61856 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
6 files changed, 359 insertions, 137 deletions
diff --git a/Master/texmf-dist/source/latex/mathtools/empheq.dtx b/Master/texmf-dist/source/latex/mathtools/empheq.dtx index 7f4b76b8ae5..c0ecdec0270 100644 --- a/Master/texmf-dist/source/latex/mathtools/empheq.dtx +++ b/Master/texmf-dist/source/latex/mathtools/empheq.dtx @@ -438,8 +438,8 @@ and the derived files % \subsection{Using the \env{empheq} environment} % % The package defines a single environment -% \SpecialEnvIndex{empheq}\env{empheq} and the usage is kind of straight -% forward: +% \SpecialEnvIndex{empheq}\env{empheq} and the usage is kind of +% straightforward: % \begin{codesyntax} % |\begin{empheq}|\oarg{markup instructions}\marg{\AmS{} env_name}\\ % \mbox{}\quad\meta{contents of \AmS{} environment}\\ @@ -462,7 +462,7 @@ and the derived files % E&=mc^2 + \int_a^a x\, dx % \end{empheq} % Maybe not the most impressive example, but as you can see the -% contents of the environment is exactly the same as for the regular +% contents of the environment are exactly the same as for the regular % \env{align*} evironment from \pkg{amsmath}. The rest of the \AmS{} % environments are chosen the same way by typing the name as the % mandatory argument of \env{empheq} with the exception of the @@ -572,7 +572,7 @@ and the derived files % \end{codesyntax} % The key \key{box} specifies the kind of box you would like to put % around the display. It can be any kind of box, as long as the -% contents of the box is situated on the baseline like in a +% contents of the box are situated on the baseline like in a % \fbox{\cs{fbox}}. % \begin{verbatim} % \begin{empheq}[box=\fbox]{align} @@ -614,7 +614,7 @@ and the derived files % this manual features centered math displays.} you may want the % math display and not the outer box to align at the left margin (or % rather: the indentation). If you make sure the contents of the -% outer box is centered horizontally inside the box, \key{marginbox} +% outer box are centered horizontally inside the box, \key{marginbox} % will align it properly. You shouldn't set both \key{box} and % \key{marginbox} at the same time, as this is surely not what you % want and the package will silently use the last one in the list. @@ -762,7 +762,7 @@ and the derived files % versions prior to and including~0.7e. If you have documents produced % with versions prior to~0.7e, then you have to load the package % \pkg{empheq07} instead. \pkg{empheq07} now exists as a separate package -% package with its own documentation, but I strongly recommend switching +% with its own documentation, but I strongly recommend switching % to the new version because it is so much better. % % \subsection{Package options} @@ -802,7 +802,7 @@ and the derived files % \opt{ntheorem} option. In order for this to work properly, an % \pkg{amsmath} bug\footnote{See the \LaTeX{} Bugs Database % \url{http://www.latex-project.org/cgi-bin/ltxbugs2html} under -% \AmS\LaTeX{} problem report 3624.} is fixed. For more information +% \AmS-\LaTeX{} problem report 3624.} is fixed. For more information % on this option see \S \vref{sec:ntheorem-support}. % % \subsubsection{Using \env{multline}} @@ -930,14 +930,14 @@ and the derived files % for the pseudo environment |\[ ... \]| (it's not really an % environment), \footnote{With the option \opt{oldmultline} the % \env{multline} and \env{multline*} environments aren't supported -% either because their syntax in \pkg{empheq} then differ from their +% either because their syntax in \pkg{empheq} then differs from their % syntax in \pkg{amsmath}.} because a)~you don't really need markup % instructions for a one line display, and b)~would you really like % a syntax like % \begin{verbatim} % \[[box=\fbox] a=b \] % \end{verbatim} -% where its difficult to see whether or not there is a typo? +% where it's difficult to see whether or not there is a typo? % Choosing \opt{overload} is meant for people who don't want to % change their entire document into \pkg{empheq} syntax. I have no % problems with that; just be careful when you fiddle with @@ -1089,7 +1089,7 @@ and the derived files % packages where \pkg{empheq} has to provide workarounds and they % can be divided into two categories. % \begin{description} -% \item[Compatibility] Some packages affect \LaTeX' labelling +% \item[Compatibility] Some packages affect \LaTeX's labelling % mechanism and since \pkg{empheq} internally has to turn off % labels and related code temporarily, hooks must be provided for % these packages. Examples of such packages are \pkg{hyperref} and @@ -1184,7 +1184,7 @@ and the derived files % be lost. In the future \pkg{ntheorem} should be able to test for % this and add \verb|\usetagform{default}| automatically. % -% Users who use \verb|\usetagform| to get another tag design, should +% Users who use \verb|\usetagform| to get another tag design should % make sure to postpone this configuration until \emph{after} loading % \pkg{ntheorem}. % @@ -1270,7 +1270,7 @@ and the derived files % % The good news is that this is where \pkg{empheq} sets in. % Basically all you need to do is to use the \env{empheq} -% environment to type set your equations inside the theorem +% environment to typeset your equations inside the theorem % environments: % \begin{verbatim} % \begin{Theorem} @@ -1346,7 +1346,7 @@ and the derived files % sub-formula inside the \cs{left}-\cs{right} pair is to be % vertically centered and given its height $h_1$ and its depth $h_2$ % we want to produce a delimiter with total height $h$, where $h = -% 2 \max(h_1,h_2)$. \TeX' rules on this is that the minimum +% 2 \max(h_1,h_2)$. \TeX's rules on this are that the minimum % delimiter size $h_{\min}$ must meet the requirements % \[ % h_{\min}\geq h \frac{f}{1000} \quad\land \quad h_{\min}\geq h-\delta @@ -1437,7 +1437,7 @@ and the derived files % % \subsection{About \texorpdfstring{$\cs{eqref}$}{\textbackslash eqref}} % -% Internally \env{empheq} separate the displayed math from +% Internally \env{empheq} separates the displayed math from % the corresponding equation numbers such that we can add special % delimiters or boxes. This is done by nullifying (or rather % conveniently redefining) an internal command called @@ -1709,7 +1709,7 @@ and the derived files % \bibitem{fancybox} % Timothy Van Zandt, % \emph{The \pkg{fancybox} package} Version 1.3, -% 2000/09/19 +% 2000/09/19. % (Available from CTAN as file \texttt{fancybox.sty}.) % % \bibitem{Raht03} @@ -1728,19 +1728,19 @@ and the derived files % \changes{v1.06}{2004/03/13}{Added \pkg{calc} to the \refname} % \bibitem{Thorup:calc:1998} % Kresten~Krab Thorup, Frank Jensen, and Chris Rowley. -% \emph{The {\pkg{calc}} package}, Version 4.1b, 1998/07/07, +% \emph{The {\pkg{calc}} package}, Version 4.1b, 1998/07/07. % (Available from CTAN as file \texttt{calc.dtx}.) % % \bibitem{ntheorem} % Wolfgang May and Andreas Schlechte, % \emph{The \pkg{ntheorem} package} Version 1.203, -% 2002/01/07, +% 2002/01/07. % (Available from CTAN as file \texttt{ntheorem.dtx}.) % % \changes{v2.10}{2004/07/26}{Added \pkg{showkeys} to the \refname} % \bibitem{Carlisle:showkeys:1997} % David Carlisle. \emph{The {\pkg{showkeys}} package}, v3.12, -% 1997/06/12, (Available from CTAN as file \texttt{showkeys.dtx}.) +% 1997/06/12. (Available from CTAN as file \texttt{showkeys.dtx}.) % % \end{thebibliography} % diff --git a/Master/texmf-dist/source/latex/mathtools/empheq.ins b/Master/texmf-dist/source/latex/mathtools/empheq.ins index 632545df724..265efeb2bbc 100644 --- a/Master/texmf-dist/source/latex/mathtools/empheq.ins +++ b/Master/texmf-dist/source/latex/mathtools/empheq.ins @@ -33,7 +33,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 diff --git a/Master/texmf-dist/source/latex/mathtools/mathtools.dtx b/Master/texmf-dist/source/latex/mathtools/mathtools.dtx index b065615eb04..15cf76b3233 100644 --- a/Master/texmf-dist/source/latex/mathtools/mathtools.dtx +++ b/Master/texmf-dist/source/latex/mathtools/mathtools.dtx @@ -2,7 +2,7 @@ % % Copyright (C) 2004-2011 by Morten Hoegholm % Copyright (C) 2012-2019 by Lars Madsen -% Copyright (C) 2020 by Lars Madsen, The LaTeX3 team +% 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 @@ -133,7 +133,7 @@ and the derived files %<*driver> \NeedsTeXFormat{LaTeX2e} \ProvidesFile{mathtools.drv}% - [2021/04/12 v1.27 mathematical typesetting tools] + [2022/02/02 v1.28 mathematical typesetting tools] \documentclass{ltxdoc} \IfFileExists{fourier.sty}{\usepackage{fourier}}{} @@ -239,6 +239,7 @@ and the derived files } + \expandafter\def\expandafter\MakePrivateLetters\expandafter{% \MakePrivateLetters \catcode`\_=11\relax } @@ -294,6 +295,16 @@ and the derived files \def\theindex{\MTtheindex\MakePrivateLetters} +\NewDocumentCommand\Framebox{ o O{c} m }{% + \IfNoValueTF{#1}{% + \framebox{\footnotesize\strut #3}% + }{% + \framebox[#1][#2]{\footnotesize\strut #3}% + }% +} + + + %\usepackage[draft]{fixme} %\fxsetup{ % multiuser, @@ -322,7 +333,7 @@ colorlinks, % % \GetFileInfo{mathtools.drv} % -% \CheckSum{3529} +% \CheckSum{3581} % % \title{The \pkg{mathtools} package\thanks{This file has version number % \fileversion, last revised \filedate.}} @@ -335,7 +346,7 @@ colorlinks, % \begin{abstract} % \noindent The \pkg{mathtools} package is an extension package to % \pkg{amsmath}. There are two things on \pkg{mathtools}' agenda: -% (1)~correct various bugs/defeciencies in \pkg{amsmath} until +% (1)~correct various bugs/deficiencies in \pkg{amsmath} until % these are fixed by the \AmS{} and (2)~provide useful tools % for mathematical typesetting, be it a small macro for % typesetting a prescript or an underbracket, or entirely new @@ -400,7 +411,7 @@ colorlinks, % The option \opt{fixamsmath} (default) fixes two bugs in % \pkg{amsmath}.\footnote{See the online \LaTeX{} bugs database % \url{http://www.latex-project.org/cgi-bin/ltxbugs2html} under -% \AmS\LaTeX{} problem reports 3591 and 3614.} Should you for some +% \AmS-\LaTeX{} problem reports 3591 and 3614.} Should you for some % reason not want to fix these bugs then just add the option % \opt{donotfixamsmathbugs} (if you can do it without typos). The % reason for this extremely long name is that I really don't see why @@ -553,14 +564,14 @@ colorlinks, % \endgroup % Notice how the limit of the right summation sign is typeset in a % more compact style than the left. It is because \TeX{} sets the -% limits of operators in a \emph{cramped} style. For each of \TeX' +% limits of operators in a \emph{cramped} style. For each of \TeX's % four math styles (\cs{displaystyle}, \cs{textstyle}, % \cs{scriptstyle}, and \cs{scriptscriptstyle}), there also exists a % cramped style that doesn't raise exponents as much. Besides in the % limits of operators, \TeX{} also automatically uses these cramped % styles in radicals such as \cs{sqrt} and in the denominators of % fractions, but unfortunately there are no primitive commands that -% allows you to detect crampedness or switch to it. +% allow you to detect crampedness or switch to it. % % \pkg{mathtools} offers the command \cs{cramped} which forces a % cramped style in normal un-cramped math. Additionally you can @@ -594,7 +605,7 @@ colorlinks, % \end{quote} % Typesetting on a grid is generally considered quite desirable, but % as the second line of the example shows, the exponents of $2$ -% causes the line to be too tall for the normal value of +% cause the line to be too tall for the normal value of % \cs{baselineskip}, so \TeX{} inserts a \cs{lineskip} (normal value % is \the\lineskip). In order to circumvent the problem, we can % force a cramped style so that the exponents aren't raised as much: @@ -785,7 +796,7 @@ colorlinks, % \label{sec:swapping} % % One feature that the plain old \env{equation} environment has that -% the \AmS\ environments does not (because of technical reasons), is +% the \AmS\ environments do not (because of technical reasons) is % the feature of using less space above the equation if the situation % presents itself. The \AmS\ environments cannot do this, but one can % manually, using @@ -822,7 +833,7 @@ colorlinks, % % In this section various tools for altering the appearance of tags % are shown. All of the tools here can be used at any point in the -% document but they should probably be affect the whole document, so +% document but they should probably affect the whole document, so % the preamble is the best place to issue them. % % \subsubsection{The appearance of tags} @@ -896,6 +907,13 @@ colorlinks, % \SpecialKeyIndex{showmanualtags}$\key{showmanualtags}=\texttt{true}\vert\texttt{false}$\\ % \SpecialUsageIndex{\refeq}\cs{refeq}\marg{label} % \end{codesyntax} +% First of, one should always use \cs{eqref} when referring to +% equation numbers. When \opt{showonlyrefs} is true, we monitor +% \cs{eqref}\marg{label}, and those used will get an equation number, +% whereas those not used will not. Note: We do \emph{not} monitor the +% normal \cs{ref} command! See the follow paragraph for situations +% for what to do when \cs{eqref} cannot be used to refer to the equation. +% % An equation where the tag is produced with a manual \cs{tag*} % shouldn't be referenced with the normal \cs{eqref} because that % would format it according to the current tag format. Using just @@ -994,8 +1012,8 @@ colorlinks, % \cs{ref}. % % \medskip\noindent\textbf{BUG 1:} Unfortunately the use of the -% \key{showonlyref} introduce a bug within amsmath's typesetting -% of formula versus equation number. This bug manifest itself by +% \key{showonlyref} introduces a bug within amsmath's typesetting +% of formula versus equation number. This bug manifests itself by % allowing formulas to be typeset close to or over the equation % number. Currently no general fix is known, other than making sure % that one's formulas are not long enough to touch the equation @@ -1007,7 +1025,7 @@ colorlinks, % number is recorded such that the formula or the equation number can % be moved (if necessary) in the typesetting part. When % \key{showonlyref} is enabled, the width of the equation number -% depend on whether or not this number is referred~to. To determine +% depends on whether or not this number is referred~to. To determine % this, we need to know the current label. But the current label is % \emph{not} known in the measuring phase. Thus the measured width is % always zero (because no label equals not referred to) and therefore @@ -1019,7 +1037,7 @@ colorlinks, % \pkg{ntheorem} option \key{thmmarks} is active. The shown equation % numbers may come out wrong (seems to be multiplied by 2). Or the end % marker may be placed in the wrong place if a proof ends with a -% displayed formula, and that formula is not refered to. +% displayed formula, and that formula is not referred to. % % There are two possible solutions to this both involving \pkg{empheq}. % The easiest fix is to add the following line @@ -1029,7 +1047,7 @@ colorlinks, % before loading \pkg{ntheorem}. But the \texttt{overload} option of % course disables things like \cs{intertext} and \cs{shotintertext}. % -% The other thing to try is to use drop the \texttt{overload} option +% The other thing to try is to drop the \texttt{overload} option % and use \env{empheq} on the very last expression, as in % \begin{verbatim} % \begin{empheq}{align} @@ -1125,10 +1143,22 @@ colorlinks, % \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. -% -% -% % +% \begin{codesyntax} +% \SpecialUsageIndex{\xlongrightarrow} +% \cs{xlongrightarrow}\oarg{sub}\marg{sup}\texttt{~~~~} +% \SpecialUsageIndex{\xlongleftarrow} +% \cs{xlongleftarrow}\oarg{sub}\marg{sup}\texttt{~~~~} +% \end{codesyntax} +% \FeatureRequest{rbrito {\footnotesize (issue \#12)}}{added 2022}% +% Similar to \cs{xright/leftarrow} but based on the \emph{long} +% versions. For short arguments it stays the same length as the +% \cs{long...} base arrow. +% \begin{align*} +% A & \longrightarrow B & A & \longleftarrow B \\ +% A & \xlongrightarrow[b]{a} B & A & \xlongleftarrow[b]{a} B \\ +% A & \xlongrightarrow[below]{above} B & A & \xlongleftarrow[below]{above} B \\ +% \end{align*} % % \subsubsection{Braces and brackets} % @@ -1205,13 +1235,13 @@ colorlinks, % As \cs{overbrace} has the exact same problems, there are good % reasons for \pkg{mathtools} to make redefinitions of % \cs{underbrace} and \cs{overbrace}. These new versions work -% equally well in all font sizes and fixes the spacing issues and +% equally well in all font sizes and fix the spacing issues and % apart from working with the default Computer Modern fonts, they % also work with the packages \pkg{mathpazo}, \pkg{pamath}, % \pkg{fourier}, \pkg{eulervm}, \pkg{cmbright}, and \pkg{mathptmx}. % If you use the \pkg{ccfonts} to get the full Concrete fonts, the % original version saved under the names \cs{LaTeXunderbrace} and -% \cs{LaTeXoverbrace} are better, due to of the special design of +% \cs{LaTeXoverbrace} is better, due to the special design of % the Concrete extensible braces. In that case you should probably % just add the lines % \begin{verbatim} @@ -1270,7 +1300,7 @@ colorlinks, % type valid in the usual \env{array} environment. % % While we are at it, we also provide fenced versions of the -% \env{smallmatrix} environment, To keep up with the naming of the +% \env{smallmatrix} environment. To keep up with the naming of the % large matrix environments, we provide both a starred and a % non-starred version. Since \env{smallmatrix} is defined in a % different manner than the \env{matrix} environment, the option to @@ -1322,9 +1352,9 @@ colorlinks, % the default is \cs{,}. % % As an extra trick the fences will behave as open and closing fences -% in constract to their auto-scaling nature.\footnote{\cs{left} and +% despite their auto-scaling nature.\footnote{\cs{left} and % \cs{right} creates an \emph{inner} construction, and not as one -% might expect something where a preceeding \cs{sin} sees an opening +% might expect something where a preceding \cs{sin} sees an opening % fence, thus the space before or after may be too large. Inside this % construction they behave.} % @@ -1358,19 +1388,21 @@ colorlinks, % right and preceded by a hard space of size \key{lastline-preskip}. % Both these hard spaces have a default value of \cs{multlinegap}. % Here we use a `t' in the first optional argument denoting a -% top-aligned building block (the default is `c'). +% top-aligned building block (the default is `c').\footnote{The helper macro +% \cs{Framebox}\marg{...} is equivalent to +% \cs{framebox}\marg{\cs{footnotesize}\cs{strut} ...}} % \begin{verbatim} % \[ % A = \begin{multlined}[t] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} B % \] % \end{verbatim} % \[ % A = \begin{multlined}[t] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} B % \] % Note also that \env{multlined} gives you access to an extended @@ -1379,25 +1411,25 @@ colorlinks, % \begin{verbatim} % \[ % \begin{multlined} -% \framebox[.65\columnwidth]{First line} \\ -% \framebox[.5\columnwidth]{Second line} \\ +% \Framebox[.65\columnwidth]{First line} \\ +% \Framebox[.5\columnwidth]{Second line} \\ % \shoveleft{L+E+F+T} \\ % \shoveright{R+I+G+H+T} \\ % \shoveleft[1cm]{L+E+F+T} \\ % \shoveright[\widthof{$R+I+G+H+T$}]{R+I+G+H+T} \\ -% \framebox[.65\columnwidth]{Last line} +% \Framebox[.65\columnwidth]{Last line} % \end{multlined} % \] % \end{verbatim} % \[ % \begin{multlined} -% \framebox[.65\columnwidth]{First line} \\ -% \framebox[.5\columnwidth]{Second line} \\ +% \Framebox[.65\columnwidth]{First line} \\ +% \Framebox[.5\columnwidth]{Second line} \\ % \shoveleft{L+E+F+T} \\ % \shoveright{R+I+G+H+T} \\ % \shoveleft[1cm]{L+E+F+T} \\ % \shoveright[\widthof{$R+I+G+H+T$}]{R+I+G+H+T} \\ -% \framebox[.65\columnwidth]{Last line} +% \Framebox[.65\columnwidth]{Last line} % \end{multlined} % \] % @@ -1406,15 +1438,15 @@ colorlinks, % \begin{verbatim} % \[ % \begin{multlined}[b][7cm] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} = B % \] % \end{verbatim} % \[ % \begin{multlined}[b][7cm] -% \framebox[4cm]{first} \\ -% \framebox[4cm]{last} +% \Framebox[4cm]{first} \\ +% \Framebox[4cm]{last} % \end{multlined} = B % \] % There can be two optional arguments (position and width) and @@ -1428,14 +1460,14 @@ colorlinks, % not work as expected. The implementation contains an `invisible' % line after the first \env{multline} row, inside an \env{array} this % line is no longer `invisible' because \env{array} sets -% \cs{baselineskip} to zero. Currently we have no general workaround +% \cs{baselineskip} to zero. We have no general workaround % for this. % % \medskip\noindent % \textbf{Bug 2:} % \CommentAdded{2015/11/12} % Due to the way \env{multlined} is implemented, certain -% constructions does not work inside \env{multlined}. We have added a +% constructions do 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 \env{crampedsubarray} and thus for % \cs{substack} and \cs{crampedsubstack} (and a few others, thus add @@ -1484,7 +1516,7 @@ colorlinks, % \cs{end}\arg{cases*} % \end{codesyntax} % \FeatureRequest{Lars Madsen}{2004/07/01} -% Anyone who have tried to use an integral in the regular +% Anyone who has tried to use an integral in the regular % \env{cases} environment from \pkg{amsmath} will have noticed that % it is set as % \[ @@ -1552,16 +1584,19 @@ colorlinks, % \SpecialEnvIndex{\MoveEqLeft}\cs{MoveEqLeft}\oarg{number} % \end{codesyntax} % \ProvidedBy{Lars Madsen}{2008/06/05} In \cite{Swanson}, Ellen -% Swanson recommends that when ever one has a long displayed formula, +% Swanson recommends that whenever one has a long displayed formula, % spanning several lines, and it is unfeasible to align against a % relation within the first line, then all lines in the display % should be aligned at the left most edge of the first line, and all % subsequent lines should be indented by 2\,em (or if needed by a % smaller amount). That is we are talking about displays that end up -% looking like this +% looking like this\footnote{Maintainer (daleif)'s note: This is one +% of my most used constructions whenever I edit manuscripts. I'd +% rather use this than for example \env{multline} as I find it gives +% the text a more consistent look.} % \begin{align*} -% \MoveEqLeft \framebox[10cm][c]{Long first line}\\ -% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\ +% \MoveEqLeft \Framebox[10cm][c]{Long first line}\\ +% & = \Framebox[6cm][c]{2nd line}\\ % & \leq \dots % \end{align*} % Traditionally one could do this by starting subsequent lines by @@ -1569,8 +1604,8 @@ colorlinks, % was made using \cs{MoveEqLeft}: % \begin{verbatim} % \begin{align*} -% \MoveEqLeft \framebox[10cm][c]{Long first line}\\ -% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\ +% \MoveEqLeft \Framebox[10cm][c]{Long first line}\\ +% & = \Framebox[6cm][c]{2nd line}\\ % & \leq \dots % \end{align*} % \end{verbatim} @@ -1581,22 +1616,22 @@ colorlinks, % to accommodate the extra distance to the alignment point: % \begin{verbatim} % \begin{align*} -% \MoveEqLeft[3] \framebox[10cm][c]{Part 1}\\ -% = {} & \framebox[8cm][c]{2nd line}\\ -% & + \framebox[4cm][c]{ last part} +% \MoveEqLeft[3] \Framebox[10cm][c]{Part 1}\\ +% = {} & \Framebox[8cm][c]{2nd line}\\ +% & + \Framebox[4cm][c]{last part} % \end{align*} % \end{verbatim} % \begin{align*} -% \MoveEqLeft[3] \framebox[10cm][c]{Long first line}\\ -% = {} & \framebox[6cm][c]{ 2nd line}\\ -% & + \framebox[4cm][c]{ last part} +% \MoveEqLeft[3] \Framebox[10cm][c]{Long first line}\\ +% = {} & \Framebox[6cm][c]{2nd line}\\ +% & + \Framebox[4cm][c]{last part} % \end{align*} % % % \noindent\textbf{Caveat regarding \cs{MoveEqLeft}}: If the first % part of the equation starts with say \verb|[a]|, \cs{MoveEqLeft} may % attempt to eat it! You can prevent this by specifying the optional -% argument (remember the default is the same as \cs{MoveEqLeft[2]} or +% argument (remember the default is the same as \cs{MoveEqLeft[2]}) or % by using \cs{MoveEqLeft\{\}}. % % \subsubsection{Boxing a single line in an alignment} @@ -1634,8 +1669,8 @@ colorlinks, % & = g(x) % \end{align*} % One can have multiple boxes on each line, and the -% >>\texttt{\textnormal{\&}}\quad right hand side<< can even be -% missing. Here is an example of how the padding in the box can be changed +% ``\texttt{\textnormal{\&}}\quad right hand side'' can even be +% missing. Here is an example of how the padding in the box can be changed. % \begin{verbatim} % \begin{align*} % \setlength\fboxsep{1em} @@ -1648,7 +1683,7 @@ colorlinks, % \Aboxed{ f(x) &= 0 } & \Aboxed{ g(x) &= b} \\ % \Aboxed{ h(x) } & \Aboxed{ i(x) } % \end{align*} -% Note how the \cs{fboxsep} change only affect the box coming +% Note how the \cs{fboxsep} change only affects the box coming % immediately after it. % % \marginpar{\strut\\% @@ -1661,6 +1696,33 @@ colorlinks, % use of \texttt{\&}. Just add a set of braces around the construction % you want to hide. % +% \medskip\noindent\textbf{Tip:} At times users want a \cs{Aboxed} +% with a different type of box. To help we provide a \cs{Aboxed} builder: +% \begin{codesyntax} +% \SpecialUsageIndex{\MakeAboxedCommand}\cs{MakeAboxedCommand}\cs{Aboxedname}\cs{boxmacro} +% \end{codesyntax} +% where \cs{boxname} should be a macro taking a single argument. The +% normal \cs{Aboxed} is the same as +% \verb|\MakeAboxedCommand\Aboxed\fbox|. Thus you can do +% \newcommand\myboxA[1]{\fcolorbox{gray}{yellow}{#1}} +% \newcommand\myboxB[1]{{\fboxsep=5pt\fboxrule=2pt\fbox{#1}}} +% \MakeAboxedCommand\AboxedA\myboxA +% \MakeAboxedCommand\AboxedB\myboxB +% \begin{align*} +% \AboxedA{ f(x) &= x^2 } & \AboxedB{ f(x) &= x^2 } +% \end{align*} +% via +% \begin{verbatim} +% \newcommand\myboxA[1]{\fcolorbox{gray}{yellow}{#1}} +% \newcommand\myboxB[1]{{\fboxsep=5pt\fboxrule=2pt\fbox{#1}}} +% \MakeAboxedCommand\AboxedA\myboxA +% \MakeAboxedCommand\AboxedB\myboxB +% \begin{align*} +% \AboxedA{ f(x) &= x^2 } & \AboxedB{ f(x) &= x^2 } +% \end{align*} +% \end{verbatim} +% +% % \subsubsection{Adding arrows between lines in an alignment} % % This first macro is a bit misleading, it is only intended to be @@ -1713,7 +1775,7 @@ colorlinks, % % \subsubsection{Centered \texorpdfstring{\cs{vdots}}{\textbackslash vdots}} % -% If one want to mark a vertical continuation, there is +% If one wants to mark a vertical continuation, there is % the \verb?\vdots? command, but combine this with an alignment and % we get something rather suboptimal % \FeatureRequest{Bruno Le Floch \\(and many others)}{2011/01/25} @@ -1735,7 +1797,7 @@ colorlinks, % \SpecialKeyIndex{shortvdotsadjustabove}\makebox{$\key{shortvdotsadjustabove}=\meta{length}$}\\ % \SpecialKeyIndex{shortvdotsadjustbelow}\makebox{$\key{shortvdotsadjustbelow}=\meta{length}$} % \end{codesyntax} -% Two examples in one +% Two examples in one % \begin{verbatim} % \begin{align*} % a &= b \\ @@ -1754,7 +1816,7 @@ colorlinks, % & = d % \end{align*} % Thus \verb?\vdotswithin{=}? creates a box corresponding to -% \verb?{}={}? and typeset a >>$\vdots$<< centered inside it. When +% \verb?{}={}? and typesets a ``$\vdots$'' centered inside it. When % doing this as a normal line in an alignment leaves us with excessive % space which \verb?\shortvdotswithin{=}? takes care with for us. % @@ -1842,7 +1904,7 @@ colorlinks, % \cs{shortintertext} and \cs{intertext}. \tsxPosting{Tobias Weh % \\(referring to a suggestion by Chung-chieh Shan)}{2011/05/29} % It can be illustrated using the following example, an interested -% reader, can apply it with and without the original \cs{intertext} +% reader can apply it with and without the original \cs{intertext} % and \cs{shortintertext}. % \begin{verbatim} % % the original \intertext and \shortintertext @@ -1859,8 +1921,8 @@ colorlinks, % \myline % \end{verbatim} % -% We now fix this internaly for both \cs{intertext} and -% \cs{shortintertext}, plus we add the possibility to fine tune +% We now fix this internally for both \cs{intertext} and +% \cs{shortintertext}, plus we add the possibility to fine-tune % spacing around these constructions. The original versions can be % brought back using the \texttt{original-x} keys below. % \begin{codesyntax} @@ -1909,7 +1971,7 @@ colorlinks, % \abs{\frac{a}{b}} % \] % Here it won't give a nice result, so you have to manually put in -% either \cs{left}--\cs{right} pair or a \cs{bigl}--\cs{bigr} pair. +% either a \cs{left}--\cs{right} pair or a \cs{bigl}--\cs{bigr} pair. % Both methods mean that you have to delete your \cs{abs} command, % which may not sound like an ideal solution. % @@ -1959,10 +2021,10 @@ colorlinks, % \cs{DeclarePairedDelimiterX} extends the features of % \cs{DeclarePairedDelimiter} such that the user will get a macro % which is fenced off at either end, plus the capability to provide -% the \meta{body} for what ever the macro should do within these +% the \meta{body} for whatever the macro should do within these % fences. % -% Inside the \meta{body} part, the macro \cs{delimsize} refer to the +% Inside the \meta{body} part, the macro \cs{delimsize} refers to the % size of the outer fences. It can then be used inside \meta{body} to % scale any inner fences. % @@ -1990,16 +2052,16 @@ colorlinks, % {#1\,\delimsize\vert\,\mathopen{}#2\,\delimsize\vert\,\mathopen{}#3} % \end{verbatim} % \begin{itshape} -% Note the use of >>\verb|\mathopen{}|<< in the \meta{body} of +% Note the use of `\verb|\mathopen{}|' in the \meta{body} of % \cs{braket}, this is very important when a scalable delimiter is % being used and it does not present itself as a left or right % delimiter. You will see why it is needed if you use -% \verb|\braket{A}{-B}| in a version without +% \verb|\braket{A}{-B}{C}| in a version without % \verb|\mathopen{}|.\footnote{Basically, the problem is that % \cs{vert} is a `symbol', thus $\vert-B$ is interpreted -% \emph{subtraction}, not a symbol followed by negative $B$. When -% \cs{mathopen\{\}} is added, \TeX\ is told that an opening -% delimiter just occurred, and it will adjust the minus +% \emph{subtraction}, not a symbol followed by negative $B$ (aka a +% sign). When \cs{mathopen\{\}} is added, \TeX\ is told that an +% opening delimiter just occurred, and it will adjust the minus % accordingly.} % \end{itshape} % @@ -2041,8 +2103,8 @@ colorlinks, % is a feature of the \cs{left}\dots\cs{right} construction). % \fi % -% With the inner scaling, we can provide macros whos syntax closely -% follow the mathematical meaning. Fx for building sets, try +% With the inner scaling, we can provide macros whose syntax closely +% follows the mathematical meaning. Fx for building sets, try % this\footnote{The reason for using a separate \cs{SetSymbol} macro % has to do with complicated set definitions, where the condition % spans several lines. In this case \cs{Set} cannot be used. Thus it @@ -2082,7 +2144,7 @@ colorlinks, % \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: +% that automatically provides a marker for a blank argument: % \begin{verbatim} % \usepackage{etoolbox} % \DeclarePairedDelimiterX\norm[1]\lVert\rVert{ @@ -2101,7 +2163,7 @@ colorlinks, % \FeatureRequest{Barbara Beeton (on TSE)}{2013/10/07} % \cs{DeclarePairedDelimiterX} has an annoying caveat: it is very hard % to make a macro \verb|\lnorm{a}| that should result in $\lVert -% a\rVert_2$.\footnote{The added >>\texttt{\_2}<< is hard to get around +% a\rVert_2$.\footnote{The added `\texttt{\_2}' is hard to get around % the argument parsing.} % % As a consequence we provide @@ -2128,14 +2190,14 @@ colorlinks, % \end{verbatim} % Thus giving support for \verb|\Prob{A \given B}|. % -% \medskip\noindent\textbf{Note 1:} As the number of arguments increase +% \medskip\noindent\textbf{Note 1:} As the number of arguments increases % the \cs{DeclarePairedDelimiter...} macros become hard for users to % understand. A key-value interface would be better. This is planed % for a future release. In % \url{http://tex.stackexchange.com/a/136767/3929} there is a % suggested replacement for \cs{DeclarePairedDelimiter}, that greatly % reduces the number of macros and provides a key-val -% interface. However, the code use \pkg{xparse}, and if we want to use +% interface. However, the code uses \pkg{xparse}, and if we want to use % \pkg{xparse} for some of our macros, we might just as well rewrite % the entire \pkg{mathtools} package in \pkg{expl3}. Also it is not % obvious how to get \pkg{xparse} to support \verb|[3]| for the number @@ -2143,7 +2205,7 @@ colorlinks, % % \medskip\noindent\textbf{Note 2:} If you want to define your own % manual scaler macros, it is important that you besides \cs{foo} also -% defines \cs{fool} and \cs{foor}. When a scaler is specified, in say +% define \cs{fool} and \cs{foor}. When a scaler is specified, in say % \cs{abs[\cs{big}]}\marg{arg}, we actually use \cs{bigl} and % \cs{bigr}. % @@ -2155,7 +2217,7 @@ colorlinks, % auto scaled \cs{left} and \cs{right} fences behave as opening and % closing fences, i.e.\ $\sin(x)$ vs. $\sin\left(x\right)$ (the later % made via \verb|$\sin\left(x\right)$|), notice the gap between -% '$\sin$' and '('. In some special cases it may be useful to be +% `$\sin$' and `('. In some special cases it may be useful to be % able to tinker with the behavior. % \begin{codesyntax} % \SpecialUsageIndex{\reDeclarePairedDelimiterInnerWrapper} @@ -2176,7 +2238,7 @@ colorlinks, % \reDeclarePairedDelimiterInnerWrapper\abs{nostarnonscaled}{\mathinner{#1#2#3}} % \reDeclarePairedDelimiterInnerWrapper\abs{nostarscaled}{\mathinner{#1#2#3}} % \end{verbatim} -% The default values for the call backs corresponds to +% The default values for the call backs correspond to % \begin{verbatim} % star: \mathopen{}\mathclose\bgroup #1#2\aftergroup\egroup #3 % nostarnonscaled: \mathopen#1#2\mathclose#3 @@ -2205,7 +2267,7 @@ colorlinks, % construction. Currently, this can only be applied to macros made % using \cs{DeclarePairedDelimiter} and \emph{not} macros made using % \cs{DeclarePairedDelimiterX} or \cs{DeclarePairedDelimiterXPP} as -% the contents is typeset inside a group (to limit \cs{delimsize}) +% the contents are typeset inside a group (to limit \cs{delimsize}) % and thus hide any \verb|&| or \verb|\\| from \env{align} and % \env{align} breaks down. % @@ -2300,7 +2362,7 @@ colorlinks, % the equal sign, leading to an odd-looking output. The command % \cs{vcentcolon} is a shorthand for such a vertically centered % colon, and can be used as in |$a \vcentcolon= b$| and results in -% the desired output: $a \vcentcolon= b$. % for now +% the desired output: $a \vcentcolon= b$. % See also the \pkg{colonequals} package. % % Typing \cs{vcentcolon} every time is quite tedious, so one can use @@ -2341,11 +2403,11 @@ colorlinks, % \SpecialUsageIndex{\Colonsim}\cs{Colonsim}\\ % \SpecialUsageIndex{\dblcolon}\cs{dblcolon} % \end{codesyntax} -% The font packages \pkg{txfonts} and \pkg{pxfonts} provides various +% The font packages \pkg{txfonts} and \pkg{pxfonts} provide various % symbols that include a vertically centered colon but with tighter % spacing. For example, the combination |:=| exists as the symbol % \cs{coloneqq} which typesets as $\coloneqq$ instead of -% $\vcentcolon=$. The primary disadvantage of using these fonts are +% $\vcentcolon=$. The primary disadvantage of using these fonts is % the support packages' lack of support for \pkg{amsmath} (and thus % \pkg{mathtools}) and worse yet, the side-bearings are way too % tight; see~\cite{A-W:MG04} for examples. If you're not using these @@ -2375,11 +2437,11 @@ colorlinks, % \end{codesyntax} % % \noindent -% \textbf{Note:} that these symbols are constructed via +% \textbf{Note:} These symbols are constructed via % features from the \pkg{graphicx} package, and thus may not display % correctly in most DVI previewers. Also note that \cs{nuparrow} and % \cs{ndownarrow} are constructed via \cs{nrightarrow} and -% \cs{nleftarrrow} respectively, so these needs to be +% \cs{nleftarrrow} respectively, so these need to be % present. Usually this is done via \pkg{amssymb}, but some packages % may be incompatible with \pkg{amssymb} so the user will have to % load \pkg{amssymb} or a similar package, that provides @@ -2442,15 +2504,15 @@ colorlinks, % \par % \end{quote} % \noindent -% As of 2013, \cs(\cs) are robust, as is the italic corrected versions. +% As of 2013, \cs(\cs) are robust, as are the italic corrected versions. % % \medskip\noindent \textbf{Caveat:} Italic correction is a % treacherous area. For example any penalties will cancel the italic % correction inserted by % \verb|\(| (for an explanation see \cite{TBT}, section 4.3.3). We -% have changed Michaels original to accommodate one specific penalty +% have changed Michael's original to accommodate one specific penalty % construction: the \emph{tie}, i.e., -% >>\verb|text~\(|<< will work as expected (as~of July, 2014). +% `\verb|text~\(|' will work as expected (as~of July, 2014). % % \subsection{Left sub/superscripts} % @@ -2692,7 +2754,7 @@ colorlinks, % \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: +% not added by default as often a more cramped look is desired: % \begin{verbatim} % \[ % \frac{ @@ -2748,9 +2810,9 @@ colorlinks, % \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 +% equal 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 +% macro definitions etc. The \emph{extended} math strut % \cs{xmathstrut} allows to \emph{increase} (decrease if negative) % the math strut in two ways. % @@ -2759,7 +2821,7 @@ colorlinks, % \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=\xmathstrut{0}|) will be +% the normal math strut} (\verb|\mathstrut=\xmathstrut{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} @@ -2809,6 +2871,7 @@ colorlinks, % \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 % \] +% \newpage % \begin{verbatim} % \newcommand\vfb[1]{\begingroup\fboxsep=0pt\boxed{\,#1\,}\endgroup} % \[ @@ -2983,7 +3046,7 @@ colorlinks, % \begin{macrocode} %<*package> \ProvidesPackage{mathtools}% - [2021/04/12 v1.27 mathematical typesetting tools] + [2021/02/02 v1.28 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}} @@ -2996,14 +3059,17 @@ colorlinks, % We'd like to make \cs{(}\cs{)} and \cs{[}\cs{]} robust. This can % easily be done via the \pkg{fixltx2e} package, but auto loading that % package may cause problems for some. We make copies instead. +% Update 2021: We have removed robustifying \cs{(}\cs{)}\cs{[}\cs{]} +% as this is now in the \LaTeX\ kernel. We still use +% \verb|\EQ_MakeRobust| elsewhere though. % \begin{macro}{\EQ_MakeRobust} % \begin{macro}{\forced_EQ_MakeRobust} % \begin{macrocode} % borrowed from fixltx2e \def\EQ_MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% - \@latex@error{The control sequence `\string#1' is undefined!% - \MessageBreak There is nothing here to make robust}% + \@latex@error{The~control~sequence~`\string#1'~is~undefined!% + \MessageBreak There~is~nothing~here~to~make~robust}% \@eha }% {% @@ -3021,7 +3087,7 @@ colorlinks, \noexpand\protect\expandafter\noexpand \csname\expandafter\@gobble\string#1\space\endcsname}% }% - {\@latex@info{The control sequence `\string#1' is already robust}}% + {\@latex@info{The~control~sequence~`\string#1'~is~already~robust}}% }% } % \end{macrocode} @@ -3030,8 +3096,8 @@ colorlinks, % \begin{macrocode} \def\forced_EQ_MakeRobust#1{% \@ifundefined{\expandafter\@gobble\string#1}{% - \@latex@error{The control sequence `\string#1' is undefined!% - \MessageBreak There is nothing here to make robust}% + \@latex@error{The~control~sequence~`\string#1'~is~undefined!% + \MessageBreak There~is~nothing~here~to~make~robust}% \@eha }% {% @@ -3129,18 +3195,20 @@ colorlinks, } % \end{macrocode} % \end{macro} -% \changes{v1.13}{2013/02/11}{Make \cs{(}\cs{)} and \cs{[}\cs{]} -% robust} -% We start of with making \cs{(}\cs{)} and \cs{[}\cs{]} robust, -% unless the user explicitly asked us not to. -% \begin{macrocode} -\MH_if_boolean:nT {robustify}{ - \EQ_MakeRobust\( - \EQ_MakeRobust\) - \EQ_MakeRobust\[ - \EQ_MakeRobust\] -} -% \end{macrocode} +% ^^A \changes{v1.13}{2013/02/11}{Make \cs{(}\cs{)} and \cs{[}\cs{]} +% ^^A robust} +% ^^A We start of with making \cs{(}\cs{)} and \cs{[}\cs{]} robust, +% ^^A unless the user explicitly asked us not to. +% ^^A \changes{v1.28}{2021/12/31}{Removed robustifying \cs{(}\cs{)} and +% ^^A \cs{[}\cs{]} as this is now in the \LaTeX{} kernel.} +% ^^A % \begin{macrocode} +% ^^A \MH_if_boolean:nT {robustify}{ +% ^^A \EQ_MakeRobust\( +% ^^A \EQ_MakeRobust\) +% ^^A \EQ_MakeRobust\[ +% ^^A \EQ_MakeRobust\] +% ^^A } +% ^^A % \end{macrocode} % % % \section{Macros I got ideas for myself} @@ -3541,6 +3609,8 @@ colorlinks, % \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} +% \changes{1.28}{2022/01/01}{Added \cs{xlongrightarrow} and +% \cs{xlongleftarrow} as suggested in Issue \#12} % \begin{macrocode} \providecommand*\xleftrightarrow[2][]{% \ext@arrow 3095\MT_leftrightarrow_fill:{#1}{#2}} @@ -3578,6 +3648,13 @@ colorlinks, \arrowfill@\leftharpoondown\relbar\relbar} \def\MT_leftharpoonup_fill:{% \arrowfill@\leftharpoonup\relbar\relbar} +% \end{macrocode} +% 2022: added \verb+_fill:+ macros based upon \cs{longrightarrow} and \cs{longleftarrow} +% \begin{macrocode} +\def\MT_longrightarrow_fill:{% + \arrowfill@\relbar\relbar\longrightarrow} +\def\MT_longleftarrow_fill:{% + \arrowfill@\longleftarrow\relbar\relbar} \providecommand*\xrightharpoondown[2][]{% \ext@arrow 0359\MT_rightharpoondown_fill:{#1}{#2}} \providecommand*\xrightharpoonup[2][]{% @@ -3599,6 +3676,14 @@ colorlinks, $\ext@arrow 3095\MT_leftharpoondown_fill:{#1}{\phantom{#2}}$}% \kern-\wd0 \lower.22ex\box0}} % \end{macrocode} +% 2022: added \verb+\xlong...+ macros based upon \cs{longrightarrow} +% and \cs{longleftarrow} +% \begin{macrocode} +\providecommand*\xlongrightarrow[2][]{% + \ext@arrow 0359\MT_longrightarrow_fill:{#1}{#2}} +\providecommand*\xlongleftarrow[2][]{% + \ext@arrow 3095\MT_longleftarrow_fill:{#1}{#2}} +% \end{macrocode} % \end{macro} % \end{macro} % \end{macro} @@ -5349,12 +5434,55 @@ colorlinks, \def\@Aboxed#1\ENDDNE{% \ifnum0=`{}\fi \setbox \z@ \hbox{$\displaystyle#1{}\m@th$\kern\fboxsep \kern\fboxrule }% - \edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ \fboxsep - \the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}% + \edef\@tempa {\kern \wd\z@ &\kern -\the\wd\z@ +% \end{macrocode} +% The \verb|\fboxsep\the\fboxsep...| line ensures that you can use +% \verb|\fboxsep=10pt\Aboxed{...}| in a pinch. +% \begin{macrocode} + \fboxsep\the\fboxsep \fboxrule \the\fboxrule }\@tempa \boxed {#1#2}% } % \end{macrocode} % \end{macro} % +% \begin{macro}{\MakeAboxedCommand} +% \changes{1.28}{2022/01/01}{Added} +% At times users want macros equivalent to \cs{Aboxed} but with a +% different box as the base. So we provide one +% \begin{macrocode} +\newcommand\MakeAboxedCommand[2]{ + % #1: command to create + % #2: box command to use + \newcommand#1[1]{\let\bgroup{\romannumeral-`}% + \@nameuse{@@\MH_cs_to_str:N #1}##1&&\ENDDNE} + \@namedef{@@\MH_cs_to_str:N #1}##1&##2&##3\ENDDNE{% +% \end{macrocode} +% Instead of hardcoding the kerning of box rule and box sep, we record +% the width of an empty box and kern half of it. +% \begin{macrocode} + \settowidth\@tempdimc{#2{}}% + \ifnum0=`{}\fi \setbox \z@ + \hbox{$\displaystyle##1{}\m@th$\kern0.5\@tempdimc}% +% \end{macrocode} +% The \verb|\fboxsep\the\fboxsep...| line enables +% \verb|\fboxsep=10\Command{...&...}|. Of course only works for boxed +% that uses \cs{fboxsep} and \cs{fboxrule}. +% \begin{macrocode} + \edef\@tempa{\kern\wd\z@&\kern-\the\wd\z@% + \fboxsep\the\fboxsep \fboxrule \the\fboxrule}% + \@tempa% +% \end{macrocode} +% Instead of using \cs{boxed} directly, we mimick the definition of +% \cs{boxed} and should thus be able to use any box. +% \begin{macrocode} + #2{\m@th$\displaystyle ##1##2$}% + } +} + +% \end{macrocode} +% +% \end{macro} +% +% % \begin{macro}{\ArrowBetweenLines} % \changes{v1.05}{2008/06/05}{Added \cs{ArrowBetweenLines} as it % belongs here and not just in my \LaTeX book (daleif)} diff --git a/Master/texmf-dist/source/latex/mathtools/mathtools.ins b/Master/texmf-dist/source/latex/mathtools/mathtools.ins index dbc22bd44e7..81a5ef50c2a 100644 --- a/Master/texmf-dist/source/latex/mathtools/mathtools.ins +++ b/Master/texmf-dist/source/latex/mathtools/mathtools.ins @@ -12,6 +12,7 @@ %% 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.3c of this license or (at your option) any later diff --git a/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx b/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx index bf89bc9c887..8d967baf87a 100644 --- a/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx +++ b/Master/texmf-dist/source/latex/mathtools/mhsetup.dtx @@ -190,7 +190,7 @@ and the derived files % \cs{InternalSyntaxOn} which makes |_| and |:| letters and then % automatically restores the category codes at the end of the % package. This usually works fine but when you try to load -% \pkg{amstext} you will experience that \TeX{} goes into an +% \pkg{\mbox{amstext}} you will experience that \TeX{} goes into an % infinite loop. Packages containing code like % |\@for\@tempa:=\@tempb\do{...}| will not work correctly either, % thus we provide an alternative version here with the pair of @@ -207,7 +207,7 @@ and the derived files % The standard behavior of scanning for optional arguments in % \LaTeX{} allows any number of spaces preceding the optional % argument and that is not always good in math. For that reason -% \pkg{amsmath} makes sure that commands like |\\| disallows spaces +% \pkg{amsmath} makes sure that commands like |\\| disallow spaces % before the optional argument but at the same time it fails to % provide ``safe'' environments. What would you expect from the % following input? @@ -338,7 +338,7 @@ and the derived files % The whole idea is to provide programming tools that are convenient % but not yet widely available. I hope this'll be obsolete soon! % -% Firstly we setup a few helper functions. +% Firstly we set up a few helper functions. % \begin{macro}{\MH_let:NwN} % An alias for \cs{let}. % \begin{macrocode} @@ -354,8 +354,8 @@ and the derived files % \end{macrocode} % \end{macro} % \begin{macro}{\MH_let:cc} -% This one has takes a \cs{csname}-\cs{endcsname} name and \cs{let}s -% it to a another \cs{csname}-\cs{endcsname} name. To be used in +% This one takes a \cs{csname}-\cs{endcsname} name and \cs{let}s +% it to another \cs{csname}-\cs{endcsname} name. To be used in % constructions with weird characters like \texttt{*} or alike in % them and can take a \cs{global} prefix if wanted (we want that % later on). diff --git a/Master/texmf-dist/source/latex/mathtools/mhsetup.ins b/Master/texmf-dist/source/latex/mathtools/mhsetup.ins new file mode 100644 index 00000000000..edf6baa8244 --- /dev/null +++ b/Master/texmf-dist/source/latex/mathtools/mhsetup.ins @@ -0,0 +1,93 @@ +%% +%% This is file `mhsetup.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mhsetup.dtx (with options: `install') +%% +%% This is a generated file. +%% +%% Copyright (C) 2002-2007,2010 by Morten Hoegholm +%% Copyright (C) 2017-2019 by Lars Madsen +%% Copyright (C) 2020- by Lars Madsen, The LaTeX3 team +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either +%% version 1.3 of this license or (at your option) any later +%% version. The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of +%% LaTeX version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status "maintained". +%% +%% This Current Maintainer of this work is Lars Madsen +%% <daleif@math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools +%% +%% This work consists of the main source file mhsetup.dtx +%% and the derived files +%% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv. +%% +\input docstrip.tex +\Msg{************************************************************************} +\Msg{* Installation} +\Msg{* Package: mhsetup 2017/03/31 v1.3 mhsetup} +\Msg{************************************************************************} + +\keepsilent +\askforoverwritefalse + +\preamble + +This is a generated file. + +Copyright (C) 2002-2007,2010 by Morten Hoegholm +Copyright (C) 2017-2019 by Lars Madsen +Copyright (C) 2020- by Lars Madsen, The LaTeX3 team + +This work may be distributed and/or modified under the +conditions of the LaTeX Project Public License, either +version 1.3 of this license or (at your option) any later +version. The latest version of this license is in + http://www.latex-project.org/lppl.txt +and version 1.3 or later is part of all distributions of +LaTeX version 2005/12/01 or later. + +This work has the LPPL maintenance status "maintained". + +This Current Maintainer of this work is Lars Madsen +<daleif@math.au.dk>, The LaTeX3 team https://github.com/latex3/mathtools + +This work consists of the main source file mhsetup.dtx +and the derived files + mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv. + +\endpreamble + +\generate{% + \file{mhsetup.ins}{\from{mhsetup.dtx}{install}}% + \file{mhsetup.drv}{\from{mhsetup.dtx}{driver}}% + \usedir{tex/latex/mh}% + \file{mhsetup.sty}{\from{mhsetup.dtx}{package}}% +} + +\obeyspaces +\Msg{************************************************************************} +\Msg{*} +\Msg{* To finish the installation you have to move the following} +\Msg{* file into a directory searched by TeX:} +\Msg{*} +\Msg{* mhsetup.sty} +\Msg{*} +\Msg{* To produce the documentation run the file `mhsetup.drv'} +\Msg{* through LaTeX.} +\Msg{*} +\Msg{* Happy TeXing!} +\Msg{*} +\Msg{************************************************************************} + +\endbatchfile +\endinput +%% +%% End of file `mhsetup.ins'. |