summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-05-10 23:13:28 +0000
committerKarl Berry <karl@freefriends.org>2012-05-10 23:13:28 +0000
commita97524f5ad4cdfcb20d204b202c4b588dab91544 (patch)
tree2263ffb7a3df06623339797e12d7d5deeda9f270
parent70b47686cb689d8c5e4c6eecb58e7cd43240e92c (diff)
mh (10may12)
git-svn-id: svn://tug.org/texlive/trunk@26294 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/mh/README9
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn-technotes.pdfbin173559 -> 173598 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn.pdfbin514327 -> 543911 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/empheq.pdfbin305631 -> 306946 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/flexisym.pdfbin243083 -> 243526 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathstyle.pdfbin159236 -> 173367 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathtools.pdfbin372938 -> 412727 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mhsetup.pdfbin233716 -> 233716 bytes
-rw-r--r--Master/texmf-dist/source/latex/mh/breqn.dtx58
-rw-r--r--Master/texmf-dist/source/latex/mh/empheq.dtx36
-rw-r--r--Master/texmf-dist/source/latex/mh/flexisym.dtx10
-rw-r--r--Master/texmf-dist/source/latex/mh/mathstyle.dtx94
-rw-r--r--Master/texmf-dist/source/latex/mh/mathtools.dtx664
-rw-r--r--Master/texmf-dist/source/latex/mh/mhsetup.dtx8
-rw-r--r--Master/texmf-dist/tex/latex/mh/breqn.sty13
-rw-r--r--Master/texmf-dist/tex/latex/mh/cmbase.sym4
-rw-r--r--Master/texmf-dist/tex/latex/mh/empheq.sty5
-rw-r--r--Master/texmf-dist/tex/latex/mh/flexisym.sty4
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathpazo.sym4
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathptmx.sym4
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathstyle.sty14
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathtools.sty202
-rw-r--r--Master/texmf-dist/tex/latex/mh/mhsetup.sty4
-rw-r--r--Master/texmf-dist/tex/latex/mh/msabm.sym4
24 files changed, 910 insertions, 227 deletions
diff --git a/Master/texmf-dist/doc/latex/mh/README b/Master/texmf-dist/doc/latex/mh/README
index 05653d74d9d..2cc75849a53 100644
--- a/Master/texmf-dist/doc/latex/mh/README
+++ b/Master/texmf-dist/doc/latex/mh/README
@@ -1,6 +1,6 @@
The mh bundle
=============
-Morten Hoegholm (c) 2002-2010
+Morten cHoegholm (c) 2002-2011
email: mh.ctan@gmail.com
License: LaTeX Project Public License
@@ -12,7 +12,6 @@ The files in the mh bundle are:
mathtools.dtx
empheq.dtx
breqn-technotes.tex
- xfrac.dtx
and derived files. The derived files of each .dtx-file are listed
at the top of the respective .dtx-file.
@@ -96,14 +95,14 @@ xfrac
=====
A package for producing split level fractions in both text and
-math. The package requires expl3 and xpackages available on CTAN.
+math. This package started as a part of the MH bundle, but is not
+integrated into the l3packages bundle.
BUG REPORTS
===========
The bundle is maintained by:
- Morten Hoegholm <mh.ctan@gmail.com>
Lars Madsen <daleif@imf.au.dk>
Will Robertson <wspr81@gmail.com>
Joseph Wright <joseph.wright@morningstar2.co.uk>
@@ -111,4 +110,4 @@ The bundle is maintained by:
Please report bugs to the entire team.
===========
-This README file was last revised 2010/09/18.
+This README file was last revised 2012/05/10.
diff --git a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
index e10d390eb07..72ca38b115c 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/breqn.pdf b/Master/texmf-dist/doc/latex/mh/breqn.pdf
index 6d884469022..c82c8c94870 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/empheq.pdf b/Master/texmf-dist/doc/latex/mh/empheq.pdf
index 5cb19c37b08..342b483d2f7 100644
--- a/Master/texmf-dist/doc/latex/mh/empheq.pdf
+++ b/Master/texmf-dist/doc/latex/mh/empheq.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/flexisym.pdf b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
index 8cdc127d545..6faf5fdcf4c 100644
--- a/Master/texmf-dist/doc/latex/mh/flexisym.pdf
+++ b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
index 96ae08ea83d..5cfdec9db4d 100644
--- a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathtools.pdf b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
index 87d79ecbbdb..d0345ffd052 100644
--- a/Master/texmf-dist/doc/latex/mh/mathtools.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
index 8a5078d2a4b..df524b3240f 100644
--- a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mh/breqn.dtx b/Master/texmf-dist/source/latex/mh/breqn.dtx
index d1bc7151b99..1a29cd69d1f 100644
--- a/Master/texmf-dist/source/latex/mh/breqn.dtx
+++ b/Master/texmf-dist/source/latex/mh/breqn.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1997-2003 by Michael J. Downes
-% Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2007-2008 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -13,7 +13,7 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm,
+% This Current Maintainer of this work is
% Lars Madsen, Will Robertson and Joseph Wright.
%
% This work consists of the main source file breqn.dtx
@@ -68,7 +68,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: breqn 2008/07/28 v0.98 Breqn (MH)}
+\Msg{* Package: breqn 2012/05/10 v0.98b Breqn}
\Msg{************************************************************************}
\keepsilent
@@ -79,7 +79,7 @@
This is a generated file.
Copyright (C) 1997-2003 by Michael J. Downes
-Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2007-2008 by Morten Hoegholm
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -91,7 +91,7 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm,
+This Current Maintainers of this work is
Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file breqn.dtx
@@ -130,7 +130,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{breqn.drv}%
- [2008/07/28 v0.98 breqn (MH)]
+ [2012/05/10 v0.98b breqn]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -232,8 +232,10 @@ and the derived files
% \fi
%
% \title{The \pkg{breqn} package}
-% \date{2008/07/28 v0.98}
-% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
+% \date{2012/05/10 v0.98b}
+% \author{The breqn maintainers\thanks{The maintainers would like to thank
+% Morten H\o gholm for bringing \texttt{breqn} forward}
+% \\\texttt{mh.ctan@gmail.com}}
%
% \maketitle
% \begin{abstract}
@@ -251,16 +253,17 @@ and the derived files
% the \TeX\ world---Michael passed away in early 2003 at the age of
% only~44.
%
-% The American Mathematical Society has kindly allowed me to assume
-% maintainership of this part of his work and I wish to express my
-% gratitude to them and to Barbara Beeton in particular for providing
-% me with the files I needed.
+% The American Mathematical Society kindly allowed Morten H\o gholm to
+% assume maintainership of this part of his work and he wish to
+% express my gratitude to them and to Barbara Beeton in particular for
+% providing me with the files he needed.
%
-% I hope to continue Michael's work, thereby allowing users to create
+% MH hope to continue Michael's work, thereby allowing users to create
% more \emph{masterpieces of the publishing art} as I think he would
% have wanted.
%
-%
+% Following the July 2008 breqn release, breqn was left in the hands
+% of a maintenance team, while MH moved on with other projects.
%
% \section{Package loading}
%
@@ -1013,7 +1016,12 @@ and the derived files
% Declare package name and date.
% \begin{macrocode}
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{breqn}{2009/08/07}{0.98a}{Breaking equations}
+\ProvidesExplPackage{breqn}{2012/05/10}{0.98b}{Breaking equations}
+% \end{macrocode}
+% Regrettably, \pkg{breqn} is internally a mess, so we have to take
+% some odd steps.
+% \begin{macrocode}
+\ExplSyntaxOff
% \end{macrocode}
%
%
@@ -1514,6 +1522,7 @@ and the derived files
\splitfirstmark{\string\splitfirstmark:}%
\splitbotmark{\string\splitbotmark:}%
#1{\string#1}%
+ \@nil % for the \@car
\edef\@tempa{\expandafter\strip@prefix\meaning\@tempb}%
\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -4759,24 +4768,19 @@ and the derived files
% \end{macro}
%
%
+% \begin{macro}{\true@true@true}
% \begin{macro}{\true@false@true}
-% \begin{macrocode}
-\def\true@false@true{\fi\fi\iftrue\iffalse\iftrue}
-% \end{macrocode}
-% \end{macro}
-%
-%
+% \begin{macro}{\false@true@false}
% \begin{macro}{\false@false@false}
% \begin{macrocode}
+\def\true@true@true {\fi\fi\iftrue \iftrue \iftrue }
+\def\true@false@true {\fi\fi\iftrue \iffalse\iftrue }
+\def\false@true@false {\fi\fi\iffalse\iftrue \iffalse}
\def\false@false@false{\fi\fi\iffalse\iffalse\iffalse}
% \end{macrocode}
% \end{macro}
-%
-%
-% \begin{macro}{\false@true@false}
-% \begin{macrocode}
-\def\false@true@false{\fi\fi\iffalse\iftrue\iffalse}
-% \end{macrocode}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
%
diff --git a/Master/texmf-dist/source/latex/mh/empheq.dtx b/Master/texmf-dist/source/latex/mh/empheq.dtx
index 8f46877b052..8d598a56b02 100644
--- a/Master/texmf-dist/source/latex/mh/empheq.dtx
+++ b/Master/texmf-dist/source/latex/mh/empheq.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2002-2007 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -12,7 +12,8 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm.
+% This Current Maintainer of this work is
+% Lars Madsen, Will Robertson and Joseph Wright.
%
% This work consists of the main source file empheq.dtx
% and the derived files
@@ -76,7 +77,7 @@
This is a generated file.
-Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2002-2007 by Morten Hoegholm
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -88,7 +89,8 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm.
+This Current Maintainer of this work is
+Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file empheq.dtx
and the derived files
@@ -126,7 +128,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{empheq.drv}%
- [2007/12/03 v2.12 Emphasizing equations (MH)]
+ [2012/05/09 v2.13 Emphasizing equations]
\documentclass{ltxdoc}
\usepackage{mathpazo}
\usepackage[overload]{empheq}
@@ -356,7 +358,10 @@ and the derived files
% \title{The \pkg{empheq} package\thanks{This file has version number
% \fileversion, last revised \filedate.}\\
% Emphasizing equations in \LaTeXe}
-% \author{Morten H\o gholm}
+% \author{Lars Madsen, Will Robertson and Joseph
+% Wright\\ (maintainers)\thanks{The maintainers would like to thank
+% Morten H\o gholm for his contributions to this package}}
+%
% \date{\filedate}
%
% \maketitle
@@ -1141,6 +1146,23 @@ and the derived files
%
% \subsection{Support for \pkg{ntheorem}}\label{sec:ntheorem-support}
%
+% \changes{v2.13}{2012/05/09}{Added caveat}
+% \textbf{Caveat:} Due to an unfortunate interaction between \pkg{empheq} and
+% \pkg{ntheorem}, users may want to add
+% \begin{verbatim}
+% \usetagform{default}
+% \end{verbatim}
+% \emph{after} loading \pkg{ntheorem} otherwise the tags may be
+% placed wrong and any labels within the \env{empheq} environment may
+% 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
+% make sure to postpone this configuration until \emph{after} loading
+% \pkg{ntheorem}.
+%
+% \bigskip
+%
% \changes{v2.00}{2004/04/14}{Added description of the
% \opt{ntheorem} option}
% \changes{v1.05}{2004/02/16}{Added support for the end-of-theorem
@@ -1545,7 +1567,7 @@ and the derived files
% \section{Contact information}
%
% Should you have any feature request, suggestions, or bug reports
-% then feel free to contact me at
+% then feel free to contact us at
% \begin{quote}
% \email{mh.ctan@gmail.com}
% \end{quote}
diff --git a/Master/texmf-dist/source/latex/mh/flexisym.dtx b/Master/texmf-dist/source/latex/mh/flexisym.dtx
index 0f804a1d3fe..7b4df2f5abc 100644
--- a/Master/texmf-dist/source/latex/mh/flexisym.dtx
+++ b/Master/texmf-dist/source/latex/mh/flexisym.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1997-2003 by Michael J. Downes
-% Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2007-2008 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -13,7 +13,7 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm,
+% This Current Maintainer of this work is
% Lars Madsen, Will Robertson and Joseph Wright.
%
% This work consists of the main source file flexisym.dtx
@@ -84,7 +84,7 @@
This is a generated file.
Copyright (C) 1997-2003 by Michael J. Downes
-Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2007-2010 by Morten Hoegholm
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -96,7 +96,7 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm,
+This Current Maintainer of this work is
Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file flexisym.dtx
@@ -166,7 +166,7 @@ and the derived files
%
% \title{The \textsf{flexisym} package}
% \date{2008/08/08 v0.97a}
-% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
+% \author{Morten H\o gholm \\Maintainers: \texttt{mh.ctan@gmail.com}}
%
% \maketitle
%
diff --git a/Master/texmf-dist/source/latex/mh/mathstyle.dtx b/Master/texmf-dist/source/latex/mh/mathstyle.dtx
index 4e21d9853bc..a3d33a58efa 100644
--- a/Master/texmf-dist/source/latex/mh/mathstyle.dtx
+++ b/Master/texmf-dist/source/latex/mh/mathstyle.dtx
@@ -1,7 +1,7 @@
% \iffalse meta-comment
%
% Copyright (C) 1997-2003 by Michael J. Downes
-% Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2007-2008 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -13,7 +13,7 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm,
+% This Current Maintainer of this work is
% Lars Madsen, Will Robertson and Joseph Wright.
%
% This work consists of the main source file mathstyle.dtx
@@ -67,8 +67,7 @@
%<*install>
\input docstrip.tex
\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: mathstyle 2008/11/25 v0.88 Mathstyle (MH)}
+\Msg{* Installation for package: mathstyle}
\Msg{************************************************************************}
\keepsilent
@@ -79,7 +78,7 @@
This is a generated file.
Copyright (C) 1997-2003 by Michael J. Downes
-Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2007-2011 by Morten Hoegholm et al
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -91,7 +90,7 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm,
+This Current Maintainer of this work is
Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file mathstyle.dtx
@@ -127,10 +126,16 @@ and the derived files
%<*ignore>
\fi
%</ignore>
+%
+%<*driver>
+\ProvidesFile{mathstyle.drv}
+%</driver>
+%<package>\NeedsTeXFormat{LaTeX2e}
+%<package>\ProvidesPackage{mathstyle}
+%<*package|driver>
+ [2011/08/03 v0.90 Tracking mathstyle implicitly]
+%</package|driver>
%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{mathstyle.drv}%
- [2008/11/25 v0.88 mathstyle (MH)]
\documentclass{ltxdoc}
\CodelineIndex
\EnableCrossrefs
@@ -142,9 +147,10 @@ and the derived files
%</driver>
% \fi
%
+% \GetFileInfo{mathstyle.drv}
% \title{The \textsf{mathstyle} package}
-% \date{2008/08/13 v0.87}
-% \author{Morten H\o gholm \\\texttt{mh.ctan@gmail.com}}
+% \date{\filedate\quad\fileversion}
+% \author{Morten H\o gholm \\Maintainers: \texttt{mh.ctan@gmail.com}}
%
%
% \maketitle
@@ -199,17 +205,42 @@ and the derived files
% #1 {}\rlap{$\m@th \currentmathstyle {#2}$}}
% \end{verbatim}
%
+% \subsection{Package options}
%
+% This package has one set of options affecting the \verb|_| and \verb|^| characters:
%
-% \StopEventually{}
-% \part*{Implementation}
+% \begin{itemize}
+% \item\verb|\usepackage[mathactivechars]{mathstyle}|
+%
+% This is the default behaviour. Here, \verb|_| and \verb|^| are made into harmless
+% characters in text mode and behave as expected (for entering sub/superscript) when
+% inside math mode.
+% Certain code that assumes the catcodes of these characters may get confused about
+% this; see below for a possible fix.
%
+% \item\verb|\usepackage[activechars]{mathstyle}|
%
+% With this option, \verb|_| and \verb|^| are made into active characters for
+% entering sub/superscript mode in all cases---therefore, in text mode they will
+% produce a regular error (`Missing \$ inserted') indicating they are being used
+% out of place.
+%
+% \item\verb|\usepackage[noactivechars]{mathstyle}|
+%
+% This is the option most like to solve any compatibility problems. Here,
+% \verb|_| and \verb|^| retain their regular catcodes at all times and behave
+% in their default fashion. \textbf{However}, certain other features of this
+% package (such as \cs{currentmathstyle} inside a subscript) will then fail
+% to work, so only use this option as a last resort.
+% \end{itemize}
+%
+% \StopEventually{}
+% \part*{Implementation}
%
% \begin{macrocode}
%<*package>
-\ProvidesPackage{mathstyle}[2010/11/17 v0.89]
% \end{macrocode}
+%
% \begin{macro}{\@saveprimitive}
% A straight copy from \pkg{breqn}, see implementation details
% there. Of course, with a recent pdf\TeX\ (v1.40+), one can just
@@ -238,6 +269,7 @@ and the derived files
\splitfirstmark{\string\splitfirstmark:}%
\splitbotmark{\string\splitbotmark:}%
#1{\string#1}%
+ \@nil % for the \@car
\edef\@tempa{\expandafter\strip@prefix\meaning\@tempb}%
\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -251,10 +283,27 @@ and the derived files
}
% \end{macrocode}
% \end{macro}
-% Do initial \cs{chardef} of \cs{mathstyle}.
+%
+% \begin{macro}{\everydisplay}
+% We need to keep track of whether we're in inline or display maths, and the only
+% way to do that is to add a switch inside \verb|\everydisplay|.
+% We act sensibly and preserve any of the previous contents of that token register
+% before adding our own code here.
% \begin{macrocode}
-\chardef\mathstyle=\z@
+\everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\mathstyle}
+% A counter for the math style: 0--display, 1--text, 2--script, 3--scriptscript.
+% The logic is that display maths will explicitly
+% set \verb|\mathstyle| to zero (see above), so by default it is set to the
+% `text' maths style.
+% \begin{macrocode}
+\chardef\mathstyle\@ne
+% \end{macrocode}
+% \end{macro}
+%
% Save the four style changing primitives, \cs{mathchoice} and the
% fraction commands.
% \begin{macrocode}
@@ -315,6 +364,8 @@ and the derived files
\def\sb#1{\mathsub{\protect\subsupstyle#1}}%
\def\sp#1{\mathsup{\protect\subsupstyle#1}}%
% \end{macrocode}
+%
+% \begin{macro}{\mathchoice}
% \cs{mathchoice} is now just a switch. Note that this redefinition
% does not allow the arbitrary \meta{filler} of the \TeX\
% primitive. Very rarely used anyway.
@@ -338,17 +389,26 @@ and the derived files
\providecommand\@thirdoffour[4]{#3}
\providecommand\@fourthoffour[4]{#4}
% \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\genfrac}
% The fractions. Note that this uses the same names as in
% \pkg{amsmath}. Much the same except here they call \cs{fracstyle}.
% \begin{macrocode}
\DeclareRobustCommand\genfrac[6]{%
- {\fracstyle #1%
+ {#1\fracstyle
{\begingroup #5\endgroup
\csname @@\ifx\maxdimen#4\maxdimen over\else above\fi
\if @#2@\else withdelims\fi\endcsname #2#3#4\relax
#6}%
}%
}
+% \end{macrocode}
+% \changes{v0.90}{2011/08/03}{\cs{fracstyle} must be called \emph{after}
+% changing to the required style}
+% \end{macro}
+%
+% \begin{macrocode}
\renewcommand{\frac}{\genfrac{}{}{}{}}
\providecommand{\dfrac}{}
\providecommand{\tfrac}{}
diff --git a/Master/texmf-dist/source/latex/mh/mathtools.dtx b/Master/texmf-dist/source/latex/mh/mathtools.dtx
index ef5dea37965..6c76f41d408 100644
--- a/Master/texmf-dist/source/latex/mh/mathtools.dtx
+++ b/Master/texmf-dist/source/latex/mh/mathtools.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2004-2011 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2004-2011 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -12,7 +12,8 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm.
+% This Current Maintainer of this work is
+% Lars Madsen, Will Robertson and Joseph Wright
%
% This work consists of the main source file mathtools.dtx
% and the derived files
@@ -66,7 +67,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathtools 2011/04/06 v1.11}
+\Msg{* Package: mathtools 2012/05/10 v1.12}
\Msg{************************************************************************}
\keepsilent
@@ -76,7 +77,7 @@
This is a generated file.
-Copyright (C) 2002-2011 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2002-2011 by Morten Hoegholm
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -88,7 +89,7 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm,
+This Current Maintainer of this work is
Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file mathtools.dtx
@@ -127,7 +128,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathtools.drv}%
- [2011/04/06 v1.11 mathematical typesetting tools]
+ [2012/05/10 v1.12 mathematical typesetting tools]
\documentclass{ltxdoc}
\IfFileExists{fourier.sty}{\usepackage{fourier}}{}
\addtolength\marginparwidth{-25pt}
@@ -172,6 +173,7 @@ and the derived files
}%
}
+
\newcommand*\ProvidedBy[2]{%
\hskip1sp
\marginpar{%
@@ -190,6 +192,16 @@ and the derived files
}%
}
+\newcommand*\tsxPosting[2]{%
+ \hskip1sp
+ \marginpar{%
+ \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
+ \strut Posted on \texttt{\small tex.stackexchange.com} \\#1\\#2%
+ }%
+ }%
+}
+
+
\expandafter\def\expandafter\MakePrivateLetters\expandafter{%
\MakePrivateLetters \catcode`\_=11\relax
}
@@ -258,13 +270,14 @@ and the derived files
%
% \GetFileInfo{mathtools.drv}
%
-% \CheckSum{2584}
+% \CheckSum{2836}
%
% \title{The \pkg{mathtools} package\thanks{This file has version number
% \fileversion, last revised \filedate.}}
%
-% \author{Morten H\o gholm, Lars Madsen,\\ Will Robertson and Joseph
-% Wright\\ (maintainers)}
+% \author{Lars Madsen, Will Robertson and Joseph
+% Wright\\ (maintainers)\thanks{The maintainers would like to thank
+% Morten H\o gholm for his contributions to this package}}
% \date{\filedate}
%
% \maketitle
@@ -275,7 +288,7 @@ and the derived files
% 1)~correct various bugs/defeciencies 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 underbraket, or entirely new
+% typesetting a prescript or an underbracket, or entirely new
% display math constructs such as a \env{multlined} environment.
% \end{abstract}
%
@@ -358,7 +371,7 @@ and the derived files
% [v] = 200
% \end{gathered}
% \]
-% Yes, the \texttt[p] has been gobbled without any warning
+% Yes, the \texttt{[p]} has been gobbled without any warning
% whatsoever.\footnote{\pkg{amsmath} thought the \texttt[p] was an
% optional argument, checked if it was \texttt{t} or \texttt{b} and
% when both tests failed, assumed it was a \texttt{c}.} This is
@@ -386,7 +399,7 @@ and the derived files
% \begin{codesyntax}
% \SpecialUsageIndex{\mathtoolsset}\cs{mathtoolsset}\marg{key val list}
% \end{codesyntax}
-% Many of the tools shown in this manual can be turned on and off be
+% Many of the tools shown in this manual can be turned on and off by
% setting a switch to either true or false. In all cases it is done
% with the command \cs{mathtoolsset}. A typical use could be something like
% \begin{verbatim}
@@ -446,7 +459,7 @@ and the derived files
% these macros I find it better to read the article; an online
% version can be found at
% \begin{quote}
-% \url{http://www.tug.org/TUboat/Articles/tb22-4/tb72perlS.pdf}
+% \url{http://www.tug.org/TUGboat/Articles/tb22-4/tb72perlS.pdf}
% \end{quote}
% Note that the definitions shown in the article do not exactly
% match the definitions in \pkg{mathtools}. Besides providing an
@@ -650,6 +663,8 @@ and the derived files
% command \cs{adjustlimits} is useful in these cases, as you can
% just put it in front of these consecutive operators and it'll make
% the limits line up.
+% \medskip\par\noindent
+% \begin{minipage}{\textwidth}
% \begin{verbatim}
% \[
% \text{a)} \adjustlimits\lim_{n\to\infty} \max_{p\ge n} \quad
@@ -658,7 +673,8 @@ and the derived files
% \text{d)} \adjustlimits\limsup_{n\to\infty} \max_{p\ge n}
% \]
% \end{verbatim}
-% \[
+% \end{minipage}
+% \[
% \text{a)} \adjustlimits\lim_{n\to\infty} \max_{p\ge n} \quad
% \text{b)} \adjustlimits\lim_{n\to\infty} \max_{p^2\ge n} \quad
% \text{c)} \adjustlimits\lim_{n\to\infty} \sup_{p^2\ge nK} \quad
@@ -667,6 +683,42 @@ and the derived files
% The use of \cs{sb} instead of \texttt{\_} is allowed.
%
%
+% \subsubsection{Swapping space above \texorpdfstring{\AmS}{AMS} display math environments }
+% \label{sec:swapping}
+%
+% One feature that the plain old \env{equation} environment has that
+% the \AmS\ environments does not (because of thechnical 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
+% \begin{codesyntax}
+% \SpecialUsageIndex{\SwapAboveDisplaySkip}
+% \cs{SwapAboveDisplaySkip}
+% \end{codesyntax}
+% as the very first content within an \AmS\ display math
+% environment. It will then issue an \cs{abovedisplayshortskip}
+% instead of the normal \cs{abovedisplayskip}.
+%
+% Note it will not work with the \env{equation} or \env{multline} environments.
+%
+% Here is an example of the effect
+% \begin{verbatim}
+% \noindent\rule\textwidth{1pt}
+% \begin{align*} A &= B \end{align*}
+% \noindent\rule\textwidth{1pt}
+% \begin{align*}
+% \SwapAboveDisplaySkip
+% A &= B
+% \end{align*}
+% \end{verbatim}
+% \noindent\rule\textwidth{1pt}
+% \begin{align*} A &= B \end{align*}
+% \noindent\rule\textwidth{1pt}
+% \begin{align*}
+% \SwapAboveDisplaySkip
+% A &= B
+% \end{align*}
+%
%
% \subsection{Controlling tags}
%
@@ -732,6 +784,13 @@ and the derived files
% \usetagform{default}
% \end{verbatim}
%
+% \changes{v1.12}{2012/05/09}{Added caveat}
+% \noindent\textbf{Caveat regarding \pkg{ntheorem}}: If you like to
+% change the appearence of the tags \emph{and} you are also using the
+% \pkg{ntheorem} package, then please postpone the change of
+% appearance until \emph{after} loading \pkg{ntheorem}. (In order to
+% do its thing \pkg{ntheorem} has to mess with the tags\dots)
+%
% \subsubsection{Showing only referenced tags}
%
% \begin{codesyntax}
@@ -825,21 +884,23 @@ and the derived files
% Note that this feature only works if you use \cs{eqref} or
% \cs{refeq} to reference your equations.
%
-% When using \key{showonlyrefs} it might be usefull to be able to
-% actually add a few equation numbers without directly refering to
+% When using \key{showonlyrefs} it might be useful to be able to
+% actually add a few equation numbers without directly referring to
% them.
% \begin{codesyntax}
% \SpecialUsageIndex{\noeqref}\cs{noeqref}\marg{label,label,\dots}
% \end{codesyntax}
% \FeatureRequest{Rasmus Villemoes}{2008/03/26}
-% The syntax is somewhat similar to \cs{nocite}.
+% The syntax is somewhat similar to \cs{nocite}. If a label in the
+% list is undefined we will throw a warning in the same manner as
+% \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
% allowing formulas to be typeset close to or over the equation
% number. Currently no general fix is known, other than making sure
-% that ones formulas are not long enough to touch the equation
+% that one's formulas are not long enough to touch the equation
% number.
%
% To make a long story stort, amsmath typesets its math environments
@@ -848,15 +909,15 @@ and the derived files
% 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 refered~to. To determine
+% depend 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 refered to) and therefore
+% always zero (because no label equals not referred to) and therefore
% the typesetting phase does not take the equation number into
% account.
%
% \medskip\noindent\textbf{BUG 2:} Currently there is a bug between
-% \key{showonlyrefs} and the \pkg{ntheorem} package, then the
+% \key{showonlyrefs} and the \pkg{ntheorem} package, when the
% \pkg{ntheorem} option \key{thmmarks} is active. The shown equation
% numbers may come out wrong (seems to be multiplied by 2). The
% easiest fix is to add the following line
@@ -903,7 +964,7 @@ and the derived files
% extensible arrows are the only two of their kind defined by
% \pkg{amsmath}, but luckily \pkg{mathtools} helps with that. The
% extensible arrow-like symbols in \pkg{mathtools} follow the same
-% naming scheme as the ones in \pkg{amsmath} so to get an extensible
+% naming scheme as the one's in \pkg{amsmath} so to get an extensible
% \cs{Leftarrow} you simply do a
% \begin{verbatim}
% \[
@@ -991,7 +1052,7 @@ and the derived files
% \mathop{\thinboxed[blue]{\sum}}_{n}
% \mathop{\thinboxed[blue]{\LaTeXunderbrace{\thinboxed[green]{foof}}}}_{zzz}
% \]
-% \normalsize Now there's to little space between the brace and the
+% \normalsize Now there's too little space between the brace and the
% $zzz$ and also too little space between the brace and the $foof$.
% If you use Computer Modern you'll actually see that the $f$
% overlaps with the brace! Let's try in \cs{footnotesize}:
@@ -1122,8 +1183,8 @@ and the derived files
% the default is \cs{,}.
%
% As an extra trick the fences will behave as open and closing fences
-% inconstract to their auto-scaling nature.\footnote{\cs{left} and
-% \cs{right} does \emph{not} produce open an closing fences, thus
+% 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.}
%
@@ -1291,6 +1352,21 @@ and the derived files
% The environments \env{rcases}, \env{rcases*}, \env{drcases} and
% \env{drcases*} are equivalent to \env{cases} and \env{dcases}, but
% here the brace is placed on the right instead of on the left.
+% \begin{verbatim}
+% \[
+% \begin{rcases*}
+% x^2 & for $x>0$\\
+% x^3 & else
+% \end{rcases*} \quad \Rightarrow \cdots
+% \]
+% \end{verbatim}
+% \[
+% \begin{rcases*}
+% x^2 & for $x>0$\\
+% x^3 & else
+% \end{rcases*} \quad \Rightarrow\cdots
+% \]
+%
%
% \subsubsection{Emulating indented lines in alignments}
% \begin{codesyntax}
@@ -1298,7 +1374,7 @@ and the derived files
% \end{codesyntax}
% \ProvidedBy{Lars Madsen}{2008/06/05}
% In \cite{Swanson}, Ellen Swanson recommends that when ever one has
-% a long displayed formula, spannig several lines, and it is
+% 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 2em
@@ -1341,13 +1417,20 @@ and the derived files
%
% The \texttt{amsmath} package provie the \cs{boxed} macro to box
% material in math mode. But this of course will not work if the box
-% should cross an alignment point. We provide a macro that can.
+% should cross an alignment point. We provide a macro that
+% can.\footnote{Note that internally \cs{Aboxed} does use \cs{boxed}.}
% \hskip1sp
% \marginpar{%
% \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
% \strut Evolved from a request by\\Merciadri Luca\\
% 2010/06/28\\on comp.text.tex%
-% }
+% }\strut
+% }%
+% \marginpar{\strut\\%
+% \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
+% \strut Reimplemented by\\Florent Chervet (GL) \\
+% 2011/06/11\\on comp.text.tex%
+% }\strut
% }%
% \begin{codesyntax}
% \SpecialEnvIndex{\Aboxed}\cs{Aboxed}\marg{left hand side
@@ -1365,10 +1448,28 @@ and the derived files
% \Aboxed{ f(x) & = \int h(x)\, dx} \\
% & = 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
+% \begin{verbatim}
+% \begin{align*}
+% \setlength\fboxsep{1em}
+% \Aboxed{ f(x) &= 0 } & \Aboxed{ g(x) &= b} \\
+% \Aboxed{ h(x) } & \Aboxed{ i(x) }
+% \end{align*}
+% \end{verbatim}
+% \begin{align*}
+% \setlength\fboxsep{1em}
+% \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
+% immediately after it.
%
% \subsubsection{Adding arrows between lines in an alignment}
%
+% This first macro is a bit misleading, it is only intended to be
+% used in combination with the \env{alignat(*)} environment.
% \begin{codesyntax}
% \SpecialEnvIndex{\ArrowBetweenLines}\cs{ArrowBetweenLines}\oarg{symbol}\\
% \SpecialEnvIndex{\ArrowBetweenLines*}\cs{ArrowBetweenLines*}\oarg{symbol}
@@ -1381,20 +1482,21 @@ and the derived files
% }
% }%
% To add, say $\Updownarrow$ between two lines in an alignment use
-% \cs{ArrowBetweenLines} and the \env{alignat} environment:
+% \cs{ArrowBetweenLines} and the \env{alignat} environment (note the
+% extra pair of \texttt{\&}'s in front):
% \begin{verbatim}
-% \begin{alignat*}{2}
+% \begin{alignat}{2}
% && \framebox[1.5cm]{} &= \framebox[3cm]{}\\
% \ArrowBetweenLines % \Updownarrow is the default
% && \framebox[1.5cm]{} &= \framebox[2cm]{}
-% \end{alignat*}
+% \end{alignat}
% \end{verbatim}
% resulting in
-% \begin{alignat*}{2}
+% \begin{alignat}{2}
% && \framebox[1.5cm]{} &= \framebox[3cm]{}\\
% \ArrowBetweenLines
% && \framebox[1.5cm]{} &= \framebox[2cm]{}
-% \end{alignat*}
+% \end{alignat}
% Note the use of \verb+&&+ starting each \emph{regular} line of
% math. For adding the arrow on the right, use
% \cs{ArrowBetweenLines*}\oarg{symbol}, and end each line of math
@@ -1457,7 +1559,7 @@ and the derived files
% & = d
% \end{align*}
% Thus \verb?\vdotswithin{=}? create a box corersponding to
-% \verb?{}={}? and typeset a $\vdots$ centered inside it. When doing
+% \verb?{}={}? and typeset 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.
%
@@ -1496,7 +1598,7 @@ and the derived files
% indicated. Their original values are \verb?2.15\origjot? and
% \verb?\origjot? respectively (\verb?\origjot? is usually 3pt).
%
-% \subsection{Short intertext}
+% \subsection{Intertext and short intertext}
%
%
% \begin{codesyntax}
@@ -1504,7 +1606,7 @@ and the derived files
% \end{codesyntax}
% \cttPosting{Gabriel Zachmann and Donald Arseneau}{2000/05/12--13}
% \pkg{amsmath} provides the command \cs{intertext} for interrupting
-% a multi line display while still maintaining the alignment points.
+% a multiline display while still maintaining the alignment points.
% However the spacing often seems quite excessive as seen below.
% \begin{verbatim}
% \begin{align}
@@ -1530,9 +1632,57 @@ and the derived files
% c&=d
% \end{align}
%
+% \noindent
+% It turns out that both \cs{shortintertext} and the original
+% \cs{intertext} from \pkg{amsmath} has a slight problem. If we use
+% the \env{spreadlines} (see section~\ref{sec:spread}) to open up
+% the equations in a multiline calculation, then this opening up
+% value also applies to the spacing above and below the original
+% \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 with out the original \cs{intertext}
+% and \cs{shortintertext}.
+% \begin{verbatim}
+% % the original \intertext and \shortintertext
+% \mathtoolsset{original-intertext,original-shortintertext}
+% \newcommand\myline{\par\noindent\rule{\textwidth}{1mm}}
+% \myline
+% \begin{spreadlines}{1em}
+% \begin{align*}
+% AA\\ BB\\ \intertext{\myline}
+% AA\\ BB\\ \shortintertext{\myline}
+% AA\\ BB
+% \end{align*}
+% \end{spreadlines}
+% \myline
+% \end{verbatim}
%
+% We now fix this internaly for both \cs{intertext} and
+% \cs{shortintertext}, plus we add the posibility to fine tune
+% spacing around these constructions. The original versions can be
+% brought back using the \texttt{original-x} keys below.
+% \begin{codesyntax}
+% \SpecialUsageIndex{\intertext}\cs{intertext}\marg{text}\\
+% \SpecialUsageIndex{\shortintertext}\cs{shortintertext}\marg{text}\\
+% \SpecialKeyIndex{original-intertext}$\key{original-intertext}=\texttt{true}\vert\texttt{false}$ \quad(default: \texttt{false})\\
+% \SpecialKeyIndex{original-shortintertext}$\key{original-shortintertext}=\texttt{true}\vert\texttt{false}$
+% \quad(default: \texttt{false})\\
+% \SpecialKeyIndex{above-intertext-dim}$\key{above-intertext-dim}=\meta{dimen}$ \quad(default: 0pt)\\
+% \SpecialKeyIndex{below-intertext-dim}$\key{below-intertext-dim}=\meta{dimen}$ \quad(default: 0pt)\\
+% \SpecialKeyIndex{above-shortintertext-dim}$\key{above-shortintertext-dim}=\meta{dimen}$ \quad(default: 3pt)\\
+% \SpecialKeyIndex{below-shortintertext-dim}$\key{below-shortintertext-dim}=\meta{dimen}$ \quad(default: 3pt)
+% \end{codesyntax}
+% The updated \cs{shortintertext} will look like the original version
+% unless for areas with an enlarged \cs{jot} value (see for example
+% the \env{spreadlines}, section~\ref{sec:spread}). Whereas \cs{intertext}
+% will have a slightly smaller value above and below (corresponding
+% to about 3pt less space above and below), the spacing around
+% \cs{intertext} should now match the normal spacing going into and
+% out of an \env{align}.
%
-%
+% \textbf{Tip:} \cs{intertext} and \cs{shortintertext} also works
+% within \env{gather}.
%
% \subsection{Paired delimiters}
%
@@ -1630,22 +1780,22 @@ and the derived files
% More interestingly we can refer to the size inside the
% \meta{code}. Here we do a weird three argument `braket'
% \begin{verbatim}
-% \DeclarePairedDelimiterX\brakket[3]{\langle}{\rangle}%
+% \DeclarePairedDelimiterX\braket[3]{\langle}{\rangle}%
% {#1\,\delimsize\vert\,#2\,\delimsize\vert\,#3}
% \end{verbatim}
% Then we can get
% \DeclarePairedDelimiterX\innerp[2]{\langle}{\rangle}{#1,#2}
-% \DeclarePairedDelimiterX\brakket[3]{\langle}{\rangle}%
+% \DeclarePairedDelimiterX\braket[3]{\langle}{\rangle}%
% {#1\,\delimsize\vert\,#2\,\delimsize\vert\,#3}
% \begin{verbatim}
% \[
% \innerp*{A}{ \frac{1}{2} } \quad
-% \brakket[\Big]{B}{\sum_{k} f_k}{C}
+% \braket[\Big]{B}{\sum_{k} f_k}{C}
% \]
% \end{verbatim}
% \[
% \innerp*{A}{ \frac{1}{2} } \quad
-% \brakket[\Big]{B}{\sum_{k}}{C}
+% \braket[\Big]{B}{\sum_{k}}{C}
% \]
% \iffalse
% \bigskip
@@ -1669,6 +1819,38 @@ and the derived files
% is a feature of the \cs{left}\dots\cs{right} construction).
% \fi
%
+%
+% \subsubsection{Expert use}
+%
+% Within the starred version of \cs{DeclarePairedDelimiter} and
+% \cs{DeclarePairedDelimiterX} we make a few changes such that the
+% 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 gab between
+% '$\sin$' and '('. In some special cases it may be useful to be
+% able to tinker with the behavior.
+% \begin{codesyntax}
+% \SpecialUsageIndex{\reDeclarePairedDelimiterInnerWrapper}\cs{reDeclarePairedDelimiterInnerWrapper}\marg{macro name}\marg{\textnormal{\texttt{star}} or \textnormal{\texttt{nostar}}}\marg{code}
+% \end{codesyntax}
+% Internally several macros are created, including two call backs
+% that take care of the formatting. There is one internal macro for
+% the starred version, labeled \texttt{star}, the other one is
+% labeled \texttt{nostar}. Within \meta{code}, \texttt{\#1} will be
+% replaced by the scaled left fence, \texttt{\#3} the corresponding
+% scaled right fence, and \texttt{\#2} the stuff in between. For
+% example, here is how one might turn the content into \cs{mathinner}:
+% \begin{verbatim}
+% \DeclarePairedDelimiter\abs\lvert\rvert
+% \reDeclarePairedDelimiterInnerWrapper\abs{star}{#1#2#3}
+% \reDeclarePairedDelimiterInnerWrapper\abs{nostar}{\mathinner{#1#2#3}}
+% \end{verbatim}
+% The default values for the call backs corresponds to
+% \begin{verbatim}
+% star: \mathopen{}\mathclose\bgroup #1#2\aftergroup\egroup #3
+% nostar: \mathopen{#1}#2\mathclose{#3}
+% \end{verbatim}
+%
+%
% \subsection{Special symbols}
%
% This part of the manual is about special symbols. So far only one
@@ -1728,7 +1910,7 @@ and the derived files
% \medskip
% \noindent\textbf{Warning:} \texttt{centercolon} \emph{does not}
% work with languages that make use of an active colon, most notably
-% French. Sadly the \texttt{babel} package does not distinguish
+% \emph{French}. Sadly the \texttt{babel} package does not distinguish
% between text and math when it comes to active characters. Nor does
% it provide any hooks to deal with math. So currently no general
% solution exists for this problem.
@@ -1781,7 +1963,8 @@ and the derived files
% \SpecialUsageIndex{\bigtimes}\cs{bigtimes}
% \end{codesyntax}
%
-% \emph{Note:} that these symbols are constructed via
+% \noindent
+% \textbf{Note:} that 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
@@ -1914,7 +2097,8 @@ and the derived files
% \myisotope{A}{Z}{X}\to \myisotope{A-4}{Z-2}{Y}+
% \myisotope{4}{2}{\alpha}
% \]
-%
+% (Though a package like \pkg{mhchem} might be more suitable for this
+% type of material.)
%
% \subsection{Declaring math sizes}
%
@@ -1935,7 +2119,7 @@ and the derived files
% been fixed in \LaTeX, this fix will be removed from
% \pkg{mathtools}.
%
-% \subsection{Spreading equations}
+% \subsection{Spreading equations}\label{sec:spread}
%
% \begin{codesyntax}
% \SpecialEnvIndex{spreadlines}
@@ -1943,7 +2127,7 @@ and the derived files
% \cs{end}\arg{spreadlines}
% \end{codesyntax}
% \cttPosting{Michael J.~Downes}{2002/10/17}
-% The spacing between lines in a multi line math environment such as
+% The spacing between lines in a multiline math environment such as
% \env{gather} is governed by the dimension \cs{jot}. The
% \env{spreadlines} environment takes one argument denoting the
% value of \cs{jot} inside the environment:
@@ -2049,7 +2233,7 @@ and the derived files
% \SpecialUsageIndex{\splitdfrac}\cs{splitdfrac}\marg{numer}\marg{denom}
% \end{codesyntax}
% \cttPosting{Michael J.~Downes}{2001/12/06}
-% These commands provide split fractions e.g., multi line fractions:
+% These commands provide split fractions e.g., multiline fractions:
% \begin{verbatim}
% \[
% a=\frac{
@@ -2213,7 +2397,7 @@ and the derived files
% \begin{macrocode}
%<*package>
\ProvidesPackage{mathtools}%
- [2011/04/06 v1.11 mathematical typesetting tools]
+ [2012/04/24 v1.12 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}}
@@ -2410,7 +2594,9 @@ and the derived files
% \end{macrocode}
% We test if the equation was labelled. We already know if it was
% tagged manually. Have to watch out for \TeX\ inserting a blank line
-% so do not let the tag have width zero.
+% so do not let the tag have width zero. Rememeber
+% \cs{@safe@activestrue/false} in order to handle active chars in labels.
+% \changes{v1.12}{2012/04/24}{Added \cs{@safe@activestrue/false}}
% \begin{macrocode}
\if_meaning:NN \df@label\@empty
\MH_if_boolean:nTF {manual_tag}% this was \MH_if_boolean:nT before
@@ -2422,14 +2608,27 @@ and the derived files
\MH_if_boolean:nTF {manual_tag}
{ \MH_if_boolean:nTF {show_manual_tags}
{ \MT_prev_tagform:n {#1} }
- { \@ifundefined{MT_r_\df@label}
- { }
+ { \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
+% \end{macrocode}
+% Next we need to remember to deactivate the manual tags switch. This
+% is usually done using \verb|\MT_extended_maketag:n|, but this is not
+% the case if the show manual tags is false and the manual tag is not
+% referred to.
+% \changes{v1.12}{2011/06/08}{Added the falsification of manual tag
+% when show manual tags is off and maual tag is not referred to}
+% \begin{macrocode}
+ { \global\MH_set_boolean_F:n {manual_tag} }
{ \MT_prev_tagform:n {#1} }
+ \@safe@activesfalse
}
}
- { \@ifundefined{MT_r_\df@label}
+ {
+ \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
{ }
{ \refstepcounter{equation}\MT_prev_tagform:n {#1} }
+ \@safe@activesfalse
}
\fi:
\global\MH_set_boolean_T:n {raw_maketag}
@@ -2438,6 +2637,7 @@ and the derived files
% \end{macro}
% \begin{macro}{\MT_extended_maketag:n}
% The extended version of \cs{maketag@@@}.
+% \changes{v1.12}{2012/04/24}{Added \cs{@safe@activestrue/false}}
% \begin{macrocode}
\def\MT_extended_maketag:n #1{
\ifx\df@label\@empty
@@ -2447,16 +2647,18 @@ and the derived files
{
\MH_if_boolean:nTF {show_manual_tags}
{ \MT_maketag:n {#1} }
- { \@ifundefined{MT_r_\df@label}
+ { \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
{ }
{ \MT_maketag:n {#1} }
+ \@safe@activesfalse
}
}
{ \MT_maketag:n {#1} }
\fi:
% \end{macrocode}
% As this function is always called we let it set the marker for a manual
-% tag false when exiting.
+% tag false when exiting (well actually not true, see above).
% \begin{macrocode}
\global\MH_set_boolean_F:n {manual_tag}
}
@@ -2593,19 +2795,45 @@ and the derived files
%
% \begin{macro}{\noeqref}
% \changes{v1.04}{2008/03/26}{Added \cs{noeqref} (daleif)}
-% Macro for adding numbers to non-refered equations. Syntax similar
+% \changes{v1.12}{2012/04/20}{Labels containing active chars (babel)
+% are now allowed}
+% \changes{v1.12}{2012/04/24}{\cs{noeqref} will now make a reference
+% warning if users use undefined labels in \cs{noeqref}, requested
+% by Tue Christensen}
+% Macro for adding numbers to non-referred equations. Syntax similar
% to \cs{nocite}.
% \begin{macrocode}
\MHInternalSyntaxOff
\newcommand\noeqref[1]{\@bsphack
\@for\@tempa:=#1\do{%
+ \@safe@activestrue%
\edef\@tempa{\expandafter\@firstofone\@tempa}%
+ \@ifundefined{r@\@tempa}{%
+ \protect\G@refundefinedtrue%
+ \@latex@warning{Reference `\@tempa' on page \thepage \space
+ undefined (\string\noeqref)}%
+ }{}%
\if@filesw\protected@write\@auxout{}%
- {\string\MT@newlabel{\@tempa}}\fi}
+ {\string\MT@newlabel{\@tempa}}\fi%
+ \@safe@activesfalse}
\@esphack}
-\MHInternalSyntaxOn
+
% \end{macrocode}
% \end{macro}
+%
+% \begin{macro}{\@safe@activestrue}
+% \begin{macro}{\@safe@activesfalse}
+% These macros are provided by babel. We \emph{provide} them here,
+% just to make sure they exist.
+% \begin{macrocode}
+\providecommand\@safe@activestrue{}%
+\providecommand\@safe@activesfalse{}%
+
+\MHInternalSyntaxOn
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
%
% \subsection{Extensible arrows etc.}
%
@@ -3234,6 +3462,41 @@ and the derived files
%
% \subsection{Paired delimiters}
%
+% \changes{v1.13}{2012/05/10}{Extended \cs{DeclarePairedDelimiter(X)}}
+% \begin{macro}{\MT_delim_default_inner_wrappers:n}
+% In some cases users may want to control the internals a bit more. We
+% therefore create two call back macros each time the
+% \cs{DeclarePaired...} macro is issued. The default value of these
+% call backs are provided by |\MT_delim_default_inner_wrappers:n|
+% \begin{macrocode}
+\newcommand\MT_delim_default_inner_wrappers:n [1]{
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}##1##2##3{
+ \mathopen{}\mathclose\bgroup ##1 ##2 \aftergroup\egroup ##3
+ }
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}##1##2##3{
+ \mathopen{##1}##2\mathclose{##3}
+ }
+ }
+
+% \end{macrocode}
+% \begin{macro}{\reDeclarePairedDelimiterInnerWrapper}
+% Macro enabling the user to alter an existing call back. Note that
+% currently no checks are performed. First argument is the name of
+% the macro we are altering (as defined via \cs{DeclarePaired...}),
+% the second is \texttt{star} or \texttt{nostar}. In the last
+% argument \texttt{\#1} and \texttt{\#3} respectively refer to the
+% scaled fences and \texttt{\#3} refer to whatever come between.
+% \begin{macrocode}
+\newcommand\reDeclarePairedDelimiterInnerWrapper[3]{
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _ #2 _wrapper:nnn}##1##2##3{
+ #3
+ }
+}
+
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
% \begin{macro}{\DeclarePairedDelimiter}
% \changes{v1.06}{2008/08/01}{Made user command robust}
% This macro defines |#1| to be a control sequence that takes either
@@ -3247,9 +3510,13 @@ and the derived files
% \changes{1.08e}{2010/09/02}{`Fixed' \cs{left}\dots\cs{right} bad spacing}
% \changes{1.08e}{2010/09/14}{redid the \cs{left}\dots\cs{right} fix,
% see \cs{DeclarePairedDelimiterX} for details.}
+% \changes{v1.13}{2012/05/10}{Using call back instead}
% \begin{macrocode}
+ \MT_delim_default_inner_wrappers:n{#1}
\@namedef{MT_delim_\MH_cs_to_str:N #1 _star:}##1
- {\mathopen{}\mathclose\bgroup\left#2 ##1 \aftergroup\egroup\right #3}%
+ %{\mathopen{}\mathclose\bgroup\left#2 ##1 \aftergroup\egroup\right #3}%
+ { \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}%
+ {\left#2}{##1}{\right#3} }%
% \end{macrocode}
% The command with optional argument. It should be \cs{bigg} or
% alike.
@@ -3262,9 +3529,15 @@ and the derived files
% \end{macrocode}
% With the default optional argument we wind up with \cs{relax},
% else we get \cs{biggr} and \cs{biggl} etc.
-% \begin{macrocode}
- \mathopen{\@nameuse {\MH_cs_to_str:N ##1 l} #2} ##2
- \mathclose{\@nameuse {\MH_cs_to_str:N ##1 r} #3}}
+% \changes{v1.13}{2012/05/10}{Using call back instead}
+% \begin{macrocode}
+ %\mathopen{\@nameuse {\MH_cs_to_str:N ##1 l} #2} ##2
+ %\mathclose{\@nameuse {\MH_cs_to_str:N ##1 r} #3}}
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}%
+ {\@nameuse {\MH_cs_to_str:N ##1 l} #2}
+ {##2}
+ {\@nameuse {\MH_cs_to_str:N ##1 r} #3}
+ }
% \end{macrocode}
% The user command comes here. Just check for the star and choose
% the right internal command.
@@ -3286,7 +3559,8 @@ and the derived files
% can specify the number of arguments the created macro has, and they
% can specify the code for the inner part of the macro. Other than
% that the code is fairly similar to \cs{DeclarePairedDelimiter}
-% \changes{v1.08e}{2010/09/02}{Provided better implementation of \cs{DeclarePairedDelimiterX}}
+% \changes{v1.08e}{2010/09/02}{Provided better implementation of
+% \cs{DeclarePairedDelimiterX}}
% \begin{macrocode}
\def\MHempty{}
\def\DeclarePairedDelimiterX#1[#2]#3#4#5{%
@@ -3304,6 +3578,11 @@ and the derived files
\fi
\fi
% \end{macrocode}
+% \changes{v1.13}{2012/05/10}{Using call back instead}
+% Initiate the default call backs.
+% \begin{macrocode}
+ \MT_delim_default_inner_wrappers:n{#1}
+% \end{macrocode}
% We make sure to store the delimiter size in the local variable
% \cs{delimsize}. Then users can refer to the size in the fifth
% argument. In the starred version it will refer to \cs{middle} and in
@@ -3315,16 +3594,20 @@ and the derived files
[#2]
{
\begingroup
- \def\delimsize{\middle}
+ \def\delimsize{\middle}
% \end{macrocode}
% This is slightly controversial, \cs{left}\dots\cs{right} are known
% to produce an inner atom, thus may cause different spacing than
-% normal delimiters. We `fix' this by introducing \cs{mathopen} and \cs{mathclose}:
+% normal delimiters. We `fix' this by introducing \cs{mathopen} and
+% \cs{mathclose}. This change is now factored out into call backs.
% \changes{v1.08e}{2010/09/14}{redid the left/right fix, inspired by
% ctt thread named `spacing after \cs{right}) and before \cs{left})'
% started 2010-08-12.}
+% \changes{v1.13}{2012/05/10}{Using call back instead}
% \begin{macrocode}
- \mathopen{}\mathclose\bgroup\left#3 #5 \aftergroup\egroup\right#4
+ %\mathopen{}\mathclose\bgroup\left#3 #5 \aftergroup\egroup\right#4
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
+ {\left#3}{#5}{\right#4}
\endgroup
}
% \end{macrocode}
@@ -3353,19 +3636,30 @@ and the derived files
% \end{macrocode}
% Next we provide the inner workhorse. We need a bit of expansion
% magic to get \cs{delimsize} to work.
+% \changes{v1.13}{2012/05/10}{Using call back instead}
% \begin{macrocode}
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname
[#2]
{
- \mathopen{%
+ %\mathopen{%
+ % \let\MHempty\@gobble
+ % \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3}
+ %#5
+ %\mathclose{%
+ % \let\MHempty\@gobble
+ % \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4}
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}
+ {
\let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3}
- #5
- \mathclose{%
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3
+ }
+ {#5}
+ {
\let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4}
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4
+ }
\endgroup
}
\DeclareRobustCommand{#1}{
@@ -3909,6 +4203,23 @@ and the derived files
}
% \end{macrocode}
% \end{macro}
+%
+% \subsection{Swapping above display skip}
+%
+% \begin{macro}{\SwapAboveDisplaySkip}
+% This macro is intended to be used at the start of \AmS\
+% environments, in order to force it to use
+% \cs{abovedisplayshortskip} instead of \cs{abovedisplayskip} above
+% the displayed math. Because of the use of \cs{noalign} it will not
+% work inside \env{equation} or \env{multline}.
+% \begin{macrocode}
+\newcommand\SwapAboveDisplaySkip{%
+ \noalign{\vskip-\abovedisplayskip\vskip\abovedisplayshortskip}
+}
+
+% \end{macrocode}
+%
+% \end{macro}
%
% \subsection{An aid to alignment}
%
@@ -3916,48 +4227,39 @@ and the derived files
% \changes{v1.05}{2008/06/05}{Added \cs{MoveEqLeft} (daleif)}
% \changes{v1.05b}{2008/06/18}{We don't need \cs{setlength} here
% (daleif), after discussion about \cs{global} and \cs{setlength}
-% on ctt} This is a very simple macro, we `move' a line in an
+% on ctt}
+% \changes{v1.12}{2011/06/12}{We don't even need lengths. GL
+% suggested on ctt to just apply them directly.}
+% This is a very simple macro, we `move' a line in an
% alignment backwards in order to simulate that all subsequent lines
% have been indented. Note that simply using \verb+\kern-2m+ after
% the \verb+&+ is not enough, then the alignemnt environment never
% detects that there is anything (though simulated) in the cell
% before the \verb+&+.
% \begin{macrocode}
-\newcommand\MoveEqLeft[1][2]{%
- \global\@tempdima=#1em%
- \kern\@tempdima%
- &
- \kern-\@tempdima}
+\newcommand\MoveEqLeft[1][2]{\kern #1em & \kern -#1em}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\Aboxed}
% \changes{v1.08}{2010/06/29}{Added \cs{Aboxed}}
% The idea from \cs{MoveEqLeft} can be used for other things. Here we
-% create a macro that will allow a user to box a single line in an
+% create a macro that will allow a user to box an equation inside an
% alignment.
+% \changes{v1.12}{2011/08/17}{\cs{Aboxed} reimplemented, cudos to GL}
% \begin{macrocode}
-\newcommand\Aboxed[1]{\@Aboxed#1\ENDDNE}
+\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1&&\ENDDNE}
% \end{macrocode}
-% Idea: get the left and right part
-% typeset them in a \cs{boxed} AFTER an \& and pull it backwards
-% but in order to get the horizontal placement to work. As with
-% \cs{MoveEqLeft} we need to set some appropriate space to the left
-% of the \& .
-% \changes{v1.11}{2011/04/06}{Removed unnessary \{\} pair}
+% The macro has been reimplemented courtesy of Florent Chervet out of
+% a posting on ctt, \url{https://groups.google.com/group/comp.text.tex/browse_thread/thread/5d66395f2a1b5134/93fd9661484bd8d8?#93fd9661484bd8d8}
% \begin{macrocode}
-\def\@Aboxed#1&#2\ENDDNE{%
- \settowidth\@tempdima{$\displaystyle#1$}%
- \addtolength\@tempdima{\fboxsep}%
- \addtolength\@tempdima{\fboxrule}%
- \global\@tempdima=\@tempdima
- \kern\@tempdima
- &
- \kern-\@tempdima
- \boxed{#1#2}
+\def\@Aboxed#1&#2&#3\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}%
}
% \end{macrocode}
-%
% \end{macro}
%
% \begin{macro}{\ArrowBetweenLines}
@@ -4202,16 +4504,126 @@ and the derived files
%
% \section{Macros by other people}
%
-% \subsection{Short intertext}
+% \subsection{Intertext and short intertext}
+%
+% It turns out that \cs{intertext} use a bit too much
+% space. Especially noticable if combined with the \env{spreadlines}
+% environment, the extra space is also applied above and below
+% \cs{intertext}, which ends up looking unproffesional. Chung-chieh
+% Shan
+% (\url{http://conway.rutgers.edu/~ccshan/wiki/blog/posts/Beyond_amsmath/})
+% via Tobias Weh suggested a fix. We apply it here, but also keep the
+% original \cs{intertext} in case a user would rather want it.
+% \begin{macro}{\MT_orig_intertext:}
+% \begin{macro}{\MT_intertext:}
+% \begin{macro}{\l_MT_above_intertext_dim}
+% \begin{macro}{\l_MT_below_intertext_dim}
+% First store the originam Ams version.
+% \begin{macrocode}
+\MH_let:NwN \MT_orig_intertext: \intertext@
+% \end{macrocode}
+% And then for some reconfiguration. First a few lengths
+% \begin{macrocode}
+\newdimen\l_MT_above_intertext_dim
+\newdimen\l_MT_below_intertext_dim
+\define@key{\MT_options_name:}
+ {aboveintertextdim}{\setlength\l_MT_above_interetext_dim{#1}}
+\define@key{\MT_options_name:}
+ {belowintertextdim}{\setlength\l_MT_below_intertext_dim{#1}}
+% \end{macrocode}
+% Their default values are zero. Now for our extended version of
+% CCShan's solution.
+% \begin{macrocode}
+\def\MT_intertext: {%
+ \def\intertext##1{%
+ \ifvmode\else\\\@empty\fi
+ \noalign{%
+ \penalty\postdisplaypenalty\vskip\belowdisplayskip
+ \vskip-\lineskiplimit % CCS
+ \vskip\normallineskiplimit % CCS
+ \vskip\l_MT_above_intertext_dim
+ \vbox{\normalbaselines
+ \ifdim\linewidth=\columnwidth
+ \else \parshape\@ne \@totalleftmargin \linewidth
+ \fi
+ \noindent##1\par}%
+ \penalty\predisplaypenalty\vskip\abovedisplayskip%
+ \vskip-\lineskiplimit % CCS
+ \vskip\normallineskiplimit % CCS
+ \vskip\l_MT_above_intertext_dim
+ }%
+}}
+% \end{macrocode}
+% And provide a key to switch
+% \begin{macrocode}
+\def\MT_orig_intertext_true: { \MH_let:NwN \intertext@ \MT_orig_intertext: }
+\def\MT_orig_intertext_false: { \MH_let:NwN \intertext@ \MT_intertext: }
+\define@key{\MT_options_name:}{original-intertext}[true]{
+ \@nameuse{MT_orig_intertext_#1:}
+}
+% \end{macrocode}
+% And use the new version as default.
+% \begin{macrocode}
+\setkeys{\MT_options_name:}{
+ original-intertext=false
+}
+% \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% Gabriel Zachmann, Donald Arseneau on comp.text.tex 2000/05/12-13
% \begin{macro}{\shortintertext}
-% This is like \cs{intertext} but uses shorter skips betweeb the math.
+% \begin{macro}{\MT_orig_shortintertext}
+% \begin{macro}{\MT_shortintertext}
+% \begin{macro}{\l_above_shortintertext_dim}
+% \begin{macro}{\l_below_shortintertext_dim}
+% This is like \cs{intertext} but uses shorter skips between the
+% math. Again this turned out to have the same problem as
+% \cs{intertext}, so we provide two versions.
+% \begin{macrocode}
+\def\MT_orig_shortintertext:n #1{%
+ \ifvmode\else\\\@empty\fi
+ \noalign{%
+ \penalty\postdisplaypenalty\vskip\abovedisplayshortskip
+ \vbox{\normalbaselines
+ \if_dim:w \linewidth=\columnwidth
+ \else:
+ \parshape\@ne \@totalleftmargin \linewidth
+ \fi:
+ \noindent#1\par}%
+ \penalty\predisplaypenalty\vskip\abovedisplayshortskip%
+ }%
+}
+% \end{macrocode}
+% Lengths like above
+% \begin{macrocode}
+\newdimen\l_MT_above_shortintertext_dim
+\newdimen\l_MT_below_shortintertext_dim
+\define@key{\MT_options_name:}
+ {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_dim{#1}}
+\define@key{\MT_options_name:}
+ {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_dim{#1}}
+% \end{macrocode}
+% Looks best with the `old' values of the original \cs{jot}
+% setting. So we set them to 3pt each.
+% \begin{macrocode}
+\setkeys{\MT_options_name:}{
+ aboveshortintertextdim=3pt,
+ belowshortintertextdim=3pt
+}
+% \end{macrocode}
+% Next, just add the same as we did for \cs{intertext}
% \begin{macrocode}
-\def\shortintertext#1{%
+\def\MT_shortintertext:n #1{%
\ifvmode\else\\\@empty\fi
\noalign{%
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip
+ \vskip-\lineskiplimit
+ \vskip\normallineskiplimit
+ \vskip\l_MT_above_shortintertext_dim
\vbox{\normalbaselines
\if_dim:w \linewidth=\columnwidth
\else:
@@ -4219,9 +4631,30 @@ and the derived files
\fi:
\noindent#1\par}%
\penalty\predisplaypenalty\vskip\abovedisplayshortskip%
+ \vskip-\lineskiplimit
+ \vskip\normallineskiplimit
+ \vskip\l_MT_below_shortintertext_dim
}%
}
% \end{macrocode}
+% Next we need to be able to switch.
+% \begin{macrocode}
+\def\MT_orig_shortintertext_true: { \MH_let:NwN \shortintertext \MT_orig_shortintertext:n }
+\def\MT_orig_shortintertext_false: { \MH_let:NwN \shortintertext \MT_shortintertext:n }
+\define@key{\MT_options_name:}{original-shortintertext}[true]{
+ \@nameuse{MT_orig_shortintertext_#1:}
+}
+% \end{macrocode}
+% With the updated one as the default.
+% \begin{macrocode}
+\setkeys{\MT_options_name:}{
+ original-shortintertext=false
+}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
% \end{macro}
%
% \subsection{Fine-tuning mathematical layout}
@@ -4447,13 +4880,24 @@ and the derived files
% December~20th 2000 by Michael J.~Downes. The comments are his. I
% have added some formatting options to the arguments so that a user
% can emulate the \pkg{isotope} package.
+%
+% \changes{v.1.12}{2012/04/19}{Extended \cs{prescript} to change style
+% if used in say S context. Requestd by Oliver Buerschaper.}
+% Update 2012: One drawback from MJD's original implementation, is
+% that the math style is hardwired, such that if used in say
+% \cs{scriptstyle} context, then the style/size of the prescript
+% remain the same size. A slightly expensive fix, is to use the
+% \cs{mathchoice} construction. First exdent MJD's code a little
+% (keeping his comments)
+% \begin{macro}{\MT_prescript_inner:}
+% We make the style an extra forth argument
% \begin{macrocode}
-\DeclareRobustCommand{\prescript}[3]{
+\newcommand{\MT_prescript_inner:}[4]{
% \end{macrocode}
% Put the sup in box 0 and the sub in box 2.
% \begin{macrocode}
- \@mathmeasure\z@\scriptstyle{\MT_prescript_sup:{#1}}
- \@mathmeasure\tw@\scriptstyle{\MT_prescript_sub:{#2}}
+ \@mathmeasure\z@#4{\MT_prescript_sup:{#1}}
+ \@mathmeasure\tw@#4{\MT_prescript_sub:{#2}}
\if_dim:w \wd\tw@>\wd\z@
\setbox\z@\hbox to\wd\tw@{\hfil\unhbox\z@}
\else:
@@ -4472,6 +4916,24 @@ and the derived files
\MT_prescript_arg:{#3}
}
% \end{macrocode}
+% \end{macro}
+% Next create \cs{prescript} using \cs{mathchoice}
+% \begin{macrocode}
+\DeclareRobustCommand{\prescript}[3]{
+ \mathchoice
+% \end{macrocode}
+% In D and T style, we use MJD's default:
+% \begin{macrocode}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptstyle}}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptstyle}}
+% \end{macrocode}
+% In the others we step one style down. Of couse in SS style, using
+% \cs{scriptscript} may seem wrong, but there is no lower style.
+% \begin{macrocode}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptscriptstyle}}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptscriptstyle}}
+}
+% \end{macrocode}
% \end{macro}
% Then the named arguments. Can you see I'm preparing for templates?
% \begin{macrocode}
diff --git a/Master/texmf-dist/source/latex/mh/mhsetup.dtx b/Master/texmf-dist/source/latex/mh/mhsetup.dtx
index d4b71b9a76d..d1fe0bcb154 100644
--- a/Master/texmf-dist/source/latex/mh/mhsetup.dtx
+++ b/Master/texmf-dist/source/latex/mh/mhsetup.dtx
@@ -1,6 +1,6 @@
% \iffalse meta-comment
%
-% Copyright (C) 2002-2007,2010 by Morten Hoegholm <mh.ctan@gmail.com>
+% Copyright (C) 2002-2007,2010 by Morten Hoegholm
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either
@@ -12,7 +12,7 @@
%
% This work has the LPPL maintenance status "maintained".
%
-% This Current Maintainer of this work is Morten Hoegholm,
+% This Current Maintainer of this work is
% Lars Madsen, Will Robertson and Joseph Wright.
%
% This work consists of the main source file mhsetup.dtx
@@ -77,7 +77,7 @@
This is a generated file.
-Copyright (C) 2002-2007,2010 by Morten Hoegholm <mh.ctan@gmail.com>
+Copyright (C) 2002-2007,2010 by Morten Hoegholm
This work may be distributed and/or modified under the
conditions of the LaTeX Project Public License, either
@@ -89,7 +89,7 @@ LaTeX version 2005/12/01 or later.
This work has the LPPL maintenance status "maintained".
-This Current Maintainer of this work is Morten Hoegholm,
+This Current Maintainer of this work is
Lars Madsen, Will Robertson and Joseph Wright.
This work consists of the main source file mhsetup.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/breqn.sty b/Master/texmf-dist/tex/latex/mh/breqn.sty
index 7bbb64d3d0a..464b862b398 100644
--- a/Master/texmf-dist/tex/latex/mh/breqn.sty
+++ b/Master/texmf-dist/tex/latex/mh/breqn.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2008 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainers of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file breqn.dtx
@@ -30,7 +30,8 @@
%%
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{breqn}{2009/08/07}{0.98a}{Breaking equations}
+\ProvidesExplPackage{breqn}{2012/05/10}{0.98b}{Breaking equations}
+\ExplSyntaxOff
\edef\breqnpopcats{%
\catcode\number`\"=\number\catcode`\"
\relax}
@@ -157,6 +158,7 @@
\splitfirstmark{\string\splitfirstmark:}%
\splitbotmark{\string\splitbotmark:}%
#1{\string#1}%
+ \@nil % for the \@car
\edef\@tempa{\expandafter\strip@prefix\meaning\@tempb}%
\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -1237,9 +1239,10 @@
\fi
\fi
}
-\def\true@false@true{\fi\fi\iftrue\iffalse\iftrue}
+\def\true@true@true {\fi\fi\iftrue \iftrue \iftrue }
+\def\true@false@true {\fi\fi\iftrue \iffalse\iftrue }
+\def\false@true@false {\fi\fi\iffalse\iftrue \iffalse}
\def\false@false@false{\fi\fi\iffalse\iffalse\iffalse}
-\def\false@true@false{\fi\fi\iffalse\iftrue\iffalse}
\def\eq@density@factor{.475}
\def\eq@dense@enough@a{%
\@True \fi
diff --git a/Master/texmf-dist/tex/latex/mh/cmbase.sym b/Master/texmf-dist/tex/latex/mh/cmbase.sym
index 8d9193ede88..14904e3b029 100644
--- a/Master/texmf-dist/tex/latex/mh/cmbase.sym
+++ b/Master/texmf-dist/tex/latex/mh/cmbase.sym
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file flexisym.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/empheq.sty b/Master/texmf-dist/tex/latex/mh/empheq.sty
index f2d447b513b..a80ea8e19ee 100644
--- a/Master/texmf-dist/tex/latex/mh/empheq.sty
+++ b/Master/texmf-dist/tex/latex/mh/empheq.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2002-2007 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -20,7 +20,8 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm.
+%% This Current Maintainer of this work is
+%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file empheq.dtx
%% and the derived files
diff --git a/Master/texmf-dist/tex/latex/mh/flexisym.sty b/Master/texmf-dist/tex/latex/mh/flexisym.sty
index b952243ec8a..642bda9dfeb 100644
--- a/Master/texmf-dist/tex/latex/mh/flexisym.sty
+++ b/Master/texmf-dist/tex/latex/mh/flexisym.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file flexisym.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/mathpazo.sym b/Master/texmf-dist/tex/latex/mh/mathpazo.sym
index a0477158ce9..ffbdd9b72d7 100644
--- a/Master/texmf-dist/tex/latex/mh/mathpazo.sym
+++ b/Master/texmf-dist/tex/latex/mh/mathpazo.sym
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file flexisym.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/mathptmx.sym b/Master/texmf-dist/tex/latex/mh/mathptmx.sym
index 08435922fdc..34166a5868e 100644
--- a/Master/texmf-dist/tex/latex/mh/mathptmx.sym
+++ b/Master/texmf-dist/tex/latex/mh/mathptmx.sym
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file flexisym.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/mathstyle.sty b/Master/texmf-dist/tex/latex/mh/mathstyle.sty
index 5cf9a005be5..75d9a5eb6a3 100644
--- a/Master/texmf-dist/tex/latex/mh/mathstyle.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathstyle.sty
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2008 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2011 by Morten Hoegholm et al
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,14 +21,16 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file mathstyle.dtx
%% and the derived files
%% mathstyle.sty, mathstyle.pdf, mathstyle.ins, mathstyle.drv.
%%
-\ProvidesPackage{mathstyle}[2010/11/17 v0.89]
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{mathstyle}
+ [2011/08/03 v0.90 Tracking mathstyle implicitly]
\providecommand\@saveprimitive[2]{%
\begingroup
\edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
@@ -51,6 +53,7 @@
\splitfirstmark{\string\splitfirstmark:}%
\splitbotmark{\string\splitbotmark:}%
#1{\string#1}%
+ \@nil % for the \@car
\edef\@tempa{\expandafter\strip@prefix\meaning\@tempb}%
\edef\@tempb{\meaning#1}%
\ifx\@tempa\@tempb \global\let#2#1%
@@ -62,7 +65,8 @@
\fi
\endgroup
}
-\chardef\mathstyle=\z@
+\everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
+\chardef\mathstyle\@ne
\@saveprimitive\displaystyle\@@displaystyle
\@saveprimitive\textstyle\@@textstyle
\@saveprimitive\scriptstyle\@@scriptstyle
@@ -115,7 +119,7 @@
\providecommand\@thirdoffour[4]{#3}
\providecommand\@fourthoffour[4]{#4}
\DeclareRobustCommand\genfrac[6]{%
- {\fracstyle #1%
+ {#1\fracstyle
{\begingroup #5\endgroup
\csname @@\ifx\maxdimen#4\maxdimen over\else above\fi
\if @#2@\else withdelims\fi\endcsname #2#3#4\relax
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty
index 58eb40197aa..22afd81b053 100644
--- a/Master/texmf-dist/tex/latex/mh/mathtools.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathtools.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2002-2011 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2002-2011 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -20,7 +20,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file mathtools.dtx
@@ -28,7 +28,7 @@
%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
%%
\ProvidesPackage{mathtools}%
- [2011/04/06 v1.11 mathematical typesetting tools]
+ [2012/04/24 v1.12 mathematical typesetting tools]
\RequirePackage{keyval,calc}
\RequirePackage{mhsetup}[2010/01/21]
\MHInternalSyntaxOn
@@ -131,14 +131,19 @@
\MH_if_boolean:nTF {manual_tag}
{ \MH_if_boolean:nTF {show_manual_tags}
{ \MT_prev_tagform:n {#1} }
- { \@ifundefined{MT_r_\df@label}
- { }
+ { \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
+ { \global\MH_set_boolean_F:n {manual_tag} }
{ \MT_prev_tagform:n {#1} }
+ \@safe@activesfalse
}
}
- { \@ifundefined{MT_r_\df@label}
+ {
+ \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
{ }
{ \refstepcounter{equation}\MT_prev_tagform:n {#1} }
+ \@safe@activesfalse
}
\fi:
\global\MH_set_boolean_T:n {raw_maketag}
@@ -151,9 +156,11 @@
{
\MH_if_boolean:nTF {show_manual_tags}
{ \MT_maketag:n {#1} }
- { \@ifundefined{MT_r_\df@label}
+ { \@safe@activestrue
+ \@ifundefined{MT_r_\df@label}
{ }
{ \MT_maketag:n {#1} }
+ \@safe@activesfalse
}
}
{ \MT_maketag:n {#1} }
@@ -229,10 +236,21 @@
\MHInternalSyntaxOff
\newcommand\noeqref[1]{\@bsphack
\@for\@tempa:=#1\do{%
+ \@safe@activestrue%
\edef\@tempa{\expandafter\@firstofone\@tempa}%
+ \@ifundefined{r@\@tempa}{%
+ \protect\G@refundefinedtrue%
+ \@latex@warning{Reference `\@tempa' on page \thepage \space
+ undefined (\string\noeqref)}%
+ }{}%
\if@filesw\protected@write\@auxout{}%
- {\string\MT@newlabel{\@tempa}}\fi}
+ {\string\MT@newlabel{\@tempa}}\fi%
+ \@safe@activesfalse}
\@esphack}
+
+\providecommand\@safe@activestrue{}%
+\providecommand\@safe@activesfalse{}%
+
\MHInternalSyntaxOn
\providecommand*\xleftrightarrow[2][]{%
\ext@arrow 3095\MT_leftrightarrow_fill:{#1}{#2}}
@@ -561,17 +579,40 @@
multlined-pos=c,
}
\def\MT_gobblelabel:w #1{}
+\newcommand\MT_delim_default_inner_wrappers:n [1]{
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}##1##2##3{
+ \mathopen{}\mathclose\bgroup ##1 ##2 \aftergroup\egroup ##3
+ }
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}##1##2##3{
+ \mathopen{##1}##2\mathclose{##3}
+ }
+ }
+
+\newcommand\reDeclarePairedDelimiterInnerWrapper[3]{
+ \@namedef{MT_delim_\MH_cs_to_str:N #1 _ #2 _wrapper:nnn}##1##2##3{
+ #3
+ }
+}
+
\newcommand*\DeclarePairedDelimiter[3]{%
\@ifdefinable{#1}{
+ \MT_delim_default_inner_wrappers:n{#1}
\@namedef{MT_delim_\MH_cs_to_str:N #1 _star:}##1
- {\mathopen{}\mathclose\bgroup\left#2 ##1 \aftergroup\egroup\right #3}%
+ %{\mathopen{}\mathclose\bgroup\left#2 ##1 \aftergroup\egroup\right #3}%
+ { \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}%
+ {\left#2}{##1}{\right#3} }%
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
[2][\\@gobble]
{
- \mathopen{\@nameuse {\MH_cs_to_str:N ##1 l} #2} ##2
- \mathclose{\@nameuse {\MH_cs_to_str:N ##1 r} #3}}
+ %\mathopen{\@nameuse {\MH_cs_to_str:N ##1 l} #2} ##2
+ %\mathclose{\@nameuse {\MH_cs_to_str:N ##1 r} #3}}
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}%
+ {\@nameuse {\MH_cs_to_str:N ##1 l} #2}
+ {##2}
+ {\@nameuse {\MH_cs_to_str:N ##1 r} #3}
+ }
\DeclareRobustCommand{#1}{
\@ifstar
{\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
@@ -589,14 +630,17 @@
\PackageError{mathtools}{Macro~ need~ 1~ or~ more~ arguments}{}
\fi
\fi
+ \MT_delim_default_inner_wrappers:n{#1}
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _star:\endcsname
[#2]
{
\begingroup
- \def\delimsize{\middle}
- \mathopen{}\mathclose\bgroup\left#3 #5 \aftergroup\egroup\right#4
+ \def\delimsize{\middle}
+ %\mathopen{}\mathclose\bgroup\left#3 #5 \aftergroup\egroup\right#4
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
+ {\left#3}{#5}{\right#4}
\endgroup
}
\@xp\@xp\@xp
@@ -613,13 +657,23 @@
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname
[#2]
{
- \mathopen{%
+ %\mathopen{%
+ % \let\MHempty\@gobble
+ % \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3}
+ %#5
+ %\mathclose{%
+ % \let\MHempty\@gobble
+ % \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4}
+ \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_wrapper:nnn}
+ {
\let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3}
- #5
- \mathclose{%
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3
+ }
+ {#5}
+ {
\let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4}
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4
+ }
\endgroup
}
\DeclareRobustCommand{#1}{
@@ -899,21 +953,17 @@
\mathop{#4}\limits#5{#6}
\fi:
}
-\newcommand\MoveEqLeft[1][2]{%
- \global\@tempdima=#1em%
- \kern\@tempdima%
- &
- \kern-\@tempdima}
-\newcommand\Aboxed[1]{\@Aboxed#1\ENDDNE}
-\def\@Aboxed#1&#2\ENDDNE{%
- \settowidth\@tempdima{$\displaystyle#1$}%
- \addtolength\@tempdima{\fboxsep}%
- \addtolength\@tempdima{\fboxrule}%
- \global\@tempdima=\@tempdima
- \kern\@tempdima
- &
- \kern-\@tempdima
- \boxed{#1#2}
+\newcommand\SwapAboveDisplaySkip{%
+ \noalign{\vskip-\abovedisplayskip\vskip\abovedisplayshortskip}
+}
+
+\newcommand\MoveEqLeft[1][2]{\kern #1em & \kern -#1em}
+\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1&&\ENDDNE}
+\def\@Aboxed#1&#2&#3\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}%
}
\MHInternalSyntaxOff
\def\ArrowBetweenLines{\relax
@@ -1024,7 +1074,41 @@
\AtBeginDocument{
\providecommand\bigtimes{\MH_csym_bigtimes:}
}
-\def\shortintertext#1{%
+\MH_let:NwN \MT_orig_intertext: \intertext@
+\newdimen\l_MT_above_intertext_dim
+\newdimen\l_MT_below_intertext_dim
+\define@key{\MT_options_name:}
+ {aboveintertextdim}{\setlength\l_MT_above_interetext_dim{#1}}
+\define@key{\MT_options_name:}
+ {belowintertextdim}{\setlength\l_MT_below_intertext_dim{#1}}
+\def\MT_intertext: {%
+ \def\intertext##1{%
+ \ifvmode\else\\\@empty\fi
+ \noalign{%
+ \penalty\postdisplaypenalty\vskip\belowdisplayskip
+ \vskip-\lineskiplimit % CCS
+ \vskip\normallineskiplimit % CCS
+ \vskip\l_MT_above_intertext_dim
+ \vbox{\normalbaselines
+ \ifdim\linewidth=\columnwidth
+ \else \parshape\@ne \@totalleftmargin \linewidth
+ \fi
+ \noindent##1\par}%
+ \penalty\predisplaypenalty\vskip\abovedisplayskip%
+ \vskip-\lineskiplimit % CCS
+ \vskip\normallineskiplimit % CCS
+ \vskip\l_MT_above_intertext_dim
+ }%
+}}
+\def\MT_orig_intertext_true: { \MH_let:NwN \intertext@ \MT_orig_intertext: }
+\def\MT_orig_intertext_false: { \MH_let:NwN \intertext@ \MT_intertext: }
+\define@key{\MT_options_name:}{original-intertext}[true]{
+ \@nameuse{MT_orig_intertext_#1:}
+}
+\setkeys{\MT_options_name:}{
+ original-intertext=false
+}
+\def\MT_orig_shortintertext:n #1{%
\ifvmode\else\\\@empty\fi
\noalign{%
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip
@@ -1037,6 +1121,43 @@
\penalty\predisplaypenalty\vskip\abovedisplayshortskip%
}%
}
+\newdimen\l_MT_above_shortintertext_dim
+\newdimen\l_MT_below_shortintertext_dim
+\define@key{\MT_options_name:}
+ {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_dim{#1}}
+\define@key{\MT_options_name:}
+ {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_dim{#1}}
+\setkeys{\MT_options_name:}{
+ aboveshortintertextdim=3pt,
+ belowshortintertextdim=3pt
+}
+\def\MT_shortintertext:n #1{%
+ \ifvmode\else\\\@empty\fi
+ \noalign{%
+ \penalty\postdisplaypenalty\vskip\abovedisplayshortskip
+ \vskip-\lineskiplimit
+ \vskip\normallineskiplimit
+ \vskip\l_MT_above_shortintertext_dim
+ \vbox{\normalbaselines
+ \if_dim:w \linewidth=\columnwidth
+ \else:
+ \parshape\@ne \@totalleftmargin \linewidth
+ \fi:
+ \noindent#1\par}%
+ \penalty\predisplaypenalty\vskip\abovedisplayshortskip%
+ \vskip-\lineskiplimit
+ \vskip\normallineskiplimit
+ \vskip\l_MT_below_shortintertext_dim
+ }%
+}
+\def\MT_orig_shortintertext_true: { \MH_let:NwN \shortintertext \MT_orig_shortintertext:n }
+\def\MT_orig_shortintertext_false: { \MH_let:NwN \shortintertext \MT_shortintertext:n }
+\define@key{\MT_options_name:}{original-shortintertext}[true]{
+ \@nameuse{MT_orig_shortintertext_#1:}
+}
+\setkeys{\MT_options_name:}{
+ original-shortintertext=false
+}
\providecommand*\clap[1]{\hb@xt@\z@{\hss#1\hss}}
\providecommand*\mathllap[1][\@empty]{
\ifx\@empty#1\@empty
@@ -1136,9 +1257,9 @@
\def\MT_cramped_rlap_internal:Nn #1#2{
{}\rlap{\MT_cramped_internal:Nn #1{#2}}
}
-\DeclareRobustCommand{\prescript}[3]{
- \@mathmeasure\z@\scriptstyle{\MT_prescript_sup:{#1}}
- \@mathmeasure\tw@\scriptstyle{\MT_prescript_sub:{#2}}
+\newcommand{\MT_prescript_inner:}[4]{
+ \@mathmeasure\z@#4{\MT_prescript_sup:{#1}}
+ \@mathmeasure\tw@#4{\MT_prescript_sub:{#2}}
\if_dim:w \wd\tw@>\wd\z@
\setbox\z@\hbox to\wd\tw@{\hfil\unhbox\z@}
\else:
@@ -1148,6 +1269,13 @@
\mathopen{\vphantom{\MT_prescript_arg:{#3}}}^{\box\z@}\sb{\box\tw@}
\MT_prescript_arg:{#3}
}
+\DeclareRobustCommand{\prescript}[3]{
+ \mathchoice
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptstyle}}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptstyle}}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptscriptstyle}}
+ {\MT_prescript_inner:{#1}{#2}{#3}{\scriptscriptstyle}}
+}
\define@key{\MT_options_name:}
{prescript-sup-format}{\def\MT_prescript_sup:{#1}}
\define@key{\MT_options_name:}
diff --git a/Master/texmf-dist/tex/latex/mh/mhsetup.sty b/Master/texmf-dist/tex/latex/mh/mhsetup.sty
index 9e5c2a182cc..b78969e5746 100644
--- a/Master/texmf-dist/tex/latex/mh/mhsetup.sty
+++ b/Master/texmf-dist/tex/latex/mh/mhsetup.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2002-2007,2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2002-2007,2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -20,7 +20,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file mhsetup.dtx
diff --git a/Master/texmf-dist/tex/latex/mh/msabm.sym b/Master/texmf-dist/tex/latex/mh/msabm.sym
index 7203e1d0cde..5a01ad56b60 100644
--- a/Master/texmf-dist/tex/latex/mh/msabm.sym
+++ b/Master/texmf-dist/tex/latex/mh/msabm.sym
@@ -9,7 +9,7 @@
%% This is a generated file.
%%
%% Copyright (C) 1997-2003 by Michael J. Downes
-%% Copyright (C) 2007-2010 by Morten Hoegholm <mh.ctan@gmail.com>
+%% Copyright (C) 2007-2010 by Morten Hoegholm
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either
@@ -21,7 +21,7 @@
%%
%% This work has the LPPL maintenance status "maintained".
%%
-%% This Current Maintainer of this work is Morten Hoegholm,
+%% This Current Maintainer of this work is
%% Lars Madsen, Will Robertson and Joseph Wright.
%%
%% This work consists of the main source file flexisym.dtx