summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-08-07 21:54:06 +0000
committerKarl Berry <karl@freefriends.org>2014-08-07 21:54:06 +0000
commit94965adad023c311265b401a1e7bef667d92d745 (patch)
tree4609f8bf5c3059900fede413eabaa4be262e4f90 /Master
parent37dee28a58d0a9abebc348da10a43e5d45576fa2 (diff)
rm mh, replaced by breqn and mathtools
git-svn-id: svn://tug.org/texlive/trunk@34869 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/mh/README114
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn-technotes.pdfbin173954 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn.pdfbin543456 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/empheq.pdfbin311687 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/flexisym.pdfbin243526 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathstyle.pdfbin173367 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathtools.pdfbin427421 -> 0 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mhsetup.pdfbin233716 -> 0 bytes
-rw-r--r--Master/texmf-dist/source/latex/mh/breqn-technotes.tex145
-rw-r--r--Master/texmf-dist/source/latex/mh/breqn.dtx6881
-rw-r--r--Master/texmf-dist/source/latex/mh/empheq.dtx4280
-rw-r--r--Master/texmf-dist/source/latex/mh/flexisym.dtx1604
-rw-r--r--Master/texmf-dist/source/latex/mh/mathstyle.dtx493
-rw-r--r--Master/texmf-dist/source/latex/mh/mathtools.dtx5705
-rw-r--r--Master/texmf-dist/source/latex/mh/mhsetup.dtx653
-rw-r--r--Master/texmf-dist/tex/latex/mh/breqn.sty2038
-rw-r--r--Master/texmf-dist/tex/latex/mh/cmbase.sym371
-rw-r--r--Master/texmf-dist/tex/latex/mh/empheq.sty1390
-rw-r--r--Master/texmf-dist/tex/latex/mh/flexisym.sty422
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathpazo.sym375
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathptmx.sym374
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathstyle.sty189
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathtools.sty1606
-rw-r--r--Master/texmf-dist/tex/latex/mh/mhsetup.sty175
-rw-r--r--Master/texmf-dist/tex/latex/mh/msabm.sym256
-rwxr-xr-xMaster/tlpkg/libexec/ctan2tds1
-rw-r--r--Master/tlpkg/tlpsrc/mh.tlpsrc0
27 files changed, 1 insertions, 27071 deletions
diff --git a/Master/texmf-dist/doc/latex/mh/README b/Master/texmf-dist/doc/latex/mh/README
deleted file mode 100644
index 5c249655ccb..00000000000
--- a/Master/texmf-dist/doc/latex/mh/README
+++ /dev/null
@@ -1,114 +0,0 @@
-The mh bundle
-=============
-Morten Hoegholm (c) 2002-2011
-Lars Madsen (c) 2012
-email: mh.ctan@gmail.com
-License: LaTeX Project Public License
-
-The files in the mh bundle are:
- breqn.dtx
- flexisym.dtx
- mathstyle.dtx
- mhsetup.dtx
- mathtools.dtx
- empheq.dtx
- breqn-technotes.tex
-and derived files. The derived files of each .dtx-file are listed
-at the top of the respective .dtx-file.
-
-
-INSTALLATION
-============
-Running TeX on each dtx file extracts the runtime files. See the dtx
-files for details.
-
-DESCRIPTION
-===========
-
-breqn
-=====
-
-The breqn package facilitates automatic line-breaking of displayed
-math expressions. The package was originally developed by Michael
-J. Downes.
-
-flexisym
-========
-
-This package turns math symbols into macros.
-Is is required by breqn so that breqn can make intelligent decisions
-with respect to line-breaking and other details.
-
-mathstyle
-=========
-
-Ensures uniform syntax for math subscript (_) and superscript (^)
-operations so that they always take exactly one argument.
-Grants access to the current mathstyle which eases several tasks such
-as avoiding the many pitfalls of \mathchoice and \mathpalette.
-This package is used by flexisym.
-
-mathtools
-=========
-
-The mathtools package provides many useful tools for mathematical
-typesetting. It is based on amsmath and fixes various deficiencies
-of amsmath and standard LaTeX. It provides:
- -- Extensible symbols, such as brackets, arrows, harpoons, etc.
- -- Various symbols such as \coloneqq (:=).
- -- Easy creation of new tag forms.
- -- Showing only the referenced equations.
- -- Extensible arrows, harpoons and hookarrows.
- -- Starred versions of the amsmath matrix environments for
- specifying the column alignment.
- -- More building blocks: multlined, cases-like environments, new
- gathered environments.
- -- Math versions of \makebox, \llap, \rlap etc.
- -- Cramped math styles.
- -- and more...
-
-mathtools requires mhsetup.
-
-empheq
-======
-
-The empheq package is a visual markup extension designed to
-function on top of amsmath. It features:
- -- Boxing multi line math displays while leaving equation
- numbers untouched at the margin. Any kind of box will do.
- -- Making the ntheorem package place end-of-theorem markers
- perfectly.
- -- Placing arbitrary material on either side of math displays.
- This includes delimiters that automatically scale to the
- correct size.
-
-empheq requires mathtools.
-
-
-mhsetup
-=======
-
-The mhsetup package defines various programming tools needed by
-both empheq and mathtools. In the future, most of these tools will
-probably be an integral part of LaTeX3.
-
-xfrac
-=====
-
-A package for producing split level fractions in both text and
-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:
-
- Lars Madsen <daleif@imf.au.dk>
- Will Robertson <wspr81@gmail.com>
- Joseph Wright <joseph.wright@morningstar2.co.uk>
-
-Please report bugs mh.ctan@gmail.com (or the entire team).
-
-===========
-This README file was last revised 2013/02/12.
diff --git a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
deleted file mode 100644
index 2146c618a3d..00000000000
--- a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/breqn.pdf b/Master/texmf-dist/doc/latex/mh/breqn.pdf
deleted file mode 100644
index ea9dffe3ac2..00000000000
--- a/Master/texmf-dist/doc/latex/mh/breqn.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/empheq.pdf b/Master/texmf-dist/doc/latex/mh/empheq.pdf
deleted file mode 100644
index 1def77109d5..00000000000
--- a/Master/texmf-dist/doc/latex/mh/empheq.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/flexisym.pdf b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
deleted file mode 100644
index 0c1eb6a1649..00000000000
--- a/Master/texmf-dist/doc/latex/mh/flexisym.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
deleted file mode 100644
index bf59626c630..00000000000
--- a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathtools.pdf b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
deleted file mode 100644
index 09c8673da29..00000000000
--- a/Master/texmf-dist/doc/latex/mh/mathtools.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
deleted file mode 100644
index 26073c8b76c..00000000000
--- a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
+++ /dev/null
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mh/breqn-technotes.tex b/Master/texmf-dist/source/latex/mh/breqn-technotes.tex
deleted file mode 100644
index e8c6174cbbf..00000000000
--- a/Master/texmf-dist/source/latex/mh/breqn-technotes.tex
+++ /dev/null
@@ -1,145 +0,0 @@
-\documentclass{article}
-\usepackage{lmodern}
-\usepackage[T1]{fontenc}
-\usepackage{breqn}
-\def\eqnumside{L}
-\providecommand*\cs[1]{\texttt{\textbackslash#1}}
-
-\usepackage{hyperref}
-
-\title{Technical notes on equation breaking}
-\author{Michael J.\ Downes \and Morten H\o gholm}
-\begin{document}
-
-\maketitle
-
-
-\section{Tag placement}
-
-The method used by the breqn package to place the equation number is
-rather more complicated than you might think, and the whole reason is
-to allow the number to stay properly centered on the total height even
-when the height fluctuates due to stretching or shrinking of the page.
-
-
-Consider the following equation:
-\begin{dmath}[number={3.15}]
- N_{0} \simeq \left( \frac{\nu}{\lVert u\rVert_{H^{i}}} \right)
- \lvert I\rvert^{-1/2}
-\end{dmath}
-It will have only one line, if the column width is not too narrow.
-
-Scrutinizing the vertical list will shed light on some of the basic properties
-shared by all breqn equations. After that we will look at what would happen if
-two or more lines were needed. The numbers added on the left in the following
-\cs{showlists} output mark the points of interest.
-\begin{verbatim}
-[1] \penalty 10000
- \glue(\abovedisplayskip) 0.0
- \penalty 10000
- \glue(\belowdisplayskip) 0.0
-[2] \glue 4.0 plus 4.0
- \glue(\lineskip) 1.0
-[3] \vbox(16.53902+0.0)x0.0, glue set 16.53902fil
- .\glue 0.0 plus 1.0fil minus 1.0fil
- \penalty 10000
-[4] \glue -8.51945
-[5] \hbox(7.5+2.5)x25.55563
- .\OT1/cmr/m/n/10 (
- .\OT1/cmr/m/n/10 3
- .\OT1/cmr/m/n/10 .
- .\OT1/cmr/m/n/10 1
- .\OT1/cmr/m/n/10 5
- .\kern 0.0
- .\OT1/cmr/m/n/10 )
- \penalty 10000
-[6] \glue(\parskip) -18.01956
-[7] \hbox(16.53902+9.50012)x360.0, glue set 1.78647
-\end{verbatim}
-\begin{enumerate}
-\item These four lines are a hidden display structure from \TeX's
- primitive \texttt{\$\$} mechanism. It is used only to get the value
- of \cs{predisplaysize} so that we can later calculate by hand
- whether to use the short display skips or the regular ones. (The
- reason that we have to do it by hand traces back to the fact that
- \TeX\ 3.x does not allow unhboxing in math mode.) The penalties come
- from \cs{predisplaypenalty} and \cs{postdisplaypenalty}, which were
- locally set to 10000 to ensure there would be no unintended page
- breaks at these glue nodes.
-
-\item These two glue nodes are the ones that would normally have been
- produced at the top of a display; the first one is the above-display
- skip node (though we had to put it in by hand with \cs{vskip}) and
- the second one is the usual baselineskip/lineskip node.
-
-\item This is a dummy copy of the equation's first line, which is
- thrown in here to get the proper value of baselineskip (or lineskip
- in this case). Why do we need this? Because this ensures that we get
- the top spacing right before we fiddle with the glue nodes
- surrounding the equation number. And if the equation has a frame,
- this box is a good place to add it from.
-
-\item This is a special glue node that brings us to the right vertical
- position for adding the equation number. Its value is calculated
- from the variables that you would expect, given the presence of the
- dummy first line above the num- ber: starting position of the
- equation, height of first line, total height of equation body. If
- the equation body had more than one line, with stretchable glue
- between the lines, half of the stretch would be added in this glue
- node.
-
-\item The hbox containing the equation number.
-
-\item Backspace to bring the equation body to the right starting point. We use
- \cs{parskip} to put this glue in place because we're going to get a
- parskip node here in any case when we add the equation body with (in
- essence). If we didn't do this we'd get two glue nodes instead of
- one, to no purpose.
-
-\cs{\noindent} \cs{unhbox}\cs{EQ@box}.
-
-
-\item And lastly we see here the first line of the equation body,
- which appears to have height 16.5pt and depth 9.5pt.
-\end{enumerate}
-
-For comparison, the vertical list produced from the above equation in
-standard \LaTeX\ would look like this, if the same values of
-columnwidth and abovedisplayskip are used:
-\begin{verbatim}
-[1] \penalty 10000
-[2] \glue(\abovedisplayskip) 4.0 plus 4.0
- \glue(\lineskip) 1.0
- \hbox(16.53902+9.50012)x232.94844
-[3] .\hbox(7.5+2.5)x25.55563
- ..\hbox(7.5+2.5)x25.55563
- ...\OT1/cmr/m/n/10 (
- ...\OT1/cmr/m/n/10 3
- ...\OT1/cmr/m/n/10 .
- ...\OT1/cmr/m/n/10 1
- ...\OT1/cmr/m/n/10 5
- ...\kern 0.0
- ...\OT1/cmr/m/n/10 )
- .\kern101.49591
-[4] .\hbox(16.53902+9.50012)x105.8969
- ...
-[5] \penalty 0
-[6] \glue(\belowdisplayskip) 4.0 plus 4.0
- \glue(\lineskip) 1.0
- \hbox(6.94444+1.94444)x345.0, glue set 62.1106fil
-\end{verbatim}
-
-\begin{enumerate}
- \item \cs{predisplaypenalty}
- \item \cs{abovedisplayskip}
- \item equation number box
- \item equation body
- \item \cs{postdisplaypenaltly}
- \item \cs{belowdisplayskip}
-\end{enumerate}
-
-
-
-
-
-\end{document} \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/mh/breqn.dtx b/Master/texmf-dist/source/latex/mh/breqn.dtx
deleted file mode 100644
index 1a29cd69d1f..00000000000
--- a/Master/texmf-dist/source/latex/mh/breqn.dtx
+++ /dev/null
@@ -1,6881 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 1997-2003 by Michael J. Downes
-% 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
-% 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, Will Robertson and Joseph Wright.
-%
-% This work consists of the main source file breqn.dtx
-% and the derived files
-% breqn.sty, breqn.pdf, breqn.ins, breqn.drv.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/breqn.dtx
-% CTAN:macros/latex/contrib/mh/breqn.pdf
-%
-% Unpacking:
-% (a) If breqn.ins is present:
-% tex breqn.ins
-% (b) Without breqn.ins:
-% tex breqn.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{breqn.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If breqn.drv is present:
-% latex breqn.drv
-% (b) Without breqn.drv:
-% latex breqn.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex breqn.dtx
-% makeindex -s gind.ist breqn.idx
-% pdflatex breqn.dtx
-% makeindex -s gind.ist breqn.idx
-% pdflatex breqn.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/breqn.sty
-% TDS:doc/latex/mh/breqn.pdf
-% TDS:source/latex/mh/breqn.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: breqn 2012/05/10 v0.98b Breqn}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 1997-2003 by Michael J. Downes
-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
-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 Maintainers of this work is
-Lars Madsen, Will Robertson and Joseph Wright.
-
-This work consists of the main source file breqn.dtx
-and the derived files
- breqn.sty, breqn.pdf, breqn.ins, breqn.drv.
-
-\endpreamble
-
-\generate{%
- \file{breqn.ins}{\from{breqn.dtx}{install}}%
- \file{breqn.drv}{\from{breqn.dtx}{driver}}%
- \usedir{tex/latex/mh}%
- \file{breqn.sty}{\from{breqn.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{* breqn.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `breqn.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{breqn.drv}%
- [2012/05/10 v0.98b breqn]
-\documentclass{ltxdoc}
-\CodelineIndex
-\EnableCrossrefs
-\setcounter{IndexColumns}{2}
-\usepackage{color,verbatim,xspace,varioref,listings,amsmath,trace}
-
-\definecolor{hilite}{rgb}{0.2,0.4,0.7}
-\def\theCodelineNo{\textcolor{hilite}{\sffamily\tiny\arabic{CodelineNo}}}
-
-\lstloadlanguages{[AlLaTeX]TeX}
-
-\lstnewenvironment{literalcode}
- {\lstset{gobble=2,columns=fullflexible,basicstyle=\color{hilite}\ttfamily}}
- {}
-\makeatletter
-
-{\catcode`\%=12
- \long\gdef\@gobble@percent@space#1{\ifx
- #1%\expandafter\@gobble\else\expandafter#1\fi}}
-
-
-\AtBeginDocument{\def\verbatim@processline{\expandafter\check@percent
- \the\verbatim@line\par}}
-\newwrite\tmp@out
-\newcounter{xio}
-\newenvironment{xio}{% example input and output
- \par\addvspace\bigskipamount
- \hbox{\itshape
- \refstepcounter{xio}\kern-\p@ Example \thexio}\@nobreaktrue
- \immediate\openout\tmp@out\jobname.tmp \relax
- \begingroup
- \let\do\@makeother\dospecials\catcode`\^^M\active
- \def\verbatim@processline{
- \immediate\write\tmp@out{\expandafter\@gobble@percent@space
- \the\verbatim@line}}%
- \verbatim@start
-}{%
- \immediate\closeout\tmp@out
- \@verbatim\frenchspacing\@vobeyspaces
- \@@input \jobname.tmp \relax
- \endgroup
- \par\medskip
- \noindent\ignorespaces
- \@@input \jobname.tmp \relax
- \par\medskip
-}
-
-
-
-
-\providecommand*\pkg[1]{\textsf{#1}}
-\providecommand*\cls[1]{\textsf{#1}}
-\providecommand*\opt[1]{\texttt{#1}}
-\providecommand*\env[1]{\texttt{#1}}
-\providecommand*\fn[1]{\texttt{#1}}
-
-
-\providecommand*\cn[1]{\cs{#1}}
-\providecommand*\csarg[1]{\texttt{\char`\{#1\char`\}}}
-
-\providecommand*\tex{\TeX\xspace}
-\providecommand*\latex{\LaTeX\xspace}
-\providecommand*\dbldollars{\texttt{\detokenize{$$}}}%$$
-\providecommand*\arg{}
-\edef\arg{\expandafter\@gobble\string\#}
-
-\newenvironment{aside}{\begin{quote}\bfseries}{\end{quote}}
-\newenvironment{dn}{\begin{quote}\bfseries}{\end{quote}}
-
-\newcommand\dash{\textemdash}
-\newcommand\dbslash[1]{\texttt{\string\\}}
-\newcommand\thepkg{the \pkg{breqn} package\xspace}
-
-\providecommand*\texbook{\textsl{The \protect\TeX{}book}\xspace}
-
-\providecommand*\dotsc{\ldots}
-\providecommand*\eqref[1]{(\ref{#1})}
-
-\providecommand*\qq[1]{\textquotedblleft#1\textquotedblright}
-\providecommand*\quoted[1]{\textquoteleft#1\textquoteright}
-\providecommand*\dquoted[1]{\textquotedblleft#1\textquotedblright}
-
-\providecommand*\ie{i.e.,\xspace}
-\providecommand*\eg{e.g.,\xspace}
-\providecommand*\etc{etc.\xspace}
-\providecommand*\cf{cf.\xspace}
-
-\providecommand*\ndash{\unskip\textendash\ignorespaces}
-\providecommand*\mdash{\unskip\textemdash\ignorespaces}
-
-\makeatother
-
-\usepackage{breqn}
-
-\begin{document}
- \DocInput{breqn.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \title{The \pkg{breqn} package}
-% \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}
-% The \pkg{breqn} package facilitates automatic line-breaking of
-% displayed math expressions.
-% \end{abstract}
-%
-% \part*{User's guide}
-%
-% \section{A bit of history}
-%
-% Originally \pkg{breqn}, \pkg{flexisym}, and \pkg{mathstyle} were
-% created by Michael J.~Downes from the American Mathematical Society
-% during the 1990's up to late 2002. Sadly---and much to the shock of
-% the \TeX\ world---Michael passed away in early 2003 at the age of
-% only~44.
-%
-% 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.
-%
-% 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}
-%
-%
-% The recommended way of loading the \pkg{breqn} package is to load it
-% \emph{after} other packages dealing with math, \ie, after
-% \pkg{amsmath}, \pkg{amssymb}, or packages such as \pkg{mathpazo} or
-% \pkg{mathptmx}.
-%
-% The \pkg{flexisym} package (described in section \vref{flexisym}) is
-% required by \pkg{breqn} and ensures the math symbols are set up
-% correctly. By default \pkg{breqn} loads it with support for Computer
-% Modern but if you use a different math package requiring slightly
-% different definitions, it must be loaded before \pkg{breqn}. Below
-% is an example of how you enable \pkg{breqn} to work with the widely
-% used \pkg{mathpazo} package.
-% \begin{verbatim}
-%\usepackage{mathpazo}
-%\usepackage[mathpazo]{flexisym}
-%\usepackage{breqn}
-% \end{verbatim}
-% Currently, the packages \pkg{mathpazo} and \pkg{mathptmx} are
-% supported. Despair not: Chances are that the package will work using
-% the default settings. If you find that a particular math font
-% package doesn't work then please see implementation in
-% \fn{flexisym.dtx} for how to create a support file---it is easier
-% than one might think. Contributions welcome.
-%
-% The documentation for the package was formerly found in
-% \fn{breqndoc}. It has now been added to this implementation
-% file. Below follows the contents of the original \pkg{breqn}
-% documentation. Not all details hold anymore but I have prioritized
-% fixing the package.
-%
-% \section{To do}
-%
-% \begin{itemize}
-% \item Handling of QED
-% \item Space between \verb'\end{dmath}' and following punctuation will
-% prevent the punctuation from being drawn into the equation.
-% \item Overriding the equation layout
-% \item Overriding the placement of the equation number
-% \item \qq{alignid} option for more widely separated equations where
-% shared alignment is desired (requires two passes)
-% \item Or maybe provide an \qq{alignwidths} option where you give
-% lhs/rhs width in terms of ems? And get feedback later on discrepancies
-% with the actual measured contents?
-% \item \cs{intertext} not needed within dgroup! But currently there are
-% limitations on floating objects within dgroup.
-% \item \verb'align={1}' or 2, 3, 4 expressing various levels of demand
-% for group-wide alignment. Level 4 means force alignment even if some
-% lines then have to run over the right margin! Level 1, the default,
-% means first break LHS-RHS equations as if it occurred by itself, then
-% move them left or right within the current line width to align them if
-% possible. Levels 2 and 3 mean try harder to align but give up if
-% overfull lines result.
-% \item Need an \cs{hshift} command to help with alignment of
-% lines broken at a discretionary times sign. Also useful for adjusting
-% inside-delimiter breaks.
-% \end{itemize}
-%
-% \section{Introduction}
-%
-% The \pkg{breqn} package for \LaTeX\ provides solutions to a number of
-% common difficulties in writing displayed equations and getting
-% high-quality output. For example, it is a well-known inconvenience that
-% if an equation must be broken into more than one line, \cs{left} \dots\
-% \cs{right} constructs cannot span lines. The \pkg{breqn} package makes
-% them work as one would expect whether or not there is an intervening
-% line break.
-%
-% The single most ambitious goal of the \pkg{breqn} package, however, is
-% to support automatic linebreaking of displayed equations. Such
-% linebreaking cannot be done without substantial changes under the hood
-% in the way math formulas are processed. For this reason, especially in
-% the alpha release, users should proceed with care and keep an eye out
-% for unexpected glitches or side effects.
-%
-% \section{Principal features}
-% The principal features of the \pkg{breqn} package are:
-% \begin{description}
-%
-% \item[semantically oriented structure] The way in which compound
-% displayed formulas are subdivided matches the logical structure more
-% closely than, say, the standard \env{eqnarray} environment. Separate
-% equations in a group of equations are written as separate environments
-% instead of being bounded merely by \dbslash/ commands. Among other
-% things, this clears up a common problem of wrong math symbol spacing at
-% the beginning of continuation lines. It also makes it possible to
-% specify different vertical space values for the space between lines of a
-% long, broken equation and the space between separate equations in a
-% group of equations.
-%
-% \item[automatic line breaking] Overlong equations will be broken
-% automatically to the prevailing column width, and continuation lines
-% will be indented following standard conventions.
-%
-% \item[line breaks within delimiters] Line breaks within \cs{left} \dots\
-% \cs{right} delimiters work in a natural way. Line breaks can be
-% forbidden below a given depth of delimiter nesting through a package
-% option.
-%
-% \item[mixed math and text] Display equations that contain mixed
-% math and text, or even text only, are handled naturally by means of a
-% \env{dseries} environment that starts out in text mode instead of math
-% mode.
-%
-% \item[ending punctuation] The punctuation at the end of a displayed
-% equation can be handled in a natural way that makes it easier to promote
-% or demote formulas from\slash to inline math, and to apply special
-% effects such as adding space before the punctuation.
-%
-% \item[flexible numbering] Equation numbering is handled in a natural
-% way, with all the flexibility of the \pkg{amsmath} package and with no
-% need for a special \cs{nonumber} command.
-%
-% \item[special effects] It is easy to apply special effects to individual
-% displays, e.g., changing the type size or adding a frame.
-%
-% \item[using available space] Horizontal shrink is made use of
-% whenever feasible. With most other equation macros it is frozen when it
-% occurs between \cs{left} \dots\ \cs{right} delimiters, or in any sort of
-% multiline structure, so that some expressions require two lines that would
-% otherwise fit on one.
-%
-% \item[high-quality spacing] The \cs{abovedisplayshortskip} is used when
-% applicable (other equation macros fail to apply it in equations of more
-% than one line).
-%
-% \item[abbreviations] Unlike the \pkg{amsmath} equation environments, the
-% \pkg{breqn} environments can be called through user-defined abbreviations
-% such as \cs{beq} \dots\ \cs{eeq}.
-%
-% \end{description}
-%
-% \section{Shortcomings of the package}
-% The principal known deficiencies of the \pkg{breqn} package are:
-%
-% \subsection{Incompatibilities} As it pushes the envelope
-% of what is possible within the context of \LaTeXe, \thepkg will tend
-% to break other packages when used in combination with them, or to fail
-% itself, when there are any areas of internal overlap; successful use may
-% in some cases depend on package loading order.
-%
-%
-%
-% \subsection{Indention of delimited fragments} When line breaks within
-% delimiters are involved, the automatic indention of continuation lines
-% is likely to be unsatisfactory and need manual adjustment. I don't see
-% any easy way to provide a general solution for this, though I have some
-% ideas on how to attain partial improvements.
-%
-% \subsection{Math symbol subversion}
-% In order for automatic line breaking to work, the operation of all the
-% math symbols of class 2, 3, 4, and 5 must be altered (relations, binary
-% operators, opening delimiters, closing delimiters). This is done by an
-% auxiliary package \pkg{flexisym}. As long as you stick to the advertised
-% \LaTeX\ interface for defining math symbols (\cs{DeclareMathSymbol}),
-% things should work OK most of the time. Any more complex math symbol
-% setup is quite likely to quarrel with the \pkg{flexisym} package.
-% See Section~\vref{flexisym} for further information.
-%
-% \subsection{Subscripts and superscripts}
-%
-% Because of the changes to math symbols of class 2--5, writing certain
-% combinations such as \verb'^+' or \verb'_\pm' or \verb'^\geq' without
-% braces would lead to error messages; (The problem described here
-% already exists in standard \LaTeX\ to a lesser extent, as you may know
-% if you ever tried \verb'^\neq' or \verb'^\cong'; and indeed there are
-% no examples in the \LaTeX\ book to indicate any sanction for omitting
-% braces around a subscript or superscript.)
-%
-% The \pkg{flexisym} package therefore calls, as of version 0.92, another
-% package called \pkg{mathstyle} which turns \verb'^' and \verb'_' into
-% active characters. This is something that I believe is desirable in any
-% case, in the long run, because having a proper mathstyle variable
-% eliminates some enormous burdens that affect almost any
-% nontrivial math macros, as well as many other things where the
-% connection is not immediately obvious, e.g., the \LaTeX\ facilities for
-% loading fonts on demand.
-%
-% Not that this doesn't introduce new and interesting problems of its
-% own---for example, you don't want to put usepackage statements
-% after flexisym for any package that refers to, e.g., \verb'^^J' or
-% \verb'^^M'
-% internally (too bad that the \LaTeX\ package loading code does not
-% include automatic defenses to ensure normal catcodes in the interior of
-% a package; but it only handles the \verb'@' character).
-%
-% But I took a random AMS journal article, with normal end-user kind of
-% \LaTeX\ writing, did some straightforward substitutions to change all
-% the equations into dmath environments, and ran it with active math
-% sub/sup: everything worked OK. This suggests to me that it can work in
-% the real world, without an impossible amount of compatibility work.
-%
-% \section{Incomplete}
-% In addition, in the \textbf{alpha release [1997/10/30]} the following
-% gaps remain to be filled in:
-% \begin{description}
-% \item[documentation]
-% The documentation could use amplification, especially more
-% illustrations, and I have undoubtedly overlooked more than a few errors.
-%
-% \item[group alignment] The algorithm for doing alignment
-% of mathrel symbols across equations in a \env{dgroup} environment
-% needs work. Currently the standard and \opt{noalign} alternatives
-% produce the same output.
-%
-% \item[single group number] When a \env{dgroup} has a group number and
-% the individual equations are unnumbered, the handling and placement of
-% the group number aren't right.
-%
-% \item[group frame] Framing a group doesn't work, you might be able to
-% get frames on the individual equations at best.
-%
-% \item[group brace] The \opt{brace} option for \env{dgroup} is intended
-% to produce a large brace encompassing the whole group. This hasn't been
-% implemented yet.
-%
-% \item[darray environment] The \env{darray} environment is unfinished.
-%
-% \item[dseries environment] The syntax and usage for the \env{dseries}
-% environment are in doubt and may change.
-%
-% \item[failure arrangements] When none of the line-breaking passes for a
-% \env{dmath} environment succeeds\dash i.e., at least one line is
-% overfull\dash the final arrangement is usually rather poor. A better
-% fall-back arrangement in the failure case is needed.
-%
-% \end{description}
-%
-% \section{Package options}
-%
-% Many of the package options for \thepkg are the same as options of the
-% \env{dmath} or \env{dgroup} environments, and some of them require an
-% argument, which is something that cannot be done through the normal
-% package option mechanism. Therefore most of the \pkg{breqn} package
-% options are designed to be set with a \cs{setkeys} command after the
-% package is loaded. For example, to load the package and set the
-% maximum delimiter nesting depth for line breaks to~1:
-% \begin{verbatim}
-% \usepackage{breqn}
-% \setkeys{breqn}{breakdepth={1}}
-% \end{verbatim}
-%
-% See the discussion of environment options, Section~\vref{envopts}, for
-% more information.
-%
-% Debugging information is no longer available as a package
-% option. Instead, the tracing information has been added in a fashion
-% so that it can be enabled as a docstrip option:
-% \begin{verbatim}
-% \generate{\file{breqn.sty}{\from{breqn.dtx}{package,trace}}}
-% \end{verbatim}
-%
-%
-% \section{Environments and commands}
-% \subsection{Environments}
-% All of the following environments take an optional argument for
-% applying local effects such as changing the typesize or adding a
-% frame to an individual equation.
-%
-% \begin{description}
-% \item[\env{dmath}] Like \env{equation} but supports line breaking and variant
-% numbers.
-%
-% \item[\env{dmath*}] Unnumbered; like \env{displaymath} but supports line
-% breaking
-%
-% \item[\env{dseries}] Like \env{equation} but starts out in text mode;
-% intended for series of mathematical expressions of the form `A, B, and
-% C'. As a special feature, if you use
-% \begin{verbatim}
-% \begin{math} ... \end{math}
-% \end{verbatim}
-% for each expression in the series, a suitable amount of inter-expression
-% space will be automatically added. This is a small step in the direction of
-% facilitating conversion of display math to inline math, and vice versa: If
-% you write a display as
-% \begin{verbatim}
-% \begin{dseries}
-% \begin{math}A\end{math},
-% \begin{math}B\end{math},
-% and
-% \begin{math}C\end{math}.
-% \end{dseries}
-% \end{verbatim}
-% then conversion to inline form is simply a matter of removing the
-% \verb'\begin{dseries}' and \verb'\end{dseries}' lines; the contents of the
-% display need no alterations.
-%
-% It would be nice to provide the same feature for \verb'$' notation but
-% there is no easy way to do that because the \verb'$' function has no
-% entry point to allow changing what happens before math mode is entered.
-% Making it work would therefore require turning \verb'$' into an active
-% character, something that I hesitate to do in a \LaTeXe\ context.
-%
-% \item[\env{dseries*}] Unnumbered variant of \env{dseries}
-%
-% \item[\env{dgroup}] Like the \env{align} environment of \pkg{amsmath},
-% but with each constituent equation wrapped in a \env{dmath},
-% \env{dmath*}, \env{dseries}, or \env{dseries*} environment instead of being
-% separated by \dbslash/. The equations are numbered with a group number.
-% When the constituent environments are the numbered forms (\env{dmath} or
-% \env{dseries}) they automatically switch to `subequations'-style
-% numbering, i.e., something like (3a), (3b), (3c), \dots, depending on
-% the current form of non-grouped equation numbers. See also
-% \env{dgroup*}.
-%
-% \item[\env{dgroup*}] Unnumbered variant of \env{dgroup}. If the
-% constituent environments are the numbered forms, they get normal
-% individual equation numbers, i.e., something like (3), (4), (5), \dots~.
-%
-% \item[\env{darray}] Similar to \env{eqnarray} but with an argument like
-% \env{array} for giving column specs. Automatic line breaking is not
-% done here.
-%
-% \item[\env{darray*}] Unnumbered variant of \env{darray}, rather like
-% \env{array} except in using \cs{displaystyle} for all column
-% entries.
-%
-% \item[\env{dsuspend}] Suspend the current display in order to print
-% some text, without loss of the alignment. There is also a command
-% form of the same thing, \cs{intertext}.
-% \end{description}
-%
-% \subsection{Commands}
-%
-% The commands provided by \thepkg are:
-% \begin{description}
-% \item[\cs{condition}] This command is used for
-% a part of a display which functions as a condition on the main
-% assertion. For example:
-% \begin{verbatim}
-% \begin{dmath}
-% f(x)=\frac{1}{x} \condition{for $x\neq 0$}
-% \end{dmath}.
-% \end{verbatim}
-% \begin{dmath}
-% f(x)=\frac{1}{x} \condition{for $x\neq 0$}
-% \end{dmath}.
-% The \cs{condition} command automatically switches to text mode (so that
-% interword spaces function the way they should), puts in a comma, and
-% adds an appropriate amount of space. To facilitate promotion\slash
-% demotion of formulas, \cs{condition} \qq{does the right thing} if used
-% outside of display math.
-%
-% To substitute a different punctuation mark instead of the default comma,
-% supply it as an optional argument for the \cs{condition} command:
-% \begin{verbatim}
-% \condition[;]{...}
-% \end{verbatim}
-% (Thus, to get no punctuation: \verb'\condition[]{...}'.)
-%
-% For conditions that contain no text, you can use the starred form of the
-% command, which means to stay in math mode:
-% \begin{verbatim}
-% \begin{dmath}
-% f(x)=\frac{1}{x} \condition*{x\neq 0}
-% \end{dmath}.
-%
-% If your material contains a lot of conditions like these, you might like
-% to define shorter abbreviations, e.g.,
-% \begin{verbatim}
-% \newcommand{\mc}{\condition*}% math condition
-% \newcommand{\tc}{\condition}% text condition
-% \end{verbatim}
-% But \thepkg refrains from predefining such abbreviations in order that
-% they may be left to the individual author's taste.
-%
-% \item[\cs{hiderel}] In a compound equation it is sometimes desired to
-% use a later relation symbol as the alignment point, rather than the
-% first one. To do this, mark all the relation symbols up to the desired
-% one with \cs{hiderel}:
-% \begin{verbatim}
-% T(n) \hiderel{\leq} T(2^n) \leq c(3^n - 2^n) ...
-% \end{verbatim}
-% \end{description}
-%
-% \section{Various environment options}\label{envopts}
-%
-% The following options are recognized for the \env{dmath}, \env{dgroup},
-% \env{darray}, and \env{dseries} environments; some of the options do not
-% make sense for all of the environments, but if an option is used where
-% not applicable it is silently ignored rather than treated as an error.
-% \changes{v0.98b}{2010/08/27}{replaced relindent with indentstep}
-%
-% \begin{verbatim}
-% \begin{dmath}[style={\small}]
-% \begin{dmath}[number={BV}]
-% \begin{dmath}[labelprefix={eq:}]
-% \begin{dmath}[label={xyz}]
-% \begin{dmath}[indentstep={2em}]
-% \begin{dmath}[compact]
-% \begin{dmath}[spread={1pt}]
-% \begin{dmath}[frame]
-% \begin{dmath}[frame={1pt},framesep={2pt}]
-% \begin{dmath}[background={red}]
-% \begin{dmath}[color={purple}]
-% \begin{dmath}[breakdepth={0}]
-% \end{verbatim}
-%
-% Use the \opt{style} option to change the type size of an individual
-% equation. This option can also serve as a catch-all option for
-% altering the equation style in other ways; the contents are simply
-% executed directly within the context of the equation.
-%
-% Use the \opt{number} option if you want the number for a particular
-% equation to fall outside of the usual sequence. If this option is used
-% the equation counter is not incremented. If for some reason you need to
-% increment the counter and change the number at the same time, use the
-% \opt{style} option in addition to the \opt{number} option:
-% \begin{verbatim}
-% style={\refstepcounter{equation}}
-% \end{verbatim}
-%
-% Use of the normal \cs{label} command instead of the \opt{label} option
-% works, I think, most of the time (untested). \opt{labelprefix} prepends
-% its argument to the label (only useful as a global option, really),
-% and must be called before \opt{label}.
-%
-% \changes{v0.98b}{2010/08/27}{replaced relindent with indentstep}
-% Use the \opt{indentstep} option to specify something other than the
-% default amount for the indention of relation symbols. The default is
-% 8pt.
-%
-% Use the \opt{compact} option in compound equations to inhibit line
-% breaks at relation symbols. By default a line break will be taken before
-% each relation symbol except the first one. With the \opt{compact} option
-% \LaTeX\ will try to fit as much material as possible on each line, but
-% breaks at relation symbols will still be preferred over breaks at binary
-% operator symbols.
-%
-% Use the \opt{spread} option to increase (or decrease) the amount of
-% interline space in an equation. See the example given above.
-%
-% Use the \opt{frame} option to produce a frame around the body of the
-% equation. The thickness of the frame can optionally be specified by
-% giving it as an argument of the option. The default thickness is
-% \cs{fboxrule}.
-%
-% Use the \opt{framesep} option to change the amount of space separating
-% the frame from what it encloses. The default space is \cs{fboxsep}.
-%
-% Use the \opt{background} option to produce a colored background for the
-% equation body. The \pkg{breqn} package doesn't automatically load the
-% \pkg{color} package, so this option won't work unless you remember
-% to load the \pkg{color} package yourself.
-%
-% Use the \opt{color} option to specify a different color for the contents
-% of the equation. Like the \opt{background} option, this doesn't work if
-% you forgot to load the \pkg{color} package.
-%
-% Use the \opt{breakdepth} option to change the level of delimiter nesting
-% to which line breaks are allowed. To prohibit line breaks within
-% delimiters, set this to 0:
-% \begin{verbatim}
-% \begin{dmath}[breakdepth={0}]
-% \end{verbatim}
-% The default value for breakdepth is 2. Even when breaks are allowed
-% inside delimiters, they are marked as less desirable than breaks outside
-% delimiters. Most of the time a break will not be taken within delimiters
-% until the alternatives have been exhausted.
-%
-% Options for the \env{dgroup} environment: all of the above, and also
-% \begin{verbatim}
-% \begin{dgroup}[noalign]
-% \begin{dgroup}[brace]
-% \end{verbatim}
-%
-% By default the equations in a \env{dgroup} are mutually aligned on their
-% relation symbols ($=$, $<$, $\geq$, and the like). With the
-% \opt{noalign} option each equation is placed individually without
-% reference to the others.
-%
-% The \opt{brace} option means to place a large brace encompassing the
-% whole group on the same side as the equation number.
-%
-% Options for the \env{darray} environment: all of the above (where
-% sensible), and also
-% \begin{verbatim}
-% \begin{darray}[cols={lcr@{\hspace{2em}}lcr}]
-% \end{verbatim}
-% The value of the \opt{cols} option for the darray environment should be
-% a series of column specs as for the \env{array} environment, with the
-% following differences:
-% \begin{itemize}
-% \item For l, c, and r what you get is not text, but math, and
-% displaystyle math at that. To get text you must use a 'p' column
-% specifier, or put an \cs{mbox} in each of the individual cells.
-%
-% \item Vertical rules don't connect across lines.
-% \end{itemize}
-%
-% \section{The \pkg{flexisym} package}\label{flexisym}
-%
-% The \pkg{flexisym} package does some radical changes in the setup for
-% math symbols to allow their definitions to change dynamically throughout
-% a document. The \pkg{breqn} package uses this to make symbols of classes
-% 2, 3, 4, 5 run special functions inside an environment such as
-% \env{dmath} that provide the necessary support for automatic line
-% breaking.
-%
-% The method used to effect these changes is to change the definitions of
-% \cs{DeclareMathSymbol} and \cs{DeclareMathDelimiter}, and then
-% re-execute the standard set of \LaTeX\ math symbol definitions.
-% Consequently, additional mathrel and mathbin symbols defined by other
-% packages will get proper line-breaking behavior if the other package is
-% loaded after the \pkg{flexisym} package and the symbols are defined
-% through the standard interface.
-%
-%
-%
-% \section{Caution! Warning!}
-% Things to keep in mind when writing documents with \thepkg:
-% \begin{itemize}
-%
-% \item The notation $:=$ must be written with the command \cs{coloneq}.
-% Otherwise the $:$ and the $=$ will be treated as two separate relation
-% symbols with an \qq{empty RHS} between them, and they will be printed
-% on separate lines.
-%
-% \item Watch out for constructions like \verb'^+' where a single binary
-% operator or binary relation symbol is subscripted or superscripted. When
-% the \pkg{breqn} or \pkg{flexisym} package is used, braces are mandatory
-% in such constructions: \verb'^{+}'. This applies for both display and
-% in-line math.
-%
-% \item If you want \LaTeX\ to make intelligent decisions about line
-% breaks when vert bars are involved, use proper pairing versions of the
-% vert-bar symbols according to context: \verb'\lvert n\rvert' instead of
-% \verb'|n|'. With the nondirectional \verb'|' there is no way for \LaTeX\
-% to reliably deduce which potential breakpoints are inside delimiters
-% (more highly discouraged) and which are not.
-%
-% \item If you use the \pkg{german} package or some other package that
-% turns double quote \verb'"' into a special character, you may encounter
-% some problems with named math symbols of type mathbin, mathrel,
-% mathopen, or mathclose in moving arguments. For example, \cs{leq} in a
-% section title will be written to the \fn{.aux} file as something like
-% \verb'\mathchar "3214'. This situation probably ought to be improved,
-% but for now use \cs{protect}.
-%
-% \item Watch out for the \texttt{[} character at the beginning of a
-% \env{dmath} or similar environment, if it is supposed to be interpreted
-% as mathematical content rather than the start of the environment's
-% optional argument.
-%
-% This is OK:
-% \begin{verbatim}
-% \begin{dmath}
-% [\lambda,1]...
-% \end{dmath}
-% \end{verbatim}
-% This will not work as expected:
-% \begin{verbatim}
-% \begin{dmath}[\lambda,1]...\end{dmath}
-% \end{verbatim}
-%
-% \item Watch out for unpaired delimiter symbols (in display math only):
-% \begin{verbatim}
-% ( ) [ ] \langle \rangle \{ \} \lvert \rvert ...
-% \end{verbatim}
-% If an open delimiter is used without a close delimiter, or vice versa,
-% it is normally harmless but may adversely affect line breaking. This is only
-% for symbols that have a natural left or right directionality. Unpaired
-% \cs{vert} and so on are fine.
-%
-% When a null delimiter is used as the other member of the pair
-% (\verb'\left.' or \verb'\right.') this warning doesn't apply.
-%
-% \item If you inadvertently apply \cs{left} or \cs{right} to something
-% that is not a delimiter, the error messages are likely to be a bit
-% more confusing than usual. The normal \LaTeX\ response to an error such
-% as
-% \begin{verbatim}
-% \left +
-% \end{verbatim}
-% is an immediate message
-% \begin{verbatim}
-% ! Missing delimiter (. inserted).
-% \end{verbatim}
-% When \thepkg is in use, \LaTeX\ will fail to realize anything is wrong
-% until it hits the end of the math formula, or a closing delimiter
-% without a matching opening delimiter, and then the first message is an
-% apparently pointless
-% \begin{verbatim}
-% ! Missing \endgroup inserted.
-% \end{verbatim}
-%
-% \end{itemize}
-%
-% \section{Examples}
-%
-% \renewcommand\theequation{\thesection.\arabic{equation}}
-% % Knuth, SNA p74
-% \begin{xio}
-% Replace $j$ by $h-j$ and by $k-j$ in these sums to get [cf.~(26)]
-% \begin{dmath}[label={sna74}]
-% \frac{1}{6} \left(\sigma(k,h,0) +\frac{3(h-1)}{h}\right)
-% +\frac{1}{6} \left(\sigma(h,k,0) +\frac{3(k-1)}{k}\right)
-% =\frac{1}{6} \left(\frac{h}{k} +\frac{k}{h} +\frac{1}{hk}\right)
-% +\frac{1}{2} -\frac{1}{2h} -\frac{1}{2k},
-% \end{dmath}
-% which is equivalent to the desired result.
-% \end{xio}
-%
-% % Knuth, SNA 4.6.2, p387
-% \begin{xio}
-% \newcommand\mx[1]{\begin{math}#1\end{math}}% math expression
-% %
-% Now every column which has no circled entry is completely zero;
-% so when $k=6$ and $k=7$ the algorithm outputs two more vectors,
-% namely
-% \begin{dseries}[frame]
-% \mx{v^{[2]} =(0,5,5,0,9,5,1,0)},
-% \mx{v^{[3]} =(0,9,11,9,10,12,0,1)}.
-% \end{dseries}
-% From the form of the matrix $A$ after $k=5$, it is evident that
-% these vectors satisfy the equation $vA =(0,\dotsc,0)$.
-% \end{xio}
-%
-% \begin{xio}
-% \begin{dmath*}
-% T(n) \hiderel{\leq} T(2^{\lceil\lg n\rceil})
-% \leq c(3^{\lceil\lg n\rceil}
-% -2^{\lceil\lg n\rceil})
-% <3c\cdot3^{\lg n}
-% =3c\,n^{\lg3}
-% \end{dmath*}.
-% \end{xio}
-%
-% \begin{xio}
-% The reduced minimal Gr\"obner basis for $I^q_3$ consists of
-% \begin{dgroup*}
-% \begin{dmath*}
-% H_1^3 = x_1 + x_2 + x_3
-% \end{dmath*},
-% \begin{dmath*}
-% H_2^2 = x_1^2 + x_1 x_2 + x_2^2 - q_1 - q_2
-% \end{dmath*},
-% \begin{dsuspend}
-% and
-% \end{dsuspend}
-% \begin{dmath*}
-% H_3^1 = x_1^3 - 2x_1 q_1 - x_2 q_1
-% \end{dmath*}.
-% \end{dgroup*}
-% \end{xio}
-%
-%
-% \StopEventually{}
-% \part*{Implementation}
-%
-%
-% The package version here is Michael's v0.90 updated by Bruce
-% Miller. Michael's changes between v0.90 and his last v0.94 will be
-% incorporated where applicable.
-%
-%
-% The original sources of \pkg{breqn} and related files exist in a
-% non-dtx format devised by Michael Downes himself.
-% Lars Madsen has kindly written a Perl script for transforming the
-% original source files into near-perfect dtx state, requiring only
-% very little hand tuning. Without his help it would have been nigh
-% impossible to incorporate the original sources with Michael's
-% comments. A big, big thank you to him.
-%
-%
-%
-% \section{Introduction}
-% The \pkg{breqn} package provides environments
-% \env{dmath}, \env{dseries}, and \env{dgroup} for
-% displayed equations with \emph{automatic line breaking},
-% including automatic indention of relation symbols and binary operator
-% symbols at the beginning of broken lines. These environments
-% automatically pull in following punctuation so that it can be written in
-% a natural way. The \pkg{breqn} package also provides a
-% \env{darray} environment similar to the \env{array}
-% environment but using \cs{displaystyle} for all the array cells and
-% providing better interline spacing (because the vertical ruling
-% feature of \env{array} is dropped).
-% These are all autonumbered environments like \env{equation}
-% and have starred forms that don't add a number. For a more
-% comprehensive and detailed description of the features and intended
-% usage of the \pkg{breqn} package see \fn{breqndoc.tex}.
-%
-%
-%
-%
-% \section{Strategy}
-% Features of particular note are the ability to have
-% linebreaks even within a \cs{left} \ndash \cs{right} pair of
-% delimiters, and the automatic alignment on relations and binary
-% operators of a split equation. To make \env{dmath} handle
-% all this, we begin by setting the body of the equation in a special
-% paragraph form with strategic line breaks whose purpose is not to
-% produce line breaks in the final printed output but rather to mark
-% significant points in the equation and give us entry points for
-% unpacking \cn{left} \ndash \cn{right} boxes.
-% After the initial typesetting, we take the resulting stack of line
-% fragments and, working backward, splice them into a new, single-line
-% paragraph; this will eventually be poured into a custom parshape, after
-% we do some measuring to calculate what that parshape should be.
-% This streamlined horizontal list may contain embedded material
-% from user commands intended to alter line breaks, horizontal alignment,
-% and interline spacing; such material requires special handling.
-%
-% To make the `shortskip' possibility work even for
-% multiline equations, we must plug in a dummy \tex display to give us
-% the value of \cs{predisplaysize}, and calculate for ourselves when
-% to apply the short skips.
-%
-% In order to measure the equation body and do various
-% enervating calculations on whether the equation number will fit and so
-% on, we have to set it in a box. Among other things, this means
-% that we can't unhbox it inside \dbldollars \dots \dbldollars , or
-% even \verb"$" \dots \verb"$": \tex doesn't allow you to
-% \cs{unhbox} in math mode. But we do want to unhbox it rather
-% than just call \cs{box}, otherwise we can't take advantage of
-% available shrink from \cs{medmuskip} to make equations shrink to
-% fit in the available width. So even for simple one-line equations
-% we are forced to fake a whole display without going through \tex 's
-% primitive display mechanism (except for using it to get
-% \cs{predisplaysize} as mentioned above).
-%
-%
-% In the case of a framed equation body, the current implementation is
-% to set the frame in a separate box, of width zero and height zero,
-% pinned to the upper left corner of the equation body, and then print the
-% equation body on top of it.
-% For attaching an equation number it would be much simpler to wrap
-% the equation body in the frame and from then on treat the body as a
-% single box instead of multiple line boxes.
-% But I had a notion that it might be possible some day to support
-% vertical stretching of the frame.
-%
-%
-%
-%
-% \section{Prelim}
-%
-% This package doesn't work with \latex 2.09, nor with other
-% versions of \latex earlier than 1994/12/01.
-% \begin{macrocode}
-%<*package>
-\NeedsTeXFormat{LaTeX2e}
-% \end{macrocode}
-%
-% Declare package name and date.
-% \begin{macrocode}
-\RequirePackage{expl3}[2009/08/05]
-\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}
-%
-%
-% \section{Package options}
-%
-% Most options are set with the \cs{options} command (which
-% calls \cs{setkeys}) because the standard package option
-% mechanism doesn't provide support for key-value syntax.
-%
-% First we need to get the catcodes sorted out.
-% \begin{macrocode}
-\edef\breqnpopcats{%
- \catcode\number`\"=\number\catcode`\"
- \relax}
-\AtEndOfPackage{\breqnpopcats}%
-\catcode`\^=7 \catcode`\_=8 \catcode`\"=12 \relax
-\DeclareOption{mathstyleoff}{%
- \PassOptionsToPackage{mathstyleoff}{flexisym}%
-}
-% \end{macrocode}
-% Process options.
-% \begin{macrocode}
-\ProcessOptions\relax
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Required packages}
-% The \pkg{flexisym} package makes it possible to attach
-% extra actions to math symbols, in particular mathbin, mathrel, mathopen,
-% and mathclose symbols.
-% Normally it would suffice to call \cs{RequirePackage} without
-% any extra testing, but the nature of the package is such that it is
-% likely to be called earlier with different (no) options.
-% Then is it really helpful to be always warning the user about
-% \quoted{Incompatible Package Options!}?
-% I don't think so.
-% \begin{macrocode}
-\@ifpackageloaded{flexisym}{}{%
- \RequirePackage{flexisym}[2009/08/07]
- \edef\breqnpopcats{\breqnpopcats
- \catcode\number`\^=\number\catcode`\^
- \catcode\number`\_=\number\catcode`\_
- }%
- \catcode`\^=7 \catcode`\_=8 \catcode`\"=12 \relax
-}
-% \end{macrocode}
-% The \pkg{keyval} package for handling equation options and
-% \pkg{calc} to ease writing computations.
-% \begin{macrocode}
-\RequirePackage{keyval,calc}\relax
-% \end{macrocode}
-%
-%
-% And add an \cs{options} cmd for processing package
-% options that require an argument. Maybe this will get added to
-% the \pkg{keyval} package eventually.
-% \begin{macrocode}
-\@ifundefined{options}{%
-% \end{macrocode}
-%
-%
-% \begin{macro}{\options}
-% Get the package options and run setkeys on them.
-% \begin{macrocode}
-\newcommand{\options}[2]{%
- \expandafter\options@a\csname opt@#1.sty\endcsname{#2}%
- \setkeys{#1}{#2}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\options@a}
-% \begin{macro}{\options@b}
-% \begin{macro}{\options@c}
-% \begin{macro}{\options@d}
-% Redefine \cs{opt@pkgname.sty} as we go along to take out
-% the options that are handled and leave the ones that are not.
-% \begin{macrocode}
-\def\options@a#1#2{%
- \edef\@tempa{\options@b#2,\@empty\@nil}%
- \ifx#1\relax \let#1\@empty\fi
- \xdef#1{#1\ifx#1\@empty\@xp\@gobble\@tempa\@empty\else\@tempa \fi}%
-}
-% \end{macrocode}
-% Add the next option, and recurse if there remain more
-% options.
-% \begin{macrocode}
-\def\options@b#1,#2#3\@nil{%
- \options@c#1 \@nil
- \ifx#2\@empty \else\options@b#2#3\@nil\fi
-}
-% \end{macrocode}
-% Discard everything after the first space.
-% \begin{macrocode}
-\def\options@c#1 #2\@nil{\options@d#1=\@nil}
-% \end{macrocode}
-% Discard everything after the first = sign; add a comma only if the
-% remainder is not empty.
-% \begin{macrocode}
-\def\options@d#1=#2\@nil{\ifx\@empty #1\@empty\else,\fi#1}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-% The tail of the \cs{@ifundefined} test.
-% \begin{macrocode}
-}{}% end @ifundefined test
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Some useful tools}
-%
-% \begin{macro}{\@nx}
-% \begin{macro}{\@xp}
-% The comparative brevity of \cs{@nx} and \cs{@xp} is
-% valuable not so much for typing convenience as for reducing visual
-% clutter in code sections that require a lot of expansion control.
-% \begin{macrocode}
-\let\@nx\noexpand
-\let\@xp\expandafter
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\@emptytoks}
-% Constant empty token register, analogous to \cs{@empty}.
-% \begin{macrocode}
-\@ifundefined{@emptytoks}{\newtoks\@emptytoks}{}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\f@ur}
-% Constants 0\ndash 3 are provided in plain \tex , but not 4.
-% \begin{macrocode}
-\chardef\f@ur=4
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\inf@bad}
-% \cs{inf@bad} is for testing box badness.
-% \begin{macrocode}
-\newcount\inf@bad \inf@bad=1000000
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\maxint}
-%
-% We want to use \cs{maxint} rather than coerced
-% \cs{maxdimen} for \cs{linepenalty} in one place.
-% \begin{macrocode}
-\newcount\maxint \maxint=2147483647
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\int@a}
-% \begin{macro}{\int@b}
-% \begin{macro}{\int@b}
-%
-% Provide some shorter aliases for various scratch registers.
-% \begin{macrocode}
-\let\int@a=\@tempcnta
-\let\int@b=\@tempcntb
-\let\int@c=\count@
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\dim@a}
-% \begin{macro}{\dim@b}
-% \begin{macro}{\dim@c}
-% \begin{macro}{\dim@d}
-% \begin{macro}{\dim@e}
-% \begin{macro}{\dim@A}
-%
-% Same for dimen registers.
-% \begin{macrocode}
-\let\dim@a\@tempdima
-\let\dim@b\@tempdimb
-\let\dim@c\@tempdimc
-\let\dim@d\dimen@
-\let\dim@e\dimen@ii
-\let\dim@A\dimen@i
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\skip@a}
-% \begin{macro}{\skip@b}
-% \begin{macro}{\skip@c}
-%
-% Same for skip registers.
-% \begin{macrocode}
-\let\skip@a\@tempskipa
-\let\skip@b\@tempskipb
-\let\skip@c\skip@
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\toks@a}
-% \begin{macro}{\toks@b}
-% \begin{macro}{\toks@c}
-% \begin{macro}{\toks@d}
-% \begin{macro}{\toks@e}
-% \begin{macro}{\toks@f}
-%
-% Same for token registers.
-% \begin{macrocode}
-\let\toks@a\@temptokena
-\let\toks@b\toks@
-\toksdef\toks@c=2
-\toksdef\toks@d=4
-\toksdef\toks@e=6
-\toksdef\toks@f=8
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\abs@num}
-% We need an absolute value function for comparing
-% penalties.
-% \begin{macrocode}
-\def\abs@num#1{\ifnum#1<\z@-\fi#1}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@ifnext}
-% \begin{macro}{\@ifnexta}
-% The \cs{@ifnext} function is a variation of
-% \cs{@ifnextchar} that doesn't skip over intervening whitespace.
-% We use it for the optional arg of \dbslash inside
-% \env{dmath} \etc because we don't want
-% unwary users to be tripped up by an unexpected attempt on \latex 's part
-% to interpret a bit of math as an optional arg:
-% \begin{literalcode}
-% \begin{equation}
-% ...\\
-% [z,w]...
-% \end{equation}
-% \end{literalcode}
-% .
-% \begin{macrocode}
-\def\@ifnext#1#2#3{%
- \let\@tempd= #1\def\@tempa{#2}\def\@tempb{#3}%
- \futurelet\@tempc\@ifnexta
-}
-% \end{macrocode}
-% Switch to \cs{@tempa} iff the next token matches.
-% \begin{macrocode}
-\def\@ifnexta{\ifx\@tempc\@tempd \let\@tempb\@tempa \fi \@tempb}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\@ifstar}
-% Similarly let's remove space-skipping from \cs{@ifstar}
-% because in some rare case of \dbslash inside an equation, followed by
-% a space and a \verb"*" where the \verb"*" is intended as the math
-% binary operator, it would be a disservice to gobble the star as an
-% option of the \dbslash command. In all other contexts the chance
-% of having a space \emph{before} the star is extremely small: either
-% the command is a control word which will get no space token after it in
-% any case because of \tex 's tokenization rules; or it is a control
-% symbol such as \dbslash \verb"*" which is exceedingly unlikely to be
-% written as \dbslash \verb"*" by any one who really wants the
-% \verb"*" to act as a modifier for the \dbslash command.
-% \begin{macrocode}
-\def\@ifstar#1#2{%
- \let\@tempd*\def\@tempa*{#1}\def\@tempb{#2}%
- \futurelet\@tempc\@ifnexta
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@optarg}
-% Utility function for reading an optional arg
-% \emph{without} skipping over any intervening spaces.
-% \begin{macrocode}
-\def\@optarg#1#2{\@ifnext[{#1}{#1[#2]}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@True}
-% \begin{macro}{\@False}
-% \begin{macro}{\@Not}
-% \begin{macro}{\@And}
-% After \verb"\let\foo\@True" the test
-% \begin{literalcode}
-% \if\foo
-% \end{literalcode}
-% evaluates to true. Would rather avoid \cs{newif} because it
-% uses three csnames per Boolean variable; this uses only one.
-% \begin{macrocode}
-\def\@True{00}
-\def\@False{01}
-\def\@Not#1{0\ifcase#11 \or\@xp 1\else \@xp 0\fi}
-\def\@And#1#2{0\ifcase#1#2 \@xp 0\else \@xp 1\fi}
-\def\@Or#1#2{0\ifnum#1#2<101 \@xp 0\else \@xp 1\fi}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-% \begin{macrocode}
-\def\theb@@le#1{\if#1 True\else False\fi}
-% \end{macrocode}
-% \begin{macro}{\freeze@glue}
-%
-% Remove the stretch and shrink from a glue register.
-% \begin{macrocode}
-\def\freeze@glue#1{#11#1\relax}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\z@rule}
-% \begin{macro}{\keep@glue}
-% Note well
-% the intentional absence of \cs{relax} at the end of the replacement
-% text of \cs{z@rule}; use it with care.
-% \begin{macrocode}
-\def\z@rule{\vrule\@width\z@}% no \relax ! use with care
-% \end{macrocode}
-% Different ways to keep a bit of glue from disappearing at the
-% beginning of a line after line breaking:
-% \begin{itemize}
-% \item Zero-thickness rule
-% \item Null character
-% \item \cs{vadjust}\verb"{}" (\texbook , Exercise ??)
-% \end{itemize}
-% The null character idea would be nice except it
-% creates a mathord which then screws up math spacing for \eg a following
-% unary minus sign. (the vrule \emph{is} transparent to
-% the math spacing). The vadjust is the cheapest in terms of box
-% memory\mdash it vanishes after the pass through \tex 's
-% paragrapher.
-% It is what I would have used, except that the equation contents get
-% run through two paragraphing passes, once for breaking up LR boxes and
-% once for the real typesetting.
-% If \cs{keep@glue} were done with an empty vadjust, it would
-% disappear after the first pass and\mdash in particular\mdash the
-% pre-bin-op adjustment for relation symbols would disappear at a line break.
-% \begin{macrocode}
-\def\keep@glue{\z@rule\relax}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\replicate}
-%
-% This is a fully expandable way of making N copies of a token
-% list.
-% Based on a post of David Kastrup to comp.text.tex circa January
-% 1999.
-% The extra application of \cs{number} is needed for maximal
-% robustness in case the repeat count N is given in some weird \tex form
-% such as \verb|"E9| or \verb|\count9|.
-% \begin{macrocode}
-% usage: \message{H\replicate{5}{i h}ow de doo dee!}
-\begingroup \catcode`\&=11
-\gdef\replicate#1{%
- \csname &\expandafter\replicate@a\romannumeral\number\number#1 000q\endcsname
-}
-\endgroup
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\replicate@a}
-% \begin{macrocode}
-\long\def\replicate@a#1#2\endcsname#3{#1\endcsname{#3}#2}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\8m}% fix
-% \begin{macrocode}
-\begingroup \catcode`\&=11
-\long\gdef\&m#1#2{#1\csname &#2\endcsname{#1}}
-\endgroup
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\8q}% fix
-% \begin{macrocode}
-\@xp\let\csname\string &q\endcsname\@gobble
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\mathchars@reset}
-%
-% Need to patch up this function from flexisym a little, to better
-% handle certain constructed symbols like \cs{neq}.
-% \begin{macrocode}
-\ExplSyntaxOn
-\g@addto@macro\mathchars@reset{%
- %\let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
- %\let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
- %\let\@symDeB\@secondoftwo
- \cs_set_eq:NN \math_csym_Rel:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_Bin:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeL:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeR:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeB:Nn \use_ii:nn
-}
-\ExplSyntaxOff
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@cons}
-%
-% \latex 's \cs{@cons} appends to the end of a list, but we need
-% a function that adds material at the beginning.
-% \begin{macrocode}
-\def\eq@cons#1#2{%
- \begingroup \let\@elt\relax \xdef#1{\@elt{#2}#1}\endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@saveprimitive}
-% If some preceding package redefined one of the
-% primitives that we must change, we had better do some checking to make
-% sure that we are able to save the primitive meaning for internal use.
-% This is handled by the \cs{@saveprimitive} function. We
-% follow the example of \cs{@@input} where the primitive meaning is
-% stored in an internal control sequence with a \verb"@@" prefix.
-% Primitive control sequences can be distinguished by the fact that
-% \cs{string} and \cs{meaning} return the same information.
-% Well, not quite all: \cs{nullfont} and \cs{topmark}
-% and the other \cs{...mark} primitives being the exceptions.
-% \begin{macrocode}
-\providecommand{\@saveprimitive}[2]{%
- \begingroup
- \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
- \ifx\@tempa\@tempb \global\let#2#1%
- \else
-% \end{macrocode}%
-% If [arg1] is no longer primitive, then we are in trouble unless
-% [arg2] was already given the desired primitive meaning somewhere
-% else.
-% \begin{macrocode}
- \edef\@tempb{\meaning#2}%
- \ifx\@tempa\@tempb
- \else \@saveprimitive@a#1#2%
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% Aux function, check for the special cases.
-% Most of the time this branch will be skipped so we can
-% stuff a lot of work into it without worrying about speed costs.
-% \begin{macrocode}
-\providecommand\@saveprimitive@a[2]{%
- \begingroup
- \def\@tempb##1#1##2{\edef\@tempb{##2}\@car{}}%
- \@tempb\nullfont{select font nullfont}%
- \topmark{\string\topmark:}%
- \firstmark{\string\firstmark:}%
- \botmark{\string\botmark:}%
- \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%
- \else
- \PackageError{breqn}%
- {Unable to properly define \string#2; primitive
- \noexpand#1no longer primitive}\@eha
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@math}
-% \begin{macro}{\@@endmath}
-% \begin{macro}{\@@display}
-% \begin{macro}{\@@enddisplay}
-% Move the math-start and math-end functions into control
-% sequences. If I were redesigning \tex I guess I'd put these
-% functions into primitive control words instead of linking them to a
-% catcode. That way \tex would not have to do the special
-% lookahead at a \verb"$" to see if there's another one coming up.
-% Of course that's related to the question of how to provide user
-% shorthand for common constructions: \tex , or an editing interface of
-% some sort.
-% \begin{macrocode}
-\begingroup \catcode`\$=\thr@@ % just to make sure
- \global\let\@@math=$ \gdef\@@display{$$}% $$$
-\endgroup
-\let\@@endmath=\@@math
-\let\@@enddisplay=\@@display
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\@@insert}
-% \begin{macro}{\@@mark}
-% \begin{macro}{\@@vadjust}
-% Save the primitives \cs{vadjust}, \cs{insert},
-% \cs{mark} because we will want to change them locally during
-% equation measuring to keep them from getting in the way of our vertical
-% decomposition procedures. We follow the example of
-% \cs{@@input}, \cs{@@end}, \cs{@@par} where the primitive
-% meaning is stored in an internal control sequence with a \verb"@@"
-% prefix.
-% \begin{macrocode}
-\@saveprimitive\vadjust\@@vadjust
-\@saveprimitive\insert\@@insert
-\@saveprimitive\mark\@@mark
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-%
-% \section{Debugging}
-% Debugging help.
-% \begin{macrocode}
-%<*trace>
-\errorcontextlines=2000\relax
-% \end{macrocode}
-%
-% \begin{macro}{\breqn@debugmsg}
-% Print a debugging message.
-% \begin{macrocode}
-\long\def\breqn@debugmsg#1{\GenericInfo{||}{||=\space#1}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\debugwr}
-% Sometimes the newline behavior of \cs{message} is
-% unsatisfactory; this provides an alternative.
-% \begin{macrocode}
-\def\debugwr#1{\immediate\write\sixt@@n{||= #1}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\debug@box}
-% Record the contents of a box in the log file, without stopping.
-% \begin{macrocode}
-\def\debug@box#1{%
- \batchmode{\showboxbreadth\maxdimen\showboxdepth99\showbox#1}%
- \errorstopmode
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eqinfo}
-% Show lots of info about the material before launching into the
-% trials.
-% \begin{macrocode}
-\def\eqinfo{%
- \debug@box\EQ@copy
- \wlog{!! EQ@copy: \the\wd\EQ@copy\space x
- \the\ht\EQ@copy+\the\dp\EQ@copy
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\debug@para}
-% Check params that affect line breaking.
-% \begin{macrocode}
-\def\debug@para{%
- \debugwr{\hsize\the\hsize, \parfillskip\the\parfillskip}%
- \breqn@debugmsg{\leftskip\the\leftskip, \rightskip\the\rightskip}%
- \breqn@debugmsg{\linepenalty\the\linepenalty, \adjdemerits\the\adjdemerits}%
- \breqn@debugmsg{\pretolerance\the\pretolerance, \tolerance\the\tolerance,
- \parindent\the\parindent}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macrocode}
-%</trace>
-% \end{macrocode}
-%
-%
-%
-%
-% \section{The \cs{listwidth} variable}
-% The dimen variable \cs{listwidth} is \cs{linewidth}
-% plus \cs{leftmargin} plus \cs{rightmargin}, which is typically
-% less than \cs{hsize} if the list depth is greater than one.
-% In case a future package will provide this variable, define it only
-% if not yet defined.
-% \begin{macrocode}
-\@ifundefined{listwidth}{\newdimen\listwidth}{}
-\listwidth=\z@
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Parameters}
-%
-% Here follows a list of parameters needed.
-%
-% \begin{macro}{\eqfontsize}
-% \begin{macro}{\eqcolor}
-% \begin{macro}{\eqmargin}
-% \begin{macro}{\eqindent}
-% \begin{macro}{\eqbinoffset}
-% \begin{macro}{\eqnumside}
-% \begin{macro}{\eqnumplace}
-% \begin{macro}{\eqnumsep}
-% \begin{macro}{\eqnumfont}
-% \begin{macro}{\eqnumform}
-% \begin{macro}{\eqnumsize}
-% \begin{macro}{\eqnumcolor}
-% \begin{macro}{\eqlinespacing}
-% \begin{macro}{\eqlineskip}
-% \begin{macro}{\eqlineskiplimit}
-% \begin{macro}{\eqstyle}
-% \begin{macro}{\eqinterlinepenalty}
-% \begin{macro}{\intereqpenalty}
-% \begin{macro}{\intereqskip}
-%
-% Note: avoid M, m, P, p because they look like they might be the
-% start of a keyword \quoted{minus} or \quoted{plus}. Then
-% \tex looks further to see if the next letter is i or l. And if
-% the next thing is an undefined macro, the attempt to expand the macro
-% results in an error message.
-% \begin{macrocode}
-\def\eqfontsize{} % Inherit from context [NOT USED?]
-\def\eqcolor{black} % Default to black [NOT USED?]
-\newdimen\eqnumsep \eqnumsep=10pt % Min space between equ number and body
-\newdimen\eqmargin \eqmargin=8pt % For `multline' gap emulation
-% \end{macrocode}
-% The \cs{eqindent} and \cs{eqnumside} variables need to
-% have their values initialized from context, actually. But
-% that takes a bit of work, which is postponed till later.
-% \begin{macrocode}
-\def\eqindent{C}% % C or I, centered or indented
-\def\eqnumside{R}% % R or L, right or left
-\def\eqnumplace{M}% % M or T or B, middle top or bottom
-% \end{macrocode}
-% Typesetting the equation number is done thus:
-% \begin{literalcode}
-% {\eqnumcolor \eqnumsize \eqnumfont{\eqnumform{\eq@number}}}
-% \end{literalcode}
-% .
-% \begin{macrocode}
-%d\eqnumfont{\upshape}% % Upright even when surrounding text is slanted
-\def\eqnumfont{}% % Null for easier debugging [mjd,1997/09/26]
-\def\eqnumform#1{(#1\@@italiccorr)} % Add parens
-\def\eqnumsize{} % Allow numbers to have different typesize ...
-% \end{macrocode}
-% Tricky questions on \cs{eqnumsize}. Should the default
-% be \cs{normalsize}? Then the user can scale down the
-% equation body with \cs{small} and not affect the equation
-% number. Or should the default be empty? Then in large
-% sections of smaller text, like the dangerous bend stuff in
-% \emph{\TeX book}, the equation number size will keep in synch
-% with the context.
-% Maybe need an \cs{eqbodysize} param as well to allow separating
-% the two cases.
-% \begin{macrocode}
-\def\eqnumcolor{} % ... or color than eq body e.g. \color{blue}
-\newlength\eqlinespacing \eqlinespacing=14pt plus2pt % Base-to-base space between lines
-\newlength\eqlineskip \eqlineskip=3pt plus2pt % Min space if eqlinespacing too small
-\newdimen\eqlineskiplimit \eqlineskiplimit=2pt % Threshold for switching to eqlineskip
-% \end{macrocode}
-% The value of \cs{eqbinoffset} should include a negative shrink
-% component that cancels the shrink component of medmuskip, otherwise
-% there can be a noticeable variation in the indent of adjacent lines if
-% one is shrunken a lot and the other isn't.
-% \begin{macrocode}
-\newmuskip \eqbinoffset \eqbinoffset=15mu minus-3mu % Offset from mathrel alignment pt for mathbins
-\newmuskip\eqdelimoffset \eqdelimoffset=2mu % Additional offset for break inside delims
-\newdimen\eqindentstep \eqindentstep=8pt % Indent used when LHS wd is n/a or too large
-\newtoks\eqstyle % Customization hook
-\newcount\eqbreakdepth \eqbreakdepth=2 % Allow breaks within delimiters to this depth
-\newcount \eqinterlinepenalty \eqinterlinepenalty=10000 % No page breaks between equation lines
-\newcount \intereqpenalty \intereqpenalty=1000 % Pagebreak penalty between equations [BRM: Was \@M]
-\newlength \intereqskip \intereqskip=3pt plus2pt % Additional vert space between equations
-\newcount\prerelpenalty \prerelpenalty=-\@M % Linebreak penalty before mathrel symbols
-\newcount\prebinoppenalty \prebinoppenalty=888 % Linebreak penalty before mathbins
-% \end{macrocode}
-% When breaking equations we never right-justify, so a stretch
-% component of the muskip is never helpful and sometimes it is definitely
-% undesirable. Note that thick\slash medmuskips frozen inside a
-% fraction or radical may turn out noticeably larger than neighboring
-% unfrozen ones. Nonetheless I think this way is the best
-% compromise short of a new \tex that can make those built-up objects
-% shrink horizontally in proportion; the alternative is to pretty much
-% eliminate the shrink possibility completely in displays.
-% \begin{macrocode}
-\newmuskip \Dmedmuskip \Dmedmuskip=4mu minus 3mu % medmuskip in displays
-\newmuskip \Dthickmuskip \Dthickmuskip=5mu minus 2mu % thickmuskip in displays
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% And now some internal variables. 1997/10/22: some of
-% these are dead branches that need to be pruned.
-%
-% MH: Started cleaning up a bit. No more funny loops.
-% \begin{macrocode}
-\def\eq@number{} % Internal variable
-\newlength\eqleftskip \eqleftskip=\@centering % Space on the left [NOT USED?]
-\newlength\eqrightskip \eqrightskip=\@centering % Space on the right [NOT USED?]
-\newlength\eq@vspan \eq@vspan=\z@skip % Glue used to vcenter the eq number
-\newmuskip\eq@binoffset \eq@binoffset=\eqbinoffset % Roughly, \eqbinoffset + \eqdelimoffset
-\newsavebox\EQ@box % Storage for equation body
-\newsavebox\EQ@copy % For eq body sans vadjust/insert/mark material
-\newsavebox\EQ@numbox % For equation number
-\newdimen\eq@wdNum % width of number + separation [NEW]
-\newsavebox\GRP@numbox % For group number [NEW]
-\newdimen\grp@wdNum % width of number + separation [NEW]
-%%B\EQ@vimbox % Vadjust, insert, or mark material
-%%B\EQ@vimcopy % Spare copy of same
-%%B\eq@impinging % Temporary box for measuring number placement
-\newcount \eq@lines % Internal counter, actual number of lines
-\newcount \eq@curline % Loop counter
-\newcount \eq@badness % Used in testing for overfull lines
-\newcount \EQ@vims % For bookkeeping
-\def\@eq@numbertrue{\let\eq@hasNumber\@True}%
-\def\@eq@numberfalse{\let\eq@hasNumber\@False}%
-\let\eq@hasNumber\@False
-% \end{macrocode}
-% Here for the dimens, it would be advisable to do some more careful
-% management to conserve dimen registers. First of all, most of the
-% dimen registers are needed in the measuring phase, which is a tightly
-% contained step that happens after the contents of the equation have been
-% typeset into a box and before any external functions have a chance to
-% regain control\mdash \eg , the output routine.
-% Therefore it is possible to make use of the the dimen registers 0--9,
-% reserved by convention for scratch use, without fear of conflict with
-% other macros. But I don't want to use them directly with the
-% available names:
-% \begin{literalcode}
-% \dimen@ \dimen@i \dimen@ii \dimen3 \dimen4 ... \dimen9
-% \end{literalcode}
-% . It would be much more useful to have names for these registers
-% indicative of way they are used.
-%
-% Another source whence dimen registers could be borrowed is the
-% \pkg{amsmath} package, which allocates six registers for
-% equation-measuring purposes. We can reuse them under different
-% names since the \pkg{amsmath} functions and our functions will
-% never be used simultaneously.
-% \begin{literalcode}
-% \eqnshift@ \alignsep@ \tagshift@ \tagwidth@ \totwidth@ \lineht@
-% \end{literalcode}
-% \begin{macrocode}
-\newdimen\eq@dp % Depth of last line
-\newdimen\eq@wdL % Width of the left-hand-side
-\newdimen\eq@wdT % Total width for framing
-\newdimen\eq@wdMin % Width of narrowest line in equation
-\newdimen\grp@wdL % Max width of LHS's in a group
-\newdimen\grp@wdR % Max RHS of all equations in a group
-\newdimen\grp@wdT
-\newdimen\eq@wdRmax
-\newdimen\eq@firstht % Height of first line
-% \end{macrocode}
-% BRM: measure the condition too.
-% \begin{macrocode}
-\newdimen\eq@wdCond
-\newdimen\eq@indentstep % Indent amount when LHS is not present
-\newdimen\eq@linewidth % Width actually used for display
-\newdimen\grp@linewidth % Max eq@linewidth over a group
-% \end{macrocode}
-% Maybe \cs{eq@hshift} could share the same register as
-% \cs{mathindent} [mjd,1997/10/22].
-% \begin{macrocode}
-\newdimen\eq@hshift
-\let\eq@isIntertext\@False
-% \end{macrocode}
-% Init \cs{eq@indentstep} to a nonzero value so that we can
-% detect and refrain from clobbering a user setting of zero.
-% And \cs{eq@sidespace} to \cs{maxdimen} because
-% that is the right init before computing a min.
-% \begin{macrocode}
-\eq@indentstep=\maxdimen
-\newdimen\eq@given@sidespace
-% \end{macrocode}
-%
-% \begin{macro}{\eq@overrun}
-% MH: Appears to be unused.
-%
-% Not a dimen register; don't need to advance it.
-% \begin{macrocode}
-\def\eq@overrun{0pt}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% To initialize \cs{eqnumside} and \cs{eqindent} properly,
-% we may need to grub around a bit in \cs{@filelist}. However,
-% if the \pkg{amsmath} package was used, we can use its option
-% data. More trouble: if a documentclass sends an option of
-% \opt{leqno} to \pkg{amsmath} by default, and it gets
-% overridden by the user with a \opt{reqno} documentclass option,
-% then \pkg{amsmath} believes itself to have received
-% \emph{both} options.
-% \begin{macrocode}
-\@ifpackagewith{amsmath}{leqno}{%
- \@ifpackagewith{amsmath}{reqno}{}{\def\eqnumside{L}}%
-}{%
-% \end{macrocode}
-% If the \pkg{amsmath} package was not used, the next
-% method for testing the \opt{leqno} option is to see if
-% \fn{leqno.clo} is present in \cs{@filelist}.
-% \begin{macrocode}
- \def\@tempa#1,leqno.clo,#2#3\@nil{%
- \ifx @#2\relax\else \def\eqnumside{L}\fi
- }%
- \@xp\@tempa\@filelist,leqno.clo,@\@nil
-% \end{macrocode}
-% Even that test may fail in the case of \cls{amsart} if it does
-% not load \pkg{amsmath}. Then we have to look whether
-% \cs{iftagsleft@} is defined, and if so whether it is true.
-% This is tricky if you want to be careful about conditional nesting
-% and don't want to put anything in the hash table unnecessarily.
-% \begin{macrocode}
- \if L\eqnumside
- \else
- \@ifundefined{iftagsleft@}{}{%
- \edef\eqnumside{%
- \if TT\csname fi\endcsname\csname iftagsleft@\endcsname
- L\else R\fi
- }%
- }
- \fi
-}
-% \end{macrocode}
-% A similar sequence of tests handles the \quoted{fleqn or not fleqn}
-% question for the \cls{article} and \cls{amsart}
-% documentclasses.
-% \begin{macrocode}
-\@ifpackagewith{amsmath}{fleqn}{%
- \def\eqindent{I}%
-}{%
- \def\@tempa#1,fleqn.clo,#2#3\@nil{%
- \ifx @#2\relax\else \def\eqindent{I}\fi
- }%
- \@xp\@tempa\@filelist,fleqn.clo,@\@nil
- \if I\eqindent
- \else
- \@ifundefined{if@fleqn}{}{%
- \edef\eqindent{%
- \if TT\csname fi\endcsname\csname if@fleqn\endcsname
- I\else C\fi
- }%
- }%
- \fi
-}
-% \end{macrocode}
-% BRM: This conditional implies we must use ALL indented or ALL centered?
-% \begin{macrocode}
-%\if I\eqindent
- \@ifundefined{mathindent}{%
- \newdimen\mathindent
- }{%
- \@ifundefined{@mathmargin}{}{%
- \mathindent\@mathmargin
- }%
- }
-%\fi
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Measuring equation components}
-% Measure the left-hand side of an equation. This
-% function is called by mathrel symbols. For the first mathrel we
-% want to discourage a line break more than for following mathrels; so
-% \cs{mark@lhs} gobbles the following \cs{rel@break} and
-% substitutes a higher penalty.
-% \begin{aside}
-% Maybe the LHS should be kept in a separate box.
-% \end{aside}
-%
-%
-%
-% \begin{macro}{\EQ@hasLHS}
-%
-% Boolean: does this equation have a \dquoted{left-hand side}?
-% \begin{macrocode}
-\let\EQ@hasLHS=\@False
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\EQ@QED}
-%
-% If nonempty: the qed material that should be incorporated into this
-% equation after the final punctuation.
-% \begin{macrocode}
-\let\EQ@QED=\@empty
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\mark@lhs}
-%
-% \begin{macrocode}
-\def\mark@lhs#1{%
- \ifnum\lr@level<\@ne
- \let\mark@lhs\relax
- \global\let\EQ@hasLHS=\@True
- \global\let\EQ@prebin@space\EQ@prebin@space@a
- \mark@lhs@a
-% \end{macrocode}
-% But the penalty for the first mathrel should still be lower than a
-% binoppenalty. If not, when the LHS contains a binop, the split
-% will occur inside the LHS rather than at the mathrel.
-% On the other hand if we end up with a multline sort of equation
-% layout where the RHS is very short, the break before the relation symbol
-% should be made \emph{less} desirable than the breakpoints inside
-% the LHS.
-% Since a lower penalty takes precedence over a higher one, we start
-% by putting in the highest relpenalty; during subsequent measuring if we
-% find that that RHS is not excessively short then we put in an extra
-% \dquoted{normal} relpenalty when rejoining the LHS and RHS.
-% \begin{macrocode}
- \penalty9999 % instead of normal \rel@break
- % else no penalty = forbid break
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\mark@lhs@a}
-%
-% Temporarily add an extra thickmuskip to the LHS; it will be removed
-% later. This is necessary to compensate for the disappearance of
-% the thickmuskip glue preceding a mathrel if a line break is taken at
-% that point. Otherwise we would have to make our definition of
-% mathrel symbols more complicated, like the one for mathbins. The
-% penalty of $2$ put in with vadjust is a flag for
-% \cs{eq@repack} to suggest that the box containing this line should
-% be measured to find the value of \cs{eq@wdL}. The
-% second vadjust ensures that the normal prerelpenalty and thickmuskip
-% will not get lost at the line break during this preliminary pass.
-%
-% BRM: I originally thought the \verb"\mskip\thickmuskip" was messing
-% up summation limits in LHS. But I may have fixed that problem by
-% fixing other things\ldots
-% \begin{macrocode}
-\def\mark@lhs@a{%
- \mskip\thickmuskip \@@vadjust{\penalty\tw@}\penalty-\@Mi\@@vadjust{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\hiderel}
-% If you want the LHS to extend past the first mathrel symbol to a
-% following one, mark the first one with \cs{hiderel}:
-% \begin{literalcode}
-% a \hiderel{=} b = c...
-% \end{literalcode}
-% .
-% \begin{aside}
-% I'm not sure now why I didn't use \cs{begingroup}
-% \cs{endgroup} here \begin{dn}
-% mjd,1999/01/21
-% \end{dn}
-% .
-% \end{aside}
-%
-% \begin{macrocode}
-\newcommand\hiderel[1]{\mathrel{\advance\lr@level\@ne#1}}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\m@@Bin}
-% \begin{macro}{\m@@Rel}
-% \begin{macro}{\bin@break}
-% \begin{macro}{\rel@break}
-% \begin{macro}{\bin@mark}
-% \begin{macro}{\rel@mark}
-% \begin{macro}{\d@@Bin}
-% \begin{macro}{\d@@Rel}
-%
-% \cf \pkg{flexisym} handling of mathbins and mathrels. These
-% are alternate definitions of \cs{m@Bin} and \cs{m@Rel},
-% activated by \cs{display@setup}.
-% \begin{macrocode}
-%%%%\let\m@@Bin\m@Bin
-%%%%%\let\m@@Rel\m@Rel
-\let\EQ@prebin@space\relax
-\def\EQ@prebin@space@a{\mskip-\eq@binoffset \keep@glue \mskip\eq@binoffset}
-\def\bin@break{\ifnum\lastpenalty=\z@\penalty\prebinoppenalty\fi
- \EQ@prebin@space}
-\def\rel@break{%
- \ifnum\abs@num\lastpenalty <\abs@num\prerelpenalty
- \penalty\prerelpenalty
- \fi
-}
-\ExplSyntaxOn
-%%%\def\d@@Bin{\bin@break \m@@Bin}
-%%%%\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
-\cs_set:Npn \math_dsym_Bin:Nn {\bin@break\math_bsym_Bin:Nn}
-\cs_set:Npn \math_dsym_Rel:Nn {\mark@lhs \rel@break \math_bsym_Rel:Nn }
-\ExplSyntaxOff
-% \end{macrocode}
-% The difficulty of dealing properly with the subscripts and
-% superscripts sometimes appended to mathbins and mathrels is one of the
-% reasons that we do not attempt to handle the mathrels as a separate
-% \quoted{column} a la \env{eqnarray}.
-%
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\m@@symRel}
-% \begin{macro}{\d@@symRel}
-% \begin{macro}{\m@@symBin}
-% \begin{macro}{\d@@symBin}
-% \begin{macro}{\m@@symDel}
-% \begin{macro}{\d@@symDel}
-% \begin{macro}{\m@@symDeR}
-% \begin{macro}{\d@@symDeR}
-% \begin{macro}{\m@@symDeB}
-% \begin{macro}{\d@@symDeB}
-% \begin{macro}{\m@@symDeA}
-% \begin{macro}{\d@@symDeA}
-%
-% More of the same.
-% \begin{macrocode}
-\ExplSyntaxOn
-%%\let\m@@symRel\@symRel
-%%%\def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
-
-\cs_set_protected:Npn \math_dcsym_Bin:Nn {\bin@break \math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_dcsym_Rel:Nn { \mark@lhs \rel@break \math_bcsym_Rel:Nn}
-
-
-%%\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
-%%\let\m@@symDel\@symDel
-%%\let\m@@symDeR\@symDeR
-%%\let\m@@symDeB\@symDeB
-%%\let\m@@symDeA\@symDeA
-
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\display@setup}
-% \begin{macro}{\everydisplay}
-% Setup. Note that \latex reserves the primitive
-% \cs{everydisplay} under the name \cs{frozen@everydisplay}.
-% BRM: Disable this! It also affects non-breqn math!!!!
-% \begin{macrocode}
-%\global\everydisplay\expandafter{\the\everydisplay \display@setup}
-% \end{macrocode}
-% Change some math symbol function calls.
-% \begin{macrocode}
-\def\display@setup{%
- \medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \math_setup_display_symbols:
- %%\let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
- %%\let\@symRel\d@@symRel \let\@symBin\d@@symBin
- %%\let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- %%\let\m@DeA\d@@DeA
- %%\let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- %%\let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
- \let\left\eq@left \let\right\eq@right \global\lr@level\z@
- \global\eq@wdCond\z@ %BRM: new
-% \end{macrocode}
-% If we have an embedded array environment (for example), we
-% don't want to have each math cell within the array resetting
-% \cs{lr@level} globally to 0\mdash not good!
-% And in general I think it is safe to say that whenever we have a
-% subordinate level of boxing we want to revert to a normal math setup.
-% \begin{macrocode}
- \everyhbox{\everyhbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \everyvbox{\everyvbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
-}
-% \end{macrocode}
-% The \cs{textmath@setup} function is needed for embedded inline
-% math inside text inside a display.
-%
-% BRM: DS Experiment: Variant of \cs{display@setup} for use within
-% dseries environmnents
-% \begin{macrocode}
-\def\dseries@display@setup{%
- \medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \math_setup_display_symbols:
-%%%% \let\m@Bin\d@@Bin
-%%%\let\m@Rel\d@@Rel
-%%% \let\@symRel\d@@symRel
-%%% \let\@symBin\d@@symBin
-%%% \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
-%%% \let\m@DeA\d@@DeA
-%%% \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
-%%% \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
- \let\left\eq@left \let\right\eq@right \global\lr@level\z@
- \everyhbox{\everyhbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \everyvbox{\everyvbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \displaystyle
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\textmath@setup{%
- \math_setup_inline_symbols:
-%%%% \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
-%%%% \let\@symRel\m@@symRel \let\@symBin\m@@symBin
-%%%% \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
-%%%% \let\m@DeA\m@@DeA
-%%%% \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
-%%%% \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
- \let\left\@@left \let\right\@@right
-}
-
-\ExplSyntaxOff
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\if@display}
-% \begin{macro}{\everydisplay}
-% The test \cs{ifinner} is unreliable for distinguishing
-% whether we are in a displayed formula or an inline formula: any display
-% more complex than a simple one-line equation typically involves the use
-% of \verb"$" \cs{displaystyle} \dots \verb"$" instead of
-% \dbldollars \dots \dbldollars . So we provide a more reliable
-% test. But it might have been provided already by the
-% \pkg{amsmath} package.
-% \begin{macrocode}
-\@ifundefined{@displaytrue}{%
- \@xp\newif\csname if@display\endcsname
- \everydisplay\@xp{\the\everydisplay \@displaytrue}%
-}{}
-% \end{macrocode}
-%
-% \begin{aside}
-% Is there any reason to maintain separate
-% \cs{everydisplay} and \cn{eqstyle}?
-%
-% \end{aside}
-%
-%
-% \end{macro}
-% \end{macro}
-%
-%
-%
-%
-% \section{The \env{dmath} and \env{dmath*} environments}
-%
-% Options for the \env{dmath} and \env{dmath*}
-% environments.
-% \begin{literalcode}
-% \begin{dmath}[label={eq:xyz}]
-% \begin{dmath}[labelprefix={eq:},label={xyz}]
-% \end{literalcode}
-% WSPR: added the option for a label prefix, designed to be used in the preamble like so:
-% \begin{literalcode}
-% \setkeys{breqn}{labelprefix={eq:}}
-% \end{literalcode}
-% \begin{macrocode}
-\define@key{breqn}{label}{%
- \edef\next@label{\noexpand\label{\next@label@pre#1}}%
- \let\next@label@pre\@empty}
-\define@key{breqn}{labelprefix}{\def\next@label@pre{#1}}
-\global\let\next@label\@empty
-\global\let\next@label@pre\@empty
-% \end{macrocode}
-% Allow a variant number.
-% \begin{literalcode}
-% \begin{dmath}[number={\nref{foo}\textprime}]
-% \end{literalcode}
-% \begin{macrocode}
-\define@key{breqn}{number}{\def\eq@number{#1}%
- \let\@currentlabel\eq@number
-}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[shiftnumber]
-% \begin{dmath}[holdnumber]
-% \end{literalcode}
-% Holding or shifting the number.
-% \begin{macrocode}
-\define@key{breqn}{shiftnumber}{\let\eq@shiftnumber\@True}
-\define@key{breqn}{holdnumber}{\let\eq@holdnumber\@True}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[density={.5}]
-% \end{literalcode}
-% \begin{macrocode}
-\define@key{breqn}{density}{\def\eq@density@factor{#1}}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[indentstep={1em}]
-% \end{literalcode}
-% To change the amount of indent for post-initial lines. Note:
-% for lines that begin with a mathbin symbol there is a fixed amount of
-% indent already built in (\cs{eqbinoffset}) and it cannot be
-% reduced through this option. The indentstep amount is the indent
-% used for lines that begin with a mathrel symbol.
-% \begin{macrocode}
-\define@key{breqn}{indentstep}{\eqindentstep#1\relax}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[compact]
-% \begin{dmath}[compact=-2000]
-% \end{literalcode}
-% To make mathrels stay inline to the extent possible, use the compact
-% option.
-% Can give a numeric value in the range $-10000 \dots 10000$
-% to adjust the behavior.
-% $-10000$: always break at a rel symbol; $10000$: never
-% break at a rel symbol.
-% \begin{macrocode}
-\define@key{breqn}{compact}[-99]{\prerelpenalty=#1\relax}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[layout={S}]%
-% \end{literalcode}
-% Specify a particular layout.
-% We take care to ensure that \cs{eq@layout} ends up containing
-% one and only one letter.
-% \begin{macrocode}
-\define@key{breqn}{layout}[?]{%
- \edef\eq@layout{\@car#1?\@nil}%
-}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[spread={1pt}]
-% \end{literalcode}
-% To change the interline spacing in a particular equation.
-% \begin{macrocode}
-\define@key{breqn}{spread}{%
- \addtolength\eqlinespacing{#1}%
- \addtolength\eqlineskip{#1}%
- \eqlineskiplimit\eqlineskip
-}
-% \end{macrocode}
-% To change the amount of space on the side for \dquoted{multline} layout.
-% \begin{macrocode}
-\define@key{breqn}{sidespace}{%
- \setlength\eq@given@sidespace{#1}%
-}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[style={\small}]
-% \end{literalcode}
-% The \opt{style} option is mainly intended for changing the
-% type size of an equation but as a matter of fact you could put arbitrary
-% \latex code here \mdash thus the option name is \quoted{style} rather
-% than just \quoted{typesize}. In order for this option to work when
-% setting options globally, we need to put the code in
-% \cs{eqstyle} rather than execute it directly.
-% \begin{macrocode}
-\define@key{breqn}{style}{\eqstyle\@xp{\the\eqstyle #1}}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[shortskiplimit={1em}]
-% \end{literalcode}
-% If the line immediately preceeding a display has length $l$, the
-% first line of the display is indented $i$, and a shortskip limit $s$
-% is set, then the spacing above the display is equal to
-% \cs{abovedisplayshortskip} if $l+s < i $ and \cs{abovedisplayskip}
-% otherwise. The default shortskip limit is 2\,em which is what \TeX\
-% hardcodes but this parameter overrides that.
-% \begin{macrocode}
-\define@key{breqn}{shortskiplimit}{\def\eq@shortskiplimit{#1}}
-\def\eq@shortskiplimit{2em}
-% \end{macrocode}
-%
-% \begin{literalcode}
-% \begin{dmath}[frame]
-% \end{literalcode}
-% The \opt{frame} option merely puts a framebox around the body
-% of the equation. To change the thickness of the frame, give the
-% thickness as the argument of the option. For greater control, you
-% can change the appearance of the frame by redefining
-% \cs{eqframe}. It must be a command taking two arguments, the
-% width and height of the equation body. The top left corner of the
-% box produced by \cs{eqframe} will be pinned to the top-left corner
-% of the equation body.
-% \begin{macrocode}
-\define@key{breqn}{frame}[\fboxrule]{\def\eq@frame{T}%
- \dim@a#1\relax\edef\eq@framewd{\the\dim@a}%
-% \end{macrocode}
-% Until such time as we provide a frame implementation that allows the
-% frame to stretch and shrink, we'd better remove any stretch/shrink from
-% the interline glue in this case.
-% \begin{macrocode}
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\define@key{breqn}{fullframe}[]{\def\eq@frame{U}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\def\eq@frame{F} % no frame
-\def\eq@framewd{\fboxrule}
-% \end{macrocode}
-% Wishful thinking?
-% \begin{literalcode}
-% \begin{dmath}[frame={width={2pt},color={blue},sep={2pt}}]
-% \end{literalcode}
-% To change the space between the frame and the equation there is a
-% framesep option.
-% \begin{macrocode}
-\define@key{breqn}{framesep}[\fboxsep]{%
- \if\eq@frame F\def\eq@frame{T}\fi
- \dim@a#1\relax \edef\eq@framesep{\the\dim@a}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\def\eq@framesep{\fboxsep}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[background={red}]
-% \end{literalcode}
-% Foreground and background colors for the equation. By default
-% the background area that is colored is the size of the equation, plus
-% fboxsep. If you need anything fancier for the background, you'd
-% better do it by defining \cs{eqframe} in terms of
-% \cs{colorbox} or \cs{fcolorbox}.
-% \begin{macrocode}
-\define@key{breqn}{background}{\def\eq@background{#1}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[color={purple}]
-% \end{literalcode}
-% \begin{macrocode}
-\define@key{breqn}{color}{\def\eq@foreground{#1}}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dmath}[center]
-% \begin{dmath}[nocenter]
-% \end{literalcode}
-% The \opt{center} option means add leftskip stretch to make the
-% individual lines be centered; this is the default for
-% \env{dseries}.
-% \begin{macrocode}
-\define@key{breqn}{center}[]{\let\eq@centerlines\@True}
-\define@key{breqn}{nocenter}[]{\let\eq@centerlines\@False}
-\let\eq@centerlines\@False
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dgroup}[noalign]
-% \end{literalcode}
-% Equation groups normally have alignment of the primary relation
-% symbols across the whole group. The \opt{noalign} option
-% switches that behavior.
-% \begin{macrocode}
-\define@key{breqn}{noalign}[]{\let\grp@aligned\@False}
-\let\grp@aligned\@True % default
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{dgroup}[breakdepth={2}]
-% \end{literalcode}
-% Break depth of 2 means that breaks are allowed at mathbin symbols
-% inside two pairs of delimiters, but not three.
-% \begin{macrocode}
-\define@key{breqn}{breakdepth}{\eqbreakdepth#1\relax}
-% \end{macrocode}
-% \begin{literalcode}
-% \begin{darray}[cols={lcrlcr}]
-% \end{literalcode}
-% The \opt{cols} option only makes sense for the
-% \env{darray} environment but we liberally allow all the options to
-% be used with all the environments and just ignore any unsensible ones
-% that happen to come along.
-% \begin{macrocode}
-\define@key{breqn}{cols}{\global\let\@preamble\@empty
- \darray@mkpream#1\@percentchar
-}
-% \end{macrocode}
-%
-% FORMAT STATUS%
-% \begin{verbatim}
-% \def\eq@frame{T}%
-% CLM works tolerably
-% \def\eqindent{C}\def\eqnumside{L}\def\eqnumplace{M}
-% CLT works tolerably
-% \def\eqindent{C}\def\eqnumside{L}\def\eqnumplace{T}
-% ILM
-% \def\eqindent{I}\def\eqnumside{L}\def\eqnumplace{M}\mathindent40\p@
-% ILT
-% \def\eqindent{I}\def\eqnumside{L}\def\eqnumplace{T}\mathindent40\p@
-% Indended w/left number
-% work ok if mathindent is larger than number width,
-% but then equations must fit into smaller space.
-% Is shiftnumber allowed to put eqn at left, instead of indent?
-% CRM
-% \def\eqindent{C}\def\eqnumside{R}\def\eqnumplace{M}
-% CRB
-% \def\eqindent{C}\def\eqnumside{R}\def\eqnumplace{B}
-% IRM
-% \def\eqindent{I}\def\eqnumside{R}\def\eqnumplace{M}\mathindent10\p@
-% IRB
-% \def\eqindent{I}\def\eqnumside{R}\def\eqnumplace{B}\mathindent10\p@
-% \end{verbatim}
-%
-% The main environments.
-%
-%BRM: The following incorporates several changes:
-% 1) modifications supplied by MJD to fix the eaten \cs{paragraph} problem.
-% 2) Added \cs{display@setup} here, rather than globally.
-%
-% \begin{macro}{\dmath}
-% \begin{macro}{\enddmath}
-% For the \env{dmath} environment we don't want the standard
-% optional arg processing because of the way it skips over whitespace,
-% including newline, while looking for the \verb"[" char; which is not good
-% for math material. So we call \cs{@optarg} instead.
-% \begin{macrocode}
-\newenvironment{dmath}{%
- \let\eq@hasNumber\@True \@optarg\@dmath{}}{}
-\def\@dmath[#1]{%
-%<trace> \breqn@debugmsg{=== DMATH ==================================================}%
- \everydisplay\expandafter{\the\everydisplay \display@setup}%
- \if@noskipsec \leavevmode \fi
- \if@inlabel \leavevmode \global\@inlabelfalse \fi
- \if\eq@group\else\eq@prelim\fi
- \setkeys{breqn}{#1}%
- \the\eqstyle
-% \end{macrocode}
-% The equation number might have been overridden in \verb|#1|.
-% \begin{macrocode}
- \eq@setnumber
-% \end{macrocode}
-% Start up the displayed equation by reading the contents into a
-% box register. Enclose this phase in an extra group so that
-% modified \cs{hsize} and other params will be auto-restored
-% afterwards.
-% \begin{macrocode}
- \begingroup
- \eq@setup@a
- \eq@startup
-}
-% \end{macrocode}
-% Before it finishes off the box holding the equation body,
-% \cs{enddmath} needs to look ahead for punctuation (and
-% \cs{qed}?).
-% \begin{macrocode}
-\def\enddmath#1{\check@punct@or@qed}
-\def\end@dmath{%
- \gdef\EQ@setwdL{}% Occasionally undefined ???
- \eq@capture
- \endgroup
- \EQ@setwdL
-% \end{macrocode}
-% Measure (a copy of) the equation body to find the minimum width
-% required to get acceptable line breaks, how many lines will be required
-% at that width, and whether the equation number needs to be shifted to
-% avoid overlapping. This information will then be used by
-% \cs{eq@finish} to do the typesetting of the real equation body.
-% \begin{macrocode}
- \eq@measure
-% \end{macrocode}
-% Piece together the equation from its constituents, recognizing
-% current constraints. If we are in an equation group, this might
-% just save the material on a stack for later processing.
-% \begin{macrocode}
- \if\eq@group \grp@push \else \eq@finish\fi
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\dmath*}
-% \begin{macro}{\enddmath*}
-% Ah yes, now the lovely \env{dmath*} environment.
-% \begin{macrocode}
-\newenvironment{dmath*}{%
- \let\eq@hasNumber\@False \@optarg\@dmath{}%
-}{}
-\@namedef{end@dmath*}{\end@dmath}
-\@namedef{enddmath*}#1{\check@punct@or@qed}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@prelim}
-% If \cs{everypar} has a non-null value, it's probably
-% some code from \cs{@afterheading} that sets \cs{clubpenalty}
-% and\slash or removes the parindent box. Both of those actions
-% are irrelevant and interfering for our purposes and need to be deflected
-% for the time being.
-% If an equation appears at the very beginning of a list item
-% (possibly from a trivlist such as \env{proof}), we need to
-% trigger the item label.
-% \begin{macrocode}
-\def\eq@prelim{%
- \if@inlabel \indent \par \fi
- \if@nobreak \global\@nobreakfalse \predisplaypenalty\@M \fi
- \everypar\@emptytoks
-% \end{macrocode}
-% If for some reason \env{dmath} is called between paragraphs,
-% \cn{noindent} is better than \cn{leavevmode}, which would produce
-% an indent box and an empty line to hold it. If we are in a list
-% environment, \cn{par} is defined as \verb"{\@@par}" to preserve
-% \cs{parshape}.
-% \begin{macrocode}
- \noindent
- \eq@nulldisplay
- \par %% \eq@saveparinfo %% needs work
- \let\intertext\breqn@intertext
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\breqn@parshape@warning}
-% Warning message extracted to a separate function to streamline the
-% calling function.
-% \begin{macrocode}
-\def\breqn@parshape@warning{%
- \PackageWarning{breqn}{%
- Complex paragraph shape cannot be followed by this equation}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@prevshape}
-% Storage; see \cs{eq@saveparinfo}.
-% \begin{macrocode}
-\let\eq@prevshape\@empty
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@saveparinfo}
-% Save the number of lines and parshape info for the text preceding
-% the equation.
-% \begin{macrocode}
-\def\eq@saveparinfo{%
- \count@\prevgraf \advance\count@-\thr@@ % for the null display
- \edef\eq@prevshape{\prevgraf\the\count@\space}%
- \ifcase\parshape
- % case 0: no action required
- \or \edef\eq@prevshape{\eq@prevshape
- \parshape\@ne\displayindent\displaywidth\relax
- }%
-% \end{macrocode}
-% Maybe best to set \cs{eq@prevshape} the same in the else case
-% also. Better than nothing.
-% \begin{macrocode}
- \else
- \breqn@parshape@warning
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@setnumber}
-% If the current equation number is not explicitly given, then
-% use an auto-generated number, unless the no-number switch has been
-% thrown (\env{dmath*}).
-% \cs{theequation} is the number form to be used for all equations,
-% \cs{eq@number} is the actual value for the current equation
-% (might be an exception to the usual sequence).
-% \begin{macrocode}
-\def\eq@setnumber{%
- \eq@wdNum\z@
- \if\eq@hasNumber
- \ifx\eq@number\@empty
- \stepcounter{equation}\let\eq@number\theequation
- \fi
-% \fi
-% \end{macrocode}
- % This sets up numbox, etc, even if unnumbered?????
-% \begin{macrocode}
- \ifx\eq@number\@empty
- \else
-% \end{macrocode}
-% Put the number in a box so we can use its measurements in our
-% number-placement calculations. The extra braces around
-% \cs{eqnumform} make it possible for \cs{eqnumfont} to have
-% either an \cs{itshape} (recommended) or a \cs{textit}
-% value.
-% \begin{macrocode}
-%<trace> \breqn@debugmsg{Number \eq@number}%
- \set@label{equation}\eq@number
- \global\sbox\EQ@numbox{%
- \next@label \global\let\next@label\@empty
- \eqnumcolor\eqnumsize\eqnumfont{\eqnumform{\eq@number}}%
- }%
- \global\eq@wdNum\wd\EQ@numbox\global\advance\eq@wdNum\eqnumsep
-% \let\eq@hasNumber\@True % locally true
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@finish}
-% The information available at this point from preliminary
-% measuring includes the number of lines required, the width of the
-% equation number, the total height of the equation body, and (most
-% important) the parshape spec that was used in determining height and
-% number of lines.
-%
-% Invoke the equation formatter for the requested centering/indentation
-% having worked out the best parshape.
-% BRM: This portion is extensively refactored to get common operations
-% together (so corrections get consistently applied).
-%
-% MH: I've destroyed Bruce's nice refactoring a bit to get the
-% abovedisplayskips correct for both groups of equations and single
-% \env{dmath} environments. I will have to redo that later.
-% \begin{macrocode}
-\newcount\eq@final@linecount
-\let\eq@GRP@first@dmath\@True
-\def\eq@finish{%
- \begingroup
-%<trace> \breqn@debugmsg{Formatting equation}%
-%<trace> \debug@showmeasurements
- \if F\eq@frame\else
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
- \fi
-% \eq@topspace{\vskip\parskip}% Set top spacing
- \csname eq@\eqindent @setsides\endcsname % Compute \leftskip,\rightskip
- \adjust@parshape\eq@parshape% Final adjustment of parshape for left|right skips
-% \end{macrocode}
-% If we are in an a group of equations we don't want to calculate the
-% top space for the first one as that will be delayed until later when
-% the space for the group is calculated. However, we do need to store
-% the leftskip used here as that will be used later on for calculating
-% the top space.
-% \begin{macrocode}
- \if\eq@group
- \if\eq@GRP@first@dmath
- \global\let\eq@GRP@first@dmath\@False
- \xdef\dmath@first@leftskip{\leftskip=\the\leftskip\relax}%
-%<trace> \breqn@debugmsg{Stored\space\dmath@first@leftskip}
- \else
- \eq@topspace{\vskip\parskip}% Set top spacing
- \fi
- \else
- \eq@topspace{\vskip\parskip}% Set top spacing
- \fi
-%<trace> \debug@showformat
-% \end{macrocode}
-% We now know the final line count of the display. If it is a
-% single-line display, we want to know as that greatly simplifies the
-% equation tag placement (until such a time where this algorithm has
-% been straightened out).
-% \begin{macrocode}
- \afterassignment\remove@to@nnil
- \eq@final@linecount=\expandafter\@gobble\eq@parshape\@nnil
-% \end{macrocode}
-% Now, invoke the appropriate typesetter according to number placement
-% \begin{macrocode}
- \if\eq@hasNumber
- \if\eq@shiftnumber
- \csname eq@typeset@\eqnumside Shifted\endcsname
- \else
-% \end{macrocode}
-% If there is only one line and the tag doesn't have to be shifted, we
-% call a special procedure to put the tag correctly.
-% \begin{macrocode}
- \ifnum\eq@final@linecount=\@ne
- \csname eq@typeset@\eqnumside @single\endcsname
- \else
- \csname eq@typeset@\eqnumside\eqnumplace\endcsname
- \fi
- \fi
- \else
- \eq@typeset@Unnumbered
- \fi
- \endgroup
- \eq@botspace
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% These are temporary until the tag position algorithm gets
-% rewritten. At least the tag is positioned correctly for single-line
-% displays. The horizontal frame position is not correct but the
-% problem lies elsewhere.
-% \begin{macrocode}
-\def\eq@typeset@L@single{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \rlap{\kern-\leftskip\box\EQ@numbox}%
- \if F\eq@frame
- \else
- \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}%
- \fi
- \eq@dump@box\unhbox\EQ@box \@@par
-}
-\def\eq@typeset@R@single{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \if F\eq@frame
- \else
- \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}%
- \fi
- \rlap{\kern-\leftskip\kern\linewidth\kern-\wd\EQ@numbox\copy\EQ@numbox}%
- \eq@dump@box\unhbox\EQ@box
- \@@par
-}
-% \end{macrocode}
-%
-%
-%
-% \section{Special processing for end-of-equation}
-%
-% At the end of a displayed equation environment we need to peek ahead
-% for two things: following punction such as period or command that
-% should be pulled in for inclusion at the end of the equation; and
-% possibly also an \verb"\end{proof}" with an implied \dquoted{qed}
-% symbol that is traditionally included at the end of the display rather
-% than typeset on a separate line.
-% We could require that the users type \cs{qed} explicitly at the
-% end of the display when they want to have the display take notice of it.
-% But the reason for doing that would only be to save work for the
-% programmer; the most natural document markup would allow an inline
-% equation and a displayed equation at the end of a proof to differ only
-% in the environment name:
-% \begin{literalcode}
-% ... \begin{math} ... \end{math}.
-% \end{proof}
-% \end{literalcode}
-% versus
-% \begin{literalcode}
-% ...
-% \begin{dmath}
-% ...
-% \end{dmath}.
-% \end{proof}
-% \end{literalcode}
-% .
-% The technical difficulties involved in supporting this markup within
-% \latex2e are, admittedly, nontrivial.
-% Nonetheless, let's see how far we can go.
-%
-%
-% The variations that we will support are only the most
-% straightforward ones:
-% \begin{literalcode}
-% \end{dmath}.
-% \end{proof}
-% \end{literalcode}
-% or
-% \begin{literalcode}
-% \end{dmath}.
-% Perhaps a comment
-% \end{proof}
-% \end{literalcode}
-% .
-% If there is anything more complicated than a space after the
-% period we will not attempt to scan any further for a possible
-% \verb"\end{proof}".
-% This includes material such as:
-% \begin{literalcode}
-% \begin{figure}...\end{figure}%
-% \footnote{...}
-% \renewcommand{\foo}{...}
-% \par
-% \end{literalcode}
-% or even a blank line\mdash because in \latex a blank line is
-% equivalent to \cs{par} and the meaning of \cs{par} is
-% \dquoted{end-paragraph}; in my opinion if explicit end-of-paragraph
-% markup is given before the end of an element, it has to be respected,
-% and the preceding paragraph has to be fully finished off before
-% proceeding further, even inside an element like \dquoted{proof} whose
-% end-element formatting requires integration with the end of the
-% paragraph text.
-% And \tex nically speaking, a \cs{par} token that comes from a
-% blank line and one that comes from the sequence of characters
-% \verb"\" \verb"p" \verb"a" \verb"r" are equally explicit.
-% I hope to add support for \cs{footnote} in the future, as it
-% seems to be a legitimate markup possibility in that context from a
-% purely logical point of view, but there are additional technical
-% complications if one wants to handle it in full generality
-% \begin{dn}
-% mjd,1999/02/08
-% \end{dn}
-% .
-%
-%
-% \begin{macro}{\peek@branch}
-% This is a generalized \dquoted{look at next token and choose some action
-% based on it} function.
-% \begin{macrocode}
-\def\peek@branch#1#2{%
- \let\peek@b#1\let\peek@space#2\futurelet\@let@token\peek@a
-}
-\def\peek@skipping@spaces#1{\peek@branch#1\peek@skip@space}
-\def\peek@a{%
- \ifx\@let@token\@sptoken \expandafter\peek@space
- \else \expandafter\peek@b\fi
-}
-\lowercase{\def\peek@skip@space} {\futurelet\@let@token\peek@a}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\check@punct}
-% \changes{v0.96a}{2007/12/17}{Insert \cs{finish@end} if no special
-% case is found.}
-% For this one we need to recognize and grab for inclusion any of the
-% following tokens: \verb",;.!?", both catcode 12 (standard \latex
-% value) and catcode 13 (as might hold when the Babel package is
-% being used).
-% We do not support a space preceding the punctuation since that would
-% be considered simply invalid markup if a display-math environment were
-% demoted to in-line math; and we want to keep their markup as parallel as
-% possible.
-% If punctuation does not follow, then the \cs{check@qed} branch
-% is not applicable.
-% \begin{macrocode}
-\def\check@punct{\futurelet\@let@token\check@punct@a}
-\def\check@punct@a{%
- \edef\@tempa{%
- \ifx\@let@token\@sptoken\@nx\finish@end
- \else\ifx\@let@token ,\@nx\check@qed
- \else\ifx\@let@token .\@nx\check@qed
- \else\check@punct@b % check the less common possibilities
- \fi\fi\fi
- }%
- \@tempa
-}
-\begingroup
-\toks@a{%
- \ifx\@let@token ;\@nx\check@qed
- \else\ifx\@let@token ?\@nx\check@qed
- \else\ifx\@let@token !\@nx\check@qed
-}
-\toks@c{\fi\fi\fi}% matching with \toks@a
-\catcode`\.=\active \catcode`\,=\active \catcode`\;=\active
-\catcode`\?=\active \catcode`\!=\active
-\toks@b{%
- \else\ifx\@let@token ,\@nx\check@qed
- \else\ifx\@let@token .\@nx\check@qed
- \else\ifx\@let@token ;\@nx\check@qed
- \else\ifx\@let@token ?\@nx\check@qed
- \else\ifx\@let@token !\@nx\check@qed
- \else\@nx\finish@end
- \fi\fi\fi\fi\fi
-}
-\xdef\check@punct@b{%
- \the\toks@a\the\toks@b\the\toks@c
-}
-\endgroup
-% \end{macrocode}
-%
-% \begin{macrocode}
-\let\found@punct\@empty
-\def\check@qed#1{%
- \gdef\found@punct{#1}%
- \peek@skipping@spaces\check@qed@a
-}
-\def\check@qed@a{%
- \ifx\end\@let@token \@xp\check@qed@b
- \else \@xp\finish@end
- \fi
-}
-% \end{macrocode}
-% For each environment ENV that takes an implied qed at the end, the
-% control sequence ENVqed must be defined; and it must include suitable
-% code to yield the desired results in a displayed equation.
-% \begin{macrocode}
-\def\check@qed@b#1#2{%
- \@ifundefined{#2qed}{}{%
- \toks@\@xp{\found@punct\csname#2qed\endcsname}%
- \xdef\found@punct{\the\toks@}%
- }%
- \finish@end
- \end{#2}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\latex@end}
-% \begin{macro}{\finish@end}
-% The lookahead for punctuation following a display requires
-% mucking about with the normal operation of \cn{end}. Although
-% this is not exactly something to be done lightly, on the other hand this
-% whole package is so over-the-top anyway, what's a little more
-% going to hurt? And rationalizing this aspect of
-% equation markup is a worthy cause. Here is the usual
-% definition of \cs{end}.
-% \begin{literalcode}
-% \def\end#1{
-% \csname end#1\endcsname \@checkend{#1}%
-% \expandafter\endgroup\if@endpe\@doendpe\fi
-% \if@ignore \global\@ignorefalse \ignorespaces \fi
-% }
-% \end{literalcode}
-% We can improve the chances of this code surviving through future
-% minor changes in the fundamental definition of \cs{end} by taking a
-% little care in saving the original meaning.
-% \begin{macrocode}
-\def\@tempa#1\endcsname#2\@nil{\def\latex@end##1{#2}}
-\expandafter\@tempa\end{#1}\@nil
-\def\end#1{\csname end#1\endcsname \latex@end{#1}}%
-% \end{macrocode}
-% Why don't we call \cs{CheckCommand} here? Because that
-% doesn't help end users much; it works better to use it during package
-% testing by the maintainer.
-%
-%
-% If a particular environment needs to call a different end action, the
-% end command of the environment should be defined to gobble two args and
-% then call a function like \cs{check@punct@or@qed}.
-% \begin{macrocode}
-\def\check@punct@or@qed#1{%
- \xdef\found@punct{\@empty}% BRM: punctuation was being remembered past this eqn.
- % WSPR: err, why isn't that just \global\let\found@punct\@empty ?
- \def\finish@end{\csname end@#1\endcsname\latex@end{#1}}%
- \check@punct
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\eqpunct}
-% User-settable function for handling
-% the punctuation at the end of an equation. You could, for example,
-% define it to just discard the punctuation.
-% \begin{macrocode}
-\newcommand\eqpunct[1]{\thinspace#1}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\set@label}
-% \cs{set@label} just sets \cs{@currentlabel} but it
-% takes the counter as an argument, in the hope that \latex will some
-% day provide an improved labeling system that includes type info on the
-% labels.
-% \begin{macrocode}
-\providecommand\set@label[2]{\protected@edef\@currentlabel{#2}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@topspace}
-% \begin{macro}{\eq@botspace}
-% The action of \cs{eq@topspace} is complicated by the
-% need to test whether the \quoted{short} versions of the display skips
-% should be used. This can be done only after the final parshape
-% and indent have been determined, so the calls of this function are
-% buried relatively deeply in the code by comparison to the calls of
-% \cs{eq@botspace}. This also allows us to optimize
-% slightly by setting the above-skip with \cs{parskip} instead of
-% \cs{vskip}. \verb|#1| is either \cs{noindent} or
-% \verb"\vskip\parskip".
-%
-% BRM: Hmm; we need to do *@setspace BEFORE this for small skips to work!
-% \begin{macrocode}
-\def\eq@topspace#1{%
- \begingroup
- \global\let\EQ@shortskips\@False
-% \end{macrocode}
-% If we are in \env{dgroup} or \env{dgroup*} and not before the top
-% one, we just insert \cs{intereqskip}. Otherwise we must check for
-% shortskip.
-% \begin{macrocode}
- \if\@And{\eq@group}{\@Not\eq@GRP@first@dmath}%
-%<trace>\breqn@debugmsg{Between lines}%
- \parskip\intereqskip \penalty\intereqpenalty
-%<trace>\breqn@debugmsg{parskip=\the\parskip}%
- \else
- \eq@check@shortskip
- \if\EQ@shortskips
- \parskip\abovedisplayshortskip
- \aftergroup\belowdisplayskip\aftergroup\belowdisplayshortskip
-% \end{macrocode}
-% BRM: Not exactly \TeX's approach, but seems right\ldots
-% \begin{macrocode}
- \ifdim\predisplaysize>\z@\nointerlineskip\fi
- \else
- \parskip\abovedisplayskip
- \fi
- \fi
- \if F\eq@frame
- \else
- \addtolength\parskip{\eq@framesep+\eq@framewd}%
- \fi
-%<*trace>
- \breqn@debugmsg{Topspace: \theb@@le\EQ@shortskips, \parskip=\the\parskip,
- \predisplaysize=\the\predisplaysize}%
-%</trace>
- #1%
- \endgroup
-}
-% \end{macrocode}
-% \begin{macro}{\eq@check@shortskip}
-% \changes{v0.96a}{2007/12/17}{Insert \cs{finish@end} if no special
-% case is found.}
-% \changes{v0.97a}{2007/12/22}{Use design parameter and fix
-% shortskips properly.}
-% \begin{macrocode}
-\def\eq@check@shortskip {%
- \global\let\EQ@shortskips\@False
- \setlength\dim@a{\abovedisplayskip+\ht\EQ@numbox}%
-% \end{macrocode}
-% Here we work around the hardwired standard TeX value and use the
-% designer parameter instead.
-% \begin{macrocode}
- \ifdim\leftskip<\predisplaysize
- \else
-% \end{macrocode}
-% If the display was preceeded by a blank line, \cs{predisplaysize} is
-% $-\cs{maxdimen}$ and so we should insert a fairly large skip to
-% separate paragraphs, i.e., no short skip. Perhaps this should be a
-% third parameter \cs{abovedisplayparskip}.
-% \begin{macrocode}
- \ifdim -\maxdimen=\predisplaysize
- \else
- \if R\eqnumside
- \global\let\EQ@shortskips\@True
- \else
- \if\eq@shiftnumber
- \else
- \if T\eqnumplace
- \ifdim\dim@a<\eq@firstht
- \global\let\EQ@shortskips\@True
- \fi
- \else
- \setlength\dim@b{\eq@vspan/2}%
- \ifdim\dim@a<\dim@b
- \global\let\EQ@shortskips\@True
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% At the end of an equation, need to put in a pagebreak penalty
-% and some vertical space. Also set some flags to remove parindent
-% and extra word space if the current paragraph text continues without an
-% intervening \cs{par}.
-% \begin{macrocode}
-\def\eq@botspace{%
- \penalty\postdisplaypenalty
-% \end{macrocode}
-% Earlier calculations will have set \cs{belowdisplayskip} locally
-% to \cs{belowdisplayshortskip} if applicable. So we can just use
-% it here.
-% \begin{macrocode}
- \if F\eq@frame
- \else
- \addtolength\belowdisplayskip{\eq@framesep+\eq@framewd}%
- \fi
- \vskip\belowdisplayskip
- \@endpetrue % kill parindent if current paragraph continues
- \global\@ignoretrue % ignore following spaces
- \eq@resume@parshape
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\eq@resume@parshape}
-% This should calculate the total height of the equation,
-% including space above and below, and set prevgraf to the number it would
-% be if that height were taken up by normally-spaced normal-height
-% lines. We also need to restore parshape if it had a non-null
-% value before the equation. Not implemented yet.
-% \begin{macrocode}
-\def\eq@resume@parshape{}
-% \end{macrocode}
-% \end{macro}
-%
-% \section{Preprocessing the equation body}
-% \begin{macro}{\eq@startup}
-% Here is the function that initially collects the equation
-% material in a box.
-%
-% \begin{macrocode}
-\def\eq@startup{%
- \global\let\EQ@hasLHS\@False
- \setbox\z@\vbox\bgroup
- \noindent \@@math \displaystyle
- \penalty-\@Mi
-}
-% \end{macrocode}
-%
-% This setup defines the environment for the first typesetting
-% pass, note the \cs{hsize} value for example.
-% \begin{macrocode}
-\def\eq@setup@a{%
- \everymath\everydisplay
- %\let\@newline\eq@newline % future possibility?
- \let\\\eq@newline
- \let\insert\eq@insert \let\mark\eq@mark \let\vadjust\eq@vadjust
- \hsize\maxdimen \pretolerance\@M
-% \end{macrocode}
-% Here it is better not to use \cs{@flushglue} (0pt
-% plus1fil) for \cs{rightskip}, or else a negative penalty
-% (such as $-99$ for \cs{prerelpenalty}) will tempt
-% \tex to use more line breaks than necessary in the first typesetting
-% pass. Ideal values for \cs{rightskip} and
-% \cs{linepenalty} are unclear to me, but they are rather sensitively
-% interdependent. Choice of 10000 pt for rightskip is derived by
-% saying, let's use a value smaller than 1 fil and smaller than
-% \cs{hsize}, but more than half of \cs{hsize} so that if a line
-% is nearly empty, the glue stretch factor will always be less than 2.0
-% and so the badness will be less than 100 and so \tex will not issue
-% badness warnings.
-% \begin{macrocode}
- \linepenalty\@m
- \rightskip\z@\@plus\@M\p@ \leftskip\z@skip \parfillskip\z@skip
- \clubpenalty\@ne \widowpenalty\z@ \interlinepenalty\z@
-% \end{macrocode}
-% After a relation symbol is discovered, binop symbols should start
-% including a special offset space.
-% But until then \cs{EQ@prebin@space} is a no-op.
-% \begin{macrocode}
- \global\let\EQ@prebin@space\relax
-% \end{macrocode}
-% Set binoppenalty and relpenalty high to prohibit line breaks
-% after mathbins and mathrels. As a matter of fact, the penalties are
-% then omitted by \tex , since bare glue without a penalty is
-% \emph{not} a valid breakpoint if it occurs within
-% mathon\ndash mathoff items.
-% \begin{macrocode}
- \binoppenalty\@M \relpenalty\@M
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{figure}
-% \centering
-% The contents of an equation after the initial typesetting pass,
-% as shown by \cs{showlists}. This is the material on which the
-% \cs{eq@repack} function operates. The equation was
-% \begin{literalcode}
-% a=b +\left(\frac{c\sp 2}{2} -d\right) +(e -f) +g
-% \end{literalcode}
-% . The contents are shown in four parts in this figure and the next
-% three. The first part contains two line boxes, one for the mathon
-% node and one for the LHS.
-% \begin{literalcode}
-% \hbox(0.0+0.0)x16383.99998, glue set 1.6384
-% .\mathon
-% .\penalty -10000
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \penalty 1
-% \glue(\baselineskip) 7.69446
-% \hbox(4.30554+0.0)x16383.99998, glue set 1.63759
-% .\OML/cmm/m/it/10 a
-% .\glue 2.77771 minus 1.11108
-% .\penalty -10001
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \penalty 2
-% \glue(\lineskip) 1.0
-% ...
-% \end{literalcode}
-% \caption{Preliminary equation contents, part 1}
-% \end{figure}
-% \begin{figure}\centering
-% This is the first part of the RHS, up to the
-% \cs{right}, where a line break has been forced so that we can break
-% open the left-right box.
-% \begin{literalcode}
-% ...
-% \penalty 2
-% \glue(\lineskip) 1.0
-% \hbox(14.9051+9.50012)x16383.99998, glue set 1.63107
-% .\penalty -99
-% .\glue(\thickmuskip) 2.77771 minus 1.11108
-% .\OT1/cmr/m/n/10 =
-% .\glue(\thickmuskip) 2.77771 minus 1.11108
-% .\OML/cmm/m/it/10 b
-% .\penalty 888
-% .\glue -10.5553
-% .\rule(*+*)x0.0
-% .\penalty 10000
-% .\glue 10.5553
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OT1/cmr/m/n/10 +
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\hbox(14.9051+9.50012)x43.36298
-% ..\hbox(0.39998+23.60025)x7.36115, shifted -14.10013
-% ...\OMX/cmex/m/n/5 \hat \hat R
-% ..\hbox(14.9051+6.85951)x11.21368
-% ...\hbox(14.9051+6.85951)x11.21368
-% ... [fraction contents, elided]
-% ..\penalty 5332
-% ..\glue -10.5553
-% ..\rule(*+*)x0.0
-% ..\penalty 10000
-% ..\glue 10.5553
-% ..\glue(\medmuskip) 2.22217 minus 1.66663
-% ..\OMS/cmsy/m/n/10 \hat \hat @
-% ..\glue(\medmuskip) 2.22217 minus 1.66663
-% ..\OML/cmm/m/it/10 d
-% ..\hbox(0.39998+23.60025)x7.36115, shifted -14.10013
-% ...\OMX/cmex/m/n/5 \hat \hat S
-% .\penalty -10000
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \penalty 3
-% \glue(\lineskip) 1.0
-% ...
-% \end{literalcode}
-% \caption{Preliminary equation contents, part 2}
-% \end{figure}
-%
-% \begin{figure}
-% \centering
-% This is the remainder of the RHS after the post-\cs{right}
-% split.
-% \begin{literalcode}
-% ...
-% \penalty 3
-% \glue(\lineskip) 1.0
-% \hbox(7.5+2.5)x16383.99998, glue set 1.63239
-% .\penalty 888
-% .\glue -10.5553
-% .\rule(*+*)x0.0
-% .\penalty 10000
-% .\glue 10.5553
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OT1/cmr/m/n/10 +
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OT1/cmr/m/n/10 (
-% .\OML/cmm/m/it/10 e
-% .\penalty 5332
-% .\glue -10.5553
-% .\rule(*+*)x0.0
-% .\penalty 10000
-% .\glue 10.5553
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OMS/cmsy/m/n/10 \hat \hat @
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OML/cmm/m/it/10 f
-% .\kern1.0764
-% .\OT1/cmr/m/n/10 )
-% .\penalty 888
-% .\glue -10.5553
-% .\rule(*+*)x0.0
-% .\penalty 10000
-% .\glue 10.5553
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OT1/cmr/m/n/10 +
-% .\glue(\medmuskip) 2.22217 minus 1.66663
-% .\OML/cmm/m/it/10 g
-% .\kern0.35878
-% .\penalty -10000
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \glue(\baselineskip) 9.5
-% ...
-% \end{literalcode}
-% \caption{Preliminary equation contents, part 3}
-% \end{figure}
-%
-% \begin{figure}
-% \centering
-% This is the mathoff fragment.
-% \begin{literalcode}
-% ...
-% \glue(\baselineskip) 9.5
-% \hbox(0.0+0.0)x16383.99998, glue set 1.6384
-% .\mathoff
-% .\penalty 10000
-% .\glue(\parfillskip) 0.0
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \end{literalcode}
-% \caption{Preliminary equation contents, part 4}
-% \end{figure}
-%
-% \begin{macro}{\eq@capture}
-% \begin{macro}{\eq@punct}
-% If an equation ends with a \cs{right} delim, the last thing
-% on the math list will be a force-break penalty. Then don't
-% redundantly add another forcing penalty. (question: when does a
-% penalty after a linebreak not disappear? Answer: when you have
-% two forced break penalties in a row). Ending punctuation, if
-% any, goes into the last box with the mathoff kern. If the math list
-% ends with a slanted letter, then there will be an italic correction
-% added after it by \tex . Should we remove it? I guess
-% so.
-%
-%
-% \subsection{Capturing the equation}
-%
-% BRM: There's a problem here (or with \cs{ss@scan}). If the LHS has
-% \cs{left} \cs{right} pairs, \ss@scan gets involved. It seems to produce
-% a separate box marked w/\cs{penalty} 3. But it appears that \cs{eq@repack}
-% is only expecting a single box for the LHS; when it measures that
-% box it's missing the (typically larger) bracketted section,
-% so the LHS is measured => 0pt (or very small).
-% I'm not entirely clear what Michael had in mind for this case;
-% whether it's an oversight, or whether I've introduced some other bug.
-% At any rate, my solution is to measure the RHS (accumulated in \cs{EQ@box}),
-% at the time of the relation, and subtract that from the total size.
-% \begin{macrocode}
-\newdimen\eq@wdR\eq@wdR\z@%BRM
-\def\eq@capture{%
- \ifnum\lastpenalty>-\@M \penalty-\@Mi \fi
-% \end{macrocode}
-% We want to keep the mathoff kern from vanishing at the line break,
-% so that we can reuse it later.
-% \begin{macrocode}
- \keep@glue\@@endmath
- \eq@addpunct
- \@@par
- \eq@wdL\z@
-% \end{macrocode}
-% First snip the last box, which contains the mathoff node, and put it
-% into \cs{EQ@box}. Then when we call \cs{eq@repack} it
-% will recurse properly.
-% \begin{macrocode}
- \setbox\tw@\lastbox
- \global\setbox\EQ@box\hbox{\unhbox\tw@\unskip\unskip\unpenalty}%
- \unskip\unpenalty
- \global\setbox\EQ@copy\copy\EQ@box
-%% \global\setbox\EQ@vimcopy\copy\EQ@vimbox
- \clubpenalty\z@
-%\batchmode\showboxbreadth\maxdimen\showboxdepth99\showlists\errorstopmode
- \eq@wdR\z@%BRM: eq@wdL patch
- \eq@repack % recursive
-% \end{macrocode}
-% Finally, add the mathon item to \cs{EQ@box} and \cs{EQ@copy}.
-% \begin{macrocode}
- \setbox\tw@\lastbox
- \global\setbox\EQ@box\hbox{\unhcopy\tw@\unskip\unpenalty \unhbox\EQ@box}%
- \global\setbox\EQ@copy\hbox{\unhbox\tw@\unskip\unpenalty \unhbox\EQ@copy}%
-%\batchmode\showbox\EQ@copy \showthe\eq@wdL\errorstopmode
- \ifdim\eq@wdR>\z@% BRM: eq@wdL patch
- \setlength\dim@a{\wd\EQ@box-\eq@wdR
- % Apparently missing a \thickmuskip = 5mu = 5/18em=0.27777777777.. ?
- + 0.2777777777777em}% FUDGE??!?!?!
- \ifdim\dim@a>\eq@wdL
-%<*trace>
- \breqn@debugmsg{Correcting LHS from \the\eq@wdL\space to
- \the\dim@a = \the\wd\EQ@box - \the\eq@wdR}%
-%</trace>
- \eq@wdL\dim@a
- \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}%
- \fi
- \fi
-%<*trace>
- \breqn@debugmsg{Capture: total length=\the\wd\EQ@box \MessageBreak
- ==== has LHS=\theb@@le\EQ@hasLHS, \eq@wdL=\the\eq@wdL, \eq@wdR=\the\eq@wdR,
- \MessageBreak
- ==== \eq@wdCond=\the\eq@wdCond}%
-%</trace>
- \egroup % end vbox started earlier
-%<*trace>
-%\debugwr{EQ@box}\debug@box\EQ@box
-%\debugwr{EQ@copy}\debug@box\EQ@copy
-%</trace>
-}
-% \end{macrocode}
-% Now we have two copies of the equation, one in \cs{EQ@box},
-% and one in \cs{EQ@copy} with inconvenient stuff like inserts and
-% marks omitted.
-%
-% \cs{eq@addpunct} is for tacking on text punctuation at the end
-% of a display, if any was captured by the \quoted{gp} lookahead.
-% \begin{macrocode}
-\def\eq@addpunct{%
- \ifx\found@punct\@empty
- \else \eqpunct{\found@punct}%
- \fi
- % BRM: Added; the punctuation kept getting carried to following environs
- \xdef\found@punct{\@empty}%
- \EQ@afterspace
-}
-% \end{macrocode}
-% Needed for the \env{dseries} environment, among other things.
-% \begin{macrocode}
-\global\let\EQ@afterspace\@empty
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\eq@repack}
-% The \cs{eq@repack} function looks at the information at hand
-% and proceeds accordingly.
-%
-% TeX Note: this scans BACKWARDS from the end of the math.
-% \begin{macrocode}
-\def\eq@repack{%
-% A previous penalty of 3 on the vertical list means that we need
-% to break open a left-right box.
-% \begin{macrocode}
- \ifcase\lastpenalty
- % case 0: normal case
- \setbox\tw@\lastbox
- \eq@repacka\EQ@copy \eq@repacka\EQ@box
- \unskip
- \or % case 1: finished recursing
-% \end{macrocode}
-% Grab the mathon object since we need it to inhibit line breaking at
-% bare glue nodes later.
-% \begin{macrocode}
- \unpenalty
- \setbox\tw@\lastbox
- \eq@repacka\EQ@copy \eq@repacka\EQ@box
- \@xp\@gobble
- \or % case 2: save box width = LHS width
-% \end{macrocode}
-% Don't need to set \cs{EQ@hasLHS} here because it was set earlier
-% if applicable.
-% \begin{macrocode}
- \unpenalty
- \setbox\tw@\lastbox
- \setbox\z@\copy\tw@ \setbox\z@\hbox{\unhbox\z@\unskip\unpenalty}%
- \addtolength\eq@wdL{\wd\z@}
- \setlength\eq@wdR{\wd\EQ@box}% BRM: eq@wdL patch
- \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}%
-% \end{macrocode}
-% At this point, box 2 typically ends with
-% \begin{literalcode}
-% .\mi10 a
-% .\glue 2.77771 plus 2.77771
-% .\penalty -10001
-% .\glue(\rightskip) 0.0 plus 10000.0
-% \end{literalcode}
-% and we want to ensure that the thickmuskip glue gets removed.
-% And we now arrange for \cs{EQ@copy} and \cs{EQ@box} to
-% keep the LHS in a separate subbox; this is so that we can introduce a
-% different penalty before the first relation symbol if necessary,
-% depending on the layout decisions that are made later.
-% \begin{macrocode}
- \global\setbox\EQ@copy\hbox{%
- \hbox{\unhcopy\tw@\unskip\unpenalty\unskip}%
- \box\EQ@copy
- }%
- \global\setbox\EQ@box\hbox{%
- \hbox{\unhbox\tw@\unskip\unpenalty\unskip}%
- \box\EQ@box
- }%
- \unskip
- \or % case 3: unpack left-right box
- \unpenalty
- \eq@lrunpack
- \else
- \breqn@repack@err
- \fi
- \eq@repack % RECURSE
-}
-% \end{macrocode}
-% Error message extracted to streamline calling function.
-% \begin{macrocode}
-\def\breqn@repack@err{%
- \PackageError{breqn}{eq@repack penalty neq 0,1,2,3}\relax
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@repacka}
-% We need to transfer each line into two separate boxes, one
-% containing everything and one that omits stuff like \cs{insert}s
-% that would interfere with measuring.
-% \begin{macrocode}
-\def\eq@repacka#1{%
- \global\setbox#1\hbox{\unhcopy\tw@ \unskip
- \count@-\lastpenalty
- \ifnum\count@<\@M \else \advance\count@-\@M \fi
- \unpenalty
-% \end{macrocode}
-% If creating the measure copy, ignore all cases above case 3 by
-% folding them into case 1.
-% \begin{macrocode}
- \ifx\EQ@copy#1\ifnum\count@>\thr@@ \count@\@ne\fi\fi
- \ifcase\count@
- % case 0, normal line break
- \penalty-\@M % put back the linebreak penalty
- \or % case 1, do nothing (end of equation)
- \relax
- \or % case 2, no-op (obsolete case)
- \or % case 3, transfer vspace and/or penalty
- \ifx#1\EQ@box \eq@revspace \else \eq@revspaceb \fi
- \or % case 4, put back an insert
- \eq@reinsert
- \or % case 5, put back a mark
- \eq@remark
- \or % case 6, put back a vadjust
- \eq@readjust
- \else % some other break penalty
- \penalty-\count@
- \fi
- \unhbox#1}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@nulldisplay}
-% Throw in a null display in order to get predisplaysize \etc .
-% My original approach here was to start the null display, then measure
-% the equation, and set a phantom of the equation's first line before
-% ending the null display. That would allow finding out if \tex used
-% the short displayskips instead of the normal ones. But because of
-% some complications with grouping and the desirability of omitting
-% unnecessary invisible material on the vertical list, it seems better to
-% just collect information about the display (getting \cs{prevdepth}
-% requires \cs{halign}) and manually perform our own version of
-% \TeX's shortskip calculations. This approach also gives greater
-% control, \eg , the threshold amount of horizontal space between
-% predisplaysize and the equation's left edge that determines when the
-% short skips kick in becomes a designer-settable parameter rather than
-% hardwired into \TeX .
-% \begin{macrocode}
-\def\eq@nulldisplay{%
- \begingroup \frozen@everydisplay\@emptytoks
- \@@display
- \predisplaypenalty\@M \postdisplaypenalty\@M
- \abovedisplayskip\z@skip \abovedisplayshortskip\z@skip
- \belowdisplayskip\z@skip \belowdisplayshortskip\z@skip
- \xdef\EQ@displayinfo{%
- \prevgraf\the\prevgraf \predisplaysize\the\predisplaysize
- \displaywidth\the\displaywidth \displayindent\the\displayindent
- \listwidth\the\linewidth
-% \end{macrocode}
-% Not sure how best to test whether leftmargin should be
-% added. Let's do this for now [mjd,1997/10/08].
-% \begin{macrocode}
- \ifdim\displayindent>\z@
- \advance\listwidth\the\leftmargin
- \advance\listwidth\the\rightmargin
- \fi
- \relax}%
-% \end{macrocode}
-% An \cs{halign} containing only one \cs{cr} (for the
-% preamble) puts no box on the vertical list, which means that no
-% \cs{baselineskip} will be added (so we didn't need to set it to
-% zero) and the previous value of prevdepth carries through. Those
-% properties do not hold for an empty simple equation without
-% \cs{halign}.
-% \begin{macrocode}
- \halign{##\cr}%
- \@@enddisplay
- \par
- \endgroup
- \EQ@displayinfo
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@newline}
-% \begin{macro}{\eq@newlinea}
-% \begin{macro}{\eq@newlineb}
-% Here we use \cs{@ifnext} so that in a sequence like
-% \begin{literalcode}
-% ...\\
-% [a,b]
-% \end{literalcode}
-% \latex does not attempt to interpret the \verb"[a,b]" as a
-% vertical space amount. We would have used \cs{eq@break} in the
-% definition of \cs{eq@newlineb} except that it puts in a
-% \cs{keep@glue} object which is not such a good idea if a mathbin
-% symbol follows \mdash the indent of the mathbin will be wrong because
-% the leading negative glue will not disappear as it should at the line
-% break.
-% \begin{macrocode}
-\def\eq@newline{%
- \@ifstar{\eq@newlinea\@M}{\eq@newlinea\eqinterlinepenalty}}
-\def\eq@newlinea#1{%
- \@ifnext[{\eq@newlineb{#1}}{\eq@newlineb{#1}[\maxdimen]}}
-\def\eq@newlineb#1[#2]{\penalty-\@M}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@revspace}
-% \begin{macro}{\eq@revspaceb}
-% When \cs{eq@revspace} (re-vspace) is called, we are the
-% end of an equation line; we need to remove the existing penalty of
-% $-10002$ in order to put a vadjust object in front of it, then put
-% back the penalty so that the line break will still take place in the
-% final result.
-% \begin{macrocode}
-\def\eq@revspace{%
- \global\setbox\EQ@vimbox\vbox{\unvbox\EQ@vimbox
- \unpenalty
- \global\setbox\@ne\lastbox}%
- \@@vadjust{\unvbox\@ne}%
- \penalty-\@M
-}
-% \end{macrocode}
-% The b version is used for the \cs{EQ@copy} box.
-% \begin{macrocode}
-\def\eq@revspaceb{%
- \global\setbox\EQ@vimcopy\vbox{\unvbox\EQ@vimcopy
- \unpenalty
- \global\setbox\@ne\lastbox}%
- \@@vadjust{\unvbox\@ne}%
- \penalty-\@M
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@break}
-% The function \cs{eq@break} does a preliminary linebreak with
-% a flag penalty.
-% \begin{macrocode}
-\def\eq@break#1{\penalty-1000#1 \keep@glue}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \section{Choosing optimal line breaks}
-% The question of what line width to use when breaking an
-% equation into several lines is best examined in the light of an extreme
-% example. Suppose we have a two-column layout and a displayed
-% equation falls inside a second-level list with nonzero leftmargin and
-% rightmargin. Then we want to try in succession a number of
-% different possibilities. In each case if the next possibility is
-% no wider than the previous one, skip ahead to the one after.
-% \begin{enumerate}
-% \item First try linewidth(2), the linewidth for the current
-% level-2 list.
-%
-%
-% \item If we cannot find adequate linebreaks at that width, next try
-% listwidth(2), the sum of leftmargin, linewidth, and rightmargin for
-% the current list.
-%
-%
-% \item If we cannot find linebreaks at that width, next try linewidth
-% (1) (skipping this step if it is no larger then
-% listwidth(2)).
-%
-%
-% \item If we cannot find linebreaks at that width, next try
-% listwidth(1).
-%
-%
-% \item If we cannot find linebreaks at that width, next try column
-% width.
-%
-%
-% \item If we cannot find linebreaks at that width, next try text
-% width.
-%
-%
-% \item If we cannot find linebreaks at that width, next try equation
-% width, if it exceeds text width (\ie , if the style allows equations
-% to extend into the margins).
-%
-%
-% \end{enumerate}
-%
-%
-% \begin{figure}
-% \centering
-% needs work
-% \caption{first-approximation parshape for equations}\label{f:parshape-1}
-% \end{figure}
-%
-% At any given line width, we run through a series of parshape
-% trials and, essentially, use the first one that gives decent line
-% breaks.
-% But the process is a bit more complicated in fact.
-% In order to do a really good job of setting up the parshapes, we
-% need to know how many lines the equation will require.
-% And of course the number of lines needed depends on the parshape!
-% So as our very first trial we run a simple first-approximation
-% parshape (Figure~\vref{f:parshape-1}) whose
-% main purpose is to get an estimate on the number of lines that will be
-% needed; it chooses a uniform indent for all lines after the first one
-% and does not take any account of the equation number.
-% A substantial majority of equations only require one line anyway,
-% and for them this first trial will succeed.
-% In the one-line case if there is an equation number and it doesn't
-% fit on the same line as the equation body, we don't go on to other
-% trials because breaking up the equation body will not gain us
-% anything\mdash we know that we'll have to use two lines in any case
-% \mdash so we might as well keep the equation body together on one line
-% and shift the number to a separate line.
-%
-% If we learn from the first trial that the equation body
-% requires more than one line, the next parshape trial involves adjusting
-% the previous parshape to leave room for the equation number, if
-% present. If no number is present, again no further trials are
-% needed.
-%
-% Some remarks about parshape handling. The \tex
-% primitive doesn't store the line specs anywhere, \verb"\the\parshape"
-% only returns the number of line specs. This makes it well nigh
-% impossible for different packages that use \cs{parshape} to work
-% together. Not that it would be terribly easy for the package
-% authors to make inter-package collaboration work, if it were
-% possible. If we optimistically conjecture that
-% someone some day may take on such a task, then the thing to do,
-% obviously, is provide a parshape interface that includes a record of all
-% the line specs. For that we designate a macro \cs{@parshape}
-% which includes not only the line specs, but also the line count and even
-% the leading \cs{parshape} token.
-% This allows it to be directly executed without an auxiliary if-empty
-% test. It should include a trailing \cs{relax} when it has a
-% nonempty value.
-% \begin{macrocode}
-\let\@parshape\@empty
-% \end{macrocode}
-%
-%
-% The function \cs{eq@measure} runs line-breaking trials
-% on the copy of the equation body that is stored in the box register
-% \cs{EQ@copy}, trying various possible layouts in order of
-% preference until we get successful line breaks, where \quoted{successful}
-% means there were no overfull lines. The result of the trials is,
-% first, a parshape spec that can be used for typesetting the real
-% equation body in \cs{EQ@box}, and second, some information that
-% depends on the line breaks such as the depth of the last line, the
-% height of the first line, and positioning information for the equation
-% number. The two main variables in the equation layout are the line
-% width and the placement of the equation number, if one is present.
-%
-%
-% \begin{macro}{\eq@measure}
-% Run linebreak trials on the equation contents and measure the
-% results.
-% \begin{macrocode}
-\def\eq@measure{%
-% \end{macrocode}
-% If an override value is given for indentstep in the env options, use
-% it.
-% \begin{macrocode}
- \ifdim\eq@indentstep=\maxdimen \eq@indentstep\eqindentstep \fi
-% \end{macrocode}
-% If \cs{eq@linewidth} is nonzero at this point, it means that
-% the user specified a particular target width for this equation.
-% In that case we override the normal list of trial widths.
-% \begin{macrocode}
- \ifdim\eq@linewidth=\z@ \else \edef\eq@linewidths{{\the\eq@linewidth}}\fi
- \begingroup \eq@params
- \leftskip\z@skip
-% \end{macrocode}
-% Even if \cs{hfuzz} is greater than zero a box whose contents
-% exceed the target width by less then hfuzz still has a reported badness
-% value of 1000000 (infinitely bad). Because we use inf-bad
-% to test whether a particular trial succeeds or fails, we want to make
-% such boxes return a smaller badness. To this end we include an
-% \cs{hfuzz} allowance in \cs{rightskip}. In fact,
-% \cs{eq@params} ensures that \cs{hfuzz} for equations is at
-% least 1pt.
-% \begin{macrocode}
- \rightskip\z@\@plus\columnwidth\@minus\hfuzz
-% \eqinfo
- \global\EQ@continue{\eq@trial}%
- \eq@trial % uses \eq@linewidths
- \eq@failout % will be a no-op if the trial succeeded
- \endgroup
-% \end{macrocode}
-% \quoted{local} parameter settings are passed outside the endgroup through
-% \cs{EQ@trial}.
-% \begin{macrocode}
- \EQ@trial
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-%<*trace>
-\def\debug@showmeasurements{%
- \breqn@debugmsg{=> \number\eq@lines\space lines}%
- \begingroup
- \def\@elt##1X##2{\MessageBreak==== \space\space##1/##2}%
- \let\@endelt\@empty
- \breqn@debugmsg{=> trial info:\eq@measurements}%
- \breqn@debugmsg{=> bounding box: \the\eq@wdT x\the\eq@vspan, badness=\the\eq@badness}%
- \let\@elt\relax \let\@endelt\relax
- \endgroup
-}
-\def\debug@showmeasurements{%
- \begingroup
- \def\@elt##1X##2{\MessageBreak==== ##1/##2}%
- \let\@endelt\@empty
- \breqn@debugmsg{===> Measurements: \number\eq@lines\space lines
- \eq@measurements
- \MessageBreak
- ==== bounding box: \the\eq@wdT x\the\eq@vspan, badness=\the\eq@badness
- \MessageBreak
- ==== \leftskip=\the\leftskip, \rightskip=\the\rightskip}%
- \endgroup
-}
-%</trace>
-% \end{macrocode}
-%
-% Layout Trials Driver
-% Basically, trying different sequences of parshapes.
-%
-%
-% \begin{macro}{\EQ@trial}
-% Init.
-% \begin{macrocode}
-\let\EQ@trial\@empty
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\EQ@continue}
-% This is a token register used to carry trial info past a
-% group boundary with only one global assignment.
-% \begin{macrocode}
-\newtoks\EQ@continue
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\EQ@widths}
-% This is used for storing the actual line-width info of the equation
-% contents after breaking.
-% \begin{macrocode}
-\let\EQ@widths\@empty
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ@fallback}
-% \begin{macrocode}
-\let\EQ@fallback\@empty
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@linewidths}
-% This is the list of target widths for line breaking.
-%
-%========================================
-% BRM: Odd; I don't think I've seen this use anything but \cs{displaywidth}...
-% \begin{macrocode}
-\def\eq@linewidths{\displaywidth\linewidth\columnwidth}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@trial}
-% The \cs{eq@trial} function tries each candidate
-% line width in \cs{eq@linewidths} until an equation layout is found
-% that yields satisfactory line breaks.
-% \begin{macrocode}
-\def\eq@trial{%
- \ifx\@empty\eq@linewidths
- \global\EQ@continue{}%
- \else
- \iffalse{\fi \@xp\eq@trial@a \eq@linewidths}%
- \fi
- \the\EQ@continue
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@trial@a}
-% The \cs{eq@trial@a} function reads the leading line
-% width from \cs{eq@linewidths}; if the new line width is greater
-% than the previous one, start running trials with it; otherwise do
-% nothing with it.
-% Finally, run a peculiar \cs{edef} that leaves
-% \cs{eq@linewidths} redefined to be the tail of the list.
-% If we succeed in finding satisfactory line breaks
-% for the equation, we will reset \cs{EQ@continue} in such a
-% way that it will terminate the current trials.
-% An obvious branch here would be to check whether the width of
-% \cs{EQ@copy} is less than \cs{eq@linewidth} and go immediately
-% to the one-line case if so.
-% However, if the equation contains more than one RHS, by
-% default each additional RHS starts on a new line\mdash \ie , we want
-% the ladder layout anyway.
-% So we choose the initial trial on an assumption of multiple lines
-% and leave the one-line case to fall out naturally at a later point.
-% \begin{macrocode}
-\def\eq@trial@a#1{%
- \dim@c#1\relax
- \if T\eq@frame \eq@frame@adjust\dim@c \fi
- \ifdim\dim@c>\eq@linewidth
- \eq@linewidth\dim@c
-%<trace> \breqn@debugmsg{Choose Shape for width(#1)=\the\eq@linewidth}%
- \let\eq@trial@b\eq@trial@d
- \csname eq@try@layout@\eq@layout\endcsname
-%<trace> \else
-%<trace> \breqn@debugmsg{Next width (#1) is shorter; skip it}%
- \fi
- \edef\eq@linewidths{\iffalse}\fi
-}
-\def\eq@frame@adjust#1{%
- %\addtolength#1{-2\eq@framewd-2\eq@framesep}%
- \dim@a\eq@framewd \advance\dim@a\eq@framesep
- \advance#1-2\dim@a
-}
-% \end{macrocode}
-% \end{macro}
-%========================================
-% Note curious control structure.
-% Try to understand interaction of \cs{EQ@fallback}, \cs{EQ@continue},
-% \cs{eq@failout}
-% \begin{macrocode}
-\def\eq@trial@succeed{%
- \aftergroup\@gobbletwo % cancel the \EQ@fallback code; see \eq@trial@c (?)
- \global\EQ@continue{\eq@trial@done}%
-}
-% \end{macrocode}
-% \begin{macro}{\eq@trial@done}
-% Success.
-% \begin{macrocode}
-\def\eq@trial@done{%
-%<trace> \breqn@debugmsg{End trial: Success!}%
- \let\eq@failout\relax
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@trial@init}
-% This is called from \cs{eq@trial@b} to initialize or
-% re-initialize certain variables as needed when running one or more
-% trials at a given line width.
-% By default assume success, skip the fallback code.
-% \begin{macrocode}
-\def\eq@trial@init{\global\let\EQ@fallback\eq@nextlayout}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@nextlayout}
-%
-% In the fallback case cancel the current group to avoid unnecessary
-% group nesting (with associated save-stack cost, \etc ).
-% \begin{macrocode}
-\def\eq@nextlayout#1{%
- \endgroup
-%<trace> \breqn@debugmsg{Nope ... that ain't gonna work.}%
- \begingroup #1%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@failout}
-%
-% .
-% \begin{macrocode}
-\def\eq@failout{%
-%<trace>\breqn@debugmsg{End trial: failout}%
- \global\let\EQ@trial\EQ@last@trial
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@trial@save}
-%
-% Save the parameters of the current trial.
-% \begin{macrocode}
-\def\eq@trial@save#1{%
-%<*trace>
-% \begingroup \def\@elt##1X##2{\MessageBreak==== \space\space##1/##2}\let\@endelt\@empty\breqn@debugmsg{=> trial info:\eq@measurements}%
-% \breqn@debugmsg{=> bounding box: \the\eq@wdT x\the\eq@vspan, badness=\the\eq@badness\MessageBreak}%
-% \let\@elt\relax \let\@endelt\relax
-% \endgroup
-%</trace>
- \xdef#1{%
- \eq@linewidth\the\eq@linewidth
- % save info about the fit
- \eq@lines\the\eq@lines \eq@badness\the\eq@badness \def\@nx\eq@badline{\eq@badline}%
- % save size info
- \eq@wdT\the\eq@wdT \eq@wdMin\the\eq@wdMin
- \eq@vspan\the\eq@vspan \eq@dp\the\eq@dp \eq@firstht\the\eq@firstht
- % save info about the LHS
- \eq@wdL\the\eq@wdL \def\@nx\EQ@hasLHS{\EQ@hasLHS}%
- % save info about the numbering
- \def\@nx\eq@hasNumber{\eq@hasNumber}%
- % save info about the chosen layout
- \def\@nx\eq@layout{\eq@layout}%
- \def\@nx\eq@parshape{\@parshape}%
- \def\@nx\eq@measurements{\eq@measurements}%
- \def\@nx\adjust@rel@penalty{\adjust@rel@penalty}%
- \def\@nx\eq@shiftnumber{\eq@shiftnumber}%
- \def\@nx\eq@isIntertext{\@False}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@trial@b}
-%
-% By default this just runs \cs{eq@trial@c}; \cf
-% \cs{eq@trial@d}.
-% \begin{macrocode}
-\def\eq@trial@b{\eq@trial@c}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@trial@c}
-%
-% Run the equation contents through the current parshape.
-% \begin{macrocode}
-\def\eq@trial@c#1#2{%
-%<trace> \breqn@debugmsg{Trying layout "#1" with\MessageBreak==== parshape\space\@xp\@gobble\@parshape}%
- \begingroup
- \eq@trial@init
- \def\eq@layout{#1}%
- \setbox\z@\vbox{%
- \hfuzz\maxdimen
- \eq@trial@p % run the given parshape
- \if\@Not{\eq@badline}%
- \eq@trial@save\EQ@trial
-% \end{macrocode}
-% If there is a number, try the same parshape again with adjustments
-% to make room for the number.
-%
-% This is an awkward place for this:
-% It only allows trying to fit the number w/the SAME layout shape!
-% \begin{macrocode}
- \if\eq@hasNumber\eq@retry@with@number\fi
- \if L\eq@layout \eq@check@density
- \else
- \if\@Not{\eq@badline}%
- \eq@trial@succeed
- \fi
- \fi
- \else
- \eq@trial@save\EQ@last@trial
- \fi
- }%
- \EQ@fallback{#2}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@trial@d}
-% \begin{macrocode}
-\def\eq@trial@d#1#2{\eq@trial@c{#1}{}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@check@density}
-% \begin{macrocode}
-\def\eq@check@density{%
-%<trace> \breqn@debugmsg{Checking density for layout L}%
- \if\@Or{\@Not\EQ@hasLHS}{\eq@shortLHS}%
-%<trace> \breqn@debugmsg{Density check: No LHS, or is short; OK}%
- \eq@trial@succeed
- \else\if\eq@dense@enough
- \eq@trial@succeed
- \fi\fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@shortLHS}
-% Test to see if we need to apply the \cs{eq@dense@enough} test.
-% \begin{macrocode}
-\def\eq@shortLHS{\ifdim\eq@wdL>.44\eq@wdT 1\else 0\fi 0}
-% \end{macrocode}
-% \end{macro}
-%
-%\verb|\def\eq@shortLHS{\@False}|
-%========================================
-% \begin{macro}{\eq@trial@p}
-% Run a trial with the current \cs{@parshape} and measure it.
-% \begin{macrocode}
-\def\eq@trial@p{%
- \@parshape %
- \eq@dump@box\unhcopy\EQ@copy
- {\@@par}% leave \parshape readable
- \eq@lines\prevgraf
- \eq@fix@lastline
- \let\eq@badline\@False
- \if i\eq@layout \ifnum\eq@lines>\@ne \let\eq@badline\@True \fi\fi
- \eq@curline\eq@lines % loop counter for eq@measure@lines
- \let\eq@measurements\@empty
- \eq@ml@record@indents
- \eq@measure@lines
- \eq@recalc
-%<trace> \debug@showmeasurements
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\adjust@rel@penalty}
-% Normally this is a no-op.
-% \begin{macrocode}
-\let\adjust@rel@penalty\@empty
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@fix@lastline}
-% Remove parfillskip from the last line box.
-% \begin{macrocode}
-\def\eq@fix@lastline{%
- \setbox\tw@\lastbox \dim@b\wd\tw@
- \eq@dp\dp\tw@
-% \end{macrocode}
-% Remove \cs{parfillskip} but retain \cs{rightskip}.
-% Need to keep the original line width for later shrink testing.
-% \begin{macrocode}
- \nointerlineskip\hbox to\dim@b{\unhbox\tw@
- \skip@c\lastskip \unskip\unskip\hskip\skip@c
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@recalc}
-% Calculate \cs{eq@wdT} et cetera.
-% \begin{macrocode}
-\def\eq@recalc{%
- \eq@wdT\z@ \eq@wdMin\maxdimen \eq@vspan\z@skip \eq@badness\z@
- \let\@elt\eq@recalc@a \eq@measurements \let\@elt\relax
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@recalc@a}
-% \begin{macrocode}
-\def\eq@recalc@a#1x#2+#3\@endelt{%
- \eq@firstht#2\relax
- \let\@elt\eq@recalc@b
- \@elt#1x#2+#3\@endelt
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@recalc@b}
-% \begin{macrocode}
-\def\eq@recalc@b#1X#2,#3x#4+#5@#6\@endelt{%
- \setlength\dim@a{#2+#3}%
- \ifdim\dim@a>\eq@wdT \eq@wdT\dim@a \fi
- \ifdim\dim@a<\eq@wdMin \eq@wdMin\dim@a \fi
- \eq@dp#5\relax
- \addtolength\eq@vspan{#1+#4+\eq@dp}%
-% \end{macrocode}
-% Record the max badness of all the lines in \cs{eq@badness}.
-% \begin{macrocode}
- \ifnum#6>\eq@badness \eq@badness#6\relax\fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@layout}
-% A value of \verb"?" for \cs{eq@layout} means that we should
-% deduce which layout to use by looking at the size of the components.
-% Any other value means we have a user-specified override on the
-% layout.
-%
-% Layout Definitions.
-% Based on initial equation measurements, we can choose a sequence of
-% candidate parshapes that the equation might fit into.
-% We accept the first shape that `works', else fall to next one.
-% [The sequence is hardcoded in the \cs{eq@try@layout@}<shape>
-% Would it be useful be more flexible? (eg. try layouts LDA, in order...)]
-% \begin{macrocode}
-\def\eq@layout{?}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@try@layout@?}
-% This is a branching function used to choose a suitable layout if
-% the user didn't specify one in particular.
-%
-% Default layout:
-% Try Single line layout first, else try Multiline layouts
-% \begin{macrocode}
-\@namedef{eq@try@layout@?}{%
- \let\eq@trial@b\eq@trial@c
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
-% \eq@trial@b{i}{\eq@try@layout@multi}%
- \setlength\dim@a{\wd\EQ@copy-2em}% Fudge; can't shrink more than this?
- % if we're in a numbered group, try hard to fit within the numbers
- \dim@b\eq@linewidth
- \if\eq@shiftnumber\else\if\eq@group
- \if\eq@hasNumber\addtolength\dim@b{-\wd\EQ@numbox-\eqnumsep}%
- \else\if\grp@hasNumber\addtolength\dim@b{-\wd\GRP@numbox-\eqnumsep}%
- \fi\fi\fi\fi
- \ifdim\dim@a<\dim@b% Do we even have a chance of fitting to one line?
-%<trace> \breqn@debugmsg{Choose Shape: (\the\wd\EQ@copy) may fit in \the\dim@b}%
-% \end{macrocode}
-% BRM: assuming it might fit, don't push too hard
-% \begin{macrocode}
- \setlength\dim@b{\columnwidth-\dim@a+\eq@wdCond}%
- \rightskip\z@\@plus\dim@b\@minus\hfuzz
- \eq@trial@b{i}{\eq@try@layout@multi}%
- \else
-%<*trace>
- \breqn@debugmsg{Choose Shape: Too long (\the\wd\EQ@copy) for one line
- (free width=\the\dim@b)}%
-%</trace>
- \eq@try@layout@multi
- \fi
-}
-% \end{macrocode}
-% Layout Multiline layout:
-% If no LHS, try Stepped(S) layout
-% Else try Stepped(S), Ladder(L), Drop-ladder(D) or Stepladder(l), depending on LHS length.
-% \begin{macrocode}
-\def\eq@try@layout@multi{%
- \if\EQ@hasLHS
- \ifdim\eq@wdL>\eq@linewidth
-%<trace> \breqn@debugmsg{Choose Shape: LHS \the\eq@wdL > linewidth}%
-% \end{macrocode}
-% Find the total width of the RHS.
-% If it is relatively short, a step layout is the thing to try.
-% \begin{macrocode}
- \setlength\dim@a{\wd\EQ@copy-\eq@wdL}%
- \ifdim\dim@a<.25\eq@linewidth \eq@try@layout@S
- \else \eq@try@layout@l
- \fi
- % BRM: Originally .7: Extreme for L since rhs has to wrap within the remaining 30+%!
- \else\ifdim\eq@wdL>.50\eq@linewidth
-%<*trace>
- \breqn@debugmsg{Choose Shape: LHS (\the\eq@wdL) > .50 linewidth (linewidth=\the\eq@linewidth)}%
-%</trace>
- \eq@try@layout@D
- \else
-%<trace> \breqn@debugmsg{Choose Shape: LHS (\the\eq@wdL) not extraordinarily wide}%
- \eq@try@layout@L
- \fi\fi
- \else
-%<trace> \breqn@debugmsg{Choose Shape: No LHS here}%
-% \end{macrocode}
-% Try one-line layout first, then step layout.
-% \begin{macrocode}
- \eq@try@layout@S % (already checked case i)
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@try@layout@D}
-% Change the penalty before the first mathrel symbol to encourage a
-% break there.
-%
-% Layout D=Drop-Ladder Layout, for wide LHS.
-% \begin{literalcode}
-% LOOOOOOOONG LHS
-% = RHS
-% = ...
-% \end{literalcode}
-% If fails, try Almost-Columnar layout
-% \begin{macrocode}
-\def\eq@try@layout@D{%
- \setlength\dim@a{\eq@linewidth -\eq@indentstep}%
- \edef\@parshape{\parshape 2
- 0pt \the\eq@wdL\space \the\eq@indentstep\space \the\dim@a\relax
- }%
- \def\adjust@rel@penalty{\penalty-99 }%
- \eq@trial@b{D}{\eq@try@layout@A}%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\eq@try@layout@L}
-% Try a straight ladder layout.
-% Preliminary filtering ensures that \cs{eq@wdL} is less than 70%
-% of the current line width.
-% \begin{literalcode}
-% Layout L=Ladder layout
-% LHS = RHS
-% = RHS
-% ...
-% \end{literalcode}
-% If fails, try Drop-ladder layout.
-% NOTE: This is great for some cases (multi relations?), but
-% tends to break really badly when it fails....
-% \begin{macrocode}
-\def\eq@try@layout@L{%
- \setlength\dim@b{\eq@linewidth-\eq@wdL}%
- \edef\@parshape{\parshape 2 0pt \the\eq@linewidth\space
- \the\eq@wdL\space \the\dim@b\relax
- }%
- \eq@trial@b{L}{\eq@try@layout@D}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@try@layout@S}
-% In the \dquoted{stepped} layout there is no LHS, or LHS
-% is greater than the line width and RHS is small.
-% Then we want to split up the equation into lines of roughly equal
-% width and stagger them downwards to the right, leaving a small amount of
-% whitespace on both sides.
-% But also, if there is an equation number, we want to try first a
-% layout that leaves room for the number.
-% Otherwise it would nearly always be the case that the number would
-% get thrown on a separate line.
-%
-% Layout S=Stepped layout, typically no LHS or very long, variations on
-% \begin{literalcode}
-% STUFF ....
-% + MORE STUFF ...
-% + MORE STUFF ...
-% \end{literalcode}
-% If fails, try Almost-Columnar layout
-% \begin{macrocode}
-\def\eq@try@layout@S{%
- \setlength\dim@b{\eq@linewidth-2\eqmargin}% \advance\dim@b-1em%
-% \end{macrocode}
-% About how many lines will we need if dim@b is the line width?
-% \begin{macrocode}
- \int@a\wd\EQ@copy \divide\int@a\dim@b
-% \end{macrocode}
-% Adjust the target width by number of lines times indentstep.
-% We don't need to decrement \cs{int@a} because \tex
-% division is integer division with truncation.
-% \begin{macrocode}
- \addtolength\dim@b{-\int@a\eq@indentstep}%
-% \end{macrocode}
-% Adjust for equation number.
-% But try not to leave too little room for the equation body.
-% \begin{macrocode}
- \if\eq@hasNumber
- \ifdim\dim@b>15em%
-% \advance\dim@b-\eqnumsep \advance\dim@b-\wd\EQ@numbox
- \addtolength\dim@b{-\eq@wdNum}%
- \fi
- \fi
-% \end{macrocode}
-% Now some hand-waving to set up the parshape.
-% \begin{macrocode}
- \int@b\z@
- \def\@tempa{\dim}%
- \edef\@parshape{\parshape 2 0pt \the\dim@b\space
- \the\eqmargin\space\the\dim@b\relax}%
- \eq@trial@b{S}{\eq@try@layout@A}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@try@layout@l}
-% This is the \dquoted{step-ladder} layout: similar to the drop-ladder
-% layout but the LHS is too wide and needs to be broken up.
-%
-% Layout l = Stepladder
-% Similar to Drop-Ladder, but LHS is long and needs to be broken up.
-% If fails, try Almost-Columnar layout
-% \begin{macrocode}
-\def\eq@try@layout@l{%
- \setlength\dim@a{\eq@linewidth -\eq@indentstep}%
- \int@a\eq@wdL \divide\int@a\dim@a
- \advance\int@a\tw@
- \edef\@parshape{\parshape \number\int@a\space
- 0pt \the\eq@linewidth
- }%
- \advance\int@a-\tw@
- \setlength\dim@b{2\eq@indentstep}%
- \setlength\dim@c{\eq@linewidth -\dim@b}%
- \edef\@parshape{\@parshape
- \replicate{\int@a}{\space\the\eq@indentstep\space\the\dim@a}%
- \space\the\dim@b\space\the\dim@c\relax
- }%
- \eq@trial@b{l}{\eq@try@layout@A}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@try@layout@A}
-% In the \dquoted{almost-columnar} layout, which is the layout of last
-% resort, we let all lines run to the full width and leave the adjusting
-% of the indents to later.
-%
-% Layout A = Almost-Columnar layout.
-% Pretty much straight full width, more of a last-resort.
-% If fails, give up.
-% \begin{macrocode}
-\def\eq@try@layout@A{%
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
- \if\EQ@hasLHS \def\adjust@rel@penalty{\penalty-99 }\fi
- \eq@trial@b{A}{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@shiftnumber}
-% MH: Should be moved to a section where all keys are set to defaults.
-% \begin{macrocode}
-\let\eq@shiftnumber\@False
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@retry@with@number@a}
-% Number placement adjustments
-% \begin{macrocode}
-\def\eq@retry@with@number{%
- \if\eq@shiftnumber
-%<trace> \breqn@debugmsg{Place number: Shifted number requested}%
- \else
-% \end{macrocode}
-% Condition and right numbers? We're just going to have to shift.
-% \begin{macrocode}
- \ifdim\eq@wdCond>\z@\if R\eqnumside
-%<trace> \breqn@debugmsg{Place number: Condition w/Right number => Shift number}%
- \let\eq@shiftnumber\@True
- \fi\fi
-% \end{macrocode}
-% Compute free space.
-% \begin{macrocode}
-% \dim@b\eqnumsep\advance\dim@b\wd\EQ@numbox
- \dim@b\eq@wdNum
- \if L\eqnumside
- \ifdim\@totalleftmargin>\dim@b\dim@b\@totalleftmargin\fi
- \else
- \addtolength\dim@b{\@totalleftmargin}%
- \fi
- \setlength\dim@a{\eq@linewidth-\dim@b}%\advance\dim@a1em\relax% Allowance for shrink?
-% \end{macrocode}
-% Set up test against 1-line case only if not in a group
-% \begin{macrocode}
- \int@a\@ne\if\eq@group\int@a\maxint\fi
-% \end{macrocode}
-% Now check for cases.
-% \begin{macrocode}
- \if\eq@shiftnumber % Already know we need to shift
- \else\ifdim\eq@wdT<\dim@a % Fits!
-% \end{macrocode}
-% left \& right skips will be done later, and parshape adjusted if
-% needed.
-% \begin{macrocode}
-%<trace> \breqn@debugmsg{Place number: eqn and number fit together}%
-% \else\ifnum\eq@lines=\int@a % Shift, if single line, unless inside a dgroup.
-% \end{macrocode}
-% NOTE: this is too strong for dgroup!
-% \begin{macrocode}
-%<*trace>
-% \breqn@debugmsg{Place number: single line too long with number => Shift number \the\int@a}%
-%</trace>
-% \let\eq@shiftnumber\@True
- \else
-% \end{macrocode}
-% % Retry: use leftskip for space for number(for now; whether
-% % right/left) \& adjust parshape
-% \begin{macrocode}
-% \leftskip\wd\EQ@numbox\advance\leftskip\eqnumsep
- \setlength\leftskip{\eq@wdNum}%
- \setlength\rightskip{\z@\@plus\dim@a}%
- \adjust@parshape\@parshape
-%<*trace>
- \breqn@debugmsg{Place number: Try with \leftskip=\the\leftskip, \rightskip=\the\rightskip,
- \MessageBreak==== parshape\space\@xp\@gobble\@parshape}%
-%</trace>
- \nointerlineskip
- \edef\eq@prev@lines{\the\eq@lines}%
- \edef\eq@prev@badness{\the\eq@badness}% BRM
- \eq@trial@p
- \int@a\eq@prev@badness\relax\advance\int@a 50\relax%?
- \int@b\eq@prev@lines \if\eq@group\advance\int@b\@ne\fi% Allow 1 extra line in group
- \ifnum\eq@lines>\int@b % \eq@prev@lines
-%<trace> \breqn@debugmsg{Adjustment causes more breaks => Shift number}%
- \let\eq@shiftnumber\@True
- \else\if\eq@badline
-%<trace> \breqn@debugmsg{Adjustment causes bad lines (\the\eq@badness) => Shift}%
- \let\eq@shiftnumber\@True
- \else\ifnum\eq@badness>\int@a % BRM: New case
-%<*trace>
- \breqn@debugmsg{Adjustment is badder than previous
- (\the\eq@badness >> \eq@prev@badness) => Shift}%
-%</trace>
- \let\eq@shiftnumber\@True
- \else
-%<trace> \breqn@debugmsg{Adjustment succeeded}%
- \fi\fi%\fi
- \fi\fi\fi
-% \end{macrocode}
-% If we got shifted, restore parshape, etc,
-% \begin{macrocode}
- \if\eq@shiftnumber
- \EQ@trial% Restore parshape & other params,
- \leftskip\z@\let\eq@shiftnumber\@True % But set shift & leftskip
- \edef\@parshape{\eq@parshape}% And copy saved parshape back to `working copy' !?!?
- \fi
- \eq@trial@save\EQ@trial % Either way, save the trial state.
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\adjust@parshape}
-% Varies depending on the layout.
-%
-% Adjust a parshape variable for a given set of left\textbar right skips.
-% Note that the fixed part of the left\textbar right skips effectively
-% comes out of the parshape widths (NOT in addition to it).
-% We also must trim the widths so that the sum of skips, indents
-% and widths add up to no more than the \cs{eq@linewidth}.
-% \begin{macrocode}
-\def\adjust@parshape#1{%
- \@xp\adjust@parshape@a#1\relax
- \edef#1{\temp@a}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\adjust@parshape@a}
-% \begin{macro}{\adjust@parshape@b}
-% \begin{macrocode}
-\def\adjust@parshape@a#1 #2\relax{%
- \setlength\dim@a{\leftskip+\rightskip}%
- \edef\temp@a{#1}%
- \adjust@parshape@b#2 @ @ \relax
-}
-\def\adjust@parshape@b#1 #2 {%
- \ifx @#1\edef\temp@a{\temp@a\relax}%
- \@xp\@gobble
- \else
- \dim@b#1\relax
- \dim@c#2\relax
- \addtolength\dim@c{\dim@a+\dim@b}%
- \ifdim\dim@c>\eq@linewidth\setlength\dim@c{\eq@linewidth}\fi
- \addtolength\dim@c{-\dim@b}%
- \edef\temp@a{\temp@a\space\the\dim@b\space\the\dim@c}%
- \fi
- \adjust@parshape@b
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\eq@ml@record@indents}
-% Plunk the parshape's indent values into an array for easy access
-% when constructing \cs{eq@measurements}.
-% \begin{macrocode}
-\def\eq@ml@record@indents{%
- \int@a\z@
- \def\@tempa{%
- \advance\int@a\@ne
- \@xp\edef\csname eq@i\number\int@a\endcsname{\the\dim@a}%
- \ifnum\int@a<\int@b \afterassignment\@tempb \fi
- \dim@a
- }%
- \def\@tempb{\afterassignment\@tempa \dim@a}%
- \def\@tempc##1##2 {\int@b##2\afterassignment\@tempa\dim@a}%
- \@xp\@tempc\@parshape
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\@endelt}
-% This is a scan marker.
-% It should get a non-expandable definition.
-% It could be \cs{relax}, but let's try a chardef instead.
-% \begin{macrocode}
-\chardef\@endelt=`\?
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@measurements}
-% This is similar to a parshape spec but for each line we record more
-% info: space above, indent, width x height + dp, and badness.
-% \begin{macrocode}
-\def\eq@measurements{%
- \@elt 4.5pt/5.0pt,66.0ptx6.8pt+2.4pt@27\@endelt
- ...
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@measure@lines}
-% Loop through the list of boxes to measure things like total
-% height (including interline stretch), \etc . We check the
-% actual width of the current line against the natural width \mdash
-% after removing rightskip \mdash in case the former is
-% \emph{less} than the latter because of shrinkage. In that
-% case we do not want to use the natural width for RHS-max-width because
-% it might unnecessarily exceed the right margin.
-% \begin{macrocode}
-\def\eq@measure@lines{%
- \let\eq@ml@continue\eq@measure@lines
- \setbox\tw@\lastbox \dim@b\wd\tw@ % find target width of line
- \setbox\z@\hbox to\dim@b{\unhbox\tw@}% check for overfull
- \eq@badness\badness
- \ifnum\eq@badness<\inf@bad \else \let\eq@badline\@True \fi
- \eq@ml@a \eq@ml@continue
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@ml@a}
-%
-% \begin{macrocode}
-\def\eq@ml@a{%
- \setbox\tw@\hbox{\unhbox\z@ \unskip}% find natural width
-%<*trace>
- \ifnum\eq@badness<\inf@bad\else\breqn@debugmsg{!?! Overfull: \the\wd\tw@ >\the\dim@b}\fi
-%</trace>
-% \end{macrocode}
-% Is actual width less than natural width?
-% \begin{macrocode}
- \ifdim\dim@b<\wd\tw@ \setlength\dim@a{\dim@b}% shrunken line
- \else \setlength\dim@a{\wd\tw@}% OK to use natural width
- \fi
- \addtolength\dim@a{-\leftskip}% BRM: Deduct the skip if we're retrying w/number
-% \end{macrocode}
-% If there's no aboveskip, assume we've reached the top of the
-% equation.
-% \begin{macrocode}
- \skip@a\lastskip \unskip \unpenalty
- \ifdim\skip@a=\z@
- \let\eq@ml@continue\relax % end the recursion
- \else
- % Sum repeated vskips if present
- \def\@tempa{%
- \ifdim \lastskip=\z@
- \else \addtolength\skip@a{\lastskip}\unskip\unpenalty \@xp\@tempa
- \fi
- }%
- \fi
- \edef\eq@measurements{\@elt
- \the\skip@a\space X% extra space to facilitate extracting only the
- % dimen part later
- \csname eq@i%
- \ifnum\eq@curline<\parshape \number\eq@curline
- \else\number\parshape
- \fi
- \endcsname,\the\dim@a x\the\ht\tw@+\the\dp\tw@ @\the\eq@badness\@endelt
- \eq@measurements
- }%
- \advance\eq@curline\m@ne
- \ifnum\eq@curline=\z@ \let\eq@ml@continue\relax\fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@ml@vspace}
-%
-% Handle an embedded vspace.
-% \begin{macrocode}
-\def\eq@ml@vspace{%
- \global\advance\eq@vspan\lastskip \unskip\unpenalty
- \ifdim\lastskip=\z@ \else \@xp\eq@ml@vspace \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@dense@enough}
-%
-% \begin{macrocode}
-\def\eq@dense@enough{%
- \ifnum\eq@lines<\thr@@
-%<trace> \breqn@debugmsg{Density check: less than 3 lines; OK}%
- \@True
- \else
- \ifdim\eq@wdL >.7\eq@wdT
-%<trace> \breqn@debugmsg{Density check: LHS too long; NOT OK}%
- \@False
- \else \@xp\@xp\@xp\eq@dense@enough@a
- \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\true@true@true}
-% \begin{macro}{\true@false@true}
-% \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}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@density@factor}
-%
-% This number specifies, for the ladder layout, how much of the
-% equation's bounding box should contain visible material rather than
-% whitespace.
-% If the amount of visible material drops below this value, then we
-% switch to the drop-ladder layout.
-% The optimality of this factor is highly dependent on the equation
-% contents; .475 was chosen as the default just because it worked well
-% with the sample equation, designed to be as average as possible, that I
-% used for testing.
-% \begin{macrocode}
-\def\eq@density@factor{.475}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@dense@enough@a}
-%
-% Calculate whether there is more
-% visible material than whitespace within the equation's bounding box.
-% Sum up the actual line widths and compare to the total
-% \dquoted{area} of the bounding box.
-% But if we have an extremely large number of lines, fall back to an
-% approximate calculation that is more conservative about the danger of
-% exceeding \cs{maxdimen}.
-% \begin{macrocode}
-\def\eq@dense@enough@a{%
- \@True \fi
- \ifnum\eq@lines>\sixt@@n
- \eq@dense@enough@b
- \else
- \dim@b\z@ \let\@elt\eq@delt \eq@measurements
- \dim@c\eq@density@factor\eq@wdT \multiply\dim@c\eq@lines
-%<trace> \breqn@debugmsg{Density check: black \the\dim@b/\eq@density@factor total \the\dim@c}%
- \ifdim\dim@b>\dim@c \true@false@true \else \false@false@false \fi
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@delt}
-% Args are space-above, indent, width, height, depth, badness.
-% \begin{macrocode}
-\def\eq@delt#1X#2,#3x#4+#5@#6\@endelt{\addtolength\dim@b{#3}}%
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@dense@enough@b}
-% This is an approximate calculation used to keep from going over
-% \cs{maxdimen} if the number of lines in our trial break is large
-% enough to make that a threat.
-% If l, t, n represent left-side-width, total-width, and number of
-% lines, the formula is
-% \begin{literalcode}
-% l/t < .4n/(.9n-1)
-% \end{literalcode}
-% or equivalently, since rational arithmetic is awkward in \tex :
-% b
-% \begin{literalcode}
-% l/t < 4n/(9n-10)
-% \end{literalcode}
-% .
-% \begin{macrocode}
-\def\eq@dense@enough@b{%
- \int@b\eq@wdT \divide\int@b\p@
- \dim@b\eq@wdL \divide\dim@b\int@b
- \dim@c\eq@lines\p@ \multiply\dim@c\f@ur
- \int@b\eq@lines \multiply\int@b 9 \advance\int@b -10%
- \divide\dim@c\int@b
-%<trace> \breqn@debugmsg{Density check: l/t \the\dim@b\space< \the\dim@c\space 4n/(9n-10)?}%
- \ifdim\dim@b<\dim@c \true@true@true \else \false@true@false \fi
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eq@parshape}
-% \begin{macrocode}
-\let\eq@parshape\@empty
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@params}
-% The interline spacing and penalties in \cs{eq@params}
-% are used during both preliminary line breaking and final typesetting.
-% \begin{macrocode}
-\def\eq@params{%
- \baselineskip\eqlinespacing
- \lineskip\eqlineskip \lineskiplimit\eqlineskiplimit
-% \end{macrocode}
-% Forbid absolutely a pagebreak that separates the first line or last
-% line of a multiline equation from the rest of it. Or in other
-% words: no equation of three lines or less will be broken at the bottom
-% of a page; instead it will be moved whole to the top of the next
-% page. If you really really need a page break that splits the
-% first or last line from the rest of the equation, you can always fall
-% back to\cs{pagebreak}, I suppose.
-%
-% \begin{macrocode}
- \clubpenalty\@M \widowpenalty\@M \interlinepenalty\eqinterlinepenalty
- \linepenalty199 \exhyphenpenalty5000 % was 9999: make breaks at, eg. \* a bit easier.
-% \end{macrocode}
-% For equations, hfuzz should be at least 1pt.
-% But we have to fake it a little because we are running the equation
-% through \tex 's paragrapher.
-% In our trials we use minus 1pt in the rightskip rather than hfuzz;
-% and we must do the same during final breaking of the equation, otherwise
-% in borderline cases \tex will use two lines instead of one when our
-% trial indicated that one line would be enough.
-% \begin{macrocode}
- \ifdim\hfuzz<\p@ \hfuzz\p@ \fi
-%\hfuzz=2pt
-% \ifdim\hfuzz<2pt\relax \hfuzz2pt \fi
- \parfillskip\z@skip
-% \hfuzz\z@
-% \end{macrocode}
-% Make sure we skip \tex 's preliminary line-breaking pass to save
-% processing time.
-% \begin{macrocode}
- \tolerance9999 \pretolerance\m@ne
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \section{Equation layout options}
-% Using the notation C centered, I indented (applied to
-% the equation body), T top, B bottom, M
-% middle, L left, R right (applied to the equation number),
-% the commonly used equation types are C, CRM, CRB, CLM, CLT,
-% I, IRM, IRB, ILM, ILT. In other words, CLM stands for Centered equation
-% body with Left-hand Middle-placed equation number, and IRB stands for
-% Indented equation with Right-hand Bottom-placed equation number.
-%
-% Here are some general thoughts on how to place an equation
-% tag. Currently it does not work as desired: the L option positions
-% the tag app. 10 lines below the math expression, the RM doesn't
-% position the tag on the baseline for single-line math
-% expressions. Therefore I am going to first write what I think is
-% supposed to happen and then implement it.
-%
-% Below is a small list where especially the two three specifications
-% should be quite obvious, I just don't want to forget anything and it
-% is important to the implementation.
-% \begin{description}
-% \item[Definition 1] If a display consists of exactly one line, the
-% tag should always be placed on the same baseline as the math
-% expression.
-% \end{description}
-% The remaining comments refer to multi-line displays.
-% \begin{description}
-% \item[Definition 2] If a tag is to be positioned at the top (T), it
-% should be placed such that the baseline of the tag aligns with the
-% baseline of the top line of the display.
-%
-% \item[Definition 3] If a tag is to be positioned at the bottom (B),
-% it should be placed such that the baseline of the tag aligns with
-% the baseline of the bottom line of the display.
-%
-% \item[Definition 4] If a tag is to be positioned vertically centered
-% (M), it should be placed such that the baseline of the tag is
-% positioned exactly halfway between the baseline of the top line of
-% the display and the baseline of the bottom line of the display.
-% \end{description}
-%
-% Definitions 1--3 are almost axiomatic in their
-% simplicity. Definition~4 is different because I saw at least two
-% possibilities for which area to span:
-% \begin{itemize}
-% \item Calculate distance from top of top line to the bottom of the
-% bottom line, position the vertical center of the tag exactly
-% halfway between those two extremes.
-%
-% \item Calculate the distance from the baseline of the top line to
-% the baseline of the bottom line, position the baseline of the tag
-% exactly halfway between these two extremes.
-% \end{itemize}
-% Additional combinations of these methods are possible but make
-% little sense in my opinion. I have two reasons for choosing the
-% latter of these possibilities: Firstly, two expressions looking
-% completely identical with the exception of a superscript in the
-% first line or a subscript in the last line will have the tag
-% positioned identically. Secondly, then M means halfway between T and
-% B positions which makes good sense and then also automatically
-% fulfills Definition~1.
-%
-% From an implementation perspective, these definitions should also
-% make it possible to fix a deficiency in the current implementation,
-% namely that the tag does not influence the height of a display, even
-% if the display is a single line. This means that two single-line
-% expressions in a \env{dgroup} can be closer together than
-% \cs{intereqskip} if the math expressions are (vertically) smaller
-% than the tag.
-%
-% \section{Centered Right-Number Equations}
-%
-% \begin{macro}{\eq@dump@box}
-% \arg1 might be \cs{unhbox} or \cs{unhcopy}; \arg2 is
-% the box name.
-% \begin{macrocode}
-\def\eq@dump@box#1#2{%
-%\debug@box#1%
- \noindent #1#2\setbox\f@ur\lastbox \setbox\tw@\lastbox
-% \end{macrocode}
-% If the LHS contains shrinkable glue, in an L layout the alignment
-% could be thrown off if the first line is shrunk noticeably.
-% For the time being, disable shrinking on the left-hand side.
-% The proper solution requires more work \begin{dn}
-% mjd,1999/03/17
-% \end{dn}
-% .
-% \begin{macrocode}
- \if L\eq@layout \box\tw@ \else\unhbox\tw@\fi
- \adjust@rel@penalty \unhbox\f@ur
-}
-% \end{macrocode}
-% \end{macro}
-%
-% Various typesetting bits, invoked from \cs{eq@finish}
-% BRM: This has been extensively refactored from the original breqn,
-% initially to get left\textbar right skips and parshape used consistently,
-% ultimately to get most things handled the same way, in the same order.
-%
-% Given that left and right skips have been set,
-% typeset the frame, number and equation with the
-% given number side and placement
-%
-% \begin{macrocode}
-\def\eq@typeset@Unnumbered{%
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@LM{%
- \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}%
- \eq@typeset@leftnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-% \end{macrocode}
-% Typeset equation and left-top number (and shifted)
-% \begin{macrocode}
-\def\eq@typeset@LT{%
- \dim@a\eq@firstht
- \eq@typeset@leftnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-% \end{macrocode}
-% Typeset equation and left shifted number
-% \begin{macrocode}
-\def\eq@typeset@LShifted{%
- % place number
- \copy\EQ@numbox \penalty\@M
- \dim@a\eqlineskip
- \if F\eq@frame\else
- \setlength\dim@a{\eq@framesep+\eq@framewd}%
- \fi
- \kern\dim@a
- \eq@typeset@frame
- \eq@typeset@equation
-}
-% \end{macrocode}
-% Typeset equation and right middle number
-% \begin{macrocode}
-\def\eq@typeset@RM{%
- \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}%
- \eq@typeset@rightnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-% \end{macrocode}
-% Typeset equation and right bottom number
-% \begin{macrocode}
-\def\eq@typeset@RB{%
- % NOTE: is \eq@dp useful here
- \setlength\dim@a{\eq@vspan-\ht\EQ@numbox-\dp\EQ@numbox}%
- \eq@typeset@rightnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-% \end{macrocode}
-% Typeset equation and right shifted number
-% \begin{macrocode}
-\def\eq@typeset@RShifted{%
- % place number
- \eq@typeset@frame
- \eq@typeset@equation
- \penalty\@M
- \dim@a\eqlineskip
- \if F\eq@frame\else
- \addtolength\dim@a{\eq@framesep+\eq@framewd}%
- \fi
- \parskip\dim@a
- \hbox to\hsize{\hfil\copy\EQ@numbox}\@@par%
-}
-% \end{macrocode}
-%
-% Debugging aid to show all relevant formatting info for a given eqn.
-% \begin{macrocode}
-%<*trace>
-\def\debug@showformat{%
- \breqn@debugmsg{Formatting Layout:\eq@layout\space Center/indent: \eqindent\space
- Number placement \eqnumside\eqnumplace:
- \MessageBreak==== \eq@linewidth=\the\eq@linewidth, \@totalleftmargin=\the\@totalleftmargin,
- \MessageBreak==== Centered Lines=\theb@@le\eq@centerlines, Shift Number=\theb@@le\eq@shiftnumber,
- \MessageBreak==== \eq@wdT=\the\eq@wdT, \eq@wdMin=\the\eq@wdMin,
- \MessageBreak==== LHS=\theb@@le\EQ@hasLHS: \eq@wdL=\the\eq@wdL,
- \MessageBreak==== \eq@firstht=\the\eq@firstht, \eq@vspan=\the\eq@vspan
- \MessageBreak==== \eq@wdNum=\the\eq@wdNum
- \MessageBreak==== \eq@wdCond=\the\eq@wdCond, \conditionsep=\the\conditionsep,
- \MessageBreak==== \leftskip=\the\leftskip, \rightskip=\the\rightskip,
- \MessageBreak==== \abovedisplayskip=\the\abovedisplayskip,
- \MessageBreak==== \belowdisplayskip=\the\belowdisplayskip
- \MessageBreak==== parshape=\eq@parshape}%
-}
-%</trace>
-% \end{macrocode}
-%
-% Set left \& right skips for centered equations,
-% making allowances for numbers (if any, right, left) and constraint.
-%
-% Amazingly, I've managed to collect all the positioning logic for
-% centered equations in one place, so it's more manageable.
-% Unfortunately, by the time it does all it needs to do,
-% it has evolved I'm (re)using so many temp variables, it's becoming
-% unmanageble!
-%
-% \begin{macrocode}
-\def\eq@C@setsides{%
- % \dim@c = space for number, if any, and not shifted.
- \dim@c\z@
- \if\eq@hasNumber\if\eq@shiftnumber\else
- \dim@c\eq@wdNum
- \fi\fi
- % \dim@e = space for condition(on right), if any and formula is only a single line.(to center nicely)
- % but only count it as being right-aligned if we're not framing, since the frame must enclose it.
- \dim@e\z@
- \if F\eq@frame
- \ifnum\eq@lines=\@ne\ifdim\eq@wdCond>\z@
- \setlength\dim@e{\eq@wdCond+\conditionsep}%
- \fi\fi\fi
- % \dim@b = minimum needed on left max(totalleftmargin, left number space)
- \dim@b\z@
- \if L\eqnumside\ifdim\dim@b<\dim@c
- \dim@b\dim@c
- \fi\fi
- \ifdim\dim@b<\@totalleftmargin
- \dim@b\z@
- \else
- \addtolength\dim@b{-\@totalleftmargin}%
- \fi
- % \dim@d = minimum needed on right max(condition, right number space)
- \dim@d\dim@e
- \if R\eqnumside\ifdim\dim@d<\dim@c
- \dim@d\dim@c
- \fi\fi
- % \dim@a = left margin; initially half available space
- % \dim@c = right margin; ditto
- \setlength\dim@a{(\eq@linewidth-\eq@wdT+\dim@e+\@totalleftmargin)/2}%
- \dim@c=\dim@a
- % If too far to the left
- \ifdim\dim@a<\dim@b
- \addtolength\dim@c{\dim@a-\dim@b}%
- \ifdim\dim@c<\z@\dim@c=\z@\fi
- \dim@a=\dim@b
- % Or if too far to the right
- \else\ifdim\dim@c<\dim@d
- \addtolength\dim@a{\dim@c-\dim@d}%
- \ifdim\dim@a<\z@\dim@a=\z@\fi
- \dim@c=\dim@d
- \fi\fi
- % Now, \dim@d,\dim@e is the left & right glue to center each line for centerlines
- \setlength\dim@e{\eq@wdT-\eq@wdMin}\dim@d=\z@
-% \end{macrocode}
-% NOTE: Need some work here centering when there's a condition
-% \begin{macrocode}
-% \advance\dim@e-\eq@wdT\multiply\dim@e-1\relax
-% \if\eq@wdMin<\dim@e\dim@e\eq@wdMin\fi
-% \multiply\dim@e-1\relax\advance\dim@e\eq@wdT
- \dim@d\z@
- \if\eq@centerlines
- \divide\dim@e2\relax
- \dim@d=\dim@e
- \fi
- \setlength\leftskip{\dim@a\@plus\dim@d}%
- \addtolength\dim@e{\dim@c}%
- \setlength\rightskip{\z@\@plus\dim@e}%\@minus5\p@
- % Special case: if framing, reduce the stretchiness of the formula (eg. condition)
- % Or if we have a right number, FORCE space for it
- \dim@b\z@
- \if F\eq@frame\else
- \dim@b\dim@c
- \fi
- \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}%
- \if R\eqnumside
- \dim@c\eq@wdNum
- \ifdim\dim@c>\dim@b
- \dim@b\dim@c
- \fi
- \fi
- \fi
- % If either of those cases requires hard rightskip, move that part from glue.
- \ifdim\dim@b>\z@
- \addtolength\dim@e{-\dim@c}%
- \rightskip\dim@b\@plus\dim@e%\@minus5\p@
- \fi
- % And peculiar further special case: in indented environs, width isn't where it would seem
- \ifdim\eq@wdCond>\z@
- \addtolength\rightskip{-\@totalleftmargin}%
- \fi
- \parfillskip\z@skip
-}
-% \end{macrocode}
-%
-% Set the left and right side spacing for indented equations
-% Some things handled by eq@C@setsides that probably apply here????
-% \begin{itemize}
-% \item centerlines
-% \item \cs{@totalleftmargin}: SHOULD we move farther right?
-% \end{itemize}
-% Leftskip is normally just the requested indentation
-% \begin{macrocode}
-\def\eq@I@setsides{%
- \leftskip\mathindent
-% \end{macrocode}
-% But move left, if shifted number presumably because of clashed w/ number?
-% \begin{macrocode}
- \if\eq@shiftnumber
- \setlength\dim@a{\eq@linewidth-\eq@wdT-\mathindent}%
- \ifdim\dim@a<\z@
- \leftskip=\z@ % Or something minimal?
- \fi
- \fi
-% \end{macrocode}
-% Push gently from right.
-% \begin{macrocode}
- \dim@a=\z@
- \setlength\dim@b{\eq@linewidth-\leftskip-\eq@wdMin}%
-% \end{macrocode}
-% Special case: if framing be much more rigid(?)
-% \begin{macrocode}
- \if F\eq@frame
- \else
- \setlength\dim@a{\eq@linewidth-\leftskip-\eq@wdT}
- \addtolength\dim@b{-\dim@a}%
- \fi
- % Or force the space for right number, if needed
-% \begin{macrocode}
- \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}%
- \if R\eqnumside
- \dim@c=\eq@wdNum
- \if\dim@c>\dim@a
- \addtolength\dim@b{-\dim@c}%
- \dim@a=\dim@c
- \fi
- \fi
- \fi
- \setlength\rightskip{\dim@a\@plus\dim@b \@minus\hfuzz }%\hfuzz\z@
- \parfillskip\z@skip
-}
-% \end{macrocode}
-% \paragraph{Typesetting pieces: frame, equation and number (if any)}
-% \cs{dim@a} should contain the downward displacement of number's baseline
-% \begin{macrocode}
-\def\eq@typeset@leftnumber{%
- \setlength\skip@c{\dim@a-\ht\EQ@numbox}%
- \vglue\skip@c% NON discardable
- \copy\EQ@numbox \penalty\@M
- \kern-\dim@a
-}
-\def\eq@typeset@rightnumber{%
- \setlength\skip@c{\dim@a-\ht\EQ@numbox}%
- \vglue\skip@c% NON discardable
- \hbox to \hsize{\hfil\copy\EQ@numbox}\penalty\@M
- \kern-\dim@a
-}
-\def\eq@typeset@equation{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \eq@dump@box\unhbox\EQ@box\@@par
-}
-% \end{macrocode}
-%
-% \section{Framing an equation}
-% \begin{macro}{\eqframe}
-% The \cs{eqframe} function is called in vertical mode
-% with the reference point at the top left corner of the equation, including
-% any allowance for \cs{fboxsep}. Its arguments are the width
-% and height of the equation body, plus fboxsep.
-% \changes{v0.95}{2007/12/03}{Made \cs{eqframe} obey the key settings
-% for frame and framesep.}
-% \begin{macrocode}
-\newcommand\eqframe[2]{%
- \begingroup
- \fboxrule=\eq@framewd\relax\fboxsep=\eq@framesep\relax
- \framebox{\z@rule\@height#2\kern#1}%
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% The frame is not typeset at the correct horizontal position. Will
-% fix later.
-% \begin{macrocode}
-\def\eq@addframe{%
- \hbox to\z@{%
- \setlength\dim@a{\eq@framesep+\eq@framewd}%
- \kern-\dim@a
- \vbox to\z@{\kern-\dim@a
- \hbox{\eqframe{\eq@wdT}{\eq@vspan}}%
- \vss
- }%
- \hss
- }%
-}
-\def\eq@typeset@frame{%
- \if F\eq@frame\else
- % Tricky: put before \noindent, so it's not affected by glue in \leftskip
- \nobreak\nointerlineskip
- \vbox to\eq@firstht{\moveright\leftskip\hbox to\z@{\eq@addframe\hss}\vss}%
- \kern-\eq@firstht
- \fi
-}
-% \end{macrocode}
-%
-% \section{Delimiter handling}
-% The special handling of delimiters is rather complex, but
-% everything is driven by two motives: to mark line breaks inside
-% delimiters as less desirable than line breaks elsewhere, and to make it
-% possible to break open left-right boxes so that line breaks between
-% \cs{left} and \cs{right} delimiters are not absolutely
-% prohibited. To control the extent to which line breaks will be
-% allowed inside delimiters, set \cs{eqbreakdepth} to the maximum
-% nesting depth. Depth 0 means never break inside delimiters.
-%
-% Note: \cs{eqbreakdepth} is not implemented as a \latex
-% counter because changes done by \cs{setcounter} \etc are always
-% global.
-%
-% It would be natural to use grouping in the implementation
-% \mdash at an open delimiter, start a group and increase mathbin
-% penalties; at a close delimiter, close the group. But this gives us
-% trouble in situations like the \env{array} environment, where a
-% close delimiter might fall in a different cell of the \cs{halign}
-% than the open delimiter.
-% Ok then, here's what we want the various possibilities to
-% expand to. Note that \cs{right} and \cs{biggr} are
-% being unnaturally applied to a naturally open-type delimiter.
-% \begin{literalcode}
-% ( -> \delimiter"4... \after@open
-% \left( ->
-% \@@left \delimiter"4... \after@open
-% \right( ->
-% \@@right \delimiter"4... \after@close
-% \biggl( ->
-% \mathopen{\@@left \delimiter... \vrule...\@@right.}
-% \after@open
-% \biggr( ->
-% \mathclose{\@@left \delimiter... \vrule...\@@right.}
-% \after@close
-% \bigg\vert ->
-% \mathord{\@@left \delimiter... \vrule...\@@right.}
-% \biggm\vert ->
-% \mathrel{\@@left \delimiter... \vrule...\@@right.}
-% \end{literalcode}
-%
-% First save the primitive meanings of \cs{left} and
-% \cs{right}.
-% \begin{macrocode}
-\@saveprimitive\left\@@left
-\@saveprimitive\right\@@right
-% \end{macrocode}
-%
-% The variable \cs{lr@level} is used by the first mathrel in
-% an equation to tell whether it is at top level: yes? break and measure
-% the LHS, no? keep going.
-% \begin{macrocode}
-\newcount\lr@level
-% \end{macrocode}
-%
-% It would be nice to have better error checking here if the
-% argument is not a delimiter symbol at all.
-%
-% Ah, a small problem when renaming commands. In the original version,
-% |\delimiter| is hijacked in order to remove the |\after@bidir| (or
-% open or close) instruction following the delimiter declaration.
-% \begin{macrocode}
-\ExplSyntaxOn
-\def\eq@left{%
- \@ifnext .{\eq@nullleft}{\begingroup \let\math_delimiter:NNnNn \eq@left@a}%
-}
-\def\eq@right{%
- \@ifnext .{\eq@nullright}{\begingroup \let \math_delimiter:NNnNn \eq@right@a}%
-}
-% \end{macrocode}
-% The arguments are: \arg1 delim symbol, \arg2 .
-% \begin{macrocode}
-%\def\eq@left@a#1 #2{\endgroup\@@left\delimiter#1\space \after@open}
-\def\eq@left@a#1#2#3#4#5#6{\endgroup
- \@@left \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@open}
-\def\eq@right@a#1#2#3#4#5#6{\endgroup
- \@@right \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@close \ss@scan{#1#2{#3}#4{#5}}%
-}
-\ExplSyntaxOff
-% \end{macrocode}
-% The null versions.
-% \begin{macrocode}
-\def\eq@nullleft#1{\@@left#1\after@open}
-\def\eq@nullright#1{\@@right#1\after@close}
-% \end{macrocode}
-%
-% Here is the normal operation of \cs{biggl}, for example.
-% \begin{literalcode}
-% \biggl ->\mathopen \bigg
-% {\mathopen}
-%
-% \bigg #1->{\hbox {$\left #1\vbox to14.5\p@ {}\right .\n@space $}}
-% #1<-(
-% \end{literalcode}
-% ^^AFor paren matching: )
-% Like \cs{left}, \cs{biggl} coerces its delimiter to be of
-% mathopen type even if its natural inclination is towards closing.
-%
-% The function \cs{delim@reset} makes delimiter characters
-% work just about the same as they would in normal \latex .
-% \begin{macrocode}
-\def\delim@reset{%
- \let\after@open\relax \let\after@close\relax
- \let\left\@@left \let\right\@@right
-}
-% \end{macrocode}
-% If the \pkg{amsmath} or \pkg{exscale} package is loaded, it
-% will have defined \cs{bBigg@}; if not, the macros \cs{big} and
-% variants will have hard-coded point sizes as inherited through the ages
-% from \fn{plain.tex}. In this case we can kluge a little by
-% setting \cs{big@size} to \cs{p@}, so that our definition of
-% \cs{bBigg@} will work equally well with the different multipliers.
-% \begin{macrocode}
-\@ifundefined{bBigg@}{% not defined
- \let\big@size\p@
- \def\big{\bBigg@{8.5}}\def\Big{\bBigg@{11.5}}%
- \def\bigg{\bBigg@{14.5}}\def\Bigg{\bBigg@{17.5}}%
- \def\biggg{\bBigg@{20.5}}\def\Biggg{\bBigg@{23.5}}%
-}{}
-\def\bBigg@#1#2{%
- {\delim@reset
- \left#2%
- \vrule\@height#1\big@size\@width-\nulldelimiterspace
- \right.
- }%
-}
-% \end{macrocode}
-% .
-% \begin{macrocode}
-\def\bigl#1{\mathopen\big{#1}\after@open}
-\def\Bigl#1{\mathopen\Big{#1}\after@open}
-\def\biggl#1{\mathopen\bigg{#1}\after@open}
-\def\Biggl#1{\mathopen\Bigg{#1}\after@open}
-\def\bigggl#1{\mathopen\biggg{#1}\after@open}
-\def\Bigggl#1{\mathopen\Biggg{#1}\after@open}
-
-\def\bigr#1{\mathclose\big{#1}\after@close}
-\def\Bigr#1{\mathclose\Big{#1}\after@close}
-\def\biggr#1{\mathclose\bigg{#1}\after@close}
-\def\Biggr#1{\mathclose\Bigg{#1}\after@close}
-\def\bigggr#1{\mathclose\biggg{#1}\after@close}
-\def\Bigggr#1{\mathclose\Biggg{#1}\after@close}
-
-%% No change needed, I think. [mjd,1998/12/04]
-%%\def\bigm{\mathrel\big}
-%%\def\Bigm{\mathrel\Big}
-%%\def\biggm{\mathrel\bigg}
-%%\def\Biggm{\mathrel\Bigg}
-%%\def\bigggm{\mathrel\biggg}
-%%\def\Bigggm{\mathrel\Biggg}
-% \end{macrocode}
-%
-%
-% \begin{macro}{\m@@DeL} \begin{macro}{\d@@DeL}
-% \begin{macro}{\m@@DeR} \begin{macro}{\d@@DeR}
-% \begin{macro}{\m@@DeB} \begin{macro}{\d@@DeB}
-% Original definition of \cs{m@DeL} from
-% \pkg{flexisym} is as follows. \cs{m@DeR} and
-% \cs{m@DeB} are the same except for the math class number.
-% \begin{literalcode}
-% \def\m@DeL#1#2#3{%
-% \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 }
-% \end{literalcode}
-%
-% Save the existing meanings of \cs{m@De[LRB]}.
-%
-% Define display variants of DeL, DeR, DeB
-% \begin{macrocode}
-\ExplSyntaxOn
-\cs_set:Npn \math_dsym_DeL:Nn #1#2{\math_bsym_DeL:Nn #1{#2}\after@open}
-\cs_set:Npn \math_dsym_DeR:Nn #1#2{\math_bsym_DeR:Nn #1{#2}\after@close}
-\cs_set:Npn \math_dsym_DeB:Nn #1#2{\math_bsym_DeB:Nn #1{#2}\after@bidir}
-
-%%%%%
-%%%%%\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
-%%%%%\def\d@@DeL#1#2#3{%
-%%%%% \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
-%%%%%}
-%%%%%\def\d@@DeR#1#2#3{%
-%%%%% \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
-%%%%%}
-%%%%%\def\d@@DeB#1#2#3{%
-%%%%% \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
-%%%%%}
-% \end{macrocode}
-%%BRM: These weren't defined, but apparently should be.
-% Are these the right values???
-% \begin{macrocode}
-%%%%%%\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\after@open}
-% \begin{macro}{\after@close}
-% \begin{macro}{\after@bidir}
-% \begin{macro}{\zero@bop}
-% \begin{macro}{\bop@incr}
-% \cs{after@open} and \cs{after@close} are carefully
-% written to avoid the use of grouping and to run as fast as possible.
-% \cs{zero@bop} is the value used for \cs{prebinoppenalty} at
-% delimiter level 0, while \cs{bop@incr} is added for each level of
-% nesting. The standard values provide that breaks will be prohibited
-% within delimiters below nesting level 2.
-% \begin{macrocode}
-\let\after@bidir\@empty
-\mathchardef\zero@bop=888 \relax
-\mathchardef\bop@incr=4444 \relax
-\def\after@open{%
- \global\advance\lr@level\@ne
- \prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
- \advance\prebinoppenalty\zero@bop
- \ifnum\eqbreakdepth<\lr@level
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn %%%%%%\let\m@Bin\m@@Bin
-% \end{macrocode}
-% Inside delimiters, add some fillglue before binops so that a broken off
-% portion will get thrown flush right. Also shift it slightly
-% further to the right to ensure that it clears the opening delimiter.
-% \begin{macrocode}
- \else
- \eq@binoffset=\eqbinoffset
- \advance\eq@binoffset\lr@level\eqdelimoffset plus1fill\relax
- \def\dt@fill@cancel{\hskip\z@ minus1fill\relax}%
- \fi
- \penalty\@M % BRM: discourage break after an open fence?
-}
-\def\after@close{%
- \global\advance\lr@level\m@ne
- \prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
- \advance\prebinoppenalty\zero@bop
- \ifnum\eqbreakdepth<\lr@level
- \else \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn %%%%%%\let\m@Bin\d@@Bin
- \fi
-% \end{macrocode}
-% When we get back to level 0, no delimiters, remove the stretch
-% component of \cs{eqbinoffset}.
-% \begin{macrocode}
- \ifnum\lr@level<\@ne \eq@binoffset=\eqbinoffset\relax \fi
-}
-
-\ExplSyntaxOff
-
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\subsup@flag}
-% \begin{macro}{\ss@scan}
-% \cs{ss@scan} is called after a \cs{right} delimiter and
-% looks ahead for sub and superscript tokens.
-% If sub and/or superscripts are present, we adjust the line-ending
-% penalty to distinguish the various cases (sub, sup, or both).
-% This facilitates the later work of excising the sub/sup box and
-% reattaching it with proper shifting.
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Sub/Superscript measurement
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% BRM: There's possibly a problem here.
-% When \cs{ss@scan} gets invoked after a \cs{left}...\cs{right} pair in the LHS
-% during \cs{eq@measure}, it produces an extra box (marked with \cs{penalty} 3);
-% Apparently \cs{eq@repack} expects only one for the LHS.
-% The end result is \cs{eq@wdL} => 0.0pt !!! (or at least very small)
-% \begin{macrocode}
-\let\subsup@flag=\count@
-\def\ss@delim@a@new#1#2#3#4#5{\xdef\right@delim@code{\number"#4#5}}
-% \end{macrocode}
-% The argument of \cs{ss@scan} is an expanded form of a
-% right-delimiter macro.
-% We want to use the last three digits in the expansion
-% to define \cs{right@delim@code}.
-% The assignment to a temp register is just a way to scan away the
-% leading digits that we don't care about.
-% \begin{macrocode}
-\def\ss@scan#1{%
-% \end{macrocode}
-% This part of the code.
-% \begin{macrocode}
- \begingroup
- \ss@delim@a@new #1%
- \endgroup
- \subsup@flag\@M \afterassignment\ss@scan@a \let\@let@token=}
-\def\ss@scan@a{%
- \let\breqn@next\ss@scan@b
- \ifx\@let@token\sb \advance\subsup@flag\@ne\else
- \ifx\@let@token\@@subscript \advance\subsup@flag\@ne\else
- \ifx\@let@token\@@subscript@other \advance\subsup@flag\@ne\else
- \ifx\@let@token\sp \advance\subsup@flag\tw@\else
- \ifx\@let@token\@@superscript \advance\subsup@flag\tw@\else
- \ifx\@let@token\@@superscript@other \advance\subsup@flag\tw@\else
- \ss@finish
- \let\breqn@next\relax
- \fi\fi\fi\fi\fi\fi
- \breqn@next\@let@token
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\ExplSyntaxOn
-\def\ss@scan@b#1#2{#1{%
-% \end{macrocode}
-% hack! coff!
-% \begin{macrocode}
- %%%%%\let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
- #2}\afterassignment\ss@scan@a \let\@let@token=}%
-\ExplSyntaxOff
-% \end{macrocode}
-% We need to keep following glue from disappearing
-% \mdash \eg , a thickmuskip or medmuskip from a following mathrel or
-% mathbin symbol.
-% \begin{macrocode}
-\def\ss@finish{%
- \@@vadjust{\penalty\thr@@}%
- \penalty\right@delim@code \penalty-\subsup@flag \keep@glue
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\eq@lrunpack}
-% For \cs{eq@lrunpack} we need to break open a left-right box and
-% reset it just in case it contains any more special breaks. After
-% it is unpacked the recursion of \cs{eq@repack} will continue,
-% acting on the newly created lines.
-% \begin{macrocode}
-\def\eq@lrunpack{\setbox\z@\lastbox
-% \end{macrocode}
-% We remove the preceding glue item and deactivate
-% baselineskip for the next line, otherwise we would end up with
-% three items of glue (counting parskip) at this point instead of
-% the single one expected by our recursive repacking
-% procedure.
-% \begin{macrocode}
- \unskip \nointerlineskip
-% \end{macrocode}
-% Then we open box 0, take the left-right box at the right end of
-% it, and break that open. If the line-ending penalty is greater than
-% 10000, it means a sub and/or superscript is present on the right
-% delimiter and the box containing them must be taken off first.
-% \begin{macrocode}
- \noindent\unhbox\z@ \unskip
- \subsup@flag-\lastpenalty \unpenalty
- \xdef\right@delim@code{\number\lastpenalty}%
- \unpenalty
- \ifnum\subsup@flag>\@M
- \advance\subsup@flag-\@M
- \setbox\tw@\lastbox
- \else \setbox\tw@\box\voidb@x
- \fi
- \setbox\z@\lastbox
- \ifvoid\tw@ \unhbox\z@
- \else \lrss@reattach % uses \subsup@flag, box\z@, box\tw@
- \fi
-% \end{macrocode}
-% The reason for adding a null last line here is that the last
-% line will contain parfillskip in addition to rightskip, and a final
-% penalty of $10000$ instead of $-1000N$
-% ($1\leq N\leq 9$), which would interfere with the usual
-% processing. Setting a null last line and discarding it dodges
-% this complication. The penalty value $-10001$ is a no-op case
-% in the case statement of \cs{eq@repacka}.
-% \begin{macrocode}
- \penalty-\@Mi\z@rule\@@par
- \setbox\z@\lastbox \unskip\unpenalty
-%%{\showboxbreadth\maxdimen\showboxdepth99\showlists}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\lrss@reattach}
-%
-% Well, for a small self-contained computation, carefully
-% hand-allocated dimens should be safe enough. But let the
-% maintainer beware! This code cannot be arbitrarily transplanted
-% or shaken up without regard to grouping and interaction with other
-% hand-allocated dimens.
-% \begin{macrocode}
-\dimendef\sub@depth=8 \dimendef\sup@base=6
-\dimendef\prelim@sub@depth=4 \dimendef\prelim@sup@base=2
-\def\sym@xheight{\fontdimen5\textfont\tw@}
-\def\sup@base@one{\fontdimen13\textfont\tw@}
-\def\sub@base@one{\fontdimen16\textfont\tw@}
-\def\sub@base@two{\fontdimen17\textfont\tw@}
-% \end{macrocode}
-% Note that only \cs{sup@drop} and \cs{sub@drop} come from
-% the next smaller math style.
-% \begin{macrocode}
-\def\sup@drop{\fontdimen18\scriptfont\tw@}
-\def\sub@drop{\fontdimen19\scriptfont\tw@}
-% \end{macrocode}
-% Provide a mnemonic name for the math axis fontdimen, if it's not
-% already defined.
-% \begin{macrocode}
-\providecommand{\mathaxis}{\fontdimen22\textfont\tw@}
-% \end{macrocode}
-%
-% Assumes box 2 contains the sub/sup and box 0 contains the left-right
-% box. This is just a repeat of the algorithm in \fn{tex.web},
-% with some modest simplifications from knowing that this is only going to
-% be called at top level in a displayed equation, thus always mathstyle =
-% uncramped displaystyle.
-% \begin{macrocode}
-\def\lrss@reattach{%
- \begingroup
- % "The TeXbook" Appendix G step 18:
- \setlength\prelim@sup@base{\ht\z@-\sup@drop}%
- \setlength\prelim@sub@depth{\dp\z@ +\sub@drop}%
- \unhbox\z@
- \ifcase\subsup@flag % case 0: this can't happen
- \or \lr@subscript % case 1: subscript only
- \or \lr@superscript % case 2: superscript only
- \else \lr@subsup % case 3: sub and superscript both
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \begin{macrocode}
-\def\lr@subscript{%
- \sub@depth\sub@base@one
- \ifdim\prelim@sub@depth>\sub@depth \sub@depth\prelim@sub@depth\fi
- \setlength\dim@a{\ht\tw@ -.8\sym@xheight}%
- \ifdim\dim@a>\sub@depth \sub@depth=\dim@a \fi
- \twang@adjust\sub@depth
- \lower\sub@depth\box\tw@
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\lr@superscript{%
- \sup@base\sup@base@one
- \ifdim\prelim@sup@base>\sup@base \sup@base\prelim@sup@base\fi
- \setlength\dim@a{\dp\tw@ -.25\sym@xheight}%
- \ifdim\dim@a>\sup@base \sup@base\dim@a \fi
- \twang@adjust\sup@base
- \raise\sup@base\box\tw@
-}
-% \end{macrocode}
-%
-% \begin{macrocode}
-\def\lr@subsup{%
- \sub@depth\sub@base@two
- \ifdim\prelim@sub@depth>\sub@depth \sub@depth\prelim@sub@depth \fi
- \twang@adjust\sub@depth
- \lower\sub@depth\box\tw@
-}
-% \end{macrocode}
-%
-% For delimiters that curve top and bottom, the twang factor allows
-% horizontal shifting of the sub and superscripts so they don't
-% fall too far away (or too close for that matter). This is
-% accomplished by arranging for (\eg ) \verb"\right\rangle" to leave
-% a penalty $N$ in the math list before the subsup penalty that triggers
-% \cs{lrss@reattach}, where $N$ is the mathcode of
-% \cs{rangle} (ignoring \dquoted{small} variant).
-% \begin{macrocode}
-\def\twang@adjust#1{%
- \begingroup
- \@ifundefined{twang@\right@delim@code}{}{%
- \setlength\dim@d{#1-\mathaxis}%
- % put an upper limit on the adjustment
- \ifdim\dim@d>1em \dim@d 1em \fi
- \kern\csname twang@\right@delim@code\endcsname\dim@d
- }%
- \endgroup
-}
-% \end{macrocode}
-% The method used to apply a \dquoted{twang} adjustment is just an
-% approximate solution to a complicated problem.
-% We make the following assumptions that hold true, approximately,
-% for the most common kinds of delimiters:
-% \begin{enumerate}
-% \item
-% The right delimiter is symmetrical top to bottom.
-%
-%
-% \item There is an upper limit on the size of the adjustment.
-%
-%
-% \item When we have a superscript, the amount of left-skew that we
-% want to apply is linearly proportional to the distance of the bottom
-% left corner of the superscript from the math axis, with the ratio
-% depending on the shape of the delimiter symbol.
-%
-%
-% \end{enumerate}
-% .
-% By symmetry, Assumption 3 is true also for subscripts (upper left
-% corner).
-% Assumption 2 is more obviously true for parens and braces, where the
-% largest super-extended versions consist of truly vertical parts with
-% slight bending on the ends, than it is for a \cs{rangle}.
-% But suppose for the sake of expediency that it is
-% approximately true for rangle symbols also.
-%
-%
-% Here are some passable twang factors for the most common types of
-% delimiters in \fn{cmex10}, as determined by rough measurements from
-% magnified printouts.
-% \begin{literalcode}
-% vert bar, double vert: 0
-% square bracket: -.1
-% curly brace: -.25
-% parenthesis: -.33
-% rangle: -.4
-% \end{literalcode}
-% Let's provide a non-private command for changing the twang factor of
-% a given symbol.
-% \begin{macrocode}
-\newcommand{\DeclareTwang}[2]{%
- \ifcat.\@nx#1\begingroup
- \lccode`\~=`#1\lowercase{\endgroup \DeclareTwang{~}}{#2}%
- \else
- \@xp\decl@twang#1?\@nil{#2}%
- \fi
-}
-% \end{macrocode}
-% Note that this is dependent on a fixed interpretation of the
-% mathgroup number \arg4 .
-% \begin{macrocode}
-\def\decl@twang#1#2#3#4#5#6#7\@nil#8{%
- \@namedef{twang@\number"#4#5#6}{#8}%
-}
-\DeclareTwang{\rangle}{-.4}
-\DeclareTwang{)}{-.33}
-\DeclareTwang{\rbrace}{-.25}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-% \section{Series of expressions}
-% The \env{dseries} environment is for a display
-% containing a series of expressions of the form \quoted{A, B} or \quoted{A and
-% B} or \quoted{A, B, and C} and so on. Typically the expressions
-% are separated by a double quad of space. If the expressions in a
-% series don't all fit in a single line, they are continued onto extra
-% lines in a ragged-center format.
-% \begin{macrocode}
-\newenvironment{dseries}{\let\eq@hasNumber\@True \@optarg\@dseries{}}{}%
-\def\enddseries#1{\check@punct@or@qed}%
-% \end{macrocode}
-%
-% And the unnumbered version of same.
-% \begin{macrocode}
-\newenvironment{dseries*}{\let\eq@hasNumber\@False \@optarg\@dseries{}}{}%
-\@namedef{enddseries*}#1{\check@punct@or@qed}%
-\@namedef{end@dseries*}{\end@dseries}%
-\def\@dseries[#1]{%
-% \end{macrocode}
-% Turn off the special breaking behavior of mathrels \etc for math
-% formulas embedded in a \env{dseries} environment.
-%
-%BRM: DS Expermient: Use alternative display setup.
-% \begin{macrocode}
-% \def\display@setup{\displaystyle}%
- \let\display@setup\dseries@display@setup
- % Question: should this be the default for dseries???
-% \let\eq@centerlines\@True
- \global\eq@wdCond\z@
-% \end{macrocode}
-% BRM: use special layout for dseries
-% \begin{macrocode}
-% \@dmath[#1]%
- \@dmath[layout={M},#1]%
- \mathsurround\z@\@@math \penalty\@Mi
- \let\endmath\ends@math
- \def\premath{%
-% \end{macrocode}
-% BRM: Tricky to cleanup space OR add space ONLY BETWEEN math!
-% \begin{macrocode}
- \ifdim\lastskip<.3em \unskip
- \else\ifnum\lastpenalty<\@M \dquad\fi\fi
-}%
-% \end{macrocode}
-%BRM: Tricky; if a subformula breaks, we'd like to start the next on new line!
-% \begin{macrocode}
- \def\postmath{\unpenalty\eq@addpunct \penalty\intermath@penalty \dquad \@ignoretrue}%
-\ignorespaces
-}
-\def\end@dseries{%
- \unskip\unpenalty
- \@@endmath \mathsurround\z@ \end@dmath
-}
-% \end{macrocode}
-% BRM: Try this layout for dseries: Essentially layout i, but w/o
-% limit to 1 line. And no fallback!
-% \begin{macrocode}
-\def\eq@try@layout@M{%
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
- \eq@trial@b{M}{}%
-}
-% \end{macrocode}
-% BRM: Tricky to get right value here.
-% Prefer breaks between formula if we've got to break at all.
-% \begin{macrocode}
-%\def\intermath@penalty{-201}%
-\def\intermath@penalty{-221}%
-% \end{macrocode}
-% BRM: A bit tighter than it was ( 1em minus.25em )
-% \begin{macrocode}
-%\newcommand\dquad{\hskip0.4em}
-\newcommand\dquad{\hskip0.6em minus.3em}
-\newcommand\premath{}\newcommand\postmath{}
-% \end{macrocode}
-%
-% Change the \env{math} environment to add
-% \cs{premath} and \cs{postmath}. They are no-ops except
-% inside a \env{dseries} environment.
-%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Redefinition of math environment to take advantage of dseries env.
-% \begin{macrocode}
-\renewenvironment{math}{%
- \leavevmode \premath
- \ifmmode\@badmath\else\@@math\fi
-}{%
- \ifmmode\@@endmath\else\@badmath\fi
-}
-\def\ends@math#1{\check@punct@or@qed}
-\def\end@math{%
- \ifmmode\@@endmath\else\@badmath\fi
- \postmath
-}
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Equation groups}
-% For many equation groups the strategy is easy: just center each
-% equation individually following the normal rules for a single
-% equation. In some groups, each equation gets its own number; in
-% others, a single number applies to the whole group (and may need to be
-% vertically centered on the height of the group). In still other
-% groups, the equations share a parent number but get individual equation
-% numbers consisting of parent number plus a letter.
-%
-% If the main relation symbols in a group of equations are to be
-% aligned, then the final alignment computations cannot be done until the
-% end of the group \mdash \ie , the horizontal positioning of the first
-% $n - 1$ equations cannot be done immediately. Yet because of
-% the automatic line breaking, we cannot calculate an initial value of
-% RHS-max over the whole group unless we do a trial run on each equation
-% first to find an RHS-max for that equation. Once we know RHS-group-max
-% and LHS-group-max we must redo the trial set of each equation because
-% they may affect the line breaks. If the second trial for an
-% equation fails (one of its lines exceeds the available width), but
-% the first one succeeded, fall back to the first trial, \ie let that
-% equation fall out of alignment with the rest of the group.
-%
-%
-% All right then, here is the general idea of the whole algorithm for
-% group alignment.
-% To start with, ignore the possibility of equation numbers so that
-% our equation group has the form:
-% \begin{literalcode}
-% LHS[1] RHS[1,1] RHS[1,2] ... RHS[1,n[1]]
-% LHS[2] RHS[2,1] RHS[2,2] ... RHS[2,n[2]]
-% ...
-% LHS[3] RHS[3,1] RHS[3,2] ... RHS[3,n[3]]
-% \end{literalcode}
-% The number of RHS's might not be the same for all of the
-% equations.
-% First, accumulate all of the equation contents in a queue, checking
-% along the way to find the maximum width of all the LHS's and the maximum
-% width of all the RHS's.
-% Call these widths maxwd\_L and maxwd\_R.
-% Clearly if maxwd\_L + maxwd\_R is less than or equal to the available
-% equation width then aligning all of the equations is going to be simple.
-%
-%
-% Otherwise we are going to have to break at least one of the RHS's
-% and/or at least one of the LHS's.
-% The first thing to try is using maxwd\_L for the LHS's and breaking
-% all the RHS's as needed to fit in the remaining space.
-% However, this might be a really dumb strategy if one or more of the
-% LHS's is extraordinarily wide.
-% So before trying that we check whether maxwd\_L exceeds some
-% threshold width beyond which it would be unsensible not to break the LHS.
-% Such as, max(one-third of the available width; six ems), or
-% something like that.
-% Or how about this?
-% Compare the average LHS width and RHS width and divide up the available
-% width in the same ratio for line breaking purposes.
-%
-%
-% BRM: Fairly broad changes; it mostly didn't work before (for me).
-%
-% \begin{description}
-% \item[\cs{begin}\csarg{dgroup} produces a `numbered' group]
-% The number is the next equation number.
-% There are 2 cases:
-% \begin{itemize}
-% \item If ANY contained equations are numbered (|\begin{dmath}|),
-% then they will be subnumbered: eg 1.1a
-% and the group number is not otherwise displayed.
-% \item If ALL contained equations are unnumbered (|\begin{dmath*}|)
-% then the group, as a whole, gets a number displayed,
-% using the same number placement as for equations.
-% \end{itemize}
-% \item[\cs{begin}\csarg{dgroup*} produces an unnumbered group.]
-% Contained equations are numbered, or not, as normal.
-% But note that in the mixed case, it's too late to
-% force the unnumbered eqns to \cs{retry@with@number}
-% We'll just do a simple check of dimensions, after the fact,
-% and force a shiftnumber if we're stuck.
-%
-% NOTE: Does this work for dseries, as well? (alignment?)
-%
-% NOTE: Does \cs{label} attach to the expected thing?
-%
-% \item[For number placement] We use shiftnumber placement on ALL equations
-% if ANY equations need it, or if an unnumbered equation is too
-% wide to be aligned, given that the group or other eqns are numbered.
-% [does this latter case interract with the chosen alignment?]
-%
-% \item[For Alignment]
-% As currently coded, it tries to align on relations, by default.
-% If LHS's are not all present, or too long, it switches to left-justify.
-% Maybe there are other cases that should switch?
-% Should there be a case for centered?
-%
-% NOTE: Should there be some options to choose alignment?
-% \end{description}
-%
-% \begin{macro}{\eq@group}
-% \begin{macro}{\GRP@top}
-%
-% \begin{macrocode}
-\let\eq@group\@False
-\let\grp@shiftnumber\@False
-\let\grp@hasNumber\@False
-\let\grp@eqs@numbered\@False
-\let\grp@aligned\@True
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% Definition of the \env{dgroup} environment.
-% \begin{macrocode}
-\newenvironment{dgroup}{%
- \let\grp@hasNumber\@True\@optarg\@dgroup{}%
-}{%
- \end@dgroup
-}
-% \end{macrocode}
-% And the.
-% \begin{macrocode}
-\newtoks\GRP@queue
-\newenvironment{dgroup*}{%
- \let\grp@hasNumber\@False\@optarg\@dgroup{}%
-}{%
- \end@dgroup
-}
-\def\@dgroup[#1]{%
-%<trace> \breqn@debugmsg{=== DGROUP ==================================================}%
- \let\eq@group\@True \global\let\eq@GRP@first@dmath\@True
- \global\GRP@queue\@emptytoks \global\setbox\GRP@box\box\voidb@x
- \global\let\GRP@label\@empty
- \global\grp@wdL\z@\global\grp@wdR\z@\global\grp@wdT\z@
- \global\grp@linewidth\z@\global\grp@wdNum\z@
- \global\let\grp@eqs@numbered\@False
- \global\let\grp@aligned\@True
- \global\let\grp@shiftnumber\@False
- \eq@prelim
- \setkeys{breqn}{#1}%
- \if\grp@hasNumber \grp@setnumber \fi
-}
-\def\end@dgroup{%
- \EQ@displayinfo \grp@finish
- \if\grp@hasNumber\grp@resetnumber\fi
-}
-% \end{macrocode}
-% If the \pkg{amsmath} package is not loaded the parentequation
-% counter will not be defined.
-% \begin{macrocode}
-\@ifundefined{c@parentequation}{\newcounter{parentequation}}{}
-% \end{macrocode}
-% Init.
-% \begin{macrocode}
-\global\let\GRP@label\@empty
-\def\add@grp@label{%
- \ifx\@empty\GRP@label
- \else \GRP@label \global\let\GRP@label\@empty
- \fi
-}
-% \end{macrocode}
-% Before sending down the `equation' counter to the subordinate level,
-% set the current number in \cs{EQ@numbox}. The
-% \cs{eq@setnumber} function does everything we need here. If
-% the child equations are unnumbered, \cs{EQ@numbox} will retain the
-% group number at the end of the group.
-% \begin{macrocode}
-\def\grp@setnumber{%
- \global\let\GRP@label\next@label \global\let\next@label\@empty
- % Trick \eq@setnumber to doing our work for us.
- \let\eq@hasNumber\@True
- \eq@setnumber
-% \end{macrocode}
-% Define \cn{theparentequation} equivalent to current
-% \cn{theequation}. \cn{edef} is necessary to expand the
-% current value of the equation counter. This might in rare cases
-% cause something to blow up, in which case the user needs to add
-% \cn{protect}.
-% \begin{macrocode}
- \global\sbox\GRP@numbox{\unhbox\EQ@numbox}%
- \grp@wdNum\eq@wdNum
- \let\eq@hasNumber\@False
- \let\eq@number\@empty
- \eq@wdNum\z@
-%
- \protected@edef\theparentequation{\theequation}%
- \setcounter{parentequation}{\value{equation}}%
-% \end{macrocode}
-% And set the equation counter to 0, so that the normal incrementing
-% processes will produce the desired results if the child equations are
-% numbered.
-% \begin{macrocode}
- \setcounter{equation}{0}%
- \def\theequation{\theparentequation\alph{equation}}%
-%<trace> \breqn@debugmsg{Group Number \theequation}%
-}
-% \end{macrocode}
-% At the end of a group, need to reset the equation counter.
-% \begin{macrocode}
-\def\grp@resetnumber{%
- \setcounter{equation}{\value{parentequation}}%
-}
-\newbox\GRP@box
-\newbox\GRP@wholebox
-% \end{macrocode}
-% Save data for this equation in the group
-% \begin{itemize}
-% \item push the trial data onto end of \cs{GRP@queue}.
-% \item push an hbox onto the front of \cs{GRP@box} containing:
-% \cs{EQ@box}, \cs{EQ@copy}, \cs{penalty} 1 and \cs{EQ@numbox}.
-% \end{itemize}
-% \begin{macro}{\grp@push}
-%
-% For putting the equation on a queue.
-% \begin{macrocode}
-\def\grp@push{%
- \global\GRP@queue\@xp\@xp\@xp{\@xp\the\@xp\GRP@queue
- \@xp\@elt\@xp{\EQ@trial}%
- }%
- \global\setbox\GRP@box\vbox{%
- \hbox{\box\EQ@box\box\EQ@copy\penalty\@ne\copy\EQ@numbox}%
- \unvbox\GRP@box
- }%
- \EQ@trial
- \if\eq@isIntertext\else
- \ifdim\eq@wdL>\grp@wdL \global\grp@wdL\eq@wdL \fi
- \ifdim\eq@wdT>\grp@wdT \global\grp@wdT\eq@wdT \fi
- \setlength\dim@a{\eq@wdT-\eq@wdL}%
- \ifdim\dim@a>\grp@wdR \global\grp@wdR\dim@a \fi
- \ifdim\eq@linewidth>\grp@linewidth \global\grp@linewidth\eq@linewidth\fi
- \if\eq@hasNumber
- \global\let\grp@eqs@numbered\@True
- \ifdim\eq@wdNum>\grp@wdNum\global\grp@wdNum\eq@wdNum\fi
- \fi
- \if\EQ@hasLHS\else\global\let\grp@aligned\@False\fi
- \if D\eq@layout \global\let\grp@aligned\@False\fi % Layout D (usually) puts rel on 2nd line.
- \if\eq@shiftnumber\global\let\grp@shiftnumber\@True\fi % One eq shifted forces all.
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\grp@finish}
-%
-% Set accumulated equations from a \env{dgroup} environment.
-%
-% BRM: Questionable patch!!
-% When processing the \cs{GRP@queue}, put it into a \cs{vbox}, then \cs{unvbox} it.
-% This since there's a bizarre problem when the \cs{output} routine
-% gets invoked at an inopportune moment: All the not-yet-processed
-% \cs{GRP@queue} ends up in the \cs{@freelist} and bad name clashes happen.
-% Of course, it could be due to some other problem entirely!!!
-% \begin{macrocode}
-\def\grp@finish{%
-% \debug@box\GRP@box
-% \breqn@debugmsg{\GRP@queue: \the\GRP@queue}%
-% \end{macrocode}
-% == Now that we know the collective measurements, make final decision
-% about alignment \& shifting. Check if alignment is still possible
-% \begin{macrocode}
- \setlength\dim@a{\grp@wdL+\grp@wdR-4em}% Allowance for shrink?
- \if\grp@aligned
- \ifdim\dim@a>\grp@linewidth
- \global\let\grp@aligned\@False
- \fi
- \fi
-% \end{macrocode}
-% If we're adding an unshifted group number that equations didn't know
-% about, re-check shifting
-% \begin{macrocode}
- \addtolength\dim@a{\grp@wdNum }% Effective length
- \if\grp@shiftnumber
- \else
- \if\@And{\grp@hasNumber}{\@Not\grp@eqs@numbered}
- \ifdim\dim@a>\grp@linewidth
- \global\let\grp@shiftnumber\@True
- \fi
- \fi
- \fi
-% \end{macrocode}
-% If we can still align, total width is sum of maximum LHS \& RHS
-% \begin{macrocode}
- \if\grp@aligned
- \global\grp@wdT\grp@wdL
- \global\advance\grp@wdT\grp@wdR
- \fi
-%<*trace>
- \breqn@debugmsg{======= DGROUP Formatting
- \MessageBreak==== \grp@wdL=\the\grp@wdL, \grp@wdR=\the\grp@wdR
- \MessageBreak==== Shift Number=\theb@@le\grp@shiftnumber, Eqns. numbered=\theb@@le\grp@eqs@numbered
- \MessageBreak==== Aligned=\theb@@le\grp@aligned
- \MessageBreak==== \grp@wdNum=\the\grp@wdNum}%
-%</trace>
-% \end{macrocode}
-% BRM: Originally this stuff was dumped directly, without capturing it
-% in a \cs{vbox}
-% \begin{macrocode}
- \setbox\GRP@wholebox\vbox{%
- \let\@elt\eqgrp@elt
- \the\GRP@queue
- }%
-% \end{macrocode}
-% If we're placing a group number (not individual eqn numbers)
-% NOTE: For now, just code up LM number
-% NOTE: Come back and handle other cases.
-% NOTE: Vertical spacing is off, perhaps because of inter eqn. glue
-%
-% A bit of a hack to get the top spacing correct. Fix this logic
-% properly some day. Also, we do the calculation in a group for
-% maximum safety.
-% \begin{macrocode}
- \global\let\eq@GRP@first@dmath\@True
- \begingroup
- \dmath@first@leftskip
- \eq@topspace{\vskip\parskip}%
- \endgroup
- \if\@And{\grp@hasNumber}{\@Not{\grp@eqs@numbered}}%
-% \eq@topspace{\vskip\parskip}%
- \if\grp@shiftnumber
- \copy\GRP@numbox \penalty\@M
- \kern\eqlineskip
- \else
- \setlength\dim@a{%
- (\ht\GRP@wholebox+\dp\GRP@wholebox+\ht\GRP@numbox-\dp\GRP@numbox)/2}%
- \setlength\skip@c{\dim@a-\ht\GRP@numbox}%
- \vglue\skip@c% NON discardable
- \copy\GRP@numbox \penalty\@M
-%<*trace>
-\breqn@debugmsg{GROUP NUMBER: preskip:\the\skip@c, postkern:\the\dim@a, height:\the\ht\GRP@wholebox,
- \MessageBreak==== box height:\the\ht\GRP@numbox, box depth:\the\dp\GRP@numbox}%
-%</trace>
- \kern-\dim@a
- \kern-\abovedisplayskip % To cancel the topspace above the first eqn.
- \fi
- \fi
-%<*trace>
-%\debug@box\GRP@wholebox
-%</trace>
- \unvbox\GRP@wholebox
- \let\@elt\relax
-% \end{macrocode}
-% We'd need to handle shifted, right number here, too!!!
-% \begin{macrocode}
- \eq@botspace % not needed unless bottom number?
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\eqgrp@elt}
-%
-% Mission is to typeset the next equation from the group queue.
-%
-% The arg is an \cs{EQ@trial}
-% \begin{macrocode}
-\def\eqgrp@elt#1{%
- \global\setbox\GRP@box\vbox{%
- \unvbox\GRP@box
- \setbox\z@\lastbox
- \setbox\tw@\hbox{\unhbox\z@
- \ifnum\lastpenalty=\@ne
- \else
- \global\setbox\EQ@numbox\lastbox
- \fi
- \unpenalty
- \global\setbox\EQ@copy\lastbox
- \global\setbox\EQ@box\lastbox
- }%
- }%
- \begingroup \let\eq@botspace\relax
- #1%
- \if\eq@isIntertext
- \vskip\belowdisplayskip
- \unvbox\EQ@copy
- \else
- \grp@override
- \eq@finish
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% Override the \cs{eq@trial} data as needed for this equation in this group
-% NOTE: w/ numbering variations (see above), we may need to tell
-% \cs{eq@finish} to allocate space for a number, but not actually have one
-% \begin{macrocode}
-\def\grp@override{%
-% \end{macrocode}
-% For aligned (possibly becomes an option?)
-% For now ASSUMING we started out as CLM!!!
-% \begin{macrocode}
- \def\eqindent{I}%
-% \end{macrocode}
-% compute nominal left for centering the group
-% \begin{macrocode}
- \setlength\dim@a{(\grp@linewidth-\grp@wdT)/2}%
-% \end{macrocode}
-% Make sure L+R not too wide; should already have unset alignment
-% \begin{macrocode}
- \ifdim\dim@a<\z@\dim@a=\z@\fi
- \dim@b\if L\eqnumside\grp@wdNum\else\z@\fi
-% \end{macrocode}
-% make sure room for number on left, if needed.
-% \begin{macrocode}
- \if\grp@shiftnumber\else
- \ifdim\dim@b>\dim@a\dim@a\dim@b\fi
- \fi
- \if\grp@aligned
- \addtolength\dim@a{\grp@wdL-\eq@wdL}%
- \fi
- \mathindent\dim@a
- \ifdim\dim@b>\dim@a
- \let\eq@shiftnumber\@True
- \fi
-% \end{macrocode}
-% Could set |\def\eqnumplace{T}| (or even (m) if indentation is enough).
-%
-% NOTE: Work out how this should interact with the various formats!!!
-% NOTE: should recognize the case where the LHS's are a bit Wild,
-% and then do simple left align (not on relation)
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-%
-%
-% \section{The \env{darray} environment}
-% There are two potential applications for darray. One
-% is like eqnarray where the natural structure of the material crosses the
-% table cell boundaries, and math operator spacing needs to be preserved
-% across cell boundaries. And there is also the feature of
-% attaching an equation number to each row. The other application
-% is like a regular array but with automatic displaystyle math in each
-% cell and better interline spacing to accommodate outsize cell
-% contents. In this case it is difficult to keep the vert ruling
-% capabilities of the standard \env{array} environment without
-% redoing the implementation along the lines of Arseneau's
-% \pkg{tabls} package. Because the vert ruling feature is at
-% cross purposes with the feature of allowing interline stretch and page
-% breaks within a multiline array of equations, the \env{darray}
-% environment is targeted primarily as an alternative to
-% \env{eqnarray}, and does not support vertical ruling.
-%
-% Overall strategy for \env{darray} is to use
-% \cs{halign} for the body. In the case of a group, use a
-% single halign for the whole group!
-% \begin{aside}
-% What about intertext?
-% \end{aside}
-%
-% That's the most reliable way
-% to get accurate column widths. Don't spread the halign to the
-% column width, just use the natural width. Then, if we repack the
-% contents of the halign into \cs{EQ@box} and \cs{EQ@copy}, as
-% done for dmath, and twiddle a bit with the widths of the first and last
-% cell in each row, we can use the same algorithms for centering and
-% equation number placement as dmath! As well as handling footnotes
-% and vadjust objects the same way.
-%
-% We can't just use \cs{arraycolsep} for \env{darray}, if
-% we want to be able to change it without screwing up interior arrays.
-% So let's make a new colsep variable. The initial value is
-% \quoted{2em, but let it shrink if necessary}.
-% \begin{macrocode}
-\newskip\darraycolsep \darraycolsep 20pt plus1fil minus12pt
-% \end{macrocode}
-% Let's make a nice big default setup with eighteen columns, split up
-% into six sets of lcr like \env{eqnarray}.
-% \begin{macrocode}
-\newcount\cur@row \newcount\cur@col
-\def\@tempa#1#2#3{%
- \cur@col#1 \hfil
- \setbox\z@\hbox{$\displaystyle####\m@th$}\@nx\col@box
- \tabskip\z@skip
- &\cur@col#2 \hfil
- \setbox\z@\hbox{$\displaystyle\mathord{}####\mathord{}\m@th$}\@nx\col@box
- \hfil
- &\cur@col#3 \setbox\z@\hbox{$\displaystyle####\m@th$}\@nx\col@box
- \hfil\tabskip\darraycolsep
-}
-\xdef\darray@preamble{%
- \@tempa 123&\@tempa 456&\@tempa 789%
- &\@tempa{10}{11}{12}&\@tempa{13}{14}{15}&\@tempa{16}{17}{18}%
- \cr
-}
-\@ifundefined{Mathstrut@}{\let\Mathstrut@\strut}{}
-\def\darray@cr{\Mathstrut@\cr}
-\def\col@box{%
-%<*trace>
-%\breqn@debugmsg{Col \number\cur@row,\number\cur@col: \the\wd\z@\space x \the\ht\z@+\the\dp\z@}%
-%</trace>
- \unhbox\z@
-}
-\newenvironment{darray}{\@optarg\@darray{}}{}
-\def\@darray[#1]{%
-%<trace> \breqn@debugmsg{=== DARRAY ==================================================}%
- \if\eq@group\else\eq@prelim\fi
-% \end{macrocode}
-% Init the halign preamble to empty, then unless the \quoted{cols} key is
-% used to provide a non-null preamble just use the
-% default darray preamble which is a multiple lcr.
-% \begin{macrocode}
- \global\let\@preamble\@empty
- \setkeys{breqn}{#1}%
- \the\eqstyle \eq@setnumber
- \ifx\@preamble\@empty \global\let\@preamble\darray@preamble \fi
- \check@mathfonts
- % \let\check@mathfonts\relax % tempting, but too risky
- \@xp\let\csname\string\ \endcsname\darray@cr
- \setbox\z@\vbox\bgroup
- \everycr{\noalign{\global\advance\cur@row\@ne}}%
- \tabskip\z@skip \cur@col\z@
- \global\cur@row\z@
- \penalty\@ne % flag for \dar@repack
- \halign\@xp\bgroup\@preamble
-}
-% \end{macrocode}
-% Assimilate following punctuation.
-% \begin{macrocode}
-\def\enddarray#1{\check@punct@or@qed}
-\def\end@darray{%
- \ifvmode\else \eq@addpunct \Mathstrut@\fi\crcr \egroup
- \dar@capture
- \egroup
-}
-% \end{macrocode}
-%
-% The \cs{dar@capture} function steps back through the
-% list of row boxes and grinds them up in the best possible way.
-% \begin{macrocode}
-\def\dar@capture{%
-%% \showboxbreadth\maxdimen\showboxdepth99\showlists
- \eq@wdL\z@ \eq@wdRmax\z@
- \dar@repack
-}
-% \end{macrocode}
-%
-% The \cs{dar@repack} function is a variation of
-% \cs{eq@repack}.
-% \begin{macrocode}
-\def\dar@repack{%
- \unpenalty
- \setbox\tw@\lastbox
-%\batchmode{\showboxbreadth\maxdimen\showboxdepth99\showbox\tw@}\errorstopmode
- \global\setbox\EQ@box\hbox{%
- \hbox{\unhcopy\tw@\unskip}\penalty-\@M \unhbox\EQ@box}%
- \global\setbox\EQ@copy\hbox{%
- \hbox{\unhbox\tw@\unskip}\penalty-\@M \unhbox\EQ@copy}%
- \unskip
- \ifcase\lastpenalty \else\@xp\@gobble\fi
- \dar@repack
-}
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Miscellaneous}
-% The \cs{condition} command. With
-% the star form, set the argument in math mode instead of text mode.
-% In a series of conditions, use less space between members of the
-% series than between the conditions and the main equation body.
-%
-% WSPR: tidied/fixed things up as it made sense to me but might have
-% broken something else!
-% \begin{macrocode}
-\newskip\conditionsep \conditionsep=10pt minus5pt%
-\newcommand{\conditionpunct}{,}
-% \end{macrocode}
-% \begin{macro}{\condition}
-% \begin{macrocode}
-\newcommand\condition{%
- \begingroup\@tempswatrue
- \@ifstar{\@tempswafalse \condition@a}{\condition@a}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\condition@a}
-% \begin{macrocode}
-\newcommand\condition@a[2][\conditionpunct]{%
- \unpenalty\unskip\unpenalty\unskip % BRM Added
- \hbox{#1}%
- \penalty -201\relax\hbox{}% Penalty to allow breaks here.
- \hskip\conditionsep
- \setbox\z@\if@tempswa\hbox{#2}\else\hbox{$\textmath@setup #2$}\fi
-% \end{macrocode}
-% BRM's layout is achieved with this line commented out but it has the nasty side-effect of shifting the equation number to the next line:
-% \begin{macrocode}
-% \global\eq@wdCond\wd\z@
- \usebox\z@
- \endgroup}
-% \end{macrocode}
-% \end{macro}
-%
-% The \env{dsuspend} environment. First the old one that didn't work.
-% \begin{macrocode}
-\newenvironment{XXXXdsuspend}{%
- \global\setbox\EQ@box\vbox\bgroup \@parboxrestore
-% \end{macrocode}
-% If we are inside a list environment, \cs{displayindent} and
-% \cs{displaywidth} give us \cs{@totalleftmargin} and
-% \cs{linewidth}.
-% \begin{macrocode}
- \parshape 1 \displayindent \displaywidth\relax
- \hsize=\columnwidth \noindent\ignorespaces
-}{%
- \par\egroup
-% \end{macrocode}
-% Let's try giving \cs{EQ@box} the correct height for the first
-% line and \cs{EQ@copy} the depth of the last line.
-% \begin{macrocode}
- \global\setbox\GRP@box\vbox{%
- \vbox{\copy\EQ@box\vtop{\unvbox\EQ@box}}%
- \unvbox\GRP@box
- }%
-% \end{macrocode}
-% Need to add a dummy element to \cs{GRP@queue}.
-% \begin{macrocode}
- \global\GRP@queue\@xp{\the\GRP@queue
- \@elt{\gdef\EQ@trial{}}%
- }%
-}
-% \end{macrocode}
-% And then the one that does work.
-% \begin{macrocode}
-\newenvironment{dsuspend}{%
- \global\setbox\EQ@box\vbox\bgroup \@parboxrestore
- \parshape 1 \displayindent \displaywidth\relax
- \hsize=\columnwidth \noindent\ignorespaces
-}{%
- \par\egroup
- \global\setbox\GRP@box\vbox{%
- \hbox{\copy\EQ@box\vtop{\unvbox\EQ@box}}%
- \unvbox\GRP@box
- }%
- \global\GRP@queue\@xp{\the\GRP@queue
-% \@elt{\gdef\EQ@trial{\let\eq@isIntertext\@True}}%
- \@elt{\let\eq@isIntertext\@True}%
- }%
-}
-% \end{macrocode}
-% Allow \cn{intertext} as a short form of the \env{dsuspend}
-% environment; it's more convenient to write, but it doesn't support
-% embedded verbatim because it reads the material as a macro argument.
-% To support simultaneous use of \pkg{amsmath} and
-% \pkg{breqn}, the user command \cs{intertext} is left alone
-% until we enter a \pkg{breqn} environment.
-% \begin{macrocode}
-\newcommand\breqn@intertext[1]{\dsuspend#1\enddsuspend}
-% \end{macrocode}
-%
-%
-% \begin{macro}{\*}
-% \begin{macro}{\discretionarytimes}
-% Discretionary times sign. Standard \latex definition
-% serves only for inline math. Should the thin space be
-% included? Not sure.
-% \begin{macrocode}
-\renewcommand{\*}{%
- \if@display
-% \end{macrocode}
-% Since \cs{eq@binoffset} is mu-glue, we can't use it directly
-% with \cs{kern} but have to measure it separately in a box.
-% \begin{macrocode}
- \setbox\z@\hbox{\mathsurround\z@$\mkern\eq@binoffset$}%
- \discretionary{}{%
- \kern\the\wd\z@ \textchar\discretionarytimes
- }{}%
- \thinspace
- \else
- \discretionary{\thinspace\textchar\discretionarytimes}{}{}%
- \fi
-}
-% \end{macrocode}
-% This is only the symbol; it can be changed to some other symbol if
-% desired.
-% \begin{macrocode}
-\newcommand{\discretionarytimes}{\times}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \begin{macro}{\nref}
-%
-% This is like \cs{ref} but doesn't apply font changes or other
-% guff if the reference is undefined.
-% And it is fully expandable for use as a label value.
-% \begin{aside}
-%
-% Can break with Babel if author uses active characters in label key;
-% need to address that \begin{dn}
-% mjd,1999/01/21
-% \end{dn}
-% .
-% \end{aside}
-%
-% \begin{macrocode}
-\def\nref#1{\@xp\@nref\csname r@#1\endcsname}
-\def\@nref#1#2{\ifx\relax#1??\else \@xp\@firstoftwo#1\fi}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-%
-% \section{Wrap-up}
-% The usual endinput.
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-%
-%
-%
-% \section{To do}
-% \begin{enumerate}
-% \item Alignment for equation groups.
-%
-%
-% \item
-% Use dpc's code for package options in keyval form.
-%
-% \item
-% Encapsulate \dquoted{break math} into a subroutine taking suitable
-% arguments.
-%
-% \item
-% Need a density check for layout S when linewidth is very small.
-%
-% \item
-% Make \verb":=" trigger a warning about using \cs{coloneq}
-% instead.
-%
-% \item Ill-centered multiline equation (three-line case) in
-% test008.
-%
-% \item Attaching a single group number.
-%
-%
-% \item
-% Make sure to dump out box registers after done using them.
-%
-% \item Do the implementation for \cs{eq@resume@parshape}.
-%
-%
-% \item Check on stackrel and buildrel and relbar and ???.
-%
-%
-% \item Test math symbols at the beginning of array cells.
-%
-% \item Test \dbslash cmd in and out of delims.
-%
-% \item Framing the equation body: the parshape and number placement
-% need adjusting when a frame is present.
-%
-%
-% \item Cascading line widths in list env.
-%
-%
-% \item Noalign option for dmath = multline arrangement?
-%
-%
-% \item Nocompact option, suggested 1998/05/19 by Andrew
-% Swann.
-%
-%
-% \item \cs{delbreak} cmd to add discretionary space at a break
-% within delimiters.
-%
-%
-% \item Reduce above/below skip when the number is shifted.
-%
-%
-% \item Need a \cs{middelim} command for marking a delimiter symbol
-% as nondirectional if it has an innate directionality \verb"()[]" \etc .
-%
-%
-% \item
-% \cs{xrightarrow} from amsmath won't participate in line
-% breaking unless something extra is done.
-% Make \cs{BreakingRel} and \cs{BreakingBin} functions?
-%
-% \item Placement of number in an indented quotation or
-% abstract.
-%
-% \item If $LHSwd > 2em$, it might be a good idea to try with
-% eq@indentstep = 2em before shifting the number. Currently this
-% doesn't happen if the first trial pass (without the number)
-% succeeds with $indentstep = LHSwd > 2em$.
-%
-%
-% \item Read past \verb"\end{enumerate}" when checking
-% for \verb"\end{proof}"?
-%
-% \item
-% Look into using a \dquoted{qed-list} of environment names instead of
-% checking the existence of \cs{proofqed}.
-%
-% \item Pick up the vadjust\slash footnote\slash mark handling.
-%
-%
-% \item Forcing\slash prohibiting page breaks after\slash before
-% an equation.
-%
-%
-% \item Adding a spanner brace on the left and individual numbers on
-% the right (indy-numbered cases).
-%
-%
-% \item Provide \cs{shiftnumber}, \cs{holdnumber} to
-% override the decision.
-%
-% \item Provide a mechanism for adjusting the vertical position of
-% the number. Here a version-specific selection macro would be
-% useful.
-% \begin{literalcode}
-% \begin{dmath}[
-% style={\foredition{1}{\raisenumber{13pt}}}
-% ]
-% \end{literalcode}
-%
-%
-% \item
-% Add an alignleft option for an equation group to mean, break and
-% align to a ladder layout as usual within the equations, but for the
-% group alignment used the leftmost point (for equations that don't
-% have an LHS, this makes no difference).
-%
-% \item
-% Test with Arseneau's wrapfig for parshape\slash everypar
-% interaction.
-%
-%
-% \item Fix up the macro/def elements.
-%
-% \item Convert the literal examples in section \quoted{Equation types and
-% forms} to typeset form.
-%
-%
-% \item Compile comparison-examples: \eg , a standard equation
-% env with big left-right objects that don't shrink, versus how shrinking
-% can allow it to fit.
-%
-%
-% \item Frame the \dquoted{figures} since they are mostly
-% text.
-%
-% \end{enumerate}
-%
-%
-%
-% Possible enhancements:
-% \begin{enumerate}
-% \item Provide a \opt{pull} option meaning to pull the first
-% and last lines out to the margin, like the \env{multline}
-% environment of the \pkg{amsmath} package. Maybe this should
-% get an optional argument, actually, to specify the amount of space left
-% at the margin.
-%
-% \item With the draft option, one would like to see the equation
-% labels in the left margin. Need to check with the
-% \pkg{showkeys} package.
-%
-%
-% \item Options for break preferences: if there's not enough room, do
-% we first shift the number, or first try to break up the equation
-% body?. In an aligned group, does sticking to the group alignment
-% take precedence over minimizing the number of line breaks needed for
-% individual equations?. And the general preferences probably need
-% to be overridable for individual instances.
-%
-% \item Extend suppress-breaks-inside-delimiters support to inline
-% math (suggestion of Michael Doob).
-%
-% \item Use belowdisplayshortskip above a dsuspend fragment if the
-% fragment is only one line and short enough compared to the equation line
-% above it.
-%
-%
-% \item Add \cs{eqfuzz} distinct from \cs{hfuzz}.
-% Make use of it in the measuring phase.
-%
-%
-% \item Provision for putting in a \quoted{continued} note.
-%
-% \item Conserve box mem: modify frac, sub, sup, overline, underline,
-% sqrt, to turn off \cs{bin@break} and (less urgently)
-% \cs{rel@break}.
-%
-%
-% \item More explicit support for Russian typesetting conventions (cf
-% Grinchuk article).
-%
-%
-% \item With package option \opt{refnumbers},
-% leave unnumbered all uncited equations, even if they are not done with
-% the star form (Bertolazzi's easyeqn idea).
-%
-% \item In an equation group, use a vertical bracket with the
-% equation number to mark the lines contained in that equation.
-%
-%
-% \item For a two-line multline thingamabob, try to
-% make sure that the lines overlap in the middle by 2 em or whatever
-% (settable design variable).
-%
-% \item Provide a separate vertical column for the principal mathrel
-% symbols and center them within the column if they aren't all the same
-% width. Maybe an option for \env{dmath}: relwidth=x, so that two
-% passes are not required to get the max width of all the mathrels.
-% Or, no, just require it to be an halign or provide a macro to be
-% applied to all the shorter rels:
-% \begin{literalcode}
-% lhs \widerel{19pt}{=} ...
-% \xrightarrow{foo} ...
-% \end{literalcode}
-%
-%
-% \item try to use vadjust for keepglue
-%
-% \end{enumerate}
-%
-% \PrintIndex
-%
-% \Finale
diff --git a/Master/texmf-dist/source/latex/mh/empheq.dtx b/Master/texmf-dist/source/latex/mh/empheq.dtx
deleted file mode 100644
index 5edb64bcf0a..00000000000
--- a/Master/texmf-dist/source/latex/mh/empheq.dtx
+++ /dev/null
@@ -1,4280 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 2002-2007 by Morten Hoegholm
-% Copyright (C) 2012 by Lars Madsen
-%
-% 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, Will Robertson and Joseph Wright.
-%
-% This work consists of the main source file empheq.dtx
-% and the derived files
-% empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/empheq.dtx
-% CTAN:macros/latex/contrib/mh/empheq.pdf
-%
-% Unpacking:
-% (a) If empheq.ins is present:
-% tex empheq.ins
-% (b) Without empheq.ins:
-% tex empheq.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{empheq.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If empheq.drv is present:
-% latex empheq.drv
-% (b) Without empheq.drv:
-% latex empheq.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex empheq.dtx
-% makeindex -s gind.ist empheq.idx
-% pdflatex empheq.dtx
-% makeindex -s gind.ist empheq.idx
-% pdflatex empheq.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/empheq.sty
-% TDS:doc/latex/mh/empheq.pdf
-% TDS:source/latex/mh/empheq.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: empheq 2007/12/03 v2.12 empheq (MH)}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 2002-2007 by Morten Hoegholm
-Copyright (C) 2012 by Lars Madsen
-
-
-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, Will Robertson and Joseph Wright.
-
-This work consists of the main source file empheq.dtx
-and the derived files
- empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
-
-\endpreamble
-
-\generate{%
- \file{empheq.ins}{\from{empheq.dtx}{install}}%
- \file{empheq.drv}{\from{empheq.dtx}{driver}}%
- \usedir{tex/latex/mh}%
- \file{empheq.sty}{\from{empheq.dtx}{package}}%
-}
-
-\obeyspaces
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* empheq.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `empheq.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{empheq.drv}%
- [2013/02/12 v2.13 Emphasizing equations]
-\documentclass{ltxdoc}
-\usepackage{mathpazo}
-\usepackage[overload]{empheq}
-\usepackage{xcolor,varioref,booktabs,fancybox}
-\usepackage[overload]{textcase}
-
-\pagestyle{headings}
-\hyphenation{emph-eq}
-\makeatletter
-\providecommand*\pkg[1]{\textsf{#1}}
-\providecommand*\env[1]{\texttt{#1}}
-\providecommand*\email[1]{\href{mailto:#1}{\texttt{#1}}}
-\providecommand*\mode[1]{\texttt{[#1]}}
-\providecommand*\file[1]{\texttt{#1}}
-\addtolength\marginparwidth{-30pt}
-
-
-\newcommand*\AddDescribe[3]{%
- \@namedef{Describe#1}{\leavevmode\@bsphack\begingroup\MakePrivateLetters
- \@nameuse{Describe@#1}}
- \@namedef{Describe@#1}##1{\endgroup
- \marginpar{\raggedleft\@nameuse{PrintDescribe#1}{##1}}%
- \@nameuse{Special#1Index}{##1}\@esphack\ignorespaces}
- \@namedef{Special#1Index}##1{\@bsphack
- \index{##1\actualchar{\protect\ttfamily ##1}
- (#2)\encapchar usage}%
- \index{#3:\levelchar##1\actualchar{\protect\ttfamily ##1}\encapchar
- usage}\@esphack}
- \@namedef{PrintDescribe#1}##1{\strut \MacroFont ##1\ }%
- \@namedef{Print#1Name}##1{\strut \MacroFont ##1\ }%
-}
-\AddDescribe{Color}{color}{colors}
-\AddDescribe{KeyFamily}{key family}{key families}
-\newcommand*\DescribeDelimiter[1]{%
- \cs{#1}&\SpecialMkhIndex{empheq#1}\cs{empheq}\texttt{#1} &
- \SpecialMkhIndex{empheqbig#1}\cs{empheqbig}\texttt{#1} &
- $\@nameuse{#1}$\tabularnewline}
-\newcommand*\SpecialMkhIndex[1]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily \protect\bslash\space#1}
- (` $\bslash#1$ ')\encapchar usage}%
- \@esphack
-}
-\newcommand\TabDescribeOption[3][(default)]{%
- \SpecialOptIndex{#2}\opt{#2} & #3 \tabularnewline
-}
-\newcommand*\TabDescribeAmsKey[2][]{%
- \SpecialKeyIndex{#2}\env{#2} &
- \texttt{\{#2#1\}} &
- \SpecialKeyIndex{#2*}\env{#2*} &
- \texttt{\{#2*#1\}} \tabularnewline
-}
-\newcommand*\TabDescribeOptKey[3][]{%
- \SpecialKeyIndex{#2}\key{#2} &
- \texttt{#2=}\meta{#3} & #1 \tabularnewline
-}
-
-\newenvironment{codesyntax}
- {\par\small\addvspace{4.5ex plus 1ex}%
- \vskip -\parskip
- \noindent
- \begin{tabular}{|l|}\hline\ignorespaces}%
- {\\\hline\end{tabular}\nobreak\par\nobreak
- \vspace{2.3ex}\vskip -\parskip\noindent\ignorespacesafterend}
-\makeatletter
-
-\newcommand*\FeatureRequest[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Feature request by\\#1\\#2%
- }
- }%
-}
-
-\newcommand*\cttPosting[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Posted on \texttt{comp.text.tex} \\#1\\#2%
- }%
- }%
-}
-
-\expandafter\def\expandafter\MakePrivateLetters\expandafter{%
- \MakePrivateLetters \catcode`\_=11\relax
-}
-
-\providecommand*\SpecialOptIndex[1]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily #1}
- (option)\encapchar usage}%
- \index{options:\levelchar#1\actualchar{\protect\ttfamily #1}\encapchar
- usage}\@esphack}
-\providecommand*\opt[1]{\texttt{#1}}
-
-\providecommand*\SpecialKeyIndex[1]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily #1}
- (key)\encapchar usage}%
- \index{keys:\levelchar#1\actualchar{\protect\ttfamily #1}\encapchar
- usage}\@esphack}
-\providecommand*\key[1]{\textsf{#1}}
-\providecommand*\keyfam[1]{\textsf{#1}}
-
-\providecommand*\eTeX{$\m@th\varepsilon$-\TeX}
-
-\def\MTmeta#1{%
- \ensuremath\langle
- \ifmmode \expandafter \nfss@text \fi
- {%
- \meta@font@select
- \edef\meta@hyphen@restore
- {\hyphenchar\the\font\the\hyphenchar\font}%
- \hyphenchar\font\m@ne
- \language\l@nohyphenation
- #1\/%
- \meta@hyphen@restore
- }\ensuremath\rangle
- \endgroup
-}
-\makeatother
-\DeclareRobustCommand\meta{\begingroup\MakePrivateLetters\MTmeta}%
-\def\MToarg#1{{\ttfamily[}\meta{#1}{\ttfamily]}\endgroup}
-\DeclareRobustCommand\oarg{\begingroup\MakePrivateLetters\MToarg}%
-\def\MHmarg#1{{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\marg{\begingroup\MakePrivateLetters\MHmarg}%
-\def\MHarg#1{{\ttfamily\char`\{#1\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\arg{\begingroup\MakePrivateLetters\MHarg}%
-\def\MHcs#1{\texttt{\char`\\#1}\endgroup}
-\DeclareRobustCommand\cs{\begingroup\MakePrivateLetters\MHcs}
-\def\MHbool#1{{\ttfamily #1}\endgroup}
-\DeclareRobustCommand\bool{\begingroup\MakePrivateLetters\MHbool}%
-
-\def\endverbatim{\if@newlist
-\leavevmode\fi\endtrivlist\vspace{-\baselineskip}}
-\expandafter\let\csname endverbatim*\endcsname =\endverbatim
-
-\let\MTtheindex\theindex
-\def\theindex{\MTtheindex\MakePrivateLetters}
-
-\newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}
-\definecolor{myblue}{rgb}{.8, .8, 1}
-\newcommand*\mybluebox[1]{%
- \colorbox{myblue}{\hspace{1em}#1\hspace{1em}}}
-\newenvironment{important}[2][]{%
- \setkeys{EmphEqEnv}{#2}%
- \setkeys{EmphEqOpt}{box=\mybluebox,#1}%
- \EmphEqMainEnv}%
- {\endEmphEqMainEnv}
-\definecolor{shadecolor}{cmyk}{0,0,0.41,0}
-\definecolor{light-blue}{cmyk}{0.25,0,0,0}
-\newsavebox{\mysaveboxM} % M for math
-\newsavebox{\mysaveboxT} % T for text
-\newcommand*\Garybox[2][Example]{%
- \sbox{\mysaveboxM}{#2}%
- \sbox{\mysaveboxT}{\fcolorbox{black}{light-blue}{#1}}%
- \sbox{\mysaveboxM}{%
- \parbox[b][\ht\mysaveboxM+.5\ht\mysaveboxT+.5\dp\mysaveboxT][b]{%
- \wd\mysaveboxM}{#2}%
- }%
- \sbox{\mysaveboxM}{%
- \fcolorbox{black}{shadecolor}{%
- \makebox[\linewidth-10em]{\usebox{\mysaveboxM}}%
- }%
- }%
- \usebox{\mysaveboxM}%
- \makebox[0pt][r]{%
- \makebox[\wd\mysaveboxM][c]{%
- \raisebox{\ht\mysaveboxM-0.5\ht\mysaveboxT
- +0.5\dp\mysaveboxT-0.5\fboxrule}{\usebox{\mysaveboxT}}%
- }%
- }%
-}
-
-\newcommand\EmphEqpart{%
- \def\partname{\EmphEqpartname}%
- \part}
-
-\def\EmphEqpartname{Part}
-\makeatother
-
-\usepackage{graphicx}
-\usepackage[final,breaklinks=true,hyperindex=false]{hyperref}
-\renewcommand*\usage[1]{\textit{\hyperpage{#1}}}
-
-\OnlyDescription
-\begin{document}
-\DocInput{empheq.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v2.11}{2004/08/03}{Removed interface to the obsolete empheq
-% package \pkg{empheq07}}
-%
-% \changes{v2.10}{2004/07/26}{Rewrote most of the documentation}
-%
-% \changes{v2.10}{2004/07/26}{Moved options \texttt{fixamsmath} and
-% \texttt{donotfixamsmathbugs} to \pkg{mathtools}}
-%
-% \changes{v2.10}{2004/07/26}{Added support for \pkg{showkeys}}
-%
-% \changes{v2.00}{2004/04/14}{Added options \opt{overload},
-% \opt{overload2}, \texttt{fixamsmath}, and
-% \texttt{donotfixamsmathbugs} plus descriptions of their use}
-%
-% \changes{v1.06}{2004/03/13}{Upgraded license to LPPL version 1.3}
-%
-% \changes{v1.00}{2004/02/15}{Complete rewrite of the package hence
-% no description of the changes made}
-%
-% \changes{v0.7a}{2004/02/15}{Made the old package obsolete and
-% changed its name to \pkg{empheq-obsolete}}
-%
-% \changes{v0.7}{2003/05/11}{Added further examples and changed
-% existing ones}
-% \changes{v0.6b}{2003/03/04}{Added example for changing margins
-% inside the boxtype}
-% \changes{v0.6a}{2003/01/28}{Minor updates to documentation}
-%
-% \changes{v0.5}{2002/12/30}{First experimental and very limited
-% release}
-%
-% \GetFileInfo{empheq.drv}
-% \CheckSum{2495}
-%
-% \title{The \pkg{empheq} package\thanks{This file has version number
-% \fileversion, last revised \filedate.}\\
-% Emphasizing equations in \LaTeXe}
-% \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
-%
-% \begin{abstract}
-% The \pkg{empheq} package can best be described as a visual markup
-% extension to \pkg{amsmath}. In short it offers a)~a multi line
-% equivalent of \cs{boxed} from \pkg{amsmath} and b)~a way to
-% produce arbitrary delimiters that span entire math displays.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \clearpage
-% \EmphEqpart{Basic user's guide}
-%
-% There can be little doubt that the de facto standard for
-% mathematical typesetting in \LaTeX{} is the \pkg{amsmath} package.
-% For the creation of \pkg{empheq}, a visual markup package for use
-% in math, it made perfect sense to have \pkg{amsmath} as the
-% backbone.
-%
-% The main idea of \pkg{empheq} is to maintain the familiar syntax
-% of the \pkg{amsmath} environments while still providing an easy
-% way of specifying markup instructions. This manual is plastered
-% with examples showing just how.
-%
-%
-% \section{Basic use of the package}
-%
-% So what is it \pkg{empheq} does? Well, it allows you to produce
-% displays like this:
-% \begin{subequations}
-% \begin{empheq}[
-% box=\mybluebox,
-% right={\;\makebox[.9em]{$\raisebox{-.5\totalheight+\fontdimen22\textfont2}
-% {\resizebox{!}{\EmphEqdisplayheight+\EmphEqdisplaydepth}{!}}$}},
-% left={X=Y\Rightarrow\empheqlbrace}
-% ]{alignat=3}
-% A_1&=b_1 & \qquad c_1&=d_1 & \qquad e_1&= f_1
-% \tag*{\_A\raisebox{1ex}{silly}\raisebox{-1ex}{tag}\_}\\
-% A_2&=b_2 & \qquad c_2&=d_2 & \qquad e_2&= f_2 \\
-% A_3&=b_3 & \qquad c_3&=d_3 & \qquad e_3&= f_3
-% \end{empheq}
-% \end{subequations}
-% In short \pkg{empheq} enables the user to put things on every side
-% of the display without said user having to worry about what
-% happens to the equation numbers. For example you can now have a
-% display containing multiple lines and still get the effect of the
-% \cs{boxed} command from \pkg{amsmath}.
-%
-%
-% \subsection{Using the \env{empheq} environment}
-%
-% The package defines a single environment
-% \SpecialEnvIndex{empheq}\env{empheq} and the usage is kind of straight
-% forward:
-% \begin{codesyntax}
-% |\begin{empheq}|\oarg{markup instructions}\marg{\AmS{} env_name}\\
-% \mbox{}\quad\meta{contents of \AmS{} environment}\\
-% |\end{empheq}|
-% \end{codesyntax}
-% A first minimal example file would then be something like
-% \begin{verbatim}
-% \documentclass{minimal}
-% \usepackage{empheq}
-% \begin{document}
-% \begin{empheq}{align*}
-% a&=b \tag{*}\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{document}
-% \end{verbatim}
-% This gives the following display:
-% \begin{empheq}{align*}
-% a&=b \tag{*}\\
-% 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
-% \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
-% \env{alignat} environment. For this you have to specify the number
-% of columns as shown below.
-% \begin{verbatim}
-% \begin{empheq}{alignat=2}
-% a &= b &\quad c &= d \\
-% \text{this} &= \text{that} &\quad \mathit{fish}&\neq fish
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}{alignat=2}
-% a &= b &\quad c &= d \\
-% \text{this} &= \text{that} &\quad \mathit{fish}&\neq fish
-% \end{empheq}
-% To choose the starred version of \env{alignat}, simply type
-% \arg{alignat*=2} instead in the above example.
-%
-% The supported \AmS{} environments are listed in Table
-% \vref{tab:environments}. Not supported is the standard \LaTeX{}
-% \env{eqnarray} environment as it is fundamentally
-% deficient.\footnote{See for instance
-% \url{http://www.tex.ac.uk/cgi-bin/texfaq2html?label=eqnarray}}
-%
-% \begin{table}
-% \centering
-% \begin{tabular}{llll}\toprule
-% Environment & Usage & Environment & Usage \\ \midrule
-% \TabDescribeAmsKey{equation}
-% \TabDescribeAmsKey{align}
-% \TabDescribeAmsKey{gather}
-% \TabDescribeAmsKey{flalign}
-% \TabDescribeAmsKey[=\textrm{\meta{cols}}]{alignat}
-% \TabDescribeAmsKey{multline} \bottomrule
-% \end{tabular}
-% \caption{The supported \pkg{amsmath}
-% environments}\label{tab:environments}
-% \end{table}
-%
-%
-% \subsection{Markup instructions}
-%
-% The optional argument of the \env{empheq} environment will take
-% markup instructions consisting of a $\meta{key}=\meta{value}$ list
-% of assignments. There are currently five such keys (a sixth is
-% added for naming consistency). They're shown in Table
-% \vref{tab:keys}.
-%
-% \begin{table}
-% \centering
-% \begin{tabular}{llp{13em}}\toprule
-% Key & Usage & Additional Info \tabularnewline \midrule
-% \TabDescribeOptKey{box}{box command}
-% \TabDescribeOptKey{innerbox}{box command}
-% \TabDescribeOptKey[Use \cs{text}\arg{...} if you need text
-% material.]{left}{math material}
-% \TabDescribeOptKey[Use \cs{text}\arg{...} if you need text
-% material.]{right}{math material}
-% \TabDescribeOptKey[Alias for \key{box}.]{outerbox}{box command}
-% \TabDescribeOptKey[Contents must be horizontally centered;
-% can only be used in \mode{fleqn} mode.]
-% {marginbox}{box command}
-% \bottomrule
-% \end{tabular}
-% \caption{The six keys for the optional argument of the
-% \env{empheq} environment}\label{tab:keys}
-% \end{table}
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{left}\key{left}
-% \end{codesyntax}
-% The key \key{left} is for material put on the left side of the
-% display. The material is typeset in math mode and centered
-% vertically.
-% \begin{verbatim}
-% \begin{empheq}[left=L\Rightarrow]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[left=L\Rightarrow]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-%
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{right}\key{right}
-% \end{codesyntax}
-% As there is a \key{left} key it hopefully comes as no surprise
-% that there is a companion \key{right} key for typesetting material
-% on the right side of the display.
-% \begin{verbatim}
-% \begin{empheq}[right=\Leftarrow R]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[right=\Leftarrow R]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{box}\key{box}\\
-% \SpecialKeyIndex{outerbox}\key{outerbox}
-% \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
-% \fbox{\cs{fbox}}.
-% \begin{verbatim}
-% \begin{empheq}[box=\fbox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box=\fbox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% The key \key{outerbox} is an alias for \key{box} and is added for
-% naming consistency with the key described below.
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{innerbox}\key{innerbox}
-% \end{codesyntax}
-% There is also an \key{innerbox} key. It is not very interesting
-% unless you use one of the other keys.
-% \begin{verbatim}
-% \begin{empheq}[innerbox=\fbox,
-% left=L\Rightarrow]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[innerbox=\fbox,
-% left=L\Rightarrow]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{marginbox}\key{marginbox}
-% \end{codesyntax}
-% \FeatureRequest{Uwe Siart}{2003/12/08}
-% The last key is the \key{marginbox} key. If you typeset your math
-% in \mode{fleqn} mode\footnote{Sorry, but I can't show you because
-% 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}
-% 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.
-%
-%
-% \begin{quote}
-% \textbf{Warning}: \pkg{keyval} treats commas and equal signs as
-% separator and assignment signs which in turn means that if you
-% want to typeset either of them, they \emph{must}---and believe me,
-% it's really important---be enclosed in braces. In short:
-% \begin{description}
-% \item[{\makebox[3em][l]{Good}}] \texttt{[left=\{(A,B)=(1,0)\}]}
-% \item[{\makebox[3em][l]{Bad}}] \texttt{[left=(A,B)=(1,0)]}
-% \end{description}
-% \end{quote}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\empheqset}\cs{empheqset}\marg{markup instructions}
-% \end{codesyntax}
-% \FeatureRequest{Uwe Siart}{2004/01/13}
-% You can also set the keys globally\footnote{Or rather: outside the
-% scope of the \env{empheq} environment. The settings will still
-% obey scoping rules.} with the command
-% \cs{empheqset}. This means that
-% \begin{verbatim}
-% \empheqset{marginbox=\psframebox}
-% \end{verbatim}
-% will force a |box=\psframebox| in all occurrences of the
-% \env{empheq} environment, but an explicitly given \key{box} or
-% \key{marginbox} will override this setting. You can only use the
-% keys listed in this section as arguments to \cs{empheqset}; not
-% the \AmS\ environments.
-%
-%
-%
-% \subsection{What won't work in the \env{empheq} environment}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{intertext}\cs{intertext}\marg{text}\\
-% \SpecialUsageIndex{displaybreak}\cs{displaybreak}\oarg{num}
-% \end{codesyntax}
-% Now we've seen some of the things that work in the \env{empheq}
-% environment but we also have to take note of what won't work. As
-% this package provides a way to box multi line math displays it can
-% come as no surprise that using either \cs{intertext} or
-% \cs{displaybreak} inside the \env{empheq} environment makes no
-% sense. Should you however happen to try them anyway, you'll
-% experience that \cs{intertext} issues an error message and
-% \cs{displaybreak} issues a warning. The reason only \cs{intertext}
-% gives an error message is that you'll get output very different
-% from what you expect, and that is not the case (so much at least)
-% with \cs{displaybreak}. But of course, you'll never see either
-% message because you read the manual!
-%
-%
-%
-% \subsection{Special delimiters}
-%
-% As you've seen a few pages back, it's possible to add material on
-% both sides of the math display. When doing so you often need a
-% delimiter that scales to fit the entire display, so it comes as no
-% surprise that \pkg{empheq} provides such delimiters.
-% \begin{codesyntax}
-% \cs{empheql}\meta{delim_name} \cs{empheqbigl}\meta{delim_name}\\
-% \cs{empheqr}\meta{delim_name} \cs{empheqbigr}\meta{delim_name}
-% \end{codesyntax}
-% For example one might need a large brace like the one in the
-% \env{cases} environment:
-% \begin{verbatim}
-% \begin{empheq}[left=\empheqlbrace, right=\empheqrbrace]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[left=\empheqlbrace, right=\empheqrbrace]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-% The naming scheme is \cs{empheq}\meta{delimiter name} and
-% \cs{empheqbig}\meta{delimiter name}. Thus \cs{empheqrbrace}
-% produces an auto-scaling right brace with same size as the math
-% display while \cs{empheqbigrbrace} produces an even bigger version
-% that spans the inner box plus the math display inside it. For a
-% complete list of supported delimiters see Table
-% \vref{tab:delimiters}.
-%
-% \begin{table}
-% \centering
-% \begin{tabular}{lllc} \toprule
-% \multicolumn{3}{c}{\textbf{Delimiter}}\\ \cmidrule{1-3}
-% \multicolumn{1}{c}{Original} & \multicolumn{1}{c}{Normal} &
-% \multicolumn{1}{c}{Bigger} & Symbol\\ \midrule
-% \DescribeDelimiter{lbrace} \DescribeDelimiter{rbrace}
-% \DescribeDelimiter{lbrack} \DescribeDelimiter{rbrack} \midrule
-% \DescribeDelimiter{langle} \DescribeDelimiter{rangle}
-% \DescribeDelimiter{lparen} \DescribeDelimiter{rparen} \midrule
-% \DescribeDelimiter{lvert} \DescribeDelimiter{rvert}
-% \DescribeDelimiter{lVert} \DescribeDelimiter{rVert} \midrule
-% \DescribeDelimiter{lfloor} \DescribeDelimiter{rfloor}
-% \DescribeDelimiter{lceil} \DescribeDelimiter{rceil} \bottomrule
-% \end{tabular}
-% \caption{The supported auto-scaling delimiters in
-% \pkg{empheq}}\label{tab:delimiters}
-% \end{table}
-%
-%
-%
-% \section{Taking things a little further}
-%
-% So far we have covered the basic functions of \pkg{empheq}: the
-% markup instructions and the predefined auto-scaling delimiters.
-% There is more to \pkg{empheq} however, and we'll cover that in
-% this section.
-%
-% \subsection{Loading the package}
-%
-% The package has two main requirements: One is the
-% \pkg{mathtools}\footnote{By the same author and is distributed
-% with \pkg{empheq}. See its documentation for more information.}
-% package which provides \pkg{empheq} with a lot of necessary tools
-% for doing its thing. The other one is \pkg{amsmath} of course, and
-% to make the loading procedure as easy as possible, you can simply
-% substitute
-% \begin{verbatim}
-% \usepackage[leqno,fleqn,intlimits]{amsmath}
-% \end{verbatim}
-% with
-% \begin{verbatim}
-% \usepackage[leqno,fleqn,intlimits]{empheq}
-% \end{verbatim}
-% \pkg{empheq} makes sure that the \pkg{amsmath} options are passed
-% on and loaded by \pkg{amsmath}. The same goes for the options
-% provided by \pkg{mathtools}.
-%
-%
-% \subsubsection{Compatibility with the old version}
-%
-% The current version (\fileversion) of \pkg{empheq} is incompatible with
-% 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
-% to the new version because it is so much better.
-%
-% \subsection{Package options}
-%
-% In addition to the \pkg{amsmath} options, \pkg{empheq} itself
-% provides a string of options listed in Table \vref{tab:options}.
-%
-% \begin{table}[ht]
-% \centering
-% \begin{tabular}{lp{21em}} \toprule
-% Option & Short description \tabularnewline \midrule
-% \TabDescribeOption[]{overload}
-% {Lets you use the \pkg{empheq} visual markup extensions
-% transparently in an existing document.}
-% \TabDescribeOption[]{overload2}
-% {A wild version of \opt{overload}. Use with care.}
-% \TabDescribeOption[]{ntheorem}
-% {A support module for users of \pkg{ntheorem} and its
-% \opt{thmmarks} and \opt{thref} options.}
-% \TabDescribeOption[]{newmultline}
-% {With v2.10 of \pkg{empheq} the syntax for \env{multline} and
-% \env{multlined} has been improved immensely.}
-% \TabDescribeOption[]{oldmultline}
-% {Support for the somewhat strange syntax for \env{multline} and
-% \env{multlined} in v2.00.}
-% \bottomrule
-% \end{tabular}
-% \caption{Supported options in the \pkg{empheq} package}
-% \label{tab:options}
-% \end{table}
-%
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{ntheorem}\opt{ntheorem}
-% \end{codesyntax}
-% The \pkg{ntheorem} package is supported by means of the
-% \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
-% on this option see \S \vref{sec:ntheorem-support}.
-%
-% \subsubsection{Using \env{multline}}
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{newmultline}\opt{newmultline}\\
-% \SpecialOptIndex{oldmultline}\opt{oldmultline}
-% \end{codesyntax}
-% Those familiar with v2.00 of this package will recognize the
-% somewhat weird syntax for using \env{multline} and
-% \env{multlined}. The good news is that since v2.10 there is now a
-% much improved syntax available. The option \opt{newmultline}
-% (default) selects this better interface, while the old interface
-% is provided for compatibility reasons by the \opt{oldmultline}
-% option.
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\shoveleft}\cs{shoveleft}\oarg{dimen}\marg{arg}\\
-% \SpecialUsageIndex{\shoveright}\cs{shoveright}\oarg{dimen}\marg{arg}
-% \end{codesyntax}
-% With the new interface you also get an extended syntax for
-% \cs{shoveleft} and \cs{shoveright} as shown in the example below.
-% \begin{verbatim}
-% \begin{empheq}{multline}
-% \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}
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}{multline}
-% \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}
-% \end{empheq}
-%
-%
-% There are however a few differences in the output between the
-% original \pkg{amsmath} version of \env{multline} and the one
-% \pkg{empheq} provides. In \pkg{amsmath} a centered line in
-% \env{multline} is centered on the page without taking into account
-% the \cs{multlinegap}, \cs{multlinetaggap}, and the tag width. Thus
-% \pkg{amsmath} can sometimes give you horrible output without
-% giving you any warning as shown below.
-% \begin{verbatim}
-% \begin{multline}
-% \framebox[.65\columnwidth]{First line} \\
-% \framebox[.9\columnwidth]{Loooong line} \\
-% \framebox[.65\columnwidth]{Last line} \tag{wide tag}
-% \end{multline}
-% \end{verbatim}
-% \begin{AmSmultline}
-% \framebox[.65\columnwidth]{First line} \\
-% \framebox[.9\columnwidth]{Loooong line} \\
-% \framebox[.65\columnwidth]{Last line} \tag{wide tag}
-% \end{AmSmultline}
-% In \pkg{empheq} these parameters are taken into account, so the
-% same input will produce this in \pkg{empheq}:
-% \begin{verbatim}
-% \begin{empheq}{multline}
-% \framebox[.65\columnwidth]{First line} \\
-% \framebox[.9\columnwidth]{Loooong line} \\
-% \framebox[.65\columnwidth]{Last line} \tag{wide tag}
-% \end{empheq}
-% \end{verbatim}
-% \begin{multline*}
-% \framebox[.65\columnwidth]{First line} \\
-% \framebox[.9\columnwidth]{Loooong line} \\
-% \framebox[.65\columnwidth]{Last line} \tag{wide tag}
-% \end{multline*}
-% This results in an
-% \begin{verbatim}
-% Overfull \hbox (30.03783pt too wide) in paragraph ...
-% \end{verbatim}
-% message in the log file, indicating a visual problem. I think this
-% behavior is more sensible than the one the original \env{multline}
-% environment provides.
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{MTmultlined}\cs{begin}\arg{MTmultlined}\oarg{pos}\oarg{width}
-% \meta{contents} \cs{end}\arg{MTmultlined}
-% \end{codesyntax}
-% When you choose the \opt{oldmultline} option you may still want to
-% use the much improved \env{multlined} environment defined in
-% \pkg{mathtools} but unfortunately there will be a name clash.
-% Instead you can access it under the name \env{MTmultlined}.
-%
-%
-%
-% \subsubsection{The \opt{overload} option}\label{sec:overload}
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{overload}\opt{overload}\\
-% \SpecialOptIndex{overload2}\opt{overload2}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/03/25}
-% The \opt{overload} option redefines the original \AmS{}
-% environments so that they take an optional argument.
-% \begin{codesyntax}
-% \cs{begin}\marg{\AmS{} env_name}\oarg{markup instructions}\\
-% \meta{contents of \AmS{} environment}\\
-% \cs{end}\marg{\AmS{} env_name}
-% \end{codesyntax}
-% For example
-% \begin{verbatim}
-% \begin{gather}[box=\widefbox]
-% a = b
-% \end{gather}
-% \end{verbatim}
-% is then actually short for
-% \begin{verbatim}
-% \begin{empheq}[box=\widefbox]{gather}
-% a = b
-% \end{empheq}
-% \end{verbatim}
-% All the \AmS{} environments are supported by this option except
-% 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
-% 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?
-% 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
-% \cs{empheqset} as it will affect \emph{all} math displays!
-%
-%
-% There is of course a catch (well, two actually): These redefined
-% environments don't run as fast as the regular ones (about three
-% times as slow), but in this day and age I seriously doubt you'll
-% be able to tell the difference unless you have a vast number of
-% equations. The other catch is that you cannot use \cs{intertext}
-% and \cs{displaybreak} as described earlier. If you find yourself
-% wanting to use one of these features in say, an \env{align}
-% environment, you have to use the original \env{align} environment.
-% Luckily it is available if you call it like this:
-% \begin{codesyntax}
-% \cs{begin}\arg{AmS\meta{\rmfamily \AmS{} env_name}} \\
-% \texttt{~~}\meta{contents of \AmS{} environment}\\
-% \cs{end}\arg{AmS\meta{\rmfamily \AmS{} env_name}}
-% \end{codesyntax}
-% For example the original \env{align} environment could be selected
-% with
-% \begin{verbatim}
-% \begin{AmSalign}
-% ...
-% \end{AmSalign}
-% \end{verbatim}
-% These original versions with prefix \texttt{AmS} exist for all the
-% environments.
-%
-%
-% The option \opt{overload2} activates the overloading feature
-% for the pseudo environment |\[ ... \]|, although I doubt you'll
-% find it useful. Beware that this definition is fragile unless you
-% have \eTeX{} as \LaTeX{} engine.\footnote{\eTeX{} has been the
-% default engine for \LaTeX{} in most major distributions since
-% 2003.} Not surprisingly \opt{overload2} activates
-% \opt{overload}.
-%
-%
-%
-% Before you get all excited about these options, you should take
-% note of some aspects of centered math displays in \pkg{amsmath}.
-% In certain circumstances truly centering the display is not always
-% the best solution as in this example:
-% \begin{center}
-% \mbox{}\hfill
-% \framebox[.75\linewidth]{Wide math display; not adjusted}%
-% \hfill\mbox{}%
-% \makebox[0pt][r]{Wide Tag}
-% \end{center}
-% Instead centering the display in the available space works pretty
-% well:
-% \begin{gather*}
-% \framebox[.75\linewidth]{Wide math display; adjusted}%
-% \tag*{Wide Tag}
-% \end{gather*}
-% This is what \pkg{amsmath} does normally, but in the \env{gather}
-% environment it does it on a per line basis. This means that we get
-% results like
-% \begin{AmSgather*}
-% \framebox[.75\linewidth]{Wide math display; adjusted}%
-% \tag*{Wide Tag} \\
-% \framebox[.75\linewidth]{Wide math display; not adjusted} \tag{i}%
-% \end{AmSgather*}
-% whether we like it or not. Inside the \env{empheq} environment we
-% need to have the same adjustment for all lines else the boxing
-% process will not work properly, so when activating the
-% \opt{overload} option the above two-line \env{gather} will
-% instead look like this:
-% \begin{empheq}{gather*}
-% \framebox[.75\linewidth]{Wide math display; adjusted}%
-% \tag*{Wide Tag} \\
-% \framebox[.75\linewidth]{Wide math display; adjusted} \tag*{i}%
-% \end{empheq}
-% I leave it to you to choose whether or not this is better (I think
-% it is better).
-%
-%
-%
-% \subsection{A note on boxed displays}
-%
-% When browsing a 400+ pages textbook with at least twice the number
-% of displayed formulae, some of them are surely more important than
-% others. Thus the author of the book (in cooperation with the
-% designer) should make sure that such formulae are easily found
-% again i.e., they should be easily distinguishable from the rest of
-% the pack. One way of doing this is putting the formula into a box
-% which is something we've seen \pkg{empheq} being capable of. There
-% are however a few things to keep in mind:
-% \begin{itemize}
-% \item Don't overdo it. If you do it on half of them there's no
-% point in doing it at all. I don't see much reason for applying
-% this technique to more than 10\% of the formulae.
-% \item Choose the type of box carefully. You want to draw
-% attention to it so it might as well look good.
-% \end{itemize}
-% The latter point can be illustrated by defining a macro similar to
-% \cs{fbox} only with a little more space to the right and left of
-% the argument.
-% \begin{verbatim}
-% \newcommand*\widefbox[1]{\fbox{\hspace{1em}#1\hspace{1em}}}
-% \end{verbatim}
-% If we replace the \cs{fbox} from the \key{box} example before, we
-% get this display:
-% \begin{verbatim}
-% \begin{empheq}[box=\widefbox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box=\widefbox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% Compare it with
-% \begin{empheq}[box=\fbox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% and see which one you prefer.
-%
-% Similarly one might be tempted to use colored boxes:
-% \begin{verbatim}
-% \definecolor{myblue}{rgb}{.8, .8, 1}
-% \newcommand*\mybluebox[1]{%
-% \colorbox{myblue}{\hspace{1em}#1\hspace{1em}}}
-% \end{verbatim}
-% We know the drill by now.
-% \begin{verbatim}
-% \begin{empheq}[box=\mybluebox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box=\mybluebox]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% There is more on boxes later in this manual. If you're into the
-% \pkg{fancybox} package then remember to read \S
-% \vref{sec:fancybox_support}.
-%
-% \section{Support for other packages}
-%
-% With the multitude of packages for \LaTeX, it is not always easy
-% to be a PWWO package (``Plays Well With Others''), but
-% \pkg{empheq} tries really hard to do so. This section lists the
-% 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
-% 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
-% \pkg{showkeys}.
-%
-% \item[Enhancements] Other packages provide useful features that
-% for some reason may not work directly or optimally with
-% \pkg{empheq}. In these cases the problematic commands are
-% redefined so that they not only work with \pkg{empheq}, but
-% also give the same if not better output. An example of this
-% would be the \cs{shadowbox} command from \pkg{fancybox}
-% (described below).
-% \end{description}
-% %
-% \subsection{Support for \pkg{fancybox}}\label{sec:fancybox_support}
-%
-% The \pkg{fancybox} package provides various boxes and you can use
-% them with \pkg{empheq} as well. Here's \cs{ovalbox}:
-% \begin{verbatim}
-% \begin{empheq}[box=\ovalbox]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box=\ovalbox]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\shadowbox}\SpecialUsageIndex{\shadowbox*}
-% \cs{shadowbox*}\marg{arg} \\
-% \SpecialColorIndex{shadowcolor} \texttt{shadowcolor}
-% \end{codesyntax}
-% The only problem with using the \pkg{fancybox} boxes in
-% conjunction with the \env{empheq} environment is \cs{shadowbox},
-% as this macro typesets the shadow on the baseline and for the
-% equation numbers to be placed correctly, the box command must set
-% its argument on the baseline. Thus the normal \cs{shadowbox}
-% produces \shadowbox{\meta{arg}}, but we need this instead:
-% \shadowbox*{\meta{arg}}. Therefore \pkg{empheq} will detect if
-% \pkg{fancybox} is loaded and in that case it'll enhance
-% \cs{shadowbox} in two ways:
-% \begin{itemize}
-% \item It defines a starred version \cs{shadowbox*} which
-% typesets its argument on the baseline.
-%
-% \item The color \texttt{shadowcolor} is introduced. The default
-% color is black.
-% \end{itemize}
-% \begin{verbatim}
-% \definecolor{shadowcolor}{rgb}{0,.5,.5}
-% \setlength\shadowsize{2pt}
-% Line of text for \shadowbox*{testing of \Verb|f#&%\| verbatim} and
-% showing the shadow color.
-% \end{verbatim}
-% \begin{quote}
-% \definecolor{shadowcolor}{rgb}{0,.5,.5}
-% \setlength\shadowsize{2pt}
-% Line of text for \shadowbox*{testing of \Verb|f#&%\| verbatim} and
-% showing the shadow color.
-% \end{quote}
-%
-% The point is that if you want a \cs{shadowbox} around your math
-% display then you must use the starred version:
-% \begin{verbatim}
-% \begin{empheq}[box=\shadowbox*]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box=\shadowbox*]{align}
-% E&=mc^2 \\
-% Y&= \sum_{n=1}^\infty \frac{1}{n^2}
-% \end{empheq}
-%
-% See \S \vref{stunning} if you want
-% to make a fancy box yourself.
-%
-%
-% \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
-% marker mechanism of \pkg{ntheorem}}
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{ntheorem}\opt{ntheorem}
-% \end{codesyntax}
-% The \pkg{ntheorem} package is supported by the means of the
-% \opt{ntheorem} option of \pkg{empheq}. This loads a set of
-% extra macros which fixes various compatibility problems between
-% \pkg{ntheorem} and \pkg{amsmath} and furthermore introduces
-% special (internal) macros for optimum positioning of
-% end-of-theorem markers, while retaining a user friendly interface.
-%
-%
-% When you want to use the automatic end-of-theorem marker mechanism
-% from \pkg{ntheorem} you sometimes run into problems as you would
-% want the marker to be placed aligned at the bottom of the math
-% display but still keeping the tags in their proper place. In
-% \mode{leqno} mode this is not that much of a problem as the tags
-% and the marker are set on either side of the math display like
-% in Figure \vref{fig:markerI}.
-% \changes{v1.05a}{2004/02/17}{Added explanatory drawings for
-% \pkg{ntheorem}}
-%
-% \begin{figure}[btp]\centering
-% \unitlength2.5pt \thicklines
-% \begin{picture}(90,30)(-30,40)
-% \put(0,50){\framebox(25,20){Math Height}}
-% \put(0,40){\framebox(25,10){Math Depth}}
-% \put(-30,50){\framebox(20,10){Tag height}}
-% \put(-30,45){\framebox(20,5){Tag depth}}
-% \put(40,40){\framebox(20,10){Marker}}
-% \multiput(26,40)(2,0){7}{\line(1,0){1}}
-% \end{picture}
-% \caption{Marker placement in \mode{leqno} mode}
-% \label{fig:markerI}
-% \end{figure}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\mintagvsep}\cs{mintagvsep}
-% \end{codesyntax}
-% Unfortunately things are not this easy in \mode{reqno} mode. There
-% are two possible situations as shown in Figure \vref{fig:markerII}.
-% \begin{figure}[btp]
-% \unitlength2.5pt \thicklines
-% \begin{picture}(60,45)(0,25)
-% \put(0,50){\framebox(25,20){Math Height}}
-% \put(0,25){\framebox(25,25){Math Depth}}
-% \put(40,50){\framebox(20,10){Tag height}}
-% \put(40,45){\framebox(20,5){Tag depth}}
-% \put(40,25){\framebox(20,10){Marker}}
-% \put(50,35){\vector(0,1){10}}
-% \put(50,45){\vector(0,-1){10}}
-% \put(50,39){\ \ $>\delta$}
-% \multiput(26,25)(2,0){7}{\line(1,0){1}}
-% \end{picture} \hfill\vrule\hfill
-% \begin{picture}(60,45)(0,25)
-% \put(0,50){\framebox(25,20){Math Height}}
-% \put(0,40){\framebox(25,10){Math Depth}}
-% \put(40,50){\framebox(20,10){Tag height}}
-% \put(40,45){\framebox(20,5){Tag depth}}
-% \put(40,28){\framebox(20,10){Marker}}
-% \put(50,38){\vector(0,1){7}}
-% \put(50,45){\vector(0,-1){7}}
-% \put(50,40){\ \ $=\delta$}
-% \end{picture}
-% \caption{The two possible situations for end marks in \mode{reqno}
-% mode}
-% \label{fig:markerII}
-% \end{figure}
-% If possible we want the bottom of the marker to be aligned with
-% the bottom of the math display, but at the same time we want to
-% ensure a minimum vertical separation $\delta$ between marker and
-% tag. In \pkg{empheq} this is controlled by the length parameter
-% \cs{mintagvsep} which by default is 5\,pt.
-%
-% 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
-% environments:
-% \begin{verbatim}
-% \begin{Theorem}
-% Some text at first and then a math display
-% \begin{empheq}{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{Theorem}
-% \end{verbatim}
-% Then the tag placement and the end-of-theorem marker will be set
-% properly (after a couple of runs as usual).
-%
-% To ensure the correct outcome remember to load the packages like
-% this:
-% \begin{verbatim}
-% \usepackage[ntheorem]{empheq} % this loads amsmath as well
-% \usepackage[thmmarks,amsmath]{ntheorem}
-% \end{verbatim}
-% Remember that if you use the \opt{overload} option you
-% can just use the regular math environments to get the desired
-% result with the end mark. The exception is the |\[ ... \]|
-% environment which will only work if you use the option
-% \opt{overload2}.
-%
-% \clearpage
-%
-% \EmphEqpart{Advanced user's guide}
-%
-% The \pkg{empheq} package has more to offer than you have seen, but
-% I found some of the functionality so dangerous it was best to hide
-% it for a little while. The commands you have encountered so far in
-% this manual all have one thing in common: They have only lower
-% case letters in their names. Now it's time to reveal those that
-% have \emph{mixed-case} names, thus implying that you should take
-% great care when using them.
-%
-% \section{Delimiters revisited}
-% Let's go back to delimiters, shall we?
-%
-% \subsection{Creating your own delimiters}
-% As a convenience for the user, this interface is extended in a
-% more general way so that it is also possible to declare delimiters
-% with the following two commands: \SpecialUsageIndex{\DeclareLeftDelimiter}
-% \SpecialUsageIndex{\DeclareRightDelimiter}
-% \begin{codesyntax}
-% \cs{DeclareLeftDelimiter}\oarg{space adjustment}\marg{delimiter}\\
-% \cs{DeclareRightDelimiter}\oarg{space adjustment}\marg{delimiter}
-% \end{codesyntax}
-% While \pkg{empheq} provides auto-scaling versions of the most
-% common delimiters, you may sometimes want some new ones. Say for
-% instance you have loaded the \pkg{stmaryrd} package and you want
-% to use the double bracket commands \cs{llbracket} and
-% \cs{rrbracket} with \pkg{empheq}. Then you simply do this:
-% \begin{verbatim}
-% \DeclareLeftDelimiter{\llbracket}
-% \DeclareRightDelimiter{\rrbracket}
-% \end{verbatim}
-% This defines the new delimiters \cs{empheqllbracket},
-% \cs{empheqbigllbracket}, \cs{empheqrrbracket} and
-% \cs{empheqbigrrbracket}.
-%
-% You can use \cs{big...} delimiters as well if you don't like the
-% automatic scaling. There are however ways to fine-tune if you
-% really want it.
-%
-% \subsection{Fine-tuning of delimiters}
-%
-% \TeX{} provides two primitives to control the scaling of
-% delimiters produced with \cs{left} and \cs{right}, namely the
-% dimension \cs{delimitershortfall} (denoted by $\delta$ here) and
-% the integer \cs{delimiterfactor} ($f$). The idea is that the
-% 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
-% delimiter size $h_{\min}$ must meet the requirements
-% \[
-% h_{\min}\geq h \frac{f}{1000} \quad\land \quad h_{\min}\geq h-\delta
-% \]
-% \LaTeX{} sets $\cs{delimitershortfall} = \text{\the\delimitershortfall} $
-% and $\cs{delimiterfactor} = \the\delimiterfactor$, but in our case
-% we will almost always want a delimiter that spans the entire
-% \cs{left}-\cs{right} pair (the math display), thus a change of
-% these settings is needed.
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\EmphEqdelimitershortfall}
-% \cs{EmphEqdelimitershortfall}\\
-% \SpecialUsageIndex{\EmphEqdelimiterfactor}
-% \cs{EmphEqdelimiterfactor}
-% \end{codesyntax}
-% However it is a bad idea to just change these two settings without
-% thinking of the effect it'll have on the rest of the mathematics
-% in your document. Therefore \pkg{empheq} provides the parameters
-% \cs{EmphEqdelimitershortfall} (default setting is
-% \the\EmphEqdelimitershortfall) and \cs{EmphEqdelimiterfactor}
-% (default is \the\EmphEqdelimiterfactor) to cater for this.
-%
-%
-% \subsection{Scaling material yourself}
-%
-% The attentive reader may have noticed that I still haven't
-% revealed how I managed to get the right size of that big
-% exclamation mark in the first example of this manual, so I guess
-% it's about time.
-% \begin{codesyntax}
-% \SpecialUsageIndex{\EmphEqdisplayheight}\cs{EmphEqdisplayheight} \\
-% \SpecialUsageIndex{\EmphEqdisplaydepth}\cs{EmphEqdisplaydepth}
-% \end{codesyntax}
-% The height of the math display plus the surrounding inner box is
-% given by \cs{EmphEqdisplayheight} and the depth by
-% \cs{EmphEqdisplaydepth}. These can be used when constructing
-% something that should scale to fit the display and can't be done
-% with ``auto-scaling'' commands like \cs{vrule} or \cs{left} or
-% \cs{right}. There is a catch however: If you do any horizontal
-% resizing of the material you want to scale, then you must specify
-% the width \emph{manually}:\footnote{The
-% \cs{fontdimen22}\cs{textfont2} in the \meta{length} argument of
-% \cs{raisebox} is the \emph{math axis} of the font. It is needed in
-% order to get the vertical positioning of the oversized exclamation
-% mark just right.}
-% \begin{verbatim}
-% \begin{empheq}[
-% box=\colorbox{myblue},
-% right={\;
-% \makebox[.9em]{%
-% $\raisebox{-.5\totalheight+\fontdimen22\textfont2}
-% {\resizebox{!}{%
-% \EmphEqdisplayheight+\EmphEqdisplaydepth}{!}}$%
-% }},
-% left={X=Y\Rightarrow}
-% ]{alignat=3}
-% A_1&=b_1 & \qquad c_1&=d_1 & \qquad e_1&= f_1
-% \tag*{\_A\raisebox{1ex}{silly}\raisebox{-1ex}{tag}\_}\\
-% A_2&=b_2 & \qquad c_2&=d_2 & \qquad e_2&= f_2 \\
-% A_3&=b_3 & \qquad c_3&=d_3 & \qquad e_3&= f_3
-% \end{empheq}
-% \end{verbatim}
-%
-% Here's another example. We want to be able to put a \cs{parbox}
-% with some descriptive text top-aligned on the side of the display.
-% \begin{verbatim}
-% \begin{empheq}[
-% left={\parbox[c][\EmphEqdisplayheight+\EmphEqdisplaydepth][t]
-% {4.5cm}
-% {You may find this kind of description useful.}\enspace}]
-% {align}
-% a&=\int_0^1 x\,dx +\frac{foo + bar}{baz}\\
-% E&= mc^2
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[
-% left={\parbox[c][\EmphEqdisplayheight+\EmphEqdisplaydepth][t]
-% {4.5cm}
-% {You may find this kind of description useful.}\enspace}]
-% {align}
-% a&=\int_0^1 x\,dx +\frac{foo + bar}{baz}\\
-% E&= mc^2
-% \end{empheq}
-%
-%
-% \section{A few short notes}
-%
-% \subsection{About $\cs{eqref}$}
-%
-% Internally \env{empheq} separate 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
-% \cs{maketag@@@}. Unfortunately, this component is also used by
-% \cs{eqref} to typeset a reference to an equation number, so in
-% earlier versions, \cs{eqref} would not work inside an \env{empheq}
-% environment.
-%
-% In the current version this should now be working, but if you ever
-% need to mess with \cs{eqref} it may be handy to know what is being
-% done. In essence we do something similar to this:
-% \begin{verbatim}
-% \let\empheqeqrefbase\textup
-% ... % next go inside empheq env
-% \renewcommand\eqref[1]{\empheqeqrefbase{%
-% \let\maketag@@@\EQsavedmaketag%
-% \tagform@{\ref{##1}}}}
-% \end{verbatim}
-% Thus if you need to alter things inside \cs{eqref} and need that to
-% work within \env{empheq} as well, you may get away with redefining
-% \cs{empheqeqrefbase}.
-%
-%
-%
-% \subsection{About changes to $\cs{baselineskip}$}
-%
-% Users should never mess with \cs{baselineskip} directly, it is not
-% the correct manner to get double spacing. Have a look at say the
-% \pkg{setspace} package or similar, or play with
-% \cs{baselinestretch} followed by \cs{normalsize} to initiate.
-%
-% Explanation: We use \cs{parbox} inside to place the display box and
-% the box containing the eqn numbers. To do its stuff \cs{parbox}
-% resets some internal settings, in this case, \cs{baselineskip} is
-% reset to \cs{normalbaselineskip}. So if you don't remember to reset
-% that one as well\dots
-%
-%
-% \section{Creating something new}
-%
-% You can create your own environments and boxes to go with
-% \pkg{empheq}, but there are certain things that must be fulfilled
-% to get it to work properly.
-%
-% \subsection{New \env{empheq}-like environments}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{EmphEqMainEnv}\env{EmphEqMainEnv}\\
-% \SpecialUsageIndex{\EmphEqMainEnv}\cs{EmphEqMainEnv}\\
-% \SpecialUsageIndex{\endEmphEqMainEnv}\cs{endEmphEqMainEnv}
-% \end{codesyntax}
-% Although the real work in \pkg{empheq} is done by an environment
-% (\env{EmphEqMainEnv}), you cannot use it like that yourself when
-% you want to define an \env{empheq}-like environment. Due to
-% technical reasons (see~\cite{Ams99}), you have to use a slightly
-% different syntax:
-% \begin{codesyntax}
-% \cs{newenvironment}
-% \marg{env_name} \oarg{num} \oarg{default}\\
-% \texttt{~~}\arg{\meta{other commands} \cs{EmpheqMainEnv}}\\
-% \texttt{~~}\arg{\cs{endEmpheqMainEnv}}
-% \end{codesyntax}
-% In the above environment the \meta{other commands} part must
-% contain certain things before it'll work.
-% \begin{codesyntax}
-% \SpecialKeyFamilyIndex{EmphEqEnv}\keyfam{EmphEqEnv}\\
-% \SpecialKeyFamilyIndex{EmphEqOpt}\keyfam{EmphEqOpt}
-% \end{codesyntax}
-% Before your homemade environment will work you must set at least
-% one key. The key family \keyfam{EmphEqOpt} is for all the markup
-% instructions like \key{left} and \key{box}, while
-% \keyfam{EmphEqEnv} controls the type of \AmS{} environment. You
-% must set the \keyfam{EmphEqEnv} family before \cs{EmhpEqMainEnv}
-% else you'll get an error message.
-%
-% One example could be something like this:
-% \begin{verbatim}
-% \newenvironment{important}[2][]{%
-% \setkeys{EmphEqEnv}{#2}%
-% \setkeys{EmphEqOpt}{box=\mybluebox,#1}%
-% \EmphEqMainEnv}%
-% {\endEmphEqMainEnv}
-% \end{verbatim}
-% Thus
-% \begin{verbatim}
-% \begin{important}{gather}
-% a = b + c +d \\ e = f
-% \end{important}
-% \end{verbatim}
-% produces
-% \begin{important}{gather}
-% a = b + c +d \\ e = f
-% \end{important}
-% while
-% \begin{verbatim}
-% \begin{important}[left={A=B \Rightarrow \empheqlbrace}]{alignat=2}
-% a &= b &\quad c &= d \\
-% \text{this} &= \text{that} &\quad \mathit{fish}&\neq fish
-% \end{important}
-% \end{verbatim}
-% produces
-% \begin{important}[left={A=B \Rightarrow \empheqlbrace}]{alignat=2}
-% a &= b &\quad c &= d \\
-% \text{this} &= \text{that} &\quad \mathit{fish}&\neq fish
-% \end{important}
-%
-%
-% \subsection{Creating fancy boxes}\label{stunning}
-%
-% As a final example I will show you how to create complicated
-% displays involving (vertically) asymmetrical boxes like
-% \cs{shadowbox*}. In order to get the correct output, the contents
-% of the box must be placed on the baseline as in \fbox{\cs{fbox}}.
-% In this example we want to put a set of equations into a bright
-% yellow box and then add another box with some explanatory text at
-% the top of the yellow box making them overlap.
-%
-% First we define the colors used and allocate the boxes. We could
-% probably use scratch boxes, but this is safer.
-% \begin{verbatim}
-% \definecolor{shadecolor}{cmyk}{0,0,0.41,0}
-% \definecolor{light-blue}{cmyk}{0.25,0,0,0}
-% \newsavebox{\mysaveboxM} % M for math
-% \newsavebox{\mysaveboxT} % T for text
-% \end{verbatim}
-% Save the display body in \cs{mysaveboxM} and the text argument in
-% \cs{mysaveboxT}.
-% \begin{verbatim}
-% \newcommand*\Garybox[2][Example]{%
-% \sbox{\mysaveboxM}{#2}%
-% \sbox{\mysaveboxT}{\fcolorbox{black}{light-blue}{#1}}%
-% \end{verbatim}
-% Then typeset the math display in a \cs{parbox} where we control
-% the height and save it in \cs{mysaveboxM}.
-% \begin{verbatim}
-% \sbox{\mysaveboxM}{%
-% \parbox[b][\ht\mysaveboxM+.5\ht\mysaveboxT+.5\dp\mysaveboxT][b]{%
-% \wd\mysaveboxM}{#2}%
-% }%
-% \end{verbatim}
-% We put it into the colored box with the desired width.
-% \begin{verbatim}
-% \sbox{\mysaveboxM}{%
-% \fcolorbox{black}{shadecolor}{%
-% \makebox[\linewidth-10em]{\usebox{\mysaveboxM}}%
-% }%
-% }%
-% \end{verbatim}
-% Then finally we get to the real typesetting. We just insert the
-% math display and then make a box of zero width right next to it.
-% In that box we lift the text argument and center it at the top of
-% the display.
-% \begin{verbatim}
-% \usebox{\mysaveboxM}%
-% \makebox[0pt][r]{%
-% \makebox[\wd\mysaveboxM][c]{%
-% \raisebox{\ht\mysaveboxM-0.5\ht\mysaveboxT
-% +0.5\dp\mysaveboxT-0.5\fboxrule}{\usebox{\mysaveboxT}}%
-% }%
-% }%
-% }
-% \end{verbatim}
-% Let's see what it looks like.
-% \begin{verbatim}
-% \begin{empheq}[box=\Garybox]{align}
-% \sum \mathbf{F} &= \mathbf{0} \\
-% \sum F_{x} \,\mathbf{i} + \sum F_{y} \,\mathbf{j}
-% + \sum F_{z} \,\mathbf{k} &= \mathbf{0} \\
-% \sum F_{x} &= 0 \\ \sum F_{y} &= 0 \\ \sum F_{z} &= 0
-% \end{empheq}
-% \end{verbatim}
-% \begin{subequations}
-% \begin{empheq}[box=\Garybox]{align}
-% \sum \mathbf{F} &= \mathbf{0} \\
-% \sum F_{x} \,\mathbf{i} + \sum F_{y} \,\mathbf{j} + \sum F_{z}
-% \,\mathbf{k} &= \mathbf{0}\\
-% \sum F_{x} &= 0 \\ \sum F_{y} &= 0 \\ \sum F_{z} &= 0
-% \end{empheq}
-% If we use the optional argument of \cs{Garybox} we have to enclose
-% the entire argument of \key{box} in braces because we're in
-% \env{empheq}'s optional argument (as described in \cite[page
-% 167]{Lamp94}):
-% \begin{verbatim}
-% \begin{empheq}[box={\Garybox[Same old example again]}]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{verbatim}
-% \begin{empheq}[box={\Garybox[Same old example again]}]{align}
-% a&=b\\
-% E&=mc^2 + \int_a^a x\, dx
-% \end{empheq}
-% \end{subequations}
-%
-%
-%
-%
-% \section{Contact information}
-%
-% Should you have any feature request, suggestions, or bug reports
-% then feel free to contact us at
-% \begin{quote}
-% \email{mh.ctan@gmail.com}
-% \end{quote}
-% Please put `empheq' in the subject line.
-%
-% \subsection*{Contributors}
-%
-% \begin{itemize}
-% \item In November 2002 Lars Madsen (\email{daleif@imf.au.dk})
-% asked for some features that wasn't readily available with
-% \pkg{amsmath} or any other package. This was the start of
-% \pkg{empheq}.
-%
-% \item Gary Gray (\email{gray@engr.psu.edu}) gave me some bug
-% reports on the old version (v0.7) which convinced me to rewrite
-% the package completely. The \cs{Garybox} example is inspired by
-% a wish from Gary.
-%
-% \item Uwe Siart (\email{uwe.siart@tum.de}) has been a thorough
-% beta-tester on v1.00 of the package.
-%
-% \item Bernard Alfonsi (\email{alfonsi@math.u-psud.fr}) reported
-% a problem with the \opt{ntheorem} option. It turned out to be a
-% bug in the \pkg{ntheorem} package itself but it's fixed in the
-% option.
-%
-% \item I have received reports on weird behavior from
-% \pkg{empheq} when used with the \pkg{color} package on some
-% dvi-viewers, which is caused by the lack of color support in
-% those dvi-viewers. Both Andrew B.~Collier (\email{colliera@ukzn.ac.za})
-% and Andr\'e M.~de Roos (\email{aroos@science.uva.nl}) have
-% notified me of this. The solution is to either upgrade you
-% dvi-viewer if possible or convert the document in question to
-% PDF or PS.
-% \end{itemize}
-% Thank you all.
-%
-%
-% \begin{thebibliography}{99}
-% \bibitem{Lamp94}
-% Leslie Lamport,
-% \emph{LaTeX User's Guide and Reference Manual}, 2nd edition,
-% Addison-Wesley, Reading, Massachusetts,
-% 1994.
-% \bibitem{Goos-etal94}
-% Michel Goossens, Frank Mittelbach, and Alexander Samarin,
-% \emph{The \LaTeX\ Companion},
-% Addison-Wesley, Reading, Massachusetts,
-% 1994.
-% \bibitem{Knut86}
-% Donald Ervin Knuth,
-% \emph{The \TeX book},
-% Addison-Wesley, Reading, Mas\-sa\-chu\-setts,
-% 1986.
-% \bibitem{Ams99}
-% American Mathematical Society and Michael Downes,
-% \emph{Technical notes on the \pkg{amsmath} package} Version 2.0,
-% 1999/10/29.
-% (Available from CTAN as file \texttt{technote.tex}.)
-% \bibitem{Ams00}
-% Frank Mittelbach, Rainer Sch\"opf, Michael Downes, and David M.~Jones,
-% \emph{The \pkg{amsmath} package} Version 2.13,
-% 2000/07/18.
-% (Available from CTAN as file \texttt{amsmath.dtx}.)
-%
-% \changes{v1.05b}{2004/02/18}{Added \pkg{fancybox} and
-% \pkg{ntheorem} to the \refname}
-% \bibitem{fancybox}
-% Timothy Van Zandt,
-% \emph{The \pkg{fancybox} package} Version 1.3,
-% 2000/09/19
-% (Available from CTAN as file \texttt{fancybox.sty}.)
-%
-% \bibitem{Raht03}
-% Sebastian Rahtz,
-% \emph{Hypertext marks in \LaTeX} Version v6.74m,
-% 2003/11/30.
-% (Available from \url{http://www.tug.org/applications/hyperref} as file
-% \texttt{hyperref.dtx}.)
-%
-% \bibitem{Carl99}
-% David Carlisle,
-% \emph{The \pkg{keyval} Package},
-% Version 1.13, 1999/03/16.
-% (Available from CTAN as file \texttt{keyval.dtx}.)
-%
-% \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,
-% (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,
-% (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}.)
-%
-% \end{thebibliography}
-%
-% \StopEventually{}
-%
-% \EmphEqpart{Implementation}
-%
-% \section{Requirements, Options, and Strategy}
-% Lets start the package. We'll need the tools from \pkg{mhsetup}.
-% \begin{macrocode}
-%<*package>
-\ProvidesPackage{empheq}%
- [2013/02/12 v2.13 Emphasizing equations]
-% \end{macrocode}
-% \begin{macrocode}
-\RequirePackage{mhsetup}[2004/10/10]
-\MHInternalSyntaxOn
-% \end{macrocode}
-%
-%
-% \subsection{Requirements, Options, and Allocation}
-%
-% The \opt{overload} option allows the user to type
-% \begin{verbatim}
-% \begin{gather}[box=\fbox]
-% a = b
-% \end{gather}
-% \end{verbatim}
-% when they really mean
-% \begin{verbatim}
-% \begin{empheq}[box=\fbox]{gather}
-% a = b
-% \end{empheq}
-% \end{verbatim}
-% \begin{macrocode}
-\MH_new_boolean:n {overload_ams}
-\DeclareOption{overload}{
- \MH_set_boolean_T:n {overload_ams}
-}
-\MH_new_boolean:n {overload_amsII}
-\DeclareOption{overload2}{
- \MH_set_boolean_T:n {overload_ams}
- \MH_set_boolean_T:n {overload_amsII}
-}
-% \end{macrocode}
-% Old crappy \env{multline} interface or the new dazzling?
-% \begin{macrocode}
-\MH_new_boolean:n {good_mult}
-\DeclareOption{oldmultline}{\MH_set_boolean_F:n {good_mult}}
-\DeclareOption{newmultline}{\MH_set_boolean_T:n {good_mult}}
-% \end{macrocode}
-%
-%
-% Load the \pkg{ntheorem} support file.
-% \begin{macrocode}
-\gdef\g@EQ@ntheorem@support@bool{01}
-\DeclareOption{ntheorem}{\gdef\g@EQ@ntheorem@support@bool{00}}
-% \end{macrocode}
-% Pass other options to \pkg{mathtools}.
-% \begin{macrocode}
-\DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{mathtools}
-}
-\ExecuteOptions{newmultline}
-\ProcessOptions\relax
-% \end{macrocode}
-% The name of the game is \pkg{amsmath} so we'll need that of
-% course. Since v2.10 that is now taken care of in the
-% \pkg{mathtools} package which'll pass on the options to
-% \pkg{amsmath}.
-% \begin{macrocode}
-\MHInternalSyntaxOff
-\RequirePackage{mathtools}[2004/10/10]
-% \end{macrocode}
-% Activate the internal syntax.
-% \begin{macrocode}
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-% \end{macrocode}
-% \changes{v2.00}{2004/04/14}{Changed description of naming
-% conventions. Altered \emph{all} private macros; this is not
-% mentioned at each macro as this would just be too troublesome}
-%
-% \begin{macro}{\l_EQ_equationtype_int}
-% \begin{macro}{\l_EQ_alignmentmode_int}
-% I'll use the following numbering scheme for the equation types,
-% and store the value in \cs{l_EQ_equationtype_int}:
-% \begin{multicols}{2}
-% \begin{enumerate}\setlength{\itemsep}{0pt}
-% \item align
-% \item align*
-% \item gather
-% \item gather*
-% \item flalign
-% \item flalign*
-% \item alignat
-% \item alignat*
-% \end{enumerate}
-% \end{multicols}
-% As you notice \env{equation} and \env{equation*} are missing. This
-% is because \env{gather} and \env{gather*} work the same way, only
-% they are `nicer'. Cuts down on the amount of code as well. I will
-% add an alias so that a user can use the key \key{equation}, but
-% then \key{gather} will kick in instead behind the scenes. Also the
-% \env{multline} environments are missing here, but again it's
-% because I'm faking it. See \S~\vref{sec:flalign+multline} for
-% further details. The value $0$ isn't used for any of the
-% environments and thus serves as a checkpoint (see
-% page~\pageref{ZeroCheckpoint}).
-%
-% Similarly I'll use the counter \cs{l_EQ_alignmentmode_int} to
-% store the standard options for placement of math displays and
-% equation numbering.
-% \begin{multicols}{2}
-% \begin{enumerate}\setlength{\itemsep}{0pt}
-% \item reqno
-% \item leqno
-% \item fleqn, reqno
-% \item fleqn, leqno
-% \end{enumerate}
-% \end{multicols}
-%
-% \begin{macrocode}
-\newcount\l_EQ_equationtype_int
-\newcount\l_EQ_alignmentmode_int
-\if@fleqn
- \iftagsleft@
- \l_EQ_alignmentmode_int=4
- \else:
- \l_EQ_alignmentmode_int=\thr@@
- \fi:
-\else:
- \iftagsleft@
- \l_EQ_alignmentmode_int=\tw@
- \else:
- \l_EQ_alignmentmode_int=\@ne
- \fi:
-\fi:
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\l_EQ_totalwidth_dim}
-% \begin{macro}{\l_EQ_displaywidth_dim}
-% \begin{macro}{\l_EQ_temp_linewidth_dim}
-% \begin{macro}{\EmphEqdelimitershortfall}
-% \begin{macro}{\EmphEqdelimiterfactor}
-% \begin{macro}{\g_EQ_toptag_height_dim}
-% \begin{macro}{\g_EQ_bottomtag_depth_dim}
-% \begin{macro}{\g_EQ_toprow_height_dim}
-% \begin{macro}{\g_EQ_bottomrow_depth_dim}
-% \begin{macro}{\g_EQ_widesttag_dim}
-% Some lengths we'll need. Could possibly be scratch registers but we
-% have to make global assignments so that road is a little
-% dangerous.
-% \begin{macrocode}
-\newdimen\l_EQ_totalwidth_dim
-\newdimen\l_EQ_displaywidth_dim
-% \end{macrocode}
-% Just to make it accessible.
-% \begin{macrocode}
-\def\EmphEqdisplaywidth{\l_EQ_displaywidth_dim}
-\newdimen\l_EQ_temp_linewidth_dim
-\newdimen\EmphEqdelimitershortfall
-\newcount\EmphEqdelimiterfactor
-\EmphEqdelimiterfactor950
-\EmphEqdelimitershortfall\p@
-\newdimen\g_EQ_toptag_height_dim
-\newdimen\g_EQ_bottomtag_depth_dim
-\newdimen\g_EQ_toprow_height_dim
-\newdimen\g_EQ_bottomrow_depth_dim
-\newdimen\g_EQ_widesttag_dim
-\def\EmphEqtagwidth{\g_EQ_widesttag_dim}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\EQ_outerbox:}
-% \begin{macro}{\EQ_innerbox:}
-% \begin{macro}{\EQ_left_side:}
-% \begin{macro}{\EQ_right_side:}
-% The two boxes and the material on either side of the math display.
-% \begin{macrocode}
-\def\EQ_outerbox:{}
-\def\EQ_innerbox:{}
-\def\EQ_left_side:{}
-\def\EQ_right_side:{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Strategy}
-%
-% In non-\mode{fleqn} math displays are centered---even when having
-% tags. However this can look rather appalling when either the tag
-% or the math display are very wide like in the following example.
-% \begin{center}
-% \makebox[\linewidth][s]{\mbox{}\hfill \mbox{$\displaystyle
-% a+b+c+d+e+f+g+h+i+j+k+l+m+n+o$} \hfill\mbox{} \llap{(wide tag)}}
-% \end{center}
-% Not exactly pleasing to look at. \pkg{amsmath} takes care to do
-% this adjustment for us, so the user instead obtains the far better
-% \begin{gather*}
-% a+b+c+d+e+f+g+h+i+j+k+l+m+n+o \tag{wide tag}
-% \end{gather*}
-% So \pkg{amsmath} handles this quite well. That's good. It looks
-% like \pkg{amsmath} has an internal threshold that matches the
-% width of the math display against the width of the tags. But what
-% if we have a multiple line display and one of the lines causes an
-% adjustment to kick in while the others don't need it? Then we
-% cannot keep track of the complete display anymore. Furthermore we
-% may want to add material on either side of the math display making
-% the whole thing even more complicated, if not impossible to do
-% without some sort of different approach.
-%
-% Luckily we have such an approach. The idea that comes to mind is
-% to see if one can typeset the labels and the math displays
-% \emph{separately}, store them in separate boxes and then put them
-% back together again afterwards. Is this really possible? Yes.
-% Come, I'll show you.
-%
-% \subsection{The Main Environment}
-% \begin{macro}{\EQ_mathdisplay_box}
-% \begin{macro}{\EmphEqdisplayheight}
-% \begin{macro}{\EmphEqdisplaydepth}
-% \begin{macro}{\EQ_tag_box}
-% Okay, we'll start by allocating two box registers.
-% \begin{macrocode}
-\newsavebox\EQ_mathdisplay_box
-\def\EmphEqdisplayheight{\ht\EQ_mathdisplay_box}
-\def\EmphEqdisplaydepth{\dp\EQ_mathdisplay_box}
-\newsavebox\EQ_tag_box
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\EQ_complete_mathdisplay:}
-% \begin{macro}{\EQ_getbody:n}
-% \begin{environment}{EmphEqMainEnv}
-% The \env{EmphEqMainEnv} is (as the name implies) the main
-% environment. I decided to go with the environment form because
-% that's what \pkg{amsmath} users are accustomed to. But the code
-% will require the contents of the environment to be handled as an
-% argument to a command, so we use \cs{collect@body} from
-% \pkg{amsmath} itself to collect it.
-% \begin{macrocode}
-\def\EQ_complete_mathdisplay:{}
-\def\EQ_getbody:n #1{%
- \def\EQ_complete_mathdisplay:{}\def\EQ_mathbody:{#1}}
-\newenvironment{EmphEqMainEnv}{\collect@body\EQ_getbody:n}{%
-% \end{macrocode}
-% If the user didn't specify the mandatory argument we will catch it
-% because \cs{l_EQ_equationtype_int} is zero. An error is
-% issued\label{ZeroCheckpoint}.
-% \begin{macrocode}
- \if_num:w \l_EQ_equationtype_int=\z@ %ZeroCheckpoint
- \EQ_upgrade_error:
- \else:
-% \end{macrocode}
-% Those that read the manual get the reward here: The package will
-% actually work!
-% \begin{macrocode}
- \EQ_post_process:
- \ignorespacesafterend
- \fi:}
-% \end{macrocode}
-% \end{environment}
-% \end{macro}
-% \end{macro}
-% \subsection{Post Processing}
-% \begin{macro}{\EQ_post_process:}
-% I know: it almost looked easy for a while didn't it? Sadly the
-% post-processing step of the code is also by far the most
-% complicated.
-% \begin{macrocode}
-\def\EQ_post_process:{%
-% \end{macrocode}
-% First a hook where we initialize a few things like storing the
-% line width for later manipulation. Also we want to measure the
-% height of the top row and the depth of the bottom row for best
-% possible placement of the math display and the boxes around it
-% (same with the tags). Those four dimensions are globally set
-% during the code, hence this assignment. Most other stuff is local.
-% \begin{macrocode}
- \EQ_initialize:
-% \end{macrocode}
-% Then we proceed by completing the input. We store it in the
-% control sequence \cs{EQ_complete_mathdisplay}.
-% \cs{EQ_begin_equation:} adds the start of the environment and
-% \cs{EQ_end_equation:} adds the corresponding end.
-% \begin{macrocode}
- \EQ_begin_equation:
-% \end{macrocode}
-% In case we face a \env{multline} we add what's necessary.
-% \begin{macrocode}
- \MH_if_boolean:nT {outer_mult}{
- \setkeys{\MT_options_name:}{
- firstline-afterskip=0pt,
- lastline-preskip=0pt,
- multlined-width=0pt,
- }
- \ifodd \l_EQ_alignmentmode_int
- \setkeys{\MT_options_name:}{multlined-pos=b}
- \else:
- \setkeys{\MT_options_name:}{multlined-pos=t}
- \fi:
- \g@addto@macro\EQ_complete_mathdisplay:{
- \begin{MTmultlined}\relax}
- }
- \g@addto@macro\EQ_complete_mathdisplay:\EQ_mathbody:
- \MH_if_boolean:nT {outer_mult}{
- \g@addto@macro\EQ_complete_mathdisplay:{\end{MTmultlined}}
- }
- \EQ_end_equation:
-% \end{macrocode}
-% Save the value of the \pkg{hyperref} link counter
-% \cs{Hy@linkcounter}.
-% \begin{macrocode}
- \edef\EQ_hyperref_link_fint{\number\Hy@linkcounter}
-% \end{macrocode}
-% Firstly we call \cs{EQ_typeset_tags:} which suppresses all
-% output from the equations with the exception of the \cs{tag}'s.
-% This also allows us to find the widest tag which we'll need for
-% the environments that set's the math displays flush to the
-% margins, namely the \env{flalign} family. We save the counters
-% first though. As an extra treat we're also able to measure the
-% height and depth of the tags and the math display.
-% \begin{macrocode}
- \savecounters@
- \EQ_typeset_tags:
-% \end{macrocode}
-% \changes{v1.05d}{2004/02/26}{Removed one instance of
-% \cs{EQ_typeset_display:}}
-% Then find the widest tag. In an earlier implementation it was
-% necessary to typeset the display twice---a very costly procedure!
-% Now we save roughly 2120 lines of output from \cs{tracingall} on a
-% simple \env{gather} and 2600 lines with \env{align}. That's a
-% little more than 21\% saved\ldots
-% \changes{v2.10}{2004/07/26}{Removed \cs{find_widesttag:}}
-% \changes{v2.10}{2004/07/26}{Added check for equation number to
-% make sure the labelling/printing mechanism of \pkg{mathtools} work
-% properly}
-% Then we restore the counters and measure the extra material.
-% Save the value of the equation counter for later in case the
-% special equation numbering scheme from \pkg{mathtools} is in
-% effect.
-% \begin{macrocode}
- \edef\l_EQ_equation_fint{\number\c@equation}
- \restorecounters@
-% \end{macrocode}
-% Restore the value of the \pkg{hyperref} link counter
-% \cs{Hy@linkcounter}.
-% \begin{macrocode}
- \Hy@linkcounter=\EQ_hyperref_link_fint
- \settowidth\l_EQ_totalwidth_dim{%
- $\EQ_left_side:\EQ_innerbox:{}\EQ_right_side:$}%
-% \end{macrocode}
-% Then call the appropriate \cs{EQ_modify_linewidth_}\meta{num}\texttt{:}
-% where \meta{num} is taken from the numbering scheme shown earlier.
-% \begin{macrocode}
- \MH_if_boolean:nTF {outer_mult}
- { \def\EQ_next:{_mult} }
- { \def\EQ_next:{} }
- \@nameuse{EQ_modify_linewidth_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}%
-% \end{macrocode}
-% We can then typeset the display knowing that all modifications
-% have been made correctly. \cs{EQ_typeset_display:} gobbles the
-% \cs{tag}'s, which in turn is equivalent to setting the display
-% centered in non-\mode{fleqn} mode.
-% \begin{macrocode}
- \EQ_typeset_display:
-% \end{macrocode}
-% Call the appropriate \cs{find_displaywidth_}\meta{num}\texttt{:}
-% which extracts the display width (\cs{l_EQ_displaywidth_dim}).
-% \begin{macrocode}
- \@nameuse{find_displaywidth_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}
- \MH_addtolength:dn
- \l_EQ_totalwidth_dim{\l_EQ_displaywidth_dim}
-% \end{macrocode}
-% We save the math display in a box of the correct size.
-% \begin{macrocode}
- \savebox\EQ_mathdisplay_box[\l_EQ_totalwidth_dim][c]{%
- $\EQ_left_side:
- \EQ_innerbox:{%
- \if_case:w \l_EQ_alignmentmode_int\or:
-% \end{macrocode}
-% If the equation is centered we make the box centered
-% \begin{macrocode}
- \makebox[\l_EQ_displaywidth_dim][c]
- {\usebox{\EQ_mathdisplay_box}}%
- \or:
- \makebox[\l_EQ_displaywidth_dim][c]
- {\usebox{\EQ_mathdisplay_box}}%
- \or:
-% \end{macrocode}
-% Else we set it in a left aligned box and take care of the
-% \cs{@mathmargin} unless we're in \env{flalign} or \env{flalign*}.
-% \begin{macrocode}
- \makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
- \kern-\@mathmargin
- \fi:
- \fi:
- \usebox{\EQ_mathdisplay_box}}%
- \or:
- \makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
- \kern-\@mathmargin
- \fi:
- \fi:
- \usebox{\EQ_mathdisplay_box}}%
- \fi:}%
- \EQ_right_side:$}%
-% \end{macrocode}
-% Then we're ready for typesetting. We just use an ordinary
-% |\begin{equation*}| | ... | |\end{equation*}| construction.
-% \changes{v2.00}{2004/04/14}{Used a saved definition of
-% \env{equation*} instead to allow overloading}
-% With v2.00 this changed to using a copy of the original
-% \env{equation*} environment. All this because of the
-% \opt{overload} option.
-% \begin{macrocode}
- \begin{AmSequation*}
- \@nameuse{EQ_place_display_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}
-% \end{macrocode}
-% \cs{tag} must have a non-zero width argument in order to function
-% properly, so we make sure there is a tag before we try to typeset
-% it. Also make sure that the boolean |show_manual_tags| is true
-% just for this tag.
-% \begin{macrocode}
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_set_boolean_T:n {show_manual_tags}
-% \end{macrocode}
-% Set the tag in a left aligned box when in \mode{leqno} mode and
-% right aligned when in \mode{reqno} mode.
-% \begin{macrocode}
- \if_case:w \l_EQ_alignmentmode_int
- \or: \EQ_place_tag:N r %#1
- \or: \EQ_place_tag:N l %#2
- \or: \EQ_place_tag:N r %#3
- \or: \EQ_place_tag:N l %#4
- \fi:
- \fi:
- \end{AmSequation*}
-% \end{macrocode}
-% \changes{v2.11}{2004/08/03}{Use raw \TeX{} commands to speed it up}
-% Restore the equation counter.
-% \begin{macrocode}
- \global\c@equation=\l_EQ_equation_fint\relax
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Initializing the Equations}
-%
-% \begin{macro}{\EQ_initialize:}
-% We save all the initializations in this hook:
-% \begin{macrocode}
-\def\EQ_initialize:{%
- \m@th
-% \end{macrocode}
-% More support for \pkg{ntheorem}. We use special versions of
-% the tag setting commands in order to produce the correct result.
-% For instance in \mode{leqno} mode you would still want the end of
-% theorem symbol at the bottom of the math display.
-% \begin{macrocode}
- \MH_let:NwN\SetTagPlusEndMark\EQ_tag_plus_endmark:
- \MH_let:NwN\SetOnlyEndMark\EQ_only_endmark:
- \l_EQ_temp_linewidth_dim\linewidth
- \g_EQ_toprow_height_dim\z@
- \g_EQ_bottomrow_depth_dim\z@
- \g_EQ_toptag_height_dim\z@
- \g_EQ_bottomtag_depth_dim\z@
- \g_EQ_widesttag_dim\z@
-% \end{macrocode}
-% \changes{v2.11}{2004/08/03}{Added a \cs{g_EQ_latest_nonzerodepth_row_fint}}
-% \begin{macrocode}
- \xdef\g_EQ_latest_nonzerodepth_row_fint{\z@}
- \edef\EQ_restore_tex_delimiter:{%
- \delimiterfactor\the\delimiterfactor
- \delimitershortfall\the\delimitershortfall\relax}%
- \g@addto@macro\EQ_complete_mathdisplay:
- \EQ_restore_tex_delimiter:
- \delimitershortfall\EmphEqdelimitershortfall
- \delimiterfactor\EmphEqdelimiterfactor
-% \end{macrocode}
-% Disable \cs{intertext} and issue an error message. Using the
-% normal error message for an invalid \cs{intertext} would be less
-% than great because it would say
-% \begin{verbatim}
-% ! Package amsmath Error: Invalid use of \intertext.
-%
-% See the amsmath package documentation for explanation.
-% Type H <return> for immediate help.
-% ...
-% \end{verbatim}
-% That's not good enough, so we redefine things a bit. In
-% \pkg{amsmath} the command \cs{intertext@} is called inside the
-% math environments and defines \cs{intertext}. We hook into this.
-% \begin{macrocode}
- \MH_let:NwN\intertext@\EQ_intertext:
- \EQ_displaybreak:}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_intertext:}
-% Then we issue a suitable error message.
-% \begin{macrocode}
-\def\EQ_intertext:{%
- \def\intertext##1{\PackageError{empheq}{%
- You~cannot~use~\string\intertext\space inside~the~`empheq'
- \MessageBreak
- environment,~as~`empheq'~creates~an~unbreakable~box}\@eha}}
-\def\EQ_displaybreak:{%
- \def\dspbrk@[##1]{\PackageWarning{empheq}{%
- You~cannot~use~\string\displaybreak\space inside~the~`empheq'%
- \MessageBreak
- environment,~as~`empheq'~creates~an~unbreakable~box.}}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_new_equationtype:nnn}
-% \begin{macro}{\EQ_new_equationtype_arg:nnn}
-% We have to inform \env{EmphEqMainEnv} which equation type we're
-% using, so we define an interface for that.
-% \begin{macrocode}
-\def\EQ_new_equationtype:nnn #1#2#3{%
- \define@key{#1}{#2}[true]{%
- \l_EQ_equationtype_int=#3\relax
- \def\EQ_begin_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\begin{#2}}}%
- \def\EQ_end_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\end{#2}}}}}
-\def\EQ_new_equationtype_arg:nnn #1#2#3{%
- \define@key{#1}{#2}{%
- \l_EQ_equationtype_int=#3\relax
- \def\EQ_begin_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\begin{#2}{##1}}}%
- \def\EQ_end_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\end{#2}}}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsubsection{Separating Tags and Display}
-%
-% \begin{macro}{\EQ_typeset_tags:}
-% Typesetting the tags without the display.
-% \begin{macrocode}
-\def\EQ_typeset_tags:{%
- \sbox\EQ_tag_box{%
- \parbox{.5\maxdimen}{%
- \hbadness\@M
-% \end{macrocode}
-% Make sure all skips are zero ands support \pkg{ntheorem}.
-% \changes{v1.05a}{2004/02/17}{Forgot to support \pkg{ntheorem} in
-% both \cs{EQ_typeset_tags:} and \cs{EQ_typeset_display:}.}
-% \begin{macrocode}
- \EQ_prevent_vertical_space:
-% \end{macrocode}
-% Support for \pkg{ntheorem}. This package patches \cs{endgather}
-% and \cs{endalign} with the commands \cs{TagsPlusEndmarks} and
-% \cs{RestoreTags} but we do not want them disturbing our output so
-% we disable them when typesetting the display.
-% \begin{macrocode}
- \EQ_typeset_tags_hook:
-% \end{macrocode}
-% Then use our own versions of \cs{set@gather@field} and
-% \cs{set@field}.
-% \begin{macrocode}
- \MH_let:NwN\set@gather@field\EQ_set_gather_field:
- \MH_let:NwN\set@field\EQ_set_align_field:
-% \end{macrocode}
-% Next two lines are for measuring of the first and last row of a
-% display of the \env{align}, \env{alignat} or \env{flalign} family.
-% \begin{macrocode}
- \MH_set_boolean_T:n {continue_measuring}
- \global\g_EQ_temprow_int\m@ne
- \MH_let:NwN \EQ_saved_maketag:n \maketag@@@
- \def\maketag@@@##1{
- \EQ_maketag:Nn \EQ_saved_maketag:n {##1}}
-% \end{macrocode}
-% Then typeset the display.
-% \begin{macrocode}
- \EQ_complete_mathdisplay:}}}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\EQ_predisplay_adjustment:}
-% \changes{v1.05c}{2004/02/25}{Added \cs{EQ_predisplay_adjustment:}}
-%
-% \changes{v2.00}{2004/04/14}{Added a missing \cs{normallineskip} in
-% case of extremely big tag height}
-%
-% For adjusting vertical spacing in the display.
-% \begin{macrocode}
-\def\EQ_predisplay_adjustment:{%
- \if_dim:w \g_EQ_toprow_height_dim<\baselineskip
- \vskip\g_EQ_toprow_height_dim
- \vskip-\baselineskip
- \else:
- \vskip-\normallineskip
- \fi:
- \if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim
- \if_dim:w \g_EQ_toptag_height_dim>\baselineskip
- \vskip-\g_EQ_toptag_height_dim
- \vskip\baselineskip
- \vskip-\normallineskip
- \fi:
- \fi:}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_postdisplay_adjustment:}
-% \changes{v1.05c}{2004/02/25}{Added \cs{EQ_postdisplay_adjustment:}}
-% Name says it all.
-% \begin{macrocode}
-\def\EQ_postdisplay_adjustment:{%
- \if_dim:w \g_EQ_bottomrow_depth_dim<\dp\strutbox
- \vskip\g_EQ_bottomrow_depth_dim
- \vskip-\dp\strutbox
- \fi:
- \if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim
- \if_dim:w \g_EQ_bottomtag_depth_dim>\dp\strutbox
- \vskip-\g_EQ_bottomtag_depth_dim
- \vskip\dp\strutbox
- \fi:
- \fi:}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_typeset_display:}
-% \changes{v1.05c}{2004/02/25}{Now takes two arguments: Either both
-% empty or \cs{EQ_predisplay_adjustment:} \&
-% \cs{EQ_postdisplay_adjustment:}}
-% \changes{v1.05d}{2004/02/26}{Changed again. Uses only
-% \cs{EQ_predisplay_adjustment:} \& \cs{EQ_postdisplay_adjustment:}}
-% We typeset the display without the tags and save it in a box.
-% \begin{macrocode}
-\def\EQ_typeset_display:{%
- \sbox\EQ_mathdisplay_box{%
- \parbox{\l_EQ_temp_linewidth_dim}{%
-% \end{macrocode}
-% We adjust the vertical spacing if needed:
-% \begin{macrocode}
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
-% \end{macrocode}
-% Support for \pkg{ntheorem}. This package patches \cs{endgather}
-% and \cs{endalign} with the commands \cs{TagsPlusEndmarks} and
-% \cs{RestoreTags} but we do not want them disturbing our output so
-% we disable them when typesetting the display.
-% \begin{macrocode}
- \EQ_typeset_display_hook:
-% \end{macrocode}
-% Instead of gobbling the tags it's better to use \cs{phantom} since
-% a tall tag will ruin the vertical spacing. We use a special
-% version of \cs{phantom} to help us with other things as well.
-% \begin{macrocode}
- \def\maketag@@@##1{\EQ_maketag:Nn \vphantom{##1}}%
- \EQ_complete_mathdisplay:
-% \end{macrocode}
-% More space adjustment.
-% \begin{macrocode}
- \EQ_postdisplay_adjustment:}}}
-% \end{macrocode}
-% \end{macro}
-% We need a few little helpers:
-% \begin{macro}{\EQ_prevent_vertical_space:}
-% \changes{v2.00}{2004/04/14}{Used \cs{nointerlineskip} instead}
-% As we typeset the math display inside a \cs{parbox} the math
-% environment will add \cs{abovedisplayskip} at the top and
-% \cs{belowdisplayskip} at the bottom. Also we suppress interline
-% skip with \cs{nointerlineskip}.
-% \begin{macrocode}
-\def\EQ_prevent_vertical_space:{%
- \nointerlineskip
- \abovedisplayskip\z@ \belowdisplayskip\z@\relax}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_maketag:Nn}
-% \changes{v1.05d}{2004/02/26}{Changed name from
-% \cs{EmphEqphantom} to \cs{EmphEqMaketag}}
-% This takes care of two things: We need to store the height of the
-% top tag and the depth of the bottom tag for later, but we also
-% need to use a \cs{vphantom} of the tag as it may be taller than
-% the line of math it is attached to (say, if you are using node
-% connectors from \pkg{pstricks} or some other weird stuff).
-% \begin{macrocode}
-\def\EQ_maketag:Nn #1#2{%
- \setboxz@h{#2}%
- \if_num:w \row@=\@ne
- \global \g_EQ_toptag_height_dim = \ht\z@
- \fi:
-% \end{macrocode}
-% Similarly the depth of the last row is determined by measuring the
-% depth of box zero for each row and then using the last of the
-% values.
-% \begin{macrocode}
- \global \g_EQ_bottomtag_depth_dim=\dp\z@
-% \end{macrocode}
-% \changes{v2.11}{2004/08/03}{Added a check for being in the last row.}
-% Save the row number for later as the \opt{ntheorem} option will need
-% it.
-% \begin{macrocode}
- \xdef\g_EQ_latest_nonzerodepth_row_fint{\number\row@}
- \@tempdima=\wd\z@
- \if_dim:w \@tempdima > \g_EQ_widesttag_dim
- \global \g_EQ_widesttag_dim = \@tempdima
- \fi:
- #1{#2}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Measuring \env{gather}}
-% \begin{macro}{\EQ_set_gather_field:}
-% Box zero (\cs{z@}) contains the entire line of math in a
-% \env{gather}, so instead of typesetting it we typeset the phantom
-% of it and call \cs{EQ_measure_gather:}.
-% \begin{macrocode}
-\def\EQ_set_gather_field:{%
- \iftagsleft@
- \global\lineht@\ht\z@
- \else:
- \global\lineht@\dp\z@
- \fi:
- \kern\eqnshift@
- %\boxz@ % Original amsmath version
- \EQ_measure_gather:
- \phantom{\boxz@}%
- \hfil}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_measure_gather:}
-% Measuring the height of the individual lines in a \env{gather} is
-% fairly easy. If \cs{row@} is equal to one, we're in the first
-% line, and the height of the top row is simply given by the height
-% of box zero.
-% \begin{macrocode}
-\def\EQ_measure_gather:{%
- \if_num:w \row@=\@ne
- \g_EQ_toprow_height_dim=\ht\z@
- \fi:
-% \end{macrocode}
-% Similarly the depth of the last row is determined by measuring the
-% depth of box zero for each row and then using the last of the
-% values.
-% \begin{macrocode}
- \g_EQ_bottomrow_depth_dim=\dp\z@
- \global\g_EQ_toprow_height_dim\g_EQ_toprow_height_dim
- \global\g_EQ_bottomrow_depth_dim\g_EQ_bottomrow_depth_dim}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Measuring \env{align}, \env{alignat} and \env{flalign}}
-% \begin{macro}{\EQ_set_align_field:}
-% Same technique as for \cs{EQ_set_gather_field}. Only this time
-% we have to stop the underlying \cs{start@align} from going over
-% the measuring phase twice. That's when the conditional
-% \bool{continue_measuring} comes into the picture.
-% \begin{macrocode}
-\def\EQ_set_align_field:{%
- \column@plus
- \iftagsleft@
- \if_dim:w \ht\z@>\lineht@
- \global\lineht@\ht\z@
- \fi:
- \else:
- \if_dim:w \dp\z@>\lineht@
- \global\lineht@\dp\z@
- \fi:
- \fi:
- %\boxz@ % Original amsmath version
- \MH_if_boolean:nT {continue_measuring}{ \EQ_measure_align: }
- \phantom{\boxz@}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_measure_align:}
-% We have to measure every single field of the \cs{align@} \ldots\@
-% Oh well, here it comes:
-% \begin{macrocode}
-\newcount\g_EQ_temprow_int
-\MH_new_boolean:n {still_in_samerow}
-\MH_new_boolean:n {continue_measuring}
-\def\EQ_measure_align:{%
- \if_num:w \g_EQ_temprow_int=\row@
- \MH_set_boolean_T:n {still_in_samerow}
- \else:
- \if_num:w \g_EQ_temprow_int>\row@
- \global\MH_set_boolean_F:n {continue_measuring}
- \fi:
- \MH_set_boolean_F:n {still_in_samerow}
- \global\@tempdimc=\@tempdimb
- \global\@tempdimb=\g_EQ_bottomrow_depth_dim
- \fi:
- \MH_if_boolean:nTF {continue_measuring}{
- \global\g_EQ_temprow_int=\row@
- \@tempcnta=\row@
- \if_num:w \@tempcnta=\z@
- \@tempdima=\g_EQ_toprow_height_dim
- \g_EQ_toprow_height_dim=\ht\z@\relax
- \if_dim:w \g_EQ_toprow_height_dim<\@tempdima
- \g_EQ_toprow_height_dim\@tempdima
- \fi:
- \fi:
- \MH_if_boolean:nTF {still_in_samerow}{
- \@tempdima=\g_EQ_bottomrow_depth_dim
- \g_EQ_bottomrow_depth_dim=\dp\z@\relax
- \if_dim:w \g_EQ_bottomrow_depth_dim<\@tempdima
- \g_EQ_bottomrow_depth_dim\@tempdima
- \fi:
- }{
- \g_EQ_bottomrow_depth_dim\dp\z@\relax
- }
- }{
- \global\g_EQ_bottomrow_depth_dim=\@tempdimc
- }
- \global\g_EQ_toprow_height_dim\g_EQ_toprow_height_dim
- \global\g_EQ_bottomrow_depth_dim\g_EQ_bottomrow_depth_dim}
-% \end{macrocode}
-% \end{macro}
-% \subsubsection{Typesetting the Tags}
-% \begin{macro}{\EQ_place_tag:N}
-% Fool \LaTeX\ into thinking the tag is only as wide as the widest
-% tag (remember the real width of the \cs{EQ_tag_box} is
-% $0.5$\cs{maxdimen}.
-% \begin{macrocode}
-\def\EQ_place_tag:N #1{%
- \tag*{\makebox[\g_EQ_widesttag_dim][#1]{%
- \EQ_vertical_tag_adjustment:n {\usebox{\EQ_tag_box}}}}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_vertical_tag_adjustment:n}
-% \changes{v2.00}{2004/04/14}{Added a missing \cs{normallineskip} in
-% case of extremely big tag height}
-% This is a little tricky. We have measured the height of the top
-% row and top tag and the depth of the bottom row and bottom tag.
-% Now we have to adjust the vertical spacing so it comes out just
-% right. Remember we have separated the tags and the math display
-% but we would still like to have them line up as they should! We do
-% it all inside a group so we can use the scratch dimensions safely.
-% \begin{macrocode}
-\def\EQ_vertical_tag_adjustment:n #1{{%
- \@tempdima\z@\@tempdimb\z@
- \@tempdimc=\dp\strutbox
- \if_dim:w \g_EQ_toprow_height_dim<\baselineskip
- \MH_setlength:dn
- \@tempdima{\g_EQ_toprow_height_dim-\baselineskip}
- \else:
- \MH_setlength:dn \@tempdima{-\normallineskip}
- \fi:
- \if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim
- \if_dim:w \g_EQ_toptag_height_dim>\baselineskip
- \MH_addtolength:dn \@tempdima
- {-\g_EQ_toptag_height_dim+\baselineskip-\normallineskip}
- \fi:
- \fi:
- \if_dim:w \g_EQ_bottomrow_depth_dim<\@tempdimc
- \MH_setlength:dn \@tempdimb
- {\g_EQ_bottomrow_depth_dim-\@tempdimc}
- \fi:
-% \end{macrocode}
-% \changes{v2.00}{2004/04/14}{Fixed minor bug}
-% If the last condition is fulfilled we also need to cancel the
-% first condition.
-% \begin{macrocode}
- \if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim
- \if_dim:w \g_EQ_bottomtag_depth_dim<\@tempdimc
- \else:
- \MH_addtolength:dn \@tempdimb
- {-\g_EQ_bottomtag_depth_dim+\@tempdimc}
- \fi:
- \fi:
- \raisebox{-0.5\@tempdima+0.5\@tempdimb}{#1}}}%
-% \end{macrocode}
-% \end{macro}
-% \section{Adding the Equation Types}
-% Adding an equation type is fairly easy. The outline is this:
-% \begin{list}{}{\leftmargin2em}
-% \item[]|\EQ_new_equationtype{EmphEqEnv}|\marg{\AmS\
-% env}\marg{arabic num}\texttt{:}
-% \item[]|\def\EQ_modify_linewidth_|\meta{roman num}\texttt{:}\\
-% \hspace*{2em}\marg{Optionally alter \cs{l_EQ_temp_linewidth_dim}}
-% \item[]|\def\find_displaywidth_|\meta{roman num}\texttt{:}\\
-% \hspace*{2em}\marg{Set \cs{l_EQ_displaywidth_dim}}
-% \item[]|\def\EQ_place_display_|\meta{roman num}\texttt{:}\\
-% \hspace*{2em}\marg{Make use of \cs{EQ_use_mathdisplay:}}
-% \end{list}
-% \begin{macro}{\EQ_use_mathdisplay:}
-% A shorthand.
-% \begin{macrocode}
-\def\EQ_use_mathdisplay:{%
- \EQ_outerbox:{\usebox{\EQ_mathdisplay_box}}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\def\EQ_options_name:{EmphEqOpt}
-% \end{macrocode}
-% \subsection{The \env{equation} Family}
-% Just a few aliases because \env{equation} and \env{equation*}
-% behave strangely. Much better to use \env{gather} instead as this
-% is easier to measure. Besides it's less work (for us, not the
-% compiler). ;-)
-% \begin{macrocode}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{equation}{gather}
- {\EQ_disable_linebreak:}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{equation*}{gather*}
- {\EQ_disable_linebreak:}
-% \end{macrocode}
-% \begin{macro}{\EQ_disable_linebreak:}
-% \changes{v1.05c}{2004/02/25}{Introduced
-% \cs{EQ_disable_linebreak:} to prevent multi line
-% \env{equation}'s}
-% \changes{v1.05c}{2004/02/25}{Fixed it so that it works better}
-% Disable the line breaks in \env{equation} as these are actually
-% possible now, since we're in a \env{gather}! \cs{Let@} does it in
-% the environment, so that's the place to hack.
-% \begin{macrocode}
-\def\EQ_disable_linebreak:{%
- \MH_let:NwN \EQ_saved_Let: \Let@
- \def\Let@{\def\\{%
- \PackageError{empheq}{You~ cannot~ use~ \string\\~ in~ equation!}
- {\@eha}}
-% \end{macrocode}
-% Then restore the meaning of \cs{Let@} in case there is a
-% \env{gathered} or alike coming up.
-% \begin{macrocode}
- \MH_let:NwN \Let@ \EQ_saved_Let:
- }%
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{The \env{align} Family}
-% \begin{macrocode}
-\EQ_new_equationtype:nnn {EmphEqEnv}{align}{1}
-\EQ_new_equationtype:nnn {EmphEqEnv}{align*}{2}
-% \end{macrocode}
-% \begin{macrocode}
-\def\EQ_modify_linewidth_i:{%
-% \end{macrocode}
-% If $\cs{maxfields@}=2$ we're in a single column \env{align} and
-% thus there is no flexible space.
-% \begin{macrocode}
- \if_num:w \maxfields@=\tw@
- \else:
-% \end{macrocode}
-% But if there is any flexible space we would very much like to
-% adjust it because we add material to the right and left of the
-% math display.
-% \begin{macrocode}
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
- \fi:}
-\def\EQ_modify_linewidth_ii:{\EQ_modify_linewidth_i:}
-\def\find_displaywidth_i:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim
- {\l_EQ_temp_linewidth_dim-\alignsep@}
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}%
- \or: % #2:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}%
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_ii:{\find_displaywidth_i:}
-\def\EQ_place_display_i: {\EQ_use_mathdisplay:}
-\def\EQ_place_display_ii:{\EQ_place_display_i:}
-% \end{macrocode}
-%
-% \subsection{The \env{gather} Family}
-% This is a gem. Notice how easy it is once we got the framework for
-% it.
-% \begin{macrocode}
-\EQ_new_equationtype:nnn {EmphEqEnv}{gather}{3}
-\EQ_new_equationtype:nnn {EmphEqEnv}{gather*}{4}
-\def\EQ_modify_linewidth_iii:{}
-\def\EQ_modify_linewidth_iv:{\EQ_modify_linewidth_iii:}
-\def\find_displaywidth_iii:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int \or: \or: % #1 & #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_iv:{\find_displaywidth_iii:}
-\def\EQ_place_display_iii:{\EQ_use_mathdisplay:}
-\def\EQ_place_display_iv: {\EQ_place_display_iii:}
-% \end{macrocode}
-%
-% \subsection{The \env{flalign} Family}\label{sec:flalign+multline}
-% This was fairly easy, but then I had to take care of \ldots
-%
-% \subsubsection{The \env{multline} Family}
-% This was quite a pickle. Its implementation in \pkg{amsmath} is
-% very strange indeed; for instance the tag is typeset in the
-% measuring phase! So instead I thought I could fake it, but how
-% should I do it?
-%
-% The basic idea of \env{multline} is to typeset the first line
-% flush left, the last line flush right and the rest centered.
-% ``Aha,'' I thought, ``what if I make three columns, fool \LaTeX{}
-% into thinking the contents of the columns take no space and then
-% just put each line into a column?'' Thus the \env{flalign}
-% environment came to mind. I also distinctly remembered to have
-% seen an article about the equivalent of \cs{rlap} and \cs{llap} in
-% math mode, namely an article by Alexander R.~Perlis. This works
-% pretty well, and so does the same trick for producing a
-% \env{multlined} environment. That one uses an \env{alignedat} with
-% three columns.
-%
-% \changes{v1.05c}{2004/02/25}{Makes use of
-% \cs{MakeKeyvalAliasAddon} now}
-% Then we make \env{multline} into an alias for {flalign} but with
-% an extra switch \cs{ifEQ_multline:} set to true.
-% \begin{macrocode}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}
- {flalign}{\MH_set_boolean_T:n {multline}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}
- {flalign*}{\MH_set_boolean_T:n {multline}}
-% \end{macrocode}
-% \begin{macro}{\if_EQ_multline:}
-% \begin{macro}{\EQ_generic_multline:nnnnn}
-% We make a general command that'll provide the correct spacing and
-% then just define the user commands in terms of that single generic
-% one.
-% \begin{macrocode}
-\MH_new_boolean:n {multline}
-% \end{macrocode}
-% \begin{macro}{\EQ_multline_modify_linewidth_tag:}
-% \begin{macro}{\EQ_multline_modify_linewidth_notag:}
-% There is a big difference between the spacing in \env{multline}
-% depending on the presence of a tag. Therefore we split it up in
-% two cases. I made this choice because we need these adjustments
-% inside the adjustments for \env{flalign} and that makes it
-% incredibly difficult to see what happens.
-% \begin{macrocode}
-\def\EQ_multline_modify_linewidth_tag:{%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}%
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}%
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\@mathmargin-\g_EQ_widesttag_dim-\multlinetaggap}%
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \fi:
-}
-\def\EQ_multline_modify_linewidth_notag:{%
- \if_case:w \l_EQ_alignmentmode_int\or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap}
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap}
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{environment}{MTmultlined}
-% Save the superior \env{multlined} from \pkg{mathtools} under a new
-% name.
-% \begin{macrocode}
-\MH_let:NwN \MTmultlined \multlined
-\MH_let:NwN \endMTmultlined \endmultlined
-% \end{macrocode}
-% \end{environment}
-% We make a choice here: the good \env{multline} or the bad?
-% \begin{macrocode}
-\MH_if_boolean:nTF {good_mult}{
-% \end{macrocode}
-% The good:
-% \begin{macrocode}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
- {\MH_set_boolean_T:n {outer_mult}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
- {\MH_set_boolean_T:n {outer_mult}}
-\def\EQ_modify_linewidth_iii_mult:{
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\widthof{\EQ_outerbox:{}}}%
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \EQ_multline_modify_linewidth_tag:
- \else:
- \EQ_multline_modify_linewidth_notag:
- \fi:
- \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
-}
-\def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
-\def\find_displaywidth_iii_mult:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int \or: \or: % #1 & #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_iv_mult:{\find_displaywidth_iii_mult:}
-\def\EQ_place_display_iii_mult:{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \abovedisplayshortskip=\abovedisplayskip
- \rlap{
- \kern-.5\linewidth
- \kern\multlinegap
- \EQ_use_mathdisplay:
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #2:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \llap{
- \EQ_use_mathdisplay:
- \kern-.5\linewidth
- \kern\multlinegap
- }%
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #3:
- \EQ_use_mathdisplay:
- \or: % #4:
- \EQ_use_mathdisplay:
- \fi:
-}
-\def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
-% \end{macrocode}
-% \begin{macrocode}
-}{
-% \end{macrocode}
-% The bad
-% \begin{macrocode}
-\def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
-% \end{macrocode}
-% This is a very tricky little detail. If we're in \mode{leqno} mode
-% we need just a we little width inside the \env{flalign}, so we put
-% in the smallest possible amount. Otherwise we wind up in a
-% \begin{verbatim}
-% ! Arithmetic overflow.
-% <recently read> \count@
-%
-% l.304 % \end{empheq}
-% \end{verbatim}
-% If you scroll past this error it will be typeset correctly, but
-% how many users can fix this by themselves?
-% \begin{macrocode}
- \hskip1sp#2#3{{}#5}#4%
- \if:w *#1\relax\else:\notag\fi:}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\multleft}
-% \begin{macro}{\multcenter}
-% \begin{macro}{\multright}
-% Then the commands that use \cs{EQ_generic_multline:nnnnn}. The
-% first three are the general purpose ones that also have a starred
-% version. The other three are for normal use.
-% \begin{macrocode}
-\def\multleft{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n}
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n}%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
- }
- \EQ_next:}}%
-\def\multcenter{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_center:n}%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_center:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
- }
- \EQ_next:}}%
-\def\multright{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
- }
- \EQ_next:}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\multfirst}
-% \begin{macro}{\multmiddle}
-% \begin{macro}{\multlast}
-% If we're using the \mode{leqno} option, the equation number should
-% be placed in the first line.
-% \begin{macrocode}
-\def\multfirst{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n }%
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \def\EQ_next:{\multleft}%
- \or: % #2:
- \def\EQ_next:{\multleft*}%
- \or: % #3:
- \def\EQ_next:{\multleft}%
- \or: % #4:
- \def\EQ_next:{\multleft*}%
- \fi:
- }
- \EQ_next:}
-% \end{macrocode}
-% Pretend the star was never there.
-% \begin{macrocode}
-\def\multmiddle{%
- \def\EQ_next:{%
- \MH_if_boolean:nTF {multlined}{
- \expandafter\EQ_multlined_center:n
- }{
- \expandafter\multcenter
- }
- }%
- \@ifstar{\EQ_next:}{\EQ_next:}}
-% \end{macrocode}
-% If we're using the \mode{reqno} option, the equation number
-% should be placed in the last line.
-% \begin{macrocode}
-\def\multlast{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \def\EQ_next:{\multright*}%
- \or: % #2:
- \def\EQ_next:{\multright}%
- \or: % #3:
- \def\EQ_next:{\multright*}%
- \or: % #4:
- \def\EQ_next:{\multright}%
- \fi:
- }
- \EQ_next:}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\multlinedwidth}
-% Here begins the code for \env{multlined}.
-% \begin{macrocode}
-\MH_new_boolean:n {multlined}
-\newdimen\multlinedwidth
-\MH_setlength:dn \multlinedwidth{.7\linewidth}
-% \end{macrocode}
-% \end{macro}
-% \begin{environment}{multlined}
-% \changes{v2.10}{2004/07/26}{Disallow spaces before optional
-% arguments.}
-% \begin{macro}{\EQ_multlined_I:w}
-% \begin{macro}{\EQ_multlined_II:w}
-% \begin{macro}{\EQ_multlined_III:nn}
-% Some trickery as we want to scan for two optional arguments that
-% may be interchanged.
-% \begin{macrocode}
-\renewenvironment{multlined}%
- {\MH_nospace_ifnextchar:Nnn [ {\EQ_multlined_I:w}
- {\EQ_multlined_I:w[c]}
- }
- { \endaligned }
-\def\EQ_multlined_I:w[#1]{%
- \MH_nospace_ifnextchar:Nnn[ {\EQ_multlined_II:w[#1]}
- {\EQ_multlined_II:w[#1][\multlinedwidth]}}
-\def\EQ_multlined_II:w[#1][#2]{%
-% \end{macrocode}
-% We tell \LaTeX\ that we're in \env{multlined}.
-% \begin{macrocode}
- \MH_set_boolean_T:n {multlined}
-% \end{macrocode}
-% \changes{v2.10}{2004/07/26}{Fixed restoration of \cmd{\\}}
-% Restore the meaning of \cmd{\\} inside \env{multlined}, else it
-% wouldn't work in the \env{equation} environment.
-% \begin{macrocode}
- \MH_let:NwN \Let@\MT_saved_Let:
-% \end{macrocode}
-% Then check the first optional argument and call
-% \cs{EQ_multlined_III:w}, which sets \cs{multlinewidth} if
-% specified and calls \cs{start@aligned} (an \env{alignedat} with
-% three columns).
-% \begin{macrocode}
- \if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \EQ_multlined_III:nn {#2}{#1}%
- \fi:
- \fi:
- \fi:
- \mkern-\thinmuskip
- \EQ_next:}
-\def\EQ_multlined_III:nn #1#2{%
- \def\EQ_next:{\setlength\multlinedwidth{#2}%
- \start@aligned{#1}{\thr@@}}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{environment}
-% \begin{macro}{\EQ_multlined_left:n}
-% \begin{macro}{\EQ_multlined_center:n}
-% \begin{macro}{\EQ_multlined_right:n}
-% The internal versions of \cs{multleft} etc.\ adapted for
-% \env{multlined}.
-% \begin{macrocode}
-\def\EQ_multlined_left:n #1{%
- \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_center:n #1{%
- &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_right:n #1{%
- &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% End of bad multline.
-% \begin{macrocode}
-}
-% \end{macrocode}
-%
-% \subsubsection{The Code for \env{flalign} \& \env{multline}}
-% \begin{macrocode}
-\EQ_new_equationtype:nnn {EmphEqEnv}{flalign}{5}
-\EQ_new_equationtype:nnn {EmphEqEnv}{flalign*}{6}
-\def\EQ_modify_linewidth_v:{%
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \EQ_multline_modify_linewidth_tag:
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}
- \or: % #2:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}%
- \or: % #3:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}
- \or: % #4:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\@mathmargin}
- \fi:
- }
- \else:
- \MH_if_boolean:nT {multline}{
- \EQ_multline_modify_linewidth_notag:
- }
- \fi:}
-\def\EQ_modify_linewidth_vi:{\EQ_modify_linewidth_v:}
-\def\find_displaywidth_v:{%
- \MH_setlength:dn
- \l_EQ_displaywidth_dim{\l_EQ_temp_linewidth_dim}}
-\def\find_displaywidth_vi:{\find_displaywidth_v:}
-\def\EQ_place_display_v:{%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \rlap{\kern\multlinegap \kern-.5\linewidth
- \EQ_use_mathdisplay:
- \kern-\mintagsep \kern\multlinetaggap}%
- }{
- \rlap{\kern-.5\linewidth\EQ_use_mathdisplay:}%
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #2:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \llap{\kern-\mintagsep \kern\multlinetaggap
- \EQ_use_mathdisplay:
- \kern\multlinegap \kern-.5\linewidth}%
- }{
- \llap{\EQ_use_mathdisplay:\kern-.5\linewidth}%
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #3:
- \MH_if_boolean:nF {multline}{ \kern-\multlinetaggap }
- \EQ_use_mathdisplay:
- \or: % #4:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \else:
- \MH_if_boolean:nF {multline}{ \kern-\@mathmargin }
- \fi:
- \EQ_use_mathdisplay:
- \fi:
- \MH_set_boolean_F:n {multline}}
-\def\EQ_place_display_vi:{\EQ_place_display_v:}
-% \end{macrocode}
-%
-% \subsection{The \env{alignat} Family}
-% This is just as easy as \env{gather}. Actually only one line is
-% different from \env{gather}!
-% \begin{macrocode}
-\EQ_new_equationtype_arg:nnn {EmphEqEnv}{alignat}{7}
-\EQ_new_equationtype_arg:nnn {EmphEqEnv}{alignat*}{8}
-\def\EQ_modify_linewidth_vii:{}
-\def\EQ_modify_linewidth_viii:{\EQ_modify_linewidth_vii:}
-\def\find_displaywidth_vii:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \or: % #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\eqnshift@}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_viii:{\find_displaywidth_vii:}
-\def\EQ_place_display_vii:{\EQ_use_mathdisplay:}
-\def\EQ_place_display_viii:{\EQ_place_display_vii:}
-% \end{macrocode}
-% \section{The User Interface}
-% The different keys.
-% \begin{macrocode}
-\define@key{\EQ_options_name:}{box}{\def\EQ_outerbox:{#1}}
-\MH_keyval_alias:nnn {\EQ_options_name:}{outerbox}{box}
-% \end{macrocode}
-% \begin{macro}{\EQ_marginbox:nn}
-% The margin box. Uwe Siart wanted it.
-% \begin{macrocode}
-\def\EQ_marginbox:nn #1#2{%
- \settowidth{\@tempdima}{#2}%
- \makebox[\z@]{\hspace{\@tempdima}#1{#2}}}
-\define@key{\EQ_options_name:}{marginbox}{%
- \def\EQ_outerbox:{\EQ_marginbox:nn {#1}}}
-% \end{macrocode}
-% \end{macro}
-% Almost self-explanatory, isn't?
-% \begin{macrocode}
-\define@key{\EQ_options_name:}{innerbox}{\def\EQ_innerbox:{#1}}
-\define@key{\EQ_options_name:}{left}{\def\EQ_left_side:{#1}}
-\define@key{\EQ_options_name:}{right}{\def\EQ_right_side:{#1}}
-% \end{macrocode}
-% \begin{macro}{\empheqset}
-% Just a user friendly way to set keys. Uwe Siart again.
-% \begin{macrocode}
-\newcommand*\empheqset[1]{\setkeys{\EQ_options_name:}{#1}}
-% \end{macrocode}
-% \end{macro}
-% The old keys from the original version are no longer supported.
-% Instead they give an error message (RM):
-% \begin{macrocode}
-\def\EQ_upgrade_error:{%
- \PackageError{empheq}
- {You~ are~ using~ the~ old~ syntax!\MessageBreak
- The~ `empheq'~ environment~ takes~ a~ mandatory~
- argument~ now.\MessageBreak
- You~ need~ to~ exit~ and~ change~ your~ source~ file.}
- {It~ won't~ work,~ trust me.~ Press~ `X'~ now.}}
-\define@key{\EQ_options_name:}{boxtype}{\EQ_upgrade_error:}
-\define@key{\EQ_options_name:}{Left}{\EQ_upgrade_error:}
-\define@key{\EQ_options_name:}{Right}{\EQ_upgrade_error:}
-% \end{macrocode}
-% \begin{macro}{\empheqeqrefbase}
-% This macro is used to locally redefine \cs{eqref}, it will just
-% point at \cs{textup}, the user can then redefine it if nessary.
-% \begin{macrocode}
-\let\empheqeqrefbase\textup
-% \end{macrocode}
-%
-% \end{macro}
-% \begin{environment}{empheq}
-% The environment.
-% \begin{macrocode}
-\newenvironment{empheq}[2][]{%
-% \end{macrocode}
-% \begin{macro}{\EQ_saved_maketag}
-% \changes{v2.13}{2013/02/11}{Fixing \cs{eqref}}
-% We start with a small caveat: During processing \cs{maketag@@@} is
-% redefined, enabling us to separate math and eqn numbers. But the
-% user may have used \cs{eqref} in a comment in the math, and
-% \cs{eqref} use \cs{maketag@@@}\dots{} First save the original \cs{maketag@@@}:
-% \begin{macrocode}
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
-% \end{macrocode}
-% Next redefine \cs{eqref} to locally bring back the original:
-% \begin{macrocode}
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{#2}\setkeys{\EQ_options_name:}{#1}%
- \EmphEqMainEnv}{\endEmphEqMainEnv}
-% \end{macrocode}
-% \end{macro}
-% \end{environment}
-% \begin{macro}{\DeclareLeftDelimiter}
-% \begin{macro}{\EQ_declare_left_delimiter:nnnn}
-% \begin{macro}{\DeclareRightDelimiter}
-% \begin{macro}{\EQ_declare_right_delimiter:nnnn}
-% The delimiter interface.
-% \changes{v0.7}{2003/05/11}{Introduced delimiter interface}
-% \changes{v1.05d}{2004/02/26}{Changed the definitions.}
-% We now use the \cs{EQ_tag_box} to calculate the height but
-% adjust the vertical spacing. All this to prevent running
-% \cs{EQ_typeset_display:} twice.
-% \begin{macrocode}
-\newcommand*\DeclareLeftDelimiter[2][]{%
- \EQ_declare_left_delimiter:nnnn {#1}{#2}{}{}%
- \EQ_declare_left_delimiter:nnnn {#1}{#2}{big}{\EQ_innerbox:}}
-\def\EQ_declare_left_delimiter:nnnn #1#2#3#4{%
- \@namedef{empheq#3\expandafter\@gobble\string#2}{%
- \left#2%
- \mkern-\thinmuskip
- \vphantom{#4{\parbox{.5\maxdimen}{%
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
- \usebox{\EQ_tag_box}%
- \EQ_postdisplay_adjustment:}}}%
- \right.%
- \kern-\nulldelimiterspace #1}}
-\newcommand*\DeclareRightDelimiter[2][]{%
- \EQ_declare_right_delimiter:nnnn {#1}{#2}{}{}%
- \EQ_declare_right_delimiter:nnnn {#1}{#2}{big}{\EQ_innerbox:}}
-\def\EQ_declare_right_delimiter:nnnn #1#2#3#4{%
- \@namedef{empheq#3\expandafter\@gobble\string#2}{%
- \kern-\nulldelimiterspace
- #1%
- \left.%
- \vphantom{#4{\parbox{.5\maxdimen}{%
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
- \usebox{\EQ_tag_box}%
- \EQ_postdisplay_adjustment:}}}%
- \mkern-\thinmuskip
- \right#2}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% The actual declarations.
-% \begin{macrocode}
-\DeclareLeftDelimiter{\lbrace}
-\DeclareRightDelimiter{\rbrace}
-\DeclareLeftDelimiter{\lbrack}
-\DeclareRightDelimiter{\rbrack}
-\DeclareLeftDelimiter{\langle}
-\DeclareRightDelimiter{\rangle}
-\DeclareLeftDelimiter{\lvert}
-\DeclareRightDelimiter{\rvert}
-\DeclareLeftDelimiter{\lVert}
-\DeclareRightDelimiter{\rVert}
-\DeclareLeftDelimiter{\lfloor}
-\DeclareRightDelimiter{\rfloor}
-\DeclareLeftDelimiter{\lceil}
-\DeclareRightDelimiter{\rceil}
-\DeclareLeftDelimiter{\lparen}
-\DeclareRightDelimiter{\rparen}
-% \end{macrocode}
-%
-% \section{Support for Other Packages}
-%
-% Support for various other packages is found in this section. The
-% \pkg{ntheorem} package now has a dedicated section (\S
-% \vref{sec:impl:ntheorem}), as it now a module.
-%
-%
-%
-% \begin{macrocode}
-\def\EQ_typeset_tags_hook:{}
-\def\EQ_typeset_display_hook:{}
-% \end{macrocode}
-%
-% \subsection{\pkg{showkeys}}
-% \changes{v2.10}{2004/07/26}{Added support for the \pkg{showkeys}
-% package}
-% We just disable \pkg{showkeys} when typesetting the labels.
-% \begin{macrocode}
-\g@addto@macro\EQ_typeset_display_hook:{
- \def\SK@@label#1>#2\SK@{}
-}
-% \end{macrocode}
-% If we overload the \AmS{} equation types we should still be able
-% to use \pkg{showkeys}.
-% \begin{macrocode}
-\@namedef{SK@AmSequation} {\SK@equationtrue}
-\@namedef{SK@AmSequation*} {\SK@equationtrue}
-\@namedef{SK@AmSalign} {\SK@equationtrue}
-\@namedef{SK@AmSalign*} {\SK@equationtrue}
-\@namedef{SK@AmSalignat} {\SK@equationtrue}
-\@namedef{SK@AmSalignat*} {\SK@equationtrue}
-\@namedef{SK@AmSgather} {\SK@equationtrue}
-\@namedef{SK@AmSgather*} {\SK@equationtrue}
-\@namedef{SK@AmSmultline} {\SK@equationtrue}
-\@namedef{SK@AmSmultline*} {\SK@equationtrue}
-\@namedef{SK@AmSflalign} {\SK@equationtrue}
-\@namedef{SK@AmSflalign*} {\SK@equationtrue}
-% \end{macrocode}
-%
-% \subsection{\pkg{hyperref}}
-%
-%
-% A little trick to avoid the (in)famous warning
-% \begin{verbatim}
-% ! pdfTeX warning (ext4): destination with the same identifier
-% (name{equation.1a }) has been already used, duplicate ignored
-% <to be read again>
-% \endgroup \set@typeset@protect
-% \end{verbatim}
-% This doesn't require \pkg{hyperref}.
-% \begin{macrocode}
-\AtBeginDocument{
- \@ifundefined{Hy@linkcounter}{\newcount\Hy@linkcounter}{}
-}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN \hyper@refstepcounter\@gobble
-}
-% \end{macrocode}
-%
-% \subsection{\pkg{nccmath}}
-%
-% Must disable this macro, otherwise the spacing is wrong.
-% \begin{macrocode}
- \g@addto@macro\EQ_typeset_display_hook:{
- \let\NCC@ignorepar\relax
- }
- \g@addto@macro\EQ_typeset_tags_hook:{
- \let\NCC@ignorepar\relax
- }
-% \end{macrocode}
-%
-% \subsection{Basic \pkg{ntheorem} support}
-% \begin{macrocode}
-\g@addto@macro\EQ_typeset_tags_hook:{
- \MH_let:NwN\TagsPlusEndmarks\relax
- \MH_let:NwN\RestoreTags\relax
-}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN\TagsPlusEndmarks\relax
- \MH_let:NwN\RestoreTags\relax
-}
-% \end{macrocode}
-% \subsection{Basic \LaTeXe{} support}
-% Gobble the \cs{ltx@label} and disable most error messages.
-% \changes{v2.00}{2004/04/14}{Make a special label-gobbling command
-% to support \pkg{ntheorem} even more}
-% \begin{macrocode}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN\ltx@label\MT_gobblelabel:w
- \MH_let:NwN \GenericError \@gobblefour
-}
-% \end{macrode}
-% \subsection{Support for \pkg{fancybox}}
-% First check if \pkg{fancybox} is loaded and then see if
-% \pkg{color} is loaded. If the latter is loaded we define
-% \texttt{shadowcolor} else we let \cs{textcolor} gobble the first
-% argument (the color).
-% \begin{macrocode}
-\AtBeginDocument{%
- \@ifpackageloaded{fancybox}{%
- \@ifpackageloaded{color}{\definecolor{shadowcolor}{rgb}{0,0,0}}%
- {\newcommand*\textcolor[2]{\normalcolor{#2}}}%
-% \end{macrocode}
-% \begin{macro}{\shadowbox}
-% Then define the \cs{shadowbox}. Use a conditional to let us know if
-% it was starred or not.
-% \begin{macrocode}
- \MH_new_boolean:n {shadowbox_star}
- \renewcommand*\shadowbox{%
- \@ifstar{\MH_set_boolean_T:n {shadowbox_star}
- \VerbBox\EQ_shadowbox:n}
- {\MH_set_boolean_F:n {shadowbox_star}
- \VerbBox\EQ_shadowbox:n}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_shadowbox:n}
-% The internal version of \cs{shadowbox}.
-% \begin{macrocode}
- \def\EQ_shadowbox:n #1{%
- \sbox{\z@}{\fbox{#1}}%
-% \end{macrocode}
-% The difference between the two versions is that \cs{shadowbox}
-% aligns the bottom of the shadow at the baseline whereas
-% \cs{shadowbox*} aligns the argument on the baseline, so for the
-% starred version the trick is to raise the box by the depth of the
-% argument plus the size of the shadow.
-% \begin{macrocode}
- \MH_if_boolean:nTF {shadowbox_star}{
- \MH_setlength:dn \@tempdima{\z@}%
- }{
- \MH_setlength:dn \@tempdima{\dp\z@+\shadowsize}%
- }
- \raisebox{\@tempdima}{%
- \makebox[\z@][l]{%
- \kern\shadowsize \textcolor{shadowcolor}{%
- \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
- }%
- \usebox\z@\textcolor{shadowcolor}{%
- \rule[-\dp\z@-\shadowsize]{\shadowsize}{\ht\z@+\dp\z@}}}}%
- }{}%
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \section{The \opt{overload} option}
-% \begin{macro}{\EQ_overload_ams_begin:n}
-% A helper for saving snapshots:
-% \begin{macrocode}
-\def\EQ_overload_ams_begin:n #1{%
- \MH_let:cc {AmS#1}{#1}%
- \MH_let:cc {AmS#1*}{#1*}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\EQ_overload_ams_end:n}
-% All but one of the aligned variations must be set to the original
-% \begin{macrocode}
-\def\EQ_overload_ams_end:n #1{%
- \MH_let:cc {endAmS#1}{endAmSalign}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{environment}{AmSequation}
-% \begin{environment}{AmSequation*}
-% \changes{v2.10}{2004/07/26}{Moved redefinitions to
-% \cs{AtBeginDocument} to give \pkg{hyperref} a chance}
-% Before we start redefining environments, we'll need a basic
-% \env{equation} environment that is not redefined.
-% \begin{macrocode}
-\AtBeginDocument{
- \EQ_overload_ams_begin:n {equation}
- \MH_let:cc {endAmSequation}{endequation}
- \MH_let:cc {endAmSequation*}{endequation*}
-% \end{macrocode}
-% \end{environment}
-% \end{environment}
-% Lets start overloading.
-% \begin{macrocode}
- \MH_if_boolean:nT {overload_ams}{
-% \end{macrocode}
-% \begin{macro}{\EQ_renew_ams_environment:n}
-% \changes{v2.10}{2004/07/26}{Disallow spaces before the optional
-% argument.}
-% Then we can renew the environments. Syntax is
-% \cs{begin}\marg{\AmS{} env}\oarg{markup}. Exception to this rule
-% is \env{alignat} (see further down).
-% \begin{macrocode}
- \def\EQ_renew_ams_environment:n #1{%
- \MaybeMHPrecedingSpacesOff
- \renewenvironment{#1}[1][]{%
-% \end{macrocode}
-% \changes{v2.13}{2013/02/11}{Adding \cs{eqref} fix}
-% Remember to add \cs{eqref} fix to the overloaded envs as well.
-% \begin{macrocode}
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{####1}}}}
- \setkeys{\EQ_options_name:}{##1}%
- \setkeys{EmphEqEnv}{AmS#1}%
- \EmphEqMainEnv
- }{\endEmphEqMainEnv}
- \MHPrecedingSpacesOn
- }
-% \end{macrocode}
-% \end{macro}
-% Add equation type: \emph{Must} have same number as original type!
-% \begin{macrocode}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSalign} {1}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSalign*} {2}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSgather} {3}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSgather*} {4}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSflalign} {5}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSflalign*}{6}
- \EQ_new_equationtype_arg:nnn {EmphEqEnv}{AmSalignat} {7}
- \EQ_new_equationtype_arg:nnn {EmphEqEnv}{AmSalignat*}{8}
-% \end{macrocode}
-% Then overload by saving the snapshots of the old definitions. We
-% do it via \cs{AtBeginDocument}, because a package like
-% \pkg{ntheorem} redefines \cs{endgather} etc.
-%
-% First the \env{gather} and \env{equation} families.
-% \begin{macrocode}
- \EQ_overload_ams_begin:n {gather}
- \MH_let:cc {endAmSgather}{endgather}
- \MH_let:cc {endAmSgather*}{endAmSgather}
- \EQ_renew_ams_environment:n {gather}
- \EQ_renew_ams_environment:n {gather*}
- \EQ_overload_ams_begin:n {equation}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv} {AmSequation}
- {AmSgather}{\EQ_disable_linebreak:}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSequation*}
- {AmSgather*}{\EQ_disable_linebreak:}
- \EQ_renew_ams_environment:n {equation}
- \EQ_renew_ams_environment:n {equation*}
-% \end{macrocode}
-% The \env{align} family.
-% \begin{macrocode}
- \EQ_overload_ams_begin:n {align}
- \MH_let:cc {endAmSalign}{endalign}
- \EQ_overload_ams_end:n {align*}
- \EQ_renew_ams_environment:n {align}
- \EQ_renew_ams_environment:n {align*}
-% \end{macrocode}
-% The \env{flalign} family.
-% \begin{macrocode}
- \EQ_overload_ams_begin:n {flalign}
- \EQ_overload_ams_end:n {flalign}
- \EQ_overload_ams_end:n {flalign*}
- \EQ_renew_ams_environment:n {flalign}
- \EQ_renew_ams_environment:n {flalign*}
-% \end{macrocode}
-% The \env{alignat} family.
-% \begin{macrocode}
- \EQ_overload_ams_begin:n {alignat}
- \EQ_overload_ams_end:n {alignat}
- \EQ_overload_ams_end:n {alignat*}
-% \end{macrocode}
-% \begin{macro}{\EQ_alignat_optional:w}
-% \changes{v2.10}{2004/07/26}{Disallow spaces before the optional
-% argument.}
-% \begin{environment}{alignat}
-% \begin{environment}{alignat*}
-% This one is a little different because we want a syntax like
-% \cs{begin\{alignat\}}\linebreak[0]\marg{cols}\oarg{markup}, so we
-% have to make a separate command for testing the trailing optional
-% argument.
-% \begin{macrocode}
- \MaybeMHPrecedingSpacesOff
- \newcommand*\EQ_alignat_optional:w [1][]{
- \setkeys{\EQ_options_name:}{#1}
- \EmphEqMainEnv}
- \MHPrecedingSpacesOn
-% \end{macrocode}
-% \changes{v2.13}{2013/02/11}{Adding \cs{eqref} fix}
-% Remember to add \cs{eqref} fix to the overloaded envs as well.
-% \begin{macrocode}
- \renewenvironment{alignat}[1]{
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{AmSalignat=#1}
- \EQ_alignat_optional:w}
- {\endEmphEqMainEnv}
- \renewenvironment{alignat*}[1]{%
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{AmSalignat*=#1}%
- \EQ_alignat_optional:w}%
- {\endEmphEqMainEnv}
-% \end{macrocode}
-% \end{environment}
-% \end{environment}
-% \end{macro}
-% \begin{macro}{\[}
-% \begin{macro}{\]}
-% Then restore \cs{[} and \cs{]}.
-% \begin{macrocode}
- \DeclareRobustCommand{\[}{\begin{AmSequation*}}
- \DeclareRobustCommand{\]}{\end{AmSequation*}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% Finally a string of aliases so that we can blend \opt{overload}
-% syntax with regular syntax.
-% \begin{macrocode}
- \MH_keyval_alias:nnn {EmphEqEnv}{gather} {AmSgather}
- \MH_keyval_alias:nnn {EmphEqEnv}{gather*} {AmSgather*}
- \MH_keyval_alias:nnn {EmphEqEnv}{align} {AmSalign}
- \MH_keyval_alias:nnn {EmphEqEnv}{align*} {AmSalign*}
- \MH_keyval_alias:nnn {EmphEqEnv}{flalign} {AmSflalign}
- \MH_keyval_alias:nnn {EmphEqEnv}{flalign*}{AmSflalign*}
- \MH_keyval_alias:nnn {EmphEqEnv}{alignat} {AmSalignat}
- \MH_keyval_alias:nnn {EmphEqEnv}{alignat*}{AmSalignat*}
- \MH_if_boolean:nT {good_mult}{
- \EQ_overload_ams_begin:n {multline}
- \MH_let:cc {endAmSmultline}{endmultline}
- \MH_let:cc {endAmSmultline*}{endAmSmultline}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline}
- {AmSgather}{\MH_set_boolean_T:n {outer_mult}}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline*}
- {AmSgather*}{\MH_set_boolean_T:n {outer_mult}}
- \EQ_renew_ams_environment:n {multline}
- \EQ_renew_ams_environment:n {multline*}
- }
-% \end{macrocode}
-% End of \opt{overload}. We go into \opt{overload2}\ldots This
-% is dangerous, but will probably work. The macro \cs{[} is now
-% fragile except if you're running \eTeX{} as engine for \LaTeX.
-% \begin{macrocode}
- \MH_if_boolean:nT {overload_amsII}{
- \MH_protected:\def\[#1\]{\begin{equation*} #1\end{equation*}}
-% \end{macrocode}
-% Then we add the \env{multline} family.
-% \begin{macrocode}
- \MH_if_boolean:nF {good_mult}{
- \EQ_overload_ams_begin:n {multline}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline}
- {AmSflalign}{\MH_set_boolean_T:n {multline}}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline*}
- {AmSflalign*}{\MH_set_boolean_T:n {multline}}
- \EQ_renew_ams_environment:n {multline}
- \EQ_renew_ams_environment:n {multline*}
- }
- }
- }
-}
-% \end{macrocode}
-% End of \cs{AtBeginDocument} additions.
-%
-% If we need to load \pkg{ntheorem} support this is where it
-% happens. Otherwise we just stop here.
-% \begin{macrocode}
-\if\g@EQ@ntheorem@support@bool
-\else
- \expandafter\endinput
-\fi
-% \end{macrocode}
-%
-% \section{Patching Things up for \pkg{ntheorem}}
-% \label{sec:impl:ntheorem}
-%
-% Although \pkg{ntheorem} provides a lot of useful features it
-% does however ruin things in the \pkg{amsmath} environments,
-% because of the alternative syntax of its \cs{label} command.
-% \begin{macro}{\default_raisetag}
-% \begin{macro}{\raisetag}
-% \begin{macro}{\raise@tag}
-% \changes{v1.06}{2004/03/13}{Fixed \pkg{amsmath} bug \# 3624}
-% This corrects a bug\footnote{See
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=amslatex/3624}}
-% in \pkg{amsmath} that could cause tags to cross page boundaries
-% without warning. The \cs{nobreak} is the addition.
-% \begin{macrocode}
-\def\default_raisetag:{\nobreak}
-\def\raisetag#1{
- \skip@#1\relax
- \xdef\raise@tag{\default_raisetag:
- \vskip\iftagsleft@\else:-\fi:\the\skip@\relax}}
-\MH_let:NwN\raise@tag\default_raisetag:
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\displ@y@}
-% Patch it so that it doesn't set \cs{raise@tag} to \cs{@empty}
-% globally.
-% \begin{macrocode}
-\def\displ@y@{\@display@init{%
- \global\column@\z@ \global\dspbrk@lvl\m@ne
- \global\tag@false \global\MH_let:NwN\raise@tag\default_raisetag:
-}}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_gobblelabel:w}
-% \changes{v2.00}{2004/04/14}{Added \cs{MT_gobblelabel:w}}
-% \begin{macro}{\EQ_gobbleoptional:w}
-% \changes{v2.00}{2004/04/14}{Added \cs{EQ_gobbleoptional:w}}
-% Macros for gobbling the `unorthodox' \cs{label} syntax of
-% \pkg{ntheorem}. Also overrides the normal \cs{label}-gobbling.
-% \begin{macrocode}
-\def\MT_gobblelabel:w #1{\@ifnextchar[{\EQ_gobbleoptional:w}{}}
-\def\EQ_gobbleoptional:w [#1]{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \subsection{Fixing \env{gather}}
-% The measuring phase of \env{gather} is patched by letting
-% \cs{label} be a copy of the internal \cs{MT_gobblelabel:w}
-% instead of \cs{@gobble}.
-% \begin{macrocode}
-\def\gmeasure@#1{%
- \begingroup
- \measuring@true
- \totwidth@\z@
- \global\MH_let:NwN\tag@lengths\@empty
- \savecounters@
- \setbox\@ne\vbox{%
- \everycr{\noalign{\global\tag@false
-% \end{macrocode}
-% The patch for \cs{raisetag}.
-% \begin{macrocode}
- \global\MH_let:NwN\raise@tag\default_raisetag:
- \global\column@\z@}}%
-% \end{macrocode}
-% The patch for \cs{label}.
-% \begin{macrocode}
- \MH_let:NwN\label\MT_gobblelabel:w
- \halign{%
- \setboxz@h{$\m@th\displaystyle{##}$}%
- \if_dim:w \wdz@>\totwidth@
- \global\totwidth@\wdz@
- \fi:
- &\setboxz@h{\strut@{##}}%
- \savetaglength@
- \crcr
- #1%
- \math@cr@@@
- }%
- }%
- \restorecounters@
- \if@fleqn
- \global\advance\totwidth@\@mathmargin
- \fi:
- \iftagsleft@
- \if_dim:w \totwidth@>\displaywidth
- \global\MH_let:NwN\gdisplaywidth@\totwidth@
- \else:
- \global\MH_let:NwN\gdisplaywidth@\displaywidth
- \fi:
- \fi:
- \endgroup
-}
-% \end{macrocode}
-%
-% \subsection{Fixing \env{align}, \env{alignat}, and \env{flalign}}
-% Just copy the definition of \cs{measure@} from \pkg{amsmath} and
-% change one (1!) line like we did for \env{gather}.
-% \begin{macrocode}
-\def\measure@#1{%
- \begingroup
- \measuring@true
- \global\eqnshift@\z@
- \global\alignsep@\z@
- \global\MH_let:NwN\tag@lengths\@empty
- \global\MH_let:NwN\field@lengths\@empty
- \savecounters@
- \global\setbox0\vbox{%
- \MH_let:NwN\math@cr@@@\math@cr@@@align@measure
- \everycr{\noalign{\global\tag@false
-% \end{macrocode}
-% The patch for \cs{raisetag}.
-% \begin{macrocode}
- \global\MH_let:NwN\raise@tag\default_raisetag:
- \global\column@\z@}}%
-% \end{macrocode}
-% The patch.
-% \begin{macrocode}
- \MH_let:NwN\label\MT_gobblelabel:w
- \global\row@\z@
- \tabskip\z@
- \halign{\span\align@preamble\crcr
- #1%
- \math@cr@@@
- \global\column@\z@
- \add@amps\maxfields@\cr
- }%
- }%
- \restorecounters@
- \ifodd\maxfields@
- \global\advance\maxfields@\@ne
- \fi:
- \if_num:w \xatlevel@=\tw@
- \if_num:w \maxfields@<\thr@@
- \MH_let:NwN\xatlevel@\z@
- \fi:
- \fi:
- \setbox\z@\vbox{%
- \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox
- }%
- \global\totwidth@\wd\@ne
- \if@fleqn \global\advance\totwidth@\@mathmargin \fi:
- \global\MH_let:NwN\maxcolumn@widths\@empty
- \begingroup
- \MH_let:NwN\or:\relax
- \loop
- \global\setbox\@ne\hbox{%
- \unhbox\@ne \unskip \global\setbox\thr@@\lastbox
- }%
- \ifhbox\thr@@
- \xdef\maxcolumn@widths{ \or: \the\wd\thr@@ \maxcolumn@widths}%
- \repeat
- \endgroup
- \dimen@\displaywidth
- \advance\dimen@-\totwidth@
- \if_case:w \xatlevel@
- \global\alignsep@\z@
- \MH_let:NwN\minalignsep\z@
- \@tempcntb\z@
- \if@fleqn
- \@tempcnta\@ne
- \global\eqnshift@\@mathmargin
- \else:
- \@tempcnta\tw@
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \fi:
- \or:
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \@tempcnta\@tempcntb
- \advance\@tempcntb\m@ne
- \if@fleqn
- \global\eqnshift@\@mathmargin
- \global\alignsep@\dimen@
- \global\divide\alignsep@\@tempcnta
- \else:
- \global\advance\@tempcnta\@ne
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \global\alignsep@\eqnshift@
- \fi:
- \or:
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \global\advance\@tempcntb\m@ne
- \global\@tempcnta\@tempcntb
- \global\eqnshift@\z@
- \global\alignsep@\dimen@
- \if@fleqn
- \global\advance\alignsep@\@mathmargin\relax
- \fi:
- \global\divide\alignsep@\@tempcntb
- \fi:
- \if_dim:w \alignsep@<\minalignsep\relax
- \global\alignsep@\minalignsep\relax
- \if_dim:w \eqnshift@>\z@
- \if@fleqn\else:
- \global\eqnshift@\displaywidth
- \global\advance\eqnshift@-\totwidth@
- \global\advance\eqnshift@-\@tempcntb\alignsep@
- \global\divide\eqnshift@\tw@
- \fi:
- \fi:
- \fi:
- \if_dim:w \eqnshift@<\z@
- \global\eqnshift@\z@
- \fi:
- \calc@shift@align
- \global\tagshift@\totwidth@
- \global\advance\tagshift@\@tempcntb\alignsep@
- \if@fleqn
- \if_num:w \xatlevel@=\tw@
- \global\advance\tagshift@-\@mathmargin\relax
- \fi:
- \else:
- \global\advance\tagshift@\eqnshift@
- \fi:
- \iftagsleft@ \else:
- \global\advance\tagshift@-\displaywidth
- \fi:
- \dimen@\minalignsep\relax
- \global\advance\totwidth@\@tempcntb\dimen@
- \if_dim:w \totwidth@>\displaywidth
- \global\MH_let:NwN\displaywidth@\totwidth@
- \else:
- \global\MH_let:NwN\displaywidth@\displaywidth
- \fi:
- \endgroup
-}
-% \end{macrocode}
-%
-% \subsection{Fixing \env{multline}}
-% \begin{macro}{\EQ_multline_labelhack:n}
-% \begin{macro}{\EQ_multline_labelhack_opt:nw}
-% As \pkg{ntheorem} defines \cs{label} to have the syntax
-% \cs{label}\marg{label}\oarg{name}, we need to make sure that it
-% has that inside \env{multline} as well. Especially since the
-% measuring phase of \env{multline} \emph{defines} \cs{label} as
-% well.
-% \begin{macrocode}
-\def\EQ_multline_labelhack:n #1{%
- \begingroup\measuring@false\label@in@display{#1}\endgroup}
-\def\EQ_multline_labelhack_opt:nw #1[#2]{%
- \begingroup\measuring@false\label@in@display{#1}[#2]\endgroup}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\multline@}
-% Patching \env{multline} takes more work because it does its
-% processing differently, so we need to apply hooks twice: One in
-% the measuring phase \cs{mmeasure@} where \cs{label} is redefined
-% and one in the production phase \cs{multline@} where the ordinary
-% \cs{label} is gobbled (we use \cs{MT_gobblelabel:w} as
-% before). First the typesetting phase.
-% \begin{macrocode}
-\def\multline@#1{%
- \Let@
- \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
- \chardef\dspbrk@context\z@
- \restore@math@cr
- \MH_let:NwN\tag\tag@in@align
-% \end{macrocode}
-% The patch for \cs{raisetag}.
-% \begin{macrocode}
- \global\tag@false \global\MH_let:NwN\raise@tag\default_raisetag:
- \mmeasure@{#1}%
- \MH_let:NwN\tag\gobble@tag
-% \end{macrocode}
-% The patch.
-% \begin{macrocode}
- \MH_let:NwN\label\MT_gobblelabel:w
- \tabskip \if@fleqn \@mathmargin \else: \z@skip \fi:
- \totwidth@\displaywidth
- \if@fleqn
- \advance\totwidth@-\@mathmargin
- \fi:
- \halign\bgroup
- \hbox to\totwidth@{%
- \if@fleqn
- \hskip \@centering \relax
- \else:
- \hfil
- \fi:
- \strut@
- $\m@th\displaystyle{}##\endmultline@math%$
- \hfil
- }%
- \crcr
- \if@fleqn
- \hskip-\@mathmargin
- \def\multline@indent{\hskip\@mathmargin}% put it back
- \else:
- \hfilneg
- \def\multline@indent{\hskip\multlinegap}%
- \fi:
- \iftagsleft@
- \iftag@
- \begingroup
- \ifshifttag@
- \rlap{\vbox{%
- \normalbaselines
- \hbox{%
- \strut@
- \make@display@tag
- }%
- \vbox to\lineht@{}%
- \raise@tag
- }}%
- \multline@indent
- \else:
- \setbox\z@\hbox{\make@display@tag}%
- \dimen@\@mathmargin \advance\dimen@-\wd\z@
- \if_dim:w \dimen@<\multlinetaggap
- \dimen@\multlinetaggap
- \fi:
- \box\z@ \hskip\dimen@\relax
- \fi:
- \endgroup
- \else:
- \multline@indent
- \fi:
- \else:
- \multline@indent
- \fi:
- #1%
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\mmeasure@}
-% Then redefine the label correctly.
-% \begin{macrocode}
-\def\mmeasure@#1{%
- \begingroup
- \measuring@true
-% \end{macrocode}
-% The patch.
-% \begin{macrocode}
- \def\label##1{%
- \@ifnextchar[
- {\EQ_multline_labelhack_opt:nw {##1}}
- {\EQ_multline_labelhack:n {##1}}
- }
- \def\math@cr@@@{\cr}%
- \MH_let:NwN\shoveleft\@iden \MH_let:NwN\shoveright\@iden
- \savecounters@
- \global\row@\z@
- \setbox\@ne\vbox{%
- \global\MH_let:NwN\df@tag\@empty
- \halign{%
- \setboxz@h{\@lign$\m@th\displaystyle{}##$}%
- \iftagsleft@
- \if_num:w \row@=\@ne
- \global\totwidth@\wdz@
- \global\lineht@\ht\z@
- \fi:
- \else:
- \global\totwidth@\wdz@
- \global\lineht@\dp\z@
- \fi:
- \crcr
- #1%
- \crcr
- }%
- }%
- \if_meaning:NN
- \df@tag\@empty
- \else:
- \global\tag@true
- \fi:
- \if@eqnsw\global\tag@true\fi:
- \iftag@
- \setboxz@h{%
- \if@eqnsw
- \stepcounter{equation}%
- \tagform@\theequation
- \else:
- \df@tag
- \fi:
- }%
- \global\tagwidth@\wdz@
- \dimen@\totwidth@
- \advance\dimen@\tagwidth@
- \advance\dimen@\multlinetaggap
- \iftagsleft@\else:
- \if@fleqn
- \advance\dimen@\@mathmargin
- \fi:
- \fi:
- \if_dim:w \dimen@>\displaywidth
- \global\shifttag@true
- \else:
- \global\shifttag@false
- \fi:
- \fi:
- \restorecounters@
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Setting End Marks Correctly}
-%
-% \begin{macro}{\mintagvsep}
-% \changes{v1.05}{2004/02/16}{Introduced \cs{mintagvsep} to
-% support the \pkg{ntheorem} package}
-% \begin{macro}{\EQ_only_endmark:}
-% \changes{v1.05}{2004/02/16}{Introduced \cs{EQ_only_endmark:}
-% to support the \pkg{ntheorem} package}
-% \changes{v2.11}{2004/08/03}{Make sure the tag is printed even with the
-% \pkg{mathtools} key \key{showonlyrefs} activated}
-% \begin{macro}{\EQ_tag_plus_endmark:}
-% \changes{v1.05}{2004/02/16}{Introduced
-% \cs{EQ_tag_plus_endmark:} to support the \pkg{ntheorem} package}
-% \pkg{ntheorem} provides an extension to the theorem environment
-% and also supports automatic end of theorem marks. To do so it must
-% redefine parts of the \pkg{amsmath} code and it eventually ends up
-% in problems when the tags and the marker are all typeset at the
-% right margin.
-%
-% There are basically two different possibilities:
-% \begin{center}\hfill
-% \unitlength2.5pt \thicklines
-% \begin{picture}(60,45)(0,25)
-% \put(0,50){\framebox(25,20){Math Height}}
-% \put(0,25){\framebox(25,25){Math Depth}}
-% \put(40,50){\framebox(20,10){Tag height}}
-% \put(40,45){\framebox(20,5){Tag depth}}
-% \put(40,25){\framebox(20,10){Marker}}
-% \put(50,35){\vector(0,1){10}}
-% \put(50,45){\vector(0,-1){10}}
-% \put(50,39){\ \ $\delta>0$}
-% \multiput(26,25)(2,0){7}{\line(1,0){1}}
-% \end{picture} \hfill\vrule\hfill
-% \begin{picture}(60,45)(0,25)
-% \put(0,50){\framebox(25,20){Math Height}}
-% \put(0,40){\framebox(25,10){Math Depth}}
-% \put(40,50){\framebox(20,10){Tag height}}
-% \put(40,45){\framebox(20,5){Tag depth}}
-% \put(40,28){\framebox(20,10){Marker}}
-% \put(50,38){\vector(0,1){7}}
-% \put(50,45){\vector(0,-1){7}}
-% \put(50,40){\ \ $\delta=0$}
-% \end{picture}\hfill\mbox{}
-% \end{center}
-% Let's look closer at this. $h_M$ is the height of the end of
-% theorem marker, which we'll try to place so that its baseline
-% aligns with the bottom of the math display. $d_D$ is the depth of
-% the the last line of the math display including the depth of the
-% surrounding boxes while $d_T$ is the depth of the tag. Also we let
-% $m$ denote the minimum vertical distance between tag and marker
-% and $\delta$ is some positive length that may be added to $m$
-% depending on the other values. To ensure a ``proper'' placement of
-% the marker we simply test the inequality
-% \begin{gather}
-% h_M + d_T + m > d_D \label{eq:tag_placement}
-% \end{gather}
-% If the test is true we're done and just have to set the marker so
-% that the top of it is placed at a distance of $m$ from the bottom
-% of the tag. If it's not we can safely put the marker at the bottom
-% of the display.
-% \begin{macrocode}
-\newlength\mintagvsep
-\mintagvsep5pt
-\def\EQ_only_endmark:{%
- \MH_set_boolean_T:n {show_manual_tags}
- \global\tag@true
- \iftagsleft@
- \gdef\df@tag{%
- \hbox to \displaywidth{%
- \hss
-% \end{macrocode}
-% If the tags are set to the left we just have to lower the end mark
-% by the total depth of the display including its surrounding box.
-% Also we have to take care of \cs{normallineskip}.
-% \begin{macrocode}
- \raisebox{-\normallineskip
- -\depthof{\EQ_outerbox:{}}
- -\heightof{\EQ_outerbox:{}}
- -\dp\EQ_mathdisplay_box
- -\ht\EQ_mathdisplay_box}
- [0pt][0pt]{\PotEndMark{\maketag@@@}}}}
- \else:
- \gdef\df@tag{%
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}
- {\PotEndMark{\maketag@@@}}}%
- \fi:}
-% \end{macrocode}
-% \changes{v2.00}{2004/04/14}{Fixed another bug in placement of the
-% marker}
-% \changes{v2.10}{2004/07/26}{Fixed horizontal spacing in \env{equation}}
-% In v2.00 I fixed another bug I had overlooked. This is getting
-% embarrassing. The outer box must be taken into account as well.
-% \begin{macrocode}
-\def\EQ_tag_plus_endmark:{%
- \iftagsleft@
- \gdef\maketag@@@##1{%
-% \end{macrocode}
-% The following fixes a bug when there is a wide tag in an
-% \env{equation} environment and was reported by Bernard
-% Alfonsi.\footnote{\email{alfonsi@math.u-psud.fr}} The problem
-% arises when \pkg{ntheorem} tries to typeset a tag and an end mark,
-% because the tag is set at the left margin and the end mark at the
-% right margin and \pkg{ntheorem} over-simplifies this and forgets
-% to take the displayed math into account! The right solution is to
-% wrap the tag in a box of the correct size, namely |\widthof{##1}|
-% and then push the end mark to the right margin. Then the displayed
-% math is set correcly.
-% \begin{macrocode}
- \hfuzz\displaywidth
- \makebox[\widthof{##1}][l]{%
- \hbox to \displaywidth{\m@th\normalfont##1\hss
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}
- {\PotEndMark{\hss}}}}}%
- \else:
- \gdef\maketag@@@##1{%
- \hbox{\m@th\normalfont##1\llap{\hss\PotEndMark{%
- \settoheight{\@tempdima}{\@nameuse{\InTheoType Symbol}}%
- \MH_addtolength:dn \@tempdima
- {\g_EQ_bottomtag_depth_dim+\mintagvsep}
- \setlength{\@tempdimb}
- {\g_EQ_bottomrow_depth_dim+\depthof{\EQ_outerbox:{}}
- +\depthof{\EQ_innerbox:{}}}
- \if_dim:w \@tempdima>\@tempdimb
- \MH_setlength:dn \@tempdima{-\dp\EQ_mathdisplay_box
- -\@tempdima+\g_EQ_bottomrow_depth_dim}
- \addtolength{\@tempdima}{\depthof{\EQ_innerbox:{}}}%
- \def\EQ_next:{\raisebox{\@tempdima}}%
- \else:
-% \end{macrocode}
-% \changes{v1.06}{2004/03/13}{Fixed bug in placement of the marker
-% and re-arranged some code}
-% In v1.06 I fixed a stupid bug regarding placement of the marker.
-% If I had done a proper test I would have discovered it
-% immediately!
-% \begin{macrocode}
- \def\EQ_next:{
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}}%
- \fi:\EQ_next:}}}}%
- \fi:}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\MT_nonumber:}
-% \begin{macrocode}
-\MH_let:NwN \MT_nonumber: \nonumber
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\nonumber}
-% Redefine \cs{nonumber} to reset depth of bottom tag.
-% \begin{macrocode}
-\def\g_EQ_latest_nonzerodepth_row_fint{\z@}
-\renewcommand*\nonumber{
- \@tempcnta=\row@
- \if_num:w \l_EQ_equationtype_int=\thr@@
- \advance\@tempcnta\m@ne
- \else:
- \if_num:w \l_EQ_equationtype_int=4\relax
- \advance\@tempcnta\m@ne
- \fi:
- \fi:
- \if_num:w \g_EQ_latest_nonzerodepth_row_fint=\@tempcnta
- \else:
- \global\g_EQ_bottomtag_depth_dim=-\baselineskip
- \fi:
- \MT_nonumber:
-}
-% \end{macrocode}
-% \end{macro}
-%
-% End of \pkg{ntheorem} patches and package.
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-% Finale
-\endinput
diff --git a/Master/texmf-dist/source/latex/mh/flexisym.dtx b/Master/texmf-dist/source/latex/mh/flexisym.dtx
deleted file mode 100644
index 587210590e5..00000000000
--- a/Master/texmf-dist/source/latex/mh/flexisym.dtx
+++ /dev/null
@@ -1,1604 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 1997-2003 by Michael J. Downes
-% 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
-% 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, Will Robertson and Joseph Wright.
-%
-% This work consists of the main source file flexisym.dtx
-% and the derived files
-% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/flexisym.dtx
-% CTAN:macros/latex/contrib/mh/flexisym.pdf
-%
-% Unpacking:
-% (a) If flexisym.ins is present:
-% tex flexisym.ins
-% (b) Without flexisym.ins:
-% tex flexisym.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{flexisym.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If flexisym.drv is present:
-% latex flexisym.drv
-% (b) Without flexisym.drv:
-% latex flexisym.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex flexisym.dtx
-% makeindex -s gind.ist flexisym.idx
-% pdflatex flexisym.dtx
-% makeindex -s gind.ist flexisym.idx
-% pdflatex flexisym.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/flexisym.sty
-% TDS:tex/latex/mh/cmbase.sym
-% TDS:tex/latex/mh/mathpazo.sym
-% TDS:tex/latex/mh/mathptmx.sym
-% TDS:tex/latex/mh/msabm.sym
-% TDS:doc/latex/mh/flexisym.pdf
-% TDS:source/latex/mh/flexisym.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: flexisym 2010/09/17 v0.97b Flexisym (MH)}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 1997-2003 by Michael J. Downes
-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
-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, Will Robertson and Joseph Wright.
-
-This work consists of the main source file flexisym.dtx
-and the derived files
- flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
- cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-
-\endpreamble
-
-\generate{%
- \file{flexisym.ins}{\from{flexisym.dtx}{install}}%
- \file{flexisym.drv}{\from{flexisym.dtx}{driver}}%
- \usedir{tex/latex/mh}%
- \file{flexisym.sty}{\from{flexisym.dtx}{package}}%
- \file{cmbase.sym}{\from{flexisym.dtx}{cmbase}}%
- \file{mathpazo.sym}{\from{flexisym.dtx}{mathpazo}}%
- \file{mathptmx.sym}{\from{flexisym.dtx}{mathptmx}}%
- \file{msabm.sym}{\from{flexisym.dtx}{msabm}}%
-}
-
-\obeyspaces
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* files into a directory searched by TeX:}
-\Msg{*}
-\Msg{* flexisym.sty, cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym}
-\Msg{*}
-\Msg{* To produce the documentation run the file `flexisym.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{flexisym.drv}%
- [2010/09/17 v0.97b flexisym (MH)]
-\documentclass{ltxdoc}
-\CodelineIndex
-\EnableCrossrefs
-\setcounter{IndexColumns}{2}
-%\providecommand*\meta[1]{\ensuremath\langle\textit{#1}\ensuremath\rangle}
-\providecommand*\pkg[1]{\textsf{#1}}
-\providecommand*\cls[1]{\textsf{#1}}
-\providecommand*\opt[1]{\texttt{#1}}
-\providecommand*\env[1]{\texttt{#1}}
-\providecommand*\fn[1]{\texttt{#1}}
-\makeatletter
-\providecommand{\AmS}{{\protect\AmSfont
- A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}}
-\providecommand{\AmSfont}{%
- \usefont{OMS}{cmsy}{\if\expandafter\@car\f@series\@nil bb\else m\fi}{n}}
-\makeatother
-\newenvironment{aside}{\begin{quote}\bfseries}{\end{quote}}
-\begin{document}
- \DocInput{flexisym.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \title{The \textsf{flexisym} package}
-% \date{2008/08/08 v0.97a}
-% \author{Morten H\o gholm \\Maintainers: \texttt{mh.ctan@gmail.com}}
-%
-% \maketitle
-%
-% \part*{User's guide}
-%
-% For now, the user's guide is in breqn.
-%
-% \StopEventually{}
-% \part*{Implementation}
-%
-% \section{flexisym}
-%
-% \begin{macrocode}
-%<*package>
-\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2013/03/16}{0.97c}{Make math characters macros}
-
-\edef\do{%
- \noexpand\AtEndOfPackage{%
- \catcode\number`\"=\number\catcode`\"
- \relax
- }%
-}
-\do \let\do\relax
-\catcode`\"=12
-\let\@sym\@gobble
-\DeclareOption{robust}{%
- \def\@sym#1{%
- \ifx\protect\@typeset@protect \else\protect#1\exp_after:wN\use_none:nnnn\fi
- }%
-}
-% \end{macrocode}
-% The math groups (mg) here relate to |\textfont|$n$.
-% \begin{macrocode}
-\def\mg@bin{2}% binary operators
-\def\mg@rel{2}% relations
-%%\def\mg@nre{B}% negated relations
-\def\mg@del{3}% delimiters
-%%\def\mg@arr{B}% arrows
-\def\mg@acc{0}% accents
-\def\mg@cop{3}% cumulative operators (sum, int)
-\def\mg@latin{1}% (Latin) letters
-\def\mg@greek{1}% (lowercase) Greek
-\def\mg@Greek{0}% (capital) Greek
-%%\def\mg@bflatin{4}% bold upright Latin letters ?
-%%\def\mg@Bbb{B}% blackboard bold
-\def\mg@cal{2}% script/calligraphic
-%%\def\mg@frak{5}% Fraktur letters
-\def\mg@digit{0}% decimal digits % 1 = oldstyle, 0 = capital
-% \end{macrocode}
-% This is how we insert mathchars. The command has three arguments:
-% class, fam and slot postion and so it is always given as
-% hexadecimal. This way of separating things should make it easier
-% to get this to work with XeTeX et al.\ which have many more slot
-% positions
-% \begin{macrocode}
-\cs_set_protected:Nn \math_char:NNn {
- \tex_mathchar:D \__int_eval:w " #1#2#3 \__int_eval_end:
-}
-% \end{macrocode}
-% Delimiters and radicals are similar except here we have both small
-% and large variant. Radicals have no class.
-% \begin{macrocode}
-\cs_set_protected:Nn \math_delimiter:NNnNn {
- \tex_delimiter:D \__int_eval:w " #1#2#3#4#5 \__int_eval_end:
-}
-\cs_set_protected:Nn \math_radical:NnNn {
- \tex_radical:D \__int_eval:w " #1#2#3#4 \__int_eval_end:
-}
-\cs_set_protected:Nn \math_accent:NNnn {
- \tex_mathaccent:D \__int_eval:w " #1 #2 #3 \__int_eval_end: {#4}
-}
-
-\let\sumlimits\displaylimits
-\let\intlimits\nolimits
-\let\namelimits\displaylimits
-% \end{macrocode}
-% \TeX\ defines eight types of atoms.
-% \begin{enumerate}\addtocounter{enumi}{-1}
-% \item Ordinary
-% \item Operators
-% \item Binary
-% \item Relation
-% \item Open
-% \item Close
-% \item Punctuation
-% \item Inner
-% \end{enumerate}
-% \TeX\ defines eight math classes.
-% \begin{enumerate}\addtocounter{enumi}{-1}
-% \item Ordinary
-% \item Operators
-% \item Binary
-% \item Relation
-% \item Open
-% \item Close
-% \item Punctuation
-% \item Variable family
-% \end{enumerate}
-% flexisym/breqn extends this to types of classes.
-% \begin{enumerate}\addtocounter{enumi}{-1}
-% \item Ordinary: (Ord), Bidirectional delimiters (DeB), Radicals
-% (Rad), Accented items (Acc)
-% \item Operators: Cumulative Operators sum-like (COs), Cumulative
-% Operators integral-like (COi)
-% \item Binary: (Bin)
-% \item Relation: (Rel), Arrow delimiters (DeA)
-% \item Open: (DeL)
-% \item Close (DeR)
-% \item Punctuation: (Pun)
-% \item Variable family: (Var)
-% \end{enumerate}
-%
-% Here's an overview of what we are about to do. Math chars of each
-% type as defined by us need a basic operation for inserting it. We
-% will call that function |\math_bsym_|\meta{type}|:Nn|. Next there
-% are compund symbols for each type which we name
-% |\math_bcsym_|\meta{type}|:Nn|. Also, there is inline mode and
-% display mode which are different. We will call them for
-% |\math_isym_|\meta{type}|:Nn| |\math_icsym_|\meta{type}|:Nn| for
-% inline mode and |\math_dsym_|\meta{type}|:Nn| and
-% |\math_dcsym_|\meta{type}|:Nn|. The code uses the terms
-% |\math_sym_|\meta{type}|:Nn| and |\math_csym_|\meta{type}|:Nn| for
-% the current meaning of things. First up the basic definitions. |#1|
-% is the math group it is from and |#2| is the slot position.
-% \begin{macrocode}
-\cs_new:Npn \math_bsym_Ord:Nn {\math_char:NNn 0 }% \m@Ord
-\cs_new:Npn \math_bsym_Var:Nn {\math_char:NNn 7 }% \m@Var
-\cs_new:Npn \math_bsym_Bin:Nn {\math_char:NNn 2}% \m@Bin
-\cs_new:Npn \math_bsym_Rel:Nn {\math_char:NNn 3 }% \m@Bin
-\cs_new:Npn \math_bsym_Pun:Nn {\math_char:NNn 6 }%\m@Pun
-\cs_new:Nn \math_bsym_COs:Nn { \math_char:NNn 1#1{#2} \sumlimits}% \m@COs
-\cs_new:Nn \math_bsym_COi:Nn { \math_char:NNn 1#1{#2} \intlimits}% \m@COi
-\cs_new:Nn \math_bsym_DeL:Nn { \math_sd_del_aux:Nnn 4 #1{#2} }%\m@DeL
-\cs_new:Nn \math_bsym_DeR:Nn { \math_sd_del_aux:Nnn 5 #1{#2} } %\m@DeR
-\cs_new:Nn \math_bsym_DeB:Nn { \math_sd_del_aux:Nnn 0 #1{#2} }%\m@DeB
-\cs_new:Nn \math_bsym_DeA:Nn { \math_sd_del_aux:Nnn 3 #1{#2} }%\m@DeA
-\cs_new:Nn \math_bsym_Rad:Nn { \math_sd_rad_aux:Nn #1{#2} }%\m@Rad
-\cs_new:Npn \math_bsym_Acc:Nn #1#2#3#4 {\math_accent:NNnn #1#2{#3}{#4}}% name is wrong
-
-% \end{macrocode}
-% Next is somewhat complicated internally. The way it is done is that
-% delimiters and radicals need information about the smallest version
-% of the symbol. If this smallest delimiter (SD) is defined, then use
-% it. We have these functions to help us return the number. Extract
-% the numbers to use and stick a function in front of it.
-%
-% Code changed because now we require the smallest delimiter to be
-% defined (it may be the same, no problem in that). So the two
-% arguments present in |\math_bsym_DeL:Nn| are the location of
-% extensible version (where the font will do the rest for us
-% automatically). For each delimiter, a pointer is defined using the
-% extensible characters family and slot as name and value equal to
-% family and position of the smallest version. For |(| in standard
-% \LaTeX\ this is |{del}{00}| and |{OT1}{28}| respectively. Hence,
-% |\math_bsym_DeL:Nn \mg@del {00}| must expand to
-% |\math_delimiter:NNnNn 4 \mg@OT1 {28}\mg@del{00}|. So first expand
-% away to get to the smallest version. Then call next function which
-% shuffles the arguments around.
-% \begin{macrocode}
-\cs_set:Npn \math_sd_del_aux:Nnn #1#2#3{
- \exp_args:Nf \math_sd_del_auxi:nN {\use:c{sd@#2#3}} #1 #2{#3}
-}
-\cs_set:Npn \math_sd_del_auxi:nN #1#2{ \math_delimiter:NNnNn #2 #1 }
-% \end{macrocode}
-% Same for radicals.
-% \begin{macrocode}
-\cs_set:Npn \math_sd_rad_aux:Nn #1#2{
- \exp_args:Nf \math_sd_rad_auxi:n {\use:c{sd@#1#2}} #1 {#2}
-}
-\cs_set:Npn \math_sd_rad_auxi:n #1{ \math_radical:NnNn #1 }
-
-
-% \cs_set:Npn \math_sd_aux:nn #1#2 {
-% %\exp_args:Nnf \use:nn { #1} { \math_sd_auxi:Nn #2 }
-% \exp_args:Nnf \use:nn { #1} { \use:c{sd@\use:nn#2} }
-% }
-% \cs_set:Npn \math_sd_auxi:Nn #1#2 {
-% \cs_if_free:cTF {sd@#1#2}
-% { #1{#2} }
-% { \use:c{sd@#1#2} }
-% }
-% \end{macrocode}
-% compound symbols here
-% \begin{macrocode}
-\cs_set_protected:Npn \math_bcsym_Ord:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symOrd
-\cs_set_protected:Npn \math_bcsym_Var:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Bin:Nn #1#2{\@symtype\mathbin{\OrdSymbol{#2}}}%\@symBin
-\cs_set_protected:Npn \math_bcsym_Rel:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symRel
-\cs_set_protected:Npn \math_bcsym_Pun:Nn #1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}%\@symPun
-\cs_set_protected:Npn \math_bcsym_COi:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\intlimits}}%\@symCOi
-\cs_set_protected:Npn \math_bcsym_COs:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\sumlimits}}%\@symCOs
-\cs_set_protected:Npn \math_bcsym_DeL:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symDeL
-\cs_set_protected:Npn \math_bcsym_DeR:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symDeR
-\cs_set_protected:Npn \math_bcsym_DeB:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symDeB
-\cs_set_protected:Npn \math_bcsym_DeA:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symDeA
-\cs_set_protected:Npn \math_bcsym_Acc:Nn {\@sym}%\@symAcc FIX!
-% These three?
-\cs_set_protected:Npn \math_bcsym_Ope:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Clo:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Inn:Nn #1#2{\@symtype\mathinner{\OrdSymbol{#2}}}%\@symVar
-
-\let\@symtype\@firstofone
-\let\sym@global\global
-% \end{macrocode}
-%
-%
-%
-%
-% The inline variants, using the basic operations. Currently we do not
-% do anything to inline math.
-% \begin{macrocode}
-\cs_new:Npn \math_isym_Ord:Nn {\math_bsym_Ord:Nn }% \m@Ord
-\cs_new:Npn \math_isym_Var:Nn {\math_bsym_Var:Nn }% \m@Var
-\cs_new:Npn \math_isym_Bin:Nn {\math_bsym_Bin:Nn}% \m@Bin
-\cs_new:Npn \math_isym_Rel:Nn {\math_bsym_Rel:Nn }% \m@Bin
-\cs_new:Npn \math_isym_Pun:Nn {\math_bsym_Pun:Nn }%\m@Pun
-\cs_new:Npn \math_isym_COs:Nn {\math_bsym_COs:Nn}% \m@COs
-\cs_new:Npn \math_isym_COi:Nn {\math_bsym_COi:Nn}% \m@COi
-\cs_new:Npn \math_isym_DeL:Nn {\math_bsym_DeL:Nn}%\m@DeL
-\cs_new:Npn \math_isym_DeR:Nn{ \math_bsym_DeR:Nn}%\m@DeR
-\cs_new:Npn \math_isym_DeB:Nn{ \math_bsym_DeB:Nn }%\m@DeB
-\cs_new:Npn \math_isym_DeA:Nn { \math_bsym_DeA:Nn }%\m@DeA
-\cs_new:Npn \math_isym_Rad:Nn { \math_bsym_Rad:Nn}%\m@Rad
-\cs_new:Npn \math_isym_Acc:Nn {\math_bsym_DeL:Nn}% name is wrong
-% inline compound
-\cs_set_protected:Npn \math_icsym_Ord:Nn {\math_bcsym_Ord:Nn}
-\cs_set_protected:Npn \math_icsym_Var:Nn {\math_bcsym_Var:Nn}
-\cs_set_protected:Npn \math_icsym_Bin:Nn {\math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_icsym_Rel:Nn {\math_bcsym_Rel:Nn}
-\cs_set_protected:Npn \math_icsym_Pun:Nn {\math_bcsym_Pun:Nn}
-\cs_set_protected:Npn \math_icsym_COi:Nn {\math_bcsym_COi:Nn}
-\cs_set_protected:Npn \math_icsym_COs:Nn {\math_bcsym_COs:Nn}
-\cs_set_protected:Npn \math_icsym_DeL:Nn {\math_bcsym_DeL:Nn}
-\cs_set_protected:Npn \math_icsym_DeR:Nn {\math_bcsym_DeR:Nn}
-\cs_set_protected:Npn \math_icsym_DeB:Nn {\math_bcsym_DeB:Nn}
-\cs_set_protected:Npn \math_icsym_DeA:Nn {\math_bcsym_DeA:Nn}
-\cs_set_protected:Npn \math_icsym_Acc:Nn {\math_bcsym_Acc:Nn}
-\cs_set_protected:Npn \math_icsym_Ope:Nn {\math_bcsym_Ope:Nn}
-\cs_set_protected:Npn \math_icsym_Clo:Nn {\math_bcsym_Clo:Nn}
-\cs_set_protected:Npn \math_icsym_Inn:Nn {\math_bcsym_Inn:Nn}
-% \end{macrocode}
-%
-% The display variants, using the basic operations. Currently we do
-% not do anything to inline math.
-% \begin{macrocode}
-\cs_new:Npn \math_dsym_Ord:Nn {\math_bsym_Ord:Nn }
-\cs_new:Npn \math_dsym_Var:Nn {\math_bsym_Var:Nn }
-\cs_new:Npn \math_dsym_Bin:Nn {\math_bsym_Bin:Nn}
-\cs_new:Npn \math_dsym_Rel:Nn {\math_bsym_Rel:Nn }
-\cs_new:Npn \math_dsym_Pun:Nn {\math_bsym_Pun:Nn }
-\cs_new:Npn \math_dsym_COs:Nn {\math_bsym_COs:Nn}
-\cs_new:Npn \math_dsym_COi:Nn {\math_bsym_COi:Nn}
-\cs_new:Npn \math_dsym_DeL:Nn {\math_bsym_DeL:Nn}
-\cs_new:Npn \math_dsym_DeR:Nn{ \math_bsym_DeR:Nn}
-\cs_new:Npn \math_dsym_DeB:Nn{ \math_bsym_DeB:Nn }
-\cs_new:Npn \math_dsym_DeA:Nn { \math_bsym_DeA:Nn }
-\cs_new:Npn \math_dsym_Rad:Nn { \math_bsym_Rad:Nn}
-\cs_new:Npn \math_dsym_Acc:Nn {\math_bsym_DeL:Nn}
-% inline compound
-\cs_set_protected:Npn \math_dcsym_Ord:Nn {\math_bcsym_Ord:Nn}
-\cs_set_protected:Npn \math_dcsym_Var:Nn {\math_bcsym_Var:Nn}
-\cs_set_protected:Npn \math_dcsym_Bin:Nn {\math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_dcsym_Rel:Nn {\math_bcsym_Rel:Nn}
-\cs_set_protected:Npn \math_dcsym_Pun:Nn {\math_bcsym_Pun:Nn}
-\cs_set_protected:Npn \math_dcsym_COi:Nn {\math_bcsym_COi:Nn}
-\cs_set_protected:Npn \math_dcsym_COs:Nn {\math_bcsym_COs:Nn}
-\cs_set_protected:Npn \math_dcsym_DeL:Nn {\math_bcsym_DeL:Nn}
-\cs_set_protected:Npn \math_dcsym_DeR:Nn {\math_bcsym_DeR:Nn}
-\cs_set_protected:Npn \math_dcsym_DeB:Nn {\math_bcsym_DeB:Nn}
-\cs_set_protected:Npn \math_dcsym_DeA:Nn {\math_bcsym_DeA:Nn}
-\cs_set_protected:Npn \math_dcsym_Acc:Nn {\math_bcsym_Acc:Nn}
-\cs_set_protected:Npn \math_dcsym_Ope:Nn {\math_bcsym_Ope:Nn}
-\cs_set_protected:Npn \math_dcsym_Clo:Nn {\math_bcsym_Clo:Nn}
-\cs_set_protected:Npn \math_dcsym_Inn:Nn {\math_bcsym_Inn:Nn}
-% \end{macrocode}
-% Almost ready now! Now just need two commands to initialize these
-% settings.
-%
-% \begin{macrocode}
-\cs_set:Npn \math_setup_inline_symbols:{
- \cs_set_eq:NN \math_sym_Ord:Nn \math_isym_Ord:Nn
- \cs_set_eq:NN \math_sym_Var:Nn \math_isym_Var:Nn
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
- \cs_set_eq:NN \math_sym_Pun:Nn \math_isym_Pun:Nn
- \cs_set_eq:NN \math_sym_COs:Nn \math_isym_COs:Nn
- \cs_set_eq:NN \math_sym_COi:Nn \math_isym_COi:Nn
- \cs_set_eq:NN \math_sym_DeL:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeR:Nn \math_isym_DeR:Nn
- \cs_set_eq:NN \math_sym_DeB:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeA:Nn \math_isym_DeA:Nn
- \cs_set_eq:NN \math_sym_Rad:Nn \math_isym_Rad:Nn
- \cs_set_eq:NN \math_sym_Acc:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_csym_Ord:Nn \math_icsym_Ord:Nn
- \cs_set_eq:NN \math_csym_Var:Nn \math_icsym_Var:Nn
- \cs_set_eq:NN \math_csym_Bin:Nn \math_icsym_Bin:Nn
- \cs_set_eq:NN \math_csym_Rel:Nn \math_icsym_Rel:Nn
- \cs_set_eq:NN \math_csym_Pun:Nn \math_icsym_Pun:Nn
- \cs_set_eq:NN \math_csym_COi:Nn \math_icsym_COi:Nn
- \cs_set_eq:NN \math_csym_COs:Nn \math_icsym_COs:Nn
- \cs_set_eq:NN \math_csym_DeL:Nn \math_icsym_DeL:Nn
- \cs_set_eq:NN \math_csym_DeR:Nn \math_icsym_DeR:Nn
- \cs_set_eq:NN \math_csym_DeB:Nn \math_icsym_DeB:Nn
- \cs_set_eq:NN \math_csym_DeA:Nn \math_icsym_DeA:Nn
- \cs_set_eq:NN \math_csym_Acc:Nn \math_icsym_Acc:Nn
- \cs_set_eq:NN \math_csym_Ope:Nn \math_icsym_Ope:Nn
- \cs_set_eq:NN \math_csym_Clo:Nn \math_icsym_Clo:Nn
- \cs_set_eq:NN \math_csym_Inn:Nn \math_icsym_Inn:Nn
-}
-
-\cs_set:Npn \math_setup_display_symbols:{
- \cs_set_eq:NN \math_sym_Ord:Nn \math_dsym_Ord:Nn
- \cs_set_eq:NN \math_sym_Var:Nn \math_dsym_Var:Nn
- \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_dsym_Rel:Nn
- \cs_set_eq:NN \math_sym_Pun:Nn \math_dsym_Pun:Nn
- \cs_set_eq:NN \math_sym_COs:Nn \math_dsym_COs:Nn
- \cs_set_eq:NN \math_sym_COi:Nn \math_dsym_COi:Nn
- \cs_set_eq:NN \math_sym_DeL:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeR:Nn \math_dsym_DeR:Nn
- \cs_set_eq:NN \math_sym_DeB:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeA:Nn \math_dsym_DeA:Nn
- \cs_set_eq:NN \math_sym_Rad:Nn \math_dsym_Rad:Nn
- \cs_set_eq:NN \math_sym_Acc:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_csym_Ord:Nn \math_dcsym_Ord:Nn
- \cs_set_eq:NN \math_csym_Var:Nn \math_dcsym_Var:Nn
- \cs_set_eq:NN \math_csym_Bin:Nn \math_dcsym_Bin:Nn
- \cs_set_eq:NN \math_csym_Rel:Nn \math_dcsym_Rel:Nn
- \cs_set_eq:NN \math_csym_Pun:Nn \math_dcsym_Pun:Nn
- \cs_set_eq:NN \math_csym_COi:Nn \math_dcsym_COi:Nn
- \cs_set_eq:NN \math_csym_COs:Nn \math_dcsym_COs:Nn
- \cs_set_eq:NN \math_csym_DeL:Nn \math_dcsym_DeL:Nn
- \cs_set_eq:NN \math_csym_DeR:Nn \math_dcsym_DeR:Nn
- \cs_set_eq:NN \math_csym_DeB:Nn \math_dcsym_DeB:Nn
- \cs_set_eq:NN \math_csym_DeA:Nn \math_dcsym_DeA:Nn
- \cs_set_eq:NN \math_csym_Acc:Nn \math_dcsym_Acc:Nn
- \cs_set_eq:NN \math_csym_Ope:Nn \math_dcsym_Ope:Nn
- \cs_set_eq:NN \math_csym_Clo:Nn \math_dcsym_Clo:Nn
- \cs_set_eq:NN \math_csym_Inn:Nn \math_dcsym_Inn:Nn
-}
-% \end{macrocode}
-% Phew, that was it.
-%
-% Well, almost. We need to set them up for use properly. Should they
-% be added to |\everymath|? Probably, for math within
-% displays. However, this is a lot of extra processing which we could
-% tackle in the display setup.
-% \begin{macrocode}
-\math_setup_inline_symbols:
-% \end{macrocode}
-%
-% Need an active character for a second. Don't rely on |~| being
-% active!
-% \begin{macrocode}
-\edef\tmp{\catcode\z@=\the\catcode\z@}
-\catcode\z@=\active
-\def\DeclareFlexSymbol#1#2#3#4{%
- \begingroup
- \cs_set_protected:Npx\@tempb{
- \exp_not:N\@sym\exp_not:N#1\exp_not:c{math_sym_#2:Nn}
- \exp_not:c{mg@#3}{#4}
- }
- \ifcat\exp_not:N#1\relax
- \sym@global\let#1\@tempb
- \else
- \sym@global\mathcode`#1="8000\relax
- \lccode\z@=`#1\relax
- \lowercase{\sym@global\let^^@\@tempb}% zero char
- \fi
- \endgroup
-}
-\tmp % restore catcode
-\cs_set:Npn \DeclareFlexDelimiter #1#2#3#4#5#6{
- \DeclareFlexSymbol{#1}{#2}{#3}{#4}
- \cs_gset:cpx{sd@\use:c{mg@#3}#4}{\exp_not:c{mg@#5}{#6}}
-}
-
-% \end{macrocode}
-% |\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}|
-% |\def\@symInn#1#2{\@symtype\mathinner{\OrdSymbol{#2}}}|
-% |\@symtype \mathinner{\OrdSymbol{\cdtop\cdotp\cdotp}}|
-% \begin{macrocode}
-\def\DeclareFlexCompoundSymbol#1#2#3{%
- \exp_args:NNo \DeclareRobustCommand#1{\csname math_csym_#2:Nn\endcsname#1{#3}}%
- \sym@global\let#1#1\relax
-}
-\DeclareRobustCommand\textchar{\text@char\textfont}
-\DeclareRobustCommand\scriptchar{\text@char\scriptfont}%
-% \end{macrocode}
-% Simplified the next bit because now the slot is read as one argument
-% so no afterassignment and what have you. Just drop the char
-% directly.
-% \begin{macrocode}
-\def\text@char@sym#1#2#3#4{% #3=fam, #4=slot
- \begingroup
- \cs_set_eq:NN \@sym \prg_do_nothing: % defense against infinite loops
-% \end{macrocode}
-% the next line will result in |\scriptfont|\meta{num}, where |#3|
-% provides the \meta{num}.
-% \begin{macrocode}
- \the\text@script@char#3%
- \char"#4\endgroup
-}
-\edef\tmp{\catcode\z@=\the\catcode\z@}
-\catcode\z@=\active
-\def\text@char#1#2{\begingroup
- \check@mathfonts
- \cs_set_eq:NN \text@script@char#1
- \cs_set_eq:NN \@sym\text@char@sym
- \cs_set_eq:NN \@symtype\use_ii:nn
- \cs_set_eq:NN\OrdSymbol\use:n
- \cs_set_eq:NN\ifmmode\iftrue
- \everymath{$\use_none:n}%$
- \def\mkern{\muskip\z@}
- \cs_set_eq:NN\mskip\mkern
- \ifcat\relax\noexpand#2% true if #2 is a cs.
- #2%
- \else
- \lccode\z@=\expandafter`\string#2\relax
- \lowercase{^^@}%
- \fi
- \endgroup
-}
-\tmp % restore catcode
-\providecommand\textprime{}
-\DeclareRobustCommand\textprime{\leavevmode
- \raise.8ex\hbox{\text@char\scriptfont\prime}%
-}
-\@ifundefined{resetMathstrut@}{}{%
- \def\resetMathstrut@{%
- \setbox\z@\hbox{\textchar\vert}%
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
- }%
-}
-% \end{macrocode}
-% Arrow fills. changed to 7mu as in amsmath
-% \begin{macrocode}
-\@ifundefined{rightarrowfill@}{}{%
- \def\rightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\copy\z@\mkern-7mu\cleaders
- \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
- \mkern-6mu\OrdSymbol{\rightarrow}$}
- \def\leftarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
- \hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
- \mkern-7mu\box\z@$}
- \def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
- \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
- \mkern-6mu\OrdSymbol{\rightarrow}$}
-}
-% \end{macrocode}
-% hey, this looks like a simple case switch...
-% \begin{macrocode}
-\def\binrel@sym#1#2#3#4{%
- \xdef\binrel@@##1{%
- \ifx\math_sym_Ord:Nn #2 \math_csym_Ord:Nn
- \else\ifx\math_sym_Var:Nn#2 \math_csym_Var:Nn
- \else\ifx\math_sym_COs:Nn#2 \math_csym_COs:Nn
- \else\ifx\math_sym_COi:Nn#2 \math_csym_COi:Nn
- \else\ifx\math_sym_Bin:Nn#2 \math_csym_Bin:Nn
- \else\ifx\math_sym_Rel:Nn#2 \math_csym_Rel:Nn
- \else\ifx\math_sym_Pun:Nn#2 \math_csym_Pun:Nn
- \else\exp_not:N\@symErr \fi\fi\fi\fi\fi\fi\fi
- ?{\exp_not:N\OrdSymbol{##1}}}%
-}
-
-\def\binrel@a{%
- \def\math_sym_Ord:Nn##1##2{\gdef\binrel@@####1{\math_sym_Ord:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Var:Nn##1##2{\gdef\binrel@@####1{\math_sym_Var:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_COs:Nn##1##2{\gdef\binrel@@####1{\math_sym_COs:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_COi:Nn##1##2{\gdef\binrel@@####1{\math_sym_COi:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Bin:Nn##1##2{\gdef\binrel@@####1{\math_sym_Bin:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Rel:Nn##1##2{\gdef\binrel@@####1{\math_sym_Rel:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Pun:Nn##1##2{\gdef\binrel@@####1{\math_sym_Pun:Nn##1{\OrdSymbol{####1}}}}%
-}
-\def\binrel@#1{%
- \setbox\z@\hbox{$%
- \let\mathchoice\@gobblethree
- \let\@sym\binrel@sym \binrel@a
- #1$}%
-}
-\def\@symextension{sym}
-\newcommand\usesymbols[1]{%
- \clist_map_variable:nNn{#1}\@tempb{%
- \exp_args:No\@onefilewithoptions{\@tempb}[][]\@symextension
- }%
-}
-% Need to introduce \ProvidesExplFile somehow
-\newcommand\ProvidesSymbols[1]{\ProvidesFile{#1.sym}}
-\DeclareRobustCommand{\not}[1]{\math_csym_Rel:Nn\not{\OrdSymbol{\notRel#1}}}
-\DeclareRobustCommand{\OrdSymbol}[1]{%
- \begingroup\mathchars@reset#1\endgroup
-}
-\def\mathchars@reset{\let\@sym\@sym@ord \let\@symtype\@symtype@ord
- \let\OrdSymbol\relax}
-\def\@symtype@ord#1#{}% a strange sort of \@gobble
-\def\@sym@ord#1#2{\exp_after:wN\@sym@ord@a\string#2\@nil}%
-% \end{macrocode}
-% Read delimited argument here. We want to find first character of
-% DeA, Bin, etc. and the control sequence checked agains is |\m@DeL|,
-% |\m@Pun|, etc. The lccode trick makes the . into an @ with catcode
-% 12. This is what results when the code is called with
-% |\string|. Beware of this when we change internal names for math
-% groups! If a Delimiter is found, insert it with class 0 but use the
-% smallest version available. Otherwise just insert math char of class
-% 0. The code here is not pretty and it indicates it should be tackled
-% differently!
-% \begin{macrocode}
-\begingroup
-\lccode`\.=`\_ \lowercase{\endgroup
-\def\@sym@ord@a#1.#2.}#3#4\@nil#5#6{%
- \if D#3
- %\math_ord_delim_aux:Nn #5{#6}
- \math_sd_del_aux:Nnn 0 #5{#6}% check if this works!
- \else
- \math_char:NNn 0 #5{#6}
- \fi
-}
-\cs_set:Nn \math_ord_delim_aux:Nn {
- \math_sd_aux:nn { \math_char:NNn 0 } {#1{#2}}
-}
-% \end{macrocode}
-%
-%
-% Before declaring any math characters active, we have to take care of
-% a small problem with \pkg{amsmath} v2.x, if it is loaded before
-% \pkg{flexisym}. \cs{std@minus} and \cs{std@equal} are defined as
-% \begin{verbatim}
-% \mathchardef\std@minus\mathcode`\-\relax
-% \mathchardef\std@equal\mathcode`\=\relax
-% \end{verbatim}
-% in \fn{amsmath.sty} and again \cs{AtBeginDocument}. The
-% latter is because
-% \begin{quote}
-% In case some alternative math fonts are loaded
-% later. [\fn{amsmath.dtx}]
-% \end{quote}
-% The problem arises because \pkg{flexisym} sets the mathcode of all
-% symbols to $32768$ which is illegal for a \cs{mathchardef}.
-%
-% We have to remove the assignments from the \cs{AtBeginDocument} hook
-% as they will cause an error there.
-% \begin{macrocode}
-\@ifpackageloaded{amsmath}{%
- \begingroup
-% \end{macrocode}
-% Split the contents of \cs{@begindocumenthook} by reading what we
-% search for as a delimited argument and ensure these two assignments
-% do not take place. It is questionable if anything reasonable can be
-% done to them. In the case of a package such as \pkg{mathpazo} which defines
-% \begin{verbatim}
-%\DeclareMathSymbol{=}{\mathrel}{upright}{"3D}
-% \end{verbatim}
-% the \cs{Relbar} will look wrong if we don't use the correct
-% symbol. The way to solve this is define additional \fn{.sym} files
-% which contain the definition of \cs{relbar} and \cs{Relbar}
-% needed. We need those additional files anyway for things like
-% \cs{joinord}.
-% \begin{macrocode}
- \long\def\next#1\mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax#2\flexi@stop{%
- \toks@{#1#2}%
- \xdef\@begindocumenthook{\the\toks@}%
- }%
- \expandafter\next\@begindocumenthook\flexi@stop
- \endgroup
-}{}
-% \end{macrocode}
-%
-% There is problem when using \cs{DeclareMathOperator} as the
-% operators defined call a command \cs{newmcodes@} which relies on the
-% mathcode of \texttt{-} being less than 32768. We delay the
-% definition \cs{AtBeginDocument} in case \pkg{amssymb} hasn't been
-% loaded yet.
-% \begin{macrocode}
-\AtBeginDocument{%
-\def\newmcodes@{%
- \mathcode `\'39\space
- \mathcode `\*42\space
- \mathcode `\."613A\space
- \ifnum\mathcode`\-=45\space
- \else
-% \end{macrocode}
-% The extra check. Don't do anything if \texttt{-} is math active.
-% \begin{macrocode}
- \ifnum\mathcode`\-=32768\space
- \else
- \mathchardef \std@minus \mathcode `\-\relax
- \fi
- \fi
- \mathcode `\-45\space
- \mathcode `\/47\space
- \mathcode `\:"603A\space\relax
-}%
-}
-% \end{macrocode}
-%
-% And we then continue with the options.
-% \begin{macrocode}
-\DeclareOption{mathstyleoff}{%
- \PassOptionsToPackage{noactivechars}{mathstyle}}
-\DeclareOption{cmbase}{\usesymbols{cmbase}}
-\DeclareOption{mathpazo}{\usesymbols{mathpazo}}
-\DeclareOption{mathptmx}{\usesymbols{mathptmx}}
-\ExecuteOptions{cmbase}
-\ProcessOptions\relax
-\renewcommand{\lnot}{\neg}
-\renewcommand{\land}{\wedge}
-\renewcommand{\lor}{\vee}
-\renewcommand{\le}{\leq}
-\renewcommand{\ge}{\geq}
-\renewcommand{\ne}{\neq}
-\renewcommand{\owns}{\ni}
-\renewcommand{\gets}{\leftarrow}
-\renewcommand{\to}{\rightarrow}
-\renewcommand{\|}{\Vert}
-\RequirePackage{mathstyle}
-%</package>\endinput
-% \end{macrocode}
-%
-% \section{cmbase, mathpazo, mathptmx}
-%
-%
-% For each math font package we define a corresponding symbol file
-% with extension \fn{sym}. The Computer Modern base is called
-% \opt{cmbase} and \opt{mathpazo} and \opt{mathptmx} corresponds to
-% the packages. The definitions are almost identical as they mostly
-% concern the positions in the math font encodings. Look for
-% differences in \cs{joinord}, \cs{relbar} and \cs{Relbar}. If you
-% inspect the source code, you'll see that the support for
-% \pkg{mathptmx} didn't require any work but I thought it better to
-% create a \fn{sym} file to maintain a uniform interface.
-%
-% \begin{aside}
-% Open question on \verb"!" and \verb"?": maybe they
-% should have type `Pun' instead of `DeR'. Need to
-% search for uses in math in AMS archives. Or, maybe add a special
-% `Clo' type for them: non-extensible closing delimiter.
-% \end{aside}
-%
-%
-%
-% Default mathgroup setup.
-% \changes{v0.3}{2010/07/11}{fixed bugs regarding capital greek
-% letters in mathpazo and mathptmx}
-% \begin{macrocode}
-%<*cmbase|mathpazo|mathptmx>
-%<cmbase>\ProvidesSymbols{cmbase}[2007/12/19 v0.92]
-%<mathpazo>\ProvidesSymbols{mathpazo}[2010/07/11 v0.3]
-%<mathptmx>\ProvidesSymbols{mathptmx}[2010/07/11 v0.3]
-\ExplSyntaxOn
-\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
-\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
-\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
-\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
-\cs_gset:Npx\mg@bin{\mg@OMS}
-\cs_gset:Npx\mg@del{\mg@OMX}
-\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
-\cs_gset:Npn\mg@latin{\mg@OML}
-\cs_gset_eq:NN\mg@Latin\mg@latin
-\cs_gset_eq:NN\mg@greek\mg@latin
-%<cmbase|mathptmx>\cs_gset_eq:NN\mg@Greek\mg@digit
-% \end{macrocode}
-% Mathpazo takes the upper case greeks from the letter font if
-% slantedGreek is in effect, but from \emph{upright} if not. Mathptmx
-% also takes the slanted greek from the letter font.
-% \begin{macrocode}
-%<mathpazo>\@ifpackagewith{mathpazo}{slantedGreek}{%
-%<mathpazo> \cs_gset_eq:NN\mg@Greek\mg@latin
-%<mathpazo>}{%
-%<mathpazo> \cs_gset:cpx{mg@Greek}{\hexnumber@\symupright}
-%<mathpazo>}
-%<mathptmx>\@ifpackagewith{mathptmx}{slantedGreek}{%
-%<mathptmx> \cs_gset_eq:NN\mg@Greek\mg@latin
-%<mathptmx>}{}
-\cs_gset_eq:NN\mg@rel\mg@bin
-\cs_gset_eq:NN\mg@ord\mg@bin
-\cs_gset_eq:NN\mg@cop\mg@del
-% \end{macrocode}
-%
-%
-% Symbols from the 128-character \fn{cmr} encoding.
-% Paren and square bracket delimiters from this encoding are covered
-% by the definitions in the \fn{cmex} section, however.
-% \begin{macrocode}
-\DeclareFlexSymbol{!} {Pun}{OT1}{21}
-\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
-\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
-\DeclareFlexSymbol{\colon}{Pun}{OT1}{3A}
-\DeclareFlexSymbol{;} {Pun}{OT1}{3B}
-\DeclareFlexSymbol{=} {Rel}{OT1}{3D}
-\DeclareFlexSymbol{?} {Pun}{OT1}{3F}
-% \end{macrocode}
-% \AmS\TeX, and therefore the \pkg{amsmath} package, make the
-% uppercase Greek letters class 0 (nonvariable) instead of 7
-% (variable), to eliminate the glaring inconsistency with lowercase
-% Greek. (In plain \TeX , \verb"{\bf\Delta}" works, while
-% \verb"{\bf\delta}" doesn't.) Let us try to make them both
-% variable (fonts permitting) instead of nonvariable.
-% \begin{macrocode}
-\DeclareFlexSymbol{\Gamma} {Var}{Greek}{00}
-\DeclareFlexSymbol{\Delta} {Var}{Greek}{01}
-\DeclareFlexSymbol{\Theta} {Var}{Greek}{02}
-\DeclareFlexSymbol{\Lambda} {Var}{Greek}{03}
-\DeclareFlexSymbol{\Xi} {Var}{Greek}{04}
-\DeclareFlexSymbol{\Pi} {Var}{Greek}{05}
-\DeclareFlexSymbol{\Sigma} {Var}{Greek}{06}
-\DeclareFlexSymbol{\Upsilon}{Var}{Greek}{07}
-\DeclareFlexSymbol{\Phi} {Var}{Greek}{08}
-\DeclareFlexSymbol{\Psi} {Var}{Greek}{09}
-\DeclareFlexSymbol{\Omega} {Var}{Greek}{0A}
-% \end{macrocode}
-% Decimal digits.
-% \begin{macrocode}
-\DeclareFlexSymbol{0}{Var}{digit}{30}
-\DeclareFlexSymbol{1}{Var}{digit}{31}
-\DeclareFlexSymbol{2}{Var}{digit}{32}
-\DeclareFlexSymbol{3}{Var}{digit}{33}
-\DeclareFlexSymbol{4}{Var}{digit}{34}
-\DeclareFlexSymbol{5}{Var}{digit}{35}
-\DeclareFlexSymbol{6}{Var}{digit}{36}
-\DeclareFlexSymbol{7}{Var}{digit}{37}
-\DeclareFlexSymbol{8}{Var}{digit}{38}
-\DeclareFlexSymbol{9}{Var}{digit}{39}
-% \end{macrocode}
-% Symbols from the 128-character \fn{cmmi} encoding.
-% \begin{macrocode}
-\DeclareFlexSymbol{,}{Pun}{OML}{3B}
-\DeclareFlexSymbol{.}{Ord}{OML}{3A}
-\DeclareFlexSymbol{/}{Ord}{OML}{3D}
-\DeclareFlexSymbol{<}{Rel}{OML}{3C}
-\DeclareFlexSymbol{>}{Rel}{OML}{3E}
-% \end{macrocode}
-% To do: make the Var property of lc Greek work properly.
-% \begin{macrocode}
-\DeclareFlexSymbol{\alpha}{Var}{greek}{0B}
-\DeclareFlexSymbol{\beta}{Var}{greek}{0C}
-\DeclareFlexSymbol{\gamma}{Var}{greek}{0D}
-\DeclareFlexSymbol{\delta}{Var}{greek}{0E}
-\DeclareFlexSymbol{\epsilon}{Var}{greek}{0F}
-\DeclareFlexSymbol{\zeta}{Var}{greek}{10}
-\DeclareFlexSymbol{\eta}{Var}{greek}{11}
-\DeclareFlexSymbol{\theta}{Var}{greek}{12}
-\DeclareFlexSymbol{\iota}{Var}{greek}{13}
-\DeclareFlexSymbol{\kappa}{Var}{greek}{14}
-\DeclareFlexSymbol{\lambda}{Var}{greek}{15}
-\DeclareFlexSymbol{\mu}{Var}{greek}{16}
-\DeclareFlexSymbol{\nu}{Var}{greek}{17}
-\DeclareFlexSymbol{\xi}{Var}{greek}{18}
-\DeclareFlexSymbol{\pi}{Var}{greek}{19}
-\DeclareFlexSymbol{\rho}{Var}{greek}{1A}
-\DeclareFlexSymbol{\sigma}{Var}{greek}{1B}
-\DeclareFlexSymbol{\tau}{Var}{greek}{1C}
-\DeclareFlexSymbol{\upsilon}{Var}{greek}{1D}
-\DeclareFlexSymbol{\phi}{Var}{greek}{1E}
-\DeclareFlexSymbol{\chi}{Var}{greek}{1F}
-\DeclareFlexSymbol{\psi}{Var}{greek}{20}
-\DeclareFlexSymbol{\omega}{Var}{greek}{21}
-\DeclareFlexSymbol{\varepsilon}{Var}{greek}{22}
-\DeclareFlexSymbol{\vartheta}{Var}{greek}{23}
-\DeclareFlexSymbol{\varpi}{Var}{greek}{24}
-\DeclareFlexSymbol{\varrho}{Var}{greek}{25}
-\DeclareFlexSymbol{\varsigma}{Var}{greek}{26}
-\DeclareFlexSymbol{\varphi}{Var}{greek}{27}
-% \end{macrocode}
-% Note that in plain \TeX\ \cs{imath} and \cs{jmath} are
-% not variable-font. But if a \verb"j" changes font to, let's
-% say, sans serif or calligraphic, a dotless \verb"j" in the same
-% context should change font in the same way.
-% \begin{macrocode}
-\DeclareFlexSymbol{\imath}{Var}{OML}{7B}
-\DeclareFlexSymbol{\jmath}{Var}{OML}{7C}
-\DeclareFlexSymbol{\ell}{Ord}{OML}{60}
-\DeclareFlexSymbol{\wp}{Ord}{OML}{7D}
-\DeclareFlexSymbol{\partial}{Ord}{OML}{40}
-\DeclareFlexSymbol{\flat}{Ord}{OML}{5B}
-\DeclareFlexSymbol{\natural}{Ord}{OML}{5C}
-\DeclareFlexSymbol{\sharp}{Ord}{OML}{5D}
-\DeclareFlexSymbol{\triangleleft}{Bin}{OML}{2F}
-\DeclareFlexSymbol{\triangleright}{Bin}{OML}{2E}
-\DeclareFlexSymbol{\star}{Bin}{OML}{3F}
-\DeclareFlexSymbol{\smile}{Rel}{OML}{5E}
-\DeclareFlexSymbol{\frown}{Rel}{OML}{5F}
-\DeclareFlexSymbol{\leftharpoonup}{Rel}{OML}{28}
-\DeclareFlexSymbol{\leftharpoondown}{Rel}{OML}{29}
-\DeclareFlexSymbol{\rightharpoonup}{Rel}{OML}{2A}
-\DeclareFlexSymbol{\rightharpoondown}{Rel}{OML}{2B}
-\DeclareFlexSymbol{a}{Var}{latin}{61}
-\DeclareFlexSymbol{b}{Var}{latin}{62}
-\DeclareFlexSymbol{c}{Var}{latin}{63}
-\DeclareFlexSymbol{d}{Var}{latin}{64}
-\DeclareFlexSymbol{e}{Var}{latin}{65}
-\DeclareFlexSymbol{f}{Var}{latin}{66}
-\DeclareFlexSymbol{g}{Var}{latin}{67}
-\DeclareFlexSymbol{h}{Var}{latin}{68}
-\DeclareFlexSymbol{i}{Var}{latin}{69}
-\DeclareFlexSymbol{j}{Var}{latin}{6A}
-\DeclareFlexSymbol{k}{Var}{latin}{6B}
-\DeclareFlexSymbol{l}{Var}{latin}{6C}
-\DeclareFlexSymbol{m}{Var}{latin}{6D}
-\DeclareFlexSymbol{n}{Var}{latin}{6E}
-\DeclareFlexSymbol{o}{Var}{latin}{6F}
-\DeclareFlexSymbol{p}{Var}{latin}{70}
-\DeclareFlexSymbol{q}{Var}{latin}{71}
-\DeclareFlexSymbol{r}{Var}{latin}{72}
-\DeclareFlexSymbol{s}{Var}{latin}{73}
-\DeclareFlexSymbol{t}{Var}{latin}{74}
-\DeclareFlexSymbol{u}{Var}{latin}{75}
-\DeclareFlexSymbol{v}{Var}{latin}{76}
-\DeclareFlexSymbol{w}{Var}{latin}{77}
-\DeclareFlexSymbol{x}{Var}{latin}{78}
-\DeclareFlexSymbol{y}{Var}{latin}{79}
-\DeclareFlexSymbol{z}{Var}{latin}{7A}
-\DeclareFlexSymbol{A}{Var}{Latin}{41}
-\DeclareFlexSymbol{B}{Var}{Latin}{42}
-\DeclareFlexSymbol{C}{Var}{Latin}{43}
-\DeclareFlexSymbol{D}{Var}{Latin}{44}
-\DeclareFlexSymbol{E}{Var}{Latin}{45}
-\DeclareFlexSymbol{F}{Var}{Latin}{46}
-\DeclareFlexSymbol{G}{Var}{Latin}{47}
-\DeclareFlexSymbol{H}{Var}{Latin}{48}
-\DeclareFlexSymbol{I}{Var}{Latin}{49}
-\DeclareFlexSymbol{J}{Var}{Latin}{4A}
-\DeclareFlexSymbol{K}{Var}{Latin}{4B}
-\DeclareFlexSymbol{L}{Var}{Latin}{4C}
-\DeclareFlexSymbol{M}{Var}{Latin}{4D}
-\DeclareFlexSymbol{N}{Var}{Latin}{4E}
-\DeclareFlexSymbol{O}{Var}{Latin}{4F}
-\DeclareFlexSymbol{P}{Var}{Latin}{50}
-\DeclareFlexSymbol{Q}{Var}{Latin}{51}
-\DeclareFlexSymbol{R}{Var}{Latin}{52}
-\DeclareFlexSymbol{S}{Var}{Latin}{53}
-\DeclareFlexSymbol{T}{Var}{Latin}{54}
-\DeclareFlexSymbol{U}{Var}{Latin}{55}
-\DeclareFlexSymbol{V}{Var}{Latin}{56}
-\DeclareFlexSymbol{W}{Var}{Latin}{57}
-\DeclareFlexSymbol{X}{Var}{Latin}{58}
-\DeclareFlexSymbol{Y}{Var}{Latin}{59}
-\DeclareFlexSymbol{Z}{Var}{Latin}{5A}
-% \end{macrocode}
-% The \cs{ldotPun} glyph is used in constructing the
-% \cs{ldots} symbol. It is just a period with a different math
-% symbol class. \cs{lhookRel} and \cs{rhookRel} are used
-% in a similar way for building hooked arrow symbols.
-% \begin{macrocode}
-\DeclareFlexSymbol{\ldotPun}{Pun}{OML}{3A}
-\def\ldotp{\ldotPun}
-\DeclareFlexSymbol{\lhookRel}{Rel}{OML}{2C}
-\DeclareFlexSymbol{\rhookRel}{Rel}{OML}{2D}
-% \end{macrocode}
-% Symbols from the 128-character \fn{cmsy} encoding.
-% \begin{macrocode}
-\DeclareFlexSymbol{*}{Bin}{bin}{03} % \ast
-\DeclareFlexSymbol{-}{Bin}{bin}{00}
-\DeclareFlexSymbol{|}{Ord}{OMS}{6A}
-\DeclareFlexSymbol{\aleph}{Ord}{ord}{40}
-\DeclareFlexSymbol{\Re}{Ord}{ord}{3C}
-\DeclareFlexSymbol{\Im}{Ord}{ord}{3D}
-\DeclareFlexSymbol{\infty}{Ord}{ord}{31}
-\DeclareFlexSymbol{\prime}{Ord}{ord}{30}
-\DeclareFlexSymbol{\emptyset}{Ord}{ord}{3B}
-\DeclareFlexSymbol{\nabla}{Ord}{ord}{72}
-\DeclareFlexSymbol{\top}{Ord}{ord}{3E}
-\DeclareFlexSymbol{\bot}{Ord}{ord}{3F}
-\DeclareFlexSymbol{\triangle}{Ord}{ord}{34}
-\DeclareFlexSymbol{\forall}{Ord}{ord}{38}
-\DeclareFlexSymbol{\exists}{Ord}{ord}{39}
-\DeclareFlexSymbol{\neg}{Ord}{ord}{3A}
-\DeclareFlexSymbol{\clubsuit}{Ord}{ord}{7C}
-\DeclareFlexSymbol{\diamondsuit}{Ord}{ord}{7D}
-\DeclareFlexSymbol{\heartsuit}{Ord}{ord}{7E}
-\DeclareFlexSymbol{\spadesuit}{Ord}{ord}{7F}
-\DeclareFlexSymbol{\smallint}{COs}{OMS}{73}
-% \end{macrocode}
-% Binary operators.
-% \begin{macrocode}
-\DeclareFlexSymbol{\bigtriangleup}{Bin}{bin}{34}
-\DeclareFlexSymbol{\bigtriangledown}{Bin}{bin}{35}
-\DeclareFlexSymbol{\wedge}{Bin}{bin}{5E}
-\DeclareFlexSymbol{\vee}{Bin}{bin}{5F}
-\DeclareFlexSymbol{\cap}{Bin}{bin}{5C}
-\DeclareFlexSymbol{\cup}{Bin}{bin}{5B}
-\DeclareFlexSymbol{\ddagger}{Bin}{bin}{7A}
-\DeclareFlexSymbol{\dagger}{Bin}{bin}{79}
-\DeclareFlexSymbol{\sqcap}{Bin}{bin}{75}
-\DeclareFlexSymbol{\sqcup}{Bin}{bin}{74}
-\DeclareFlexSymbol{\uplus}{Bin}{bin}{5D}
-\DeclareFlexSymbol{\amalg}{Bin}{bin}{71}
-\DeclareFlexSymbol{\diamond}{Bin}{bin}{05}
-\DeclareFlexSymbol{\bullet}{Bin}{bin}{0F}
-\DeclareFlexSymbol{\wr}{Bin}{bin}{6F}
-\DeclareFlexSymbol{\div}{Bin}{bin}{04}
-\DeclareFlexSymbol{\odot}{Bin}{bin}{0C}
-\DeclareFlexSymbol{\oslash}{Bin}{bin}{0B}
-\DeclareFlexSymbol{\otimes}{Bin}{bin}{0A}
-\DeclareFlexSymbol{\ominus}{Bin}{bin}{09}
-\DeclareFlexSymbol{\oplus}{Bin}{bin}{08}
-\DeclareFlexSymbol{\mp}{Bin}{bin}{07}
-\DeclareFlexSymbol{\pm}{Bin}{bin}{06}
-\DeclareFlexSymbol{\circ}{Bin}{bin}{0E}
-\DeclareFlexSymbol{\bigcirc}{Bin}{bin}{0D}
-\DeclareFlexSymbol{\setminus}{Bin}{bin}{6E}
-\DeclareFlexSymbol{\cdot}{Bin}{bin}{01}
-\DeclareFlexSymbol{\ast}{Bin}{bin}{03}
-\DeclareFlexSymbol{\times}{Bin}{bin}{02}
-% \end{macrocode}
-% Relation symbols.
-% \begin{macrocode}
-\DeclareFlexSymbol{\propto}{Rel}{rel}{2F}
-\DeclareFlexSymbol{\sqsubseteq}{Rel}{rel}{76}
-\DeclareFlexSymbol{\sqsupseteq}{Rel}{rel}{77}
-\DeclareFlexSymbol{\parallel}{Rel}{rel}{6B}
-\DeclareFlexSymbol{\mid}{Rel}{rel}{6A}
-\DeclareFlexSymbol{\dashv}{Rel}{rel}{61}
-\DeclareFlexSymbol{\vdash}{Rel}{rel}{60}
-\DeclareFlexSymbol{\nearrow}{Rel}{rel}{25}
-\DeclareFlexSymbol{\searrow}{Rel}{rel}{26}
-\DeclareFlexSymbol{\nwarrow}{Rel}{rel}{2D}
-\DeclareFlexSymbol{\swarrow}{Rel}{rel}{2E}
-\DeclareFlexSymbol{\Leftrightarrow}{Rel}{rel}{2C}
-\DeclareFlexSymbol{\Leftarrow}{Rel}{rel}{28}
-\DeclareFlexSymbol{\Rightarrow}{Rel}{rel}{29}
-\DeclareFlexSymbol{\leq}{Rel}{rel}{14}
-\DeclareFlexSymbol{\geq}{Rel}{rel}{15}
-\DeclareFlexSymbol{\succ}{Rel}{rel}{1F}
-\DeclareFlexSymbol{\prec}{Rel}{rel}{1E}
-\DeclareFlexSymbol{\approx}{Rel}{rel}{19}
-\DeclareFlexSymbol{\succeq}{Rel}{rel}{17}
-\DeclareFlexSymbol{\preceq}{Rel}{rel}{16}
-\DeclareFlexSymbol{\supset}{Rel}{rel}{1B}
-\DeclareFlexSymbol{\subset}{Rel}{rel}{1A}
-\DeclareFlexSymbol{\supseteq}{Rel}{rel}{13}
-\DeclareFlexSymbol{\subseteq}{Rel}{rel}{12}
-\DeclareFlexSymbol{\in}{Rel}{rel}{32}
-\DeclareFlexSymbol{\ni}{Rel}{rel}{33}
-\DeclareFlexSymbol{\gg}{Rel}{rel}{1D}
-\DeclareFlexSymbol{\ll}{Rel}{rel}{1C}
-\DeclareFlexSymbol{\leftrightarrow}{Rel}{rel}{24}
-\DeclareFlexSymbol{\leftarrow}{Rel}{rel}{20}
-\DeclareFlexSymbol{\rightarrow}{Rel}{rel}{21}
-\DeclareFlexSymbol{\sim}{Rel}{rel}{18}
-\DeclareFlexSymbol{\simeq}{Rel}{rel}{27}
-\DeclareFlexSymbol{\perp}{Rel}{rel}{3F}
-\DeclareFlexSymbol{\equiv}{Rel}{rel}{11}
-\DeclareFlexSymbol{\asymp}{Rel}{rel}{10}
-% \end{macrocode}
-% The \cs{notRel} glyph is a special zero-width glyph intended only
-% for use in constructing negated symbols. \cs{mapstoRel} and
-% \cs{cdotPun} have similar but more restricted applications.
-% \begin{macrocode}
-\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
-\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
-\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
-% \end{macrocode}
-% Symbols from the 128-character \fn{cmex} encoding.
-% \verb"COs" stands for `cumulative operator
-% (sum-like)'.
-% \verb"COi" stands for `cumulative operator
-% (integral-like)'. These typically differ only in the
-% default placement of limits. \verb"cop" stands for
-% `cumulative operator math group'.
-% \begin{macrocode}
-\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
-\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
-\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
-\DeclareFlexSymbol{\biguplus}{COs}{cop}{55}
-\DeclareFlexSymbol{\bigcap}{COs}{cop}{54}
-\DeclareFlexSymbol{\bigcup}{COs}{cop}{53}
-\DeclareFlexSymbol{\int}{COi}{cop}{52}
-\DeclareFlexSymbol{\prod}{COs}{cop}{51}
-\DeclareFlexSymbol{\sum}{COs}{cop}{50}
-\DeclareFlexSymbol{\bigotimes}{COs}{cop}{4E}
-\DeclareFlexSymbol{\bigoplus}{COs}{cop}{4C}
-\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
-\DeclareFlexSymbol{\oint}{COi}{cop}{48}
-\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-% \end{macrocode}
-% Delimiter symbols.
-% \verb"DeL" stands for `delimiter (left)'.
-% \verb"DeR" stands for `delimiter (right)'.
-% \verb"DeB" stands for `delimiter (bidirectional)'.
-% The principal encoding point for an extensible delimiter is the
-% first link in the list of linked sizes as specified in the font metric
-% information.
-% For a math encoding such as OT1/OML/OMS/OMX where not all sizes of a
-% given delimiter reside in a given font, the extra encoding point for the
-% smallest delimiter must be supplied by defining
-% \begin{verbatim}
-% \sd@GXX
-% \end{verbatim}
-% where G is the mathgroup and XX is the hexadecimal glyph
-% position. |\DeclareFlexDelimiter| does that for us.
-% \begin{macrocode}
-\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
-\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
-\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
-\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
-\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
-\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
-\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
-\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
-\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
-\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
-\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
-\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
-\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
-% \end{macrocode}
-% Maybe make the vert bars mathord instead of delimiter, to discourage
-% poor usage.
-% \begin{macrocode}
-\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
-% \end{macrocode}
-%
-%
-% These wacky delimiters need to be supported I guess for
-% compabitility reasons.
-% The DeA delimiter type is a special case used only for these
-% arrows.
-% \begin{macrocode}
-\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
-\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
-\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
-\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
-\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
-\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
-\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
-\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
-\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
-\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
-\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
-\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
-\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
-\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
-% \end{macrocode}
-%
-%
-%
-%
-% \section{Some compound symbols}
-% The following symbols are not robust in standard \LaTeX\
-% because they use \verb"#" or \cs{mathpalette} (which is not
-% robust and contains a \verb"#" in its expansion): \cs{angle},
-% \cs{cong}, \cs{notin}, \cs{rightleftharpoons}.
-%
-% In this definition of \cs{hbar}, the symbol is cobbled together
-% from a math italic h and the cmr overbar accent glyph.
-% \begin{macrocode}
-\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
-\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
-% \end{macrocode}
-% For \cs{surd}, the interior symbol gets math class 1
-% (cumulative operator) to make the glyph vertically centered on the
-% math axis, but the desired horizontal spacing is the spacing for a
-% mathord. (Couldn't it just be class mathopen, though?)
-% \begin{macrocode}
-\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
-\DeclareFlexCompoundSymbol{\surd}{Ord}{\mathop{\surdOrd}}
-% \end{macrocode}
-% As shown in this definition of \cs{angle}, rule dimens are not
-% allowed to use math-units, unfortunately.
-% \begin{macrocode}
-\DeclareFlexCompoundSymbol{\angle}{Ord}{%
- \vbox{\ialign{%
- $\m@th\scriptstyle##$\crcr
- \notRel\mathrel{\mkern14mu}\crcr
- \noalign{\nointerlineskip}%
- \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr
- }}%
-}
-% \end{macrocode}
-% The \cs{not} function, which is defined in the \pkg{flexisym}
-% package, requires a suitably defined \cs{notRel} symbol.
-% \begin{macrocode}
-\DeclareFlexCompoundSymbol{\neq}{Rel}{\not{=}}
-% \end{macrocode}
-% .
-% \begin{macrocode}
-\DeclareFlexCompoundSymbol{\mapsto}{Rel}{\mapstoOrd\rightarrow}
-% \end{macrocode}
-% The \cs{@vereq} function ends by centering the whole
-% construction on the math axis, unlike \cs{buildrel} where the base
-% symbol remains at its normal altitude. Furthermore,
-% \cs{@vereq} leaves the math style of the top symbol as given
-% instead of downsizing to scriptstyle.
-% \begin{macrocode}
-\DeclareFlexCompoundSymbol{\cong}{Rel}{\mathpalette\@vereq\sim}
-% \end{macrocode}
-% The \cs{m@th} in the \fn{fontmath.ltx} definition of
-% \cs{notin} is superfluous unless \cs{c@ncel} doesn't include
-% it (which was perhaps true in an older version of
-% \fn{plain.tex}?).
-% \begin{macrocode}
-\providecommand*\joinord{}
-%<cmbase|mathptmx>\renewcommand*\joinord{\mkern-3mu }
-%<mathpazo>\renewcommand*\joinord{\mkern-3.45mu }
-\DeclareFlexCompoundSymbol{\notin}{Rel}{\mathpalette\c@ncel\in}
-\DeclareFlexCompoundSymbol{\rightleftharpoons}{Rel}{\mathpalette\rlh@{}}
-\DeclareFlexCompoundSymbol{\doteq}{Rel}{\buildrel\textstyle.\over=}
-\DeclareFlexCompoundSymbol{\hookrightarrow}{Rel}{\lhookRel\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\hookleftarrow}{Rel}{\leftarrow\joinord\rhookRel}
-\DeclareFlexCompoundSymbol{\bowtie}{Rel}{\triangleright\joinord\triangleleft}
-\DeclareFlexCompoundSymbol{\models}{Rel}{\vert\joinord=}
-\DeclareFlexCompoundSymbol{\Longrightarrow}{Rel}{\Relbar\joinord\Rightarrow}
-\DeclareFlexCompoundSymbol{\longrightarrow}{Rel}{\relbar\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftarrow}{Rel}{\Leftarrow\joinord\Relbar}
-\DeclareFlexCompoundSymbol{\longleftarrow}{Rel}{\leftarrow\joinord\relbar}
-\DeclareFlexCompoundSymbol{\longmapsto}{Rel}{\mapstochar\longrightarrow}
-\DeclareFlexCompoundSymbol{\longleftrightarrow}{Rel}{\leftarrow\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftrightarrow}{Rel}{\Leftarrow\joinord\Rightarrow}
-% \end{macrocode}
-% Here is what you get from the old definition of \cs{iff}.
-% \begin{verbatim}
-% \glue 2.77771 plus 2.77771
-% \glue(\thickmuskip) 2.77771 plus 2.77771
-% \OMS/cmsy/m/n/10 (
-% \hbox(0.0+0.0)x-1.66663
-% .\kern -1.66663
-% \OMS/cmsy/m/n/10 )
-% \penalty 500
-% \glue 2.77771 plus 2.77771
-% \glue(\thickmuskip) 2.77771 plus 2.77771
-% \end{verbatim}
-% Looks like it could be simplified slightly. But it's not so
-% easy as it looks to do it without screwing up the line breaking
-% possibilities.
-% \begin{macrocode}
-\renewcommand*\iff{%
- \mskip\thickmuskip\Longleftrightarrow\mskip\thickmuskip
-}
-% \end{macrocode}
-% Some dotly symbols.
-% \begin{macrocode}
-\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}%
-\DeclareFlexCompoundSymbol{\vdots}{Ord}{%
- \vbox{\baselineskip4\p@ \lineskiplimit\z@
- \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
-\DeclareFlexCompoundSymbol{\ddots}{Inn}{%
- \mkern1mu\raise7\p@
- \vbox{\kern7\p@\hbox{.}}\mkern2mu%
- \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu%
-}
-% \end{macrocode}
-% .
-% \begin{macrocode}
-\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
- \mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
-% \end{macrocode}
-% For \cs{Relbar} we take an equal sign of class $0$ (Ord) from the
-% operator family. For \fn{cmr} and \pkg{mathptmx} we know this is
-% family $0$.
-% \begin{macrocode}
-%<cmbase|mathptmx>\def\Relbar{\mathchar"3D }
-% \end{macrocode}
-% For the \pkg{mathpazo} setup we need to use the equal sign from
-% \fn{cmr} and so must insert class $0$ and use the symbol from the
-% upright symbols.
-% \begin{macrocode}
-%<mathpazo>\edef\Relbar{\mathchar\string"\hexnumber@\symupright3D }
-% \end{macrocode}
-% Done.
-% \begin{macrocode}
-\ExplSyntaxOff
-%</cmbase|mathpazo|mathptmx>
-% \end{macrocode}
-% Various synonyms such as \cs{le} for \cs{leq} and
-% \cs{to} for \cs{rightarrow} are defined in
-% \pkg{flexisym} with \cs{def} instead of \cs{let}, for
-% slower execution speed but smaller chance of synchronization
-% problems.
-%
-%
-%
-% \begin{macrocode}
-%<*msabm>
-\ProvidesSymbols{msabm}[2001/09/08 v0.91]
-\ExplSyntaxOn
-% \end{macrocode}
-% \begin{macrocode}
-\RequirePackage{amsfonts}\relax
-% \end{macrocode}
-% \begin{macrocode}
-\cs_gset:cpx{mg@MSA}{\hexnumber@\symAMSa}%
-\cs_gset:cpx{mg@MSB}{\hexnumber@\symAMSb}%
-% \end{macrocode}
-% \begin{macrocode}
-\DeclareFlexSymbol{\boxdot} {Bin}{MSA}{00}
-\DeclareFlexSymbol{\boxplus} {Bin}{MSA}{01}
-\DeclareFlexSymbol{\boxtimes} {Bin}{MSA}{02}
-\DeclareFlexSymbol{\square} {Ord}{MSA}{03}
-\DeclareFlexSymbol{\blacksquare} {Ord}{MSA}{04}
-\DeclareFlexSymbol{\centerdot} {Bin}{MSA}{05}
-\DeclareFlexSymbol{\lozenge} {Ord}{MSA}{06}
-\DeclareFlexSymbol{\blacklozenge} {Ord}{MSA}{07}
-\DeclareFlexSymbol{\circlearrowright} {Rel}{MSA}{08}
-\DeclareFlexSymbol{\circlearrowleft} {Rel}{MSA}{09}
-% \end{macrocode}
-% In amsfonts.sty:
-% \begin{macrocode}
-%%\DeclareFlexSymbol{\rightleftharpoons}{Rel}{MSA}{0A}
-\DeclareFlexSymbol{\leftrightharpoons} {Rel}{MSA}{0B}
-\DeclareFlexSymbol{\boxminus} {Bin}{MSA}{0C}
-\DeclareFlexSymbol{\Vdash} {Rel}{MSA}{0D}
-\DeclareFlexSymbol{\Vvdash} {Rel}{MSA}{0E}
-\DeclareFlexSymbol{\vDash} {Rel}{MSA}{0F}
-\DeclareFlexSymbol{\twoheadrightarrow} {Rel}{MSA}{10}
-\DeclareFlexSymbol{\twoheadleftarrow} {Rel}{MSA}{11}
-\DeclareFlexSymbol{\leftleftarrows} {Rel}{MSA}{12}
-\DeclareFlexSymbol{\rightrightarrows} {Rel}{MSA}{13}
-\DeclareFlexSymbol{\upuparrows} {Rel}{MSA}{14}
-\DeclareFlexSymbol{\downdownarrows} {Rel}{MSA}{15}
-\DeclareFlexSymbol{\upharpoonright} {Rel}{MSA}{16}
- \let\restriction\upharpoonright
-\DeclareFlexSymbol{\downharpoonright} {Rel}{MSA}{17}
-\DeclareFlexSymbol{\upharpoonleft} {Rel}{MSA}{18}
-\DeclareFlexSymbol{\downharpoonleft}{Rel}{MSA}{19}
-\DeclareFlexSymbol{\rightarrowtail} {Rel}{MSA}{1A}
-\DeclareFlexSymbol{\leftarrowtail} {Rel}{MSA}{1B}
-\DeclareFlexSymbol{\leftrightarrows}{Rel}{MSA}{1C}
-\DeclareFlexSymbol{\rightleftarrows}{Rel}{MSA}{1D}
-\DeclareFlexSymbol{\Lsh} {Rel}{MSA}{1E}
-\DeclareFlexSymbol{\Rsh} {Rel}{MSA}{1F}
-\DeclareFlexSymbol{\rightsquigarrow} {Rel}{MSA}{20}
-\DeclareFlexSymbol{\leftrightsquigarrow}{Rel}{MSA}{21}
-\DeclareFlexSymbol{\looparrowleft} {Rel}{MSA}{22}
-\DeclareFlexSymbol{\looparrowright} {Rel}{MSA}{23}
-\DeclareFlexSymbol{\circeq} {Rel}{MSA}{24}
-\DeclareFlexSymbol{\succsim} {Rel}{MSA}{25}
-\DeclareFlexSymbol{\gtrsim} {Rel}{MSA}{26}
-\DeclareFlexSymbol{\gtrapprox} {Rel}{MSA}{27}
-\DeclareFlexSymbol{\multimap} {Rel}{MSA}{28}
-\DeclareFlexSymbol{\therefore} {Rel}{MSA}{29}
-\DeclareFlexSymbol{\because} {Rel}{MSA}{2A}
-\DeclareFlexSymbol{\doteqdot} {Rel}{MSA}{2B}
- \let\Doteq\doteqdot
-\DeclareFlexSymbol{\triangleq} {Rel}{MSA}{2C}
-\DeclareFlexSymbol{\precsim} {Rel}{MSA}{2D}
-\DeclareFlexSymbol{\lesssim} {Rel}{MSA}{2E}
-\DeclareFlexSymbol{\lessapprox} {Rel}{MSA}{2F}
-\DeclareFlexSymbol{\eqslantless} {Rel}{MSA}{30}
-\DeclareFlexSymbol{\eqslantgtr} {Rel}{MSA}{31}
-\DeclareFlexSymbol{\curlyeqprec} {Rel}{MSA}{32}
-\DeclareFlexSymbol{\curlyeqsucc} {Rel}{MSA}{33}
-\DeclareFlexSymbol{\preccurlyeq} {Rel}{MSA}{34}
-\DeclareFlexSymbol{\leqq} {Rel}{MSA}{35}
-\DeclareFlexSymbol{\leqslant} {Rel}{MSA}{36}
-\DeclareFlexSymbol{\lessgtr} {Rel}{MSA}{37}
-\DeclareFlexSymbol{\backprime} {Ord}{MSA}{38}
-\DeclareFlexSymbol{\risingdotseq} {Rel}{MSA}{3A}
-\DeclareFlexSymbol{\fallingdotseq}{Rel}{MSA}{3B}
-\DeclareFlexSymbol{\succcurlyeq} {Rel}{MSA}{3C}
-\DeclareFlexSymbol{\geqq} {Rel}{MSA}{3D}
-\DeclareFlexSymbol{\geqslant} {Rel}{MSA}{3E}
-\DeclareFlexSymbol{\gtrless} {Rel}{MSA}{3F}
-% \end{macrocode}
-% in amsfonts.sty
-% \begin{macrocode}
-%% \DeclareFlexSymbol{\sqsubset} {Rel}{MSA}{40}
-%% \DeclareFlexSymbol{\sqsupset} {Rel}{MSA}{41}
-\DeclareFlexSymbol{\vartriangleright}{Rel}{MSA}{42}
-\DeclareFlexSymbol{\vartriangleleft} {Rel}{MSA}{43}
-\DeclareFlexSymbol{\trianglerighteq} {Rel}{MSA}{44}
-\DeclareFlexSymbol{\trianglelefteq} {Rel}{MSA}{45}
-\DeclareFlexSymbol{\bigstar} {Ord}{MSA}{46}
-\DeclareFlexSymbol{\between} {Rel}{MSA}{47}
-\DeclareFlexSymbol{\blacktriangledown} {Ord}{MSA}{48}
-\DeclareFlexSymbol{\blacktriangleright} {Rel}{MSA}{49}
-\DeclareFlexSymbol{\blacktriangleleft} {Rel}{MSA}{4A}
-\DeclareFlexSymbol{\vartriangle} {Rel}{MSA}{4D}
-\DeclareFlexSymbol{\blacktriangle} {Ord}{MSA}{4E}
-\DeclareFlexSymbol{\triangledown} {Ord}{MSA}{4F}
-\DeclareFlexSymbol{\eqcirc} {Rel}{MSA}{50}
-\DeclareFlexSymbol{\lesseqgtr} {Rel}{MSA}{51}
-\DeclareFlexSymbol{\gtreqless} {Rel}{MSA}{52}
-\DeclareFlexSymbol{\lesseqqgtr} {Rel}{MSA}{53}
-\DeclareFlexSymbol{\gtreqqless} {Rel}{MSA}{54}
-\DeclareFlexSymbol{\Rrightarrow} {Rel}{MSA}{56}
-\DeclareFlexSymbol{\Lleftarrow} {Rel}{MSA}{57}
-\DeclareFlexSymbol{\veebar} {Bin}{MSA}{59}
-\DeclareFlexSymbol{\barwedge} {Bin}{MSA}{5A}
-\DeclareFlexSymbol{\doublebarwedge} {Bin}{MSA}{5B}
-% \end{macrocode}
-% In amsfonts.sty
-% \begin{macrocode}
-%%\DeclareFlexSymbol{\angle} {Ord}{MSA}{5C}
-\DeclareFlexSymbol{\measuredangle} {Ord}{MSA}{5D}
-\DeclareFlexSymbol{\sphericalangle} {Ord}{MSA}{5E}
-\DeclareFlexSymbol{\varpropto} {Rel}{MSA}{5F}
-\DeclareFlexSymbol{\smallsmile} {Rel}{MSA}{60}
-\DeclareFlexSymbol{\smallfrown} {Rel}{MSA}{61}
-\DeclareFlexSymbol{\Subset} {Rel}{MSA}{62}
-\DeclareFlexSymbol{\Supset} {Rel}{MSA}{63}
-\DeclareFlexSymbol{\Cup} {Bin}{MSA}{64}
- \let\doublecup\Cup
-\DeclareFlexSymbol{\Cap} {Bin}{MSA}{65}
- \let\doublecap\Cap
-\DeclareFlexSymbol{\curlywedge} {Bin}{MSA}{66}
-\DeclareFlexSymbol{\curlyvee} {Bin}{MSA}{67}
-\DeclareFlexSymbol{\leftthreetimes} {Bin}{MSA}{68}
-\DeclareFlexSymbol{\rightthreetimes}{Bin}{MSA}{69}
-\DeclareFlexSymbol{\subseteqq} {Rel}{MSA}{6A}
-\DeclareFlexSymbol{\supseteqq} {Rel}{MSA}{6B}
-\DeclareFlexSymbol{\bumpeq} {Rel}{MSA}{6C}
-\DeclareFlexSymbol{\Bumpeq} {Rel}{MSA}{6D}
-\DeclareFlexSymbol{\lll} {Rel}{MSA}{6E}
- \let\llless\lll
-\DeclareFlexSymbol{\ggg} {Rel}{MSA}{6F}
- \let\gggtr\ggg
-\DeclareFlexSymbol{\circledS} {Ord}{MSA}{73}
-\DeclareFlexSymbol{\pitchfork} {Rel}{MSA}{74}
-\DeclareFlexSymbol{\dotplus} {Bin}{MSA}{75}
-\DeclareFlexSymbol{\backsim} {Rel}{MSA}{76}
-\DeclareFlexSymbol{\backsimeq} {Rel}{MSA}{77}
-\DeclareFlexSymbol{\complement} {Ord}{MSA}{7B}
-\DeclareFlexSymbol{\intercal} {Bin}{MSA}{7C}
-\DeclareFlexSymbol{\circledcirc} {Bin}{MSA}{7D}
-\DeclareFlexSymbol{\circledast} {Bin}{MSA}{7E}
-\DeclareFlexSymbol{\circleddash} {Bin}{MSA}{7F}
-% \end{macrocode}
-% Begin AMSb declarations
-% \begin{macrocode}
-\DeclareFlexSymbol{\lvertneqq} {Rel}{MSB}{00}
-\DeclareFlexSymbol{\gvertneqq} {Rel}{MSB}{01}
-\DeclareFlexSymbol{\nleq} {Rel}{MSB}{02}
-\DeclareFlexSymbol{\ngeq} {Rel}{MSB}{03}
-\DeclareFlexSymbol{\nless} {Rel}{MSB}{04}
-\DeclareFlexSymbol{\ngtr} {Rel}{MSB}{05}
-\DeclareFlexSymbol{\nprec} {Rel}{MSB}{06}
-\DeclareFlexSymbol{\nsucc} {Rel}{MSB}{07}
-\DeclareFlexSymbol{\lneqq} {Rel}{MSB}{08}
-\DeclareFlexSymbol{\gneqq} {Rel}{MSB}{09}
-\DeclareFlexSymbol{\nleqslant} {Rel}{MSB}{0A}
-\DeclareFlexSymbol{\ngeqslant} {Rel}{MSB}{0B}
-\DeclareFlexSymbol{\lneq} {Rel}{MSB}{0C}
-\DeclareFlexSymbol{\gneq} {Rel}{MSB}{0D}
-\DeclareFlexSymbol{\npreceq} {Rel}{MSB}{0E}
-\DeclareFlexSymbol{\nsucceq} {Rel}{MSB}{0F}
-\DeclareFlexSymbol{\precnsim} {Rel}{MSB}{10}
-\DeclareFlexSymbol{\succnsim} {Rel}{MSB}{11}
-\DeclareFlexSymbol{\lnsim} {Rel}{MSB}{12}
-\DeclareFlexSymbol{\gnsim} {Rel}{MSB}{13}
-\DeclareFlexSymbol{\nleqq} {Rel}{MSB}{14}
-\DeclareFlexSymbol{\ngeqq} {Rel}{MSB}{15}
-\DeclareFlexSymbol{\precneqq} {Rel}{MSB}{16}
-\DeclareFlexSymbol{\succneqq} {Rel}{MSB}{17}
-\DeclareFlexSymbol{\precnapprox} {Rel}{MSB}{18}
-\DeclareFlexSymbol{\succnapprox} {Rel}{MSB}{19}
-\DeclareFlexSymbol{\lnapprox} {Rel}{MSB}{1A}
-\DeclareFlexSymbol{\gnapprox} {Rel}{MSB}{1B}
-\DeclareFlexSymbol{\nsim} {Rel}{MSB}{1C}
-\DeclareFlexSymbol{\ncong} {Rel}{MSB}{1D}
-\DeclareFlexSymbol{\diagup} {Ord}{MSB}{1E}
-\DeclareFlexSymbol{\diagdown} {Ord}{MSB}{1F}
-\DeclareFlexSymbol{\varsubsetneq} {Rel}{MSB}{20}
-\DeclareFlexSymbol{\varsupsetneq} {Rel}{MSB}{21}
-\DeclareFlexSymbol{\nsubseteqq} {Rel}{MSB}{22}
-\DeclareFlexSymbol{\nsupseteqq} {Rel}{MSB}{23}
-\DeclareFlexSymbol{\subsetneqq} {Rel}{MSB}{24}
-\DeclareFlexSymbol{\supsetneqq} {Rel}{MSB}{25}
-\DeclareFlexSymbol{\varsubsetneqq} {Rel}{MSB}{26}
-\DeclareFlexSymbol{\varsupsetneqq} {Rel}{MSB}{27}
-\DeclareFlexSymbol{\subsetneq} {Rel}{MSB}{28}
-\DeclareFlexSymbol{\supsetneq} {Rel}{MSB}{29}
-\DeclareFlexSymbol{\nsubseteq} {Rel}{MSB}{2A}
-\DeclareFlexSymbol{\nsupseteq} {Rel}{MSB}{2B}
-\DeclareFlexSymbol{\nparallel} {Rel}{MSB}{2C}
-\DeclareFlexSymbol{\nmid} {Rel}{MSB}{2D}
-\DeclareFlexSymbol{\nshortmid} {Rel}{MSB}{2E}
-\DeclareFlexSymbol{\nshortparallel} {Rel}{MSB}{2F}
-\DeclareFlexSymbol{\nvdash} {Rel}{MSB}{30}
-\DeclareFlexSymbol{\nVdash} {Rel}{MSB}{31}
-\DeclareFlexSymbol{\nvDash} {Rel}{MSB}{32}
-\DeclareFlexSymbol{\nVDash} {Rel}{MSB}{33}
-\DeclareFlexSymbol{\ntrianglerighteq}{Rel}{MSB}{34}
-\DeclareFlexSymbol{\ntrianglelefteq}{Rel}{MSB}{35}
-\DeclareFlexSymbol{\ntriangleleft} {Rel}{MSB}{36}
-\DeclareFlexSymbol{\ntriangleright} {Rel}{MSB}{37}
-\DeclareFlexSymbol{\nleftarrow} {Rel}{MSB}{38}
-\DeclareFlexSymbol{\nrightarrow} {Rel}{MSB}{39}
-\DeclareFlexSymbol{\nLeftarrow} {Rel}{MSB}{3A}
-\DeclareFlexSymbol{\nRightarrow} {Rel}{MSB}{3B}
-\DeclareFlexSymbol{\nLeftrightarrow}{Rel}{MSB}{3C}
-\DeclareFlexSymbol{\nleftrightarrow}{Rel}{MSB}{3D}
-\DeclareFlexSymbol{\divideontimes} {Bin}{MSB}{3E}
-\DeclareFlexSymbol{\varnothing} {Ord}{MSB}{3F}
-\DeclareFlexSymbol{\nexists} {Ord}{MSB}{40}
-\DeclareFlexSymbol{\Finv} {Ord}{MSB}{60}
-\DeclareFlexSymbol{\Game} {Ord}{MSB}{61}
-% \end{macrocode}
-% In amsfonts.sty:
-% \begin{macrocode}
-%%\DeclareFlexSymbol{\mho} {Ord}{MSB}{66}
-\DeclareFlexSymbol{\eth} {Ord}{MSB}{67}
-\DeclareFlexSymbol{\eqsim} {Rel}{MSB}{68}
-\DeclareFlexSymbol{\beth} {Ord}{MSB}{69}
-\DeclareFlexSymbol{\gimel} {Ord}{MSB}{6A}
-\DeclareFlexSymbol{\daleth} {Ord}{MSB}{6B}
-\DeclareFlexSymbol{\lessdot} {Bin}{MSB}{6C}
-\DeclareFlexSymbol{\gtrdot} {Bin}{MSB}{6D}
-\DeclareFlexSymbol{\ltimes} {Bin}{MSB}{6E}
-\DeclareFlexSymbol{\rtimes} {Bin}{MSB}{6F}
-\DeclareFlexSymbol{\shortmid} {Rel}{MSB}{70}
-\DeclareFlexSymbol{\shortparallel} {Rel}{MSB}{71}
-\DeclareFlexSymbol{\smallsetminus} {Bin}{MSB}{72}
-\DeclareFlexSymbol{\thicksim} {Rel}{MSB}{73}
-\DeclareFlexSymbol{\thickapprox} {Rel}{MSB}{74}
-\DeclareFlexSymbol{\approxeq} {Rel}{MSB}{75}
-\DeclareFlexSymbol{\succapprox} {Rel}{MSB}{76}
-\DeclareFlexSymbol{\precapprox} {Rel}{MSB}{77}
-\DeclareFlexSymbol{\curvearrowleft} {Rel}{MSB}{78}
-\DeclareFlexSymbol{\curvearrowright}{Rel}{MSB}{79}
-\DeclareFlexSymbol{\digamma} {Ord}{MSB}{7A}
-\DeclareFlexSymbol{\varkappa} {Ord}{MSB}{7B}
-\DeclareFlexSymbol{\Bbbk} {Ord}{MSB}{7C}
-\DeclareFlexSymbol{\hslash} {Ord}{MSB}{7D}
-% \end{macrocode}
-% In amsfonts.sty:
-% \begin{macrocode}
-%%\DeclareFlexSymbol{\hbar} {Ord}{MSB}{7E}
-\DeclareFlexSymbol{\backepsilon} {Rel}{MSB}{7F}
-\ExplSyntaxOff
-%</msabm>
-% \end{macrocode}
-%
-% \PrintIndex
-%
-% \Finale
diff --git a/Master/texmf-dist/source/latex/mh/mathstyle.dtx b/Master/texmf-dist/source/latex/mh/mathstyle.dtx
deleted file mode 100644
index a3d33a58efa..00000000000
--- a/Master/texmf-dist/source/latex/mh/mathstyle.dtx
+++ /dev/null
@@ -1,493 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 1997-2003 by Michael J. Downes
-% 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
-% 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, 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.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/mathstyle.dtx
-% CTAN:macros/latex/contrib/mh/mathstyle.pdf
-%
-% Unpacking:
-% (a) If mathstyle.ins is present:
-% tex mathstyle.ins
-% (b) Without mathstyle.ins:
-% tex mathstyle.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{mathstyle.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If mathstyle.drv is present:
-% latex mathstyle.drv
-% (b) Without mathstyle.drv:
-% latex mathstyle.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex mathstyle.dtx
-% makeindex -s gind.ist mathstyle.idx
-% pdflatex mathstyle.dtx
-% makeindex -s gind.ist mathstyle.idx
-% pdflatex mathstyle.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/mathstyle.sty
-% TDS:doc/latex/mh/mathstyle.pdf
-% TDS:source/latex/mh/mathstyle.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation for package: mathstyle}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 1997-2003 by Michael J. Downes
-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
-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, 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.
-
-\endpreamble
-
-\generate{%
- \file{mathstyle.ins}{\from{mathstyle.dtx}{install}}%
- \file{mathstyle.drv}{\from{mathstyle.dtx}{driver}}%
- \usedir{tex/latex/mh}%
- \file{mathstyle.sty}{\from{mathstyle.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{* mathstyle.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `mathstyle.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*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>
-\documentclass{ltxdoc}
-\CodelineIndex
-\EnableCrossrefs
-\setcounter{IndexColumns}{2}
-\providecommand*\pkg[1]{\textsf{#1}}
-\begin{document}
- \DocInput{mathstyle.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \GetFileInfo{mathstyle.drv}
-% \title{The \textsf{mathstyle} package}
-% \date{\filedate\quad\fileversion}
-% \author{Morten H\o gholm \\Maintainers: \texttt{mh.ctan@gmail.com}}
-%
-%
-% \maketitle
-%
-% \part*{User's guide}
-%
-% This package exists for two reasons:
-% \begin{itemize}
-% \item The primitive operations for creating a super- or subscript in
-% \TeX\ work almost as if \verb|^| and \verb|_| are macros taking an
-% argument. However, that is not quite the case, and
-% some things that you'd expect to work don't (e.g., \verb|^\cong|)
-% whereas others which you'd think shouldn't work actually
-% do (such as |^\mathsf{s}|). We do everyone a favor if it behaves
-% consistently, i.e., if the superscript and subscript operations
-% act as if they are macros taking exactly one argument.
-%
-% \item Because the \TeX\ math typesetting engine uses infix notation
-% for fractions, one has to use \cs{mathchoice} or \cs{mathpalette}
-% whenever trying to do anything requiring boxing or measuring
-% math. This creates problems for loading fonts on demand as the
-% font loading mechanism has to load fonts for all styles without
-% even knowing if the font is going to be used. Getting the timing
-% of \cs{mathchoice} right can be tricky as well. Since \LaTeX\ does
-% not promote the primitive infix notation, this package keeps track
-% of a current mathstyle parameter.
-% \end{itemize}
-%
-%
-% \section{Some usage tips}
-%
-% If you want to use this package with \pkg{amsmath}, it is important
-% \pkg{mathstyle} is loaded \emph{after} \pkg{amsmath}.
-%
-% The current mathstyle is stored in the variable \cs{mathstyle}. The
-% command \cs{currentmathstyle} can be used to switch to the mode
-% currently active. Below is shown how the macro \cs{mathrlap} from
-% \pkg{mathtools} is implemented without knowing about the current
-% mathstyle using \cs{mathpalette}.
-% \begin{verbatim}
-% \providecommand*\mathrlap[1][]{%
-% \ifx\@empty#1\@empty
-% \expandafter \mathpalette \expandafter \@mathrlap
-% \else
-% \expandafter \@mathrlap \expandafter #1%
-% \fi}
-% \providecommand*\@mathrlap #1#2{{}\rlap{$\m@th#1{#2}$}}
-% \end{verbatim}
-% The same definition using \cs{currentmathstyle} from this package.
-% \begin{verbatim}
-% \providecommand*\mathrlap[2][]{%
-% #1 {}\rlap{$\m@th \currentmathstyle {#2}$}}
-% \end{verbatim}
-%
-% \subsection{Package options}
-%
-% This package has one set of options affecting the \verb|_| and \verb|^| characters:
-%
-% \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>
-% \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
-% use \cs{primitive} to get the original. We will implement that
-% some day.
-% \begin{macrocode}
-\providecommand\@saveprimitive[2]{%
- \begingroup
- \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
- \ifx\@tempa\@tempb \global\let#2#1%
- \else
- \edef\@tempb{\meaning#2}%
- \ifx\@tempa\@tempb
- \else \@saveprimitive@a#1#2%
- \fi
- \fi
- \endgroup
-}
-\providecommand\@saveprimitive@a[2]{%
- \begingroup
- \def\@tempb##1#1##2{\edef\@tempb{##2}\@car{}}%
- \@tempb\nullfont{select font nullfont}%
- \topmark{\string\topmark:}%
- \firstmark{\string\firstmark:}%
- \botmark{\string\botmark:}%
- \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%
- \else
- \PackageError{mathstyle}%
- {Unable to properly define \string#2; primitive
- \noexpand#1no longer primitive}\@eha
- \fi
- \fi
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \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}
-\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}
-\@saveprimitive\displaystyle\@@displaystyle
-\@saveprimitive\textstyle\@@textstyle
-\@saveprimitive\scriptstyle\@@scriptstyle
-\@saveprimitive\scriptscriptstyle\@@scriptscriptstyle
-\@saveprimitive\mathchoice\@@mathchoice
-\@saveprimitive\over\@@over
-\@saveprimitive\atop\@@atop
-\@saveprimitive\above\@@above
-\@saveprimitive\overwithdelims\@@overwithdelims
-\@saveprimitive\atopwithdelims\@@atopwithdelims
-\@saveprimitive\abovewithdelims\@@abovewithdelims
-% \end{macrocode}
-% Then we redeclare the four style changing primitives.
-% \begin{macrocode}
-\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
-\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\@ne}
-\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle\tw@}
-\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle\thr@@}
-% \end{macrocode}
-% First we get the primitive operations. These should have been
-% control sequences in \TeX\ just like operations for begin math, end
-% math, begin display, end display.
-% \begin{macrocode}
-\begingroup \catcode`\^=7\relax \catcode`\_=8\relax % just in case
-\lowercase{\endgroup
-\let\@@superscript=^ \let\@@subscript=_
-}%
-\begingroup \catcode`\^=12\relax \catcode`\_=12\relax % just in case
-\lowercase{\endgroup
-\let\@@superscript@other=^ \let\@@subscript@other=_
-}%
-% \end{macrocode}
-% If we enter a sub- or superscript the \cs{mathstyle} must be
-% adjusted. Since all is happening in a group, we do not have to worry
-% about resetting.
-% \begin{macrocode}
-\def\subsupstyle{%
- \ifnum\mathstyle<\tw@ \chardef\mathstyle\tw@
- \else \chardef\mathstyle\thr@@
- \fi
-}
-% \end{macrocode}
-% Provide commands with meaningful names for the two primitives, cf.\
-% \cs{mathrel}.
-% \begin{macrocode}
-\let\mathsup=\@@superscript
-\let\mathsub=\@@subscript
-% \end{macrocode}
-% \cs{sb} and \cs{sp} are then defined as macros.
-% \begin{macrocode}
-\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.
-% \begin{macrocode}
-\def\mathchoice{%
- \relax\ifcase\mathstyle
- \expandafter\@firstoffour
- \or
- \expandafter\@secondoffour
- \or
- \expandafter\@thirdoffour
- \else
- \expandafter\@fourthoffour
- \fi
-}
-% \end{macrocode}
-% Helper macros.
-% \begin{macrocode}
-\providecommand\@firstoffour[4]{#1}
-\providecommand\@secondoffour[4]{#2}
-\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]{%
- {#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}{}
-\renewcommand{\dfrac}{\genfrac\displaystyle{}{}{}}
-\renewcommand{\tfrac}{\genfrac\textstyle{}{}{}}
-\providecommand{\binom}{}
-\providecommand{\tbinom}{}
-\providecommand{\dbinom}{}
-\renewcommand{\binom}{\genfrac{}(){0pt}}
-\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
-\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
-% \end{macrocode}
-% The \cs{fracstyle} command is a switch to go one level down but no
-% further than three.
-% \begin{macrocode}
-\def\fracstyle{\ifcase\mathstyle
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
- \fi
-}
-% \end{macrocode}
-% The \cs{currentmathstyle} checks the value of \cs{mathstyle} and
-% switches to it so it is in essence the opposite of \cs{displaystyle}
-% and friends.
-% \begin{macrocode}
-\def\currentmathstyle{%
- \ifcase\mathstyle
- \@@displaystyle
- \or
- \@@textstyle
- \or
- \@@scriptstyle
- \or
- \@@scriptscriptstyle
- \fi}
-% \end{macrocode}
-% Finally, we declare the package options.
-% \changes{v0.89}{2010/11/17}{Options should only change catcodes at
-% begin document, not straight away}
-% \begin{macrocode}
-\DeclareOption{mathactivechars}{%
- % \catcode`\^=12\relax
- % \catcode`\_=12\relax
-\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
-}
-\DeclareOption{activechars}{%
- % \catcode`\^=13\relax
- % \catcode`\_=13\relax
-\AtBeginDocument{\catcode`\^=13\relax \catcode`\_=13\relax}%
-}
-\DeclareOption{noactivechars}{%
- % \catcode`\^=7\relax
- % \catcode`\_=8\relax
-\AtBeginDocument{\catcode`\^=7\relax \catcode`\_=8\relax}%
-}
-\ExecuteOptions{mathactivechars}
-\ProcessOptions\relax
-% \end{macrocode}
-% WSPR: Set up the active behaviours: (this is set even in the
-% |noactivechars| case but they are never activated. no worries?)
-% \begin{macrocode}
-\ifnum\catcode`\^=13\relax
- \let^=\sp \let_=\sb
-\else
- \mathcode`\^="8000\relax
- \mathcode`\_="8000\relax
- \begingroup
- \catcode`\^=\active
- \catcode`\_=\active
- \global\let^=\sp
- \global\let_=\sb
- \endgroup
-\fi
-%</package>
-% \end{macrocode}
-%
-% \PrintIndex
-%
-% \Finale
diff --git a/Master/texmf-dist/source/latex/mh/mathtools.dtx b/Master/texmf-dist/source/latex/mh/mathtools.dtx
deleted file mode 100644
index 350f21ee8bc..00000000000
--- a/Master/texmf-dist/source/latex/mh/mathtools.dtx
+++ /dev/null
@@ -1,5705 +0,0 @@
-% \iffalse meta-comment
-%
-% Copyright (C) 2004-2011 by Morten Hoegholm
-% Copyright (C) 2012- by Lars Madsen
-%
-% 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, Will Robertson and Joseph Wright
-%
-% This work consists of the main source file mathtools.dtx
-% and the derived files
-% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/mathtools.dtx
-% CTAN:macros/latex/contrib/mh/mathtools.pdf
-%
-% Unpacking:
-% (a) If mathtools.ins is present:
-% tex mathtools.ins
-% (b) Without mathtools.ins:
-% tex mathtools.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{mathtools.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If mathtools.drv is present:
-% latex mathtools.drv
-% (b) Without mathtools.drv:
-% latex mathtools.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex mathtools.dtx
-% makeindex -s gind.ist mathtools.idx
-% pdflatex mathtools.dtx
-% makeindex -s gind.ist mathtools.idx
-% pdflatex mathtools.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/mathtools.sty
-% TDS:doc/latex/mh/mathtools.pdf
-% TDS:source/latex/mh/mathtools.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: mathtools 2014/05/21 v1.14}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-Copyright (C) 2002-2011 by Morten Hoegholm
-Copyright (C) 2012- by Lars Madsen
-
-
-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, Will Robertson and Joseph Wright.
-
-This work consists of the main source file mathtools.dtx
-and the derived files
- mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
-
-\endpreamble
-
-\generate{%
- \file{mathtools.ins}{\from{mathtools.dtx}{install}}%
- \file{mathtools.drv}{\from{mathtools.dtx}{driver}}%
- \usedir{tex/latex/mh}%
- \file{mathtools.sty}{\from{mathtools.dtx}{package}}%
-}
-
-\obeyspaces
-\Msg{************************************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to move the following}
-\Msg{* file into a directory searched by TeX:}
-\Msg{*}
-\Msg{* mathtools.sty}
-\Msg{*}
-\Msg{* To produce the documentation run the file `mathtools.drv'}
-\Msg{* through LaTeX.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*}
-\Msg{************************************************************************}
-
-\endbatchfile
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{mathtools.drv}%
- [2014/05/21 v1.14 mathematical typesetting tools]
-\documentclass{ltxdoc}
-\IfFileExists{fourier.sty}{\usepackage{fourier}}{}
-\addtolength\marginparwidth{-25pt}
-\usepackage{mathtools}
-
-\setcounter{IndexColumns}{2}
-
-\providecommand*\pkg[1]{\textsf{#1}}
-\providecommand*\env[1]{\texttt{#1}}
-\providecommand*\email[1]{\href{mailto:#1}{\texttt{#1}}}
-\providecommand*\mode[1]{\texttt{[#1]}}
-\providecommand*\file[1]{\texttt{#1}}
-\usepackage{xcolor,varioref,amssymb}
-\makeatletter
-\newcommand*\thinfbox[2][black]{\fboxsep0pt\textcolor{#1}{\rulebox{{\normalcolor#2}}}}
-\newcommand*\thinboxed[2][black]{\thinfbox[#1]{\ensuremath{\displaystyle#2}}}
-\newcommand*\rulebox[1]{%
- \sbox\z@{\ensuremath{\displaystyle#1}}%
- \@tempdima\dp\z@
- \hbox{%
- \lower\@tempdima\hbox{%
- \vbox{\hrule height\fboxrule\box\z@\hrule height\fboxrule}%
- }%
- }%
-}
-
-\newenvironment{codesyntax}
- {\par\small\addvspace{4.5ex plus 1ex}%
- \vskip -\parskip
- \noindent
- \begin{tabular}{|l|}\hline\ignorespaces}%
- {\\\hline\end{tabular}\nobreak\par\nobreak
- \vspace{2.3ex}\vskip -\parskip\noindent\ignorespacesafterend}
-\makeatletter
-
-\newcommand*\FeatureRequest[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Feature request by\\#1\\#2%
- }
- }%
-}
-
-
-\newcommand*\ProvidedBy[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Feature provided by\\#1\\#2%
- }
- }%
-}
-
-\newcommand*\cttPosting[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Posted on \texttt{comp.text.tex} \\#1\\#2%
- }%
- }%
-}
-
-\newcommand*\tsxPosting[2]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Posted on \texttt{\small tex.stackexchange.com} \\#1\\#2%
- }%
- }%
-}
-\newcommand*\CommentAdded[1]{%
- \hskip1sp
- \marginpar{%
- \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
- \strut Comment added\\#1%
- }%
- }%
-}
-
-
-\expandafter\def\expandafter\MakePrivateLetters\expandafter{%
- \MakePrivateLetters \catcode`\_=11\relax
-}
-
-\providecommand*\SpecialOptIndex[1]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily #1}
- (option)\encapchar usage}%
- \index{options:\levelchar#1\actualchar{\protect\ttfamily #1}\encapchar
- usage}\@esphack}
-\providecommand*\opt[1]{\texttt{#1}}
-
-\providecommand*\SpecialKeyIndex[1]{%
- \@bsphack
- \index{#1\actualchar{\protect\ttfamily #1}
- (key)\encapchar usage}%
- \index{keys:\levelchar#1\actualchar{\protect\ttfamily #1}\encapchar
- usage}\@esphack}
-\providecommand*\key[1]{\textsf{#1}}
-
-\providecommand*\eTeX{$\m@th\varepsilon$-\TeX}
-
-\def\MTmeta#1{%
- \ensuremath\langle
- \ifmmode \expandafter \nfss@text \fi
- {%
- \meta@font@select
- \edef\meta@hyphen@restore
- {\hyphenchar\the\font\the\hyphenchar\font}%
- \hyphenchar\font\m@ne
- \language\l@nohyphenation
- #1\/%
- \meta@hyphen@restore
- }\ensuremath\rangle
- \endgroup
-}
-\makeatother
-\DeclareRobustCommand\meta{\begingroup\MakePrivateLetters\MTmeta}%
-\def\MToarg#1{{\ttfamily[}\meta{#1}{\ttfamily]}\endgroup}
-\DeclareRobustCommand\oarg{\begingroup\MakePrivateLetters\MToarg}%
-\def\MHmarg#1{{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\marg{\begingroup\MakePrivateLetters\MHmarg}%
-\def\MHarg#1{{\ttfamily\char`\{#1\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\arg{\begingroup\MakePrivateLetters\MHarg}%
-\def\MHcs#1{\texttt{\char`\\#1}\endgroup}
-\DeclareRobustCommand\cs{\begingroup\MakePrivateLetters\MHcs}
-
-\def\endverbatim{\if@newlist
-\leavevmode\fi\endtrivlist\vspace{-\baselineskip}}
-\expandafter\let\csname endverbatim*\endcsname =\endverbatim
-
-\let\MTtheindex\theindex
-\def\theindex{\MTtheindex\MakePrivateLetters}
-
-\usepackage[final,hyperindex=false]{hyperref}
-\renewcommand*\usage[1]{\textit{\hyperpage{#1}}}
-
-\OnlyDescription
-\begin{document}
- \DocInput{mathtools.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \changes{v1.0}{2004/07/26}{Initial release}
-%
-% \GetFileInfo{mathtools.drv}
-%
-% \CheckSum{3095}
-%
-% \title{The \pkg{mathtools} package\thanks{This file has version number
-% \fileversion, last revised \filedate.}}
-%
-% \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
-%
-% \begin{abstract}
-% 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
-% 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
-% display math constructs such as a \env{multlined} environment.
-% \end{abstract}
-%
-% \tableofcontents
-%
-% \section{Introduction}
-%
-% Although \pkg{amsmath} provides many handy tools for mathematical
-% typesetting, it is nonetheless a static package. This is not a bad
-% thing, because what it does, it mostly does quite well and having
-% a stable math typesetting package is ``a good thing.'' However,
-% \pkg{amsmath} does not fulfill all the needs of the mathematical
-% part of the \LaTeX{} community, resulting in many authors writing
-% small snippets of code for tweaking the mathematical layout. Some
-% of these snippets has also been posted to newsgroups and mailing
-% lists over the years, although more often than not without being
-% released as stand-alone packages.
-%
-%
-% The \pkg{mathtools} package is exactly what its name implies: tools
-% for mathematical typesetting. It is a collection of many of these
-% often needed small tweaks---with some big tweaks added as well. It
-% can only do so by having harvesting newsgroups for code and/or you
-% writing the maintainers with wishes for code to be included, so if
-% you have any good macros or just macros that help you when writing
-% mathematics, then don't hesitate to report them to us. We can be
-% reached at
-% \begin{quote}\email{mh.ctan@gmail.com}\end{quote}
-% This is of course also the address to use in case of bug reports.
-%
-%
-% \medskip\noindent
-% Update 2013: We now makes \cs{(}\cs{)} and \cs[\cs]
-% robust (can be disabled via \texttt{nonrobust} package option).
-%
-% \section{Package loading}
-%
-%
-% The \pkg{mathtools} package requires \pkg{amsmath} but is able to
-% pass options to it as well. Thus a line like
-% \begin{verbatim}
-% \usepackage[fleqn,tbtags]{mathtools}
-% \end{verbatim}
-% is equivalent to
-% \begin{verbatim}
-% \usepackage[fleqn,tbtags]{amsmath}
-% \usepackage{mathtools}
-% \end{verbatim}
-%
-%
-% \subsection{Special \pkg{mathtools} options}
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{fixamsmath}\opt{fixamsmath}\texttt{~~~~}
-% \SpecialOptIndex{donotfixamsmathbugs}\opt{donotfixamsmathbugs}
-% \end{codesyntax}
-% 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
-% 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
-% you wouldn't want these bugs to be fixed, so I've made it slightly
-% difficult not to fix them.
-%
-% \begin{codesyntax}
-% \SpecialOptIndex{allowspaces}\opt{allowspaces}\texttt{~~~~}
-% \SpecialOptIndex{disallowspaces}\opt{disallowspaces}
-% \end{codesyntax}
-% Sometimes \pkg{amsmath} gives you nasty surprises, as here where
-% things look seemingly innocent:
-% \begin{verbatim}
-% \[
-% \begin{gathered}
-% [p] = 100 \\
-% [v] = 200
-% \end{gathered}
-% \]
-% \end{verbatim}
-% Without \pkg{mathtools} this will result in this output:
-% \[
-% \begin{gathered}[c]
-% = 100 \\
-% [v] = 200
-% \end{gathered}
-% \]
-% 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
-% hardly what you'd expect as an end user, as the desired output was
-% probably something like this instead:
-% \[
-% \begin{gathered}[c]
-% [p] = 100 \\
-% [v] = 200
-% \end{gathered}
-% \]
-% With the option \opt{disallowspaces} (default) \pkg{mathtools}
-% disallows spaces in front of optional arguments where it could
-% possibly cause problems just as \pkg{amsmath} does with |\\|
-% inside the display environments. This includes the environments
-% \env{gathered} (and also those shown in \S
-% \vref{subsec:gathered}), \env{aligned}, \env{multlined}, and the
-% extended \env{matrix}-environments (\S \vref{subsubsec:matrices}).
-% If you however want to preserve the more dangerous standard
-% optional spaces, simply choose the option \opt{allowspaces}.
-%
-%
-% \section{Tools for mathematical typesetting}
-%
-% \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 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}
-% \mathtoolsset{
-% showonlyrefs,
-% mathic % or mathic = true
-% }
-% \end{verbatim}
-% More information on the keys later on.
-%
-% \subsection{Fine-tuning mathematical layout}
-%
-% Sometimes you need to tweak the layout of formulas a little to get
-% the best result and this part of the manual describes the various
-% macros \pkg{mathtools} provides for this.
-%
-% \subsubsection{A complement to \texttt{\textbackslash smash},
-% \texttt{\textbackslash llap}, and \texttt{\textbackslash rlap}}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\mathllap}
-% \cs{mathllap}\oarg{mathstyle}\marg{math}\texttt{~~}
-% \SpecialUsageIndex{\mathclap}
-% \cs{mathclap}\oarg{mathstyle}\marg{math}\\
-% \SpecialUsageIndex{\mathrlap}
-% \cs{mathrlap}\oarg{mathstyle}\marg{math}\texttt{~~}
-% \SpecialUsageIndex{\clap}
-% \cs{clap}\marg{text}\\
-% \SpecialUsageIndex{\mathmbox}
-% \cs{mathmbox}\marg{math}\phantom{\meta{mathstyle}}\texttt{~~~~}
-% \SpecialUsageIndex{\mathmakebox}
-% \cs{mathmakebox}\oarg{width}\oarg{pos}\marg{math}
-% \end{codesyntax}
-% In \cite{Perlis01}, Alexander R.~Perlis describes some simple yet
-% useful macros for use in math displays. For example the display
-% \begin{verbatim}
-% \[
-% X = \sum_{1\le i\le j\le n} X_{ij}
-% \]
-% \end{verbatim}
-% \[
-% X = \sum_{1\le i\le j\le n} X_{ij}
-% \]
-% contains a lot of excessive white space. The idea that comes to
-% mind is to fake the width of the subscript. The command
-% \cs{mathclap} puts its argument in a zero width box and centers
-% it, so it could possibly be of use here.
-% \begin{verbatim}
-% \[
-% X = \sum_{\mathclap{1\le i\le j\le n}} X_{ij}
-% \]
-% \end{verbatim}
-% \[
-% X = \sum_{\mathclap{1\le i\le j\le n}} X_{ij}
-% \]
-% For an in-depth discussion of
-% these macros I find it better to read the article; an online
-% version can be found at
-% \begin{quote}
-% \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
-% optional argument for specifying the desired math style, these
-% versions also work around a most unfortunate \TeX{}
-% ``feature.''\footnote{The faulty reboxing procedure.} The
-% \cs{smash} macro is fixed too.
-%
-%
-% \subsubsection{Forcing a cramped style}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\cramped}
-% \cs{cramped}\oarg{mathstyle}\marg{math}
-% \end{codesyntax}
-% \cttPosting{Michael Herschorn}{1992/07/21}
-% Let's look at another example where we have used \cs{mathclap}:
-% \begin{verbatim}
-% \begin{equation}\label{eq:mathclap}
-% \sum_{\mathclap{a^2<b^2<c}}\qquad
-% \sum_{a^2<b^2<c}
-% \end{equation}
-% \end{verbatim}
-% \begin{equation}\label{eq:mathclap}
-% \sum_{\mathclap{a^2<b^2<c}}\qquad
-% \sum_{a^2<b^2<c}
-% \end{equation}
-% Do you see the difference? Maybe if I zoomed in a bit:
-% \begingroup \fontsize{24}{\baselineskip}\selectfont
-% \[
-% \sum_{\mathclap{a^2<b^2<c}}\qquad
-% \sum_{a^2<b^2<c}
-% \]
-% \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'
-% 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.
-%
-% \pkg{mathtools} offers the command \cs{cramped} which forces a
-% cramped style in normal un-cramped math. Additionally you can
-% choose which of the four styles you want it in as well by
-% specifying it as the optional argument:
-% \begin{verbatim}
-% \[
-% \cramped{x^2} \leftrightarrow x^2 \quad
-% \cramped[\scriptstyle]{x^2} \leftrightarrow {\scriptstyle x^2}
-% \]
-% \end{verbatim}
-% \[
-% \cramped{x^2} \leftrightarrow x^2 \quad
-% \cramped[\scriptstyle]{x^2} \leftrightarrow {\scriptstyle x^2}
-% \]
-% You may be surprised how often the cramped style can be
-% beneficial yo your output. Take a look at this example:
-% \begin{verbatim}
-% \begin{quote}
-% The 2005 Euro\TeX{} conference is held in Abbaye des
-% Pr\'emontr\'es, France, marking the 16th ($2^{2^2}$) anniversary
-% of both Dante and GUTenberg (the German and French \TeX{} users
-% group resp.).
-% \end{quote}
-% \end{verbatim}
-% \begin{quote}
-% The 2005 Euro\TeX{} conference is held in Abbaye des
-% Pr\'emontr\'es, France, marking the 16th ($2^{2^2}$) anniversary
-% of both Dante and GUTenberg (the German and French \TeX{} users
-% group resp.).
-% \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
-% \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:
-% \begin{verbatim}
-% \begin{quote}
-% The 2005 Euro\TeX{} ... 16th ($\cramped{2^{2^2}}$) ...
-% \end{quote}
-% \end{verbatim}
-% \begin{quote}
-% The 2005 Euro\TeX{} conference is held in Abbaye des
-% Pr\'emontr\'es, France, marking the 16th ($\cramped{2^{2^2}}$)
-% anniversary of both Dante and GUTenberg (the German and French
-% \TeX{} users group resp.).
-% \end{quote}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\crampedllap}
-% \cs{crampedllap}\oarg{mathstyle}\marg{math}\texttt{~~}
-% \SpecialUsageIndex{\crampedclap}
-% \cs{crampedclap}\oarg{mathstyle}\marg{math}\\
-% \SpecialUsageIndex{\crampedrlap}
-% \cs{crampedrlap}\oarg{mathstyle}\marg{math}
-% \end{codesyntax}
-% The commands \cs{crampedllap}, \cs{crampedclap}, and
-% \cs{crampedrlap} are identical to the three \cs{mathXlap} commands
-% described earlier except the argument is typeset in cramped style.
-% You need this in order to typeset \eqref{eq:mathclap} correctly
-% while still faking the width of the limit.
-% \begin{verbatim}
-% \begin{equation*}\label{eq:mathclap-b}
-% \sum_{\crampedclap{a^2<b^2<c}}
-% \tag{\ref{eq:mathclap}*}
-% \end{equation*}
-% \end{verbatim}
-% \begin{equation*}\label{eq:mathclap-b}
-% \sum_{\crampedclap{a^2<b^2<c}}
-% \tag{\ref{eq:mathclap}*}
-% \end{equation*}
-% Of course you could just type
-% \begin{verbatim}
-% \sum_{\mathclap{\cramped{a^2<b^2<c}}}
-% \end{verbatim}
-% but it has one major disadvantage: In order for \cs{mathXlap} and
-% \cs{cramped} to get the right size, \TeX{} has to process them
-% four times, meaning that nesting them as shown above will cause
-% \TeX{} to typeset $4^2$ instances before choosing the right one.
-% In this situation however, we will of course need the same style
-% for both commands so it makes sense to combine the commands in
-% one, thus letting \TeX{} make the choice only once rather than
-% twice.
-%
-%
-%
-% \subsubsection{Smashing an operator}
-%
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\smashoperator}
-% \cs{smashoperator}\oarg{pos}\marg{operator with limits}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/05/04}
-% Above we shoved how to get \LaTeX{} to ignore the width of the
-% subscript of an operator. However this approach takes a lot of
-% extra typing, especially if you have a wide superscript, meaning
-% you have to put in \cs{crampedclap} in both sub- and superscript.
-% To make things easier, \pkg{mathtools} provides a
-% \cs{smashoperator} command, which simply ignores the width of the
-% sub- and superscript. It also takes an optional argument,
-% \texttt{l}, \texttt{r}, or \texttt{lr} (default), denoting which
-% side of the operator should be ignored (smashed).
-% \begin{verbatim}
-% \[
-% V = \sum_{1\le i\le j\le n}^{\infty} V_{ij} \quad
-% X = \smashoperator{\sum_{1\le i\le j\le n}^{3456}} X_{ij} \quad
-% Y = \smashoperator[r]{\sum\limits_{1\le i\le j\le n}} Y_{ij} \quad
-% Z = \smashoperator[l]{\mathop{T}_{1\le i\le j\le n}} Z_{ij}
-% \]
-% \end{verbatim}
-% \[
-% V = \sum_{1\le i\le j\le n}^{\infty} V_{ij} \quad
-% X = \smashoperator{\sum_{1\le i\le j\le n}^{3456}} X_{ij} \quad
-% Y = \smashoperator[r]{\sum\limits_{1\le i\le j\le n}} Y_{ij} \quad
-% Z = \smashoperator[l]{\mathop{T}_{1\le i\le j\le n}} Z_{ij}
-% \]
-% Note that \cs{smashoperator} always sets its argument in display
-% style and with limits even if you have used the \opt{nosumlimits}
-% option of \pkg{amsmath}. If you wish, you can use shorthands for
-% \texttt{\_} and \texttt{\textasciicircum} such as \cs{sb} and
-% \cs{sp}.
-%
-%
-% \subsubsection{Adjusting limits of operators}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\adjustlimits}
-% \cs{adjustlimits}\marg{operator$\sb1$}\texttt{\_}\marg{limit$\sb1$}
-% \marg{operator$\sb2$}\texttt{\_}\marg{limit$\sb2$}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/07/09}
-% When typesetting two consecutive operators with limits one often
-% wishes the limits of the operators were better aligned. Look
-% closely at these examples:
-% \begin{verbatim}
-% \[
-% \text{a)} \lim_{n\to\infty} \max_{p\ge n} \quad
-% \text{b)} \lim_{n\to\infty} \max_{p^2\ge n} \quad
-% \text{c)} \lim_{n\to\infty} \sup_{p^2\ge nK} \quad
-% \text{d)} \limsup_{n\to\infty} \max_{p\ge n}
-% \]
-% \end{verbatim}
-% \[
-% \text{a)} \lim_{n\to\infty} \max_{p\ge n} \quad
-% \text{b)} \lim_{n\to\infty} \max_{p^2\ge n} \quad
-% \text{c)} \lim_{n\to\infty} \sup_{p^2\ge nK} \quad
-% \text{d)} \limsup_{n\to\infty} \max_{p\ge n}
-% \]
-% a) looks okay, but b) is not quite as good because the second
-% limit ($\cramped{p^2\ge n}$) is significantly taller than the
-% first ($n\to\infty$). With c)~things begin to look really bad,
-% because the second operator has a descender while the first
-% doesn't, and finally we have d)~which looks just as bad as~c). The
-% 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
-% \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
-% \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
-% \text{d)} \adjustlimits\limsup_{n\to\infty} \max_{p\ge n}
-% \]
-% 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}
-%
-% 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
-% the preamble is the best place to issue them.
-%
-% \subsubsection{The appearance of tags}
-% \begin{codesyntax}
-% \SpecialUsageIndex{\newtagform}
-% \cs{newtagform}\marg{name}\oarg{inner_format}\marg{left}\marg{right}\\
-% \SpecialUsageIndex{\renewtagform}
-% \cs{renewtagform}\marg{name}\oarg{inner_format}\marg{left}\marg{right}\\
-% \SpecialUsageIndex{\usetagform}
-% \cs{usetagform}\marg{name}
-% \end{codesyntax}
-% Altering the layout of equation numbers in \pkg{amsmath} is not
-% very user friendly (it involves a macro with three \texttt{@}'s in
-% its name), so \pkg{mathtools} provides an interface somewhat
-% reminiscent of the page style concept. This way you can define
-% several different tag forms and then choose the one you prefer.
-%
-% As an example let's try to define a tag form which puts the
-% equation number in square brackets. First we define a brand new tag
-% form:
-% \begin{verbatim}
-% \newtagform{brackets}{[}{]}
-% \end{verbatim}
-% Then we activate it:
-% \begin{verbatim}
-% \usetagform{brackets}
-% \end{verbatim}
-% The result is then
-% \newtagform{brackets}{[}{]}
-% \usetagform{brackets}
-% \begin{equation}
-% E \neq m c^3
-% \end{equation}
-%
-% Similarly you could define a second version of the brackets that
-% prints the equation number in bold face instead
-% \begin{verbatim}
-% \newtagform{brackets2}[\textbf]{[}{]}
-% \usetagform{brackets2}
-% \begin{equation}
-% E \neq m c^3
-% \end{equation}
-% \end{verbatim}
-% \newtagform{brackets2}[\textbf]{[}{]}
-% \usetagform{brackets2}
-% \begin{equation}
-% E \neq m c^3
-% \end{equation}
-% When you reference an equation with \cs{eqref}, the tag form in
-% effect at the time of referencing controls the formatting, so be
-% careful if you use different tag forms throughout your document.
-%
-% If you want to renew a tag form, then use the command
-% \cs{renewtagform}. Should you want to
-% return to the standard setting then choose\usetagform{default}
-% \begin{verbatim}
-% \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}
-% \SpecialKeyIndex{showonlyrefs}$\key{showonlyrefs}=\texttt{true}\vert\texttt{false}$\\
-% \SpecialKeyIndex{showmanualtags}$\key{showmanualtags}=\texttt{true}\vert\texttt{false}$\\
-% \SpecialUsageIndex{\refeq}\cs{refeq}\marg{label}
-% \end{codesyntax}
-% 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
-% \cs{ref} on the other hand may not be a good solution either as
-% the argument of \cs{tag*} is always set in upright shape in the
-% equation and you may be referencing it in italic text. In the
-% example below, the command \cs{refeq} is used to avoid what could
-% possibly lead to confusion in cases where the tag font has very
-% different form in upright and italic shape (here we switch to
-% Palatino in the example):
-% \begin{verbatim}
-% \begin{quote}\renewcommand*\rmdefault{ppl}\normalfont\itshape
-% \begin{equation*}
-% a=b \label{eq:example}\tag*{Q\&A}
-% \end{equation*}
-% See \ref{eq:example} or is it better with \refeq{eq:example}?
-% \end{quote}
-% \end{verbatim}
-% \begin{quote}\renewcommand*\rmdefault{ppl}\normalfont\itshape
-% \begin{equation*}
-% a=b \label{eq:example}\tag*{Q\&A}
-% \end{equation*}
-% See \ref{eq:example} or is it better with \refeq{eq:example}?
-% \end{quote}
-%
-%
-% Another problem sometimes faced is the need for showing the
-% equation numbers for only those equations actually referenced. In
-% \pkg{mathtools} this can be done by setting the key
-% \key{showonlyrefs} to either true or false by using
-% \cs{mathtoolsset}. You can also choose whether or not to show the
-% manual tags specified with \cs{tag} or \cs{tag*} by setting the
-% option \key{showmanualtags} to true or false.\footnote{I recommend
-% setting \key{showmanualtags} to true, else the whole idea of using
-% \cs{tag} doesn't really make sense, does it?} For both keys just
-% typing the name of it chooses true as shown in the following
-% example.
-%
-% \begin{verbatim}
-% \mathtoolsset{showonlyrefs,showmanualtags}
-% \usetagform{brackets}
-% \begin{gather}
-% a=a \label{eq:a} \\
-% b=b \label{eq:b} \tag{**}
-% \end{gather}
-% This should refer to the equation containing $a=a$: \eqref{eq:a}.
-% Then a switch of tag forms.
-% \usetagform{default}
-% \begin{align}
-% c&=c \label{eq:c} \\
-% d&=d \label{eq:d}
-% \end{align}
-% This should refer to the equation containing $d=d$: \eqref{eq:d}.
-% \begin{equation}
-% e=e
-% \end{equation}
-% Back to normal.\mathtoolsset{showonlyrefs=false}
-% \begin{equation}
-% f=f
-% \end{equation}
-% \end{verbatim}
-% \mathtoolsset{showonlyrefs,showmanualtags}
-% \usetagform{brackets}
-% \begin{gather}
-% a=a \label{eq:a} \\
-% b=b \label{eq:b} \tag{**}
-% \end{gather}
-% This should refer to the equation containing $a=a$: \eqref{eq:a}.
-% Then a switch of tag forms.
-% \usetagform{default}
-% \begin{align}
-% c&=c \label{eq:c} \\
-% d&=d \label{eq:d}
-% \end{align}
-% This should refer to the equation containing $d=d$: \eqref{eq:d}.
-% \begin{equation}
-% e=e
-% \end{equation}
-% Back to normal.\mathtoolsset{showonlyrefs=false}
-% \begin{equation}
-% f=f
-% \end{equation}
-%
-% 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 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}. 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 one's formulas are not long enough to touch the equation
-% number.
-%
-% To make a long story stort, amsmath typesets its math environments
-% twice, one time for measuring and one time for the actual
-% typesetting. In the measuring part, the width of the equation
-% 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
-% 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
-% 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, when the
-% \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.
-%
-% There are two possible solutions to this both involving \pkg{empheq}.
-% The easiest fix is to add the following line
-% \begin{verbatim}
-% \usepackage[overload,ntheorem]{empheq}
-% \end{verbatim}
-% 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
-% and use \env{empheq} on the very last expression, as in
-% \begin{verbatim}
-% \begin{empheq}{align}
-% A &= B \label {eq:32}\\
-% & = 1. \label{eq:31}
-% \end{empheq}
-% \end{proof}
-% \end{verbatim}
-%
-% The \pkg{empheq} package fixes some
-% problems with \pkg{ntheorem} and lets \pkg{mathtools} get correct
-% access to the equation numbers again.
-%
-% \subsection{Extensible symbols}
-%
-% The number of horizontally extensible symbols in standard \LaTeX{}
-% and \pkg{amsmath} is somewhat low. This part of the manual
-% describes what \pkg{mathtools} does to help this situation.
-%
-% \subsubsection{Arrow-like symbols}
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\xleftrightarrow}
-% \cs{xleftrightarrow}\oarg{sub}\marg{sup}\texttt{~~~~~~~~~}
-% \SpecialUsageIndex{\xRightarrow}
-% \cs{xRightarrow}\oarg{sub}\marg{sup}\\
-% \SpecialUsageIndex{\xLeftarrow}
-% \cs{xLeftarrow}\oarg{sub}\marg{sup}\texttt{~~~~~~~~~~~~~~}
-% \SpecialUsageIndex{\xLeftrightarrow}
-% \cs{xLeftrightarrow}\oarg{sub}\marg{sup}\\
-% \SpecialUsageIndex{\xhookleftarrow}
-% \cs{xhookleftarrow}\oarg{sub}\marg{sup}\texttt{~~~~~~~~~~}
-% \SpecialUsageIndex{\xhookrightarrow}
-% \cs{xhookrightarrow}\oarg{sub}\marg{sup}\\
-% \SpecialUsageIndex{\xmapsto}
-% \cs{xmapsto}\oarg{sub}\marg{sup}
-% \end{codesyntax}
-% Extensible arrows are part of \pkg{amsmath} in the form of the
-% commands
-% \begin{quote}
-% \cs{xrightarrow}\oarg{subscript}\marg{superscript}\quad and\\
-% \cs{xleftarrow}\oarg{subscript}\marg{superscript}
-% \end{quote}
-% But what about extensible versions of say, \cs{leftrightarrow} or
-% \cs{Longleftarrow}? It turns out that the above mentioned
-% 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 one's in \pkg{amsmath} so to get an extensible
-% \cs{Leftarrow} you simply do a
-% \begin{verbatim}
-% \[
-% A \xLeftarrow[under]{over} B
-% \]
-% \end{verbatim}
-% \[
-% A \xLeftarrow[under]{over} B
-% \]
-% \begin{codesyntax}
-% \SpecialUsageIndex{\xrightharpoondown}
-% \cs{xrightharpoondown}\oarg{sub}\marg{sup}\texttt{~~~~}
-% \SpecialUsageIndex{\xrightharpoonup}
-% \cs{xrightharpoonup}\oarg{sub}\marg{sup}\\
-% \SpecialUsageIndex{\xleftharpoondown}
-% \cs{xleftharpoondown}\oarg{sub}\marg{sup}\texttt{~~~~~}
-% \SpecialUsageIndex{\xleftharpoonup}
-% \cs{xleftharpoonup}\oarg{sub}\marg{sup}\\
-% \SpecialUsageIndex{\xrightleftharpoons}
-% \cs{xrightleftharpoons}\oarg{sub}\marg{sup}\texttt{~~~}
-% \SpecialUsageIndex{\xleftrightharpoons}
-% \cs{xleftrightharpoons}\oarg{sub}\marg{sup}
-% \end{codesyntax}
-% \pkg{mathtools} also provides the extensible harpoons shown above.
-% They're taken from~\cite{Voss:2004}. For those liking visuals, here
-% are the macros in use in the order listed in the two boxes above.
-% \begin{align*}
-% A &\xleftrightarrow[below]{above} B &
-% A &\xRightarrow[below]{above} B \\
-% A &\xLeftarrow[below]{above} B &
-% A &\xLeftrightarrow[below]{above} B \\
-% A &\xhookleftarrow[below]{above} B &
-% A &\xhookrightarrow[below]{above} B \\
-% A &\xmapsto[below]{above} B \\
-% A &\xrightharpoondown[below]{above} B &
-% A &\xrightharpoonup[below]{above} B \\
-% A &\xleftharpoondown[below]{above} B &
-% A &\xleftharpoonup[below]{above} B \\
-% A &\xrightleftharpoons[below]{above} B &
-% A &\xleftrightharpoons[below]{above} B \\
-% \end{align*}
-%
-%
-%
-% \subsubsection{Braces and brackets}
-%
-% \LaTeX{} defines other kinds of extensible symbols like
-% \cs{overbrace} and \cs{underbrace}, but sometimes you may want
-% another symbol, say, a bracket.
-% \begin{codesyntax}
-% \SpecialUsageIndex{\underbracket}\cs{underbracket}\oarg{rule thickness}
-% \oarg{bracket height}\marg{arg}\\
-% \SpecialUsageIndex{\overbracket}\cs{overbracket}\oarg{rule thickness}
-% \oarg{bracket height}\marg{arg}
-% \end{codesyntax}
-% The commands \cs{underbracket} and \cs{overbracket} are inspired
-% by \cite{Voss:2004}, although the implementation here is slightly
-% different.
-% Used without the optional arguments the bracket commands produce this:
-% \begin{quote}
-% |$\underbracket {foo\ bar}_{baz}$|\quad $\underbracket {foo\ bar}_{baz}$ \\
-% |$\overbracket {foo\ bar}^{baz}$ |\quad $\overbracket {foo\ bar}^{baz}$
-% \end{quote}
-% The default rule thickness is equal to that of \cs{underbrace}
-% (app.~$5/18$\,ex) while the default bracket height is equal to
-% app.~$0.7$\,ex. These values give really pleasing results in all
-% font sizes, but feel free to use the optional arguments. That way
-% you may get ``beauties'' like
-% \begin{verbatim}
-% \[
-% \underbracket[3pt]{xxx\ yyy}_{zzz} \quad \text{and} \quad
-% \underbracket[1pt][7pt]{xxx\ yyy}_{zzz}
-% \]
-% \end{verbatim}
-% \[
-% \underbracket[3pt]{xxx\ yyy}_{zzz} \quad \text{and} \quad
-% \underbracket[1pt][7pt]{xxx\ yyy}_{zzz}
-% \]
-% \begin{codesyntax}
-% \SpecialUsageIndex{\underbrace}\cs{underbrace}\marg{arg}\texttt{~~}
-% \SpecialUsageIndex{\LaTeXunderbrace}\cs{LaTeXunderbrace}\marg{arg}\\
-% \SpecialUsageIndex{\overbrace}\cs{overbrace}\marg{arg}\texttt{~~~}
-% \SpecialUsageIndex{\LaTeXoverbrace}\cs{LaTeXoverbrace}\marg{arg}
-% \end{codesyntax}
-% The standard implementation of the math operators \cs{underbrace}
-% and \cs{overbrace} in \LaTeX{} has some deficiencies. For example,
-% all lengths used internally are \emph{fixed} and optimized for
-% 10\,pt typesetting. As a direct consequence thereof, using font
-% sizes other than 10 will produce less than optimal results.
-% Another unfortunate feature is the size of the braces. In the
-% example below, notice how the math operator \cs{sum} places its
-% limit compared to \cs{underbrace}.
-% \[
-% \mathop{\thinboxed[blue]{\sum}}_{n}
-% \mathop{\thinboxed[blue]{\LaTeXunderbrace{\thinboxed[green]{foof}}}}_{zzz}
-% \]
-% The blue lines indicate the dimensions of the math operator and
-% the green lines the dimensions of $foof$. As you can see, there
-% seems to be too much space between the brace and the $zzz$ whereas
-% the space between brace and $foof$ is okay. Let's see what happens
-% when we use a bigger font size:\par\Huge\vskip-\baselineskip
-% \[
-% \mathop{\thinboxed[blue]{\sum}}_{n}
-% \mathop{\thinboxed[blue]{\LaTeXunderbrace{\thinboxed[green]{foof}}}}_{zzz}
-% \]
-% \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}:
-% \par\footnotesize
-% \[
-% \mathop{\thinboxed[blue]{\sum}}_{n}
-% \mathop{\thinboxed[blue]{\LaTeXunderbrace{\thinboxed[green]{foof}}}}_{zzz}
-% \]\normalsize
-% Here the spacing above and below the brace is quite excessive.
-%
-% 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
-% 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
-% the Concrete extensible braces. In that case you should probably
-% just add the lines
-% \begin{verbatim}
-% \let\underbrace\LaTeXunderbrace
-% \let\overbrace\LaTeXoverbrace
-% \end{verbatim}
-% to your preamble after loading \pkg{mathtools} which will restore
-% the original definitions of \cs{overbrace} and \cs{underbrace}.
-%
-%
-%
-%
-% \subsection{New mathematical building blocks}
-%
-% In this part of the manual, various mathematical environments are
-% described.
-%
-% \subsubsection{Matrices}\label{subsubsec:matrices}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{matrix*}\cs{begin}\arg{matrix*}\texttt{ }\oarg{col}
-% \meta{contents} \cs{end}\arg{matrix*}\\
-% \SpecialEnvIndex{pmatrix*}\cs{begin}\arg{pmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{pmatrix*}\\
-% \SpecialEnvIndex{bmatrix*}\cs{begin}\arg{bmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{bmatrix*}\\
-% \SpecialEnvIndex{Bmatrix*}\cs{begin}\arg{Bmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{Bmatrix*}\\
-% \SpecialEnvIndex{vmatrix*}\cs{begin}\arg{vmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{vmatrix*}\\
-% \SpecialEnvIndex{Vmatrix*}\cs{begin}\arg{Vmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{Vmatrix*}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/04/05}
-% All of the \pkg{amsmath} \env{matrix} environments center the
-% columns by default, which is not always what you want. Thus
-% \pkg{mathtools} provides a starred version for each of the original
-% environments. These starred environments take an optional argument
-% specifying the alignment of the columns, so that
-% \begin{verbatim}
-% \[
-% \begin{pmatrix*}[r]
-% -1 & 3 \\
-% 2 & -4
-% \end{pmatrix*}
-% \]
-% \end{verbatim}
-% yields
-% \[
-% \begin{pmatrix*}[r]
-% -1 & 3 \\
-% 2 & -4
-% \end{pmatrix*}
-% \]
-% The optional argument (default is \texttt{[c]}) can be any column
-% 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
-% 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
-% say \env{smallmatrix*} \emph{has} to be either \texttt{c},
-% \texttt{l} \emph{or}~\texttt{r}. The default is \texttt{c}, which
-% can be changed globally using the \key{smallmatrix-align}=\meta{c,l
-% or r}.
-% \begin{codesyntax}
-% \SpecialEnvIndex{smallmatrix*}\cs{begin}\arg{smallmatrix*}\texttt{ }\oarg{col}
-% \meta{contents} \cs{end}\arg{smallmatrix*}\\
-% \SpecialEnvIndex{psmallmatrix}\cs{begin}\arg{psmallmatrix}
-% \meta{contents} \cs{end}\arg{psmallmatrix}\\
-% \SpecialEnvIndex{psmallmatrix*}\cs{begin}\arg{psmallmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{psmallmatrix*}\\
-% \SpecialEnvIndex{bsmallmatrix}\cs{begin}\arg{bsmallmatrix}
-% \meta{contents} \cs{end}\arg{bsmallmatrix}\\
-% \SpecialEnvIndex{bsmallmatrix*}\cs{begin}\arg{bsmallmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{bsmallmatrix*}\\
-% \SpecialEnvIndex{Bsmallmatrix}\cs{begin}\arg{Bsmallmatrix}
-% \meta{contents} \cs{end}\arg{Bsmallmatrix}\\
-% \SpecialEnvIndex{Bsmallmatrix*}\cs{begin}\arg{Bsmallmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{Bsmallmatrix*}\\
-% \SpecialEnvIndex{vsmallmatrix}\cs{begin}\arg{vsmallmatrix}
-% \meta{contents} \cs{end}\arg{vsmallmatrix}\\
-% \SpecialEnvIndex{vsmallmatrix*}\cs{begin}\arg{vsmallmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{vsmallmatrix*}\\
-% \SpecialEnvIndex{Vsmallmatrix}\cs{begin}\arg{Vsmallmatrix}
-% \meta{contents} \cs{end}\arg{Vsmallmatrix}\\
-% \SpecialEnvIndex{Vsmallmatrix*}\cs{begin}\arg{Vsmallmatrix*}\oarg{col}
-% \meta{contents} \cs{end}\arg{Vsmallmatrix*}\\
-% \SpecialKeyIndex{smallmatrix-align}\makebox{$\key{smallmatrix-align}=\meta{c,l or r}$}\\
-% \SpecialKeyIndex{smallmatrix-inner-space}\makebox{$\key{smallmatrix-inner-space}=\cs{,}$}
-% \end{codesyntax}
-% \ProvidedBy{Rasmus Villemoes}{2011/01/17}
-% \begin{verbatim}
-% \[
-% \begin{bsmallmatrix} a & -b \\ -c & d \end{bsmallmatrix}
-% \begin{bsmallmatrix*}[r] a & -b \\ -c & d \end{bsmallmatrix*}
-% \]
-% \end{verbatim}
-% yields
-% \[
-% \begin{bsmallmatrix} a & -b \\ -c & d \end{bsmallmatrix}
-% \begin{bsmallmatrix*}[r] a & -b \\ -c & d \end{bsmallmatrix*}
-% \]
-% Inside the \verb?Xsmallmatrix? construction a small space is
-% inserted between the fences and the contents, the size of it can be
-% changed using \key{smallmatrix-align}=\meta{some spacing command},
-% 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
-% \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.}
-%
-% \subsubsection{The \env{multlined} environment}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{multlined}\cs{begin}\arg{multlined}\oarg{pos}\oarg{width}
-% \meta{contents} \cs{end}\arg{multlined}\\
-% \SpecialUsageIndex{\shoveleft}\cs{shoveleft}\oarg{dimen}\marg{arg}\texttt{~~}
-% \SpecialUsageIndex{\shoveright}\cs{shoveright}\oarg{dimen}\marg{arg}\\
-% \makeatletter\settowidth\@tempdimc{\cs{shoveleft}\oarg{dimen}\marg{arg}}\global\@tempdimc\@tempdimc
-% \SpecialKeyIndex{firstline-afterskip}\makebox[\@tempdimc][l]{$\key{firstline-afterskip}=\meta{dimen}$}\texttt{~~}
-% \SpecialKeyIndex{lastline-preskip}$\key{lastline-preskip}=\meta{dimen}$\\
-% \makeatletter\SpecialKeyIndex{multlined-width}\makebox[\@tempdimc][l]{$\key{multlined-width}=\meta{dimen}$}\texttt{~~}
-% \SpecialKeyIndex{multlined-pos}$\key{multlined-pos}=\texttt{c}\vert\texttt{b}\vert\texttt{t}$
-% \end{codesyntax}
-% Some of the \pkg{amsmath} environments exist in two forms: an
-% outer and an inner environment. One example is the pair
-% \env{gather} \& \env{gathered}. There is one important omission on
-% this list however, as there is no inner \env{multlined}
-% environment, so this is where \pkg{mathtools} steps in.
-%
-% One might wonder what the sensible behavior should be. We want it
-% to be an inner environment so that it is not wider than necessary,
-% but on the other hand we would like to be able to control the
-% width. The current implementation of \env{multlined} handles both
-% cases. The idea is this: Set the first line flush left and add a
-% hard space after it; this space is governed by the
-% \key{firstline-afterskip} key. The last line should be set flush
-% 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').
-% \begin{verbatim}
-% \[
-% A = \begin{multlined}[t]
-% \framebox[4cm]{first} \\
-% \framebox[4cm]{last}
-% \end{multlined} B
-% \]
-% \end{verbatim}
-% \[
-% A = \begin{multlined}[t]
-% \framebox[4cm]{first} \\
-% \framebox[4cm]{last}
-% \end{multlined} B
-% \]
-% Note also that \env{multlined} gives you access to an extended
-% syntax for \cs{shoveleft} and \cs{shoveright} as shown in the
-% example below.
-% \begin{verbatim}
-% \[
-% \begin{multlined}
-% \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}
-% \end{multlined}
-% \]
-% \end{verbatim}
-% \[
-% \begin{multlined}
-% \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}
-% \end{multlined}
-% \]
-%
-% You can also choose the width yourself by specifying it as an
-% optional argument:
-% \begin{verbatim}
-% \[
-% \begin{multlined}[b][7cm]
-% \framebox[4cm]{first} \\
-% \framebox[4cm]{last}
-% \end{multlined} = B
-% \]
-% \end{verbatim}
-% \[
-% \begin{multlined}[b][7cm]
-% \framebox[4cm]{first} \\
-% \framebox[4cm]{last}
-% \end{multlined} = B
-% \]
-% There can be two optional arguments (position and width) and
-% they're interchangeable.
-%
-% \medskip\noindent
-% \textbf{Bug:}
-% \CommentAdded{2014/05/11}
-% If used inside an \env{array} or
-% a derivative (say, a \env{matrix} variant), \env{multlined} does
-% 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 workaround for this.
-%
-% \subsubsection{More \env{cases}-like environments}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{dcases}
-% \cs{begin}\arg{dcases}\texttt{~} \meta{math_column} |&| \meta{math_column}
-% \cs{end}\arg{dcases}\\
-% \SpecialEnvIndex{dcases*}
-% \cs{begin}\arg{dcases*} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
-% \cs{end}\arg{dcases*}\\
-% \SpecialEnvIndex{rcases}
-% \cs{begin}\arg{rcases}\texttt{~~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{math\_column}}
-% \cs{end}\arg{rcases}\\
-% \SpecialEnvIndex{rcases*}
-% \cs{begin}\arg{rcases*}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
-% \cs{end}\arg{rcases*}\\
-% \SpecialEnvIndex{drcases}
-% \cs{begin}\arg{drcases}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{math\_column}}
-% \cs{end}\arg{drcases}\\
-% \SpecialEnvIndex{drcases*}
-% \cs{begin}\arg{drcases*} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
-% \cs{end}\arg{drcases*}\\
-% \SpecialEnvIndex{cases*}
-% \cs{begin}\arg{cases*}\texttt{~} \meta{math_column} |&| \makebox[\widthof{\meta{math\_column}}][l]{\meta{text\_column}}
-% \cs{end}\arg{cases*}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/07/01}
-% Anyone who have tried to use an integral in the regular
-% \env{cases} environment from \pkg{amsmath} will have noticed that
-% it is set as
-% \[
-% a=\begin{cases}
-% E = m c^2 & \text{Nothing to see here} \\
-% \int x-3\, dx & \text{Integral is text style}
-% \end{cases}
-% \]
-% \pkg{mathtools} provides two environments similar to \env{cases}.
-% Using the \env{dcases} environment you get the same output as with
-% \env{cases} except that the rows are set in display style.
-% \begin{verbatim}
-% \[
-% \begin{dcases}
-% E = m c^2 & c \approx 3.00\times 10^{8}\,\mathrm{m}/\mathrm{s} \\
-% \int x-3\, dx & \text{Integral is display style}
-% \end{dcases}
-% \]
-% \end{verbatim}
-% \[
-% \begin{dcases}
-% E = m c^2 & c \approx 3.00\times 10^{8}\,\mathrm{m}/\mathrm{s} \\
-% \int x-3\, dx & \text{Integral is display style}
-% \end{dcases}
-% \]
-% Additionally the environment \env{dcases*} acts just the same, but
-% the second column is set in the normal roman font of the
-% document.\footnote{Or rather: it inherits the font characteristics
-% active just before the \env{dcases*} environment.}
-% \begin{verbatim}
-% \[
-% a= \begin{dcases*}
-% E = m c^2 & Nothing to see here \\
-% \int x-3\, dx & Integral is display style
-% \end{dcases*}
-% \]
-% \end{verbatim}
-% \[
-% a= \begin{dcases*}
-% E = m c^2 & Nothing to see here \\
-% \int x-3\, dx & Integral is display style
-% \end{dcases*}
-% \]
-% 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}
-% \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,
-% 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 displayes that end up
-% looking like this
-% \begin{align*}
-% \MoveEqLeft \framebox[10cm][c]{Long first line}\\
-% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\
-% & \leq \dots
-% \end{align*}
-% Traditionally one could do this by starting subsequent lines by
-% \verb+&\qquad ...+, but that is tedious. Instead the example above
-% was made using \cs{MoveEqLeft}:
-% \begin{verbatim}
-% \begin{align*}
-% \MoveEqLeft \framebox[10cm][c]{Long first line}\\
-% & = \framebox[6cm][c]{ \hphantom{g} 2nd line}\\
-% & \leq \dots
-% \end{align*}
-% \end{verbatim}
-% \cs{MoveEqLeft} is placed instead of the \verb+&+ on the first
-% line, and will effectively \emph{move} the entire first line
-% \oarg{number} of ems to the left (default is 2). If you choose to
-% align to the right of the relation, use \cs{MoveEqLeft}\verb+[3]+
-% 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}
-% \end{align*}
-% \end{verbatim}
-% \begin{align*}
-% \MoveEqLeft[3] \framebox[10cm][c]{Long first line}\\
-% = {} & \framebox[6cm][c]{ 2nd line}\\
-% & + \framebox[4cm][c]{ last part}
-% \end{align*}
-%
-% \subsubsection{Boxing a single line in an alignment}
-%
-% 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.\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
-% \quad\texttt{\textnormal{\&}}\quad right hand side}
-% \end{codesyntax}
-% Example
-% \begin{verbatim}
-% \begin{align*}
-% \Aboxed{ f(x) & = \int h(x)\, dx} \\
-% & = g(x)
-% \end{align*}
-% \end{verbatim}
-% Resulting in:
-% \begin{align*}
-% \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.
-%
-% \marginpar{\strut\\%
-% \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
-% \strut Comment by Qrrbrbirlbel on \url{tex.stackexchange.com}, 2013/05/20.
-% }\strut
-% }%
-% As \cs{Aboxed} looks for the alignment \texttt{\&} it may be
-% necessary to \emph{hide} constructions like matrices that also make
-% use of \texttt{\&}. Just add a set of braces around the construction
-% you want to hide.
-%
-% \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}
-% \end{codesyntax}
-% \hskip1sp
-% \marginpar{%
-% \parbox[b]{\marginparwidth}{\small\sffamily\raggedright
-% \strut Evolved from a request by\\Christian
-% Bohr-Halling\\2004/03/31\\on dk.edb.tekst%
-% }
-% }%
-% To add, say $\Updownarrow$ between two lines in an alignment use
-% \cs{ArrowBetweenLines} and the \env{alignat} environment (note the
-% extra pair of \texttt{\&}'s in front):
-% \begin{verbatim}
-% \begin{alignat}{2}
-% && \framebox[1.5cm]{} &= \framebox[3cm]{}\\
-% \ArrowBetweenLines % \Updownarrow is the default
-% && \framebox[1.5cm]{} &= \framebox[2cm]{}
-% \end{alignat}
-% \end{verbatim}
-% resulting in
-% \begin{alignat}{2}
-% && \framebox[1.5cm]{} &= \framebox[3cm]{}\\
-% \ArrowBetweenLines
-% && \framebox[1.5cm]{} &= \framebox[2cm]{}
-% \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
-% with \verb+&&+.
-% \begin{verbatim}
-% \begin{alignat*}{2}
-% \framebox[1.5cm]{} &= \framebox[3cm]{} &&\\
-% \ArrowBetweenLines*[\Downarrow]
-% \framebox[1.5cm]{} &= \framebox[2cm]{} &&
-% \end{alignat*}
-% \end{verbatim}
-% resulting in
-% \begin{alignat*}{2}
-% \framebox[1.5cm]{} &= \framebox[3cm]{} &&\\
-% \ArrowBetweenLines*[\Downarrow]
-% \framebox[1.5cm]{} &= \framebox[2cm]{} &&
-% \end{alignat*}
-%
-%
-% \subsubsection{Centered \cs{vdots}}
-%
-% If one want 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}
-% \begin{align*}
-% \framebox[1.5cm]{} &= \framebox[3cm]{}\\
-% & \vdots\\
-% &= \framebox[3cm]{}
-% \end{align*}
-% It would be nice to have (1) a \verb?\vdots? centered within the
-% width of another symbol, and (2) a construction similar to
-% \verb?\ArrowBetweenLines? that does not take up so much space.
-% We provide both.
-% \begin{codesyntax}
-% \SpecialUsageIndex{\vdotswithin}\cs{vdotswithin}\marg{symbol}\\
-% \SpecialUsageIndex{\shortvdotswithin}\cs{shortvdotswithin}\marg{symbol}\\
-% \SpecialUsageIndex{\shortvdotswithin*}\cs{shortvdotswithin*}\marg{symbol}\\
-% \SpecialUsageIndex{\MTFlushSpaceAbove}\cs{MTFlushSpaceAbove}\\
-% \SpecialUsageIndex{\MTFlushSpaceBelow}\cs{MTFlushSpaceBelow}\\
-% \SpecialKeyIndex{shortvdotsadjustabove}\makebox{$\key{shortvdotsadjustabove}=\meta{length}$}\\
-% \SpecialKeyIndex{shortvdotsadjustbelow}\makebox{$\key{shortvdotsadjustbelow}=\meta{length}$}
-% \end{codesyntax}
-% Two examples in one
-% \begin{verbatim}
-% \begin{align*}
-% a &= b \\
-% & \vdotswithin{=} \\
-% & = c \\
-% \shortvdotswithin{=}
-% & = d
-% \end{align*}
-% \end{verbatim}
-% yielding
-% \begin{align*}
-% a &= b \\
-% & \vdotswithin{=} \\
-% & = c \\
-% \shortvdotswithin{=}
-% & = d
-% \end{align*}
-% Thus \verb?\vdotswithin{=}? create a box corersponding to
-% \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.
-%
-% \verb?\shortvdotswithin{=}? corresponds to
-% \begin{verbatim}
-% \MTFlushSpaceAbove
-% & \vdotswithin{=} \\
-% \MTFlushSpaceBelow
-% \end{verbatim}
-% whereas \verb?\shortvdotswithin*{=}? is the case with
-% \verb?\vdotswithin{=} & \\?. This also means one cannot write more
-% on the line when using \verb?\shortvdotswithin? or the starred
-% version. But one can de-construct the macro and arrive at
-% \begin{verbatim}
-% \begin{alignat*}{3}
-% A&+ B &&= C &&+ D \\
-% \MTFlushSpaceAbove
-% &\vdotswithin{+} &&&& \vdotswithin{+}
-% \MTFlushSpaceBelow
-% C &+ D &&= Y &&+K
-% \end{alignat*}
-% \end{verbatim}
-% yielding
-% \begin{alignat*}{3}
-% A&+ B &&= C &&+ D \\
-% \MTFlushSpaceAbove
-% &\vdotswithin{+} &&&& \vdotswithin{+}
-% \MTFlushSpaceBelow
-% C &+ D &&= Y &&+K
-% \end{alignat*}
-% If one has the need for such a construction.
-%
-% The de-spaced version does support the \env{spreadlines}
-% environment. The actual amount of space being \emph{flushed} above
-% and below can be controlled by the user using the two options
-% indicated. Their original values are \verb?2.15\origjot? and
-% \verb?\origjot? respectively (\verb?\origjot? is usually 3pt).
-%
-% \subsection{Intertext and short intertext}
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\shortintertext}\cs{shortintertext}\marg{text}
-% \end{codesyntax}
-% \cttPosting{Gabriel Zachmann and Donald Arseneau}{2000/05/12--13}
-% \pkg{amsmath} provides the command \cs{intertext} for interrupting
-% a multiline display while still maintaining the alignment points.
-% However the spacing often seems quite excessive as seen below.
-% \begin{verbatim}
-% \begin{align}
-% a&=b \intertext{Some text}
-% c&=d
-% \end{align}
-% \end{verbatim}
-% \begin{align}
-% a&=b \intertext{Some text}
-% c&=d
-% \end{align}
-%
-% Using the command \cs{shortintertext} alleviates this situation
-% somewhat:
-% \begin{verbatim}
-% \begin{align}
-% a&=b \shortintertext{Some text}
-% c&=d
-% \end{align}
-% \end{verbatim}
-% \begin{align}
-% a&=b \shortintertext{Some text}
-% 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-sep}$\key{above-intertext-sep}=\meta{dimen}$ \quad(default: 0pt)\\
-% \SpecialKeyIndex{below-intertext-sep}$\key{below-intertext-sep}=\meta{dimen}$ \quad(default: 0pt)\\
-% \SpecialKeyIndex{above-shortintertext-sep}$\key{above-shortintertext-sep}=\meta{dimen}$ \quad(default: 3pt)\\
-% \SpecialKeyIndex{below-shortintertext-sep}$\key{below-shortintertext-sep}=\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}
-%
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\DeclarePairedDelimiter}
-% \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
-% \end{codesyntax}
-% \FeatureRequest{Lars Madsen}{2004/06/25}
-% In the \pkg{amsmath} documentation it is shown how to define a few
-% commands for typesetting the absolute value and norm. These
-% definitions are:
-% \begin{verbatim}
-% \newcommand*\abs[1]{\lvert#1\rvert}
-% \newcommand*\norm[1]{\lVert#1\rVert}
-% \end{verbatim}
-% \DeclarePairedDelimiter\abs\lvert\rvert
-% While they produce correct horizontal spacing you have to be
-% careful about the vertical spacing if the argument is just a
-% little taller than usual as in
-% \[
-% \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.
-% Both methods mean that you have to delete your \cs{abs} command,
-% which may not sound like an ideal solution.
-%
-% With the command \cs{DeclarePairedDelimiter} you can combine all
-% these features in one easy to use command. Let's show an example:
-% \begin{verbatim}
-% \DeclarePairedDelimiter\abs{\lvert}{\rvert}
-% \end{verbatim}
-% This defines the command \cs{abs} just like in the
-% \pkg{amsmath} documentation but with a few additions:
-% \begin{itemize}
-% \item A starred variant: \cs{abs*} produces delimiters that are preceded
-% by \cs{left} and \cs{right} resp.:
-% \begin{verbatim}
-% \[
-% \abs*{\frac{a}{b}}
-% \]
-% \end{verbatim}
-% \[
-% \abs*{\frac{a}{b}}
-% \]
-% \item A variant with an optional argument:
-% \cs{abs}\oarg{size_cmd}, where
-% \meta{size_cmd} is either \cs{big}, \cs{Big}, \cs{bigg}, or
-% \cs{Bigg} (if you have any bigggger versions you can use them
-% too).
-% \begin{verbatim}
-% \[
-% \abs[\Bigg]{\frac{a}{b}}
-% \]
-% \end{verbatim}
-% \[
-% \abs[\Bigg]{\frac{a}{b}}
-% \]
-% \end{itemize}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\DeclarePairedDelimiterX}
-% \cs{DeclarePairedDelimiterX}\marg{cmd}\oarg{num args}\marg{left_delim}\marg{right_delim}\marg{body}\\
-% \cs{delimsize}
-% \end{codesyntax}
-% Sometimes one might want to have the capabilities of
-% \cs{DeclarePairedDelimiter}, but also want a macro the takes more
-% than one argument and specify plus being able to specify the body
-% of the generated macro.
-%
-% \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
-% fences.
-%
-% Inside the \meta{body} part, the macro \cs{delimsize} refer to the
-% size of the outer fences. It can then be used inside \meta{body} to
-% scale any inner fences.
-%
-% Thus
-% \begin{quote}
-% \cs{DeclarePairedDelimiter}\marg{cmd}\marg{left_delim}\marg{right_delim}
-% \end{quote}
-% is the same thing as
-% \begin{quote}
-% \cs{DeclarePairedDelimiterX}\marg{cmd}\verb|[1]|\marg{left_delim}\marg{right_delim}\verb|{#1}|
-% \end{quote}
-% %
-% Let us do some examples. First we want to prepare a macro for inner
-% products, with two arguments such that we can hide the character
-% separating the arguments (a journal style might require a
-% semi-colon, so we will save a lot of hand editing). This can be
-% done via
-% \begin{verbatim}
-% \DeclarePairedDelimiterX\innerp[2]{\langle}{\rangle}{#1,#2}
-% \end{verbatim}
-% More interestingly we can refer to the size inside the
-% \meta{code}. Here we do a weird three argument `braket'
-% \begin{verbatim}
-% \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\braket[3]{\langle}{\rangle}%
-% {#1\,\delimsize\vert\,#2\,\delimsize\vert\,#3}
-% \begin{verbatim}
-% \[
-% \innerp*{A}{ \frac{1}{2} } \quad
-% \braket[\Big]{B}{\sum_{k} f_k}{C}
-% \]
-% \end{verbatim}
-% \[
-% \innerp*{A}{ \frac{1}{2} } \quad
-% \braket[\Big]{B}{\sum_{k}}{C}
-% \]
-% \iffalse
-% \bigskip
-%
-% \noindent
-% \textbf{\textit{Side note:}} We have changed the internal code of
-% \cs{DeclarePairedDelimiter} and \cs{DeclarePairedDelimiterX} such
-% that the starred version does no longer give the odd spacings that
-% \cs{left}\dots\cs{right} sometimes give. Compare this
-% \begin{verbatim}
-% \[
-% 2\innerp{A}{B} \quad 2\innerp*{A}{B} \quad 2\left\langle A,B \right\rangle
-% \]
-% \end{verbatim}
-% \[
-% \sin\innerp{A}{B} \quad
-% \sin\innerp*{A}{B} \quad
-% \sin\left\langle A,B \right\rangle
-% \]
-% The spacing in the last one does not behave like other fences (this
-% 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 this\footnote{The reason for \cs{SetSymbol} can be seen
-% when one want to build a complicated set where the condition has to
-% span several lines, then one may have to resort to a different
-% construction, giving the need to be able to refer back to the symbol
-% being used.}
-% \begin{verbatim}
-% % just to make sure it exists
-% \providecommand\given{}
-% % can be useful to refer to this outside \Set
-% \newcommand\SetSymbol[1][]{\nonscript\:#1\vert\nonscript\:\allowbreak}
-% \DeclarePairedDelimiterX\Set[1]\{\}{%
-% \renewcommand\given{\SetSymbol[\delimsize]}
-% #1
-% }
-% \end{verbatim}
-% \providecommand\given{}
-% \newcommand\SetSymbol[1][]{\nonscript\:#1\vert\nonscript\:\allowbreak}
-% \DeclarePairedDelimiterX\Set[1]\{\}{%
-% \renewcommand\given{\SetSymbol[\delimsize]}
-% #1
-% }
-% \begin{verbatim}
-% \[ \Set*{ x \in X \given \frac{\sqrt{x}}{x^2+1} > 1 } \]
-% \end{verbatim}
-% \[ \Set*{ x \in X \given \frac{\sqrt{x}}{x^2+1} > 1 } \]
-% Thus we end up with a syntax much closer to how we read this
-% aloud. Also we hide the `given' symbol for easy replacement.
-%
-% Combining with \pkg{etoolbox} it becomes easy to make a function
-% that automatically provide a marker for a blank argument:
-% \begin{verbatim}
-% \usepackage{etoolbox}
-% \DeclarePairedDelimiterX\norm[1]\lVert\rVert{
-% \ifblank{#1}{\:\cdot\:}{#1}
-% }
-% \end{verbatim}
-% Then \verb|\norm{}| will give you $\lVert\:\cdot\:\rVert$ while
-% \verb|\norm{a}| gives the expected $\lVert a \rVert$.
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\DeclarePairedDelimiterXPP}
-% \cs{DeclarePairedDelimiterXPP}\marg{cmd}\oarg{num args}\marg{pre
-% code}\marg{left_delim}\\%
-% \marg{right_delim}\marg{post code}\marg{body}
-% \end{codesyntax}
-% \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
-% the argument parsing.}
-%
-% As a consequence we provide
-% \cs{DeclarePairedDelimiterXPP}.\footnote{Extended
-% DeclarePairedDelimiter with Pre and Post code.} With the addition of
-% the \marg{pre code} and \marg{post code} it is identical to
-% \cs{DeclarePairedDelimiterX}. It should be interpreted as
-% \begin{center}
-% \marg{pre code} \marg{left_delim} \marg{body}
-% \marg{right_delim} \marg{post code}
-% \end{center}
-%
-%
-% An $\mathcal{L}^2$ norm can now be defined as
-% \begin{verbatim}
-% \DeclarePairedDelimiterXPP\lnorm[1]{}\lVert\rVert{_2}{#1}
-% \end{verbatim}
-% A probability macro with build in support for conditionals
-% (\cs{given} initialized as above)
-% \begin{verbatim}
-% \DeclarePairedDelimiterXPP\Prop[1]{\mathbb{P}}(){}{
-% \renewcommand\given{\nonscript\:\delimsize\vert\nonscript\:}
-% #1}
-% \end{verbatim}
-% Thus giving support for \verb|\Prob{A \given B}|.
-%
-% \medskip\noindent\textbf{Note:} As the number of arguments increase
-% 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
-% \pkg{xparse} for some of our macros, we might just as well rewrite
-% the entire package in \pkg{expl3}. Also it is not obvious how to get
-% \pkg{xparse} to support \verb|[3]| for the number of arguments. We
-% will consider this for a future release.
-%
-% \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}
-%
-% \bigskip\noindent \textbf{Note:} Since we are using macros to add
-% the \verb|\left...\right| constructions around some body, it
-% \emph{is} (in principle) possible to make such a construction
-% breakable across lines, even breakable within an \env{align}
-% 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})
-% and thus hide any \verb|&| or \verb|\\| from \env{align} and
-% \env{align} breaks down.
-%
-% When \cs{DeclarePairedDelimiter} is used, Sebastien Gouezel has
-% provided the following example \ProvidedBy{Sebastien
-% Gouezel}{2014/05/14}
-% \begin{verbatim}
-% \newcommand\MTkillspecial[1]{% helper macro
-% \bgroup
-% \catcode`\&=9
-% \let\\\relax%
-% \scantokens{#1}%
-% \egroup
-% }
-% \DeclarePairedDelimiter\abs\lvert\rvert
-% \reDeclarePairedDelimiterInnerWrapper\abs{star}{
-% \mathopen{#1\vphantom{\MTkillspecial{#2}}\kern-\nulldelimiterspace\right.}
-% #2
-% \mathclose{\left.\kern-\nulldelimiterspace\vphantom{\MTkillspecial{#2}}#3}}
-% \end{verbatim}
-% Then this example works just fine:
-% \begin{verbatim}
-% \begin{align*}
-% f(a) &=
-% \!\begin{aligned}[t]
-% \abs*{ & \frac{1}{2}+\cdots \\
-% & \dots+\frac{1}{2} }
-% \end{aligned}
-% \end{align*}
-% \end{verbatim}
-% \newcommand\MTkillspecial[1]{% helper macro
-% \bgroup
-% \catcode`\&=9
-% \let\\\relax%
-% \scantokens{#1}%
-% \egroup
-% }
-% \let\abs\relax
-% \MHInternalSyntaxOn
-% \MH_let:NwN\MT_delim_abs_nostar:\relax
-% \MHInternalSyntaxOff
-% \DeclarePairedDelimiter\abs\lvert\rvert
-% \reDeclarePairedDelimiterInnerWrapper\abs{star}{
-% \mathopen{#1\vphantom{\MTkillspecial{#2}}\kern-\nulldelimiterspace\right.}
-% #2
-% \mathclose{\left.\kern-\nulldelimiterspace\vphantom{\MTkillspecial{#2}}#3}}
-% \begin{align*}
-% f(a) &=
-% \!\begin{aligned}[t]
-% \abs*{&\frac{1}{2}+\cdots \\
-% &\dots+\frac{1}{2}}
-% \end{aligned}
-% \end{align*}
-%
-%
-% \subsection{Special symbols}
-%
-% This part of the manual is about special symbols. So far only one
-% technique is covered, but more will come.
-%
-% \subsubsection{Left and right parentheses}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\lparen}\cs{lparen}\texttt{~~}
-% \SpecialUsageIndex{\rparen}\cs{rparen}
-% \end{codesyntax}
-% When you want a big parenthesis or bracket in a math display you
-% usually just type
-% \begin{quote}
-% |\left( ... \right)|\quad or\quad |\left[ ... \right]|
-% \end{quote}
-% \LaTeX{} also defines the macro names \cs{lbrack} and \cs{rbrack}
-% to be shorthands for the left and right square bracket resp., but
-% doesn't provide similar definitions for the parentheses. Some
-% packages need command names to work with\footnote{The \pkg{empheq}
-% package needs command names for delimiters in order to make
-% auto-scaling versions.} so \pkg{mathtools} defines the commands
-% \cs{lparen} and \cs{rparen} to represent the left and right
-% parenthesis resp.
-%
-%
-% \subsubsection{Vertically centered colon}
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{centercolon}$\key{centercolon}=\texttt{true}\vert\texttt{false}$\\
-% \SpecialUsageIndex{\vcentcolon}\cs{vcentcolon}\texttt{~~}
-% \SpecialUsageIndex{\ordinarycolon}\cs{ordinarycolon}
-% \end{codesyntax}
-% \cttPosting{Donald Arseneau}{2000/12/07}
-% When trying to show assignment operations as in $ a := b $, one
-% quickly notices that the colon is not centered on the math axis as
-% 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
-%
-% Typing \cs{vcentcolon} every time is quite tedious, so one can use
-% the key \key{centercolon} to make the colon active instead.
-% \begin{verbatim}
-% \mathtoolsset{centercolon}
-% \[
-% a := b
-% \]
-% \mathtoolsset{centercolon=false}
-% \end{verbatim}
-% \[\mathtoolsset{centercolon}
-% a := b
-% \]
-% In this case the command \cs{ordinarycolon} typesets an~\ldots\
-% ordinary colon (what a surprise).
-%
-% \medskip
-% \noindent\textbf{Warning:} \texttt{centercolon} \emph{does not}
-% work with languages that make use of an active colon, most notably
-% \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.
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\coloneqq}\cs{coloneqq}\texttt{~~~~~}
-% \SpecialUsageIndex{\Coloneqq}\cs{Coloneqq}\texttt{~~~~~}
-% \SpecialUsageIndex{\coloneq}\cs{coloneq}\texttt{~~~}
-% \SpecialUsageIndex{\Coloneq}\cs{Coloneq}\\
-% \SpecialUsageIndex{\eqqcolon}\cs{eqqcolon}\texttt{~~~~~}
-% \SpecialUsageIndex{\Eqqcolon}\cs{Eqqcolon}\texttt{~~~~~}
-% \SpecialUsageIndex{\eqcolon}\cs{eqcolon}\texttt{~~~}
-% \SpecialUsageIndex{\Eqcolon}\cs{Eqcolon}\\
-% \SpecialUsageIndex{\colonapprox}\cs{colonapprox}\texttt{~~}
-% \SpecialUsageIndex{\Colonapprox}\cs{Colonapprox}\texttt{~~}
-% \SpecialUsageIndex{\colonsim}\cs{colonsim}\texttt{~~}
-% \SpecialUsageIndex{\Colonsim}\cs{Colonsim}\\
-% \SpecialUsageIndex{\dblcolon}\cs{dblcolon}
-% \end{codesyntax}
-% The font packages \pkg{txfonts} and \pkg{pxfonts} provides 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
-% 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
-% fonts, \pkg{mathtools} provides the symbols for you. Here are a few
-% examples:
-% \begin{verbatim}
-% \[
-% a \coloneqq b \quad c \Colonapprox d \quad e \dblcolon f
-% \]
-% \end{verbatim}
-% \[
-% a \coloneqq b \quad c \Colonapprox d \quad e \dblcolon f
-% \]
-%
-%
-%
-% \subsubsection{A few missing symbols}
-%
-% Most provided math font sets are missing the symbols \cs{nuparrow}
-% and \cs{ndownarrow} (i.e.\ negated up- and downarrow) plus a `big'
-% version of \cs{times}. Therefore we will provide constructed
-% versions of these whenever they are not already available.
-% \begin{codesyntax}
-% \SpecialUsageIndex{\nuparrow}\cs{nuparrow}\\
-% \SpecialUsageIndex{\ndownarrow}\cs{ndownarrow}\\
-% \SpecialUsageIndex{\bigtimes}\cs{bigtimes}
-% \end{codesyntax}
-%
-% \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
-% \cs{nleftarrrow} respectively, so these needs 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
-% \cs{nrightarrow} and \cs{nleftarrow}, themselves.
-%
-% With those requirements in place, we have
-% \begin{verbatim}
-% \[
-% \lim_{a\ndownarrow 0} f(a) \neq \bigtimes_n X_n \qquad
-% \frac{ \bigtimes_{k=1}^7 B_k \nuparrow \Omega }{2}
-% \]
-% \end{verbatim}
-% \[
-% \lim_{a\ndownarrow 0} f(a) \neq \bigtimes_n X_n \qquad
-% \frac{ \bigtimes_{k=1}^7 B_k \nuparrow \Omega }{2}
-% \]
-%
-%
-%
-%
-% \section{A tribute to Michael J.~Downes}
-%
-% Michael J.~Downes (1958--2003) was one of the major architects
-% behind \pkg{amsmath} and member of the \LaTeX{} Team. He made many
-% great contributions to the \TeX{} community; not only by the means
-% of widely spread macro packages such as \pkg{amsmath} but also in
-% the form of actively giving advice on newsgroups. Some of
-% Michael's macro solutions on the newsgroups never made it into
-% publicly available macro packages although they certainly deserved
-% it, so \pkg{mathtools} tries to rectify this matter. The macros
-% described in this section are either straight copies or heavily
-% inspired by his original postings.
-%
-% \subsection{Mathematics within italic text}
-%
-% \begin{codesyntax}
-% \SpecialKeyIndex{mathic}$\key{mathic}=\texttt{true}\vert\texttt{false}$
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{1998/05/14}
-% \TeX{} usually takes care of italic corrections in text, but fails
-% when it comes to math. If you use the \LaTeX{} inline math
-% commands \cs{(} and \cs{)} you can however work around it by
-% setting the key \key{mathic} to true as shown below.
-% \begin{verbatim}
-% \begin{quote}\itshape
-% Compare these lines: \par
-% \mathtoolsset{mathic} % or \mathtoolsset{mathic=true}
-% Subset of \(V\) and subset of \(A\). \par
-% \mathtoolsset{mathic=false}
-% Subset of \(V\) and subset of \(A\).
-% \par
-% \end{quote}
-% \end{verbatim}
-% \begin{quote}\itshape
-% Compare these lines: \par
-% \mathtoolsset{mathic}
-% Subset of \(V\) and subset of \(A\). \par
-% \mathtoolsset{mathic=false}
-% Subset of \(V\) and subset of \(A\).
-% \par
-% \end{quote}
-%
-% As of 2013, \cs(\cs) are robust, as is the italic corrected versions.
-%
-% \subsection{Left sub/superscripts}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\prescript}
-% \cs{prescript}\marg{sup}\marg{sub}\marg{arg}\texttt{~~}
-% \SpecialKeyIndex{prescript-sup-format}
-% $\key{prescript-sup-format}=\meta{cmd}$\\
-% \SpecialKeyIndex{prescript-sub-format}
-% $\key{prescript-sub-format}=\meta{cmd}$\hfill
-% \SpecialKeyIndex{prescript-arg-format}
-% \rlap{$\key{prescript-arg-format}=\meta{cmd}$}^^A
-% \phantom{$\key{prescript-sup-format}=\meta{cmd}$}
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{2000/12/20}
-% Sometimes one wants to put a sub- or superscript on the left of
-% the argument. The \cs{prescript} command does just that:
-% \begin{verbatim}
-% \[
-% {}^{4}_{12}\mathbf{C}^{5+}_{2} \quad
-% \prescript{14}{2}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{4}{12}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{14}{}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{}{2}{\mathbf{C}}^{5+}_{2}
-% \]
-% \end{verbatim}
-% \[
-% {}^{4}_{12}\mathbf{C}^{5+}_{2} \quad
-% \prescript{14}{2}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{4}{12}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{14}{}{\mathbf{C}}^{5+}_{2} \quad
-% \prescript{}{2}{\mathbf{C}}^{5+}_{2}
-% \]
-%
-% The formatting of the arguments is controlled by three keys. This
-% silly example shows you how to use them:
-% \begin{verbatim}
-% \newcommand*\myisotope[3]{%
-% \begingroup % to keep changes local. We cannot use a brace group
-% % as it affects spacing!
-% \mathtoolsset{
-% prescript-sup-format=\mathit,
-% prescript-sub-format=\mathbf,
-% prescript-arg-format=\mathrm,
-% }%
-% \prescript{#1}{#2}{#3}%
-% \endgroup
-% }
-% \[
-% \myisotope{A}{Z}{X}\to \myisotope{A-4}{Z-2}{Y}+
-% \myisotope{4}{2}{\alpha}
-% \]
-% \end{verbatim}
-% \newcommand*\myisotope[3]{%
-% \begingroup
-% \mathtoolsset{
-% prescript-sup-format=\mathit,
-% prescript-sub-format=\mathbf,
-% prescript-arg-format=\mathrm,
-% }%
-% \prescript{#1}{#2}{#3}%
-% \endgroup
-% }
-% \[
-% \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}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\DeclareMathSizes}
-% \cs{DeclareMathSizes}\marg{dimen}\marg{dimen}\marg{dimen}\marg{dimen}
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{2002/10/17}
-% If you don't know about \cs{DeclareMathSizes}, then skip the rest
-% of this text. If you do know, then all that is needed to say is
-% that with \pkg{mathtools} it is patched so that all regular
-% dimension suffixes are now valid in the last three arguments. Thus
-% a declaration such as
-% \begin{verbatim}
-% \DeclareMathSize{9.5dd}{9.5dd}{7.5dd}{6.5dd}
-% \end{verbatim}
-% will now work (it doesn't in standard \LaTeX). When this bug has
-% been fixed in \LaTeX, this fix will be removed from
-% \pkg{mathtools}.
-%
-% \subsection{Spreading equations}\label{sec:spread}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{spreadlines}
-% \cs{begin}\arg{spreadlines}\marg{dimen} \meta{contents}
-% \cs{end}\arg{spreadlines}
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{2002/10/17}
-% 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:
-% \begin{verbatim}
-% \begin{spreadlines}{20pt}
-% Large spaces between the lines.
-% \begin{gather}
-% a=b\\
-% c=d
-% \end{gather}
-% \end{spreadlines}
-% Back to normal spacing.
-% \begin{gather}
-% a=b\\
-% c=d
-% \end{gather}
-% \end{verbatim}
-% \begin{spreadlines}{20pt}
-% Large spaces between the lines.
-% \begin{gather}
-% a=b\\
-% c=d
-% \end{gather}
-% \end{spreadlines}
-% Back to normal spacing.
-% \begin{gather}
-% a=b\\
-% c=d
-% \end{gather}
-%
-%
-% \subsection{Gathered environments}\label{subsec:gathered}
-%
-% \begin{codesyntax}
-% \SpecialEnvIndex{lgathered}\cs{begin}\arg{lgathered}\oarg{pos}
-% \meta{contents} \cs{end}\arg{lgathered} \\
-% \SpecialEnvIndex{rgathered}\cs{begin}\arg{rgathered}\oarg{pos}
-% \meta{contents} \cs{end}\arg{rgathered} \\
-% \SpecialUsageIndex{\newgathered}\cs{newgathered}\marg{name}\marg{pre_line}\marg{post_line}\marg{after}\\
-% \SpecialUsageIndex{\renewgathered}\cs{renewgathered}\marg{name}\marg{pre_line}\marg{post_line}\marg{after}
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{2001/01/17}
-% In a document set in \opt{fleqn}, you might sometimes want an
-% inner \env{gathered} environment that doesn't center its lines but
-% puts them flush left. The \env{lgathered} environment works just
-% like the standard \env{gathered} except that it flushes its
-% contents left:
-% \begin{verbatim}
-% \begin{equation}
-% \begin{lgathered}
-% x=1,\quad x+1=2 \\
-% y=2
-% \end{lgathered}
-% \end{equation}
-% \end{verbatim}
-% \begin{equation}
-% \begin{lgathered}
-% x=1,\quad x+1=2 \\
-% y=2
-% \end{lgathered}
-% \end{equation}
-% Similarly the \env{rgathered} puts it contents flush right.
-%
-% More interesting is probably the command \cs{newgathered}. In this
-% example we define a gathered version that centers the lines and
-% also prints a star and a number at the left of each line.
-% \begin{verbatim}
-% \newcounter{steplinecnt}
-% \newcommand\stepline{\stepcounter{steplinecnt}\thesteplinecnt}
-% \newgathered{stargathered}
-% {\llap{\stepline}$*$\quad\hfil}% \hfil for centering
-% {\hfil}% \hfil for centering
-% {\setcounter{steplinecnt}{0}}% reset counter
-% \end{verbatim}
-% \newcounter{steplinecnt}
-% \newcommand\stepline{\stepcounter{steplinecnt}\thesteplinecnt}
-% \newgathered{stargathered}{\llap{\stepline}$*$\quad\hfil}{\hfil}{\setcounter{steplinecnt}{0}}
-% With these definitions we can get something like this:
-% \begin{verbatim}
-% \begin{gather}
-% \begin{stargathered}
-% x=1,\quad x+1=2 \\
-% y=2
-% \end{stargathered}
-% \end{gather}
-% \end{verbatim}
-% \begin{gather}
-% \begin{stargathered}
-% x=1,\quad x+1=2 \\
-% y=2
-% \end{stargathered}
-% \end{gather}
-% \cs{renewgathered} renews a gathered environment of course.
-%
-% In all fairness it should be stated that the original concept by
-% Michael has been extended quite a bit in \pkg{mathtools}. Only the
-% end product of \env{lgathered} is the same.
-%
-% \subsection{Split fractions}
-%
-% \begin{codesyntax}
-% \SpecialUsageIndex{\splitfrac}\cs{splitfrac}\marg{numer}\marg{denom}\texttt{~~}
-% \SpecialUsageIndex{\splitdfrac}\cs{splitdfrac}\marg{numer}\marg{denom}
-% \end{codesyntax}
-% \cttPosting{Michael J.~Downes}{2001/12/06}
-% These commands provide split fractions e.g., multiline fractions:
-% \begin{verbatim}
-% \[
-% a=\frac{
-% \splitfrac{xy + xy + xy + xy + xy}
-% {+ xy + xy + xy + xy}
-% }
-% {z}
-% =\frac{
-% \splitdfrac{xy + xy + xy + xy + xy}
-% {+ xy + xy + xy + xy}
-% }
-% {z}
-% \]
-% \end{verbatim}
-% \[
-% a=\frac{
-% \splitfrac{xy + xy + xy + xy + xy}
-% {+ xy + xy + xy + xy}
-% }
-% {z}
-% =\frac{
-% \splitdfrac{xy + xy + xy + xy + xy}
-% {+ xy + xy + xy + xy}
-% }
-% {z}
-% \]
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-%
-% \begin{thebibliography}{9}
-% \bibitem{Perlis01}
-% Alexander R. Perlis,
-% \emph{A complement to \cs{smash}, \cs{llap}, and \cs{rlap}},
-% TUGboat 22(4) (2001).
-% \bibitem{Ams99}
-% American Mathematical Society and Michael Downes,
-% \emph{Technical notes on the \pkg{amsmath} package} Version 2.0,
-% 1999/10/29.
-% (Available from CTAN as file \texttt{technote.tex}.)
-% \bibitem{Ams00}
-% Frank Mittelbach, Rainer Sch\"opf, Michael Downes, and David M.~Jones,
-% \emph{The \pkg{amsmath} package} Version 2.13,
-% 2000/07/18.
-% (Available from CTAN as file \texttt{amsmath.dtx}.)
-% \bibitem{A-W:MG04}
-% Frank Mittelbach and Michel Goossens.
-% \emph{The {\LaTeX} Companion}.
-% Tools and Techniques for Computer Typesetting. Addison-Wesley,
-% Boston, Massachusetts, 2 edition, 2004.
-% With Johannes Braams, David Carlisle, and Chris Rowley.
-%
-% \bibitem{Carl99}
-% David Carlisle,
-% \emph{The \pkg{keyval} Package},
-% Version 1.13, 1999/03/16.
-% (Available from CTAN as file \texttt{keyval.dtx}.)
-%
-% \bibitem{Voss:2004}
-% Herbert Vo\ss,
-% \emph{Math mode}, Version 1.71,
-% 2004/07/06.
-% (Available from CTAN as file \texttt{Voss-Mathmode.pdf}.)
-%
-% \bibitem{Swanson}
-% Ellen Swanson,
-% \emph{Mathematics into type}.
-% American Mathematical Society, updated edition, 1999.
-% Updated by Arlene O'Sean and Antoinette Schleyer.
-% \end{thebibliography}
-%
-%
-% \StopEventually{}
-%
-%
-% \section{Options and package loading}
-%
-%
-% Lets start the package.
-% \begin{macrocode}
-%<*package>
-\ProvidesPackage{mathtools}%
- [2014/05/21 v1.14 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}}
-% \begin{macrocode}
-\RequirePackage{keyval,calc}
-\RequirePackage{mhsetup}[2010/01/21]
-\MHInternalSyntaxOn
-% \end{macrocode}
-% \changes{v1.13}{2013/02/11}{Robustifying \cs{(}\cs{)}\cs{[}\cs{]}}
-% 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.
-% \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}%
- \@eha
- }%
- {%
- \@ifundefined{\expandafter\@gobble\string#1\space}%
- {%
- \expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
- \edef\reserved@a{\string#1}%
- \def\reserved@b{#1}%
- \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
- \edef#1{%
- \ifx\reserved@a\reserved@b
- \noexpand\x@protect\noexpand#1%
- \fi
- \noexpand\protect\expandafter\noexpand
- \csname\expandafter\@gobble\string#1\space\endcsname}%
- }%
- {\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
-}
-% \end{macrocode}
-% We also provide a handy alternativ version, that will robustify no
-% matter what. Useful for the \texttt{mathic} option.
-% \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}%
- \@eha
- }%
- {%
- % \@ifundefined{\expandafter\@gobble\string#1\space}%
- % {%
- \expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
- \edef\reserved@a{\string#1}%
- \def\reserved@b{#1}%
- \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
- \edef#1{%
- \ifx\reserved@a\reserved@b
- \noexpand\x@protect\noexpand#1%
- \fi
- \noexpand\protect\expandafter\noexpand
- \csname\expandafter\@gobble\string#1\space\endcsname}%
- % }%
- % {\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\MT_options_name:}
-% \begin{macro}{\mathtoolsset}
-% The name for the options and a user interface for setting keys.
-% \begin{macrocode}
-\def\MT_options_name:{mathtools}
-\newcommand*\mathtoolsset[1]{\setkeys{\MT_options_name:}{#1}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% Fix \pkg{amsmath} bugs (strongly recommended!). It requires a
-% great deal of typing to avoid fixing the bugs. He he.
-% \begin{macrocode}
-\MH_new_boolean:n {fixamsmath}
-\DeclareOption{fixamsmath}{
- \MH_set_boolean_T:n {fixamsmath}
-}
-\DeclareOption{donotfixamsmathbugs}{
- \MH_set_boolean_F:n {fixamsmath}
-}
-% \end{macrocode}
-% Disallow spaces before optional arguments in certain \pkg{amsmath}
-% building blocks.
-% \begin{macrocode}
-\DeclareOption{allowspaces}{
- \MH_let:NwN \MaybeMHPrecedingSpacesOff
- \relax
- \MH_let:NwN \MH_maybe_nospace_ifnextchar:Nnn \kernel@ifnextchar
-}
-\DeclareOption{disallowspaces}{
- \MH_let:NwN \MaybeMHPrecedingSpacesOff
- \MHPrecedingSpacesOff
- \MH_let:NwN \MH_maybe_nospace_ifnextchar:Nnn \MH_nospace_ifnextchar:Nnn
-}
-% \end{macrocode}
-% \changes{v1.13}{2013/02/11}{Option to disable robustifying
-% \cs{(}\cs{)} and \cs{[}\cs{]}}
-% Option to disallow robustifying \cs{(}\cs{)} and \cs{[}\cs{]}.
-% \begin{macrocode}
-\MH_new_boolean:n {robustify}
-\MH_set_boolean_T:n {robustify}
-\DeclareOption{nonrobust}{
- \MH_set_boolean_F:n {robustify}
-}
-% \end{macrocode}
-% Pass all other options directly to \pkg{amsmath}.
-% \begin{macrocode}
-\DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{amsmath}
-}
-% \end{macrocode}
-% Executing options
-% \begin{macrocode}
-\ExecuteOptions{fixamsmath,disallowspaces}
-\ProcessOptions\relax
-% \end{macrocode}
-% We have to turn off the new syntax when \pkg{amstext} is loaded.
-% \begin{macrocode}
-\MHInternalSyntaxOff
-\RequirePackage{amsmath}[2000/07/18]
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-% \end{macrocode}
-% \begin{macro}{\MT_true_false_error:}
-% Make sure the user selects either `true' or `false' when asked too.
-% \begin{macrocode}
-\def\MT_true_false_error:{
- \PackageError{mathtools}
- {You~ have~ to~ select~ either~ `true'~ or~ `false'}
- {I'll~ assume~ you~ chose~ `false'~ for~ now.}
-}
-% \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}
-%
-%
-% \section{Macros I got ideas for myself}
-%
-%
-%
-% \subsection{Tag forms}
-% This is quite simple, but why isn't it then a part of some widely
-% distributed package? Beats me.
-%
-% \begin{macro}{\MT_define_tagform:nwnn}
-% We start out by defining a command that will allow us to define
-% commands similar to \cs{tagform@} only this will give us tag form
-% \emph{types}. The actual code is very similar to the one in
-% \pkg{amsmath}.
-% \begin{macrocode}
-\def\MT_define_tagform:nwnn #1[#2]#3#4{
- \@namedef{MT_tagform_#1:n}##1
- {\maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}}
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\newtagform}
-% Similar to \cs{newcommand}. Check if defined and scan for presence
-% of optional argument. Then call generic command.
-% \begin{macrocode}
-\providecommand*\newtagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {\@ifnextchar[%
- {\MT_define_tagform:nwnn #1}%
- {\MT_define_tagform:nwnn #1[]}%
- }{\PackageError{mathtools}
- {The~ tag~ form~ `#1'~ is~ already~ defined\MessageBreak
- You~ probably~ want~ to~ look~ up~ \@backslashchar renewtagform~
- instead}
- {I~ will~ just~ ignore~ your~ wish~ for~ now.}}
-}
-% \end{macrocode}
-% Provide a default tag form which---surprise, surprise---is
-% identical to the standard definition.
-% \begin{macrocode}
-\newtagform{default}{(}{)}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\renewtagform}
-% Similar to \cs{renewcommand}.
-% \begin{macrocode}
-\providecommand*\renewtagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {\PackageError{mathtools}
- {The~ tag~ form~ `#1'~ is~ not~ defined\MessageBreak
- You~ probably~ want~ to~ look~ up~ \@backslashchar newtagform~ instead}
- {I~ will~ just~ ignore~ your~ wish~ for~ now.}}
- {\@ifnextchar[%
- {\MT_define_tagform:nwnn #1}%
- {\MT_define_tagform:nwnn #1[]}%
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\usetagform}
-% Then the activator. Test if the tag form is defined and then
-% activate it by redefining \cs{tagform@}.
-% \begin{macrocode}
-\providecommand*\usetagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {
- \PackageError{mathtools}{%
- You~ have~ chosen~ the~ tag~ form~ `#1'\MessageBreak
- but~ it~ appears~ to~ be~ undefined}
- {I~ will~ use~ the~ default~ tag~ form~ instead.}%
- \@namedef{tagform@}{\@nameuse{MT_tagform_default:n}}
- }
- { \@namedef{tagform@}{\@nameuse{MT_tagform_#1:n}} }
-% \end{macrocode}
-% Here we patch if we're using the special ``show only referenced
-% equations'' feature.
-% \begin{macrocode}
- \MH_if_boolean:nT {show_only_refs}{
- \MH_let:NwN \MT_prev_tagform:n \tagform@
- \def\tagform@##1{\MT_extended_tagform:n {##1}}
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Showing only referenced tags}
-% A little more interesting is the way to print only the equation
-% numbers that are actually referenced.
-%
-% A few booleans to help determine which situations we're in.
-% \begin{macrocode}
-\MH_new_boolean:n {manual_tag}
-\MH_new_boolean:n {raw_maketag}
-% \end{macrocode}
-% \begin{macro}{\MT_AmS_tag_in_align:}
-% \begin{macro}{\tag@in@align}
-% \begin{macro}{\tag@in@display}
-% We'll need to know when the user has put in a manual tag, and since
-% \cs{tag} is \cs{let} to all sorts of things inside the \pkg{amsmath}
-% code it is safer to provide a small hack to the functions it is copied
-% from. Note that we can't use \cs{iftag@}.
-% \begin{macrocode}
-\MH_let:NwN \MT_AmS_tag_in_align: \tag@in@align
-\def\tag@in@align{
- \global\MH_set_boolean_T:n {manual_tag}
- \MT_AmS_tag_in_align:
-}
-\def\tag@in@display#1#{
- \relax
- \global\MH_set_boolean_T:n {manual_tag}
- \tag@in@display@a{#1}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\MT_extended_tagform:n}
-% \changes{v1.01}{2004/08/03}{Simplified quite a bit}
-% The extended version of \cs{tagform@}.
-% \begin{macrocode}
-\def\MT_extended_tagform:n #1{
- \MH_set_boolean_F:n {raw_maketag}
-% \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. 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
- { \MH_if_boolean:nTF {show_manual_tags}
- { \MT_prev_tagform:n {#1} }
- { \stepcounter{equation} }
- }{\kern1sp}% this last {\kern1sp} is new.
- \else:
- \MH_if_boolean:nTF {manual_tag}
- { \MH_if_boolean:nTF {show_manual_tags}
- { \MT_prev_tagform:n {#1} }
- { \@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
- }
- }
- {
- \@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}
-}
-% \end{macrocode}
-% \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
- \MT_maketag:n {#1}
- \else:
- \MH_if_boolean:nTF {raw_maketag}
- {
- \MH_if_boolean:nTF {show_manual_tags}
- { \MT_maketag:n {#1} }
- { \@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 (well actually not true, see above).
-% \begin{macrocode}
- \global\MH_set_boolean_F:n {manual_tag}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_extended_eqref:n}
-% \changes{v1.01}{2004/08/03}{Make it robust}
-% We let \cs{eqref} write the label to the \file{aux} file, which is
-% read at the beginning of the next run. Then we print the equation
-% number as usual.
-% \changes{v1.14}{2013/03/07}{It was not really robust}
-% \begin{macrocode}
-\def\MT_extended_eqref:n #1{
- \protected@write\@auxout{}
- {\string\MT@newlabel{#1}}
- \textup{\MT_prev_tagform:n {\ref{#1}}}
-}
-\EQ_MakeRobust\MT_extended_eqref:n
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\refeq}
-% \begin{macro}{\MT_extended_refeq:n}
-% Similar to \cs{eqref} and \cs{MT_extended_eqref:n}.
-% \begin{macrocode}
-\newcommand*\refeq[1]{
- \textup{\ref{#1}}
-}
-\def\MT_extended_refeq:n #1{
- \protected@write\@auxout{}
- {\string\MT@newlabel{#1}}
- \textup{\ref{#1}}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\MT@newlabel}
-% We can't use |:| or |_| in the command name (yet). We define the
-% special labels for the equations that have been referenced in the
-% previous run.
-% \begin{macrocode}
-\newcommand*\MT@newlabel[1]{ \global\@namedef{MT_r_#1}{} }
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-\MH_new_boolean:n {show_only_refs}
-\MH_new_boolean:n {show_manual_tags}
-\define@key{\MT_options_name:}{showmanualtags}[true]{
- \@ifundefined{boolean_show_manual_tags_#1:}
- { \MT_true_false_error:
- \@nameuse{boolean_show_manual_tags_false:}
- }
- { \@nameuse{boolean_show_manual_tags_#1:} }
-}
-% \end{macrocode}
-% \begin{macro}{\MT_showonlyrefs_true:}
-% The implementation is based on the idea that \cs{tagform@} can be
-% called in two circumstances: when the tag is being printed in the
-% equation and when it is being printed during a reference.
-% \begin{macrocode}
-\newcommand*\MT_showonlyrefs_true:{
- \MH_if_boolean:nF {show_only_refs}{
- \MH_set_boolean_T:n {show_only_refs}
-% \end{macrocode}
-% Save the definitions of the original commands.
-% \begin{macrocode}
- \MH_let:NwN \MT_incr_eqnum: \incr@eqnum
- \MH_let:NwN \incr@eqnum \@empty
- \MH_let:NwN \MT_array_parbox_restore: \@arrayparboxrestore
- \@xp\def\@xp\@arrayparboxrestore\@xp{\@arrayparboxrestore
- \MH_let:NwN \incr@eqnum \@empty
- }
- \MH_let:NwN \MT_prev_tagform:n \tagform@
- \MH_let:NwN \MT_eqref:n \eqref
- \MH_let:NwN \MT_refeq:n \refeq
- \MH_let:NwN \MT_maketag:n \maketag@@@
- \MH_let:NwN \maketag@@@ \MT_extended_maketag:n
-% \end{macrocode}
-% We redefine \cs{tagform@}.
-% \begin{macrocode}
- \def\tagform@##1{\MT_extended_tagform:n {##1}}
-% \end{macrocode}
-% Then \cs{eqref}:
-% \begin{macrocode}
- \MH_let:NwN \eqref \MT_extended_eqref:n
- \MH_let:NwN \refeq \MT_extended_refeq:n
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_showonlyrefs_false:}
-% This macro reverts the settings.
-% \begin{macrocode}
-\def\MT_showonlyrefs_false: {
- \MH_if_boolean:nT {show_only_refs}{
- \MH_set_boolean_F:n {show_only_refs}
- \MH_let:NwN \tagform@ \MT_prev_tagform:n
- \MH_let:NwN \eqref \MT_eqref:n
- \MH_let:NwN \refeq \MT_refeq:n
- \MH_let:NwN \maketag@@@ \MT_maketag:n
- \MH_let:NwN \incr@eqnum \MT_incr_eqnum:
- \MH_let:NwN \@arrayparboxrestore \MT_array_parbox_restore:
- }
-}
-\define@key{\MT_options_name:}{showonlyrefs}[true]{
- \@nameuse{MT_showonlyrefs_#1:}
-}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \begin{macro}{\nonumber}
-% \changes{v1.01}{2004/08/03}{Fixed using \cs{notag} or \cs{nonumber}
-% with the \key{showonlyrefs} feature}
-% We have to redefine \cs{nonumber} else it will subtract one from the
-% equation number where we don't want it. This is probably not needed
-% since \cs{nonumber} is unnecessary when \key{showonlyrefs} is in
-% effect, but now you can use it with old documents as well.
-% \begin{macrocode}
-\renewcommand\nonumber{
- \if@eqnsw
- \if_meaning:NN \incr@eqnum\@empty
-% \end{macrocode}
-% Only subtract the number if |show_only_refs| is false.
-% \begin{macrocode}
- \MH_if_boolean:nF {show_only_refs}
- {\addtocounter{equation}\m@ne}
- \fi:
- \fi:
- \MH_let:NwN \print@eqnum\@empty \MH_let:NwN \incr@eqnum\@empty
- \global\@eqnswfalse
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\noeqref}
-% \changes{v1.04}{2008/03/26}{Added \cs{noeqref} (daleif)}
-% \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%
- \@safe@activesfalse}
- \@esphack}
-
-% \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.}
-%
-% \begin{macro}{\xleftrightarrow}
-% \begin{macro}{\MT_leftrightarrow_fill:}
-% \begin{macro}{\xLeftarrow}
-% \begin{macro}{\xRightarrow}
-% \begin{macro}{\xLeftrightarrow}
-%
-% These are straight adaptions from \pkg{amsmath}.
-% \begin{macrocode}
-\providecommand*\xleftrightarrow[2][]{%
- \ext@arrow 3095\MT_leftrightarrow_fill:{#1}{#2}}
-\def\MT_leftrightarrow_fill:{%
- \arrowfill@\leftarrow\relbar\rightarrow}
-\providecommand*\xLeftarrow[2][]{%
- \ext@arrow 0055{\Leftarrowfill@}{#1}{#2}}
-\providecommand*\xRightarrow[2][]{%
- \ext@arrow 0055{\Rightarrowfill@}{#1}{#2}}
-\providecommand*\xLeftrightarrow[2][]{%
- \ext@arrow 0055{\Leftrightarrowfill@}{#1}{#2}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MT_rightharpoondown_fill:}
-% \begin{macro}{\MT_rightharpoonup_fill:}
-% \begin{macro}{\MT_leftharpoondown_fill:}
-% \begin{macro}{\MT_leftharpoonup_fill:}
-% \begin{macro}{\xrightharpoondown}
-% \begin{macro}{\xrightharpoonup}
-% \begin{macro}{\xleftharpoondown}
-% \begin{macro}{\xleftharpoonup}
-% \begin{macro}{\xleftrightharpoons}
-% \begin{macro}{\xrightleftharpoons}
-% The harpoons.
-% \begin{macrocode}
-\def\MT_rightharpoondown_fill:{%
- \arrowfill@\relbar\relbar\rightharpoondown}
-\def\MT_rightharpoonup_fill:{%
- \arrowfill@\relbar\relbar\rightharpoonup}
-\def\MT_leftharpoondown_fill:{%
- \arrowfill@\leftharpoondown\relbar\relbar}
-\def\MT_leftharpoonup_fill:{%
- \arrowfill@\leftharpoonup\relbar\relbar}
-\providecommand*\xrightharpoondown[2][]{%
- \ext@arrow 0359\MT_rightharpoondown_fill:{#1}{#2}}
-\providecommand*\xrightharpoonup[2][]{%
- \ext@arrow 0359\MT_rightharpoonup_fill:{#1}{#2}}
-\providecommand*\xleftharpoondown[2][]{%
- \ext@arrow 3095\MT_leftharpoondown_fill:{#1}{#2}}
-\providecommand*\xleftharpoonup[2][]{%
- \ext@arrow 3095\MT_leftharpoonup_fill:{#1}{#2}}
-\providecommand*\xleftrightharpoons[2][]{\mathrel{%
- \raise.22ex\hbox{%
- $\ext@arrow 3095\MT_leftharpoonup_fill:{\phantom{#1}}{#2}$}%
- \setbox0=\hbox{%
- $\ext@arrow 0359\MT_rightharpoondown_fill:{#1}{\phantom{#2}}$}%
- \kern-\wd0 \lower.22ex\box0}}
-\providecommand*\xrightleftharpoons[2][]{\mathrel{%
- \raise.22ex\hbox{%
- $\ext@arrow 0359\MT_rightharpoonup_fill:{\phantom{#1}}{#2}$}%
- \setbox0=\hbox{%
- $\ext@arrow 3095\MT_leftharpoondown_fill:{#1}{\phantom{#2}}$}%
- \kern-\wd0 \lower.22ex\box0}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\xhookleftarrow}
-% \begin{macro}{\xhookrightarrow}
-% \begin{macro}{\MT_hookright_fill:}
-% The hooks.
-% \begin{macrocode}
-\providecommand*\xhookleftarrow[2][]{%
- \ext@arrow 3095\MT_hookleft_fill:{#1}{#2}}
-\def\MT_hookleft_fill:{%
- \arrowfill@\leftarrow\relbar{\relbar\joinrel\rhook}}
-\providecommand*\xhookrightarrow[2][]{%
- \ext@arrow 3095\MT_hookright_fill:{#1}{#2}}
-\def\MT_hookright_fill:{%
- \arrowfill@{\lhook\joinrel\relbar}\relbar\rightarrow}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\xmapsto}
-% \begin{macro}{\MT_mapsto_fill:}
-% The maps-to arrow.
-% \begin{macrocode}
-\providecommand*\xmapsto[2][]{%
- \ext@arrow 0395\MT_mapsto_fill:{#1}{#2}}
-\def\MT_mapsto_fill:{%
- \arrowfill@{\mapstochar\relbar}\relbar\rightarrow}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \subsection{Underbrackets etc.}
-% \begin{macro}{\underbracket}
-% \begin{macro}{\MT_underbracket_I:w}
-% \begin{macro}{\MT_underbracket_II:w}
-% \begin{macro}{\upbracketfill}
-% \begin{macro}{\upbracketend}
-% The \cs{underbracket} macro. Scan for two optional arguments. When
-% \pkg{xparse} becomes the standard this will be so much easier.
-% \begin{macrocode}
-\providecommand*\underbracket{
- \@ifnextchar[
- {\MT_underbracket_I:w}
- {\MT_underbracket_I:w[\l_MT_bracketheight_fdim]}}
-\def\MT_underbracket_I:w[#1]{
- \@ifnextchar[
- {\MT_underbracket_II:w[#1]}
- {\MT_underbracket_II:w[#1][.7\fontdimen5\textfont2]}}
-\def\MT_underbracket_II:w[#1][#2]#3{%
- \mathop{\vtop{\m@th\ialign{##
- \crcr
- $\hfil\displaystyle{#3}\hfil$%
- \crcr
- \noalign{\kern .2\fontdimen5\textfont2 \nointerlineskip}%
- \upbracketfill {#1}{#2}%
- \crcr}}}
- \limits}
-\def\upbracketfill#1#2{%
- \sbox\z@{$\braceld$}
- \edef\l_MT_bracketheight_fdim{\the\ht\z@}%
- \upbracketend{#1}{#2}
- \leaders \vrule \@height \z@ \@depth #1 \hfill
- \upbracketend{#1}{#2}%
-}
-\def\upbracketend#1#2{\vrule \@height #2 \@width #1\relax}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\overbracket}
-% \begin{macro}{\MT_overbracket_I:w}
-% \begin{macro}{\MT_overbracket_II:w}
-% \begin{macro}{\downbracketfill}
-% \begin{macro}{\downbracketend}
-% The overbracket is quite similar.
-% \begin{macrocode}
-\providecommand*\overbracket{
- \@ifnextchar[
- {\MT_overbracket_I:w}
- {\MT_overbracket_I:w[\l_MT_bracketheight_fdim]}}
-\def\MT_overbracket_I:w[#1]{
- \@ifnextchar[
- {\MT_overbracket_II:w[#1]}
- {\MT_overbracket_II:w[#1][.7\fontdimen5\textfont2]}}
-\def\MT_overbracket_II:w[#1][#2]#3{%
- \mathop{\vbox{\m@th\ialign{##
- \crcr
- \downbracketfill{#1}{#2}%
- \crcr
- \noalign{\kern .2\fontdimen5\textfont2 \nointerlineskip}%
- $\hfil\displaystyle{#3}\hfil$
- \crcr}}}%
- \limits}
-\def\downbracketfill#1#2{%
- \sbox\z@{$\braceld$}\edef\l_MT_bracketheight_fdim{\the\ht\z@}
- \downbracketend{#1}{#2}
- \leaders \vrule \@height #1 \@depth \z@ \hfill
- \downbracketend{#1}{#2}%
-}
-\def\downbracketend#1#2{\vrule \@width #1\@depth #2\relax}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\LaTeXunderbrace}
-% \begin{macro}{\underbrace}
-% Redefinition of \cs{underbrace} and \cs{overbrace}.
-% \begin{macrocode}
-\MH_let:NwN \LaTeXunderbrace \underbrace
-\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
- $\hfil\displaystyle{#1}\hfil$\crcr
- \noalign{\kern.7\fontdimen5\textfont2\nointerlineskip}%
-% \end{macrocode}
-% |.5\fontdimen5\textfont2| is the height of the tip of the brace.
-% the remaining |.2\fontdimen5\textfont2| is for space between
-% \begin{macrocode}
- \upbracefill\crcr\noalign{\kern.5\fontdimen5\textfont2}}}}\limits}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\LaTeXoverbrace}
-% \begin{macro}{\overbrace}
-% Same technique for \cs{overbrace}.
-% \begin{macrocode}
-\MH_let:NwN \LaTeXoverbrace \overbrace
-\def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr
- \noalign{\kern.5\fontdimen5\textfont2}%
-% \end{macrocode}
-% Adjust for tip height
-% \begin{macrocode}
- \downbracefill\crcr
- \noalign{\kern.7\fontdimen5\textfont2\nointerlineskip}%
-% \end{macrocode}
-% |.5\fontdimen5\textfont2| is the height of the tip of the brace.
-% The remaining |.2\fontdimen5\textfont2| is for space between
-% \begin{macrocode}
- $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-%
-%
-%
-% \subsection{Special symbols}
-%
-% \subsubsection{Command names for parentheses}
-% \begin{macro}{\lparen}
-% \begin{macro}{\rparen}
-% Just an addition to the \LaTeXe\ kernel.
-% \begin{macrocode}
-\providecommand*\lparen{(}
-\providecommand*\rparen{)}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-
-% \subsubsection{Vertically centered colon}
-%
-% \begin{macro}{\vcentcolon}
-% \begin{macro}{\ordinarycolon}
-% \begin{macro}{\MT_active_colon_true:}
-% \begin{macro}{\MT_active_colon_false:}
-% This is from the hands of Donald Arseneau. Somehow it is not
-% distributed, so I include it here. Here's the original text by
-% Donald:
-% \begin{verbatim}
-% centercolon.sty Dec 7, 2000
-% Donald Arseneau asnd@triumf.ca
-% Public domain.
-% Vertically center colon characters (:) in math mode.
-% Particularly useful for $ a:=b$, and still correct for
-% $f : x\to y$. May be used in any TeX.
-% \end{verbatim}
-%
-% Slight change: the colon meaning is given only if \verb|centercolon|
-% is explicitly requested (before it was always assigned even if : remained
-% catcode 12). This allows better interaction with packages like babel
-% that also make colon active.
-% \begin{macrocode}
-\def\vcentcolon{\mathrel{\mathop\ordinarycolon}}
-\providecommand\ordinarycolon{:}
-\begingroup
- \catcode`\:=\active
- \lowercase{\endgroup
-\def\MT_activate_colon{%
- \ifnum\mathcode`\:=32768\relax
- \let\ordinarycolon= :%
- \else
- \mathchardef\ordinarycolon\mathcode`\: %
- \fi
- \let :\vcentcolon
- }
-}
-% \end{macrocode}
-% Option processing.
-% The `false' branch can only be requested if the option has previously been set `true'.
-% (By default neither are set.)
-% \begin{macrocode}
-\MH_new_boolean:n {center_colon}
-\define@key{\MT_options_name:}{centercolon}[true]{
- \@ifundefined{MT_active_colon_#1:}
- { \MT_true_false_error:n
- \@nameuse{MT_active_colon_false:}
- }
- { \@nameuse{MT_active_colon_#1:} }
-}
-\def\MT_active_colon_true: {
- \MT_activate_colon
- \MH_if_boolean:nF {center_colon}{
- \MH_set_boolean_T:n {center_colon}
- \edef\MT_active_colon_false:
- {\mathcode`\noexpand\:=\the\mathcode`\:\relax}
- \mathcode`\:=32768
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\dblcolon}
-% \begin{macro}{\coloneqq}
-% \begin{macro}{\Coloneqq}
-% \begin{macro}{\coloneq}
-% \begin{macro}{\Coloneq}
-% \begin{macro}{\eqqcolon}
-% \begin{macro}{\Eqqcolon}
-% \begin{macro}{\eqcolon}
-% \begin{macro}{\Eqcolon}
-% \begin{macro}{\colonapprox}
-% \begin{macro}{\Colonapprox}
-% \begin{macro}{\colonsim}
-% \begin{macro}{\Colonsim}
-% This is just to simulate all the \cs{..colon..} symbols from
-% \pkg{txfonts} and \pkg{pxfonts}.
-% \changes{v1.08c}{2010/11/17}{Enclosed all in \cs{mathrel}}
-% \begin{macrocode}
-\AtBeginDocument{
- \providecommand*\dblcolon{\mathrel{\vcentcolon\mkern-.9mu\vcentcolon}}
- \providecommand*\coloneqq{\mathrel{\vcentcolon\mkern-1.2mu=}}
- \providecommand*\Coloneqq{\mathrel{\dblcolon\mkern-1.2mu=}}
- \providecommand*\coloneq{\mathrel{\vcentcolon\mkern-1.2mu\mathrel{-}}}
- \providecommand*\Coloneq{\mathrel{\dblcolon\mkern-1.2mu\mathrel{-}}}
- \providecommand*\eqqcolon{\mathrel{=\mkern-1.2mu\vcentcolon}}
- \providecommand*\Eqqcolon{\mathrel{=\mkern-1.2mu\dblcolon}}
- \providecommand*\eqcolon{\mathrel{\mathrel{-}\mkern-1.2mu\vcentcolon}}
- \providecommand*\Eqcolon{\mathrel{\mathrel{-}\mkern-1.2mu\dblcolon}}
- \providecommand*\colonapprox{\mathrel{\vcentcolon\mkern-1.2mu\approx}}
- \providecommand*\Colonapprox{\mathrel{\dblcolon\mkern-1.2mu\approx}}
- \providecommand*\colonsim{\mathrel{\vcentcolon\mkern-1.2mu\sim}}
- \providecommand*\Colonsim{\mathrel{\dblcolon\mkern-1.2mu\sim}}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Multlined}
-%
-% \begin{macro}{\g_MT_multlinerow_int}
-% \begin{macro}{\l_MT_multwidth_dim}
-% Helpers.
-% \begin{macrocode}
-\let \AMS@math@cr@@ \math@cr@@
-\MH_new_boolean:n {mult_firstline}
-\MH_new_boolean:n {outer_mult}
-\newcount\g_MT_multlinerow_int
-\newdimen\l_MT_multwidth_dim
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MT_test_for_tcb_other:nnnnn}
-% This tests if the token(s) is/are equal to either t, c, or~b, or
-% something entirely different.
-% \begin{macrocode}
-\newcommand*\MT_test_for_tcb_other:nnnnn [1]{
- \if:w t#1\relax
- \expandafter\MH_use_choice_i:nnnn
- \else:
- \if:w c#1\relax
- \expandafter\expandafter\expandafter\MH_use_choice_ii:nnnn
- \else:
- \if:w b#1\relax
- \expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\expandafter
- \MH_use_choice_iii:nnnn
- \else:
- \expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\expandafter
- \MH_use_choice_iv:nnnn
- \fi:
- \fi:
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_mult_invisible_line:}
-% An invisible line.
-% \textbf{BUG:} \cs{baselineskip} is zero inside an array or matrix,
-% thus in those cases the line is \emph{not} invisible.
-% \changes{v1.14}{2014/05/21}{Added -\cs{jot}}
-% \begin{macrocode}
-\def\MT_mult_invisible_line: {
- \crcr
- \global\MH_set_boolean_F:n {mult_firstline}
- \hbox to \l_MT_multwidth_dim{}\crcr
- \noalign{\vskip-\baselineskip \vskip-\jot \vskip-\normallineskip}
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_mult_mathcr_atat:w}
-% The normal \cs{math@cr@@} with our hooks.
-% \begin{macrocode}
-\def\MT_mult_mathcr_atat:w [#1]{%
- \if_num:w 0=`{\fi: \iffalse}\fi:
- \MH_if_boolean:nT {mult_firstline}{
- \kern\l_MT_mult_left_fdim
- \MT_mult_invisible_line:
- }
- \crcr
- \noalign{\vskip#1\relax}
- \global\advance\g_MT_multlinerow_int\@ne
- \if_num:w \g_MT_multlinerow_int=\l_MT_multline_lastline_fint
- \MH_let:NwN \math@cr@@\MT_mult_last_mathcr:w
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_mult_firstandlast_mathcr:w}
-% The special case where there is a two-line \env{multlined}. We
-% insert the first kern, then the invisible line of the desired
-% width, the optional vertical space and then the last kern.
-% \begin{macrocode}
-\def\MT_mult_firstandlast_mathcr:w [#1]{%
- \if_num:w 0=`{\fi: \iffalse}\fi:
- \kern\l_MT_mult_left_fdim
- \MT_mult_invisible_line:
- \noalign{\vskip#1\relax}
- \kern\l_MT_mult_right_fdim
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_mult_last_mathcr:w}
-% The normal last \cs{math@cr@@} which inserts the last kern.
-% \begin{macrocode}
-\def\MT_mult_last_mathcr:w [#1]{
- \if_num:w 0=`{\fi: \iffalse}\fi:\math@cr@@@
- \noalign{\vskip#1\relax}
- \kern\l_MT_mult_right_fdim}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_start_mult:N}
-% Setup for \env{multlined}. Finds the position.
-% \begin{macrocode}
-\newcommand\MT_start_mult:N [1]{
- \MT_test_for_tcb_other:nnnnn {#1}
- { \MH_let:NwN \MT_next:\vtop }
- { \MH_let:NwN \MT_next:\vcenter }
- { \MH_let:NwN \MT_next:\vbox }
- {
- \PackageError{mathtools}
- {Invalid~ position~ specifier.~ I'll~ try~ to~ recover~ with~
- `c'}\@ehc
- }
- \collect@body\MT_mult_internal:n
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_shoveright:wn}
-% \begin{macro}{\MT_shoveleft:wn}
-% Extended versions of \cs{shoveleft} and \cs{shoveright}.
-% \begin{macrocode}
-\newcommand*\MT_shoveright:wn [2][0pt]{%
- #2\hfilneg
- \setlength\@tempdima{#1}
- \kern\@tempdima
-}
-\newcommand*\MT_shoveleft:wn [2][0pt]{%
- \hfilneg
- \setlength\@tempdima{#1}
- \kern\@tempdima
- #2
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MT_mult_internal:n}
-% \changes{v1.01a}{2004/10/10}{Added Ord atom to beginning of each line}
-% The real internal \env{multlined}.
-% \begin{macrocode}
-\newcommand*\MT_mult_internal:n [1]{
- \MH_if_boolean:nF {outer_mult}{\null\,}
- \MT_next:
- \bgroup
-% \end{macrocode}
-% Restore the meaning of \cmd{\\} inside \env{multlined}, else it
-% wouldn't work in the \env{equation} environment. Set the fake row
-% counter to zero.
-% \begin{macrocode}
- \Let@
- \def\l_MT_multline_lastline_fint{0 }
- \chardef\dspbrk@context\@ne \restore@math@cr
-% \end{macrocode}
-% Use private versions.
-% \begin{macrocode}
- \MH_let:NwN \math@cr@@\MT_mult_mathcr_atat:w
- \MH_let:NwN \shoveleft\MT_shoveleft:wn
- \MH_let:NwN \shoveright\MT_shoveright:wn
- \spread@equation
- \MH_set_boolean_F:n {mult_firstline}
-% \end{macrocode}
-% Do some measuring.
-% \begin{macrocode}
- \MT_measure_mult:n {#1}
-% \end{macrocode}
-% Make sure the box is wide enough.
-% \begin{macrocode}
- \if_dim:w \l_MT_multwidth_dim<\l_MT_multline_measure_fdim
- \MH_setlength:dn \l_MT_multwidth_dim{\l_MT_multline_measure_fdim}
- \fi
- \MH_set_boolean_T:n {mult_firstline}
-% \end{macrocode}
-% Tricky bit: If we only encountered one \cmd{\\} then use a very
-% special \cs{math@cr@@} that inserts everything needed.
-% \begin{macrocode}
- \if_num:w \l_MT_multline_lastline_fint=\@ne
- \MH_let:NwN \math@cr@@ \MT_mult_firstandlast_mathcr:w
- \fi:
-% \end{macrocode}
-% Do the typesetting.
-% \begin{macrocode}
- \ialign\bgroup
- \hfil\strut@$\m@th\displaystyle{}##$\hfil
- \crcr
- \hfilneg
- #1
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_measure_mult:n}
-% \changes{v1.01a}{2004/10/10}{Added Ord atom to beginning of each line}
-% Measuring. Disable all labelling and check the number of lines.
-% \begin{macrocode}
-\newcommand\MT_measure_mult:n [1]{
- \begingroup
- \g_MT_multlinerow_int\@ne
- \MH_let:NwN \label\MT_gobblelabel:w
- \MH_let:NwN \tag\gobble@tag
- \setbox\z@\vbox{
- \ialign{\strut@$\m@th\displaystyle{}##$
- \crcr
- #1
- \crcr
- }
- }
- \xdef\l_MT_multline_measure_fdim{\the\wdz@}
- \advance\g_MT_multlinerow_int\m@ne
- \xdef\l_MT_multline_lastline_fint{\number\g_MT_multlinerow_int}
- \endgroup
- \g_MT_multlinerow_int\@ne
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_multlined_second_arg:w}
-% Scan for a second optional argument.
-% \begin{macrocode}
-\MaybeMHPrecedingSpacesOff
-\newcommand*\MT_multlined_second_arg:w [1][\@empty]{
- \MT_test_for_tcb_other:nnnnn {#1}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {
- \if_meaning:NN \@empty#1\@empty
- \else:
- \setlength \l_MT_multwidth_dim{#1}
- \fi:
- }
- \MT_start_mult:N \MT_mult_default_pos:
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{environment}{multlined}
-% The user environment. Scan for an optional argument.
-% \begin{macrocode}
-\newenvironment{multlined}[1][]
- {\MH_group_align_safe_begin:
- \MT_test_for_tcb_other:nnnnn {#1}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {
- \if_meaning:NN \@empty#1\@empty
- \else:
- \setlength \l_MT_multwidth_dim{#1}
- \fi:
- }
- \MT_multlined_second_arg:w
- }
- {
- \hfilneg \endaligned \MH_group_align_safe_end:
- }
-\MHPrecedingSpacesOn
-% \end{macrocode}
-% \end{environment}
-% The keys needed.
-% \begin{macrocode}
-\define@key{\MT_options_name:}
- {firstline-afterskip}{\def\l_MT_mult_left_fdim{#1}}
-\define@key{\MT_options_name:}
- {lastline-preskip}{\def\l_MT_mult_right_fdim{#1}}
-\define@key{\MT_options_name:}
- {multlined-width}{\setlength \l_MT_multwidth_dim{#1}}
-\define@key{\MT_options_name:}
- {multlined-pos}{\def\MT_mult_default_pos:{#1}}
-\setkeys{\MT_options_name:}{
- firstline-afterskip=\multlinegap,
- lastline-preskip=\multlinegap,
- multlined-width=0pt,
- multlined-pos=c,
-}
-% \end{macrocode}
-% \begin{macro}{\MT_gobblelabel:w}
-% Better than to assume that \cs{label} has exactly one mandatory
-% argument, hence the \texttt{w} specifier.
-% \begin{macrocode}
-\def\MT_gobblelabel:w #1{}
-% \end{macrocode}
-% \end{macro}
-%
-%
-%
-%
-% \section{Macros suggested/requested by Lars Madsen}
-%
-% The macros in this section are all requests made by Lars Madsen.
-%
-% \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}
-% \end{macro}
-%
-% \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}
-% \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
-% a star or an optional argument and one mandatory argument.
-% \begin{macrocode}
-\newcommand*\DeclarePairedDelimiter[3]{%
- \@ifdefinable{#1}{
-% \end{macrocode}
-% Define the starred command to just put \cs{left} and \cs{right}
-% before the delimiters, wrapped in a callback function.
-% \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}%
- { \@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.
-% \begin{macrocode}
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [2][\\@gobble]
- {
-% \end{macrocode}
-% With the default optional argument we wind up with \cs{relax},
-% else we get \cs{biggr} and \cs{biggl} etc.
-% \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.
-% \begin{macrocode}
- \DeclareRobustCommand{#1}{
- \@ifstar
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\DeclarePairedDelimiterX}
-% \changes{v1.08}{2010/06/10}{Added \cs{DeclarePairedDelimiterX}}
-% It has turned out that it is convenient to have a more general
-% version of \cs{DeclarePairedDelimiter}. In this version the user
-% 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}}
-% \begin{macrocode}
-\def\MHempty{}
-\def\DeclarePairedDelimiterX#1[#2]#3#4#5{%
- \@ifdefinable{#1}{
-% \end{macrocode}
-% The constructor takes five arguments, the name of the macro, the
-% number of arguments (1-9), the left and right delimiter, the inner
-% code for the two macros. First we verify that the number of arguments fit.
-% \changes{v1.14}{2014/05/20}{Factored out in separate macro for reuse}
-% \begin{macrocode}
- \MT_paired_delimx_arg_test:n{#2}
-% \end{macrocode}
-% \changes{v1.13}{2012/05/10}{Using call back instead}
-% Define 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
-% the normal version it will hold the provided optional argument.
-% \begin{macrocode}
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _star:\endcsname
- [#2]
- {
- \begingroup
- \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}. 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
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
- {\left#3}{#5}{\right#4}
- \endgroup
- }
-% \end{macrocode}
-% In order for the starred and non-starred version to have the same
-% arguments, we need to introduce an extra macro to catch the optional
-% argument (this means that the non-starred version can actually
-% support ten arguments!).
-% Here we do things a little differently than with
-% \cs{DeclarePairedDelimiter}. The optional argument have \cs{MHempty}
-% as the default. This is locally changed when we scale the
-% delimiters, such that it can eat the l/r if needed.
-% \begin{macrocode}
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [1][\MHempty]
- {
-% \end{macrocode}
-% We need to introduce a local group in order to support nesting. It
-% is ended inside \verb|\MT_delim_\MH_cs_to_str:N #1 _nostar_inner:|
-% \begin{macrocode}
- \begingroup
- \def\delimsize{##1}
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_inner:}
- }
-% \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{%
- % \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}
- {
- \let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4
- }
- \endgroup
- }
- \DeclareRobustCommand{#1}{
- \@ifstar
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_paired_delimx_arg_test:n}
-% This tests the \oarg{num args} part of
-% \cs{DeclarePairedDelimiterX} and \cs{DeclarePairedDelimiterXPP}
-% (code reuse), and complains if it is not 1,\dots,9.
-% \changes{v1.14}{2014/05/20}{Added}
-% \begin{macrocode}
-\def\MT_paired_delimx_arg_test:n #1{
- \ifnum#1>9\relax
- \PackageError{mathtools}{No~ more~ than~ 9~ arguments}{}
- \else
- \ifnum#1<1\relax
- \PackageError{mathtools}{Macro~ need~ 1~ or~ more~
- arguments.\MessageBreak Please~ change~ [#1]~ to~ [1]~ ... [9]}{}
- \fi
- \fi
- }
-
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\DeclarePairedDelimiterXPP}
-% \changes{v1.14}{2014/05/20}{Added}
-% Similar to \cs{DeclarePairedDelimiterX}, but we can add \meta{pre}
-% and \meta{pre} code before and after the delimiters. Arguments are
-% interpreted as
-% \marg{macro}\oarg{num}\marg{pre code}\marg{left delim}\marg{right
-% delim}\marg{post code}\marg{body}
-% \begin{macrocode}
-\def\DeclarePairedDelimiterXPP#1[#2]#3#4#5#6#7{%
- \@ifdefinable{#1}{
- \MT_paired_delimx_arg_test:n{#2}
- \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}
- #3
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
- {\left#4}{#7}{\right#5}
- #6
- \endgroup
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [1][\MHempty]
- {
- \begingroup
- \def\delimsize{##1}
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_inner:}
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname
- [#2]
- {
- #3
- \@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 #4
- }
- {#7}
- {
- \let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #5
- }
- #6
- \endgroup
- }
- \DeclareRobustCommand{#1}{
- \@ifstar
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-
-% \end{macrocode}
-% \end{macro}
-
-
-%
-% \subsection{A \texttt{\textbackslash displaystyle} \env{cases} environment}
-%
-% \begin{macro}{\MT_start_cases:nnn}
-% We define a single command that does all the hard work.
-% \changes{v1.08}{2010/06/10}{made \cs{MT_start_cases:nnnn} more general}
-% \begin{macrocode}
-\def\MT_start_cases:nnnn #1#2#3#4{ % #1=sep,#2=lpreamble,#3=rpreamble,#4=delim
- \RIfM@\else
- \nonmatherr@{\begin{\@currenvir}}
- \fi
- \MH_group_align_safe_begin:
- \left#4
- \vcenter \bgroup
- \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
- \let \math@cr@@\AMS@math@cr@@
- \spread@equation
- \ialign\bgroup
-% \end{macrocode}
-% Set the first column flush left in \cs{displaystyle} math and the
-% second as specified by the second argument. The first argument is
-% the separation between the columns. It could be a \cs{quad} or
-% something entirely different.
-% \begin{macrocode}
- \strut@#2 &#1\strut@
- #3
- \crcr
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MH_end_cases:}
-% \begin{macrocode}
-\def\MH_end_cases:{\crcr\egroup
- \restorecolumn@
- \egroup
- \MH_group_align_safe_end:
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\newcases}
-% \begin{macro}{\renewcases}
-% Easy creation of new \env{cases}-like environments.
-% \changes{v1.08}{2010/06/10}{changed to match the change in \cs{MT_start_cases:nnnn}}
-% \begin{macrocode}
-\newcommand*\newcases[6]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
- \newenvironment{#1}
- {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
- {\MH_end_cases:\right#6}
-}
-\newcommand*\renewcases[6]{
- \renewenvironment{#1}
- {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
- {\MH_end_cases:\right#6}
-}
-% \end{macrocode}
-% \begin{environment}{dcases}
-% \begin{environment}{dcases*}
-% \begin{environment}{rcases}
-% \begin{environment}{rcases*}
-% \begin{environment}{drcases}
-% \begin{environment}{drcases*}
-% \begin{environment}{cases*}
-% \env{dcases} is a traditional cases with display style math in
-% both columns, while \env{dcases*} has text in the second column.
-% \changes{v1.08}{2010/06/10}{changed to match the change in
-% \cs{newcases} plus added rcases and drcases}
-% \begin{macrocode}
-\newcases{dcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
-\newcases{dcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.}
-\newcases{rcases}{\quad}{%
- $\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace}
-\newcases{rcases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace}
-\newcases{drcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace}
-\newcases{drcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace}
-\newcases{cases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.}
-% \end{macrocode}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{New matrix environments}
-% \begin{macro}{\MT_matrix_begin:N}
-% \begin{macro}{\MT_matrix_end:}
-% Here are a few helpers for the matrices. \cs{MT_matrix_begin:N}
-% takes one argument specifying the column type for the array inside
-% the matrix. and \cs{MT_matrix_end:} inserts the correct ending.
-% \begin{macrocode}
-\def\MT_matrix_begin:N #1{%
- \hskip -\arraycolsep
- \MH_let:NwN \@ifnextchar \MH_nospace_ifnextchar:Nnn
- \array{*\c@MaxMatrixCols #1}}
-\def\MT_matrix_end:{\endarray \hskip -\arraycolsep}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% Before we define the environments we better make sure that spaces
-% before the optional argument is disallowed. Else a user who types
-% \begin{verbatim}
-% \[
-% \begin{pmatrix*}
-% [c] & a \\
-% b & d
-% \end{pmatrix*}
-% \]
-% \end{verbatim}
-% will lose the \texttt{[c]}!
-% \begin{macrocode}
-\MaybeMHPrecedingSpacesOff
-% \end{macrocode}
-% \begin{environment}{matrix*}
-% This environment is just like \env{matrix} only it takes an
-% optional argument specifying the column type.
-% \begin{macrocode}
-\newenvironment{matrix*}[1][c]
- {\MT_matrix_begin:N #1}
- {\MT_matrix_end:}
-% \end{macrocode}
-% \end{environment}
-% \begin{environment}{pmatrix*}
-% \begin{environment}{bmatrix*}
-% \begin{environment}{Bmatrix*}
-% \begin{environment}{vmatrix*}
-% \begin{environment}{Vmatrix*}
-% Then starred versions of the other \AmS{} matrices.
-% \begin{macrocode}
-\newenvironment{pmatrix*}[1][c]
- {\left(\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right)}
-\newenvironment{bmatrix*}[1][c]
- {\left[\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right]}
-\newenvironment{Bmatrix*}[1][c]
- {\left\lbrace\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\rbrace}
-\newenvironment{vmatrix*}[1][c]
- {\left\lvert\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\rvert}
-\newenvironment{Vmatrix*}[1][c]
- {\left\lVert\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\lVert}
-% \end{macrocode}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-%
-% \changes{v1.10}{2011/02/12}{Added the code below, courtesy of Rasmus Villemoes}
-% Now we are at it why not provide fenced versions of the
-% \env{smallmatrix} construction as well. We will only provide a
-% version that can be adjusted as \env{matrix*} above, thus we keep
-% the * in the name. The implementation is courtesy of Rasmus
-% Villemoes. Rasmus also suggested making the default alignment in
-% these environments globally adjustable, so we did
-% (\texttt{smallmatrix-align=c} by default). It \emph{is} possible to
-% do something similar with the large matrix environments, but that
-% might cause problems with the \texttt{array} package, thus for now
-% we lease that feature alone.
-%
-% The base code is a variation over the original \env{smallmatrix}
-% environmetn fround in \texttt{amsmath}, thus we will not comment it further.
-%
-% TODO: make the code check that the optional argument is either
-% \texttt{c}, \texttt{l} or \texttt{r}.
-% \begin{macrocode}
-\def\MT_smallmatrix_begin:N #1{%
- \Let@\restore@math@cr\default@tag
- \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
- \csname MT_smallmatrix_#1_begin:\endcsname
-}
-\def\MT_smallmatrix_end:{\crcr\egroup\egroup\MT_smallmatrix_inner_space:}
-\def\MT_smallmatrix_l_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup$\m@th\scriptstyle##$\hfil&&\thickspace
- $\m@th\scriptstyle##$\hfil\crcr
-}
-\def\MT_smallmatrix_c_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup\hfil$\m@th\scriptstyle##$\hfil&&\thickspace\hfil
- $\m@th\scriptstyle##$\hfil\crcr
-}
-\def\MT_smallmatrix_r_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup\hfil$\m@th\scriptstyle##$&&\thickspace\hfil
- $\m@th\scriptstyle##$\crcr
-}
-\newenvironment{smallmatrix*}[1][\MT_smallmatrix_default_align:]
- {\MT_smallmatrix_begin:N #1}
- {\MT_smallmatrix_end:}
-% \end{macrocode}
-% We would like to keep to the tradition of the \verb?Xmatrix? and
-% \verb?Xmatrix*? macros we added earlier, since most code is similar
-% we define them using a constructor macro. We also apply the trick
-% used within \verb?\DeclarePairedDelimiter(X)? such that \verb?\left?
-% \verb?\right? constructions produce spacings corresponding to
-% \verb?\mathopen? and \verb?\mathclose?.
-% \begin{macrocode}
-\def\MT_fenced_sm_generator:nnn #1#2#3{%
- \@ifundefined{#1}{%
- \newenvironment{#1}
- {\@nameuse{#1hook}\mathopen{}\mathclose\bgroup\left#2\MT_smallmatrix_begin:N c}%
- {\MT_smallmatrix_end:\aftergroup\egroup\right#3}%
- }{}%
- \@ifundefined{#1*}{%
- \newenvironment{#1*}[1][\MT_smallmatrix_default_align:]%
- {\@nameuse{#1hook}\mathopen{}\mathclose\bgroup\left#2\MT_smallmatrix_begin:N ##1}%
- {\MT_smallmatrix_end:\aftergroup\egroup\right#3}%
- }{}%
-}
-\MT_fenced_sm_generator:nnn{psmallmatrix}()
-\MT_fenced_sm_generator:nnn{bsmallmatrix}[]
-\MT_fenced_sm_generator:nnn{Bsmallmatrix}\lbrace\rbrace
-\MT_fenced_sm_generator:nnn{vsmallmatrix}\lvert\rvert
-\MT_fenced_sm_generator:nnn{Vsmallmatrix}\lVert\rVert
-% \end{macrocode}
-%
-% The options associated with this.
-% \begin{macrocode}
-\define@key{\MT_options_name:}
- {smallmatrix-align}{\def\MT_smallmatrix_default_align:{#1}}
-\define@key{\MT_options_name:}
- {smallmatrix-inner-space}{\def\MT_smallmatrix_inner_space:{#1}}
-\setkeys{\MT_options_name:}{
- smallmatrix-align=c,
- smallmatrix-inner-space=\,
-}
-
-% \end{macrocode}
-% Restore the usual spacing behavior.
-% \begin{macrocode}
-\MHPrecedingSpacesOn
-% \end{macrocode}
-%
-% \subsection{Smashing an operator with limits}
-%
-% \begin{macro}{\smashoperator}
-% The user command. Define \cs{MT_smop_use:NNNNN} to be one of the
-% specialized commands \cs{MT_smop_smash_l:NNNNN},
-% \cs{MT_smop_smash_r:NNNNN}, or the default
-% \cs{MT_smop_smash_lr:NNNNN}.
-% \begin{macrocode}
-\newcommand*\smashoperator[2][lr]{
- \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
- \toks@{#2}
- \expandafter\MT_smop_get_args:wwwNnNn
- \the\toks@\@nil\@nil\@nil\@nil\@nil\@nil\@@nil
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_smop_remove_nil_vi:N}
-% \begin{macro}{\MT_smop_mathop:n}
-% \begin{macro}{\MT_smop_limits:}
-% Some helper functions.
-% \begin{macrocode}
-\def\MT_smop_remove_nil_vi:N #1\@nil\@nil\@nil\@nil\@nil\@nil{#1}
-\def\MT_smop_mathop:n {\mathop}
-\def\MT_smop_limits: {\limits}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% Some conditionals.
-% \begin{macrocode}
-\MH_new_boolean:n {smop_one}
-\MH_new_boolean:n {smop_two}
-% \end{macrocode}
-% \begin{macro}{\MT_smop_get_args:wwwNnNn}
-% The argument stripping. There are three different valid types of
-% input:
-% \begin{enumerate}
-% \item An operator with neither subscript nor superscript.
-% \item An operator with one subscript or superscript.
-% \item An operator with both subscript and superscript.
-% \end{enumerate}
-% Additionally an operator can be either a single macro as in
-% \cs{sum} or in \cs{mathop}\arg{A} and people might be tempted to
-% put a \cs{limits} after the operator, even though it's not
-% necessary. Thus the input with most tokens would be something like
-% \begin{verbatim}
-% \mathop{TTT}\limits_{sub}^{sup}
-% \end{verbatim}
-% Therefore we have to scan for seven arguments, but there might
-% only be one actually. So let's list the possible situations:
-% \begin{enumerate}
-% \item \verb|\mathop{TTT}\limits_{subsub}^{supsup}|
-% \item \verb|\mathop{TTT}_{subsub}^{supsup}|
-% \item \verb|\sum\limits_{subsub}^{supsup}|
-% \item \verb|\sum_{subsub}^{supsup}|
-% \end{enumerate}
-% Furthermore the |_{subsub}^{supsup}| part can also just be
-% |_{subsub}| or empty.
-% \begin{macrocode}
-\def\MT_smop_get_args:wwwNnNn #1#2#3#4#5#6#7\@@nil{%
- \begingroup
- \def\MT_smop_arg_A: {#1} \def\MT_smop_arg_B: {#2}
- \def\MT_smop_arg_C: {#3} \def\MT_smop_arg_D: {#4}
- \def\MT_smop_arg_E: {#5} \def\MT_smop_arg_F: {#6}
- \def\MT_smop_arg_G: {#7}
-% \end{macrocode}
-% Check if A is \cs{mathop}. If it is, we know that B is the argument
-% of the \cs{mathop}.
-% \begin{macrocode}
- \if_meaning:NN \MT_smop_arg_A: \MT_smop_mathop:n
-% \end{macrocode}
-% If A was \cs{mathop} we check if C is \cs{limits}
-% \begin{macrocode}
- \if_meaning:NN \MT_smop_arg_C:\MT_smop_limits:
- \def\MT_smop_final_arg_A:{#1{#2}}%
-% \end{macrocode}
-% Now we have something like \verb|\mathop{TTT}\limits|. Then check
-% if D is \cs{@nil}.
-% \begin{macrocode}
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_D:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_E:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_F:
- \edef\MT_smop_final_arg_E:
- {\expandafter\MT_smop_remove_nil_vi:N \MT_smop_arg_G: }
- \fi:
- \fi:
- \else:
-% \end{macrocode}
-% Here we have something like \verb|\mathop{TTT}|. Still check
-% if D is \cs{@nil}.
-% \begin{macrocode}
- \def\MT_smop_final_arg_A:{#1{#2}}%
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_C:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_D:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_E:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_F:
- \fi:
- \fi:
- \fi:
-% \end{macrocode}
-% If A was not \cs{mathop}, it is an operator in itself, so we check
-% if B is \cs{limits}
-% \begin{macrocode}
- \else:
- \if_meaning:NN \MT_smop_arg_B:\MT_smop_limits:
- \def\MT_smop_final_arg_A:{#1}%
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_C:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_D:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_E:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_F:
- \fi:
- \fi:
- \else:
-% \end{macrocode}
-% No \cs{limits} was found, so we already have the right input. Just
-% forget about the last two arguments.
-% \begin{macrocode}
- \def\MT_smop_final_arg_A:{#1}%
- \if_meaning:NN \MT_smop_arg_C: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_B:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_C:
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_D:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_E:
- \fi:
- \fi:
- \fi:
- \fi:
-% \end{macrocode}
-% No reason to measure if there's no sub or sup.
-% \begin{macrocode}
- \MH_if_boolean:nT {smop_one}{
- \MT_smop_measure:NNNNN
- \MT_smop_final_arg_A: \MT_smop_final_arg_B: \MT_smop_final_arg_C:
- \MT_smop_final_arg_D: \MT_smop_final_arg_E:
- }
- \MT_smop_use:NNNNN
- \MT_smop_final_arg_A: \MT_smop_final_arg_B: \MT_smop_final_arg_C:
- \MT_smop_final_arg_D: \MT_smop_final_arg_E:
- \endgroup
-}
-% \end{macrocode}
-% \end{macro}
-% Typeset what is necessary and ignore width of sub and sup:
-% \begin{macrocode}
-\def\MT_smop_needed_args:NNNNN #1#2#3#4#5{%
- \displaystyle #1
- \MH_if_boolean:nT {smop_one}{
-% \end{macrocode}
-% Let's use the internal versions of \cs{crampedclap} now that we now
-% it is set in \cs{scriptstyle}.
-% \begin{macrocode}
- \limits#2{\MT_cramped_clap_internal:Nn \scriptstyle{#3}}
- \MH_if_boolean:nT {smop_two}{
- #4{\MT_cramped_clap_internal:Nn \scriptstyle{#5}}
- }
- }
-}
-% \end{macrocode}
-% Measure the natural width. \cs{@tempdima} holds the dimen we need to
-% adjust it all with.
-% \begin{macrocode}
-\def\MT_smop_measure:NNNNN #1#2#3#4#5{%
- \MH_let:NwN \MT_saved_mathclap:Nn \MT_cramped_clap_internal:Nn
- \MH_let:NwN \MT_cramped_clap_internal:Nn \@secondoftwo
- \sbox\z@{$\m@th\MT_smop_needed_args:NNNNN #1#2#3#4#5$}
- \MH_let:NwN \MT_cramped_clap_internal:Nn \MT_saved_mathclap:Nn
- \sbox\tw@{$\m@th\displaystyle#1$}
- \@tempdima=.5\wd0
- \advance\@tempdima-.5\wd2
-}
-% \end{macrocode}
-% The `l' variant
-% \begin{macrocode}
-\def\MT_smop_smash_l:NNNNN #1#2#3#4#5{
- \MT_smop_needed_args:NNNNN #1#2#3#4#5\kern\@tempdima
-}
-% \end{macrocode}
-% The `r' variant
-% \begin{macrocode}
-\def\MT_smop_smash_r:NNNNN #1#2#3#4#5{
- \kern\@tempdima\MT_smop_needed_args:NNNNN #1#2#3#4#5
-}
-% \end{macrocode}
-% The `lr' variant
-% \begin{macrocode}
-\def\MT_smop_smash_lr:NNNNN #1#2#3#4#5{
- \MT_smop_needed_args:NNNNN #1#2#3#4#5
-}
-% \end{macrocode}
-%
-%
-% \subsection{Adjusting limits}
-%
-%
-% \begin{macro}{\MT_vphantom:Nn}
-% \begin{macro}{\MT_hphantom:Nn}
-% \begin{macro}{\MT_phantom:Nn}
-% \begin{macro}{\MT_internal_phantom:N}
-% The main advantage of \cs{phantom} et al., is the ability to
-% choose the right size automatically, but it requires the input to
-% be typeset four times. Since we will need to have a \cs{cramped}
-% inside a \cs{vphantom} it is much, much faster to choose the style
-% ourselves (we already know it). These macros make it possible.
-% \begin{macrocode}
-\def\MT_vphantom:Nn {\v@true\h@false\MT_internal_phantom:N}
-\def\MT_hphantom:Nn {\v@false\h@true\MT_internal_phantom:N}
-\def\MT_phantom:Nn {\v@true\h@true\MT_internal_phantom:N}
-\def\MT_internal_phantom:N #1{
- \ifmmode
- \expandafter\mathph@nt\expandafter#1
- \else
- \expandafter\makeph@nt
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\adjustlimits}
-% This is for making sure limits line up on two consecutive
-% operators.
-% \begin{macrocode}
-\newcommand*\adjustlimits[6]{
-% \end{macrocode}
-% We measure the two operators and save the difference of their
-% depths.
-% \begin{macrocode}
- \sbox\z@{$\m@th \displaystyle #1$}
- \sbox\tw@{$\m@th \displaystyle #4$}
- \@tempdima=\dp\z@ \advance\@tempdima-\dp\tw@
-% \end{macrocode}
-% We force \cs{displaystyle} for the operator and \cs{scripstyle}
-% for the limit. If we make use of the regular \cs{smash},
-% \cs{vphantom}, and \cs{cramped} macros, and let \TeX{} choose the
-% right style for each one of them, we get a lot of redundant code
-% as we have no need for the combination
-% $(\cs{displaystyle},\cs{textstyle})$ etc. Only
-% $(\cs{scriptstyle},\cs{scriptstyle})$ is useful.
-% \begin{macrocode}
- \if_dim:w \@tempdima>\z@
- \mathop{#1}\limits#2{#3}
- \else:
- \mathop{#1\MT_vphantom:Nn \displaystyle{#4}}\limits
- #2{
- \def\finsm@sh{\ht\z@\z@ \box\z@}
- \mathsm@sh\scriptstyle{\MT_cramped_internal:Nn \scriptstyle{#3}}
- \MT_vphantom:Nn \scriptstyle
- {\MT_cramped_internal:Nn \scriptstyle{#6}}
- }
- \fi:
- \if_dim:w \@tempdima>\z@
- \mathop{#4\MT_vphantom:Nn \displaystyle{#1}}\limits
- #5
- {
- \MT_vphantom:Nn \scriptstyle
- {\MT_cramped_internal:Nn \scriptstyle{#3}}
- \def\finsm@sh{\ht\z@\z@ \box\z@}
- \mathsm@sh\scriptstyle{\MT_cramped_internal:Nn \scriptstyle{#6}}
- }
- \else:
- \mathop{#4}\limits#5{#6}
- \fi:
-}
-% \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}
-%
-% \begin{macro}{\MoveEqLeft}
-% \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}
-% \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]{\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 an equation inside an
-% alignment.
-% \changes{v1.12}{2011/08/17}{\cs{Aboxed} reimplemented, cudos to GL}
-% \begin{macrocode}
-\newcommand\Aboxed[1]{\let\bgroup{\romannumeral-`}\@Aboxed#1&&\ENDDNE}
-% \end{macrocode}
-% \sloppy
-% 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&#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}
-% \changes{v1.05}{2008/06/05}{Added \cs{ArrowBetweenLines} as it
-% belongs here and not just in my \LaTeX book (daleif)}
-% ????Implementation notes are needed????
-% \begin{macrocode}
-\MHInternalSyntaxOff
-\def\ArrowBetweenLines{\relax
- \iffalse{\fi\ifnum0=`}\fi
- \@ifstar{\ArrowBetweenLines@auxI{00}}{\ArrowBetweenLines@auxI{01}}}
-\def\ArrowBetweenLines@auxI#1{%
- \@ifnextchar[%
- {\ArrowBetweenLines@auxII{#1}}%
- {\ArrowBetweenLines@auxII{#1}[\Updownarrow]}}
-\def\ArrowBetweenLines@auxII#1[#2]{%
- \ifnum0=`{\fi \iffalse}\fi
-% \end{macrocode}
-% It turns out that for some reason the \cs{crcr} (next) removes the
-% automatic equation number replacement. The replacement hack seems to
-% the trick, though I have no idea why \cs{crcr} broke things (/daleif).
-% \changes{v1.08}{2010/06/15}{fixed eq num replacement bug}
-% \begin{macrocode}
-% \crcr
- \expandafter\in@\expandafter{\@currenvir}%
- {alignedat,aligned,gathered}%
- \ifin@ \else
- \notag
- \fi%
- \\
- \noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}%
- \noalign{\expandafter\in@\expandafter{\@currenvir}%
- {alignedat,aligned,gathered}%
- \ifin@ \else\notag\fi%
- }%
- \if#1 &&\quad #2\else #2\quad\fi
- \\\noalign{\nobreak\vskip-\lineskip}}
-
-\MHInternalSyntaxOn
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsection{Centered vertical dots}
-%
-% Doing a \verb?\vdots? centered within a different sized box, is
-% rather easy with the tools available. Note that it does \emph{not}
-% check for the style we are running in, thus do not expect this to
-% work well within \verb?\scriptstyle? and smaller. Basically we
-% create a box of a width corresponding to \verb?{}#1{}? and center
-% the \verb?\vdots? within it.
-% \begin{macrocode}
-\newcommand\vdotswithin[1]{%
- {\mathmakebox[\widthof{\ensuremath{{}#1{}}}][c]{{\vdots}}}}
-% \end{macrocode}
-% Next we are inspired by \verb?\ArrowBetweenLines? and provide a
-% costruction to be used within alignments with much less vertical
-% space above and below.
-%
-% First in order to support \env{spreadlines} we need to store the
-% original value of \verb?\jot? (and hope the user does not mess with it).
-% \begin{macrocode}
-\newlength\origjot
-\setlength\origjot{\jot}
-% \end{macrocode}
-% Next define how much we spacing we flush out, and make this user adjustable.
-% \begin{macrocode}
-\newdimen\l_MT_shortvdotswithinadjustabove_dim
-\newdimen\l_MT_shortvdotswithinadjustbelow_dim
-\define@key{\MT_options_name:}
- {shortvdotsadjustabove}{\setlength\l_MT_shortvdotswithinadjustabove_dim{#1}}
-\define@key{\MT_options_name:}
- {shortvdotsadjustbelow}{\setlength\l_MT_shortvdotswithinadjustbelow_dim{#1}}
-% \end{macrocode}
-% The actual defaults we found by trail and error.
-% \begin{macrocode}
-\setkeys{\MT_options_name:}{
- shortvdotsadjustabove=2.15\origjot,
- shortvdotsadjustbelow=\origjot
-}
-% \end{macrocode}
-% The user macro comes in two versions, starred version corresponding
-% to alignment \emph{before} and \verb?&? and a non-starred version
-% with alignment \emph{after} \verb?&?.
-% \begin{macrocode}
-\def\shortvdotswithin{\relax
- \@ifstar{\MT_svwi_aux:nn{00}}{\MT_svwi_aux:nn{01}}}
-\def\MT_svwi_aux:nn #1#2{
- \MTFlushSpaceAbove
- \if#1 \vdotswithin{#2}& \else &\vdotswithin{#2} \fi
- \MTFlushSpaceBelow
-}
-% \end{macrocode}
-% We will need a way to remove any tags (eq. numbers) on the
-% \verb?\vdots? line. We cannot use the method used by
-% \verb?\ArrowBetweenLines? so we use inspiration from
-% \texttt{etoolbox}.
-% \begin{macrocode}
-\def\MT_remove_tag_unless_inner:n #1{%
- \begingroup
- \def\etb@tempa##1|#1|##2\MT@END{\endgroup
- \ifx\@empty##2\@empty\notag\fi}%
- \expandafter\etb@tempa\expandafter|alignedat|aligned|split|#1|\MT@END}
- %| emacs
-% \end{macrocode}
-% These macros take care of removing the space above or below. Since
-% these may be useful for the user in very special cases, we provide
-% them as separate macros.
-% \begin{macrocode}
-\newcommand\MTFlushSpaceAbove{
- \expandafter\MT_remove_tag_unless_inner:n\expandafter{\@currenvir}
- \\
- \noalign{%
- \nobreak\vskip-\baselineskip\vskip-\lineskip%
- \vskip-\l_MT_shortvdotswithinadjustabove_dim
- \vskip-\origjot
- \vskip\jot
- }%
- \noalign{
- \expandafter\MT_remove_tag_unless_inner:n\expandafter{\@currenvir}
- }
-}
-\newcommand\MTFlushSpaceBelow{
- \\\noalign{%
- \nobreak\vskip-\lineskip
- \vskip-\l_MT_shortvdotswithinadjustbelow_dim
- \vskip-\origjot
- \vskip\jot
- }
-}
-
-% \end{macrocode}
-%
-%
-% \section{A few extra symbols}
-%
-% Most math font sets are missing three symbols: \cs{nuparrow},
-% \cs{ndownarrow} and \cs{bigtimes}. We provide \emph{simulated}
-% versions of these symbols in case they are missing.
-%
-% \subsection{Negated up- and down arrows}
-%
-% Note that the \cs{nuparrow} and the \cs{ndownarrow} are made from
-% \cs{nrightarrow} and \cs{nleftarrow}, so these have to be
-% present. If they are not, we throw an error at use. The
-% implementation details are due to Enrico Gregorio
-% (\url{http://groups.google.com/group/comp.text.tex/msg/689cc8bd604fdb51}),
-% the basic idea is to reflect and rotate existing negated
-% arrows. Note that the reflection and rotation will not show up i
-% most DVI previewers.
-% \begin{macro}{\MH_nrotarrow:NN}
-% \changes{v1.07}{2008/08/11}{Added support for \cs{nuparrow} and \cs{ndownaddow}}
-% First a common construction macro.
-% \begin{macrocode}
-\def\MH_nrotarrow:NN #1#2{%
- \setbox0=\hbox{$\m@th#1\uparrow$}\dimen0=\dp0
- \setbox0=\hbox{%
- \reflectbox{\rotatebox[origin=c]{90}{$\m@th#1\mkern2.22mu #2$}}}%
- \dp0=\dimen0 \box0 \mkern2.3965mu
-}
-% \end{macrocode}
-% \end{macro}
-% The negated arrows are then made using this macro on respectively
-% \cs{nrightarrow} and \cs{nleftarrow}
-% \begin{macro}{\MH_nuparrow:}
-% \begin{macro}{\MH_ndownarrow:}
-% \begin{macrocode}
-\def\MH_nuparrow: {%
- \mathrel{\mathpalette\MH_nrotarrow:NN\nrightarrow} }
-\def\MH_ndownarrow: {%
- \mathrel{\mathpalette\MH_nrotarrow:NN\nleftarrow} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\nuparrow}
-% \begin{macro}{\ndownarrow}
-% Next we provide \cs{nuparrow} and \cs{ndownarrow} at begin
-% document. Since they depend on \cs{nrightarrow} and
-% \cs{nleftarrow} we test for these and let the macros throw an
-% error if they are missing.
-% \changes{v1.08b}{2010/07/21}{Moved graphicx loading down here such
-% that we do not get into option clash problems}
-% \begin{macrocode}
-\AtBeginDocument{%
- \RequirePackage{graphicx}%
- \@ifundefined{nrightarrow}{%
- \providecommand\nuparrow{%
- \PackageError{mathtools}{\string\nuparrow\space~ is~
- constructed~ from~ \string\nrightarrow,~ which~ is~ not~
- provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
- }}{ \providecommand\nuparrow{\MH_nuparrow:}}
- \@ifundefined{nleftarrow}{%
- \providecommand\ndownarrow{%
- \PackageError{mathtools}{\string\ndownarrow\space~ is~
- constructed~ from~ \string\nleftarrow,~ which~ is~ not~
- provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
- }}{ \providecommand\ndownarrow{\MH_ndownarrow:}} }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \subsection{Providing bigtimes}
-%
-% The idea is to use the original \cs{times} and then scale it
-% accordingly. Again the implementation details have been improved by
-% Enrico Gregorio
-% (\url{http://groups.google.com/group/comp.text.tex/msg/9685c9405df2ff94}).
-%
-% \begin{macro}{\MH_bigtimes_scaler:N}
-% \begin{macro}{\MH_bigtimes_inner:}
-% \begin{macro}{\MH_csym_bigtimes:}
-% \changes{v1.07}{2008/08/11}{Added support for \cs{bigtimes}}
-% \begin{macrocode}
-\def\MH_bigtimes_scaler:N #1{%
- \vcenter{\hbox{#1$\m@th\mkern-2mu\times\mkern-2mu$}}}
-% \end{macrocode}
-% This is then combined with \cs{mathchoice} to form the inner parts
-% of the macro
-% \begin{macrocode}
-\def\MH_bigtimes_inner: {
- \mathchoice{\MH_bigtimes_scaler:N \huge} % display style
- {\MH_bigtimes_scaler:N \LARGE} % text style
- {\MH_bigtimes_scaler:N {}} % script style
- {\MH_bigtimes_scaler:N \footnotesize} % script script style
-}
-% \end{macrocode}
-% And thus the internal prepresentaion of the \cs{bigtimes} macro.
-% \begin{macrocode}
-\def\MH_csym_bigtimes: {\mathop{\MH_bigtimes_inner:}\displaylimits}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\bigtimes}
-% In the end we provide \cs{bigtimes} if otherwise not defined.
-% \begin{macrocode}
-\AtBeginDocument{
- \providecommand\bigtimes{\MH_csym_bigtimes:}
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \section{Macros by other people}
-%
-% \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:}
-% \changes{v1.13}{2012/08/19}{\cs{l_MT_X_intertext_dim} renamed to
-% \cs{l_MT_X_intertext_sep}}
-% \begin{macro}{\l_MT_above_intertext_sep}
-% \begin{macro}{\l_MT_below_intertext_sep}
-% 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
-% \changes{v1.13}{2012/08/19}{Fixed typos and changed the names}
-% \begin{macrocode}
-\newdimen\l_MT_above_intertext_sep
-\newdimen\l_MT_below_intertext_sep
-\define@key{\MT_options_name:}
- {aboveintertextdim}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {belowintertextdim}{\setlength\l_MT_below_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-intertext-dim}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-intertext-dim}{\setlength\l_MT_below_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-intertext-sep}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-intertext-sep}{\setlength\l_MT_below_intertext_sep{#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_sep
- \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_sep
- }%
-}}
-% \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}
-% \begin{macro}{\MT_orig_shortintertext}
-% \begin{macro}{\MT_shortintertext}
-% \begin{macro}{\l_above_shortintertext_sep}
-% \begin{macro}{\l_below_shortintertext_sep}
-% 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
-% \changes{v1.13}{2012/08/19}{The option was named differently in the
-% manual. Also renamed to use the postfix \emph{sep} instead. Though
-% the old names remain for compatibility.}
-% \changes{v1.14}{2014/01/20}{Apparently did not check it good enough,
-% the option should have shortintertext not short-intertext}
-% \begin{macrocode}
-\newdimen\l_MT_above_shortintertext_sep
-\newdimen\l_MT_below_shortintertext_sep
-\define@key{\MT_options_name:}
- {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-short-intertext-dim}{\setlength \l_MT_above_shortintertext_sep{#1}}
-% old typo in manual
-\define@key{\MT_options_name:}
- {below-short-intertext-dim}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-short-intertext-sep}{\setlength \l_MT_above_shortintertext_sep{#1}}
-% old typo in manual
-\define@key{\MT_options_name:}
- {below-short-intertext-sep}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-shortintertext-sep}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-shortintertext-sep}{\setlength \l_MT_below_shortintertext_sep{#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\MT_shortintertext:n #1{%
- \ifvmode\else\\\@empty\fi
- \noalign{%
- \penalty\postdisplaypenalty\vskip\abovedisplayshortskip
- \vskip-\lineskiplimit
- \vskip\normallineskiplimit
- \vskip\l_MT_above_shortintertext_sep
- \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_sep
- }%
-}
-% \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}
-%
-% \subsubsection{A complement to \texttt{\textbackslash smash},
-% \texttt{\textbackslash llap}, and \texttt{\textbackslash rlap}}
-% \begin{macro}{\clap}
-% \begin{macro}{\mathllap}
-% \begin{macro}{\mathrlap}
-% \begin{macro}{\mathclap}
-% \begin{macro}{\MT_mathllap:Nn}
-% \begin{macro}{\MT_mathrlap:Nn}
-% \begin{macro}{\MT_mathclap:Nn}
-% First we'll \cs{provide} those macros (they are so simple that I
-% think other packages might define them as well).
-% \begin{macrocode}
-\providecommand*\clap[1]{\hb@xt@\z@{\hss#1\hss}}
-\providecommand*\mathllap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_mathllap:Nn
- \else
- \expandafter \MT_mathllap:Nn \expandafter #1
- \fi
-}
-\providecommand*\mathrlap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_mathrlap:Nn
- \else
- \expandafter \MT_mathrlap:Nn \expandafter #1
- \fi
-}
-\providecommand*\mathclap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_mathclap:Nn
- \else
- \expandafter \MT_mathclap:Nn \expandafter #1
- \fi
-}
-% \end{macrocode}
-% We have to insert |{}| because we otherwise risk triggering a
-% ``feature'' in \TeX.
-% \begin{macrocode}
-\def\MT_mathllap:Nn #1#2{{}\llap{$\m@th#1{#2}$}}
-\def\MT_mathrlap:Nn #1#2{{}\rlap{$\m@th#1{#2}$}}
-\def\MT_mathclap:Nn #1#2{{}\clap{$\m@th#1{#2}$}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\mathmbox}
-% \begin{macro}{\MT_mathmbox:nn}
-% \begin{macro}{\mathmakebox}
-% \begin{macro}{\MT_mathmakebox_I:w}
-% \begin{macro}{\MT_mathmakebox_II:w}
-% \begin{macro}{\MT_mathmakebox_III:w}
-% Then the \cs{mathmbox}\marg{arg} and
-% \cs{mathmakebox}\oarg{width}\oarg{pos}\marg{arg} macros which are
-% very similar to \cs{mbox} and \cs{makebox}. The differences are:
-% \begin{itemize}
-% \item \meta{arg} is set in math mode of course.
-% \item No need for \cs{leavevmode} as we're in math mode.
-% \item No need to make them \cs{long} (we're still in math mode).
-% \item No need to support a picture version.
-% \end{itemize}
-% The first is easy.
-% \begin{macrocode}
-\providecommand*\mathmbox{\mathpalette\MT_mathmbox:nn}
-\def\MT_mathmbox:nn #1#2{\mbox{$\m@th#1#2$}}
-% \end{macrocode}
-% We scan for the optional arguments first.
-% \begin{macrocode}
-\providecommand*\mathmakebox{
- \@ifnextchar[ \MT_mathmakebox_I:w
- \mathmbox}
-\def\MT_mathmakebox_I:w[#1]{%
- \@ifnextchar[ {\MT_mathmakebox_II:w[#1]}
- {\MT_mathmakebox_II:w[#1][c]}}
-% \end{macrocode}
-% We had to get the optional arguments out of the way before calling
-% upon the powers of \cs{mathpalette}.
-% \begin{macrocode}
-\def\MT_mathmakebox_II:w[#1][#2]{
- \mathpalette{\MT_mathmakebox_III:w[#1][#2]}}
-\def\MT_mathmakebox_III:w[#1][#2]#3#4{%
- \@begin@tempboxa\hbox{$\m@th#3#4$}%
- \setlength\@tempdima{#1}%
- \hbox{\hb@xt@\@tempdima{\csname bm@#2\endcsname}}%
- \@end@tempboxa}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\mathsm@sh}
-% Fix \cs{smash}.
-% \begin{macrocode}
-\def\mathsm@sh#1#2{%
- \setbox\z@\hbox{$\m@th#1{#2}$}{}\finsm@sh}
-% \end{macrocode}
-% \end{macro}
-%
-%
-% \subsubsection{A cramped style}
-%
-% comp.text.tex on 1992/07/21 by Michael Herschorn.
-% With speed-ups by the Grand Wizard himself as shown on
-% \begin{quote}\rightskip-\leftmargini
-% \url{http://mirrors.ctan.org/info/digests/tex-implementors/042}
-% \end{quote}
-% The (better) user interface by the author.
-%
-% \begin{macro}{\cramped}
-% Make sure the expansion is timed correctly.
-% \begin{macrocode}
-\providecommand*\cramped[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_internal:Nn
- \else
- \expandafter \MT_cramped_internal:Nn \expandafter #1
- \fi
-}
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MT_cramped_internal:Nn}
-% The internal command.
-% \begin{macrocode}
-\def\MT_cramped_internal:Nn #1#2{
-% \end{macrocode}
-% Create a box containing the math and force a cramped style by
-% issuing a non-existing radical.
-% \begin{macrocode}
- \sbox\z@{$\m@th#1\nulldelimiterspace=\z@\radical\z@{#2}$}
-% \end{macrocode}
-% Then make sure the height is correct.
-% \begin{macrocode}
- \ifx#1\displaystyle
- \dimen@=\fontdimen8\textfont3
- \advance\dimen@ .25\fontdimen5\textfont2
- \else
- \dimen@=1.25\fontdimen8
- \ifx#1\textstyle\textfont
- \else
- \ifx#1\scriptstyle
- \scriptfont
- \else
- \scriptscriptfont
- \fi
- \fi
- 3
- \fi
- \advance\dimen@-\ht\z@ \ht\z@=-\dimen@
- \box\z@
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsubsection{Cramped versions of \texttt{\textbackslash
-% mathllap}, \texttt{\textbackslash mathclap}, and
-% \texttt{\textbackslash mathrlap}}
-% \begin{macro}{\crampedllap}
-% \begin{macro}{\MT_cramped_llap_internal:Nn}
-% \begin{macro}{\crampedclap}
-% \begin{macro}{\MT_cramped_clap_internal:Nn}
-% \begin{macro}{\crampedrlap}
-% \begin{macro}{\MT_cramped_rlap_internal:Nn}
-% Cramped versions of \cs{mathXlap} (for speed). Made by the author.
-% \begin{macrocode}
-\providecommand*\crampedllap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_llap_internal:Nn
- \else
- \expandafter \MT_cramped_llap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_llap_internal:Nn #1#2{
- {}\llap{\MT_cramped_internal:Nn #1{#2}}
-}
-\providecommand*\crampedclap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_clap_internal:Nn
- \else
- \expandafter \MT_cramped_clap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_clap_internal:Nn #1#2{
- {}\clap{\MT_cramped_internal:Nn #1{#2}}
-}
-\providecommand*\crampedrlap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_rlap_internal:Nn
- \else
- \expandafter \MT_cramped_rlap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_rlap_internal:Nn #1#2{
- {}\rlap{\MT_cramped_internal:Nn #1{#2}}
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-%
-% \section{Macros by Michael J.~Downes}
-%
-% The macros in this section are all by Michael J.~Downes. Either
-% they are straight copies of his original macros or inspired and
-% extended here.
-%
-%
-% \subsection{Prescript}
-% \begin{macro}{\prescript}
-% This command is taken from a posting to comp.text.tex on
-% 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}
-\newcommand{\MT_prescript_inner:}[4]{
-% \end{macrocode}
-% Put the sup in box 0 and the sub in box 2.
-% \begin{macrocode}
- \@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:
- \setbox\tw@\hbox to\wd\z@{\hfil\unhbox\tw@}
- \fi:
-% \end{macrocode}
-% Do not let a preceding mathord symbol approach without any
-% intervening space.
-% \begin{macrocode}
- \mathop{}
-% \end{macrocode}
-% Use \cs{mathopen} to suppress space between the prescripts and the
-% base object even when the latter is not of type ord.
-% \begin{macrocode}
- \mathopen{\vphantom{\MT_prescript_arg:{#3}}}^{\box\z@}\sb{\box\tw@}
- \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}
-\define@key{\MT_options_name:}
- {prescript-sup-format}{\def\MT_prescript_sup:{#1}}
-\define@key{\MT_options_name:}
- {prescript-sub-format}{\def\MT_prescript_sub:{#1}}
-\define@key{\MT_options_name:}
- {prescript-arg-format}{\def\MT_prescript_arg:{#1}}
-\setkeys{\MT_options_name:}{
- prescript-sup-format={},
- prescript-sub-format={},
- prescript-arg-format={},
-}
-% \end{macrocode}
-%
-% \subsection{Math sizes}
-% \begin{macro}{\@DeclareMathSizes}
-% This command is taken from a posting to comp.text.tex on
-% October~17th 2002 by Michael J.~Downes. The purpose is to be able
-% to put dimensions on the last three arguments of
-% \cs{DeclareMathSizes}.
-% \begin{macrocode}
-\def\@DeclareMathSizes #1#2#3#4#5{%
- \@defaultunits\dimen@ #2pt\relax\@nnil
- \if:w $#3$%
- \MH_let:cN {S@\strip@pt\dimen@}\math@fontsfalse
- \else:
- \@defaultunits\dimen@ii #3pt\relax\@nnil
- \@defaultunits\@tempdima #4pt\relax\@nnil
- \@defaultunits\@tempdimb #5pt\relax\@nnil
- \toks@{#1}%
- \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
- \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
- \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
- \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
- \the\toks@
- }%
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \subsection{Mathematics within italic text}
-% mathic: Michael J.~Downes on comp.text.tex, 1998/05/14.
-% \begin{macro}{\MT_mathic_true:}
-% \begin{macro}{\MT_mathic_false:}
-% Renew \cs{(} so that it detects the slant of the font and inserts
-% an italic correction. In January 2013 Andrew Swann suggested that
-% this should be made robust. It is a little tricky, but seems to
-% work.
-% \changes{v1.13}{2013/02/11}{Added robustness code}
-% \begin{macrocode}
-\def\MT_mathic_true: {
- \MH_if_boolean:nF {math_italic_corr}{
- \MH_set_boolean_T:n {math_italic_corr}
-% \end{macrocode}
-% Save the original meaning if you need to go back (note that this
-% does not save the robust part of the macro, we fix this later on by
-% rerobustifying).
-% \begin{macrocode}
- \MH_if_boolean:nTF {robustify}{
- \MH_let:NwN \MT_mathic_redeffer: \DeclareRobustCommand
- }{
- \MH_let:NwN \MT_mathic_redeffer: \renewcommand
- }
- \MH_let:NwN \MT_begin_inlinemath: \(
- %\renewcommand*\({
- \MT_mathic_redeffer:*\({
- \relax\ifmmode\@badmath\else
- \ifhmode
- \if_dim:w \fontdimen\@ne\font>\z@
- \if_dim:w \lastskip>\z@
- \skip@\lastskip\unskip
- \@@italiccorr
- \hskip\skip@
- \else:
- \@@italiccorr
- \fi:
- \fi:
- \fi:
- $\fi:
- }
- }
-}
-%$ for emacs coloring ;-)
-% \end{macrocode}
-% Just for restoring the old behavior.
-% \begin{macrocode}
-\def\MT_mathic_false: {
- \MH_if_boolean:nT {math_italic_corr}{
- \MH_set_boolean_F:n {math_italic_corr}
-% \end{macrocode}
-% When \cs{(} is robust, we cannot simply relet it to the old value,
-% as all the robust macro is not saved. Instead we redefined partly
-% and force robustness.
-% \begin{macrocode}
- \MH_if_boolean:nTF {robustify}{
- \edef\({\MT_begin_inlinemath:}%
- \forced_EQ_MakeRobust\(%
- }{
- \MH_let:NwN \( \MT_begin_inlinemath:
- }
- }
-}
-\MH_new_boolean:n {math_italic_corr}
-\define@key{\MT_options_name:}{mathic}[true]{
- \@ifundefined{MT_mathic_#1:}
- { \MT_true_false_error:
- \@nameuse{MT_mathic_false:}
- }
- { \@nameuse{MT_mathic_#1:} }
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Spreading equations}
-%
-% Michael J.~Downes on comp.text.tex 1999/08/25
-% \begin{environment}{spreadlines}
-% This is meant to be used outside math, just like
-% \env{subequations}.
-% \begin{macrocode}
-\newenvironment{spreadlines}[1]{
- \setlength{\jot}{#1}
- \ignorespaces
-}{ \ignorespacesafterend }
-% \end{macrocode}
-% \end{environment}
-%
-% \subsection{Gathered}
-%
-% Inspired by Michael J.~Downes on comp.text.tex 2002/01/17.
-% \begin{environment}{MT_gathered_env}
-% Just like the normal \env{gathered}, only here we're allowed to
-% specify actions before and after each line.
-% \begin{macrocode}
-\MaybeMHPrecedingSpacesOff
-\newenvironment{MT_gathered_env}[1][c]{%
- \RIfM@\else
- \nonmatherr@{\begin{\@currenvir}}%
- \fi
- \null\,%
- \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup
- \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
- \spread@equation
- \ialign\bgroup
- \MT_gathered_pre:
- \strut@$\m@th\displaystyle##$
- \MT_gathered_post:
- \crcr
-}{%
- \endaligned
- \MT_gathered_env_end:
-}
-\MHPrecedingSpacesOn
-% \end{macrocode}
-% \end{environment}
-% \begin{macro}{\newgathered}
-% \begin{macro}{\renewgathered}
-% \begin{environment}{lgathered}
-% \begin{environment}{rgathered}
-% \begin{environment}{gathered}
-% An easier interface.
-% \begin{macrocode}
-\newcommand*\newgathered[4]{
- \newenvironment{#1}
- { \def\MT_gathered_pre:{#2}
- \def\MT_gathered_post:{#3}
- \def\MT_gathered_env_end:{#4}
- \MT_gathered_env
- }{\endMT_gathered_env}
-}
-\newcommand*\renewgathered[4]{
- \renewenvironment{#1}
- { \def\MT_gathered_pre:{#2}
- \def\MT_gathered_post:{#3}
- \def\MT_gathered_env_end:{#4}
- \MT_gathered_env
- }{\endMT_gathered_env}
-}
-\newgathered{lgathered}{}{\hfil}{}
-\newgathered{rgathered}{\hfil}{}{}
-\renewgathered{gathered}{\hfil}{\hfil}{}
-% \end{macrocode}
-% \end{environment}
-% \end{environment}
-% \end{environment}
-% \end{macro}
-% \end{macro}
-%
-% \subsection{Split fractions}
-%
-% Michael J.~Downes on comp.text.tex 2001/12/06.
-% \begin{macro}{\splitfrac}
-% \begin{macro}{\splitdfrac}
-% These commands use \cs{genfrac} to typeset a split fraction. The
-% thickness of the fraction rule is simply set to zero.
-% \begin{macrocode}
-\newcommand*\splitfrac[2]{%
- \genfrac{}{}{0pt}{1}%
- {\textstyle#1\quad\hfill}%
- {\textstyle\hfill\quad\mathstrut#2}%
-}
-\newcommand*\splitdfrac[2]{%
- \genfrac{}{}{0pt}{0}{#1\quad\hfill}{\hfill\quad\mathstrut #2}%
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-%
-% \section{Bug fixes for \pkg{amsmath}}
-% The following fixes some bugs in \pkg{amsmath}, but only if the
-% switch is true.
-% \begin{macrocode}
-\MH_if_boolean:nT {fixamsmath}{
-% \end{macrocode}
-% \begin{macro}{\place@tag}
-% This corrects a bug in \pkg{amsmath} affecting tag placement in
-% \env{flalign}.\footnote{See
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=amslatex/3591}}
-% \begin{macrocode}
-\def\place@tag{%
- \iftagsleft@
- \kern-\tagshift@
-% \end{macrocode}
-% The addition. If we're in \env{flalign} (meaning
-% $\cs{xatlevel@}=\cs{tw@}$) we skip back by an amount of
-% \cs{@mathmargin}. This test is also true for the \env{xxalignat}
-% environment, but it doesn't matter because a)~it's not
-% supported/described in the documentation anymore so new users
-% won't know about it and b)~it forbids the use of \cs{tag}
-% anyway.
-% \begin{macrocode}
- \if@fleqn
- \if_num:w \xatlevel@=\tw@
- \kern-\@mathmargin
- \fi:
- \fi:
-% \end{macrocode}
-% End of additions.
-% \begin{macrocode}
- \if:w 1\shift@tag\row@\relax
- \rlap{\vbox{%
- \normalbaselines
- \boxz@
- \vbox to\lineht@{}%
- \raise@tag
- }}%
- \else:
- \rlap{\boxz@}%
- \fi:
- \kern\displaywidth@
- \else:
- \kern-\tagshift@
- \if:w 1\shift@tag\row@\relax
- \llap{\vtop{%
- \raise@tag
- \normalbaselines
- \setbox\@ne\null
- \dp\@ne\lineht@
- \box\@ne
- \boxz@
- }}%
- \else:
- \llap{\boxz@}%
- \fi:
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\x@calc@shift@lf}
-% This corrects a bug\footnote{See
-% \url{http://www.latex-project.org/cgi-bin/ltxbugs2html?pr=amslatex/3614}}
-% in \pkg{amsmath} that could cause a non-positive value of the dimension
-% \cs{@mathmargin} to cause an
-% \begin{verbatim}
-% ! Arithmetic overflow.
-% <recently read> \@tempcntb
-% \end{verbatim}
-% when in \mode{fleqn,leqno} mode. Not very comprehensible for the user.
-% \begin{macrocode}
-\def\x@calc@shift@lf{%
- \if_dim:w \eqnshift@=\z@
- \global\eqnshift@\@mathmargin\relax
- \alignsep@\displaywidth
- \advance\alignsep@-\totwidth@
-% \end{macrocode}
-% The addition: If \cs{@tempcntb} is zero we avoid division.
-% \begin{macrocode}
- \if_num:w \@tempcntb=0
- \else:
- \global\divide\alignsep@\@tempcntb % original line
- \fi:
-% \end{macrocode}
-% Addition end.
-% \begin{macrocode}
- \if_dim:w \alignsep@<\minalignsep\relax
- \global\alignsep@\minalignsep\relax
- \fi:
- \fi:
- \if_dim:w \tag@width\row@>\@tempdima
- \saveshift@1%
- \else:
- \saveshift@0%
- \fi:}%
-% \end{macrocode}
-% \end{macro}
-% \begin{macrocode}
-}
-% \end{macrocode}
-% End of bug fixing.
-%
-% \subsection{Making environments safer}
-%
-% \begin{macro}{\aligned@a}
-% Here we make the \pkg{amsmath} inner environments disallow spaces
-% before their optional positioning specifier.
-% \begin{macrocode}
-\MaybeMHPrecedingSpacesOff
-\renewcommand\aligned@a[1][c]{\start@aligned{#1}\m@ne}
-\MHPrecedingSpacesOn
-% \end{macrocode}
-% \end{macro}
-%
-% This is the end of the \pkg{mathtools} package.
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \Finale
-\endinput
diff --git a/Master/texmf-dist/source/latex/mh/mhsetup.dtx b/Master/texmf-dist/source/latex/mh/mhsetup.dtx
deleted file mode 100644
index d1fe0bcb154..00000000000
--- a/Master/texmf-dist/source/latex/mh/mhsetup.dtx
+++ /dev/null
@@ -1,653 +0,0 @@
-% \iffalse meta-comment
-%
-% 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
-% 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, Will Robertson and Joseph Wright.
-%
-% This work consists of the main source file mhsetup.dtx
-% and the derived files
-% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
-%
-% Distribution:
-% CTAN:macros/latex/contrib/mh/mhsetup.dtx
-% CTAN:macros/latex/contrib/mh/mhsetup.pdf
-%
-% Unpacking:
-% (a) If mhsetup.ins is present:
-% tex mhsetup.ins
-% (b) Without mhsetup.ins:
-% tex mhsetup.dtx
-% (c) If you insist on using LaTeX
-% latex \let\install=y\input{mhsetup.dtx}
-% (quote the arguments according to the demands of your shell)
-%
-% Documentation:
-% (a) If mhsetup.drv is present:
-% latex mhsetup.drv
-% (b) Without mhsetup.drv:
-% latex mhsetup.dtx; ...
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
-% Programm calls to get the documentation (example):
-% pdflatex mhsetup.dtx
-% makeindex -s gind.ist mhsetup.idx
-% pdflatex mhsetup.dtx
-% makeindex -s gind.ist mhsetup.idx
-% pdflatex mhsetup.dtx
-%
-% Installation:
-% TDS:tex/latex/mh/mhsetup.sty
-% TDS:doc/latex/mh/mhsetup.pdf
-% TDS:source/latex/mh/mhsetup.dtx
-%
-%<*ignore>
-\begingroup
- \def\x{LaTeX2e}
-\expandafter\endgroup
-\ifcase 0\ifx\install y1\fi\expandafter
- \ifx\csname processbatchFile\endcsname\relax\else1\fi
- \ifx\fmtname\x\else 1\fi\relax
-\else\csname fi\endcsname
-%</ignore>
-%<*install>
-\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: mhsetup 2010/01/21 v1.2a mhsetup}
-\Msg{************************************************************************}
-
-\keepsilent
-\askforoverwritefalse
-
-\preamble
-
-This is a generated file.
-
-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
-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, Will Robertson and Joseph Wright.
-
-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
-%</install>
-%<*ignore>
-\fi
-%</ignore>
-%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{mhsetup.drv}%
- [2010/01/21 v1.2a programming setup (MH)]
-\documentclass{ltxdoc}
-\usepackage{mhsetup}
-
-\addtolength\oddsidemargin{30pt}
-\providecommand*\pkg[1]{\textsf{#1}}
-\providecommand*\env[1]{\texttt{#1}}
-\providecommand*\opt[1]{\texttt{#1}}
-\def\MakePrivateLetters{%
- \makeatletter\catcode`\_=11\relax \catcode`\:=11\relax
-}
-
-
-
-\def\MHmarg#1{{\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\marg{\begingroup\MakePrivateLetters\MHmarg}%
-\def\MHarg#1{{\ttfamily\char`\{#1\ttfamily\char`\}}\endgroup}
-\DeclareRobustCommand\arg{\begingroup\MakePrivateLetters\MHarg}%
-\def\MHcs#1{\texttt{\char`\\#1}\endgroup}
-\DeclareRobustCommand\cs{\begingroup\MakePrivateLetters\MHcs}
-\makeatletter
-\providecommand*\eTeX{$\m@th\varepsilon$-\TeX}
-\makeatother
-\begin{document}
- \DocInput{mhsetup.dtx}
-\end{document}
-%</driver>
-% \fi
-%
-% \CheckSum{298}
-%
-% \GetFileInfo{mhsetup.drv}
-%
-% \title{The \pkg{mhsetup} package\thanks{This package has version
-% number \fileversion, last revised on \filedate.}}
-% \author{Morten H\o gholm}
-% \date{\filedate}
-% \maketitle
-%
-% \begin{abstract}
-% The \pkg{mhsetup} package provides tools for a \LaTeX{}
-% programming environment similar to the one described in
-% \texttt{expl3} on \textsc{ctan} although not as extensive. It is
-% a required part of both the \pkg{mathtools} and \pkg{empheq}
-% packages.
-% \end{abstract}
-%
-% The description below was made before the extensive changes made to
-% the expl3 code available from the LaTeX Project website.
-%
-% \section{The new internal syntax}
-%
-%
-% The \LaTeX3 package \pkg{ldcsetup} defines the command
-% \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
-% 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
-% commands
-% \DescribeMacro{\MHInternalSyntaxOn}\cs{MHInternalSyntaxOn} and
-% \DescribeMacro{\MHInternalSyntaxOff}\cs{MHInternalSyntaxOff}. They
-% are to be used only as a pair, because \cs{MHInternalSyntaxOn}
-% defines \cs{MHInternalSyntaxOff} so that it restores the category
-% codes correctly.
-%
-%
-% \section{Handling optional arguments}
-%
-% 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
-% before the optional argument but at the same time it fails to
-% provide ``safe'' environments. What would you expect from the
-% following input?
-% \begin{verbatim}
-% \[
-% \begin{gathered}
-% [v] = 100 \\
-% [t] = 200
-% \end{gathered}
-% \]
-% \end{verbatim}
-% \LaTeX{} will see the \texttt{[v]} as an optional argument of
-% \env{gathered} and use it. In this case the test inside
-% \env{gathered} checks if it's a \texttt{t} or \texttt{b} and if
-% it's neither it'll choose \cs{vcenter} internally. So you get no
-% warning, only missing output. Another example, this time from the
-% \pkg{empheq} package used with its \opt{overload} option: If
-% preceding spaces are allowed, the input
-% \begin{verbatim}
-% \begin{gather}
-% [a] = [b]
-% \end{gather}
-% \end{verbatim}
-% results in the rather strange error message
-% \begin{verbatim}
-% ! Package keyval Error: a undefined.
-% \end{verbatim}
-%
-% When using \cs{newcommand} etc.\ for defining commands and
-% environments with optional arguments, the peek ahead is done by
-% \cs{kernel@ifnextchar} (since \LaTeX{} release 2003/12/01, else
-% \cs{@ifnextchar}) and it is \emph{hardwired at definition time} by
-% \cs{@xargdef}. With the commands
-% \DescribeMacro{\MHPrecedingSpacesOff}\cs{MHPrecedingSpacesOff} and
-% \DescribeMacro{\MHPrecedingSpacesOn}\cs{MHPrecedingSpacesOn}
-% \pkg{mhsetup} provides an interface to define commands and
-% environments where the optional argument cannot have preceding
-% spaces. You simply wrap them around the definitions:
-% \begin{verbatim}
-% \MHPrecedingSpacesOff
-% \newenvironment*{test}[1][default]{Start, arg: (#1)}{Ending.}
-% \MHPrecedingSpacesOn
-% \begin{test}
-% [text]
-% \end{test}
-% \begin{test}[text]
-% \end{test}
-% \end{verbatim}
-% \MHPrecedingSpacesOff
-% \newenvironment*{test}[1][default]{Start, arg: (#1)}{Ending.}
-% \MHPrecedingSpacesOn
-% \begin{quote}
-% \begin{test}
-% [text]
-% \end{test}
-% \begin{test}[text]
-% \end{test}
-% \end{quote}
-% It is of somewhat limited use in commands (control words in \TeX{}
-% terminology), because \TeX{} discards the spaces. The exception is
-% \emph{control symbols} where \TeX{} obeys following spaces but
-% there are rather few of them available. All is not lost however.
-% In the \env{aligned} environment from \pkg{amsmath} (shown below)
-% a command is used as argument grabber.
-% \begin{verbatim}
-% \newenvironment{aligned}{%
-% \let\@testopt\alignsafe@testopt
-% \aligned@a
-% }{%
-% \crcr\egroup
-% \restorecolumn@
-% \egroup
-% }
-% \newcommand{\aligned@a}[1][c]{\start@aligned{#1}\m@ne}
-% \end{verbatim}
-% By applying our trick on the grabber function, we get a space
-% obeying version:
-% \begin{verbatim}
-% \MHPrecedingSpacesOff
-% \renewcommand*\aligned@a[1][c]{\start@aligned{#1}\m@ne}
-% \MHPrecedingSpacesOn
-% \end{verbatim}
-% This way a nested \env{aligned} environment is still safe from
-% empty first cells.
-%
-% \StopEventually{}
-%
-%
-% \section{First bits of a new programming environment}
-%
-%
-% \begin{macrocode}
-%<*package>
-\ProvidesPackage{mhsetup}%
- [2010/01/21 v1.2a programming setup (MH)]
-% \end{macrocode}
-% \subsection{The new internal syntax}
-% \begin{macro}{\MHInternalSyntaxOn}
-% \begin{macro}{\MHInternalSyntaxOff}
-% Almost copy of \cs{InternalSyntaxOn}.
-% \begin{macrocode}
-\def\MHInternalSyntaxOn{
- \edef\MHInternalSyntaxOff{%
- \catcode`\noexpand\~=\the\catcode`\~\relax
- \catcode`\noexpand\ =\the\catcode`\ \relax
- \catcode`\noexpand\^^I=\the\catcode`\^^I\relax
- \catcode`\noexpand\@=\the\catcode`\@\relax
- \catcode`\noexpand\:=\the\catcode`\:\relax
- \catcode`\noexpand\_=\the\catcode`\_\relax
- \endlinechar=\the\endlinechar\relax
- }%
- \catcode`\~=10\relax
- \catcode`\ =9\relax
- \catcode`\^^I=9\relax
- \makeatletter
- \catcode`\_=11\relax
- \catcode`\:=11\relax
- \endlinechar=` %
- \relax
-}
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \subsection{Programming tools}
-%
-% 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.
-% \begin{macro}{\MH_let:NwN}
-% An alias for \cs{let}.
-% \begin{macrocode}
-\let\MH_let:NwN \let
-% \end{macrocode}
-% \end{macro}
-% \begin{macro}{\MH_let:cN}
-% This one takes a \cs{csname}-\cs{endcsname} name and \cs{let}s it
-% to a single macro. We'll use this to setup our conditionals.
-% \begin{macrocode}
-\def\MH_let:cN #1#2{
- \expandafter\MH_let:NwN \csname#1\endcsname#2}
-% \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
-% constructions with weird characters like \texttt{*} or alike in
-% them and can take a \cs{global} prefix if wanted (we want that
-% later on).
-% \begin{macrocode}
-\def\MH_let:cc #1#2{
- \expandafter\MH_let:NwN\csname#1\expandafter\endcsname
- \csname#2\endcsname}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\MH_new_boolean:n}
-% \begin{macro}{\MH_set_boolean_F:n}
-% \begin{macro}{\MH_set_boolean_T:n}
-% \begin{macro}{\MH_if_boolean:nTF}
-% \begin{macro}{\MH_if_boolean:nT}
-% \begin{macro}{\MH_if_boolean:nF}
-% Sets up conditionals. For instance
-% \begin{quote}
-% \cs{MH_new_boolean:n} \marg{name}
-% \end{quote}
-% defines the boolean \meta{name} but also the conditional
-% \cs{if_boolean_\meta{name}:} to be used in the ordinary
-% \begin{tabbing}
-% \mbox{}\quad\= \kill
-% \cs{if_boolean_\meta{name}:}\\
-% \> \meta{true code} \\
-% \cs{else:} \\
-% \> \meta{false code} \\
-% \cs{fi:}
-% \end{tabbing}
-% There is also a more ``\LaTeX-like'' interface available by using
-% the commands
-% \begin{quote}
-% \cs{MH_if_boolean:nT}\marg{name}\marg{arg}
-% \end{quote}
-% which will execute the argument if the current value of the
-% boolean is `true' while
-% \begin{quote}
-% \cs{MH_if_boolean:nF}\marg{name}\marg{arg}
-% \end{quote}
-% is the equivalent with `false'. Finally we have
-% \begin{quote}
-% \cs{MH_if_boolean:nTF}\marg{name}\marg{true code}\marg{false code}.
-% \end{quote}
-% This is the interface I have used in this package.
-%
-% Initially \cs{if_boolean_\meta{name}:} is `false'. This can be
-% changed by saying
-% \begin{tabbing}
-% \quad \= \LaTeX:\quad \= \kill
-% \> \TeX: \> \cs{boolean_\meta{name}_true:} \quad \emph{or}\\
-% \> \LaTeX: \> \cs{MH_set_boolean_T:n}\marg{name}
-% \end{tabbing}
-% and changed back again by
-% \begin{tabbing}
-% \quad \= \LaTeX:\quad \= \kill
-% \> \TeX: \> \cs{boolean_\meta{name}_false:} \quad \emph{or}\\
-% \> \LaTeX: \> \cs{MH_set_boolean_F:n}\marg{name}
-% \end{tabbing}
-%
-% And yes, we're also using alternative names for \cs{else} and
-% \cs{fi} now. That way a simple search and replace will be all that
-% is needed for this package to be a certified \LaTeX3 package (well,
-% maybe a little more is needed, but not much).
-% \begin{macrocode}
-\def\MH_new_boolean:n #1{
- \expandafter\@ifdefinable\csname if_boolean_#1:\endcsname{
- \@namedef{boolean_#1_true:}
- {\MH_let:cN{if_boolean_#1:}\iftrue}
- \@namedef{boolean_#1_false:}
- {\MH_let:cN{if_boolean_#1:}\iffalse}
- \@nameuse{boolean_#1_false:}%
- }
-}
-\def\MH_set_boolean_F:n #1{ \@nameuse{boolean_#1_false:} }
-\def\MH_set_boolean_T:n #1{ \@nameuse{boolean_#1_true:} }
-\def\MH_if_boolean:nTF #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@firstoftwo
- \else:
- \expandafter\@secondoftwo
- \fi:
-}
-\def\MH_if_boolean:nT #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@firstofone
- \else:
- \expandafter\@gobble
- \fi:
-}
-\def\MH_if_boolean:nF #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@gobble
- \else:
- \expandafter\@firstofone
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\if:w}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \begin{macro}{\if_meaning:NN}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \begin{macro}{\else:}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \begin{macro}{\fi:}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \begin{macro}{\if_num:w}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \changes{v1.2a}{2010/01/21}{Define at start of document}
-% \begin{macro}{\if_dim:w}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \changes{v1.2a}{2010/01/21}{Define at start of document}
-% \begin{macro}{\if_case:w}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% \changes{v1.2a}{2010/01/21}{Define at start of document}
-% \begin{macro}{\or:}
-% \changes{v1.0b}{2004/10/10}{Use different test}
-% Copies of \TeX{} primitives.
-% \begin{macrocode}
-\@ifundefined{if:w}{\MH_let:NwN \if:w =\if}{}
-\@ifundefined{if_meaning:NN}{\MH_let:NwN \if_meaning:NN =\ifx}{}
-\@ifundefined{else:}{\MH_let:NwN \else:=\else}{}
-\@ifundefined{fi:}{\MH_let:NwN \fi:=\fi}{}
-\AtBeginDocument{
- \@ifundefined{if_num:w}{\MH_let:NwN \if_num:w =\ifnum}{}
- \@ifundefined{if_dim:w}{\MH_let:NwN \if_dim:w =\ifdim}{}
- \@ifundefined{if_case:w}{\MH_let:NwN \if_case:w =\ifcase}{}
-}
-\@ifundefined{or:}{\MH_let:NwN \or:=\or}{}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MH_cs_to_str:N}
-% Strip off the backslash of a macro name.
-% \begin{macrocode}
-\def\MH_cs_to_str:N {\expandafter\@gobble\string}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}{\MH_protected:}
-% \begin{macro}{\MH_setlength:dn}
-% \changes{v1.0a}{2004/08/23}{Fixed bug in \cs{MH_setlength:dn} so that
-% it now uses the \pkg{calc} definition of \cs{setlength}}
-% \begin{macro}{\MH_addtolength:dn}
-% \changes{v1.0a}{2004/08/23}{Fixed bug in \cs{MH_addtolength:dn} so that
-% it now uses the \pkg{calc} definition of \cs{addtolength}}
-% We might as well make use of some of the extended features from
-% \eTeX. We use \cs{dimexpr} for some simple calculations as it
-% saves a lot of the scanning that goes on inside \pkg{calc}. The
-% \cs{protected} primitive comes in handy when we want to declare a
-% robust command, that cannot be `robustified' with
-% \cs{DeclareRobustCommand}. If we don't have \eTeX{} we'll just let
-% our private macros be aliases for the less effective alternatives.
-% \begin{macrocode}
-\@ifundefined{eTeXversion}
- {
- \MH_let:NwN \MH_protected:\relax
- \def\MH_setlength:dn{\setlength}
- \def\MH_addtolength:dn{\addtolength}
- }
- {
- \MH_let:NwN \MH_protected:\protected
- \def\MH_setlength:dn #1#2{#1=\dimexpr#2\relax\relax}
- \def\MH_addtolength:dn #1#2{\advance#1 \dimexpr#2\relax\relax}
- }
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-
-% \begin{macro}{\MH_keyval_alias_with_addon:nnnn}
-% \begin{macro}{\MH_keyval_alias:nnn}
-% A way to make aliases with \pkg{keyval}. This will come in
-% handy later.
-% \begin{macrocode}
-\def\MH_keyval_alias_with_addon:nnnn #1#2#3#4{
- \@namedef{KV@#1@#2}{\@nameuse{KV@#1@#3}#4}
- \@namedef{KV@#1@#2@default}{\@nameuse{KV@#1@#3@default}#4}}
-\def\MH_keyval_alias:nnn #1#2#3{
- \MH_keyval_alias_with_addon:nnnn {#1}{#2}{#3}{}}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MH_use_choice_i:nnnn}
-% \begin{macro}{\MH_use_choice_ii:nnnn}
-% \begin{macro}{\MH_use_choice_iii:nnnn}
-% \begin{macro}{\MH_use_choice_iv:nnnn}
-% I need to be able to pick up individual arguments in a list of
-% four (similar to \cs{@secondoftwo}).
-% \begin{macrocode}
-\def\MH_use_choice_i:nnnn #1#2#3#4{#1}
-\def\MH_use_choice_ii:nnnn #1#2#3#4{#2}
-\def\MH_use_choice_iii:nnnn #1#2#3#4{#3}
-\def\MH_use_choice_iv:nnnn #1#2#3#4{#4}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\MH_nospace_ifnextchar:Nnn}
-% \begin{macro}{\MH_nospace_nextchar:}
-% \begin{macro}{\MH_nospace_testopt:nn}
-% \begin{macro}{\MH_nospace_protected_testopt:n}
-% Scanning for the next character but disallow spaces.
-% \begin{macrocode}
-\long\def\MH_nospace_ifnextchar:Nnn #1#2#3{
- \MH_let:NwN\reserved@d=~#1
- \def\reserved@a{#2}
- \def\reserved@b{#3}
- \futurelet\@let@token\MH_nospace_nextchar:
-}
-\def\MH_nospace_nextchar:{
- \if_meaning:NN \@let@token\reserved@d
- \MH_let:NwN \reserved@b\reserved@a
- \fi:
- \reserved@b
-}
-\long\def\MH_nospace_testopt:nn #1#2{
- \MH_nospace_ifnextchar:Nnn[
- {#1}
- {#1[{#2}]}
-}
-\def\MH_nospace_protected_testopt:n #1{
- \if_meaning:NN \protect\@typeset@protect
- \expandafter\MH_nospace_testopt:nn
- \else:
- \@x@protect#1
- \fi:
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \begin{macro}{\kernel@ifnextchar}
-% \begin{macro}{\MH_kernel_xargdef:nwwn}
-% \begin{macro}{\MH_nospace_xargdef:nwwn}
-% \begin{macro}{\MHPrecedingSpacesOff}
-% \begin{macro}{\MHPrecedingSpacesOn}
-% The code for the space sensitive peek ahead.
-% \begin{macrocode}
-\@ifundefined{kernel@ifnextchar}
- {\MH_let:NwN \kernel@ifnextchar \@ifnextchar}
- {}
-\MH_let:NwN \MH_kernel_xargdef:nwwn \@xargdef
-\long\def\MH_nospace_xargdef:nwwn #1[#2][#3]#4{
- \@ifdefinable#1{
- \expandafter\def\expandafter#1\expandafter{
- \expandafter
- \MH_nospace_protected_testopt:n
- \expandafter
- #1
- \csname\string#1\endcsname
- {#3}}
- \expandafter\@yargdef
- \csname\string#1\endcsname
- \tw@
- {#2}
- {#4}}}
-\providecommand*\MHPrecedingSpacesOff{
- \MH_let:NwN \@xargdef \MH_nospace_xargdef:nwwn
-}
-\providecommand*\MHPrecedingSpacesOn{
- \MH_let:NwN \@xargdef \MH_kernel_xargdef:nwwn
-}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macro}{\MH_group_align_safe_begin:}
-% \begin{macro}{\MH_group_align_safe_end:}
-% \begin{macrocode}
-\def \MH_group_align_safe_begin: {\iffalse{\fi\ifnum0=`}\fi}
-\def \MH_group_align_safe_end: {\ifnum0=`{}\fi}
-% \end{macrocode}
-% \end{macro}
-% \end{macro}
-%
-% \begin{macrocode}
-%</package>
-% \end{macrocode}
-%
-% \Finale
-\endinput
diff --git a/Master/texmf-dist/tex/latex/mh/breqn.sty b/Master/texmf-dist/tex/latex/mh/breqn.sty
deleted file mode 100644
index 464b862b398..00000000000
--- a/Master/texmf-dist/tex/latex/mh/breqn.sty
+++ /dev/null
@@ -1,2038 +0,0 @@
-%%
-%% This is file `breqn.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% breqn.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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 Maintainers of this work is
-%% Lars Madsen, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file breqn.dtx
-%% and the derived files
-%% breqn.sty, breqn.pdf, breqn.ins, breqn.drv.
-%%
-\NeedsTeXFormat{LaTeX2e}
-\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{breqn}{2012/05/10}{0.98b}{Breaking equations}
-\ExplSyntaxOff
-\edef\breqnpopcats{%
- \catcode\number`\"=\number\catcode`\"
- \relax}
-\AtEndOfPackage{\breqnpopcats}%
-\catcode`\^=7 \catcode`\_=8 \catcode`\"=12 \relax
-\DeclareOption{mathstyleoff}{%
- \PassOptionsToPackage{mathstyleoff}{flexisym}%
-}
-\ProcessOptions\relax
-\@ifpackageloaded{flexisym}{}{%
- \RequirePackage{flexisym}[2009/08/07]
- \edef\breqnpopcats{\breqnpopcats
- \catcode\number`\^=\number\catcode`\^
- \catcode\number`\_=\number\catcode`\_
- }%
- \catcode`\^=7 \catcode`\_=8 \catcode`\"=12 \relax
-}
-\RequirePackage{keyval,calc}\relax
-\@ifundefined{options}{%
-\newcommand{\options}[2]{%
- \expandafter\options@a\csname opt@#1.sty\endcsname{#2}%
- \setkeys{#1}{#2}%
-}
-\def\options@a#1#2{%
- \edef\@tempa{\options@b#2,\@empty\@nil}%
- \ifx#1\relax \let#1\@empty\fi
- \xdef#1{#1\ifx#1\@empty\@xp\@gobble\@tempa\@empty\else\@tempa \fi}%
-}
-\def\options@b#1,#2#3\@nil{%
- \options@c#1 \@nil
- \ifx#2\@empty \else\options@b#2#3\@nil\fi
-}
-\def\options@c#1 #2\@nil{\options@d#1=\@nil}
-\def\options@d#1=#2\@nil{\ifx\@empty #1\@empty\else,\fi#1}
-}{}% end @ifundefined test
-\let\@nx\noexpand
-\let\@xp\expandafter
-\@ifundefined{@emptytoks}{\newtoks\@emptytoks}{}
-\chardef\f@ur=4
-\newcount\inf@bad \inf@bad=1000000
-\newcount\maxint \maxint=2147483647
-\let\int@a=\@tempcnta
-\let\int@b=\@tempcntb
-\let\int@c=\count@
-\let\dim@a\@tempdima
-\let\dim@b\@tempdimb
-\let\dim@c\@tempdimc
-\let\dim@d\dimen@
-\let\dim@e\dimen@ii
-\let\dim@A\dimen@i
-\let\skip@a\@tempskipa
-\let\skip@b\@tempskipb
-\let\skip@c\skip@
-\let\toks@a\@temptokena
-\let\toks@b\toks@
-\toksdef\toks@c=2
-\toksdef\toks@d=4
-\toksdef\toks@e=6
-\toksdef\toks@f=8
-\def\abs@num#1{\ifnum#1<\z@-\fi#1}
-\def\@ifnext#1#2#3{%
- \let\@tempd= #1\def\@tempa{#2}\def\@tempb{#3}%
- \futurelet\@tempc\@ifnexta
-}
-\def\@ifnexta{\ifx\@tempc\@tempd \let\@tempb\@tempa \fi \@tempb}
-\def\@ifstar#1#2{%
- \let\@tempd*\def\@tempa*{#1}\def\@tempb{#2}%
- \futurelet\@tempc\@ifnexta
-}
-\def\@optarg#1#2{\@ifnext[{#1}{#1[#2]}}
-\def\@True{00}
-\def\@False{01}
-\def\@Not#1{0\ifcase#11 \or\@xp 1\else \@xp 0\fi}
-\def\@And#1#2{0\ifcase#1#2 \@xp 0\else \@xp 1\fi}
-\def\@Or#1#2{0\ifnum#1#2<101 \@xp 0\else \@xp 1\fi}
-\def\theb@@le#1{\if#1 True\else False\fi}
-\def\freeze@glue#1{#11#1\relax}
-\def\z@rule{\vrule\@width\z@}% no \relax ! use with care
-\def\keep@glue{\z@rule\relax}
-\begingroup \catcode`\&=11
-\gdef\replicate#1{%
- \csname &\expandafter\replicate@a\romannumeral\number\number#1 000q\endcsname
-}
-\endgroup
-\long\def\replicate@a#1#2\endcsname#3{#1\endcsname{#3}#2}
-\begingroup \catcode`\&=11
-\long\gdef\&m#1#2{#1\csname &#2\endcsname{#1}}
-\endgroup
-\@xp\let\csname\string &q\endcsname\@gobble
-\ExplSyntaxOn
-\g@addto@macro\mathchars@reset{%
- %\let\@symRel\@secondoftwo \let\@symBin\@secondoftwo
- %\let\@symDeL\@secondoftwo \let\@symDeR\@secondoftwo
- %\let\@symDeB\@secondoftwo
- \cs_set_eq:NN \math_csym_Rel:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_Bin:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeL:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeR:Nn \use_ii:nn
- \cs_set_eq:NN \math_csym_DeB:Nn \use_ii:nn
-}
-\ExplSyntaxOff
-\def\eq@cons#1#2{%
- \begingroup \let\@elt\relax \xdef#1{\@elt{#2}#1}\endgroup
-}
-\providecommand{\@saveprimitive}[2]{%
- \begingroup
- \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
- \ifx\@tempa\@tempb \global\let#2#1%
- \else
- \edef\@tempb{\meaning#2}%
- \ifx\@tempa\@tempb
- \else \@saveprimitive@a#1#2%
- \fi
- \fi
- \endgroup
-}
-\providecommand\@saveprimitive@a[2]{%
- \begingroup
- \def\@tempb##1#1##2{\edef\@tempb{##2}\@car{}}%
- \@tempb\nullfont{select font nullfont}%
- \topmark{\string\topmark:}%
- \firstmark{\string\firstmark:}%
- \botmark{\string\botmark:}%
- \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%
- \else
- \PackageError{breqn}%
- {Unable to properly define \string#2; primitive
- \noexpand#1no longer primitive}\@eha
- \fi
- \fi
- \endgroup
-}
-\begingroup \catcode`\$=\thr@@ % just to make sure
- \global\let\@@math=$ \gdef\@@display{$$}% $$$
-\endgroup
-\let\@@endmath=\@@math
-\let\@@enddisplay=\@@display
-\@saveprimitive\vadjust\@@vadjust
-\@saveprimitive\insert\@@insert
-\@saveprimitive\mark\@@mark
-\@ifundefined{listwidth}{\newdimen\listwidth}{}
-\listwidth=\z@
-\def\eqfontsize{} % Inherit from context [NOT USED?]
-\def\eqcolor{black} % Default to black [NOT USED?]
-\newdimen\eqnumsep \eqnumsep=10pt % Min space between equ number and body
-\newdimen\eqmargin \eqmargin=8pt % For `multline' gap emulation
-\def\eqindent{C}% % C or I, centered or indented
-\def\eqnumside{R}% % R or L, right or left
-\def\eqnumplace{M}% % M or T or B, middle top or bottom
-\def\eqnumfont{}% % Null for easier debugging [mjd,1997/09/26]
-\def\eqnumform#1{(#1\@@italiccorr)} % Add parens
-\def\eqnumsize{} % Allow numbers to have different typesize ...
-\def\eqnumcolor{} % ... or color than eq body e.g. \color{blue}
-\newlength\eqlinespacing \eqlinespacing=14pt plus2pt % Base-to-base space between lines
-\newlength\eqlineskip \eqlineskip=3pt plus2pt % Min space if eqlinespacing too small
-\newdimen\eqlineskiplimit \eqlineskiplimit=2pt % Threshold for switching to eqlineskip
-\newmuskip \eqbinoffset \eqbinoffset=15mu minus-3mu % Offset from mathrel alignment pt for mathbins
-\newmuskip\eqdelimoffset \eqdelimoffset=2mu % Additional offset for break inside delims
-\newdimen\eqindentstep \eqindentstep=8pt % Indent used when LHS wd is n/a or too large
-\newtoks\eqstyle % Customization hook
-\newcount\eqbreakdepth \eqbreakdepth=2 % Allow breaks within delimiters to this depth
-\newcount \eqinterlinepenalty \eqinterlinepenalty=10000 % No page breaks between equation lines
-\newcount \intereqpenalty \intereqpenalty=1000 % Pagebreak penalty between equations [BRM: Was \@M]
-\newlength \intereqskip \intereqskip=3pt plus2pt % Additional vert space between equations
-\newcount\prerelpenalty \prerelpenalty=-\@M % Linebreak penalty before mathrel symbols
-\newcount\prebinoppenalty \prebinoppenalty=888 % Linebreak penalty before mathbins
-\newmuskip \Dmedmuskip \Dmedmuskip=4mu minus 3mu % medmuskip in displays
-\newmuskip \Dthickmuskip \Dthickmuskip=5mu minus 2mu % thickmuskip in displays
-\def\eq@number{} % Internal variable
-\newlength\eqleftskip \eqleftskip=\@centering % Space on the left [NOT USED?]
-\newlength\eqrightskip \eqrightskip=\@centering % Space on the right [NOT USED?]
-\newlength\eq@vspan \eq@vspan=\z@skip % Glue used to vcenter the eq number
-\newmuskip\eq@binoffset \eq@binoffset=\eqbinoffset % Roughly, \eqbinoffset + \eqdelimoffset
-\newsavebox\EQ@box % Storage for equation body
-\newsavebox\EQ@copy % For eq body sans vadjust/insert/mark material
-\newsavebox\EQ@numbox % For equation number
-\newdimen\eq@wdNum % width of number + separation [NEW]
-\newsavebox\GRP@numbox % For group number [NEW]
-\newdimen\grp@wdNum % width of number + separation [NEW]
-%%B\EQ@vimbox % Vadjust, insert, or mark material
-%%B\EQ@vimcopy % Spare copy of same
-%%B\eq@impinging % Temporary box for measuring number placement
-\newcount \eq@lines % Internal counter, actual number of lines
-\newcount \eq@curline % Loop counter
-\newcount \eq@badness % Used in testing for overfull lines
-\newcount \EQ@vims % For bookkeeping
-\def\@eq@numbertrue{\let\eq@hasNumber\@True}%
-\def\@eq@numberfalse{\let\eq@hasNumber\@False}%
-\let\eq@hasNumber\@False
-\newdimen\eq@dp % Depth of last line
-\newdimen\eq@wdL % Width of the left-hand-side
-\newdimen\eq@wdT % Total width for framing
-\newdimen\eq@wdMin % Width of narrowest line in equation
-\newdimen\grp@wdL % Max width of LHS's in a group
-\newdimen\grp@wdR % Max RHS of all equations in a group
-\newdimen\grp@wdT
-\newdimen\eq@wdRmax
-\newdimen\eq@firstht % Height of first line
-\newdimen\eq@wdCond
-\newdimen\eq@indentstep % Indent amount when LHS is not present
-\newdimen\eq@linewidth % Width actually used for display
-\newdimen\grp@linewidth % Max eq@linewidth over a group
-\newdimen\eq@hshift
-\let\eq@isIntertext\@False
-\eq@indentstep=\maxdimen
-\newdimen\eq@given@sidespace
-\def\eq@overrun{0pt}
-\@ifpackagewith{amsmath}{leqno}{%
- \@ifpackagewith{amsmath}{reqno}{}{\def\eqnumside{L}}%
-}{%
- \def\@tempa#1,leqno.clo,#2#3\@nil{%
- \ifx @#2\relax\else \def\eqnumside{L}\fi
- }%
- \@xp\@tempa\@filelist,leqno.clo,@\@nil
- \if L\eqnumside
- \else
- \@ifundefined{iftagsleft@}{}{%
- \edef\eqnumside{%
- \if TT\csname fi\endcsname\csname iftagsleft@\endcsname
- L\else R\fi
- }%
- }
- \fi
-}
-\@ifpackagewith{amsmath}{fleqn}{%
- \def\eqindent{I}%
-}{%
- \def\@tempa#1,fleqn.clo,#2#3\@nil{%
- \ifx @#2\relax\else \def\eqindent{I}\fi
- }%
- \@xp\@tempa\@filelist,fleqn.clo,@\@nil
- \if I\eqindent
- \else
- \@ifundefined{if@fleqn}{}{%
- \edef\eqindent{%
- \if TT\csname fi\endcsname\csname if@fleqn\endcsname
- I\else C\fi
- }%
- }%
- \fi
-}
- \@ifundefined{mathindent}{%
- \newdimen\mathindent
- }{%
- \@ifundefined{@mathmargin}{}{%
- \mathindent\@mathmargin
- }%
- }
-\let\EQ@hasLHS=\@False
-\let\EQ@QED=\@empty
-\def\mark@lhs#1{%
- \ifnum\lr@level<\@ne
- \let\mark@lhs\relax
- \global\let\EQ@hasLHS=\@True
- \global\let\EQ@prebin@space\EQ@prebin@space@a
- \mark@lhs@a
- \penalty9999 % instead of normal \rel@break
- % else no penalty = forbid break
- \fi
-}
-\def\mark@lhs@a{%
- \mskip\thickmuskip \@@vadjust{\penalty\tw@}\penalty-\@Mi\@@vadjust{}%
-}
-\newcommand\hiderel[1]{\mathrel{\advance\lr@level\@ne#1}}
-%%%%\let\m@@Bin\m@Bin
-%%%%%\let\m@@Rel\m@Rel
-\let\EQ@prebin@space\relax
-\def\EQ@prebin@space@a{\mskip-\eq@binoffset \keep@glue \mskip\eq@binoffset}
-\def\bin@break{\ifnum\lastpenalty=\z@\penalty\prebinoppenalty\fi
- \EQ@prebin@space}
-\def\rel@break{%
- \ifnum\abs@num\lastpenalty <\abs@num\prerelpenalty
- \penalty\prerelpenalty
- \fi
-}
-\ExplSyntaxOn
-%%%\def\d@@Bin{\bin@break \m@@Bin}
-%%%%\def\d@@Rel{\mark@lhs \rel@break \m@@Rel}
-\cs_set:Npn \math_dsym_Bin:Nn {\bin@break\math_bsym_Bin:Nn}
-\cs_set:Npn \math_dsym_Rel:Nn {\mark@lhs \rel@break \math_bsym_Rel:Nn }
-\ExplSyntaxOff
-\ExplSyntaxOn
-%%\let\m@@symRel\@symRel
-%%%\def\d@@symRel{\mark@lhs \rel@break \m@@symRel}
-
-\cs_set_protected:Npn \math_dcsym_Bin:Nn {\bin@break \math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_dcsym_Rel:Nn { \mark@lhs \rel@break \math_bcsym_Rel:Nn}
-
-%%\let\m@@symBin\@symBin \def\d@@symBin{\bin@break \m@@symBin}
-%%\let\m@@symDel\@symDel
-%%\let\m@@symDeR\@symDeR
-%%\let\m@@symDeB\@symDeB
-%%\let\m@@symDeA\@symDeA
-
-\def\display@setup{%
- \medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \math_setup_display_symbols:
- %%\let\m@Bin\d@@Bin \let\m@Rel\d@@Rel
- %%\let\@symRel\d@@symRel \let\@symBin\d@@symBin
- %%\let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
- %%\let\m@DeA\d@@DeA
- %%\let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
- %%\let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
- \let\left\eq@left \let\right\eq@right \global\lr@level\z@
- \global\eq@wdCond\z@ %BRM: new
- \everyhbox{\everyhbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \everyvbox{\everyvbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
-}
-\def\dseries@display@setup{%
- \medmuskip\Dmedmuskip \thickmuskip\Dthickmuskip
- \math_setup_display_symbols:
-%%%% \let\m@Bin\d@@Bin
-%%%\let\m@Rel\d@@Rel
-%%% \let\@symRel\d@@symRel
-%%% \let\@symBin\d@@symBin
-%%% \let\m@DeL\d@@DeL \let\m@DeR\d@@DeR \let\m@DeB\d@@DeB
-%%% \let\m@DeA\d@@DeA
-%%% \let\@symDeL\d@@symDeL \let\@symDeR\d@@symDeR
-%%% \let\@symDeB\d@@symDeB \let\@symDeA\d@@symDeA
- \let\left\eq@left \let\right\eq@right \global\lr@level\z@
- \everyhbox{\everyhbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \everyvbox{\everyvbox\@emptytoks
- \let\display@setup\relax \textmath@setup \let\textmath@setup\relax
- }%
- \displaystyle
-}
-\def\textmath@setup{%
- \math_setup_inline_symbols:
-%%%% \let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
-%%%% \let\@symRel\m@@symRel \let\@symBin\m@@symBin
-%%%% \let\m@DeL\m@@DeL \let\m@DeR\m@@DeR \let\m@DeB\m@@DeB
-%%%% \let\m@DeA\m@@DeA
-%%%% \let\@symDeL\m@@symDeL \let\@symDeR\m@@symDeR
-%%%% \let\@symDeB\m@@symDeB \let\@symDeA\m@@symDeA
- \let\left\@@left \let\right\@@right
-}
-
-\ExplSyntaxOff
-\@ifundefined{@displaytrue}{%
- \@xp\newif\csname if@display\endcsname
- \everydisplay\@xp{\the\everydisplay \@displaytrue}%
-}{}
-\define@key{breqn}{label}{%
- \edef\next@label{\noexpand\label{\next@label@pre#1}}%
- \let\next@label@pre\@empty}
-\define@key{breqn}{labelprefix}{\def\next@label@pre{#1}}
-\global\let\next@label\@empty
-\global\let\next@label@pre\@empty
-\define@key{breqn}{number}{\def\eq@number{#1}%
- \let\@currentlabel\eq@number
-}
-\define@key{breqn}{shiftnumber}{\let\eq@shiftnumber\@True}
-\define@key{breqn}{holdnumber}{\let\eq@holdnumber\@True}
-\define@key{breqn}{density}{\def\eq@density@factor{#1}}
-\define@key{breqn}{indentstep}{\eqindentstep#1\relax}
-\define@key{breqn}{compact}[-99]{\prerelpenalty=#1\relax}
-\define@key{breqn}{layout}[?]{%
- \edef\eq@layout{\@car#1?\@nil}%
-}
-\define@key{breqn}{spread}{%
- \addtolength\eqlinespacing{#1}%
- \addtolength\eqlineskip{#1}%
- \eqlineskiplimit\eqlineskip
-}
-\define@key{breqn}{sidespace}{%
- \setlength\eq@given@sidespace{#1}%
-}
-\define@key{breqn}{style}{\eqstyle\@xp{\the\eqstyle #1}}
-\define@key{breqn}{shortskiplimit}{\def\eq@shortskiplimit{#1}}
-\def\eq@shortskiplimit{2em}
-\define@key{breqn}{frame}[\fboxrule]{\def\eq@frame{T}%
- \dim@a#1\relax\edef\eq@framewd{\the\dim@a}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\define@key{breqn}{fullframe}[]{\def\eq@frame{U}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\def\eq@frame{F} % no frame
-\def\eq@framewd{\fboxrule}
-\define@key{breqn}{framesep}[\fboxsep]{%
- \if\eq@frame F\def\eq@frame{T}\fi
- \dim@a#1\relax \edef\eq@framesep{\the\dim@a}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\def\eq@framesep{\fboxsep}
-\define@key{breqn}{background}{\def\eq@background{#1}%
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
-}
-\define@key{breqn}{color}{\def\eq@foreground{#1}}
-\define@key{breqn}{center}[]{\let\eq@centerlines\@True}
-\define@key{breqn}{nocenter}[]{\let\eq@centerlines\@False}
-\let\eq@centerlines\@False
-\define@key{breqn}{noalign}[]{\let\grp@aligned\@False}
-\let\grp@aligned\@True % default
-\define@key{breqn}{breakdepth}{\eqbreakdepth#1\relax}
-\define@key{breqn}{cols}{\global\let\@preamble\@empty
- \darray@mkpream#1\@percentchar
-}
-\newenvironment{dmath}{%
- \let\eq@hasNumber\@True \@optarg\@dmath{}}{}
-\def\@dmath[#1]{%
- \everydisplay\expandafter{\the\everydisplay \display@setup}%
- \if@noskipsec \leavevmode \fi
- \if@inlabel \leavevmode \global\@inlabelfalse \fi
- \if\eq@group\else\eq@prelim\fi
- \setkeys{breqn}{#1}%
- \the\eqstyle
- \eq@setnumber
- \begingroup
- \eq@setup@a
- \eq@startup
-}
-\def\enddmath#1{\check@punct@or@qed}
-\def\end@dmath{%
- \gdef\EQ@setwdL{}% Occasionally undefined ???
- \eq@capture
- \endgroup
- \EQ@setwdL
- \eq@measure
- \if\eq@group \grp@push \else \eq@finish\fi
-}
-\newenvironment{dmath*}{%
- \let\eq@hasNumber\@False \@optarg\@dmath{}%
-}{}
-\@namedef{end@dmath*}{\end@dmath}
-\@namedef{enddmath*}#1{\check@punct@or@qed}
-\def\eq@prelim{%
- \if@inlabel \indent \par \fi
- \if@nobreak \global\@nobreakfalse \predisplaypenalty\@M \fi
- \everypar\@emptytoks
- \noindent
- \eq@nulldisplay
- \par %% \eq@saveparinfo %% needs work
- \let\intertext\breqn@intertext
-}
-\def\breqn@parshape@warning{%
- \PackageWarning{breqn}{%
- Complex paragraph shape cannot be followed by this equation}%
-}
-\let\eq@prevshape\@empty
-\def\eq@saveparinfo{%
- \count@\prevgraf \advance\count@-\thr@@ % for the null display
- \edef\eq@prevshape{\prevgraf\the\count@\space}%
- \ifcase\parshape
- % case 0: no action required
- \or \edef\eq@prevshape{\eq@prevshape
- \parshape\@ne\displayindent\displaywidth\relax
- }%
- \else
- \breqn@parshape@warning
- \fi
-}
-\def\eq@setnumber{%
- \eq@wdNum\z@
- \if\eq@hasNumber
- \ifx\eq@number\@empty
- \stepcounter{equation}\let\eq@number\theequation
- \fi
- % This sets up numbox, etc, even if unnumbered?????
- \ifx\eq@number\@empty
- \else
- \set@label{equation}\eq@number
- \global\sbox\EQ@numbox{%
- \next@label \global\let\next@label\@empty
- \eqnumcolor\eqnumsize\eqnumfont{\eqnumform{\eq@number}}%
- }%
- \global\eq@wdNum\wd\EQ@numbox\global\advance\eq@wdNum\eqnumsep
- \fi
- \fi
-}
-\newcount\eq@final@linecount
-\let\eq@GRP@first@dmath\@True
-\def\eq@finish{%
- \begingroup
- \if F\eq@frame\else
- \freeze@glue\eqlinespacing \freeze@glue\eqlineskip
- \fi
- \csname eq@\eqindent @setsides\endcsname % Compute \leftskip,\rightskip
- \adjust@parshape\eq@parshape% Final adjustment of parshape for left|right skips
- \if\eq@group
- \if\eq@GRP@first@dmath
- \global\let\eq@GRP@first@dmath\@False
- \xdef\dmath@first@leftskip{\leftskip=\the\leftskip\relax}%
- \else
- \eq@topspace{\vskip\parskip}% Set top spacing
- \fi
- \else
- \eq@topspace{\vskip\parskip}% Set top spacing
- \fi
- \afterassignment\remove@to@nnil
- \eq@final@linecount=\expandafter\@gobble\eq@parshape\@nnil
- \if\eq@hasNumber
- \if\eq@shiftnumber
- \csname eq@typeset@\eqnumside Shifted\endcsname
- \else
- \ifnum\eq@final@linecount=\@ne
- \csname eq@typeset@\eqnumside @single\endcsname
- \else
- \csname eq@typeset@\eqnumside\eqnumplace\endcsname
- \fi
- \fi
- \else
- \eq@typeset@Unnumbered
- \fi
- \endgroup
- \eq@botspace
-}
-\def\eq@typeset@L@single{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \rlap{\kern-\leftskip\box\EQ@numbox}%
- \if F\eq@frame
- \else
- \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}%
- \fi
- \eq@dump@box\unhbox\EQ@box \@@par
-}
-\def\eq@typeset@R@single{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \if F\eq@frame
- \else
- \rlap{\raise\eq@firstht\hbox to\z@{\eq@addframe\hss}}%
- \fi
- \rlap{\kern-\leftskip\kern\linewidth\kern-\wd\EQ@numbox\copy\EQ@numbox}%
- \eq@dump@box\unhbox\EQ@box
- \@@par
-}
-\def\peek@branch#1#2{%
- \let\peek@b#1\let\peek@space#2\futurelet\@let@token\peek@a
-}
-\def\peek@skipping@spaces#1{\peek@branch#1\peek@skip@space}
-\def\peek@a{%
- \ifx\@let@token\@sptoken \expandafter\peek@space
- \else \expandafter\peek@b\fi
-}
-\lowercase{\def\peek@skip@space} {\futurelet\@let@token\peek@a}%
-\def\check@punct{\futurelet\@let@token\check@punct@a}
-\def\check@punct@a{%
- \edef\@tempa{%
- \ifx\@let@token\@sptoken\@nx\finish@end
- \else\ifx\@let@token ,\@nx\check@qed
- \else\ifx\@let@token .\@nx\check@qed
- \else\check@punct@b % check the less common possibilities
- \fi\fi\fi
- }%
- \@tempa
-}
-\begingroup
-\toks@a{%
- \ifx\@let@token ;\@nx\check@qed
- \else\ifx\@let@token ?\@nx\check@qed
- \else\ifx\@let@token !\@nx\check@qed
-}
-\toks@c{\fi\fi\fi}% matching with \toks@a
-\catcode`\.=\active \catcode`\,=\active \catcode`\;=\active
-\catcode`\?=\active \catcode`\!=\active
-\toks@b{%
- \else\ifx\@let@token ,\@nx\check@qed
- \else\ifx\@let@token .\@nx\check@qed
- \else\ifx\@let@token ;\@nx\check@qed
- \else\ifx\@let@token ?\@nx\check@qed
- \else\ifx\@let@token !\@nx\check@qed
- \else\@nx\finish@end
- \fi\fi\fi\fi\fi
-}
-\xdef\check@punct@b{%
- \the\toks@a\the\toks@b\the\toks@c
-}
-\endgroup
-\let\found@punct\@empty
-\def\check@qed#1{%
- \gdef\found@punct{#1}%
- \peek@skipping@spaces\check@qed@a
-}
-\def\check@qed@a{%
- \ifx\end\@let@token \@xp\check@qed@b
- \else \@xp\finish@end
- \fi
-}
-\def\check@qed@b#1#2{%
- \@ifundefined{#2qed}{}{%
- \toks@\@xp{\found@punct\csname#2qed\endcsname}%
- \xdef\found@punct{\the\toks@}%
- }%
- \finish@end
- \end{#2}%
-}
-\def\@tempa#1\endcsname#2\@nil{\def\latex@end##1{#2}}
-\expandafter\@tempa\end{#1}\@nil
-\def\end#1{\csname end#1\endcsname \latex@end{#1}}%
-\def\check@punct@or@qed#1{%
- \xdef\found@punct{\@empty}% BRM: punctuation was being remembered past this eqn.
- % WSPR: err, why isn't that just \global\let\found@punct\@empty ?
- \def\finish@end{\csname end@#1\endcsname\latex@end{#1}}%
- \check@punct
-}
-\newcommand\eqpunct[1]{\thinspace#1}
-\providecommand\set@label[2]{\protected@edef\@currentlabel{#2}}
-\def\eq@topspace#1{%
- \begingroup
- \global\let\EQ@shortskips\@False
- \if\@And{\eq@group}{\@Not\eq@GRP@first@dmath}%
- \parskip\intereqskip \penalty\intereqpenalty
- \else
- \eq@check@shortskip
- \if\EQ@shortskips
- \parskip\abovedisplayshortskip
- \aftergroup\belowdisplayskip\aftergroup\belowdisplayshortskip
- \ifdim\predisplaysize>\z@\nointerlineskip\fi
- \else
- \parskip\abovedisplayskip
- \fi
- \fi
- \if F\eq@frame
- \else
- \addtolength\parskip{\eq@framesep+\eq@framewd}%
- \fi
- #1%
- \endgroup
-}
-\def\eq@check@shortskip {%
- \global\let\EQ@shortskips\@False
- \setlength\dim@a{\abovedisplayskip+\ht\EQ@numbox}%
- \ifdim\leftskip<\predisplaysize
- \else
- \ifdim -\maxdimen=\predisplaysize
- \else
- \if R\eqnumside
- \global\let\EQ@shortskips\@True
- \else
- \if\eq@shiftnumber
- \else
- \if T\eqnumplace
- \ifdim\dim@a<\eq@firstht
- \global\let\EQ@shortskips\@True
- \fi
- \else
- \setlength\dim@b{\eq@vspan/2}%
- \ifdim\dim@a<\dim@b
- \global\let\EQ@shortskips\@True
- \fi
- \fi
- \fi
- \fi
- \fi
- \fi
-}
-\def\eq@botspace{%
- \penalty\postdisplaypenalty
- \if F\eq@frame
- \else
- \addtolength\belowdisplayskip{\eq@framesep+\eq@framewd}%
- \fi
- \vskip\belowdisplayskip
- \@endpetrue % kill parindent if current paragraph continues
- \global\@ignoretrue % ignore following spaces
- \eq@resume@parshape
-}
-\def\eq@resume@parshape{}
-\def\eq@startup{%
- \global\let\EQ@hasLHS\@False
- \setbox\z@\vbox\bgroup
- \noindent \@@math \displaystyle
- \penalty-\@Mi
-}
-\def\eq@setup@a{%
- \everymath\everydisplay
- %\let\@newline\eq@newline % future possibility?
- \let\\\eq@newline
- \let\insert\eq@insert \let\mark\eq@mark \let\vadjust\eq@vadjust
- \hsize\maxdimen \pretolerance\@M
- \linepenalty\@m
- \rightskip\z@\@plus\@M\p@ \leftskip\z@skip \parfillskip\z@skip
- \clubpenalty\@ne \widowpenalty\z@ \interlinepenalty\z@
- \global\let\EQ@prebin@space\relax
- \binoppenalty\@M \relpenalty\@M
-}
-\newdimen\eq@wdR\eq@wdR\z@%BRM
-\def\eq@capture{%
- \ifnum\lastpenalty>-\@M \penalty-\@Mi \fi
- \keep@glue\@@endmath
- \eq@addpunct
- \@@par
- \eq@wdL\z@
- \setbox\tw@\lastbox
- \global\setbox\EQ@box\hbox{\unhbox\tw@\unskip\unskip\unpenalty}%
- \unskip\unpenalty
- \global\setbox\EQ@copy\copy\EQ@box
-%% \global\setbox\EQ@vimcopy\copy\EQ@vimbox
- \clubpenalty\z@
- \eq@wdR\z@%BRM: eq@wdL patch
- \eq@repack % recursive
- \setbox\tw@\lastbox
- \global\setbox\EQ@box\hbox{\unhcopy\tw@\unskip\unpenalty \unhbox\EQ@box}%
- \global\setbox\EQ@copy\hbox{\unhbox\tw@\unskip\unpenalty \unhbox\EQ@copy}%
- \ifdim\eq@wdR>\z@% BRM: eq@wdL patch
- \setlength\dim@a{\wd\EQ@box-\eq@wdR
- % Apparently missing a \thickmuskip = 5mu = 5/18em=0.27777777777.. ?
- + 0.2777777777777em}% FUDGE??!?!?!
- \ifdim\dim@a>\eq@wdL
- \eq@wdL\dim@a
- \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}%
- \fi
- \fi
- \egroup % end vbox started earlier
-}
-\def\eq@addpunct{%
- \ifx\found@punct\@empty
- \else \eqpunct{\found@punct}%
- \fi
- % BRM: Added; the punctuation kept getting carried to following environs
- \xdef\found@punct{\@empty}%
- \EQ@afterspace
-}
-\global\let\EQ@afterspace\@empty
-\def\eq@repack{%
- \ifcase\lastpenalty
- % case 0: normal case
- \setbox\tw@\lastbox
- \eq@repacka\EQ@copy \eq@repacka\EQ@box
- \unskip
- \or % case 1: finished recursing
- \unpenalty
- \setbox\tw@\lastbox
- \eq@repacka\EQ@copy \eq@repacka\EQ@box
- \@xp\@gobble
- \or % case 2: save box width = LHS width
- \unpenalty
- \setbox\tw@\lastbox
- \setbox\z@\copy\tw@ \setbox\z@\hbox{\unhbox\z@\unskip\unpenalty}%
- \addtolength\eq@wdL{\wd\z@}
- \setlength\eq@wdR{\wd\EQ@box}% BRM: eq@wdL patch
- \xdef\EQ@setwdL{\eq@wdL\the\eq@wdL\relax}%
- \global\setbox\EQ@copy\hbox{%
- \hbox{\unhcopy\tw@\unskip\unpenalty\unskip}%
- \box\EQ@copy
- }%
- \global\setbox\EQ@box\hbox{%
- \hbox{\unhbox\tw@\unskip\unpenalty\unskip}%
- \box\EQ@box
- }%
- \unskip
- \or % case 3: unpack left-right box
- \unpenalty
- \eq@lrunpack
- \else
- \breqn@repack@err
- \fi
- \eq@repack % RECURSE
-}
-\def\breqn@repack@err{%
- \PackageError{breqn}{eq@repack penalty neq 0,1,2,3}\relax
-}
-\def\eq@repacka#1{%
- \global\setbox#1\hbox{\unhcopy\tw@ \unskip
- \count@-\lastpenalty
- \ifnum\count@<\@M \else \advance\count@-\@M \fi
- \unpenalty
- \ifx\EQ@copy#1\ifnum\count@>\thr@@ \count@\@ne\fi\fi
- \ifcase\count@
- % case 0, normal line break
- \penalty-\@M % put back the linebreak penalty
- \or % case 1, do nothing (end of equation)
- \relax
- \or % case 2, no-op (obsolete case)
- \or % case 3, transfer vspace and/or penalty
- \ifx#1\EQ@box \eq@revspace \else \eq@revspaceb \fi
- \or % case 4, put back an insert
- \eq@reinsert
- \or % case 5, put back a mark
- \eq@remark
- \or % case 6, put back a vadjust
- \eq@readjust
- \else % some other break penalty
- \penalty-\count@
- \fi
- \unhbox#1}%
-}
-\def\eq@nulldisplay{%
- \begingroup \frozen@everydisplay\@emptytoks
- \@@display
- \predisplaypenalty\@M \postdisplaypenalty\@M
- \abovedisplayskip\z@skip \abovedisplayshortskip\z@skip
- \belowdisplayskip\z@skip \belowdisplayshortskip\z@skip
- \xdef\EQ@displayinfo{%
- \prevgraf\the\prevgraf \predisplaysize\the\predisplaysize
- \displaywidth\the\displaywidth \displayindent\the\displayindent
- \listwidth\the\linewidth
- \ifdim\displayindent>\z@
- \advance\listwidth\the\leftmargin
- \advance\listwidth\the\rightmargin
- \fi
- \relax}%
- \halign{##\cr}%
- \@@enddisplay
- \par
- \endgroup
- \EQ@displayinfo
-}
-\def\eq@newline{%
- \@ifstar{\eq@newlinea\@M}{\eq@newlinea\eqinterlinepenalty}}
-\def\eq@newlinea#1{%
- \@ifnext[{\eq@newlineb{#1}}{\eq@newlineb{#1}[\maxdimen]}}
-\def\eq@newlineb#1[#2]{\penalty-\@M}
-\def\eq@revspace{%
- \global\setbox\EQ@vimbox\vbox{\unvbox\EQ@vimbox
- \unpenalty
- \global\setbox\@ne\lastbox}%
- \@@vadjust{\unvbox\@ne}%
- \penalty-\@M
-}
-\def\eq@revspaceb{%
- \global\setbox\EQ@vimcopy\vbox{\unvbox\EQ@vimcopy
- \unpenalty
- \global\setbox\@ne\lastbox}%
- \@@vadjust{\unvbox\@ne}%
- \penalty-\@M
-}
-\def\eq@break#1{\penalty-1000#1 \keep@glue}
-\let\@parshape\@empty
-\def\eq@measure{%
- \ifdim\eq@indentstep=\maxdimen \eq@indentstep\eqindentstep \fi
- \ifdim\eq@linewidth=\z@ \else \edef\eq@linewidths{{\the\eq@linewidth}}\fi
- \begingroup \eq@params
- \leftskip\z@skip
- \rightskip\z@\@plus\columnwidth\@minus\hfuzz
- \global\EQ@continue{\eq@trial}%
- \eq@trial % uses \eq@linewidths
- \eq@failout % will be a no-op if the trial succeeded
- \endgroup
- \EQ@trial
-}
-\let\EQ@trial\@empty
-\newtoks\EQ@continue
-\let\EQ@widths\@empty
-\let\EQ@fallback\@empty
-\def\eq@linewidths{\displaywidth\linewidth\columnwidth}
-\def\eq@trial{%
- \ifx\@empty\eq@linewidths
- \global\EQ@continue{}%
- \else
- \iffalse{\fi \@xp\eq@trial@a \eq@linewidths}%
- \fi
- \the\EQ@continue
-}
-\def\eq@trial@a#1{%
- \dim@c#1\relax
- \if T\eq@frame \eq@frame@adjust\dim@c \fi
- \ifdim\dim@c>\eq@linewidth
- \eq@linewidth\dim@c
- \let\eq@trial@b\eq@trial@d
- \csname eq@try@layout@\eq@layout\endcsname
- \fi
- \edef\eq@linewidths{\iffalse}\fi
-}
-\def\eq@frame@adjust#1{%
- %\addtolength#1{-2\eq@framewd-2\eq@framesep}%
- \dim@a\eq@framewd \advance\dim@a\eq@framesep
- \advance#1-2\dim@a
-}
-\def\eq@trial@succeed{%
- \aftergroup\@gobbletwo % cancel the \EQ@fallback code; see \eq@trial@c (?)
- \global\EQ@continue{\eq@trial@done}%
-}
-\def\eq@trial@done{%
- \let\eq@failout\relax
-}
-\def\eq@trial@init{\global\let\EQ@fallback\eq@nextlayout}
-\def\eq@nextlayout#1{%
- \endgroup
- \begingroup #1%
-}
-\def\eq@failout{%
- \global\let\EQ@trial\EQ@last@trial
-}
-\def\eq@trial@save#1{%
- \xdef#1{%
- \eq@linewidth\the\eq@linewidth
- % save info about the fit
- \eq@lines\the\eq@lines \eq@badness\the\eq@badness \def\@nx\eq@badline{\eq@badline}%
- % save size info
- \eq@wdT\the\eq@wdT \eq@wdMin\the\eq@wdMin
- \eq@vspan\the\eq@vspan \eq@dp\the\eq@dp \eq@firstht\the\eq@firstht
- % save info about the LHS
- \eq@wdL\the\eq@wdL \def\@nx\EQ@hasLHS{\EQ@hasLHS}%
- % save info about the numbering
- \def\@nx\eq@hasNumber{\eq@hasNumber}%
- % save info about the chosen layout
- \def\@nx\eq@layout{\eq@layout}%
- \def\@nx\eq@parshape{\@parshape}%
- \def\@nx\eq@measurements{\eq@measurements}%
- \def\@nx\adjust@rel@penalty{\adjust@rel@penalty}%
- \def\@nx\eq@shiftnumber{\eq@shiftnumber}%
- \def\@nx\eq@isIntertext{\@False}%
- }%
-}
-\def\eq@trial@b{\eq@trial@c}
-\def\eq@trial@c#1#2{%
- \begingroup
- \eq@trial@init
- \def\eq@layout{#1}%
- \setbox\z@\vbox{%
- \hfuzz\maxdimen
- \eq@trial@p % run the given parshape
- \if\@Not{\eq@badline}%
- \eq@trial@save\EQ@trial
- \if\eq@hasNumber\eq@retry@with@number\fi
- \if L\eq@layout \eq@check@density
- \else
- \if\@Not{\eq@badline}%
- \eq@trial@succeed
- \fi
- \fi
- \else
- \eq@trial@save\EQ@last@trial
- \fi
- }%
- \EQ@fallback{#2}%
- \endgroup
-}
-\def\eq@trial@d#1#2{\eq@trial@c{#1}{}}
-\def\eq@check@density{%
- \if\@Or{\@Not\EQ@hasLHS}{\eq@shortLHS}%
- \eq@trial@succeed
- \else\if\eq@dense@enough
- \eq@trial@succeed
- \fi\fi
-}
-\def\eq@shortLHS{\ifdim\eq@wdL>.44\eq@wdT 1\else 0\fi 0}
-\def\eq@trial@p{%
- \@parshape %
- \eq@dump@box\unhcopy\EQ@copy
- {\@@par}% leave \parshape readable
- \eq@lines\prevgraf
- \eq@fix@lastline
- \let\eq@badline\@False
- \if i\eq@layout \ifnum\eq@lines>\@ne \let\eq@badline\@True \fi\fi
- \eq@curline\eq@lines % loop counter for eq@measure@lines
- \let\eq@measurements\@empty
- \eq@ml@record@indents
- \eq@measure@lines
- \eq@recalc
-}
-\let\adjust@rel@penalty\@empty
-\def\eq@fix@lastline{%
- \setbox\tw@\lastbox \dim@b\wd\tw@
- \eq@dp\dp\tw@
- \nointerlineskip\hbox to\dim@b{\unhbox\tw@
- \skip@c\lastskip \unskip\unskip\hskip\skip@c
- }%
-}
-\def\eq@recalc{%
- \eq@wdT\z@ \eq@wdMin\maxdimen \eq@vspan\z@skip \eq@badness\z@
- \let\@elt\eq@recalc@a \eq@measurements \let\@elt\relax
-}
-\def\eq@recalc@a#1x#2+#3\@endelt{%
- \eq@firstht#2\relax
- \let\@elt\eq@recalc@b
- \@elt#1x#2+#3\@endelt
-}
-\def\eq@recalc@b#1X#2,#3x#4+#5@#6\@endelt{%
- \setlength\dim@a{#2+#3}%
- \ifdim\dim@a>\eq@wdT \eq@wdT\dim@a \fi
- \ifdim\dim@a<\eq@wdMin \eq@wdMin\dim@a \fi
- \eq@dp#5\relax
- \addtolength\eq@vspan{#1+#4+\eq@dp}%
- \ifnum#6>\eq@badness \eq@badness#6\relax\fi
-}
-\def\eq@layout{?}
-\@namedef{eq@try@layout@?}{%
- \let\eq@trial@b\eq@trial@c
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
- \setlength\dim@a{\wd\EQ@copy-2em}% Fudge; can't shrink more than this?
- % if we're in a numbered group, try hard to fit within the numbers
- \dim@b\eq@linewidth
- \if\eq@shiftnumber\else\if\eq@group
- \if\eq@hasNumber\addtolength\dim@b{-\wd\EQ@numbox-\eqnumsep}%
- \else\if\grp@hasNumber\addtolength\dim@b{-\wd\GRP@numbox-\eqnumsep}%
- \fi\fi\fi\fi
- \ifdim\dim@a<\dim@b% Do we even have a chance of fitting to one line?
- \setlength\dim@b{\columnwidth-\dim@a+\eq@wdCond}%
- \rightskip\z@\@plus\dim@b\@minus\hfuzz
- \eq@trial@b{i}{\eq@try@layout@multi}%
- \else
- \eq@try@layout@multi
- \fi
-}
-\def\eq@try@layout@multi{%
- \if\EQ@hasLHS
- \ifdim\eq@wdL>\eq@linewidth
- \setlength\dim@a{\wd\EQ@copy-\eq@wdL}%
- \ifdim\dim@a<.25\eq@linewidth \eq@try@layout@S
- \else \eq@try@layout@l
- \fi
- % BRM: Originally .7: Extreme for L since rhs has to wrap within the remaining 30+%!
- \else\ifdim\eq@wdL>.50\eq@linewidth
- \eq@try@layout@D
- \else
- \eq@try@layout@L
- \fi\fi
- \else
- \eq@try@layout@S % (already checked case i)
- \fi
-}
-\def\eq@try@layout@D{%
- \setlength\dim@a{\eq@linewidth -\eq@indentstep}%
- \edef\@parshape{\parshape 2
- 0pt \the\eq@wdL\space \the\eq@indentstep\space \the\dim@a\relax
- }%
- \def\adjust@rel@penalty{\penalty-99 }%
- \eq@trial@b{D}{\eq@try@layout@A}%
-}
-\def\eq@try@layout@L{%
- \setlength\dim@b{\eq@linewidth-\eq@wdL}%
- \edef\@parshape{\parshape 2 0pt \the\eq@linewidth\space
- \the\eq@wdL\space \the\dim@b\relax
- }%
- \eq@trial@b{L}{\eq@try@layout@D}%
-}
-\def\eq@try@layout@S{%
- \setlength\dim@b{\eq@linewidth-2\eqmargin}% \advance\dim@b-1em%
- \int@a\wd\EQ@copy \divide\int@a\dim@b
- \addtolength\dim@b{-\int@a\eq@indentstep}%
- \if\eq@hasNumber
- \ifdim\dim@b>15em%
- \addtolength\dim@b{-\eq@wdNum}%
- \fi
- \fi
- \int@b\z@
- \def\@tempa{\dim}%
- \edef\@parshape{\parshape 2 0pt \the\dim@b\space
- \the\eqmargin\space\the\dim@b\relax}%
- \eq@trial@b{S}{\eq@try@layout@A}%
-}
-\def\eq@try@layout@l{%
- \setlength\dim@a{\eq@linewidth -\eq@indentstep}%
- \int@a\eq@wdL \divide\int@a\dim@a
- \advance\int@a\tw@
- \edef\@parshape{\parshape \number\int@a\space
- 0pt \the\eq@linewidth
- }%
- \advance\int@a-\tw@
- \setlength\dim@b{2\eq@indentstep}%
- \setlength\dim@c{\eq@linewidth -\dim@b}%
- \edef\@parshape{\@parshape
- \replicate{\int@a}{\space\the\eq@indentstep\space\the\dim@a}%
- \space\the\dim@b\space\the\dim@c\relax
- }%
- \eq@trial@b{l}{\eq@try@layout@A}%
-}
-\def\eq@try@layout@A{%
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
- \if\EQ@hasLHS \def\adjust@rel@penalty{\penalty-99 }\fi
- \eq@trial@b{A}{}%
-}
-\let\eq@shiftnumber\@False
-\def\eq@retry@with@number{%
- \if\eq@shiftnumber
- \else
- \ifdim\eq@wdCond>\z@\if R\eqnumside
- \let\eq@shiftnumber\@True
- \fi\fi
- \dim@b\eq@wdNum
- \if L\eqnumside
- \ifdim\@totalleftmargin>\dim@b\dim@b\@totalleftmargin\fi
- \else
- \addtolength\dim@b{\@totalleftmargin}%
- \fi
- \setlength\dim@a{\eq@linewidth-\dim@b}%\advance\dim@a1em\relax% Allowance for shrink?
- \int@a\@ne\if\eq@group\int@a\maxint\fi
- \if\eq@shiftnumber % Already know we need to shift
- \else\ifdim\eq@wdT<\dim@a % Fits!
- \else
- \setlength\leftskip{\eq@wdNum}%
- \setlength\rightskip{\z@\@plus\dim@a}%
- \adjust@parshape\@parshape
- \nointerlineskip
- \edef\eq@prev@lines{\the\eq@lines}%
- \edef\eq@prev@badness{\the\eq@badness}% BRM
- \eq@trial@p
- \int@a\eq@prev@badness\relax\advance\int@a 50\relax%?
- \int@b\eq@prev@lines \if\eq@group\advance\int@b\@ne\fi% Allow 1 extra line in group
- \ifnum\eq@lines>\int@b % \eq@prev@lines
- \let\eq@shiftnumber\@True
- \else\if\eq@badline
- \let\eq@shiftnumber\@True
- \else\ifnum\eq@badness>\int@a % BRM: New case
- \let\eq@shiftnumber\@True
- \else
- \fi\fi%\fi
- \fi\fi\fi
- \if\eq@shiftnumber
- \EQ@trial% Restore parshape & other params,
- \leftskip\z@\let\eq@shiftnumber\@True % But set shift & leftskip
- \edef\@parshape{\eq@parshape}% And copy saved parshape back to `working copy' !?!?
- \fi
- \eq@trial@save\EQ@trial % Either way, save the trial state.
- \fi
-}
-\def\adjust@parshape#1{%
- \@xp\adjust@parshape@a#1\relax
- \edef#1{\temp@a}%
-}
-\def\adjust@parshape@a#1 #2\relax{%
- \setlength\dim@a{\leftskip+\rightskip}%
- \edef\temp@a{#1}%
- \adjust@parshape@b#2 @ @ \relax
-}
-\def\adjust@parshape@b#1 #2 {%
- \ifx @#1\edef\temp@a{\temp@a\relax}%
- \@xp\@gobble
- \else
- \dim@b#1\relax
- \dim@c#2\relax
- \addtolength\dim@c{\dim@a+\dim@b}%
- \ifdim\dim@c>\eq@linewidth\setlength\dim@c{\eq@linewidth}\fi
- \addtolength\dim@c{-\dim@b}%
- \edef\temp@a{\temp@a\space\the\dim@b\space\the\dim@c}%
- \fi
- \adjust@parshape@b
-}
-\def\eq@ml@record@indents{%
- \int@a\z@
- \def\@tempa{%
- \advance\int@a\@ne
- \@xp\edef\csname eq@i\number\int@a\endcsname{\the\dim@a}%
- \ifnum\int@a<\int@b \afterassignment\@tempb \fi
- \dim@a
- }%
- \def\@tempb{\afterassignment\@tempa \dim@a}%
- \def\@tempc##1##2 {\int@b##2\afterassignment\@tempa\dim@a}%
- \@xp\@tempc\@parshape
-}
-\chardef\@endelt=`\?
-\def\eq@measurements{%
- \@elt 4.5pt/5.0pt,66.0ptx6.8pt+2.4pt@27\@endelt
- ...
-}
-\def\eq@measure@lines{%
- \let\eq@ml@continue\eq@measure@lines
- \setbox\tw@\lastbox \dim@b\wd\tw@ % find target width of line
- \setbox\z@\hbox to\dim@b{\unhbox\tw@}% check for overfull
- \eq@badness\badness
- \ifnum\eq@badness<\inf@bad \else \let\eq@badline\@True \fi
- \eq@ml@a \eq@ml@continue
-}
-\def\eq@ml@a{%
- \setbox\tw@\hbox{\unhbox\z@ \unskip}% find natural width
- \ifdim\dim@b<\wd\tw@ \setlength\dim@a{\dim@b}% shrunken line
- \else \setlength\dim@a{\wd\tw@}% OK to use natural width
- \fi
- \addtolength\dim@a{-\leftskip}% BRM: Deduct the skip if we're retrying w/number
- \skip@a\lastskip \unskip \unpenalty
- \ifdim\skip@a=\z@
- \let\eq@ml@continue\relax % end the recursion
- \else
- % Sum repeated vskips if present
- \def\@tempa{%
- \ifdim \lastskip=\z@
- \else \addtolength\skip@a{\lastskip}\unskip\unpenalty \@xp\@tempa
- \fi
- }%
- \fi
- \edef\eq@measurements{\@elt
- \the\skip@a\space X% extra space to facilitate extracting only the
- % dimen part later
- \csname eq@i%
- \ifnum\eq@curline<\parshape \number\eq@curline
- \else\number\parshape
- \fi
- \endcsname,\the\dim@a x\the\ht\tw@+\the\dp\tw@ @\the\eq@badness\@endelt
- \eq@measurements
- }%
- \advance\eq@curline\m@ne
- \ifnum\eq@curline=\z@ \let\eq@ml@continue\relax\fi
-}
-\def\eq@ml@vspace{%
- \global\advance\eq@vspan\lastskip \unskip\unpenalty
- \ifdim\lastskip=\z@ \else \@xp\eq@ml@vspace \fi
-}
-\def\eq@dense@enough{%
- \ifnum\eq@lines<\thr@@
- \@True
- \else
- \ifdim\eq@wdL >.7\eq@wdT
- \@False
- \else \@xp\@xp\@xp\eq@dense@enough@a
- \fi
- \fi
-}
-\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\eq@density@factor{.475}
-\def\eq@dense@enough@a{%
- \@True \fi
- \ifnum\eq@lines>\sixt@@n
- \eq@dense@enough@b
- \else
- \dim@b\z@ \let\@elt\eq@delt \eq@measurements
- \dim@c\eq@density@factor\eq@wdT \multiply\dim@c\eq@lines
- \ifdim\dim@b>\dim@c \true@false@true \else \false@false@false \fi
- \fi
-}
-\def\eq@delt#1X#2,#3x#4+#5@#6\@endelt{\addtolength\dim@b{#3}}%
-\def\eq@dense@enough@b{%
- \int@b\eq@wdT \divide\int@b\p@
- \dim@b\eq@wdL \divide\dim@b\int@b
- \dim@c\eq@lines\p@ \multiply\dim@c\f@ur
- \int@b\eq@lines \multiply\int@b 9 \advance\int@b -10%
- \divide\dim@c\int@b
- \ifdim\dim@b<\dim@c \true@true@true \else \false@true@false \fi
-}
-\let\eq@parshape\@empty
-\def\eq@params{%
- \baselineskip\eqlinespacing
- \lineskip\eqlineskip \lineskiplimit\eqlineskiplimit
- \clubpenalty\@M \widowpenalty\@M \interlinepenalty\eqinterlinepenalty
- \linepenalty199 \exhyphenpenalty5000 % was 9999: make breaks at, eg. \* a bit easier.
- \ifdim\hfuzz<\p@ \hfuzz\p@ \fi
- \parfillskip\z@skip
- \tolerance9999 \pretolerance\m@ne
-}
-\def\eq@dump@box#1#2{%
- \noindent #1#2\setbox\f@ur\lastbox \setbox\tw@\lastbox
- \if L\eq@layout \box\tw@ \else\unhbox\tw@\fi
- \adjust@rel@penalty \unhbox\f@ur
-}
-\def\eq@typeset@Unnumbered{%
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@LM{%
- \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}%
- \eq@typeset@leftnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@LT{%
- \dim@a\eq@firstht
- \eq@typeset@leftnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@LShifted{%
- % place number
- \copy\EQ@numbox \penalty\@M
- \dim@a\eqlineskip
- \if F\eq@frame\else
- \setlength\dim@a{\eq@framesep+\eq@framewd}%
- \fi
- \kern\dim@a
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@RM{%
- \setlength\dim@a{(\eq@vspan+\ht\EQ@numbox-\dp\EQ@numbox)/2}%
- \eq@typeset@rightnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@RB{%
- % NOTE: is \eq@dp useful here
- \setlength\dim@a{\eq@vspan-\ht\EQ@numbox-\dp\EQ@numbox}%
- \eq@typeset@rightnumber
- \eq@typeset@frame
- \eq@typeset@equation
-}
-\def\eq@typeset@RShifted{%
- % place number
- \eq@typeset@frame
- \eq@typeset@equation
- \penalty\@M
- \dim@a\eqlineskip
- \if F\eq@frame\else
- \addtolength\dim@a{\eq@framesep+\eq@framewd}%
- \fi
- \parskip\dim@a
- \hbox to\hsize{\hfil\copy\EQ@numbox}\@@par%
-}
-\def\eq@C@setsides{%
- % \dim@c = space for number, if any, and not shifted.
- \dim@c\z@
- \if\eq@hasNumber\if\eq@shiftnumber\else
- \dim@c\eq@wdNum
- \fi\fi
- % \dim@e = space for condition(on right), if any and formula is only a single line.(to center nicely)
- % but only count it as being right-aligned if we're not framing, since the frame must enclose it.
- \dim@e\z@
- \if F\eq@frame
- \ifnum\eq@lines=\@ne\ifdim\eq@wdCond>\z@
- \setlength\dim@e{\eq@wdCond+\conditionsep}%
- \fi\fi\fi
- % \dim@b = minimum needed on left max(totalleftmargin, left number space)
- \dim@b\z@
- \if L\eqnumside\ifdim\dim@b<\dim@c
- \dim@b\dim@c
- \fi\fi
- \ifdim\dim@b<\@totalleftmargin
- \dim@b\z@
- \else
- \addtolength\dim@b{-\@totalleftmargin}%
- \fi
- % \dim@d = minimum needed on right max(condition, right number space)
- \dim@d\dim@e
- \if R\eqnumside\ifdim\dim@d<\dim@c
- \dim@d\dim@c
- \fi\fi
- % \dim@a = left margin; initially half available space
- % \dim@c = right margin; ditto
- \setlength\dim@a{(\eq@linewidth-\eq@wdT+\dim@e+\@totalleftmargin)/2}%
- \dim@c=\dim@a
- % If too far to the left
- \ifdim\dim@a<\dim@b
- \addtolength\dim@c{\dim@a-\dim@b}%
- \ifdim\dim@c<\z@\dim@c=\z@\fi
- \dim@a=\dim@b
- % Or if too far to the right
- \else\ifdim\dim@c<\dim@d
- \addtolength\dim@a{\dim@c-\dim@d}%
- \ifdim\dim@a<\z@\dim@a=\z@\fi
- \dim@c=\dim@d
- \fi\fi
- % Now, \dim@d,\dim@e is the left & right glue to center each line for centerlines
- \setlength\dim@e{\eq@wdT-\eq@wdMin}\dim@d=\z@
- \dim@d\z@
- \if\eq@centerlines
- \divide\dim@e2\relax
- \dim@d=\dim@e
- \fi
- \setlength\leftskip{\dim@a\@plus\dim@d}%
- \addtolength\dim@e{\dim@c}%
- \setlength\rightskip{\z@\@plus\dim@e}%\@minus5\p@
- % Special case: if framing, reduce the stretchiness of the formula (eg. condition)
- % Or if we have a right number, FORCE space for it
- \dim@b\z@
- \if F\eq@frame\else
- \dim@b\dim@c
- \fi
- \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}%
- \if R\eqnumside
- \dim@c\eq@wdNum
- \ifdim\dim@c>\dim@b
- \dim@b\dim@c
- \fi
- \fi
- \fi
- % If either of those cases requires hard rightskip, move that part from glue.
- \ifdim\dim@b>\z@
- \addtolength\dim@e{-\dim@c}%
- \rightskip\dim@b\@plus\dim@e%\@minus5\p@
- \fi
- % And peculiar further special case: in indented environs, width isn't where it would seem
- \ifdim\eq@wdCond>\z@
- \addtolength\rightskip{-\@totalleftmargin}%
- \fi
- \parfillskip\z@skip
-}
-\def\eq@I@setsides{%
- \leftskip\mathindent
- \if\eq@shiftnumber
- \setlength\dim@a{\eq@linewidth-\eq@wdT-\mathindent}%
- \ifdim\dim@a<\z@
- \leftskip=\z@ % Or something minimal?
- \fi
- \fi
- \dim@a=\z@
- \setlength\dim@b{\eq@linewidth-\leftskip-\eq@wdMin}%
- \if F\eq@frame
- \else
- \setlength\dim@a{\eq@linewidth-\leftskip-\eq@wdT}
- \addtolength\dim@b{-\dim@a}%
- \fi
- % Or force the space for right number, if needed
- \if\@And{\eq@hasNumber}{\@Not{\eq@shiftnumber}}%
- \if R\eqnumside
- \dim@c=\eq@wdNum
- \if\dim@c>\dim@a
- \addtolength\dim@b{-\dim@c}%
- \dim@a=\dim@c
- \fi
- \fi
- \fi
- \setlength\rightskip{\dim@a\@plus\dim@b \@minus\hfuzz }%\hfuzz\z@
- \parfillskip\z@skip
-}
-\def\eq@typeset@leftnumber{%
- \setlength\skip@c{\dim@a-\ht\EQ@numbox}%
- \vglue\skip@c% NON discardable
- \copy\EQ@numbox \penalty\@M
- \kern-\dim@a
-}
-\def\eq@typeset@rightnumber{%
- \setlength\skip@c{\dim@a-\ht\EQ@numbox}%
- \vglue\skip@c% NON discardable
- \hbox to \hsize{\hfil\copy\EQ@numbox}\penalty\@M
- \kern-\dim@a
-}
-\def\eq@typeset@equation{%
- \nobreak
- \eq@params\eq@parshape
- \nointerlineskip\noindent
- \add@grp@label
- \eq@dump@box\unhbox\EQ@box\@@par
-}
-\newcommand\eqframe[2]{%
- \begingroup
- \fboxrule=\eq@framewd\relax\fboxsep=\eq@framesep\relax
- \framebox{\z@rule\@height#2\kern#1}%
- \endgroup
-}
-\def\eq@addframe{%
- \hbox to\z@{%
- \setlength\dim@a{\eq@framesep+\eq@framewd}%
- \kern-\dim@a
- \vbox to\z@{\kern-\dim@a
- \hbox{\eqframe{\eq@wdT}{\eq@vspan}}%
- \vss
- }%
- \hss
- }%
-}
-\def\eq@typeset@frame{%
- \if F\eq@frame\else
- % Tricky: put before \noindent, so it's not affected by glue in \leftskip
- \nobreak\nointerlineskip
- \vbox to\eq@firstht{\moveright\leftskip\hbox to\z@{\eq@addframe\hss}\vss}%
- \kern-\eq@firstht
- \fi
-}
-\@saveprimitive\left\@@left
-\@saveprimitive\right\@@right
-\newcount\lr@level
-\ExplSyntaxOn
-\def\eq@left{%
- \@ifnext .{\eq@nullleft}{\begingroup \let\math_delimiter:NNnNn \eq@left@a}%
-}
-\def\eq@right{%
- \@ifnext .{\eq@nullright}{\begingroup \let \math_delimiter:NNnNn \eq@right@a}%
-}
-\def\eq@left@a#1#2#3#4#5#6{\endgroup
- \@@left \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@open}
-\def\eq@right@a#1#2#3#4#5#6{\endgroup
- \@@right \math_delimiter:NNnNn #1#2{#3}#4{#5}\after@close \ss@scan{#1#2{#3}#4{#5}}%
-}
-\ExplSyntaxOff
-\def\eq@nullleft#1{\@@left#1\after@open}
-\def\eq@nullright#1{\@@right#1\after@close}
-\def\delim@reset{%
- \let\after@open\relax \let\after@close\relax
- \let\left\@@left \let\right\@@right
-}
-\@ifundefined{bBigg@}{% not defined
- \let\big@size\p@
- \def\big{\bBigg@{8.5}}\def\Big{\bBigg@{11.5}}%
- \def\bigg{\bBigg@{14.5}}\def\Bigg{\bBigg@{17.5}}%
- \def\biggg{\bBigg@{20.5}}\def\Biggg{\bBigg@{23.5}}%
-}{}
-\def\bBigg@#1#2{%
- {\delim@reset
- \left#2%
- \vrule\@height#1\big@size\@width-\nulldelimiterspace
- \right.
- }%
-}
-\def\bigl#1{\mathopen\big{#1}\after@open}
-\def\Bigl#1{\mathopen\Big{#1}\after@open}
-\def\biggl#1{\mathopen\bigg{#1}\after@open}
-\def\Biggl#1{\mathopen\Bigg{#1}\after@open}
-\def\bigggl#1{\mathopen\biggg{#1}\after@open}
-\def\Bigggl#1{\mathopen\Biggg{#1}\after@open}
-
-\def\bigr#1{\mathclose\big{#1}\after@close}
-\def\Bigr#1{\mathclose\Big{#1}\after@close}
-\def\biggr#1{\mathclose\bigg{#1}\after@close}
-\def\Biggr#1{\mathclose\Bigg{#1}\after@close}
-\def\bigggr#1{\mathclose\biggg{#1}\after@close}
-\def\Bigggr#1{\mathclose\Biggg{#1}\after@close}
-
-%% No change needed, I think. [mjd,1998/12/04]
-%%\def\bigm{\mathrel\big}
-%%\def\Bigm{\mathrel\Big}
-%%\def\biggm{\mathrel\bigg}
-%%\def\Biggm{\mathrel\Bigg}
-%%\def\bigggm{\mathrel\biggg}
-%%\def\Bigggm{\mathrel\Biggg}
-\ExplSyntaxOn
-\cs_set:Npn \math_dsym_DeL:Nn #1#2{\math_bsym_DeL:Nn #1{#2}\after@open}
-\cs_set:Npn \math_dsym_DeR:Nn #1#2{\math_bsym_DeR:Nn #1{#2}\after@close}
-\cs_set:Npn \math_dsym_DeB:Nn #1#2{\math_bsym_DeB:Nn #1{#2}\after@bidir}
-
-%%%%%
-%%%%%\let\m@@DeL\m@DeL \let\m@@DeR\m@DeR \let\m@@DeB\m@DeB
-%%%%%\def\d@@DeL#1#2#3{%
-%%%%% \delimiter"4\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@open
-%%%%%}
-%%%%%\def\d@@DeR#1#2#3{%
-%%%%% \delimiter"5\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@close
-%%%%%}
-%%%%%\def\d@@DeB#1#2#3{%
-%%%%% \delimiter"0\@xp\delim@a\csname sd@#1#2#3\endcsname #1#2#3 \after@bidir
-%%%%%}
-%%BRM: These weren't defined, but apparently should be.
-%%%%%%\let\m@@DeA\m@DeA\let\d@@DeA\m@DeA%
-\let\after@bidir\@empty
-\mathchardef\zero@bop=888 \relax
-\mathchardef\bop@incr=4444 \relax
-\def\after@open{%
- \global\advance\lr@level\@ne
- \prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
- \advance\prebinoppenalty\zero@bop
- \ifnum\eqbreakdepth<\lr@level
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn %%%%%%\let\m@Bin\m@@Bin
- \else
- \eq@binoffset=\eqbinoffset
- \advance\eq@binoffset\lr@level\eqdelimoffset plus1fill\relax
- \def\dt@fill@cancel{\hskip\z@ minus1fill\relax}%
- \fi
- \penalty\@M % BRM: discourage break after an open fence?
-}
-\def\after@close{%
- \global\advance\lr@level\m@ne
- \prebinoppenalty\bop@incr \multiply\prebinoppenalty\lr@level
- \advance\prebinoppenalty\zero@bop
- \ifnum\eqbreakdepth<\lr@level
- \else \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn %%%%%%\let\m@Bin\d@@Bin
- \fi
- \ifnum\lr@level<\@ne \eq@binoffset=\eqbinoffset\relax \fi
-}
-
-\ExplSyntaxOff
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\let\subsup@flag=\count@
-\def\ss@delim@a@new#1#2#3#4#5{\xdef\right@delim@code{\number"#4#5}}
-\def\ss@scan#1{%
- \begingroup
- \ss@delim@a@new #1%
- \endgroup
- \subsup@flag\@M \afterassignment\ss@scan@a \let\@let@token=}
-\def\ss@scan@a{%
- \let\breqn@next\ss@scan@b
- \ifx\@let@token\sb \advance\subsup@flag\@ne\else
- \ifx\@let@token\@@subscript \advance\subsup@flag\@ne\else
- \ifx\@let@token\@@subscript@other \advance\subsup@flag\@ne\else
- \ifx\@let@token\sp \advance\subsup@flag\tw@\else
- \ifx\@let@token\@@superscript \advance\subsup@flag\tw@\else
- \ifx\@let@token\@@superscript@other \advance\subsup@flag\tw@\else
- \ss@finish
- \let\breqn@next\relax
- \fi\fi\fi\fi\fi\fi
- \breqn@next\@let@token
-}
-\ExplSyntaxOn
-\def\ss@scan@b#1#2{#1{%
- %%%%%\let\m@Bin\m@@Bin \let\m@Rel\m@@Rel
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
- #2}\afterassignment\ss@scan@a \let\@let@token=}%
-\ExplSyntaxOff
-\def\ss@finish{%
- \@@vadjust{\penalty\thr@@}%
- \penalty\right@delim@code \penalty-\subsup@flag \keep@glue
-}
-\def\eq@lrunpack{\setbox\z@\lastbox
- \unskip \nointerlineskip
- \noindent\unhbox\z@ \unskip
- \subsup@flag-\lastpenalty \unpenalty
- \xdef\right@delim@code{\number\lastpenalty}%
- \unpenalty
- \ifnum\subsup@flag>\@M
- \advance\subsup@flag-\@M
- \setbox\tw@\lastbox
- \else \setbox\tw@\box\voidb@x
- \fi
- \setbox\z@\lastbox
- \ifvoid\tw@ \unhbox\z@
- \else \lrss@reattach % uses \subsup@flag, box\z@, box\tw@
- \fi
- \penalty-\@Mi\z@rule\@@par
- \setbox\z@\lastbox \unskip\unpenalty
-%%{\showboxbreadth\maxdimen\showboxdepth99\showlists}%
-}
-\dimendef\sub@depth=8 \dimendef\sup@base=6
-\dimendef\prelim@sub@depth=4 \dimendef\prelim@sup@base=2
-\def\sym@xheight{\fontdimen5\textfont\tw@}
-\def\sup@base@one{\fontdimen13\textfont\tw@}
-\def\sub@base@one{\fontdimen16\textfont\tw@}
-\def\sub@base@two{\fontdimen17\textfont\tw@}
-\def\sup@drop{\fontdimen18\scriptfont\tw@}
-\def\sub@drop{\fontdimen19\scriptfont\tw@}
-\providecommand{\mathaxis}{\fontdimen22\textfont\tw@}
-\def\lrss@reattach{%
- \begingroup
- % "The TeXbook" Appendix G step 18:
- \setlength\prelim@sup@base{\ht\z@-\sup@drop}%
- \setlength\prelim@sub@depth{\dp\z@ +\sub@drop}%
- \unhbox\z@
- \ifcase\subsup@flag % case 0: this can't happen
- \or \lr@subscript % case 1: subscript only
- \or \lr@superscript % case 2: superscript only
- \else \lr@subsup % case 3: sub and superscript both
- \fi
- \endgroup
-}
-\def\lr@subscript{%
- \sub@depth\sub@base@one
- \ifdim\prelim@sub@depth>\sub@depth \sub@depth\prelim@sub@depth\fi
- \setlength\dim@a{\ht\tw@ -.8\sym@xheight}%
- \ifdim\dim@a>\sub@depth \sub@depth=\dim@a \fi
- \twang@adjust\sub@depth
- \lower\sub@depth\box\tw@
-}
-\def\lr@superscript{%
- \sup@base\sup@base@one
- \ifdim\prelim@sup@base>\sup@base \sup@base\prelim@sup@base\fi
- \setlength\dim@a{\dp\tw@ -.25\sym@xheight}%
- \ifdim\dim@a>\sup@base \sup@base\dim@a \fi
- \twang@adjust\sup@base
- \raise\sup@base\box\tw@
-}
-\def\lr@subsup{%
- \sub@depth\sub@base@two
- \ifdim\prelim@sub@depth>\sub@depth \sub@depth\prelim@sub@depth \fi
- \twang@adjust\sub@depth
- \lower\sub@depth\box\tw@
-}
-\def\twang@adjust#1{%
- \begingroup
- \@ifundefined{twang@\right@delim@code}{}{%
- \setlength\dim@d{#1-\mathaxis}%
- % put an upper limit on the adjustment
- \ifdim\dim@d>1em \dim@d 1em \fi
- \kern\csname twang@\right@delim@code\endcsname\dim@d
- }%
- \endgroup
-}
-\newcommand{\DeclareTwang}[2]{%
- \ifcat.\@nx#1\begingroup
- \lccode`\~=`#1\lowercase{\endgroup \DeclareTwang{~}}{#2}%
- \else
- \@xp\decl@twang#1?\@nil{#2}%
- \fi
-}
-\def\decl@twang#1#2#3#4#5#6#7\@nil#8{%
- \@namedef{twang@\number"#4#5#6}{#8}%
-}
-\DeclareTwang{\rangle}{-.4}
-\DeclareTwang{)}{-.33}
-\DeclareTwang{\rbrace}{-.25}
-\newenvironment{dseries}{\let\eq@hasNumber\@True \@optarg\@dseries{}}{}%
-\def\enddseries#1{\check@punct@or@qed}%
-\newenvironment{dseries*}{\let\eq@hasNumber\@False \@optarg\@dseries{}}{}%
-\@namedef{enddseries*}#1{\check@punct@or@qed}%
-\@namedef{end@dseries*}{\end@dseries}%
-\def\@dseries[#1]{%
- \let\display@setup\dseries@display@setup
- % Question: should this be the default for dseries???
- \global\eq@wdCond\z@
- \@dmath[layout={M},#1]%
- \mathsurround\z@\@@math \penalty\@Mi
- \let\endmath\ends@math
- \def\premath{%
- \ifdim\lastskip<.3em \unskip
- \else\ifnum\lastpenalty<\@M \dquad\fi\fi
-}%
- \def\postmath{\unpenalty\eq@addpunct \penalty\intermath@penalty \dquad \@ignoretrue}%
-\ignorespaces
-}
-\def\end@dseries{%
- \unskip\unpenalty
- \@@endmath \mathsurround\z@ \end@dmath
-}
-\def\eq@try@layout@M{%
- \edef\@parshape{\parshape 1 0pt \the\eq@linewidth\relax}%
- \eq@trial@b{M}{}%
-}
-\def\intermath@penalty{-221}%
-\newcommand\dquad{\hskip0.6em minus.3em}
-\newcommand\premath{}\newcommand\postmath{}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\renewenvironment{math}{%
- \leavevmode \premath
- \ifmmode\@badmath\else\@@math\fi
-}{%
- \ifmmode\@@endmath\else\@badmath\fi
-}
-\def\ends@math#1{\check@punct@or@qed}
-\def\end@math{%
- \ifmmode\@@endmath\else\@badmath\fi
- \postmath
-}
-\let\eq@group\@False
-\let\grp@shiftnumber\@False
-\let\grp@hasNumber\@False
-\let\grp@eqs@numbered\@False
-\let\grp@aligned\@True
-\newenvironment{dgroup}{%
- \let\grp@hasNumber\@True\@optarg\@dgroup{}%
-}{%
- \end@dgroup
-}
-\newtoks\GRP@queue
-\newenvironment{dgroup*}{%
- \let\grp@hasNumber\@False\@optarg\@dgroup{}%
-}{%
- \end@dgroup
-}
-\def\@dgroup[#1]{%
- \let\eq@group\@True \global\let\eq@GRP@first@dmath\@True
- \global\GRP@queue\@emptytoks \global\setbox\GRP@box\box\voidb@x
- \global\let\GRP@label\@empty
- \global\grp@wdL\z@\global\grp@wdR\z@\global\grp@wdT\z@
- \global\grp@linewidth\z@\global\grp@wdNum\z@
- \global\let\grp@eqs@numbered\@False
- \global\let\grp@aligned\@True
- \global\let\grp@shiftnumber\@False
- \eq@prelim
- \setkeys{breqn}{#1}%
- \if\grp@hasNumber \grp@setnumber \fi
-}
-\def\end@dgroup{%
- \EQ@displayinfo \grp@finish
- \if\grp@hasNumber\grp@resetnumber\fi
-}
-\@ifundefined{c@parentequation}{\newcounter{parentequation}}{}
-\global\let\GRP@label\@empty
-\def\add@grp@label{%
- \ifx\@empty\GRP@label
- \else \GRP@label \global\let\GRP@label\@empty
- \fi
-}
-\def\grp@setnumber{%
- \global\let\GRP@label\next@label \global\let\next@label\@empty
- % Trick \eq@setnumber to doing our work for us.
- \let\eq@hasNumber\@True
- \eq@setnumber
- \global\sbox\GRP@numbox{\unhbox\EQ@numbox}%
- \grp@wdNum\eq@wdNum
- \let\eq@hasNumber\@False
- \let\eq@number\@empty
- \eq@wdNum\z@
- \protected@edef\theparentequation{\theequation}%
- \setcounter{parentequation}{\value{equation}}%
- \setcounter{equation}{0}%
- \def\theequation{\theparentequation\alph{equation}}%
-}
-\def\grp@resetnumber{%
- \setcounter{equation}{\value{parentequation}}%
-}
-\newbox\GRP@box
-\newbox\GRP@wholebox
-\def\grp@push{%
- \global\GRP@queue\@xp\@xp\@xp{\@xp\the\@xp\GRP@queue
- \@xp\@elt\@xp{\EQ@trial}%
- }%
- \global\setbox\GRP@box\vbox{%
- \hbox{\box\EQ@box\box\EQ@copy\penalty\@ne\copy\EQ@numbox}%
- \unvbox\GRP@box
- }%
- \EQ@trial
- \if\eq@isIntertext\else
- \ifdim\eq@wdL>\grp@wdL \global\grp@wdL\eq@wdL \fi
- \ifdim\eq@wdT>\grp@wdT \global\grp@wdT\eq@wdT \fi
- \setlength\dim@a{\eq@wdT-\eq@wdL}%
- \ifdim\dim@a>\grp@wdR \global\grp@wdR\dim@a \fi
- \ifdim\eq@linewidth>\grp@linewidth \global\grp@linewidth\eq@linewidth\fi
- \if\eq@hasNumber
- \global\let\grp@eqs@numbered\@True
- \ifdim\eq@wdNum>\grp@wdNum\global\grp@wdNum\eq@wdNum\fi
- \fi
- \if\EQ@hasLHS\else\global\let\grp@aligned\@False\fi
- \if D\eq@layout \global\let\grp@aligned\@False\fi % Layout D (usually) puts rel on 2nd line.
- \if\eq@shiftnumber\global\let\grp@shiftnumber\@True\fi % One eq shifted forces all.
- \fi
-}
-\def\grp@finish{%
- \setlength\dim@a{\grp@wdL+\grp@wdR-4em}% Allowance for shrink?
- \if\grp@aligned
- \ifdim\dim@a>\grp@linewidth
- \global\let\grp@aligned\@False
- \fi
- \fi
- \addtolength\dim@a{\grp@wdNum }% Effective length
- \if\grp@shiftnumber
- \else
- \if\@And{\grp@hasNumber}{\@Not\grp@eqs@numbered}
- \ifdim\dim@a>\grp@linewidth
- \global\let\grp@shiftnumber\@True
- \fi
- \fi
- \fi
- \if\grp@aligned
- \global\grp@wdT\grp@wdL
- \global\advance\grp@wdT\grp@wdR
- \fi
- \setbox\GRP@wholebox\vbox{%
- \let\@elt\eqgrp@elt
- \the\GRP@queue
- }%
- \global\let\eq@GRP@first@dmath\@True
- \begingroup
- \dmath@first@leftskip
- \eq@topspace{\vskip\parskip}%
- \endgroup
- \if\@And{\grp@hasNumber}{\@Not{\grp@eqs@numbered}}%
- \if\grp@shiftnumber
- \copy\GRP@numbox \penalty\@M
- \kern\eqlineskip
- \else
- \setlength\dim@a{%
- (\ht\GRP@wholebox+\dp\GRP@wholebox+\ht\GRP@numbox-\dp\GRP@numbox)/2}%
- \setlength\skip@c{\dim@a-\ht\GRP@numbox}%
- \vglue\skip@c% NON discardable
- \copy\GRP@numbox \penalty\@M
- \kern-\dim@a
- \kern-\abovedisplayskip % To cancel the topspace above the first eqn.
- \fi
- \fi
- \unvbox\GRP@wholebox
- \let\@elt\relax
- \eq@botspace % not needed unless bottom number?
-}
-\def\eqgrp@elt#1{%
- \global\setbox\GRP@box\vbox{%
- \unvbox\GRP@box
- \setbox\z@\lastbox
- \setbox\tw@\hbox{\unhbox\z@
- \ifnum\lastpenalty=\@ne
- \else
- \global\setbox\EQ@numbox\lastbox
- \fi
- \unpenalty
- \global\setbox\EQ@copy\lastbox
- \global\setbox\EQ@box\lastbox
- }%
- }%
- \begingroup \let\eq@botspace\relax
- #1%
- \if\eq@isIntertext
- \vskip\belowdisplayskip
- \unvbox\EQ@copy
- \else
- \grp@override
- \eq@finish
- \fi
- \endgroup
-}
-\def\grp@override{%
- \def\eqindent{I}%
- \setlength\dim@a{(\grp@linewidth-\grp@wdT)/2}%
- \ifdim\dim@a<\z@\dim@a=\z@\fi
- \dim@b\if L\eqnumside\grp@wdNum\else\z@\fi
- \if\grp@shiftnumber\else
- \ifdim\dim@b>\dim@a\dim@a\dim@b\fi
- \fi
- \if\grp@aligned
- \addtolength\dim@a{\grp@wdL-\eq@wdL}%
- \fi
- \mathindent\dim@a
- \ifdim\dim@b>\dim@a
- \let\eq@shiftnumber\@True
- \fi
-}
-\newskip\darraycolsep \darraycolsep 20pt plus1fil minus12pt
-\newcount\cur@row \newcount\cur@col
-\def\@tempa#1#2#3{%
- \cur@col#1 \hfil
- \setbox\z@\hbox{$\displaystyle####\m@th$}\@nx\col@box
- \tabskip\z@skip
- &\cur@col#2 \hfil
- \setbox\z@\hbox{$\displaystyle\mathord{}####\mathord{}\m@th$}\@nx\col@box
- \hfil
- &\cur@col#3 \setbox\z@\hbox{$\displaystyle####\m@th$}\@nx\col@box
- \hfil\tabskip\darraycolsep
-}
-\xdef\darray@preamble{%
- \@tempa 123&\@tempa 456&\@tempa 789%
- &\@tempa{10}{11}{12}&\@tempa{13}{14}{15}&\@tempa{16}{17}{18}%
- \cr
-}
-\@ifundefined{Mathstrut@}{\let\Mathstrut@\strut}{}
-\def\darray@cr{\Mathstrut@\cr}
-\def\col@box{%
- \unhbox\z@
-}
-\newenvironment{darray}{\@optarg\@darray{}}{}
-\def\@darray[#1]{%
- \if\eq@group\else\eq@prelim\fi
- \global\let\@preamble\@empty
- \setkeys{breqn}{#1}%
- \the\eqstyle \eq@setnumber
- \ifx\@preamble\@empty \global\let\@preamble\darray@preamble \fi
- \check@mathfonts
- % \let\check@mathfonts\relax % tempting, but too risky
- \@xp\let\csname\string\ \endcsname\darray@cr
- \setbox\z@\vbox\bgroup
- \everycr{\noalign{\global\advance\cur@row\@ne}}%
- \tabskip\z@skip \cur@col\z@
- \global\cur@row\z@
- \penalty\@ne % flag for \dar@repack
- \halign\@xp\bgroup\@preamble
-}
-\def\enddarray#1{\check@punct@or@qed}
-\def\end@darray{%
- \ifvmode\else \eq@addpunct \Mathstrut@\fi\crcr \egroup
- \dar@capture
- \egroup
-}
-\def\dar@capture{%
-%% \showboxbreadth\maxdimen\showboxdepth99\showlists
- \eq@wdL\z@ \eq@wdRmax\z@
- \dar@repack
-}
-\def\dar@repack{%
- \unpenalty
- \setbox\tw@\lastbox
- \global\setbox\EQ@box\hbox{%
- \hbox{\unhcopy\tw@\unskip}\penalty-\@M \unhbox\EQ@box}%
- \global\setbox\EQ@copy\hbox{%
- \hbox{\unhbox\tw@\unskip}\penalty-\@M \unhbox\EQ@copy}%
- \unskip
- \ifcase\lastpenalty \else\@xp\@gobble\fi
- \dar@repack
-}
-\newskip\conditionsep \conditionsep=10pt minus5pt%
-\newcommand{\conditionpunct}{,}
-\newcommand\condition{%
- \begingroup\@tempswatrue
- \@ifstar{\@tempswafalse \condition@a}{\condition@a}}
-\newcommand\condition@a[2][\conditionpunct]{%
- \unpenalty\unskip\unpenalty\unskip % BRM Added
- \hbox{#1}%
- \penalty -201\relax\hbox{}% Penalty to allow breaks here.
- \hskip\conditionsep
- \setbox\z@\if@tempswa\hbox{#2}\else\hbox{$\textmath@setup #2$}\fi
- \usebox\z@
- \endgroup}
-\newenvironment{XXXXdsuspend}{%
- \global\setbox\EQ@box\vbox\bgroup \@parboxrestore
- \parshape 1 \displayindent \displaywidth\relax
- \hsize=\columnwidth \noindent\ignorespaces
-}{%
- \par\egroup
- \global\setbox\GRP@box\vbox{%
- \vbox{\copy\EQ@box\vtop{\unvbox\EQ@box}}%
- \unvbox\GRP@box
- }%
- \global\GRP@queue\@xp{\the\GRP@queue
- \@elt{\gdef\EQ@trial{}}%
- }%
-}
-\newenvironment{dsuspend}{%
- \global\setbox\EQ@box\vbox\bgroup \@parboxrestore
- \parshape 1 \displayindent \displaywidth\relax
- \hsize=\columnwidth \noindent\ignorespaces
-}{%
- \par\egroup
- \global\setbox\GRP@box\vbox{%
- \hbox{\copy\EQ@box\vtop{\unvbox\EQ@box}}%
- \unvbox\GRP@box
- }%
- \global\GRP@queue\@xp{\the\GRP@queue
- \@elt{\let\eq@isIntertext\@True}%
- }%
-}
-\newcommand\breqn@intertext[1]{\dsuspend#1\enddsuspend}
-\renewcommand{\*}{%
- \if@display
- \setbox\z@\hbox{\mathsurround\z@$\mkern\eq@binoffset$}%
- \discretionary{}{%
- \kern\the\wd\z@ \textchar\discretionarytimes
- }{}%
- \thinspace
- \else
- \discretionary{\thinspace\textchar\discretionarytimes}{}{}%
- \fi
-}
-\newcommand{\discretionarytimes}{\times}
-\def\nref#1{\@xp\@nref\csname r@#1\endcsname}
-\def\@nref#1#2{\ifx\relax#1??\else \@xp\@firstoftwo#1\fi}
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\endinput
-%%
-%% End of file `breqn.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/cmbase.sym b/Master/texmf-dist/tex/latex/mh/cmbase.sym
deleted file mode 100644
index 14904e3b029..00000000000
--- a/Master/texmf-dist/tex/latex/mh/cmbase.sym
+++ /dev/null
@@ -1,371 +0,0 @@
-%%
-%% This is file `cmbase.sym',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% flexisym.dtx (with options: `cmbase')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file flexisym.dtx
-%% and the derived files
-%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%%
-\ProvidesSymbols{cmbase}[2007/12/19 v0.92]
-\ExplSyntaxOn
-\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
-\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
-\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
-\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
-\cs_gset:Npx\mg@bin{\mg@OMS}
-\cs_gset:Npx\mg@del{\mg@OMX}
-\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
-\cs_gset:Npn\mg@latin{\mg@OML}
-\cs_gset_eq:NN\mg@Latin\mg@latin
-\cs_gset_eq:NN\mg@greek\mg@latin
-\cs_gset_eq:NN\mg@Greek\mg@digit
-\cs_gset_eq:NN\mg@rel\mg@bin
-\cs_gset_eq:NN\mg@ord\mg@bin
-\cs_gset_eq:NN\mg@cop\mg@del
-\DeclareFlexSymbol{!} {Pun}{OT1}{21}
-\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
-\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
-\DeclareFlexSymbol{\colon}{Pun}{OT1}{3A}
-\DeclareFlexSymbol{;} {Pun}{OT1}{3B}
-\DeclareFlexSymbol{=} {Rel}{OT1}{3D}
-\DeclareFlexSymbol{?} {Pun}{OT1}{3F}
-\DeclareFlexSymbol{\Gamma} {Var}{Greek}{00}
-\DeclareFlexSymbol{\Delta} {Var}{Greek}{01}
-\DeclareFlexSymbol{\Theta} {Var}{Greek}{02}
-\DeclareFlexSymbol{\Lambda} {Var}{Greek}{03}
-\DeclareFlexSymbol{\Xi} {Var}{Greek}{04}
-\DeclareFlexSymbol{\Pi} {Var}{Greek}{05}
-\DeclareFlexSymbol{\Sigma} {Var}{Greek}{06}
-\DeclareFlexSymbol{\Upsilon}{Var}{Greek}{07}
-\DeclareFlexSymbol{\Phi} {Var}{Greek}{08}
-\DeclareFlexSymbol{\Psi} {Var}{Greek}{09}
-\DeclareFlexSymbol{\Omega} {Var}{Greek}{0A}
-\DeclareFlexSymbol{0}{Var}{digit}{30}
-\DeclareFlexSymbol{1}{Var}{digit}{31}
-\DeclareFlexSymbol{2}{Var}{digit}{32}
-\DeclareFlexSymbol{3}{Var}{digit}{33}
-\DeclareFlexSymbol{4}{Var}{digit}{34}
-\DeclareFlexSymbol{5}{Var}{digit}{35}
-\DeclareFlexSymbol{6}{Var}{digit}{36}
-\DeclareFlexSymbol{7}{Var}{digit}{37}
-\DeclareFlexSymbol{8}{Var}{digit}{38}
-\DeclareFlexSymbol{9}{Var}{digit}{39}
-\DeclareFlexSymbol{,}{Pun}{OML}{3B}
-\DeclareFlexSymbol{.}{Ord}{OML}{3A}
-\DeclareFlexSymbol{/}{Ord}{OML}{3D}
-\DeclareFlexSymbol{<}{Rel}{OML}{3C}
-\DeclareFlexSymbol{>}{Rel}{OML}{3E}
-\DeclareFlexSymbol{\alpha}{Var}{greek}{0B}
-\DeclareFlexSymbol{\beta}{Var}{greek}{0C}
-\DeclareFlexSymbol{\gamma}{Var}{greek}{0D}
-\DeclareFlexSymbol{\delta}{Var}{greek}{0E}
-\DeclareFlexSymbol{\epsilon}{Var}{greek}{0F}
-\DeclareFlexSymbol{\zeta}{Var}{greek}{10}
-\DeclareFlexSymbol{\eta}{Var}{greek}{11}
-\DeclareFlexSymbol{\theta}{Var}{greek}{12}
-\DeclareFlexSymbol{\iota}{Var}{greek}{13}
-\DeclareFlexSymbol{\kappa}{Var}{greek}{14}
-\DeclareFlexSymbol{\lambda}{Var}{greek}{15}
-\DeclareFlexSymbol{\mu}{Var}{greek}{16}
-\DeclareFlexSymbol{\nu}{Var}{greek}{17}
-\DeclareFlexSymbol{\xi}{Var}{greek}{18}
-\DeclareFlexSymbol{\pi}{Var}{greek}{19}
-\DeclareFlexSymbol{\rho}{Var}{greek}{1A}
-\DeclareFlexSymbol{\sigma}{Var}{greek}{1B}
-\DeclareFlexSymbol{\tau}{Var}{greek}{1C}
-\DeclareFlexSymbol{\upsilon}{Var}{greek}{1D}
-\DeclareFlexSymbol{\phi}{Var}{greek}{1E}
-\DeclareFlexSymbol{\chi}{Var}{greek}{1F}
-\DeclareFlexSymbol{\psi}{Var}{greek}{20}
-\DeclareFlexSymbol{\omega}{Var}{greek}{21}
-\DeclareFlexSymbol{\varepsilon}{Var}{greek}{22}
-\DeclareFlexSymbol{\vartheta}{Var}{greek}{23}
-\DeclareFlexSymbol{\varpi}{Var}{greek}{24}
-\DeclareFlexSymbol{\varrho}{Var}{greek}{25}
-\DeclareFlexSymbol{\varsigma}{Var}{greek}{26}
-\DeclareFlexSymbol{\varphi}{Var}{greek}{27}
-\DeclareFlexSymbol{\imath}{Var}{OML}{7B}
-\DeclareFlexSymbol{\jmath}{Var}{OML}{7C}
-\DeclareFlexSymbol{\ell}{Ord}{OML}{60}
-\DeclareFlexSymbol{\wp}{Ord}{OML}{7D}
-\DeclareFlexSymbol{\partial}{Ord}{OML}{40}
-\DeclareFlexSymbol{\flat}{Ord}{OML}{5B}
-\DeclareFlexSymbol{\natural}{Ord}{OML}{5C}
-\DeclareFlexSymbol{\sharp}{Ord}{OML}{5D}
-\DeclareFlexSymbol{\triangleleft}{Bin}{OML}{2F}
-\DeclareFlexSymbol{\triangleright}{Bin}{OML}{2E}
-\DeclareFlexSymbol{\star}{Bin}{OML}{3F}
-\DeclareFlexSymbol{\smile}{Rel}{OML}{5E}
-\DeclareFlexSymbol{\frown}{Rel}{OML}{5F}
-\DeclareFlexSymbol{\leftharpoonup}{Rel}{OML}{28}
-\DeclareFlexSymbol{\leftharpoondown}{Rel}{OML}{29}
-\DeclareFlexSymbol{\rightharpoonup}{Rel}{OML}{2A}
-\DeclareFlexSymbol{\rightharpoondown}{Rel}{OML}{2B}
-\DeclareFlexSymbol{a}{Var}{latin}{61}
-\DeclareFlexSymbol{b}{Var}{latin}{62}
-\DeclareFlexSymbol{c}{Var}{latin}{63}
-\DeclareFlexSymbol{d}{Var}{latin}{64}
-\DeclareFlexSymbol{e}{Var}{latin}{65}
-\DeclareFlexSymbol{f}{Var}{latin}{66}
-\DeclareFlexSymbol{g}{Var}{latin}{67}
-\DeclareFlexSymbol{h}{Var}{latin}{68}
-\DeclareFlexSymbol{i}{Var}{latin}{69}
-\DeclareFlexSymbol{j}{Var}{latin}{6A}
-\DeclareFlexSymbol{k}{Var}{latin}{6B}
-\DeclareFlexSymbol{l}{Var}{latin}{6C}
-\DeclareFlexSymbol{m}{Var}{latin}{6D}
-\DeclareFlexSymbol{n}{Var}{latin}{6E}
-\DeclareFlexSymbol{o}{Var}{latin}{6F}
-\DeclareFlexSymbol{p}{Var}{latin}{70}
-\DeclareFlexSymbol{q}{Var}{latin}{71}
-\DeclareFlexSymbol{r}{Var}{latin}{72}
-\DeclareFlexSymbol{s}{Var}{latin}{73}
-\DeclareFlexSymbol{t}{Var}{latin}{74}
-\DeclareFlexSymbol{u}{Var}{latin}{75}
-\DeclareFlexSymbol{v}{Var}{latin}{76}
-\DeclareFlexSymbol{w}{Var}{latin}{77}
-\DeclareFlexSymbol{x}{Var}{latin}{78}
-\DeclareFlexSymbol{y}{Var}{latin}{79}
-\DeclareFlexSymbol{z}{Var}{latin}{7A}
-\DeclareFlexSymbol{A}{Var}{Latin}{41}
-\DeclareFlexSymbol{B}{Var}{Latin}{42}
-\DeclareFlexSymbol{C}{Var}{Latin}{43}
-\DeclareFlexSymbol{D}{Var}{Latin}{44}
-\DeclareFlexSymbol{E}{Var}{Latin}{45}
-\DeclareFlexSymbol{F}{Var}{Latin}{46}
-\DeclareFlexSymbol{G}{Var}{Latin}{47}
-\DeclareFlexSymbol{H}{Var}{Latin}{48}
-\DeclareFlexSymbol{I}{Var}{Latin}{49}
-\DeclareFlexSymbol{J}{Var}{Latin}{4A}
-\DeclareFlexSymbol{K}{Var}{Latin}{4B}
-\DeclareFlexSymbol{L}{Var}{Latin}{4C}
-\DeclareFlexSymbol{M}{Var}{Latin}{4D}
-\DeclareFlexSymbol{N}{Var}{Latin}{4E}
-\DeclareFlexSymbol{O}{Var}{Latin}{4F}
-\DeclareFlexSymbol{P}{Var}{Latin}{50}
-\DeclareFlexSymbol{Q}{Var}{Latin}{51}
-\DeclareFlexSymbol{R}{Var}{Latin}{52}
-\DeclareFlexSymbol{S}{Var}{Latin}{53}
-\DeclareFlexSymbol{T}{Var}{Latin}{54}
-\DeclareFlexSymbol{U}{Var}{Latin}{55}
-\DeclareFlexSymbol{V}{Var}{Latin}{56}
-\DeclareFlexSymbol{W}{Var}{Latin}{57}
-\DeclareFlexSymbol{X}{Var}{Latin}{58}
-\DeclareFlexSymbol{Y}{Var}{Latin}{59}
-\DeclareFlexSymbol{Z}{Var}{Latin}{5A}
-\DeclareFlexSymbol{\ldotPun}{Pun}{OML}{3A}
-\def\ldotp{\ldotPun}
-\DeclareFlexSymbol{\lhookRel}{Rel}{OML}{2C}
-\DeclareFlexSymbol{\rhookRel}{Rel}{OML}{2D}
-\DeclareFlexSymbol{*}{Bin}{bin}{03} % \ast
-\DeclareFlexSymbol{-}{Bin}{bin}{00}
-\DeclareFlexSymbol{|}{Ord}{OMS}{6A}
-\DeclareFlexSymbol{\aleph}{Ord}{ord}{40}
-\DeclareFlexSymbol{\Re}{Ord}{ord}{3C}
-\DeclareFlexSymbol{\Im}{Ord}{ord}{3D}
-\DeclareFlexSymbol{\infty}{Ord}{ord}{31}
-\DeclareFlexSymbol{\prime}{Ord}{ord}{30}
-\DeclareFlexSymbol{\emptyset}{Ord}{ord}{3B}
-\DeclareFlexSymbol{\nabla}{Ord}{ord}{72}
-\DeclareFlexSymbol{\top}{Ord}{ord}{3E}
-\DeclareFlexSymbol{\bot}{Ord}{ord}{3F}
-\DeclareFlexSymbol{\triangle}{Ord}{ord}{34}
-\DeclareFlexSymbol{\forall}{Ord}{ord}{38}
-\DeclareFlexSymbol{\exists}{Ord}{ord}{39}
-\DeclareFlexSymbol{\neg}{Ord}{ord}{3A}
-\DeclareFlexSymbol{\clubsuit}{Ord}{ord}{7C}
-\DeclareFlexSymbol{\diamondsuit}{Ord}{ord}{7D}
-\DeclareFlexSymbol{\heartsuit}{Ord}{ord}{7E}
-\DeclareFlexSymbol{\spadesuit}{Ord}{ord}{7F}
-\DeclareFlexSymbol{\smallint}{COs}{OMS}{73}
-\DeclareFlexSymbol{\bigtriangleup}{Bin}{bin}{34}
-\DeclareFlexSymbol{\bigtriangledown}{Bin}{bin}{35}
-\DeclareFlexSymbol{\wedge}{Bin}{bin}{5E}
-\DeclareFlexSymbol{\vee}{Bin}{bin}{5F}
-\DeclareFlexSymbol{\cap}{Bin}{bin}{5C}
-\DeclareFlexSymbol{\cup}{Bin}{bin}{5B}
-\DeclareFlexSymbol{\ddagger}{Bin}{bin}{7A}
-\DeclareFlexSymbol{\dagger}{Bin}{bin}{79}
-\DeclareFlexSymbol{\sqcap}{Bin}{bin}{75}
-\DeclareFlexSymbol{\sqcup}{Bin}{bin}{74}
-\DeclareFlexSymbol{\uplus}{Bin}{bin}{5D}
-\DeclareFlexSymbol{\amalg}{Bin}{bin}{71}
-\DeclareFlexSymbol{\diamond}{Bin}{bin}{05}
-\DeclareFlexSymbol{\bullet}{Bin}{bin}{0F}
-\DeclareFlexSymbol{\wr}{Bin}{bin}{6F}
-\DeclareFlexSymbol{\div}{Bin}{bin}{04}
-\DeclareFlexSymbol{\odot}{Bin}{bin}{0C}
-\DeclareFlexSymbol{\oslash}{Bin}{bin}{0B}
-\DeclareFlexSymbol{\otimes}{Bin}{bin}{0A}
-\DeclareFlexSymbol{\ominus}{Bin}{bin}{09}
-\DeclareFlexSymbol{\oplus}{Bin}{bin}{08}
-\DeclareFlexSymbol{\mp}{Bin}{bin}{07}
-\DeclareFlexSymbol{\pm}{Bin}{bin}{06}
-\DeclareFlexSymbol{\circ}{Bin}{bin}{0E}
-\DeclareFlexSymbol{\bigcirc}{Bin}{bin}{0D}
-\DeclareFlexSymbol{\setminus}{Bin}{bin}{6E}
-\DeclareFlexSymbol{\cdot}{Bin}{bin}{01}
-\DeclareFlexSymbol{\ast}{Bin}{bin}{03}
-\DeclareFlexSymbol{\times}{Bin}{bin}{02}
-\DeclareFlexSymbol{\propto}{Rel}{rel}{2F}
-\DeclareFlexSymbol{\sqsubseteq}{Rel}{rel}{76}
-\DeclareFlexSymbol{\sqsupseteq}{Rel}{rel}{77}
-\DeclareFlexSymbol{\parallel}{Rel}{rel}{6B}
-\DeclareFlexSymbol{\mid}{Rel}{rel}{6A}
-\DeclareFlexSymbol{\dashv}{Rel}{rel}{61}
-\DeclareFlexSymbol{\vdash}{Rel}{rel}{60}
-\DeclareFlexSymbol{\nearrow}{Rel}{rel}{25}
-\DeclareFlexSymbol{\searrow}{Rel}{rel}{26}
-\DeclareFlexSymbol{\nwarrow}{Rel}{rel}{2D}
-\DeclareFlexSymbol{\swarrow}{Rel}{rel}{2E}
-\DeclareFlexSymbol{\Leftrightarrow}{Rel}{rel}{2C}
-\DeclareFlexSymbol{\Leftarrow}{Rel}{rel}{28}
-\DeclareFlexSymbol{\Rightarrow}{Rel}{rel}{29}
-\DeclareFlexSymbol{\leq}{Rel}{rel}{14}
-\DeclareFlexSymbol{\geq}{Rel}{rel}{15}
-\DeclareFlexSymbol{\succ}{Rel}{rel}{1F}
-\DeclareFlexSymbol{\prec}{Rel}{rel}{1E}
-\DeclareFlexSymbol{\approx}{Rel}{rel}{19}
-\DeclareFlexSymbol{\succeq}{Rel}{rel}{17}
-\DeclareFlexSymbol{\preceq}{Rel}{rel}{16}
-\DeclareFlexSymbol{\supset}{Rel}{rel}{1B}
-\DeclareFlexSymbol{\subset}{Rel}{rel}{1A}
-\DeclareFlexSymbol{\supseteq}{Rel}{rel}{13}
-\DeclareFlexSymbol{\subseteq}{Rel}{rel}{12}
-\DeclareFlexSymbol{\in}{Rel}{rel}{32}
-\DeclareFlexSymbol{\ni}{Rel}{rel}{33}
-\DeclareFlexSymbol{\gg}{Rel}{rel}{1D}
-\DeclareFlexSymbol{\ll}{Rel}{rel}{1C}
-\DeclareFlexSymbol{\leftrightarrow}{Rel}{rel}{24}
-\DeclareFlexSymbol{\leftarrow}{Rel}{rel}{20}
-\DeclareFlexSymbol{\rightarrow}{Rel}{rel}{21}
-\DeclareFlexSymbol{\sim}{Rel}{rel}{18}
-\DeclareFlexSymbol{\simeq}{Rel}{rel}{27}
-\DeclareFlexSymbol{\perp}{Rel}{rel}{3F}
-\DeclareFlexSymbol{\equiv}{Rel}{rel}{11}
-\DeclareFlexSymbol{\asymp}{Rel}{rel}{10}
-\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
-\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
-\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
-\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
-\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
-\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
-\DeclareFlexSymbol{\biguplus}{COs}{cop}{55}
-\DeclareFlexSymbol{\bigcap}{COs}{cop}{54}
-\DeclareFlexSymbol{\bigcup}{COs}{cop}{53}
-\DeclareFlexSymbol{\int}{COi}{cop}{52}
-\DeclareFlexSymbol{\prod}{COs}{cop}{51}
-\DeclareFlexSymbol{\sum}{COs}{cop}{50}
-\DeclareFlexSymbol{\bigotimes}{COs}{cop}{4E}
-\DeclareFlexSymbol{\bigoplus}{COs}{cop}{4C}
-\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
-\DeclareFlexSymbol{\oint}{COi}{cop}{48}
-\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
-\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
-\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
-\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
-\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
-\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
-\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
-\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
-\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
-\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
-\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
-\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
-\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
-\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
-\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
-\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
-\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
-\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
-\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
-\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
-\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
-\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
-\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
-\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
-\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
-\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
-\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
-\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
-\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
-\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
-\DeclareFlexCompoundSymbol{\surd}{Ord}{\mathop{\surdOrd}}
-\DeclareFlexCompoundSymbol{\angle}{Ord}{%
- \vbox{\ialign{%
- $\m@th\scriptstyle##$\crcr
- \notRel\mathrel{\mkern14mu}\crcr
- \noalign{\nointerlineskip}%
- \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr
- }}%
-}
-\DeclareFlexCompoundSymbol{\neq}{Rel}{\not{=}}
-\DeclareFlexCompoundSymbol{\mapsto}{Rel}{\mapstoOrd\rightarrow}
-\DeclareFlexCompoundSymbol{\cong}{Rel}{\mathpalette\@vereq\sim}
-\providecommand*\joinord{}
-\renewcommand*\joinord{\mkern-3mu }
-\DeclareFlexCompoundSymbol{\notin}{Rel}{\mathpalette\c@ncel\in}
-\DeclareFlexCompoundSymbol{\rightleftharpoons}{Rel}{\mathpalette\rlh@{}}
-\DeclareFlexCompoundSymbol{\doteq}{Rel}{\buildrel\textstyle.\over=}
-\DeclareFlexCompoundSymbol{\hookrightarrow}{Rel}{\lhookRel\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\hookleftarrow}{Rel}{\leftarrow\joinord\rhookRel}
-\DeclareFlexCompoundSymbol{\bowtie}{Rel}{\triangleright\joinord\triangleleft}
-\DeclareFlexCompoundSymbol{\models}{Rel}{\vert\joinord=}
-\DeclareFlexCompoundSymbol{\Longrightarrow}{Rel}{\Relbar\joinord\Rightarrow}
-\DeclareFlexCompoundSymbol{\longrightarrow}{Rel}{\relbar\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftarrow}{Rel}{\Leftarrow\joinord\Relbar}
-\DeclareFlexCompoundSymbol{\longleftarrow}{Rel}{\leftarrow\joinord\relbar}
-\DeclareFlexCompoundSymbol{\longmapsto}{Rel}{\mapstochar\longrightarrow}
-\DeclareFlexCompoundSymbol{\longleftrightarrow}{Rel}{\leftarrow\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftrightarrow}{Rel}{\Leftarrow\joinord\Rightarrow}
-\renewcommand*\iff{%
- \mskip\thickmuskip\Longleftrightarrow\mskip\thickmuskip
-}
-\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}%
-\DeclareFlexCompoundSymbol{\vdots}{Ord}{%
- \vbox{\baselineskip4\p@ \lineskiplimit\z@
- \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
-\DeclareFlexCompoundSymbol{\ddots}{Inn}{%
- \mkern1mu\raise7\p@
- \vbox{\kern7\p@\hbox{.}}\mkern2mu%
- \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu%
-}
-\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
- \mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
-\def\Relbar{\mathchar"3D }
-\ExplSyntaxOff
-\endinput
-%%
-%% End of file `cmbase.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/empheq.sty b/Master/texmf-dist/tex/latex/mh/empheq.sty
deleted file mode 100644
index 7b0a0cf5956..00000000000
--- a/Master/texmf-dist/tex/latex/mh/empheq.sty
+++ /dev/null
@@ -1,1390 +0,0 @@
-%%
-%% This is file `empheq.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% empheq.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 2002-2007 by Morten Hoegholm
-%% Copyright (C) 2012 by Lars Madsen
-%%
-%%
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file empheq.dtx
-%% and the derived files
-%% empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
-%%
-\ProvidesPackage{empheq}%
- [2013/02/12 v2.13 Emphasizing equations]
-\RequirePackage{mhsetup}[2004/10/10]
-\MHInternalSyntaxOn
-\MH_new_boolean:n {overload_ams}
-\DeclareOption{overload}{
- \MH_set_boolean_T:n {overload_ams}
-}
-\MH_new_boolean:n {overload_amsII}
-\DeclareOption{overload2}{
- \MH_set_boolean_T:n {overload_ams}
- \MH_set_boolean_T:n {overload_amsII}
-}
-\MH_new_boolean:n {good_mult}
-\DeclareOption{oldmultline}{\MH_set_boolean_F:n {good_mult}}
-\DeclareOption{newmultline}{\MH_set_boolean_T:n {good_mult}}
-\gdef\g@EQ@ntheorem@support@bool{01}
-\DeclareOption{ntheorem}{\gdef\g@EQ@ntheorem@support@bool{00}}
-\DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{mathtools}
-}
-\ExecuteOptions{newmultline}
-\ProcessOptions\relax
-\MHInternalSyntaxOff
-\RequirePackage{mathtools}[2004/10/10]
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-\newcount\l_EQ_equationtype_int
-\newcount\l_EQ_alignmentmode_int
-\if@fleqn
- \iftagsleft@
- \l_EQ_alignmentmode_int=4
- \else:
- \l_EQ_alignmentmode_int=\thr@@
- \fi:
-\else:
- \iftagsleft@
- \l_EQ_alignmentmode_int=\tw@
- \else:
- \l_EQ_alignmentmode_int=\@ne
- \fi:
-\fi:
-\newdimen\l_EQ_totalwidth_dim
-\newdimen\l_EQ_displaywidth_dim
-\def\EmphEqdisplaywidth{\l_EQ_displaywidth_dim}
-\newdimen\l_EQ_temp_linewidth_dim
-\newdimen\EmphEqdelimitershortfall
-\newcount\EmphEqdelimiterfactor
-\EmphEqdelimiterfactor950
-\EmphEqdelimitershortfall\p@
-\newdimen\g_EQ_toptag_height_dim
-\newdimen\g_EQ_bottomtag_depth_dim
-\newdimen\g_EQ_toprow_height_dim
-\newdimen\g_EQ_bottomrow_depth_dim
-\newdimen\g_EQ_widesttag_dim
-\def\EmphEqtagwidth{\g_EQ_widesttag_dim}
-\def\EQ_outerbox:{}
-\def\EQ_innerbox:{}
-\def\EQ_left_side:{}
-\def\EQ_right_side:{}
-\newsavebox\EQ_mathdisplay_box
-\def\EmphEqdisplayheight{\ht\EQ_mathdisplay_box}
-\def\EmphEqdisplaydepth{\dp\EQ_mathdisplay_box}
-\newsavebox\EQ_tag_box
-\def\EQ_complete_mathdisplay:{}
-\def\EQ_getbody:n #1{%
- \def\EQ_complete_mathdisplay:{}\def\EQ_mathbody:{#1}}
-\newenvironment{EmphEqMainEnv}{\collect@body\EQ_getbody:n}{%
- \if_num:w \l_EQ_equationtype_int=\z@ %ZeroCheckpoint
- \EQ_upgrade_error:
- \else:
- \EQ_post_process:
- \ignorespacesafterend
- \fi:}
-\def\EQ_post_process:{%
- \EQ_initialize:
- \EQ_begin_equation:
- \MH_if_boolean:nT {outer_mult}{
- \setkeys{\MT_options_name:}{
- firstline-afterskip=0pt,
- lastline-preskip=0pt,
- multlined-width=0pt,
- }
- \ifodd \l_EQ_alignmentmode_int
- \setkeys{\MT_options_name:}{multlined-pos=b}
- \else:
- \setkeys{\MT_options_name:}{multlined-pos=t}
- \fi:
- \g@addto@macro\EQ_complete_mathdisplay:{
- \begin{MTmultlined}\relax}
- }
- \g@addto@macro\EQ_complete_mathdisplay:\EQ_mathbody:
- \MH_if_boolean:nT {outer_mult}{
- \g@addto@macro\EQ_complete_mathdisplay:{\end{MTmultlined}}
- }
- \EQ_end_equation:
- \edef\EQ_hyperref_link_fint{\number\Hy@linkcounter}
- \savecounters@
- \EQ_typeset_tags:
- \edef\l_EQ_equation_fint{\number\c@equation}
- \restorecounters@
- \Hy@linkcounter=\EQ_hyperref_link_fint
- \settowidth\l_EQ_totalwidth_dim{%
- $\EQ_left_side:\EQ_innerbox:{}\EQ_right_side:$}%
- \MH_if_boolean:nTF {outer_mult}
- { \def\EQ_next:{_mult} }
- { \def\EQ_next:{} }
- \@nameuse{EQ_modify_linewidth_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}%
- \EQ_typeset_display:
- \@nameuse{find_displaywidth_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}
- \MH_addtolength:dn
- \l_EQ_totalwidth_dim{\l_EQ_displaywidth_dim}
- \savebox\EQ_mathdisplay_box[\l_EQ_totalwidth_dim][c]{%
- $\EQ_left_side:
- \EQ_innerbox:{%
- \if_case:w \l_EQ_alignmentmode_int\or:
- \makebox[\l_EQ_displaywidth_dim][c]
- {\usebox{\EQ_mathdisplay_box}}%
- \or:
- \makebox[\l_EQ_displaywidth_dim][c]
- {\usebox{\EQ_mathdisplay_box}}%
- \or:
- \makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
- \kern-\@mathmargin
- \fi:
- \fi:
- \usebox{\EQ_mathdisplay_box}}%
- \or:
- \makebox[\l_EQ_displaywidth_dim][l]{%
- \if_num:w \l_EQ_equationtype_int=5 \else:
- \if_num:w \l_EQ_equationtype_int=6 \else:
- \kern-\@mathmargin
- \fi:
- \fi:
- \usebox{\EQ_mathdisplay_box}}%
- \fi:}%
- \EQ_right_side:$}%
- \begin{AmSequation*}
- \@nameuse{EQ_place_display_
- \romannumeral\l_EQ_equationtype_int\EQ_next: :}
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_set_boolean_T:n {show_manual_tags}
- \if_case:w \l_EQ_alignmentmode_int
- \or: \EQ_place_tag:N r %#1
- \or: \EQ_place_tag:N l %#2
- \or: \EQ_place_tag:N r %#3
- \or: \EQ_place_tag:N l %#4
- \fi:
- \fi:
- \end{AmSequation*}
- \global\c@equation=\l_EQ_equation_fint\relax
-}
-\def\EQ_initialize:{%
- \m@th
- \MH_let:NwN\SetTagPlusEndMark\EQ_tag_plus_endmark:
- \MH_let:NwN\SetOnlyEndMark\EQ_only_endmark:
- \l_EQ_temp_linewidth_dim\linewidth
- \g_EQ_toprow_height_dim\z@
- \g_EQ_bottomrow_depth_dim\z@
- \g_EQ_toptag_height_dim\z@
- \g_EQ_bottomtag_depth_dim\z@
- \g_EQ_widesttag_dim\z@
- \xdef\g_EQ_latest_nonzerodepth_row_fint{\z@}
- \edef\EQ_restore_tex_delimiter:{%
- \delimiterfactor\the\delimiterfactor
- \delimitershortfall\the\delimitershortfall\relax}%
- \g@addto@macro\EQ_complete_mathdisplay:
- \EQ_restore_tex_delimiter:
- \delimitershortfall\EmphEqdelimitershortfall
- \delimiterfactor\EmphEqdelimiterfactor
- \MH_let:NwN\intertext@\EQ_intertext:
- \EQ_displaybreak:}
-\def\EQ_intertext:{%
- \def\intertext##1{\PackageError{empheq}{%
- You~cannot~use~\string\intertext\space inside~the~`empheq'
- \MessageBreak
- environment,~as~`empheq'~creates~an~unbreakable~box}\@eha}}
-\def\EQ_displaybreak:{%
- \def\dspbrk@[##1]{\PackageWarning{empheq}{%
- You~cannot~use~\string\displaybreak\space inside~the~`empheq'%
- \MessageBreak
- environment,~as~`empheq'~creates~an~unbreakable~box.}}}
-\def\EQ_new_equationtype:nnn #1#2#3{%
- \define@key{#1}{#2}[true]{%
- \l_EQ_equationtype_int=#3\relax
- \def\EQ_begin_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\begin{#2}}}%
- \def\EQ_end_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\end{#2}}}}}
-\def\EQ_new_equationtype_arg:nnn #1#2#3{%
- \define@key{#1}{#2}{%
- \l_EQ_equationtype_int=#3\relax
- \def\EQ_begin_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\begin{#2}{##1}}}%
- \def\EQ_end_equation:
- {\g@addto@macro{\EQ_complete_mathdisplay:}{\end{#2}}}}}
-\def\EQ_typeset_tags:{%
- \sbox\EQ_tag_box{%
- \parbox{.5\maxdimen}{%
- \hbadness\@M
- \EQ_prevent_vertical_space:
- \EQ_typeset_tags_hook:
- \MH_let:NwN\set@gather@field\EQ_set_gather_field:
- \MH_let:NwN\set@field\EQ_set_align_field:
- \MH_set_boolean_T:n {continue_measuring}
- \global\g_EQ_temprow_int\m@ne
- \MH_let:NwN \EQ_saved_maketag:n \maketag@@@
- \def\maketag@@@##1{
- \EQ_maketag:Nn \EQ_saved_maketag:n {##1}}
- \EQ_complete_mathdisplay:}}}
-\def\EQ_predisplay_adjustment:{%
- \if_dim:w \g_EQ_toprow_height_dim<\baselineskip
- \vskip\g_EQ_toprow_height_dim
- \vskip-\baselineskip
- \else:
- \vskip-\normallineskip
- \fi:
- \if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim
- \if_dim:w \g_EQ_toptag_height_dim>\baselineskip
- \vskip-\g_EQ_toptag_height_dim
- \vskip\baselineskip
- \vskip-\normallineskip
- \fi:
- \fi:}
-\def\EQ_postdisplay_adjustment:{%
- \if_dim:w \g_EQ_bottomrow_depth_dim<\dp\strutbox
- \vskip\g_EQ_bottomrow_depth_dim
- \vskip-\dp\strutbox
- \fi:
- \if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim
- \if_dim:w \g_EQ_bottomtag_depth_dim>\dp\strutbox
- \vskip-\g_EQ_bottomtag_depth_dim
- \vskip\dp\strutbox
- \fi:
- \fi:}
-\def\EQ_typeset_display:{%
- \sbox\EQ_mathdisplay_box{%
- \parbox{\l_EQ_temp_linewidth_dim}{%
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
- \EQ_typeset_display_hook:
- \def\maketag@@@##1{\EQ_maketag:Nn \vphantom{##1}}%
- \EQ_complete_mathdisplay:
- \EQ_postdisplay_adjustment:}}}
-\def\EQ_prevent_vertical_space:{%
- \nointerlineskip
- \abovedisplayskip\z@ \belowdisplayskip\z@\relax}
-\def\EQ_maketag:Nn #1#2{%
- \setboxz@h{#2}%
- \if_num:w \row@=\@ne
- \global \g_EQ_toptag_height_dim = \ht\z@
- \fi:
- \global \g_EQ_bottomtag_depth_dim=\dp\z@
- \xdef\g_EQ_latest_nonzerodepth_row_fint{\number\row@}
- \@tempdima=\wd\z@
- \if_dim:w \@tempdima > \g_EQ_widesttag_dim
- \global \g_EQ_widesttag_dim = \@tempdima
- \fi:
- #1{#2}%
-}
-\def\EQ_set_gather_field:{%
- \iftagsleft@
- \global\lineht@\ht\z@
- \else:
- \global\lineht@\dp\z@
- \fi:
- \kern\eqnshift@
- %\boxz@ % Original amsmath version
- \EQ_measure_gather:
- \phantom{\boxz@}%
- \hfil}
-\def\EQ_measure_gather:{%
- \if_num:w \row@=\@ne
- \g_EQ_toprow_height_dim=\ht\z@
- \fi:
- \g_EQ_bottomrow_depth_dim=\dp\z@
- \global\g_EQ_toprow_height_dim\g_EQ_toprow_height_dim
- \global\g_EQ_bottomrow_depth_dim\g_EQ_bottomrow_depth_dim}
-\def\EQ_set_align_field:{%
- \column@plus
- \iftagsleft@
- \if_dim:w \ht\z@>\lineht@
- \global\lineht@\ht\z@
- \fi:
- \else:
- \if_dim:w \dp\z@>\lineht@
- \global\lineht@\dp\z@
- \fi:
- \fi:
- %\boxz@ % Original amsmath version
- \MH_if_boolean:nT {continue_measuring}{ \EQ_measure_align: }
- \phantom{\boxz@}}
-\newcount\g_EQ_temprow_int
-\MH_new_boolean:n {still_in_samerow}
-\MH_new_boolean:n {continue_measuring}
-\def\EQ_measure_align:{%
- \if_num:w \g_EQ_temprow_int=\row@
- \MH_set_boolean_T:n {still_in_samerow}
- \else:
- \if_num:w \g_EQ_temprow_int>\row@
- \global\MH_set_boolean_F:n {continue_measuring}
- \fi:
- \MH_set_boolean_F:n {still_in_samerow}
- \global\@tempdimc=\@tempdimb
- \global\@tempdimb=\g_EQ_bottomrow_depth_dim
- \fi:
- \MH_if_boolean:nTF {continue_measuring}{
- \global\g_EQ_temprow_int=\row@
- \@tempcnta=\row@
- \if_num:w \@tempcnta=\z@
- \@tempdima=\g_EQ_toprow_height_dim
- \g_EQ_toprow_height_dim=\ht\z@\relax
- \if_dim:w \g_EQ_toprow_height_dim<\@tempdima
- \g_EQ_toprow_height_dim\@tempdima
- \fi:
- \fi:
- \MH_if_boolean:nTF {still_in_samerow}{
- \@tempdima=\g_EQ_bottomrow_depth_dim
- \g_EQ_bottomrow_depth_dim=\dp\z@\relax
- \if_dim:w \g_EQ_bottomrow_depth_dim<\@tempdima
- \g_EQ_bottomrow_depth_dim\@tempdima
- \fi:
- }{
- \g_EQ_bottomrow_depth_dim\dp\z@\relax
- }
- }{
- \global\g_EQ_bottomrow_depth_dim=\@tempdimc
- }
- \global\g_EQ_toprow_height_dim\g_EQ_toprow_height_dim
- \global\g_EQ_bottomrow_depth_dim\g_EQ_bottomrow_depth_dim}
-\def\EQ_place_tag:N #1{%
- \tag*{\makebox[\g_EQ_widesttag_dim][#1]{%
- \EQ_vertical_tag_adjustment:n {\usebox{\EQ_tag_box}}}}}
-\def\EQ_vertical_tag_adjustment:n #1{{%
- \@tempdima\z@\@tempdimb\z@
- \@tempdimc=\dp\strutbox
- \if_dim:w \g_EQ_toprow_height_dim<\baselineskip
- \MH_setlength:dn
- \@tempdima{\g_EQ_toprow_height_dim-\baselineskip}
- \else:
- \MH_setlength:dn \@tempdima{-\normallineskip}
- \fi:
- \if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim
- \if_dim:w \g_EQ_toptag_height_dim>\baselineskip
- \MH_addtolength:dn \@tempdima
- {-\g_EQ_toptag_height_dim+\baselineskip-\normallineskip}
- \fi:
- \fi:
- \if_dim:w \g_EQ_bottomrow_depth_dim<\@tempdimc
- \MH_setlength:dn \@tempdimb
- {\g_EQ_bottomrow_depth_dim-\@tempdimc}
- \fi:
- \if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim
- \if_dim:w \g_EQ_bottomtag_depth_dim<\@tempdimc
- \else:
- \MH_addtolength:dn \@tempdimb
- {-\g_EQ_bottomtag_depth_dim+\@tempdimc}
- \fi:
- \fi:
- \raisebox{-0.5\@tempdima+0.5\@tempdimb}{#1}}}%
-\def\EQ_use_mathdisplay:{%
- \EQ_outerbox:{\usebox{\EQ_mathdisplay_box}}}
-\def\EQ_options_name:{EmphEqOpt}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{equation}{gather}
- {\EQ_disable_linebreak:}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{equation*}{gather*}
- {\EQ_disable_linebreak:}
-\def\EQ_disable_linebreak:{%
- \MH_let:NwN \EQ_saved_Let: \Let@
- \def\Let@{\def\\{%
- \PackageError{empheq}{You~ cannot~ use~ \string\\~ in~ equation!}
- {\@eha}}
- \MH_let:NwN \Let@ \EQ_saved_Let:
- }%
-}
-\EQ_new_equationtype:nnn {EmphEqEnv}{align}{1}
-\EQ_new_equationtype:nnn {EmphEqEnv}{align*}{2}
-\def\EQ_modify_linewidth_i:{%
- \if_num:w \maxfields@=\tw@
- \else:
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
- \fi:}
-\def\EQ_modify_linewidth_ii:{\EQ_modify_linewidth_i:}
-\def\find_displaywidth_i:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim
- {\l_EQ_temp_linewidth_dim-\alignsep@}
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}%
- \or: % #2:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}%
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_ii:{\find_displaywidth_i:}
-\def\EQ_place_display_i: {\EQ_use_mathdisplay:}
-\def\EQ_place_display_ii:{\EQ_place_display_i:}
-\EQ_new_equationtype:nnn {EmphEqEnv}{gather}{3}
-\EQ_new_equationtype:nnn {EmphEqEnv}{gather*}{4}
-\def\EQ_modify_linewidth_iii:{}
-\def\EQ_modify_linewidth_iv:{\EQ_modify_linewidth_iii:}
-\def\find_displaywidth_iii:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int \or: \or: % #1 & #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_iv:{\find_displaywidth_iii:}
-\def\EQ_place_display_iii:{\EQ_use_mathdisplay:}
-\def\EQ_place_display_iv: {\EQ_place_display_iii:}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}
- {flalign}{\MH_set_boolean_T:n {multline}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}
- {flalign*}{\MH_set_boolean_T:n {multline}}
-\MH_new_boolean:n {multline}
-\def\EQ_multline_modify_linewidth_tag:{%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}%
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}%
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{%
- -\@mathmargin-\g_EQ_widesttag_dim-\multlinetaggap}%
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \fi:
-}
-\def\EQ_multline_modify_linewidth_notag:{%
- \if_case:w \l_EQ_alignmentmode_int\or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap}
- \or:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap}
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \or:
- \MH_addtolength:dn
- \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}%
- \fi:
-}
-\MH_let:NwN \MTmultlined \multlined
-\MH_let:NwN \endMTmultlined \endmultlined
-\MH_if_boolean:nTF {good_mult}{
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline}{gather}
- {\MH_set_boolean_T:n {outer_mult}}
-\MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{multline*}{gather*}
- {\MH_set_boolean_T:n {outer_mult}}
-\def\EQ_modify_linewidth_iii_mult:{
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\widthof{\EQ_outerbox:{}}}%
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \EQ_multline_modify_linewidth_tag:
- \else:
- \EQ_multline_modify_linewidth_notag:
- \fi:
- \MH_setlength:dn \l_MT_multwidth_dim{\l_EQ_temp_linewidth_dim}
-}
-\def\EQ_modify_linewidth_iv_mult:{\EQ_modify_linewidth_iii_mult:}
-\def\find_displaywidth_iii_mult:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int \or: \or: % #1 & #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_iv_mult:{\find_displaywidth_iii_mult:}
-\def\EQ_place_display_iii_mult:{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \abovedisplayshortskip=\abovedisplayskip
- \rlap{
- \kern-.5\linewidth
- \kern\multlinegap
- \EQ_use_mathdisplay:
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #2:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \llap{
- \EQ_use_mathdisplay:
- \kern-.5\linewidth
- \kern\multlinegap
- }%
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #3:
- \EQ_use_mathdisplay:
- \or: % #4:
- \EQ_use_mathdisplay:
- \fi:
-}
-\def\EQ_place_display_iv_mult: {\EQ_place_display_iii_mult:}
-}{
-\def\EQ_generic_multline:nnnnn #1#2#3#4#5{%
- \hskip1sp#2#3{{}#5}#4%
- \if:w *#1\relax\else:\notag\fi:}
-\def\multleft{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n}
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{}{\mathrlap}{&&&&&}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n}%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{}{\mathrlap}{&&&&&}}
- }
- \EQ_next:}}%
-\def\multcenter{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_center:n}%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{&&}{\mathclap}{&&&}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_center:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{&&}{\mathclap}{&&&}}
- }
- \EQ_next:}}%
-\def\multright{\@ifstar{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {*}{&&&&&}{\mathllap}{}}
- }
- \EQ_next:}{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \def\EQ_next:{
- \EQ_generic_multline:nnnnn {}{&&&&&}{\mathllap}{}}
- }
- \EQ_next:}}
-\def\multfirst{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_left:n }%
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \def\EQ_next:{\multleft}%
- \or: % #2:
- \def\EQ_next:{\multleft*}%
- \or: % #3:
- \def\EQ_next:{\multleft}%
- \or: % #4:
- \def\EQ_next:{\multleft*}%
- \fi:
- }
- \EQ_next:}
-\def\multmiddle{%
- \def\EQ_next:{%
- \MH_if_boolean:nTF {multlined}{
- \expandafter\EQ_multlined_center:n
- }{
- \expandafter\multcenter
- }
- }%
- \@ifstar{\EQ_next:}{\EQ_next:}}
-\def\multlast{%
- \MH_if_boolean:nTF {multlined}{
- \def\EQ_next:{\EQ_multlined_right:n }%
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \def\EQ_next:{\multright*}%
- \or: % #2:
- \def\EQ_next:{\multright}%
- \or: % #3:
- \def\EQ_next:{\multright*}%
- \or: % #4:
- \def\EQ_next:{\multright}%
- \fi:
- }
- \EQ_next:}
-\MH_new_boolean:n {multlined}
-\newdimen\multlinedwidth
-\MH_setlength:dn \multlinedwidth{.7\linewidth}
-\renewenvironment{multlined}%
- {\MH_nospace_ifnextchar:Nnn [ {\EQ_multlined_I:w}
- {\EQ_multlined_I:w[c]}
- }
- { \endaligned }
-\def\EQ_multlined_I:w[#1]{%
- \MH_nospace_ifnextchar:Nnn[ {\EQ_multlined_II:w[#1]}
- {\EQ_multlined_II:w[#1][\multlinedwidth]}}
-\def\EQ_multlined_II:w[#1][#2]{%
- \MH_set_boolean_T:n {multlined}
- \MH_let:NwN \Let@\MT_saved_Let:
- \if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}%
- \else:
- \EQ_multlined_III:nn {#2}{#1}%
- \fi:
- \fi:
- \fi:
- \mkern-\thinmuskip
- \EQ_next:}
-\def\EQ_multlined_III:nn #1#2{%
- \def\EQ_next:{\setlength\multlinedwidth{#2}%
- \start@aligned{#1}{\thr@@}}}
-\def\EQ_multlined_left:n #1{%
- \mathrlap{#1}&\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_center:n #1{%
- &\hskip.5\multlinedwidth&&\mathclap{#1}\hskip.5\multlinedwidth&&}
-\def\EQ_multlined_right:n #1{%
- &\hskip.5\multlinedwidth&&\hskip.5\multlinedwidth&&\mathllap{#1}}
-}
-\EQ_new_equationtype:nnn {EmphEqEnv}{flalign}{5}
-\EQ_new_equationtype:nnn {EmphEqEnv}{flalign*}{6}
-\def\EQ_modify_linewidth_v:{%
- \setlength{\l_EQ_temp_linewidth_dim}{%
- \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}%
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \EQ_multline_modify_linewidth_tag:
- }{
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}
- \or: % #2:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}%
- \or: % #3:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\g_EQ_widesttag_dim-\mintagsep}
- \or: % #4:
- \MH_addtolength:dn \l_EQ_temp_linewidth_dim
- {-\@mathmargin}
- \fi:
- }
- \else:
- \MH_if_boolean:nT {multline}{
- \EQ_multline_modify_linewidth_notag:
- }
- \fi:}
-\def\EQ_modify_linewidth_vi:{\EQ_modify_linewidth_v:}
-\def\find_displaywidth_v:{%
- \MH_setlength:dn
- \l_EQ_displaywidth_dim{\l_EQ_temp_linewidth_dim}}
-\def\find_displaywidth_vi:{\find_displaywidth_v:}
-\def\EQ_place_display_v:{%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \rlap{\kern\multlinegap \kern-.5\linewidth
- \EQ_use_mathdisplay:
- \kern-\mintagsep \kern\multlinetaggap}%
- }{
- \rlap{\kern-.5\linewidth\EQ_use_mathdisplay:}%
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #2:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \MH_if_boolean:nTF {multline}{
- \llap{\kern-\mintagsep \kern\multlinetaggap
- \EQ_use_mathdisplay:
- \kern\multlinegap \kern-.5\linewidth}%
- }{
- \llap{\EQ_use_mathdisplay:\kern-.5\linewidth}%
- }
- \else:
- \EQ_use_mathdisplay:
- \fi:
- \or: % #3:
- \MH_if_boolean:nF {multline}{ \kern-\multlinetaggap }
- \EQ_use_mathdisplay:
- \or: % #4:
- \if_dim:w \g_EQ_widesttag_dim>\z@
- \else:
- \MH_if_boolean:nF {multline}{ \kern-\@mathmargin }
- \fi:
- \EQ_use_mathdisplay:
- \fi:
- \MH_set_boolean_F:n {multline}}
-\def\EQ_place_display_vi:{\EQ_place_display_v:}
-\EQ_new_equationtype_arg:nnn {EmphEqEnv}{alignat}{7}
-\EQ_new_equationtype_arg:nnn {EmphEqEnv}{alignat*}{8}
-\def\EQ_modify_linewidth_vii:{}
-\def\EQ_modify_linewidth_viii:{\EQ_modify_linewidth_vii:}
-\def\find_displaywidth_vii:{%
- \MH_setlength:dn \l_EQ_displaywidth_dim{\totwidth@}%
- \if_case:w \l_EQ_alignmentmode_int
- \or: % #1:
- \or: % #2:
- \or: % #3:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\eqnshift@}%
- \or: % #4:
- \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}%
- \fi:}
-\def\find_displaywidth_viii:{\find_displaywidth_vii:}
-\def\EQ_place_display_vii:{\EQ_use_mathdisplay:}
-\def\EQ_place_display_viii:{\EQ_place_display_vii:}
-\define@key{\EQ_options_name:}{box}{\def\EQ_outerbox:{#1}}
-\MH_keyval_alias:nnn {\EQ_options_name:}{outerbox}{box}
-\def\EQ_marginbox:nn #1#2{%
- \settowidth{\@tempdima}{#2}%
- \makebox[\z@]{\hspace{\@tempdima}#1{#2}}}
-\define@key{\EQ_options_name:}{marginbox}{%
- \def\EQ_outerbox:{\EQ_marginbox:nn {#1}}}
-\define@key{\EQ_options_name:}{innerbox}{\def\EQ_innerbox:{#1}}
-\define@key{\EQ_options_name:}{left}{\def\EQ_left_side:{#1}}
-\define@key{\EQ_options_name:}{right}{\def\EQ_right_side:{#1}}
-\newcommand*\empheqset[1]{\setkeys{\EQ_options_name:}{#1}}
-\def\EQ_upgrade_error:{%
- \PackageError{empheq}
- {You~ are~ using~ the~ old~ syntax!\MessageBreak
- The~ `empheq'~ environment~ takes~ a~ mandatory~
- argument~ now.\MessageBreak
- You~ need~ to~ exit~ and~ change~ your~ source~ file.}
- {It~ won't~ work,~ trust me.~ Press~ `X'~ now.}}
-\define@key{\EQ_options_name:}{boxtype}{\EQ_upgrade_error:}
-\define@key{\EQ_options_name:}{Left}{\EQ_upgrade_error:}
-\define@key{\EQ_options_name:}{Right}{\EQ_upgrade_error:}
-\let\empheqeqrefbase\textup
-\newenvironment{empheq}[2][]{%
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{#2}\setkeys{\EQ_options_name:}{#1}%
- \EmphEqMainEnv}{\endEmphEqMainEnv}
-\newcommand*\DeclareLeftDelimiter[2][]{%
- \EQ_declare_left_delimiter:nnnn {#1}{#2}{}{}%
- \EQ_declare_left_delimiter:nnnn {#1}{#2}{big}{\EQ_innerbox:}}
-\def\EQ_declare_left_delimiter:nnnn #1#2#3#4{%
- \@namedef{empheq#3\expandafter\@gobble\string#2}{%
- \left#2%
- \mkern-\thinmuskip
- \vphantom{#4{\parbox{.5\maxdimen}{%
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
- \usebox{\EQ_tag_box}%
- \EQ_postdisplay_adjustment:}}}%
- \right.%
- \kern-\nulldelimiterspace #1}}
-\newcommand*\DeclareRightDelimiter[2][]{%
- \EQ_declare_right_delimiter:nnnn {#1}{#2}{}{}%
- \EQ_declare_right_delimiter:nnnn {#1}{#2}{big}{\EQ_innerbox:}}
-\def\EQ_declare_right_delimiter:nnnn #1#2#3#4{%
- \@namedef{empheq#3\expandafter\@gobble\string#2}{%
- \kern-\nulldelimiterspace
- #1%
- \left.%
- \vphantom{#4{\parbox{.5\maxdimen}{%
- \EQ_predisplay_adjustment:
- \EQ_prevent_vertical_space:
- \usebox{\EQ_tag_box}%
- \EQ_postdisplay_adjustment:}}}%
- \mkern-\thinmuskip
- \right#2}}
-\DeclareLeftDelimiter{\lbrace}
-\DeclareRightDelimiter{\rbrace}
-\DeclareLeftDelimiter{\lbrack}
-\DeclareRightDelimiter{\rbrack}
-\DeclareLeftDelimiter{\langle}
-\DeclareRightDelimiter{\rangle}
-\DeclareLeftDelimiter{\lvert}
-\DeclareRightDelimiter{\rvert}
-\DeclareLeftDelimiter{\lVert}
-\DeclareRightDelimiter{\rVert}
-\DeclareLeftDelimiter{\lfloor}
-\DeclareRightDelimiter{\rfloor}
-\DeclareLeftDelimiter{\lceil}
-\DeclareRightDelimiter{\rceil}
-\DeclareLeftDelimiter{\lparen}
-\DeclareRightDelimiter{\rparen}
-\def\EQ_typeset_tags_hook:{}
-\def\EQ_typeset_display_hook:{}
-\g@addto@macro\EQ_typeset_display_hook:{
- \def\SK@@label#1>#2\SK@{}
-}
-\@namedef{SK@AmSequation} {\SK@equationtrue}
-\@namedef{SK@AmSequation*} {\SK@equationtrue}
-\@namedef{SK@AmSalign} {\SK@equationtrue}
-\@namedef{SK@AmSalign*} {\SK@equationtrue}
-\@namedef{SK@AmSalignat} {\SK@equationtrue}
-\@namedef{SK@AmSalignat*} {\SK@equationtrue}
-\@namedef{SK@AmSgather} {\SK@equationtrue}
-\@namedef{SK@AmSgather*} {\SK@equationtrue}
-\@namedef{SK@AmSmultline} {\SK@equationtrue}
-\@namedef{SK@AmSmultline*} {\SK@equationtrue}
-\@namedef{SK@AmSflalign} {\SK@equationtrue}
-\@namedef{SK@AmSflalign*} {\SK@equationtrue}
-\AtBeginDocument{
- \@ifundefined{Hy@linkcounter}{\newcount\Hy@linkcounter}{}
-}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN \hyper@refstepcounter\@gobble
-}
- \g@addto@macro\EQ_typeset_display_hook:{
- \let\NCC@ignorepar\relax
- }
- \g@addto@macro\EQ_typeset_tags_hook:{
- \let\NCC@ignorepar\relax
- }
-\g@addto@macro\EQ_typeset_tags_hook:{
- \MH_let:NwN\TagsPlusEndmarks\relax
- \MH_let:NwN\RestoreTags\relax
-}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN\TagsPlusEndmarks\relax
- \MH_let:NwN\RestoreTags\relax
-}
-\g@addto@macro\EQ_typeset_display_hook:{
- \MH_let:NwN\ltx@label\MT_gobblelabel:w
- \MH_let:NwN \GenericError \@gobblefour
-}
-\AtBeginDocument{%
- \@ifpackageloaded{fancybox}{%
- \@ifpackageloaded{color}{\definecolor{shadowcolor}{rgb}{0,0,0}}%
- {\newcommand*\textcolor[2]{\normalcolor{#2}}}%
- \MH_new_boolean:n {shadowbox_star}
- \renewcommand*\shadowbox{%
- \@ifstar{\MH_set_boolean_T:n {shadowbox_star}
- \VerbBox\EQ_shadowbox:n}
- {\MH_set_boolean_F:n {shadowbox_star}
- \VerbBox\EQ_shadowbox:n}}
- \def\EQ_shadowbox:n #1{%
- \sbox{\z@}{\fbox{#1}}%
- \MH_if_boolean:nTF {shadowbox_star}{
- \MH_setlength:dn \@tempdima{\z@}%
- }{
- \MH_setlength:dn \@tempdima{\dp\z@+\shadowsize}%
- }
- \raisebox{\@tempdima}{%
- \makebox[\z@][l]{%
- \kern\shadowsize \textcolor{shadowcolor}{%
- \rule[-\dp\z@-\shadowsize]{\wd\z@}{\shadowsize}}%
- }%
- \usebox\z@\textcolor{shadowcolor}{%
- \rule[-\dp\z@-\shadowsize]{\shadowsize}{\ht\z@+\dp\z@}}}}%
- }{}%
-}
-\def\EQ_overload_ams_begin:n #1{%
- \MH_let:cc {AmS#1}{#1}%
- \MH_let:cc {AmS#1*}{#1*}
-}
-\def\EQ_overload_ams_end:n #1{%
- \MH_let:cc {endAmS#1}{endAmSalign}
-}
-\AtBeginDocument{
- \EQ_overload_ams_begin:n {equation}
- \MH_let:cc {endAmSequation}{endequation}
- \MH_let:cc {endAmSequation*}{endequation*}
- \MH_if_boolean:nT {overload_ams}{
- \def\EQ_renew_ams_environment:n #1{%
- \MaybeMHPrecedingSpacesOff
- \renewenvironment{#1}[1][]{%
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{####1}}}}
- \setkeys{\EQ_options_name:}{##1}%
- \setkeys{EmphEqEnv}{AmS#1}%
- \EmphEqMainEnv
- }{\endEmphEqMainEnv}
- \MHPrecedingSpacesOn
- }
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSalign} {1}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSalign*} {2}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSgather} {3}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSgather*} {4}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSflalign} {5}
- \EQ_new_equationtype:nnn {EmphEqEnv}{AmSflalign*}{6}
- \EQ_new_equationtype_arg:nnn {EmphEqEnv}{AmSalignat} {7}
- \EQ_new_equationtype_arg:nnn {EmphEqEnv}{AmSalignat*}{8}
- \EQ_overload_ams_begin:n {gather}
- \MH_let:cc {endAmSgather}{endgather}
- \MH_let:cc {endAmSgather*}{endAmSgather}
- \EQ_renew_ams_environment:n {gather}
- \EQ_renew_ams_environment:n {gather*}
- \EQ_overload_ams_begin:n {equation}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv} {AmSequation}
- {AmSgather}{\EQ_disable_linebreak:}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSequation*}
- {AmSgather*}{\EQ_disable_linebreak:}
- \EQ_renew_ams_environment:n {equation}
- \EQ_renew_ams_environment:n {equation*}
- \EQ_overload_ams_begin:n {align}
- \MH_let:cc {endAmSalign}{endalign}
- \EQ_overload_ams_end:n {align*}
- \EQ_renew_ams_environment:n {align}
- \EQ_renew_ams_environment:n {align*}
- \EQ_overload_ams_begin:n {flalign}
- \EQ_overload_ams_end:n {flalign}
- \EQ_overload_ams_end:n {flalign*}
- \EQ_renew_ams_environment:n {flalign}
- \EQ_renew_ams_environment:n {flalign*}
- \EQ_overload_ams_begin:n {alignat}
- \EQ_overload_ams_end:n {alignat}
- \EQ_overload_ams_end:n {alignat*}
- \MaybeMHPrecedingSpacesOff
- \newcommand*\EQ_alignat_optional:w [1][]{
- \setkeys{\EQ_options_name:}{#1}
- \EmphEqMainEnv}
- \MHPrecedingSpacesOn
- \renewenvironment{alignat}[1]{
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{AmSalignat=#1}
- \EQ_alignat_optional:w}
- {\endEmphEqMainEnv}
- \renewenvironment{alignat*}[1]{%
- \MH_let:NwN\EQ_saved_maketag: \maketag@@@%
- \renewcommand\eqref[1]{\empheqeqrefbase{%
- \let\maketag@@@\EQ_saved_maketag:%
- \tagform@{\ref{##1}}}}
- \setkeys{EmphEqEnv}{AmSalignat*=#1}%
- \EQ_alignat_optional:w}%
- {\endEmphEqMainEnv}
- \DeclareRobustCommand{\[}{\begin{AmSequation*}}
- \DeclareRobustCommand{\]}{\end{AmSequation*}}
- \MH_keyval_alias:nnn {EmphEqEnv}{gather} {AmSgather}
- \MH_keyval_alias:nnn {EmphEqEnv}{gather*} {AmSgather*}
- \MH_keyval_alias:nnn {EmphEqEnv}{align} {AmSalign}
- \MH_keyval_alias:nnn {EmphEqEnv}{align*} {AmSalign*}
- \MH_keyval_alias:nnn {EmphEqEnv}{flalign} {AmSflalign}
- \MH_keyval_alias:nnn {EmphEqEnv}{flalign*}{AmSflalign*}
- \MH_keyval_alias:nnn {EmphEqEnv}{alignat} {AmSalignat}
- \MH_keyval_alias:nnn {EmphEqEnv}{alignat*}{AmSalignat*}
- \MH_if_boolean:nT {good_mult}{
- \EQ_overload_ams_begin:n {multline}
- \MH_let:cc {endAmSmultline}{endmultline}
- \MH_let:cc {endAmSmultline*}{endAmSmultline}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline}
- {AmSgather}{\MH_set_boolean_T:n {outer_mult}}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline*}
- {AmSgather*}{\MH_set_boolean_T:n {outer_mult}}
- \EQ_renew_ams_environment:n {multline}
- \EQ_renew_ams_environment:n {multline*}
- }
- \MH_if_boolean:nT {overload_amsII}{
- \MH_protected:\def\[#1\]{\begin{equation*} #1\end{equation*}}
- \MH_if_boolean:nF {good_mult}{
- \EQ_overload_ams_begin:n {multline}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline}
- {AmSflalign}{\MH_set_boolean_T:n {multline}}
- \MH_keyval_alias_with_addon:nnnn {EmphEqEnv}{AmSmultline*}
- {AmSflalign*}{\MH_set_boolean_T:n {multline}}
- \EQ_renew_ams_environment:n {multline}
- \EQ_renew_ams_environment:n {multline*}
- }
- }
- }
-}
-\if\g@EQ@ntheorem@support@bool
-\else
- \expandafter\endinput
-\fi
-\def\default_raisetag:{\nobreak}
-\def\raisetag#1{
- \skip@#1\relax
- \xdef\raise@tag{\default_raisetag:
- \vskip\iftagsleft@\else:-\fi:\the\skip@\relax}}
-\MH_let:NwN\raise@tag\default_raisetag:
-\def\displ@y@{\@display@init{%
- \global\column@\z@ \global\dspbrk@lvl\m@ne
- \global\tag@false \global\MH_let:NwN\raise@tag\default_raisetag:
-}}
-\def\MT_gobblelabel:w #1{\@ifnextchar[{\EQ_gobbleoptional:w}{}}
-\def\EQ_gobbleoptional:w [#1]{}
-\def\gmeasure@#1{%
- \begingroup
- \measuring@true
- \totwidth@\z@
- \global\MH_let:NwN\tag@lengths\@empty
- \savecounters@
- \setbox\@ne\vbox{%
- \everycr{\noalign{\global\tag@false
- \global\MH_let:NwN\raise@tag\default_raisetag:
- \global\column@\z@}}%
- \MH_let:NwN\label\MT_gobblelabel:w
- \halign{%
- \setboxz@h{$\m@th\displaystyle{##}$}%
- \if_dim:w \wdz@>\totwidth@
- \global\totwidth@\wdz@
- \fi:
- &\setboxz@h{\strut@{##}}%
- \savetaglength@
- \crcr
- #1%
- \math@cr@@@
- }%
- }%
- \restorecounters@
- \if@fleqn
- \global\advance\totwidth@\@mathmargin
- \fi:
- \iftagsleft@
- \if_dim:w \totwidth@>\displaywidth
- \global\MH_let:NwN\gdisplaywidth@\totwidth@
- \else:
- \global\MH_let:NwN\gdisplaywidth@\displaywidth
- \fi:
- \fi:
- \endgroup
-}
-\def\measure@#1{%
- \begingroup
- \measuring@true
- \global\eqnshift@\z@
- \global\alignsep@\z@
- \global\MH_let:NwN\tag@lengths\@empty
- \global\MH_let:NwN\field@lengths\@empty
- \savecounters@
- \global\setbox0\vbox{%
- \MH_let:NwN\math@cr@@@\math@cr@@@align@measure
- \everycr{\noalign{\global\tag@false
- \global\MH_let:NwN\raise@tag\default_raisetag:
- \global\column@\z@}}%
- \MH_let:NwN\label\MT_gobblelabel:w
- \global\row@\z@
- \tabskip\z@
- \halign{\span\align@preamble\crcr
- #1%
- \math@cr@@@
- \global\column@\z@
- \add@amps\maxfields@\cr
- }%
- }%
- \restorecounters@
- \ifodd\maxfields@
- \global\advance\maxfields@\@ne
- \fi:
- \if_num:w \xatlevel@=\tw@
- \if_num:w \maxfields@<\thr@@
- \MH_let:NwN\xatlevel@\z@
- \fi:
- \fi:
- \setbox\z@\vbox{%
- \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox
- }%
- \global\totwidth@\wd\@ne
- \if@fleqn \global\advance\totwidth@\@mathmargin \fi:
- \global\MH_let:NwN\maxcolumn@widths\@empty
- \begingroup
- \MH_let:NwN\or:\relax
- \loop
- \global\setbox\@ne\hbox{%
- \unhbox\@ne \unskip \global\setbox\thr@@\lastbox
- }%
- \ifhbox\thr@@
- \xdef\maxcolumn@widths{ \or: \the\wd\thr@@ \maxcolumn@widths}%
- \repeat
- \endgroup
- \dimen@\displaywidth
- \advance\dimen@-\totwidth@
- \if_case:w \xatlevel@
- \global\alignsep@\z@
- \MH_let:NwN\minalignsep\z@
- \@tempcntb\z@
- \if@fleqn
- \@tempcnta\@ne
- \global\eqnshift@\@mathmargin
- \else:
- \@tempcnta\tw@
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \fi:
- \or:
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \@tempcnta\@tempcntb
- \advance\@tempcntb\m@ne
- \if@fleqn
- \global\eqnshift@\@mathmargin
- \global\alignsep@\dimen@
- \global\divide\alignsep@\@tempcnta
- \else:
- \global\advance\@tempcnta\@ne
- \global\eqnshift@\dimen@
- \global\divide\eqnshift@\@tempcnta
- \global\alignsep@\eqnshift@
- \fi:
- \or:
- \@tempcntb\maxfields@
- \divide\@tempcntb\tw@
- \global\advance\@tempcntb\m@ne
- \global\@tempcnta\@tempcntb
- \global\eqnshift@\z@
- \global\alignsep@\dimen@
- \if@fleqn
- \global\advance\alignsep@\@mathmargin\relax
- \fi:
- \global\divide\alignsep@\@tempcntb
- \fi:
- \if_dim:w \alignsep@<\minalignsep\relax
- \global\alignsep@\minalignsep\relax
- \if_dim:w \eqnshift@>\z@
- \if@fleqn\else:
- \global\eqnshift@\displaywidth
- \global\advance\eqnshift@-\totwidth@
- \global\advance\eqnshift@-\@tempcntb\alignsep@
- \global\divide\eqnshift@\tw@
- \fi:
- \fi:
- \fi:
- \if_dim:w \eqnshift@<\z@
- \global\eqnshift@\z@
- \fi:
- \calc@shift@align
- \global\tagshift@\totwidth@
- \global\advance\tagshift@\@tempcntb\alignsep@
- \if@fleqn
- \if_num:w \xatlevel@=\tw@
- \global\advance\tagshift@-\@mathmargin\relax
- \fi:
- \else:
- \global\advance\tagshift@\eqnshift@
- \fi:
- \iftagsleft@ \else:
- \global\advance\tagshift@-\displaywidth
- \fi:
- \dimen@\minalignsep\relax
- \global\advance\totwidth@\@tempcntb\dimen@
- \if_dim:w \totwidth@>\displaywidth
- \global\MH_let:NwN\displaywidth@\totwidth@
- \else:
- \global\MH_let:NwN\displaywidth@\displaywidth
- \fi:
- \endgroup
-}
-\def\EQ_multline_labelhack:n #1{%
- \begingroup\measuring@false\label@in@display{#1}\endgroup}
-\def\EQ_multline_labelhack_opt:nw #1[#2]{%
- \begingroup\measuring@false\label@in@display{#1}[#2]\endgroup}
-\def\multline@#1{%
- \Let@
- \@display@init{\global\advance\row@\@ne \global\dspbrk@lvl\m@ne}%
- \chardef\dspbrk@context\z@
- \restore@math@cr
- \MH_let:NwN\tag\tag@in@align
- \global\tag@false \global\MH_let:NwN\raise@tag\default_raisetag:
- \mmeasure@{#1}%
- \MH_let:NwN\tag\gobble@tag
- \MH_let:NwN\label\MT_gobblelabel:w
- \tabskip \if@fleqn \@mathmargin \else: \z@skip \fi:
- \totwidth@\displaywidth
- \if@fleqn
- \advance\totwidth@-\@mathmargin
- \fi:
- \halign\bgroup
- \hbox to\totwidth@{%
- \if@fleqn
- \hskip \@centering \relax
- \else:
- \hfil
- \fi:
- \strut@
- $\m@th\displaystyle{}##\endmultline@math%$
- \hfil
- }%
- \crcr
- \if@fleqn
- \hskip-\@mathmargin
- \def\multline@indent{\hskip\@mathmargin}% put it back
- \else:
- \hfilneg
- \def\multline@indent{\hskip\multlinegap}%
- \fi:
- \iftagsleft@
- \iftag@
- \begingroup
- \ifshifttag@
- \rlap{\vbox{%
- \normalbaselines
- \hbox{%
- \strut@
- \make@display@tag
- }%
- \vbox to\lineht@{}%
- \raise@tag
- }}%
- \multline@indent
- \else:
- \setbox\z@\hbox{\make@display@tag}%
- \dimen@\@mathmargin \advance\dimen@-\wd\z@
- \if_dim:w \dimen@<\multlinetaggap
- \dimen@\multlinetaggap
- \fi:
- \box\z@ \hskip\dimen@\relax
- \fi:
- \endgroup
- \else:
- \multline@indent
- \fi:
- \else:
- \multline@indent
- \fi:
- #1%
-}
-\def\mmeasure@#1{%
- \begingroup
- \measuring@true
- \def\label##1{%
- \@ifnextchar[
- {\EQ_multline_labelhack_opt:nw {##1}}
- {\EQ_multline_labelhack:n {##1}}
- }
- \def\math@cr@@@{\cr}%
- \MH_let:NwN\shoveleft\@iden \MH_let:NwN\shoveright\@iden
- \savecounters@
- \global\row@\z@
- \setbox\@ne\vbox{%
- \global\MH_let:NwN\df@tag\@empty
- \halign{%
- \setboxz@h{\@lign$\m@th\displaystyle{}##$}%
- \iftagsleft@
- \if_num:w \row@=\@ne
- \global\totwidth@\wdz@
- \global\lineht@\ht\z@
- \fi:
- \else:
- \global\totwidth@\wdz@
- \global\lineht@\dp\z@
- \fi:
- \crcr
- #1%
- \crcr
- }%
- }%
- \if_meaning:NN
- \df@tag\@empty
- \else:
- \global\tag@true
- \fi:
- \if@eqnsw\global\tag@true\fi:
- \iftag@
- \setboxz@h{%
- \if@eqnsw
- \stepcounter{equation}%
- \tagform@\theequation
- \else:
- \df@tag
- \fi:
- }%
- \global\tagwidth@\wdz@
- \dimen@\totwidth@
- \advance\dimen@\tagwidth@
- \advance\dimen@\multlinetaggap
- \iftagsleft@\else:
- \if@fleqn
- \advance\dimen@\@mathmargin
- \fi:
- \fi:
- \if_dim:w \dimen@>\displaywidth
- \global\shifttag@true
- \else:
- \global\shifttag@false
- \fi:
- \fi:
- \restorecounters@
- \endgroup
-}
-\newlength\mintagvsep
-\mintagvsep5pt
-\def\EQ_only_endmark:{%
- \MH_set_boolean_T:n {show_manual_tags}
- \global\tag@true
- \iftagsleft@
- \gdef\df@tag{%
- \hbox to \displaywidth{%
- \hss
- \raisebox{-\normallineskip
- -\depthof{\EQ_outerbox:{}}
- -\heightof{\EQ_outerbox:{}}
- -\dp\EQ_mathdisplay_box
- -\ht\EQ_mathdisplay_box}
- [0pt][0pt]{\PotEndMark{\maketag@@@}}}}
- \else:
- \gdef\df@tag{%
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}
- {\PotEndMark{\maketag@@@}}}%
- \fi:}
-\def\EQ_tag_plus_endmark:{%
- \iftagsleft@
- \gdef\maketag@@@##1{%
- \hfuzz\displaywidth
- \makebox[\widthof{##1}][l]{%
- \hbox to \displaywidth{\m@th\normalfont##1\hss
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}
- {\PotEndMark{\hss}}}}}%
- \else:
- \gdef\maketag@@@##1{%
- \hbox{\m@th\normalfont##1\llap{\hss\PotEndMark{%
- \settoheight{\@tempdima}{\@nameuse{\InTheoType Symbol}}%
- \MH_addtolength:dn \@tempdima
- {\g_EQ_bottomtag_depth_dim+\mintagvsep}
- \setlength{\@tempdimb}
- {\g_EQ_bottomrow_depth_dim+\depthof{\EQ_outerbox:{}}
- +\depthof{\EQ_innerbox:{}}}
- \if_dim:w \@tempdima>\@tempdimb
- \MH_setlength:dn \@tempdima{-\dp\EQ_mathdisplay_box
- -\@tempdima+\g_EQ_bottomrow_depth_dim}
- \addtolength{\@tempdima}{\depthof{\EQ_innerbox:{}}}%
- \def\EQ_next:{\raisebox{\@tempdima}}%
- \else:
- \def\EQ_next:{
- \raisebox{-\dp\EQ_mathdisplay_box
- -\depthof{\EQ_outerbox:{}}}}%
- \fi:\EQ_next:}}}}%
- \fi:}
-\MH_let:NwN \MT_nonumber: \nonumber
-\def\g_EQ_latest_nonzerodepth_row_fint{\z@}
-\renewcommand*\nonumber{
- \@tempcnta=\row@
- \if_num:w \l_EQ_equationtype_int=\thr@@
- \advance\@tempcnta\m@ne
- \else:
- \if_num:w \l_EQ_equationtype_int=4\relax
- \advance\@tempcnta\m@ne
- \fi:
- \fi:
- \if_num:w \g_EQ_latest_nonzerodepth_row_fint=\@tempcnta
- \else:
- \global\g_EQ_bottomtag_depth_dim=-\baselineskip
- \fi:
- \MT_nonumber:
-}
-\endinput
-%%
-%% End of file `empheq.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/flexisym.sty b/Master/texmf-dist/tex/latex/mh/flexisym.sty
deleted file mode 100644
index 3b4cc50f7dd..00000000000
--- a/Master/texmf-dist/tex/latex/mh/flexisym.sty
+++ /dev/null
@@ -1,422 +0,0 @@
-%%
-%% This is file `flexisym.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% flexisym.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file flexisym.dtx
-%% and the derived files
-%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%%
-\RequirePackage{expl3}[2009/08/05]
-\ProvidesExplPackage{flexisym}{2013/03/16}{0.97c}{Make math characters macros}
-
-\edef\do{%
- \noexpand\AtEndOfPackage{%
- \catcode\number`\"=\number\catcode`\"
- \relax
- }%
-}
-\do \let\do\relax
-\catcode`\"=12
-\let\@sym\@gobble
-\DeclareOption{robust}{%
- \def\@sym#1{%
- \ifx\protect\@typeset@protect \else\protect#1\exp_after:wN\use_none:nnnn\fi
- }%
-}
-\def\mg@bin{2}% binary operators
-\def\mg@rel{2}% relations
-%%\def\mg@nre{B}% negated relations
-\def\mg@del{3}% delimiters
-%%\def\mg@arr{B}% arrows
-\def\mg@acc{0}% accents
-\def\mg@cop{3}% cumulative operators (sum, int)
-\def\mg@latin{1}% (Latin) letters
-\def\mg@greek{1}% (lowercase) Greek
-\def\mg@Greek{0}% (capital) Greek
-%%\def\mg@bflatin{4}% bold upright Latin letters ?
-%%\def\mg@Bbb{B}% blackboard bold
-\def\mg@cal{2}% script/calligraphic
-%%\def\mg@frak{5}% Fraktur letters
-\def\mg@digit{0}% decimal digits % 1 = oldstyle, 0 = capital
-\cs_set_protected:Nn \math_char:NNn {
- \tex_mathchar:D \__int_eval:w " #1#2#3 \__int_eval_end:
-}
-\cs_set_protected:Nn \math_delimiter:NNnNn {
- \tex_delimiter:D \__int_eval:w " #1#2#3#4#5 \__int_eval_end:
-}
-\cs_set_protected:Nn \math_radical:NnNn {
- \tex_radical:D \__int_eval:w " #1#2#3#4 \__int_eval_end:
-}
-\cs_set_protected:Nn \math_accent:NNnn {
- \tex_mathaccent:D \__int_eval:w " #1 #2 #3 \__int_eval_end: {#4}
-}
-
-\let\sumlimits\displaylimits
-\let\intlimits\nolimits
-\let\namelimits\displaylimits
-\cs_new:Npn \math_bsym_Ord:Nn {\math_char:NNn 0 }% \m@Ord
-\cs_new:Npn \math_bsym_Var:Nn {\math_char:NNn 7 }% \m@Var
-\cs_new:Npn \math_bsym_Bin:Nn {\math_char:NNn 2}% \m@Bin
-\cs_new:Npn \math_bsym_Rel:Nn {\math_char:NNn 3 }% \m@Bin
-\cs_new:Npn \math_bsym_Pun:Nn {\math_char:NNn 6 }%\m@Pun
-\cs_new:Nn \math_bsym_COs:Nn { \math_char:NNn 1#1{#2} \sumlimits}% \m@COs
-\cs_new:Nn \math_bsym_COi:Nn { \math_char:NNn 1#1{#2} \intlimits}% \m@COi
-\cs_new:Nn \math_bsym_DeL:Nn { \math_sd_del_aux:Nnn 4 #1{#2} }%\m@DeL
-\cs_new:Nn \math_bsym_DeR:Nn { \math_sd_del_aux:Nnn 5 #1{#2} } %\m@DeR
-\cs_new:Nn \math_bsym_DeB:Nn { \math_sd_del_aux:Nnn 0 #1{#2} }%\m@DeB
-\cs_new:Nn \math_bsym_DeA:Nn { \math_sd_del_aux:Nnn 3 #1{#2} }%\m@DeA
-\cs_new:Nn \math_bsym_Rad:Nn { \math_sd_rad_aux:Nn #1{#2} }%\m@Rad
-\cs_new:Npn \math_bsym_Acc:Nn #1#2#3#4 {\math_accent:NNnn #1#2{#3}{#4}}% name is wrong
-
-\cs_set:Npn \math_sd_del_aux:Nnn #1#2#3{
- \exp_args:Nf \math_sd_del_auxi:nN {\use:c{sd@#2#3}} #1 #2{#3}
-}
-\cs_set:Npn \math_sd_del_auxi:nN #1#2{ \math_delimiter:NNnNn #2 #1 }
-\cs_set:Npn \math_sd_rad_aux:Nn #1#2{
- \exp_args:Nf \math_sd_rad_auxi:n {\use:c{sd@#1#2}} #1 {#2}
-}
-\cs_set:Npn \math_sd_rad_auxi:n #1{ \math_radical:NnNn #1 }
-
-\cs_set_protected:Npn \math_bcsym_Ord:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symOrd
-\cs_set_protected:Npn \math_bcsym_Var:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Bin:Nn #1#2{\@symtype\mathbin{\OrdSymbol{#2}}}%\@symBin
-\cs_set_protected:Npn \math_bcsym_Rel:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symRel
-\cs_set_protected:Npn \math_bcsym_Pun:Nn #1#2{\@symtype\mathpunct{\OrdSymbol{#2}}}%\@symPun
-\cs_set_protected:Npn \math_bcsym_COi:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\intlimits}}%\@symCOi
-\cs_set_protected:Npn \math_bcsym_COs:Nn #1#2{\@symtype\mathop{\OrdSymbol{#2}\sumlimits}}%\@symCOs
-\cs_set_protected:Npn \math_bcsym_DeL:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symDeL
-\cs_set_protected:Npn \math_bcsym_DeR:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symDeR
-\cs_set_protected:Npn \math_bcsym_DeB:Nn #1#2{\@symtype\mathord{\OrdSymbol{#2}}}%\@symDeB
-\cs_set_protected:Npn \math_bcsym_DeA:Nn #1#2{\@symtype\mathrel{\OrdSymbol{#2}}}%\@symDeA
-\cs_set_protected:Npn \math_bcsym_Acc:Nn {\@sym}%\@symAcc FIX!
-\cs_set_protected:Npn \math_bcsym_Ope:Nn #1#2{\@symtype\mathopen{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Clo:Nn #1#2{\@symtype\mathclose{\OrdSymbol{#2}}}%\@symVar
-\cs_set_protected:Npn \math_bcsym_Inn:Nn #1#2{\@symtype\mathinner{\OrdSymbol{#2}}}%\@symVar
-
-\let\@symtype\@firstofone
-\let\sym@global\global
-\cs_new:Npn \math_isym_Ord:Nn {\math_bsym_Ord:Nn }% \m@Ord
-\cs_new:Npn \math_isym_Var:Nn {\math_bsym_Var:Nn }% \m@Var
-\cs_new:Npn \math_isym_Bin:Nn {\math_bsym_Bin:Nn}% \m@Bin
-\cs_new:Npn \math_isym_Rel:Nn {\math_bsym_Rel:Nn }% \m@Bin
-\cs_new:Npn \math_isym_Pun:Nn {\math_bsym_Pun:Nn }%\m@Pun
-\cs_new:Npn \math_isym_COs:Nn {\math_bsym_COs:Nn}% \m@COs
-\cs_new:Npn \math_isym_COi:Nn {\math_bsym_COi:Nn}% \m@COi
-\cs_new:Npn \math_isym_DeL:Nn {\math_bsym_DeL:Nn}%\m@DeL
-\cs_new:Npn \math_isym_DeR:Nn{ \math_bsym_DeR:Nn}%\m@DeR
-\cs_new:Npn \math_isym_DeB:Nn{ \math_bsym_DeB:Nn }%\m@DeB
-\cs_new:Npn \math_isym_DeA:Nn { \math_bsym_DeA:Nn }%\m@DeA
-\cs_new:Npn \math_isym_Rad:Nn { \math_bsym_Rad:Nn}%\m@Rad
-\cs_new:Npn \math_isym_Acc:Nn {\math_bsym_DeL:Nn}% name is wrong
-\cs_set_protected:Npn \math_icsym_Ord:Nn {\math_bcsym_Ord:Nn}
-\cs_set_protected:Npn \math_icsym_Var:Nn {\math_bcsym_Var:Nn}
-\cs_set_protected:Npn \math_icsym_Bin:Nn {\math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_icsym_Rel:Nn {\math_bcsym_Rel:Nn}
-\cs_set_protected:Npn \math_icsym_Pun:Nn {\math_bcsym_Pun:Nn}
-\cs_set_protected:Npn \math_icsym_COi:Nn {\math_bcsym_COi:Nn}
-\cs_set_protected:Npn \math_icsym_COs:Nn {\math_bcsym_COs:Nn}
-\cs_set_protected:Npn \math_icsym_DeL:Nn {\math_bcsym_DeL:Nn}
-\cs_set_protected:Npn \math_icsym_DeR:Nn {\math_bcsym_DeR:Nn}
-\cs_set_protected:Npn \math_icsym_DeB:Nn {\math_bcsym_DeB:Nn}
-\cs_set_protected:Npn \math_icsym_DeA:Nn {\math_bcsym_DeA:Nn}
-\cs_set_protected:Npn \math_icsym_Acc:Nn {\math_bcsym_Acc:Nn}
-\cs_set_protected:Npn \math_icsym_Ope:Nn {\math_bcsym_Ope:Nn}
-\cs_set_protected:Npn \math_icsym_Clo:Nn {\math_bcsym_Clo:Nn}
-\cs_set_protected:Npn \math_icsym_Inn:Nn {\math_bcsym_Inn:Nn}
-\cs_new:Npn \math_dsym_Ord:Nn {\math_bsym_Ord:Nn }
-\cs_new:Npn \math_dsym_Var:Nn {\math_bsym_Var:Nn }
-\cs_new:Npn \math_dsym_Bin:Nn {\math_bsym_Bin:Nn}
-\cs_new:Npn \math_dsym_Rel:Nn {\math_bsym_Rel:Nn }
-\cs_new:Npn \math_dsym_Pun:Nn {\math_bsym_Pun:Nn }
-\cs_new:Npn \math_dsym_COs:Nn {\math_bsym_COs:Nn}
-\cs_new:Npn \math_dsym_COi:Nn {\math_bsym_COi:Nn}
-\cs_new:Npn \math_dsym_DeL:Nn {\math_bsym_DeL:Nn}
-\cs_new:Npn \math_dsym_DeR:Nn{ \math_bsym_DeR:Nn}
-\cs_new:Npn \math_dsym_DeB:Nn{ \math_bsym_DeB:Nn }
-\cs_new:Npn \math_dsym_DeA:Nn { \math_bsym_DeA:Nn }
-\cs_new:Npn \math_dsym_Rad:Nn { \math_bsym_Rad:Nn}
-\cs_new:Npn \math_dsym_Acc:Nn {\math_bsym_DeL:Nn}
-\cs_set_protected:Npn \math_dcsym_Ord:Nn {\math_bcsym_Ord:Nn}
-\cs_set_protected:Npn \math_dcsym_Var:Nn {\math_bcsym_Var:Nn}
-\cs_set_protected:Npn \math_dcsym_Bin:Nn {\math_bcsym_Bin:Nn}
-\cs_set_protected:Npn \math_dcsym_Rel:Nn {\math_bcsym_Rel:Nn}
-\cs_set_protected:Npn \math_dcsym_Pun:Nn {\math_bcsym_Pun:Nn}
-\cs_set_protected:Npn \math_dcsym_COi:Nn {\math_bcsym_COi:Nn}
-\cs_set_protected:Npn \math_dcsym_COs:Nn {\math_bcsym_COs:Nn}
-\cs_set_protected:Npn \math_dcsym_DeL:Nn {\math_bcsym_DeL:Nn}
-\cs_set_protected:Npn \math_dcsym_DeR:Nn {\math_bcsym_DeR:Nn}
-\cs_set_protected:Npn \math_dcsym_DeB:Nn {\math_bcsym_DeB:Nn}
-\cs_set_protected:Npn \math_dcsym_DeA:Nn {\math_bcsym_DeA:Nn}
-\cs_set_protected:Npn \math_dcsym_Acc:Nn {\math_bcsym_Acc:Nn}
-\cs_set_protected:Npn \math_dcsym_Ope:Nn {\math_bcsym_Ope:Nn}
-\cs_set_protected:Npn \math_dcsym_Clo:Nn {\math_bcsym_Clo:Nn}
-\cs_set_protected:Npn \math_dcsym_Inn:Nn {\math_bcsym_Inn:Nn}
-\cs_set:Npn \math_setup_inline_symbols:{
- \cs_set_eq:NN \math_sym_Ord:Nn \math_isym_Ord:Nn
- \cs_set_eq:NN \math_sym_Var:Nn \math_isym_Var:Nn
- \cs_set_eq:NN \math_sym_Bin:Nn \math_isym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_isym_Rel:Nn
- \cs_set_eq:NN \math_sym_Pun:Nn \math_isym_Pun:Nn
- \cs_set_eq:NN \math_sym_COs:Nn \math_isym_COs:Nn
- \cs_set_eq:NN \math_sym_COi:Nn \math_isym_COi:Nn
- \cs_set_eq:NN \math_sym_DeL:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeR:Nn \math_isym_DeR:Nn
- \cs_set_eq:NN \math_sym_DeB:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeA:Nn \math_isym_DeA:Nn
- \cs_set_eq:NN \math_sym_Rad:Nn \math_isym_Rad:Nn
- \cs_set_eq:NN \math_sym_Acc:Nn \math_isym_DeL:Nn
- \cs_set_eq:NN \math_csym_Ord:Nn \math_icsym_Ord:Nn
- \cs_set_eq:NN \math_csym_Var:Nn \math_icsym_Var:Nn
- \cs_set_eq:NN \math_csym_Bin:Nn \math_icsym_Bin:Nn
- \cs_set_eq:NN \math_csym_Rel:Nn \math_icsym_Rel:Nn
- \cs_set_eq:NN \math_csym_Pun:Nn \math_icsym_Pun:Nn
- \cs_set_eq:NN \math_csym_COi:Nn \math_icsym_COi:Nn
- \cs_set_eq:NN \math_csym_COs:Nn \math_icsym_COs:Nn
- \cs_set_eq:NN \math_csym_DeL:Nn \math_icsym_DeL:Nn
- \cs_set_eq:NN \math_csym_DeR:Nn \math_icsym_DeR:Nn
- \cs_set_eq:NN \math_csym_DeB:Nn \math_icsym_DeB:Nn
- \cs_set_eq:NN \math_csym_DeA:Nn \math_icsym_DeA:Nn
- \cs_set_eq:NN \math_csym_Acc:Nn \math_icsym_Acc:Nn
- \cs_set_eq:NN \math_csym_Ope:Nn \math_icsym_Ope:Nn
- \cs_set_eq:NN \math_csym_Clo:Nn \math_icsym_Clo:Nn
- \cs_set_eq:NN \math_csym_Inn:Nn \math_icsym_Inn:Nn
-}
-
-\cs_set:Npn \math_setup_display_symbols:{
- \cs_set_eq:NN \math_sym_Ord:Nn \math_dsym_Ord:Nn
- \cs_set_eq:NN \math_sym_Var:Nn \math_dsym_Var:Nn
- \cs_set_eq:NN \math_sym_Bin:Nn \math_dsym_Bin:Nn
- \cs_set_eq:NN \math_sym_Rel:Nn \math_dsym_Rel:Nn
- \cs_set_eq:NN \math_sym_Pun:Nn \math_dsym_Pun:Nn
- \cs_set_eq:NN \math_sym_COs:Nn \math_dsym_COs:Nn
- \cs_set_eq:NN \math_sym_COi:Nn \math_dsym_COi:Nn
- \cs_set_eq:NN \math_sym_DeL:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeR:Nn \math_dsym_DeR:Nn
- \cs_set_eq:NN \math_sym_DeB:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_sym_DeA:Nn \math_dsym_DeA:Nn
- \cs_set_eq:NN \math_sym_Rad:Nn \math_dsym_Rad:Nn
- \cs_set_eq:NN \math_sym_Acc:Nn \math_dsym_DeL:Nn
- \cs_set_eq:NN \math_csym_Ord:Nn \math_dcsym_Ord:Nn
- \cs_set_eq:NN \math_csym_Var:Nn \math_dcsym_Var:Nn
- \cs_set_eq:NN \math_csym_Bin:Nn \math_dcsym_Bin:Nn
- \cs_set_eq:NN \math_csym_Rel:Nn \math_dcsym_Rel:Nn
- \cs_set_eq:NN \math_csym_Pun:Nn \math_dcsym_Pun:Nn
- \cs_set_eq:NN \math_csym_COi:Nn \math_dcsym_COi:Nn
- \cs_set_eq:NN \math_csym_COs:Nn \math_dcsym_COs:Nn
- \cs_set_eq:NN \math_csym_DeL:Nn \math_dcsym_DeL:Nn
- \cs_set_eq:NN \math_csym_DeR:Nn \math_dcsym_DeR:Nn
- \cs_set_eq:NN \math_csym_DeB:Nn \math_dcsym_DeB:Nn
- \cs_set_eq:NN \math_csym_DeA:Nn \math_dcsym_DeA:Nn
- \cs_set_eq:NN \math_csym_Acc:Nn \math_dcsym_Acc:Nn
- \cs_set_eq:NN \math_csym_Ope:Nn \math_dcsym_Ope:Nn
- \cs_set_eq:NN \math_csym_Clo:Nn \math_dcsym_Clo:Nn
- \cs_set_eq:NN \math_csym_Inn:Nn \math_dcsym_Inn:Nn
-}
-\math_setup_inline_symbols:
-\edef\tmp{\catcode\z@=\the\catcode\z@}
-\catcode\z@=\active
-\def\DeclareFlexSymbol#1#2#3#4{%
- \begingroup
- \cs_set_protected:Npx\@tempb{
- \exp_not:N\@sym\exp_not:N#1\exp_not:c{math_sym_#2:Nn}
- \exp_not:c{mg@#3}{#4}
- }
- \ifcat\exp_not:N#1\relax
- \sym@global\let#1\@tempb
- \else
- \sym@global\mathcode`#1="8000\relax
- \lccode\z@=`#1\relax
- \lowercase{\sym@global\let^^@\@tempb}% zero char
- \fi
- \endgroup
-}
-\tmp % restore catcode
-\cs_set:Npn \DeclareFlexDelimiter #1#2#3#4#5#6{
- \DeclareFlexSymbol{#1}{#2}{#3}{#4}
- \cs_gset:cpx{sd@\use:c{mg@#3}#4}{\exp_not:c{mg@#5}{#6}}
-}
-
-\def\DeclareFlexCompoundSymbol#1#2#3{%
- \exp_args:NNo \DeclareRobustCommand#1{\csname math_csym_#2:Nn\endcsname#1{#3}}%
- \sym@global\let#1#1\relax
-}
-\DeclareRobustCommand\textchar{\text@char\textfont}
-\DeclareRobustCommand\scriptchar{\text@char\scriptfont}%
-\def\text@char@sym#1#2#3#4{% #3=fam, #4=slot
- \begingroup
- \cs_set_eq:NN \@sym \prg_do_nothing: % defense against infinite loops
- \the\text@script@char#3%
- \char"#4\endgroup
-}
-\edef\tmp{\catcode\z@=\the\catcode\z@}
-\catcode\z@=\active
-\def\text@char#1#2{\begingroup
- \check@mathfonts
- \cs_set_eq:NN \text@script@char#1
- \cs_set_eq:NN \@sym\text@char@sym
- \cs_set_eq:NN \@symtype\use_ii:nn
- \cs_set_eq:NN\OrdSymbol\use:n
- \cs_set_eq:NN\ifmmode\iftrue
- \everymath{$\use_none:n}%$
- \def\mkern{\muskip\z@}
- \cs_set_eq:NN\mskip\mkern
- \ifcat\relax\noexpand#2% true if #2 is a cs.
- #2%
- \else
- \lccode\z@=\expandafter`\string#2\relax
- \lowercase{^^@}%
- \fi
- \endgroup
-}
-\tmp % restore catcode
-\providecommand\textprime{}
-\DeclareRobustCommand\textprime{\leavevmode
- \raise.8ex\hbox{\text@char\scriptfont\prime}%
-}
-\@ifundefined{resetMathstrut@}{}{%
- \def\resetMathstrut@{%
- \setbox\z@\hbox{\textchar\vert}%
- \ht\Mathstrutbox@\ht\z@ \dp\Mathstrutbox@\dp\z@
- }%
-}
-\@ifundefined{rightarrowfill@}{}{%
- \def\rightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\copy\z@\mkern-7mu\cleaders
- \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
- \mkern-6mu\OrdSymbol{\rightarrow}$}
- \def\leftarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
- \hbox{$#1\mkern-2mu\copy\z@\mkern-2mu$}\hfill
- \mkern-7mu\box\z@$}
- \def\leftrightarrowfill@#1{\m@th\setboxz@h{$#1\relbar$}\ht\z@\z@
- $#1\OrdSymbol{\leftarrow}\mkern-6mu\cleaders
- \hbox{$#1\mkern-2mu\box\z@\mkern-2mu$}\hfill
- \mkern-6mu\OrdSymbol{\rightarrow}$}
-}
-\def\binrel@sym#1#2#3#4{%
- \xdef\binrel@@##1{%
- \ifx\math_sym_Ord:Nn #2 \math_csym_Ord:Nn
- \else\ifx\math_sym_Var:Nn#2 \math_csym_Var:Nn
- \else\ifx\math_sym_COs:Nn#2 \math_csym_COs:Nn
- \else\ifx\math_sym_COi:Nn#2 \math_csym_COi:Nn
- \else\ifx\math_sym_Bin:Nn#2 \math_csym_Bin:Nn
- \else\ifx\math_sym_Rel:Nn#2 \math_csym_Rel:Nn
- \else\ifx\math_sym_Pun:Nn#2 \math_csym_Pun:Nn
- \else\exp_not:N\@symErr \fi\fi\fi\fi\fi\fi\fi
- ?{\exp_not:N\OrdSymbol{##1}}}%
-}
-
-\def\binrel@a{%
- \def\math_sym_Ord:Nn##1##2{\gdef\binrel@@####1{\math_sym_Ord:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Var:Nn##1##2{\gdef\binrel@@####1{\math_sym_Var:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_COs:Nn##1##2{\gdef\binrel@@####1{\math_sym_COs:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_COi:Nn##1##2{\gdef\binrel@@####1{\math_sym_COi:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Bin:Nn##1##2{\gdef\binrel@@####1{\math_sym_Bin:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Rel:Nn##1##2{\gdef\binrel@@####1{\math_sym_Rel:Nn##1{\OrdSymbol{####1}}}}%
- \def\math_sym_Pun:Nn##1##2{\gdef\binrel@@####1{\math_sym_Pun:Nn##1{\OrdSymbol{####1}}}}%
-}
-\def\binrel@#1{%
- \setbox\z@\hbox{$%
- \let\mathchoice\@gobblethree
- \let\@sym\binrel@sym \binrel@a
- #1$}%
-}
-\def\@symextension{sym}
-\newcommand\usesymbols[1]{%
- \clist_map_variable:nNn{#1}\@tempb{%
- \exp_args:No\@onefilewithoptions{\@tempb}[][]\@symextension
- }%
-}
-\newcommand\ProvidesSymbols[1]{\ProvidesFile{#1.sym}}
-\DeclareRobustCommand{\not}[1]{\math_csym_Rel:Nn\not{\OrdSymbol{\notRel#1}}}
-\DeclareRobustCommand{\OrdSymbol}[1]{%
- \begingroup\mathchars@reset#1\endgroup
-}
-\def\mathchars@reset{\let\@sym\@sym@ord \let\@symtype\@symtype@ord
- \let\OrdSymbol\relax}
-\def\@symtype@ord#1#{}% a strange sort of \@gobble
-\def\@sym@ord#1#2{\exp_after:wN\@sym@ord@a\string#2\@nil}%
-\begingroup
-\lccode`\.=`\_ \lowercase{\endgroup
-\def\@sym@ord@a#1.#2.}#3#4\@nil#5#6{%
- \if D#3
- %\math_ord_delim_aux:Nn #5{#6}
- \math_sd_del_aux:Nnn 0 #5{#6}% check if this works!
- \else
- \math_char:NNn 0 #5{#6}
- \fi
-}
-\cs_set:Nn \math_ord_delim_aux:Nn {
- \math_sd_aux:nn { \math_char:NNn 0 } {#1{#2}}
-}
-\@ifpackageloaded{amsmath}{%
- \begingroup
- \long\def\next#1\mathchardef\std@minus\mathcode`\-\relax
- \mathchardef\std@equal\mathcode`\=\relax#2\flexi@stop{%
- \toks@{#1#2}%
- \xdef\@begindocumenthook{\the\toks@}%
- }%
- \expandafter\next\@begindocumenthook\flexi@stop
- \endgroup
-}{}
-\AtBeginDocument{%
-\def\newmcodes@{%
- \mathcode `\'39\space
- \mathcode `\*42\space
- \mathcode `\."613A\space
- \ifnum\mathcode`\-=45\space
- \else
- \ifnum\mathcode`\-=32768\space
- \else
- \mathchardef \std@minus \mathcode `\-\relax
- \fi
- \fi
- \mathcode `\-45\space
- \mathcode `\/47\space
- \mathcode `\:"603A\space\relax
-}%
-}
-\DeclareOption{mathstyleoff}{%
- \PassOptionsToPackage{noactivechars}{mathstyle}}
-\DeclareOption{cmbase}{\usesymbols{cmbase}}
-\DeclareOption{mathpazo}{\usesymbols{mathpazo}}
-\DeclareOption{mathptmx}{\usesymbols{mathptmx}}
-\ExecuteOptions{cmbase}
-\ProcessOptions\relax
-\renewcommand{\lnot}{\neg}
-\renewcommand{\land}{\wedge}
-\renewcommand{\lor}{\vee}
-\renewcommand{\le}{\leq}
-\renewcommand{\ge}{\geq}
-\renewcommand{\ne}{\neq}
-\renewcommand{\owns}{\ni}
-\renewcommand{\gets}{\leftarrow}
-\renewcommand{\to}{\rightarrow}
-\renewcommand{\|}{\Vert}
-\RequirePackage{mathstyle}
-\endinput
-%%
-%% End of file `flexisym.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathpazo.sym b/Master/texmf-dist/tex/latex/mh/mathpazo.sym
deleted file mode 100644
index ffbdd9b72d7..00000000000
--- a/Master/texmf-dist/tex/latex/mh/mathpazo.sym
+++ /dev/null
@@ -1,375 +0,0 @@
-%%
-%% This is file `mathpazo.sym',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% flexisym.dtx (with options: `mathpazo')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file flexisym.dtx
-%% and the derived files
-%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%%
-\ProvidesSymbols{mathpazo}[2010/07/11 v0.3]
-\ExplSyntaxOn
-\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
-\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
-\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
-\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
-\cs_gset:Npx\mg@bin{\mg@OMS}
-\cs_gset:Npx\mg@del{\mg@OMX}
-\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
-\cs_gset:Npn\mg@latin{\mg@OML}
-\cs_gset_eq:NN\mg@Latin\mg@latin
-\cs_gset_eq:NN\mg@greek\mg@latin
-\@ifpackagewith{mathpazo}{slantedGreek}{%
- \cs_gset_eq:NN\mg@Greek\mg@latin
-}{%
- \cs_gset:cpx{mg@Greek}{\hexnumber@\symupright}
-}
-\cs_gset_eq:NN\mg@rel\mg@bin
-\cs_gset_eq:NN\mg@ord\mg@bin
-\cs_gset_eq:NN\mg@cop\mg@del
-\DeclareFlexSymbol{!} {Pun}{OT1}{21}
-\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
-\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
-\DeclareFlexSymbol{\colon}{Pun}{OT1}{3A}
-\DeclareFlexSymbol{;} {Pun}{OT1}{3B}
-\DeclareFlexSymbol{=} {Rel}{OT1}{3D}
-\DeclareFlexSymbol{?} {Pun}{OT1}{3F}
-\DeclareFlexSymbol{\Gamma} {Var}{Greek}{00}
-\DeclareFlexSymbol{\Delta} {Var}{Greek}{01}
-\DeclareFlexSymbol{\Theta} {Var}{Greek}{02}
-\DeclareFlexSymbol{\Lambda} {Var}{Greek}{03}
-\DeclareFlexSymbol{\Xi} {Var}{Greek}{04}
-\DeclareFlexSymbol{\Pi} {Var}{Greek}{05}
-\DeclareFlexSymbol{\Sigma} {Var}{Greek}{06}
-\DeclareFlexSymbol{\Upsilon}{Var}{Greek}{07}
-\DeclareFlexSymbol{\Phi} {Var}{Greek}{08}
-\DeclareFlexSymbol{\Psi} {Var}{Greek}{09}
-\DeclareFlexSymbol{\Omega} {Var}{Greek}{0A}
-\DeclareFlexSymbol{0}{Var}{digit}{30}
-\DeclareFlexSymbol{1}{Var}{digit}{31}
-\DeclareFlexSymbol{2}{Var}{digit}{32}
-\DeclareFlexSymbol{3}{Var}{digit}{33}
-\DeclareFlexSymbol{4}{Var}{digit}{34}
-\DeclareFlexSymbol{5}{Var}{digit}{35}
-\DeclareFlexSymbol{6}{Var}{digit}{36}
-\DeclareFlexSymbol{7}{Var}{digit}{37}
-\DeclareFlexSymbol{8}{Var}{digit}{38}
-\DeclareFlexSymbol{9}{Var}{digit}{39}
-\DeclareFlexSymbol{,}{Pun}{OML}{3B}
-\DeclareFlexSymbol{.}{Ord}{OML}{3A}
-\DeclareFlexSymbol{/}{Ord}{OML}{3D}
-\DeclareFlexSymbol{<}{Rel}{OML}{3C}
-\DeclareFlexSymbol{>}{Rel}{OML}{3E}
-\DeclareFlexSymbol{\alpha}{Var}{greek}{0B}
-\DeclareFlexSymbol{\beta}{Var}{greek}{0C}
-\DeclareFlexSymbol{\gamma}{Var}{greek}{0D}
-\DeclareFlexSymbol{\delta}{Var}{greek}{0E}
-\DeclareFlexSymbol{\epsilon}{Var}{greek}{0F}
-\DeclareFlexSymbol{\zeta}{Var}{greek}{10}
-\DeclareFlexSymbol{\eta}{Var}{greek}{11}
-\DeclareFlexSymbol{\theta}{Var}{greek}{12}
-\DeclareFlexSymbol{\iota}{Var}{greek}{13}
-\DeclareFlexSymbol{\kappa}{Var}{greek}{14}
-\DeclareFlexSymbol{\lambda}{Var}{greek}{15}
-\DeclareFlexSymbol{\mu}{Var}{greek}{16}
-\DeclareFlexSymbol{\nu}{Var}{greek}{17}
-\DeclareFlexSymbol{\xi}{Var}{greek}{18}
-\DeclareFlexSymbol{\pi}{Var}{greek}{19}
-\DeclareFlexSymbol{\rho}{Var}{greek}{1A}
-\DeclareFlexSymbol{\sigma}{Var}{greek}{1B}
-\DeclareFlexSymbol{\tau}{Var}{greek}{1C}
-\DeclareFlexSymbol{\upsilon}{Var}{greek}{1D}
-\DeclareFlexSymbol{\phi}{Var}{greek}{1E}
-\DeclareFlexSymbol{\chi}{Var}{greek}{1F}
-\DeclareFlexSymbol{\psi}{Var}{greek}{20}
-\DeclareFlexSymbol{\omega}{Var}{greek}{21}
-\DeclareFlexSymbol{\varepsilon}{Var}{greek}{22}
-\DeclareFlexSymbol{\vartheta}{Var}{greek}{23}
-\DeclareFlexSymbol{\varpi}{Var}{greek}{24}
-\DeclareFlexSymbol{\varrho}{Var}{greek}{25}
-\DeclareFlexSymbol{\varsigma}{Var}{greek}{26}
-\DeclareFlexSymbol{\varphi}{Var}{greek}{27}
-\DeclareFlexSymbol{\imath}{Var}{OML}{7B}
-\DeclareFlexSymbol{\jmath}{Var}{OML}{7C}
-\DeclareFlexSymbol{\ell}{Ord}{OML}{60}
-\DeclareFlexSymbol{\wp}{Ord}{OML}{7D}
-\DeclareFlexSymbol{\partial}{Ord}{OML}{40}
-\DeclareFlexSymbol{\flat}{Ord}{OML}{5B}
-\DeclareFlexSymbol{\natural}{Ord}{OML}{5C}
-\DeclareFlexSymbol{\sharp}{Ord}{OML}{5D}
-\DeclareFlexSymbol{\triangleleft}{Bin}{OML}{2F}
-\DeclareFlexSymbol{\triangleright}{Bin}{OML}{2E}
-\DeclareFlexSymbol{\star}{Bin}{OML}{3F}
-\DeclareFlexSymbol{\smile}{Rel}{OML}{5E}
-\DeclareFlexSymbol{\frown}{Rel}{OML}{5F}
-\DeclareFlexSymbol{\leftharpoonup}{Rel}{OML}{28}
-\DeclareFlexSymbol{\leftharpoondown}{Rel}{OML}{29}
-\DeclareFlexSymbol{\rightharpoonup}{Rel}{OML}{2A}
-\DeclareFlexSymbol{\rightharpoondown}{Rel}{OML}{2B}
-\DeclareFlexSymbol{a}{Var}{latin}{61}
-\DeclareFlexSymbol{b}{Var}{latin}{62}
-\DeclareFlexSymbol{c}{Var}{latin}{63}
-\DeclareFlexSymbol{d}{Var}{latin}{64}
-\DeclareFlexSymbol{e}{Var}{latin}{65}
-\DeclareFlexSymbol{f}{Var}{latin}{66}
-\DeclareFlexSymbol{g}{Var}{latin}{67}
-\DeclareFlexSymbol{h}{Var}{latin}{68}
-\DeclareFlexSymbol{i}{Var}{latin}{69}
-\DeclareFlexSymbol{j}{Var}{latin}{6A}
-\DeclareFlexSymbol{k}{Var}{latin}{6B}
-\DeclareFlexSymbol{l}{Var}{latin}{6C}
-\DeclareFlexSymbol{m}{Var}{latin}{6D}
-\DeclareFlexSymbol{n}{Var}{latin}{6E}
-\DeclareFlexSymbol{o}{Var}{latin}{6F}
-\DeclareFlexSymbol{p}{Var}{latin}{70}
-\DeclareFlexSymbol{q}{Var}{latin}{71}
-\DeclareFlexSymbol{r}{Var}{latin}{72}
-\DeclareFlexSymbol{s}{Var}{latin}{73}
-\DeclareFlexSymbol{t}{Var}{latin}{74}
-\DeclareFlexSymbol{u}{Var}{latin}{75}
-\DeclareFlexSymbol{v}{Var}{latin}{76}
-\DeclareFlexSymbol{w}{Var}{latin}{77}
-\DeclareFlexSymbol{x}{Var}{latin}{78}
-\DeclareFlexSymbol{y}{Var}{latin}{79}
-\DeclareFlexSymbol{z}{Var}{latin}{7A}
-\DeclareFlexSymbol{A}{Var}{Latin}{41}
-\DeclareFlexSymbol{B}{Var}{Latin}{42}
-\DeclareFlexSymbol{C}{Var}{Latin}{43}
-\DeclareFlexSymbol{D}{Var}{Latin}{44}
-\DeclareFlexSymbol{E}{Var}{Latin}{45}
-\DeclareFlexSymbol{F}{Var}{Latin}{46}
-\DeclareFlexSymbol{G}{Var}{Latin}{47}
-\DeclareFlexSymbol{H}{Var}{Latin}{48}
-\DeclareFlexSymbol{I}{Var}{Latin}{49}
-\DeclareFlexSymbol{J}{Var}{Latin}{4A}
-\DeclareFlexSymbol{K}{Var}{Latin}{4B}
-\DeclareFlexSymbol{L}{Var}{Latin}{4C}
-\DeclareFlexSymbol{M}{Var}{Latin}{4D}
-\DeclareFlexSymbol{N}{Var}{Latin}{4E}
-\DeclareFlexSymbol{O}{Var}{Latin}{4F}
-\DeclareFlexSymbol{P}{Var}{Latin}{50}
-\DeclareFlexSymbol{Q}{Var}{Latin}{51}
-\DeclareFlexSymbol{R}{Var}{Latin}{52}
-\DeclareFlexSymbol{S}{Var}{Latin}{53}
-\DeclareFlexSymbol{T}{Var}{Latin}{54}
-\DeclareFlexSymbol{U}{Var}{Latin}{55}
-\DeclareFlexSymbol{V}{Var}{Latin}{56}
-\DeclareFlexSymbol{W}{Var}{Latin}{57}
-\DeclareFlexSymbol{X}{Var}{Latin}{58}
-\DeclareFlexSymbol{Y}{Var}{Latin}{59}
-\DeclareFlexSymbol{Z}{Var}{Latin}{5A}
-\DeclareFlexSymbol{\ldotPun}{Pun}{OML}{3A}
-\def\ldotp{\ldotPun}
-\DeclareFlexSymbol{\lhookRel}{Rel}{OML}{2C}
-\DeclareFlexSymbol{\rhookRel}{Rel}{OML}{2D}
-\DeclareFlexSymbol{*}{Bin}{bin}{03} % \ast
-\DeclareFlexSymbol{-}{Bin}{bin}{00}
-\DeclareFlexSymbol{|}{Ord}{OMS}{6A}
-\DeclareFlexSymbol{\aleph}{Ord}{ord}{40}
-\DeclareFlexSymbol{\Re}{Ord}{ord}{3C}
-\DeclareFlexSymbol{\Im}{Ord}{ord}{3D}
-\DeclareFlexSymbol{\infty}{Ord}{ord}{31}
-\DeclareFlexSymbol{\prime}{Ord}{ord}{30}
-\DeclareFlexSymbol{\emptyset}{Ord}{ord}{3B}
-\DeclareFlexSymbol{\nabla}{Ord}{ord}{72}
-\DeclareFlexSymbol{\top}{Ord}{ord}{3E}
-\DeclareFlexSymbol{\bot}{Ord}{ord}{3F}
-\DeclareFlexSymbol{\triangle}{Ord}{ord}{34}
-\DeclareFlexSymbol{\forall}{Ord}{ord}{38}
-\DeclareFlexSymbol{\exists}{Ord}{ord}{39}
-\DeclareFlexSymbol{\neg}{Ord}{ord}{3A}
-\DeclareFlexSymbol{\clubsuit}{Ord}{ord}{7C}
-\DeclareFlexSymbol{\diamondsuit}{Ord}{ord}{7D}
-\DeclareFlexSymbol{\heartsuit}{Ord}{ord}{7E}
-\DeclareFlexSymbol{\spadesuit}{Ord}{ord}{7F}
-\DeclareFlexSymbol{\smallint}{COs}{OMS}{73}
-\DeclareFlexSymbol{\bigtriangleup}{Bin}{bin}{34}
-\DeclareFlexSymbol{\bigtriangledown}{Bin}{bin}{35}
-\DeclareFlexSymbol{\wedge}{Bin}{bin}{5E}
-\DeclareFlexSymbol{\vee}{Bin}{bin}{5F}
-\DeclareFlexSymbol{\cap}{Bin}{bin}{5C}
-\DeclareFlexSymbol{\cup}{Bin}{bin}{5B}
-\DeclareFlexSymbol{\ddagger}{Bin}{bin}{7A}
-\DeclareFlexSymbol{\dagger}{Bin}{bin}{79}
-\DeclareFlexSymbol{\sqcap}{Bin}{bin}{75}
-\DeclareFlexSymbol{\sqcup}{Bin}{bin}{74}
-\DeclareFlexSymbol{\uplus}{Bin}{bin}{5D}
-\DeclareFlexSymbol{\amalg}{Bin}{bin}{71}
-\DeclareFlexSymbol{\diamond}{Bin}{bin}{05}
-\DeclareFlexSymbol{\bullet}{Bin}{bin}{0F}
-\DeclareFlexSymbol{\wr}{Bin}{bin}{6F}
-\DeclareFlexSymbol{\div}{Bin}{bin}{04}
-\DeclareFlexSymbol{\odot}{Bin}{bin}{0C}
-\DeclareFlexSymbol{\oslash}{Bin}{bin}{0B}
-\DeclareFlexSymbol{\otimes}{Bin}{bin}{0A}
-\DeclareFlexSymbol{\ominus}{Bin}{bin}{09}
-\DeclareFlexSymbol{\oplus}{Bin}{bin}{08}
-\DeclareFlexSymbol{\mp}{Bin}{bin}{07}
-\DeclareFlexSymbol{\pm}{Bin}{bin}{06}
-\DeclareFlexSymbol{\circ}{Bin}{bin}{0E}
-\DeclareFlexSymbol{\bigcirc}{Bin}{bin}{0D}
-\DeclareFlexSymbol{\setminus}{Bin}{bin}{6E}
-\DeclareFlexSymbol{\cdot}{Bin}{bin}{01}
-\DeclareFlexSymbol{\ast}{Bin}{bin}{03}
-\DeclareFlexSymbol{\times}{Bin}{bin}{02}
-\DeclareFlexSymbol{\propto}{Rel}{rel}{2F}
-\DeclareFlexSymbol{\sqsubseteq}{Rel}{rel}{76}
-\DeclareFlexSymbol{\sqsupseteq}{Rel}{rel}{77}
-\DeclareFlexSymbol{\parallel}{Rel}{rel}{6B}
-\DeclareFlexSymbol{\mid}{Rel}{rel}{6A}
-\DeclareFlexSymbol{\dashv}{Rel}{rel}{61}
-\DeclareFlexSymbol{\vdash}{Rel}{rel}{60}
-\DeclareFlexSymbol{\nearrow}{Rel}{rel}{25}
-\DeclareFlexSymbol{\searrow}{Rel}{rel}{26}
-\DeclareFlexSymbol{\nwarrow}{Rel}{rel}{2D}
-\DeclareFlexSymbol{\swarrow}{Rel}{rel}{2E}
-\DeclareFlexSymbol{\Leftrightarrow}{Rel}{rel}{2C}
-\DeclareFlexSymbol{\Leftarrow}{Rel}{rel}{28}
-\DeclareFlexSymbol{\Rightarrow}{Rel}{rel}{29}
-\DeclareFlexSymbol{\leq}{Rel}{rel}{14}
-\DeclareFlexSymbol{\geq}{Rel}{rel}{15}
-\DeclareFlexSymbol{\succ}{Rel}{rel}{1F}
-\DeclareFlexSymbol{\prec}{Rel}{rel}{1E}
-\DeclareFlexSymbol{\approx}{Rel}{rel}{19}
-\DeclareFlexSymbol{\succeq}{Rel}{rel}{17}
-\DeclareFlexSymbol{\preceq}{Rel}{rel}{16}
-\DeclareFlexSymbol{\supset}{Rel}{rel}{1B}
-\DeclareFlexSymbol{\subset}{Rel}{rel}{1A}
-\DeclareFlexSymbol{\supseteq}{Rel}{rel}{13}
-\DeclareFlexSymbol{\subseteq}{Rel}{rel}{12}
-\DeclareFlexSymbol{\in}{Rel}{rel}{32}
-\DeclareFlexSymbol{\ni}{Rel}{rel}{33}
-\DeclareFlexSymbol{\gg}{Rel}{rel}{1D}
-\DeclareFlexSymbol{\ll}{Rel}{rel}{1C}
-\DeclareFlexSymbol{\leftrightarrow}{Rel}{rel}{24}
-\DeclareFlexSymbol{\leftarrow}{Rel}{rel}{20}
-\DeclareFlexSymbol{\rightarrow}{Rel}{rel}{21}
-\DeclareFlexSymbol{\sim}{Rel}{rel}{18}
-\DeclareFlexSymbol{\simeq}{Rel}{rel}{27}
-\DeclareFlexSymbol{\perp}{Rel}{rel}{3F}
-\DeclareFlexSymbol{\equiv}{Rel}{rel}{11}
-\DeclareFlexSymbol{\asymp}{Rel}{rel}{10}
-\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
-\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
-\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
-\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
-\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
-\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
-\DeclareFlexSymbol{\biguplus}{COs}{cop}{55}
-\DeclareFlexSymbol{\bigcap}{COs}{cop}{54}
-\DeclareFlexSymbol{\bigcup}{COs}{cop}{53}
-\DeclareFlexSymbol{\int}{COi}{cop}{52}
-\DeclareFlexSymbol{\prod}{COs}{cop}{51}
-\DeclareFlexSymbol{\sum}{COs}{cop}{50}
-\DeclareFlexSymbol{\bigotimes}{COs}{cop}{4E}
-\DeclareFlexSymbol{\bigoplus}{COs}{cop}{4C}
-\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
-\DeclareFlexSymbol{\oint}{COi}{cop}{48}
-\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
-\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
-\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
-\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
-\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
-\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
-\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
-\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
-\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
-\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
-\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
-\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
-\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
-\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
-\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
-\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
-\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
-\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
-\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
-\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
-\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
-\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
-\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
-\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
-\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
-\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
-\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
-\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
-\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
-\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
-\DeclareFlexCompoundSymbol{\surd}{Ord}{\mathop{\surdOrd}}
-\DeclareFlexCompoundSymbol{\angle}{Ord}{%
- \vbox{\ialign{%
- $\m@th\scriptstyle##$\crcr
- \notRel\mathrel{\mkern14mu}\crcr
- \noalign{\nointerlineskip}%
- \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr
- }}%
-}
-\DeclareFlexCompoundSymbol{\neq}{Rel}{\not{=}}
-\DeclareFlexCompoundSymbol{\mapsto}{Rel}{\mapstoOrd\rightarrow}
-\DeclareFlexCompoundSymbol{\cong}{Rel}{\mathpalette\@vereq\sim}
-\providecommand*\joinord{}
-\renewcommand*\joinord{\mkern-3.45mu }
-\DeclareFlexCompoundSymbol{\notin}{Rel}{\mathpalette\c@ncel\in}
-\DeclareFlexCompoundSymbol{\rightleftharpoons}{Rel}{\mathpalette\rlh@{}}
-\DeclareFlexCompoundSymbol{\doteq}{Rel}{\buildrel\textstyle.\over=}
-\DeclareFlexCompoundSymbol{\hookrightarrow}{Rel}{\lhookRel\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\hookleftarrow}{Rel}{\leftarrow\joinord\rhookRel}
-\DeclareFlexCompoundSymbol{\bowtie}{Rel}{\triangleright\joinord\triangleleft}
-\DeclareFlexCompoundSymbol{\models}{Rel}{\vert\joinord=}
-\DeclareFlexCompoundSymbol{\Longrightarrow}{Rel}{\Relbar\joinord\Rightarrow}
-\DeclareFlexCompoundSymbol{\longrightarrow}{Rel}{\relbar\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftarrow}{Rel}{\Leftarrow\joinord\Relbar}
-\DeclareFlexCompoundSymbol{\longleftarrow}{Rel}{\leftarrow\joinord\relbar}
-\DeclareFlexCompoundSymbol{\longmapsto}{Rel}{\mapstochar\longrightarrow}
-\DeclareFlexCompoundSymbol{\longleftrightarrow}{Rel}{\leftarrow\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftrightarrow}{Rel}{\Leftarrow\joinord\Rightarrow}
-\renewcommand*\iff{%
- \mskip\thickmuskip\Longleftrightarrow\mskip\thickmuskip
-}
-\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}%
-\DeclareFlexCompoundSymbol{\vdots}{Ord}{%
- \vbox{\baselineskip4\p@ \lineskiplimit\z@
- \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
-\DeclareFlexCompoundSymbol{\ddots}{Inn}{%
- \mkern1mu\raise7\p@
- \vbox{\kern7\p@\hbox{.}}\mkern2mu%
- \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu%
-}
-\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
- \mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
-\edef\Relbar{\mathchar\string"\hexnumber@\symupright3D }
-\ExplSyntaxOff
-\endinput
-%%
-%% End of file `mathpazo.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathptmx.sym b/Master/texmf-dist/tex/latex/mh/mathptmx.sym
deleted file mode 100644
index 34166a5868e..00000000000
--- a/Master/texmf-dist/tex/latex/mh/mathptmx.sym
+++ /dev/null
@@ -1,374 +0,0 @@
-%%
-%% This is file `mathptmx.sym',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% flexisym.dtx (with options: `mathptmx')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file flexisym.dtx
-%% and the derived files
-%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%%
-\ProvidesSymbols{mathptmx}[2010/07/11 v0.3]
-\ExplSyntaxOn
-\cs_gset:cpx{mg@OT1}{\hexnumber@\symoperators}
-\cs_gset:cpx{mg@OML}{\hexnumber@\symletters}
-\cs_gset:cpx{mg@OMS}{\hexnumber@\symsymbols}
-\cs_gset:cpx{mg@OMX}{\hexnumber@\symlargesymbols}
-\cs_gset:Npx\mg@bin{\mg@OMS}
-\cs_gset:Npx\mg@del{\mg@OMX}
-\cs_gset:Npx\mg@digit{\exp_not:c{mg@OT1}}
-\cs_gset:Npn\mg@latin{\mg@OML}
-\cs_gset_eq:NN\mg@Latin\mg@latin
-\cs_gset_eq:NN\mg@greek\mg@latin
-\cs_gset_eq:NN\mg@Greek\mg@digit
-\@ifpackagewith{mathptmx}{slantedGreek}{%
- \cs_gset_eq:NN\mg@Greek\mg@latin
-}{}
-\cs_gset_eq:NN\mg@rel\mg@bin
-\cs_gset_eq:NN\mg@ord\mg@bin
-\cs_gset_eq:NN\mg@cop\mg@del
-\DeclareFlexSymbol{!} {Pun}{OT1}{21}
-\DeclareFlexSymbol{+} {Bin}{OT1}{2B}
-\DeclareFlexSymbol{:} {Rel}{OT1}{3A}
-\DeclareFlexSymbol{\colon}{Pun}{OT1}{3A}
-\DeclareFlexSymbol{;} {Pun}{OT1}{3B}
-\DeclareFlexSymbol{=} {Rel}{OT1}{3D}
-\DeclareFlexSymbol{?} {Pun}{OT1}{3F}
-\DeclareFlexSymbol{\Gamma} {Var}{Greek}{00}
-\DeclareFlexSymbol{\Delta} {Var}{Greek}{01}
-\DeclareFlexSymbol{\Theta} {Var}{Greek}{02}
-\DeclareFlexSymbol{\Lambda} {Var}{Greek}{03}
-\DeclareFlexSymbol{\Xi} {Var}{Greek}{04}
-\DeclareFlexSymbol{\Pi} {Var}{Greek}{05}
-\DeclareFlexSymbol{\Sigma} {Var}{Greek}{06}
-\DeclareFlexSymbol{\Upsilon}{Var}{Greek}{07}
-\DeclareFlexSymbol{\Phi} {Var}{Greek}{08}
-\DeclareFlexSymbol{\Psi} {Var}{Greek}{09}
-\DeclareFlexSymbol{\Omega} {Var}{Greek}{0A}
-\DeclareFlexSymbol{0}{Var}{digit}{30}
-\DeclareFlexSymbol{1}{Var}{digit}{31}
-\DeclareFlexSymbol{2}{Var}{digit}{32}
-\DeclareFlexSymbol{3}{Var}{digit}{33}
-\DeclareFlexSymbol{4}{Var}{digit}{34}
-\DeclareFlexSymbol{5}{Var}{digit}{35}
-\DeclareFlexSymbol{6}{Var}{digit}{36}
-\DeclareFlexSymbol{7}{Var}{digit}{37}
-\DeclareFlexSymbol{8}{Var}{digit}{38}
-\DeclareFlexSymbol{9}{Var}{digit}{39}
-\DeclareFlexSymbol{,}{Pun}{OML}{3B}
-\DeclareFlexSymbol{.}{Ord}{OML}{3A}
-\DeclareFlexSymbol{/}{Ord}{OML}{3D}
-\DeclareFlexSymbol{<}{Rel}{OML}{3C}
-\DeclareFlexSymbol{>}{Rel}{OML}{3E}
-\DeclareFlexSymbol{\alpha}{Var}{greek}{0B}
-\DeclareFlexSymbol{\beta}{Var}{greek}{0C}
-\DeclareFlexSymbol{\gamma}{Var}{greek}{0D}
-\DeclareFlexSymbol{\delta}{Var}{greek}{0E}
-\DeclareFlexSymbol{\epsilon}{Var}{greek}{0F}
-\DeclareFlexSymbol{\zeta}{Var}{greek}{10}
-\DeclareFlexSymbol{\eta}{Var}{greek}{11}
-\DeclareFlexSymbol{\theta}{Var}{greek}{12}
-\DeclareFlexSymbol{\iota}{Var}{greek}{13}
-\DeclareFlexSymbol{\kappa}{Var}{greek}{14}
-\DeclareFlexSymbol{\lambda}{Var}{greek}{15}
-\DeclareFlexSymbol{\mu}{Var}{greek}{16}
-\DeclareFlexSymbol{\nu}{Var}{greek}{17}
-\DeclareFlexSymbol{\xi}{Var}{greek}{18}
-\DeclareFlexSymbol{\pi}{Var}{greek}{19}
-\DeclareFlexSymbol{\rho}{Var}{greek}{1A}
-\DeclareFlexSymbol{\sigma}{Var}{greek}{1B}
-\DeclareFlexSymbol{\tau}{Var}{greek}{1C}
-\DeclareFlexSymbol{\upsilon}{Var}{greek}{1D}
-\DeclareFlexSymbol{\phi}{Var}{greek}{1E}
-\DeclareFlexSymbol{\chi}{Var}{greek}{1F}
-\DeclareFlexSymbol{\psi}{Var}{greek}{20}
-\DeclareFlexSymbol{\omega}{Var}{greek}{21}
-\DeclareFlexSymbol{\varepsilon}{Var}{greek}{22}
-\DeclareFlexSymbol{\vartheta}{Var}{greek}{23}
-\DeclareFlexSymbol{\varpi}{Var}{greek}{24}
-\DeclareFlexSymbol{\varrho}{Var}{greek}{25}
-\DeclareFlexSymbol{\varsigma}{Var}{greek}{26}
-\DeclareFlexSymbol{\varphi}{Var}{greek}{27}
-\DeclareFlexSymbol{\imath}{Var}{OML}{7B}
-\DeclareFlexSymbol{\jmath}{Var}{OML}{7C}
-\DeclareFlexSymbol{\ell}{Ord}{OML}{60}
-\DeclareFlexSymbol{\wp}{Ord}{OML}{7D}
-\DeclareFlexSymbol{\partial}{Ord}{OML}{40}
-\DeclareFlexSymbol{\flat}{Ord}{OML}{5B}
-\DeclareFlexSymbol{\natural}{Ord}{OML}{5C}
-\DeclareFlexSymbol{\sharp}{Ord}{OML}{5D}
-\DeclareFlexSymbol{\triangleleft}{Bin}{OML}{2F}
-\DeclareFlexSymbol{\triangleright}{Bin}{OML}{2E}
-\DeclareFlexSymbol{\star}{Bin}{OML}{3F}
-\DeclareFlexSymbol{\smile}{Rel}{OML}{5E}
-\DeclareFlexSymbol{\frown}{Rel}{OML}{5F}
-\DeclareFlexSymbol{\leftharpoonup}{Rel}{OML}{28}
-\DeclareFlexSymbol{\leftharpoondown}{Rel}{OML}{29}
-\DeclareFlexSymbol{\rightharpoonup}{Rel}{OML}{2A}
-\DeclareFlexSymbol{\rightharpoondown}{Rel}{OML}{2B}
-\DeclareFlexSymbol{a}{Var}{latin}{61}
-\DeclareFlexSymbol{b}{Var}{latin}{62}
-\DeclareFlexSymbol{c}{Var}{latin}{63}
-\DeclareFlexSymbol{d}{Var}{latin}{64}
-\DeclareFlexSymbol{e}{Var}{latin}{65}
-\DeclareFlexSymbol{f}{Var}{latin}{66}
-\DeclareFlexSymbol{g}{Var}{latin}{67}
-\DeclareFlexSymbol{h}{Var}{latin}{68}
-\DeclareFlexSymbol{i}{Var}{latin}{69}
-\DeclareFlexSymbol{j}{Var}{latin}{6A}
-\DeclareFlexSymbol{k}{Var}{latin}{6B}
-\DeclareFlexSymbol{l}{Var}{latin}{6C}
-\DeclareFlexSymbol{m}{Var}{latin}{6D}
-\DeclareFlexSymbol{n}{Var}{latin}{6E}
-\DeclareFlexSymbol{o}{Var}{latin}{6F}
-\DeclareFlexSymbol{p}{Var}{latin}{70}
-\DeclareFlexSymbol{q}{Var}{latin}{71}
-\DeclareFlexSymbol{r}{Var}{latin}{72}
-\DeclareFlexSymbol{s}{Var}{latin}{73}
-\DeclareFlexSymbol{t}{Var}{latin}{74}
-\DeclareFlexSymbol{u}{Var}{latin}{75}
-\DeclareFlexSymbol{v}{Var}{latin}{76}
-\DeclareFlexSymbol{w}{Var}{latin}{77}
-\DeclareFlexSymbol{x}{Var}{latin}{78}
-\DeclareFlexSymbol{y}{Var}{latin}{79}
-\DeclareFlexSymbol{z}{Var}{latin}{7A}
-\DeclareFlexSymbol{A}{Var}{Latin}{41}
-\DeclareFlexSymbol{B}{Var}{Latin}{42}
-\DeclareFlexSymbol{C}{Var}{Latin}{43}
-\DeclareFlexSymbol{D}{Var}{Latin}{44}
-\DeclareFlexSymbol{E}{Var}{Latin}{45}
-\DeclareFlexSymbol{F}{Var}{Latin}{46}
-\DeclareFlexSymbol{G}{Var}{Latin}{47}
-\DeclareFlexSymbol{H}{Var}{Latin}{48}
-\DeclareFlexSymbol{I}{Var}{Latin}{49}
-\DeclareFlexSymbol{J}{Var}{Latin}{4A}
-\DeclareFlexSymbol{K}{Var}{Latin}{4B}
-\DeclareFlexSymbol{L}{Var}{Latin}{4C}
-\DeclareFlexSymbol{M}{Var}{Latin}{4D}
-\DeclareFlexSymbol{N}{Var}{Latin}{4E}
-\DeclareFlexSymbol{O}{Var}{Latin}{4F}
-\DeclareFlexSymbol{P}{Var}{Latin}{50}
-\DeclareFlexSymbol{Q}{Var}{Latin}{51}
-\DeclareFlexSymbol{R}{Var}{Latin}{52}
-\DeclareFlexSymbol{S}{Var}{Latin}{53}
-\DeclareFlexSymbol{T}{Var}{Latin}{54}
-\DeclareFlexSymbol{U}{Var}{Latin}{55}
-\DeclareFlexSymbol{V}{Var}{Latin}{56}
-\DeclareFlexSymbol{W}{Var}{Latin}{57}
-\DeclareFlexSymbol{X}{Var}{Latin}{58}
-\DeclareFlexSymbol{Y}{Var}{Latin}{59}
-\DeclareFlexSymbol{Z}{Var}{Latin}{5A}
-\DeclareFlexSymbol{\ldotPun}{Pun}{OML}{3A}
-\def\ldotp{\ldotPun}
-\DeclareFlexSymbol{\lhookRel}{Rel}{OML}{2C}
-\DeclareFlexSymbol{\rhookRel}{Rel}{OML}{2D}
-\DeclareFlexSymbol{*}{Bin}{bin}{03} % \ast
-\DeclareFlexSymbol{-}{Bin}{bin}{00}
-\DeclareFlexSymbol{|}{Ord}{OMS}{6A}
-\DeclareFlexSymbol{\aleph}{Ord}{ord}{40}
-\DeclareFlexSymbol{\Re}{Ord}{ord}{3C}
-\DeclareFlexSymbol{\Im}{Ord}{ord}{3D}
-\DeclareFlexSymbol{\infty}{Ord}{ord}{31}
-\DeclareFlexSymbol{\prime}{Ord}{ord}{30}
-\DeclareFlexSymbol{\emptyset}{Ord}{ord}{3B}
-\DeclareFlexSymbol{\nabla}{Ord}{ord}{72}
-\DeclareFlexSymbol{\top}{Ord}{ord}{3E}
-\DeclareFlexSymbol{\bot}{Ord}{ord}{3F}
-\DeclareFlexSymbol{\triangle}{Ord}{ord}{34}
-\DeclareFlexSymbol{\forall}{Ord}{ord}{38}
-\DeclareFlexSymbol{\exists}{Ord}{ord}{39}
-\DeclareFlexSymbol{\neg}{Ord}{ord}{3A}
-\DeclareFlexSymbol{\clubsuit}{Ord}{ord}{7C}
-\DeclareFlexSymbol{\diamondsuit}{Ord}{ord}{7D}
-\DeclareFlexSymbol{\heartsuit}{Ord}{ord}{7E}
-\DeclareFlexSymbol{\spadesuit}{Ord}{ord}{7F}
-\DeclareFlexSymbol{\smallint}{COs}{OMS}{73}
-\DeclareFlexSymbol{\bigtriangleup}{Bin}{bin}{34}
-\DeclareFlexSymbol{\bigtriangledown}{Bin}{bin}{35}
-\DeclareFlexSymbol{\wedge}{Bin}{bin}{5E}
-\DeclareFlexSymbol{\vee}{Bin}{bin}{5F}
-\DeclareFlexSymbol{\cap}{Bin}{bin}{5C}
-\DeclareFlexSymbol{\cup}{Bin}{bin}{5B}
-\DeclareFlexSymbol{\ddagger}{Bin}{bin}{7A}
-\DeclareFlexSymbol{\dagger}{Bin}{bin}{79}
-\DeclareFlexSymbol{\sqcap}{Bin}{bin}{75}
-\DeclareFlexSymbol{\sqcup}{Bin}{bin}{74}
-\DeclareFlexSymbol{\uplus}{Bin}{bin}{5D}
-\DeclareFlexSymbol{\amalg}{Bin}{bin}{71}
-\DeclareFlexSymbol{\diamond}{Bin}{bin}{05}
-\DeclareFlexSymbol{\bullet}{Bin}{bin}{0F}
-\DeclareFlexSymbol{\wr}{Bin}{bin}{6F}
-\DeclareFlexSymbol{\div}{Bin}{bin}{04}
-\DeclareFlexSymbol{\odot}{Bin}{bin}{0C}
-\DeclareFlexSymbol{\oslash}{Bin}{bin}{0B}
-\DeclareFlexSymbol{\otimes}{Bin}{bin}{0A}
-\DeclareFlexSymbol{\ominus}{Bin}{bin}{09}
-\DeclareFlexSymbol{\oplus}{Bin}{bin}{08}
-\DeclareFlexSymbol{\mp}{Bin}{bin}{07}
-\DeclareFlexSymbol{\pm}{Bin}{bin}{06}
-\DeclareFlexSymbol{\circ}{Bin}{bin}{0E}
-\DeclareFlexSymbol{\bigcirc}{Bin}{bin}{0D}
-\DeclareFlexSymbol{\setminus}{Bin}{bin}{6E}
-\DeclareFlexSymbol{\cdot}{Bin}{bin}{01}
-\DeclareFlexSymbol{\ast}{Bin}{bin}{03}
-\DeclareFlexSymbol{\times}{Bin}{bin}{02}
-\DeclareFlexSymbol{\propto}{Rel}{rel}{2F}
-\DeclareFlexSymbol{\sqsubseteq}{Rel}{rel}{76}
-\DeclareFlexSymbol{\sqsupseteq}{Rel}{rel}{77}
-\DeclareFlexSymbol{\parallel}{Rel}{rel}{6B}
-\DeclareFlexSymbol{\mid}{Rel}{rel}{6A}
-\DeclareFlexSymbol{\dashv}{Rel}{rel}{61}
-\DeclareFlexSymbol{\vdash}{Rel}{rel}{60}
-\DeclareFlexSymbol{\nearrow}{Rel}{rel}{25}
-\DeclareFlexSymbol{\searrow}{Rel}{rel}{26}
-\DeclareFlexSymbol{\nwarrow}{Rel}{rel}{2D}
-\DeclareFlexSymbol{\swarrow}{Rel}{rel}{2E}
-\DeclareFlexSymbol{\Leftrightarrow}{Rel}{rel}{2C}
-\DeclareFlexSymbol{\Leftarrow}{Rel}{rel}{28}
-\DeclareFlexSymbol{\Rightarrow}{Rel}{rel}{29}
-\DeclareFlexSymbol{\leq}{Rel}{rel}{14}
-\DeclareFlexSymbol{\geq}{Rel}{rel}{15}
-\DeclareFlexSymbol{\succ}{Rel}{rel}{1F}
-\DeclareFlexSymbol{\prec}{Rel}{rel}{1E}
-\DeclareFlexSymbol{\approx}{Rel}{rel}{19}
-\DeclareFlexSymbol{\succeq}{Rel}{rel}{17}
-\DeclareFlexSymbol{\preceq}{Rel}{rel}{16}
-\DeclareFlexSymbol{\supset}{Rel}{rel}{1B}
-\DeclareFlexSymbol{\subset}{Rel}{rel}{1A}
-\DeclareFlexSymbol{\supseteq}{Rel}{rel}{13}
-\DeclareFlexSymbol{\subseteq}{Rel}{rel}{12}
-\DeclareFlexSymbol{\in}{Rel}{rel}{32}
-\DeclareFlexSymbol{\ni}{Rel}{rel}{33}
-\DeclareFlexSymbol{\gg}{Rel}{rel}{1D}
-\DeclareFlexSymbol{\ll}{Rel}{rel}{1C}
-\DeclareFlexSymbol{\leftrightarrow}{Rel}{rel}{24}
-\DeclareFlexSymbol{\leftarrow}{Rel}{rel}{20}
-\DeclareFlexSymbol{\rightarrow}{Rel}{rel}{21}
-\DeclareFlexSymbol{\sim}{Rel}{rel}{18}
-\DeclareFlexSymbol{\simeq}{Rel}{rel}{27}
-\DeclareFlexSymbol{\perp}{Rel}{rel}{3F}
-\DeclareFlexSymbol{\equiv}{Rel}{rel}{11}
-\DeclareFlexSymbol{\asymp}{Rel}{rel}{10}
-\DeclareFlexSymbol{\notRel}{Rel}{rel}{36}
-\DeclareFlexSymbol{\mapstoOrd}{Ord}{OMS}{37}
-\DeclareFlexSymbol{\cdotOrd}{Ord}{OMS}{01}
-\cs_set:Npn\cdotp{\mathpunct{\cdotOrd}}
-\DeclareFlexSymbol{\coprod}{COs}{cop}{60}
-\DeclareFlexSymbol{\bigvee}{COs}{cop}{57}
-\DeclareFlexSymbol{\bigwedge}{COs}{cop}{56}
-\DeclareFlexSymbol{\biguplus}{COs}{cop}{55}
-\DeclareFlexSymbol{\bigcap}{COs}{cop}{54}
-\DeclareFlexSymbol{\bigcup}{COs}{cop}{53}
-\DeclareFlexSymbol{\int}{COi}{cop}{52}
-\DeclareFlexSymbol{\prod}{COs}{cop}{51}
-\DeclareFlexSymbol{\sum}{COs}{cop}{50}
-\DeclareFlexSymbol{\bigotimes}{COs}{cop}{4E}
-\DeclareFlexSymbol{\bigoplus}{COs}{cop}{4C}
-\DeclareFlexSymbol{\bigodot}{COs}{cop}{4A}
-\DeclareFlexSymbol{\oint}{COi}{cop}{48}
-\DeclareFlexSymbol{\bigsqcup}{COs}{cop}{46}
-\DeclareFlexDelimiter{\rangle}{DeR}{del}{0B}{OMS}{69}
-\DeclareFlexDelimiter{\langle}{DeL}{del}{0A}{OMS}{68}
-\DeclareFlexDelimiter{\rbrace}{DeR}{del}{09}{OMS}{67}
-\DeclareFlexDelimiter{\lbrace}{DeL}{del}{08}{OMS}{66}
-\DeclareFlexDelimiter{\rceil}{DeR}{del}{07}{OMS}{65}
-\DeclareFlexDelimiter{\lceil}{DeL}{del}{06}{OMS}{64}
-\DeclareFlexDelimiter{\rfloor}{DeR}{del}{05}{OMS}{63}
-\DeclareFlexDelimiter{\lfloor}{DeL}{del}{04}{OMS}{62}
-\DeclareFlexDelimiter{(}{DeL}{del}{00}{OT1}{28}
-\DeclareFlexDelimiter{)}{DeR}{del}{01}{OT1}{29}
-\DeclareFlexDelimiter{[}{DeL}{del}{02}{OT1}{5B}
-\DeclareFlexDelimiter{]}{DeR}{del}{03}{OT1}{5D}
-\DeclareFlexDelimiter{\lVert}{DeL}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\rVert}{DeR}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\lvert}{DeL}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\rvert}{DeR}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{\Vert}{DeB}{del}{0D}{OMS}{6B}
-\DeclareFlexDelimiter{\vert}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{|}{DeB}{del}{0C}{OMS}{6A}
-\DeclareFlexDelimiter{/}{DeB}{del}{0E}{OML}{3D}
-\DeclareFlexDelimiter{\lmoustache}{DeL}{del}{40}{del}{7A}
-\DeclareFlexDelimiter{\rmoustache}{DeR}{del}{41}{del}{7B}
-\DeclareFlexDelimiter{\lgroup}{DeL}{del}{3A}{del}{3A}
-\DeclareFlexDelimiter{\rgroup}{DeR}{del}{3B}{del}{3B}
-\DeclareFlexDelimiter{\bracevert}{DeB}{del}{3E}{del}{3E}
-\DeclareFlexDelimiter{\arrowvert}{DeB}{del}{3C}{OMS}{6A}
-\DeclareFlexDelimiter{\Arrowvert}{DeB}{del}{3D}{OMS}{6B}
-\DeclareFlexDelimiter{\uparrow}{DeA}{del}{78}{OMS}{22}
-\DeclareFlexDelimiter{\downarrow}{DeA}{del}{79}{OMS}{23}
-\DeclareFlexDelimiter{\updownarrow}{DeA}{del}{3F}{OMS}{6C}
-\DeclareFlexDelimiter{\Uparrow}{DeA}{del}{7E}{OMS}{2A}
-\DeclareFlexDelimiter{\Downarrow}{DeA}{del}{7F}{OMS}{2B}
-\DeclareFlexDelimiter{\Updownarrow}{DeA}{del}{77}{OMS}{6D}
-\DeclareFlexDelimiter{\backslash}{DeB}{del}{0F}{OMS}{6E}
-\DeclareFlexSymbol{\hbarOrd}{Ord}{OT1}{16}
-\DeclareFlexCompoundSymbol{\hbar}{Ord}{\hbarOrd\mkern-9mu h}
-\DeclareFlexSymbol{\surdOrd}{Ord}{OMS}{70}
-\DeclareFlexCompoundSymbol{\surd}{Ord}{\mathop{\surdOrd}}
-\DeclareFlexCompoundSymbol{\angle}{Ord}{%
- \vbox{\ialign{%
- $\m@th\scriptstyle##$\crcr
- \notRel\mathrel{\mkern14mu}\crcr
- \noalign{\nointerlineskip}%
- \mkern2.5mu\leaders\hrule \@height.34pt\hfill\mkern2.5mu\crcr
- }}%
-}
-\DeclareFlexCompoundSymbol{\neq}{Rel}{\not{=}}
-\DeclareFlexCompoundSymbol{\mapsto}{Rel}{\mapstoOrd\rightarrow}
-\DeclareFlexCompoundSymbol{\cong}{Rel}{\mathpalette\@vereq\sim}
-\providecommand*\joinord{}
-\renewcommand*\joinord{\mkern-3mu }
-\DeclareFlexCompoundSymbol{\notin}{Rel}{\mathpalette\c@ncel\in}
-\DeclareFlexCompoundSymbol{\rightleftharpoons}{Rel}{\mathpalette\rlh@{}}
-\DeclareFlexCompoundSymbol{\doteq}{Rel}{\buildrel\textstyle.\over=}
-\DeclareFlexCompoundSymbol{\hookrightarrow}{Rel}{\lhookRel\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\hookleftarrow}{Rel}{\leftarrow\joinord\rhookRel}
-\DeclareFlexCompoundSymbol{\bowtie}{Rel}{\triangleright\joinord\triangleleft}
-\DeclareFlexCompoundSymbol{\models}{Rel}{\vert\joinord=}
-\DeclareFlexCompoundSymbol{\Longrightarrow}{Rel}{\Relbar\joinord\Rightarrow}
-\DeclareFlexCompoundSymbol{\longrightarrow}{Rel}{\relbar\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftarrow}{Rel}{\Leftarrow\joinord\Relbar}
-\DeclareFlexCompoundSymbol{\longleftarrow}{Rel}{\leftarrow\joinord\relbar}
-\DeclareFlexCompoundSymbol{\longmapsto}{Rel}{\mapstochar\longrightarrow}
-\DeclareFlexCompoundSymbol{\longleftrightarrow}{Rel}{\leftarrow\joinord\rightarrow}
-\DeclareFlexCompoundSymbol{\Longleftrightarrow}{Rel}{\Leftarrow\joinord\Rightarrow}
-\renewcommand*\iff{%
- \mskip\thickmuskip\Longleftrightarrow\mskip\thickmuskip
-}
-\DeclareFlexCompoundSymbol{\cdots}{Inn}{\cdotp\cdotp\cdotp}%
-\DeclareFlexCompoundSymbol{\vdots}{Ord}{%
- \vbox{\baselineskip4\p@ \lineskiplimit\z@
- \kern6\p@\hbox{.}\hbox{.}\hbox{.}}}
-\DeclareFlexCompoundSymbol{\ddots}{Inn}{%
- \mkern1mu\raise7\p@
- \vbox{\kern7\p@\hbox{.}}\mkern2mu%
- \raise4\p@\hbox{.}\mkern2mu\raise\p@\hbox{.}\mkern1mu%
-}
-\def\relbar{\begingroup \def\smash@{tb}% in case amsmath is loaded
- \mathpalette\mathsm@sh{\mathchar"200 }\endgroup}
-\def\Relbar{\mathchar"3D }
-\ExplSyntaxOff
-\endinput
-%%
-%% End of file `mathptmx.sym'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathstyle.sty b/Master/texmf-dist/tex/latex/mh/mathstyle.sty
deleted file mode 100644
index 75d9a5eb6a3..00000000000
--- a/Master/texmf-dist/tex/latex/mh/mathstyle.sty
+++ /dev/null
@@ -1,189 +0,0 @@
-%%
-%% This is file `mathstyle.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mathstyle.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, 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.
-%%
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{mathstyle}
- [2011/08/03 v0.90 Tracking mathstyle implicitly]
-\providecommand\@saveprimitive[2]{%
- \begingroup
- \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
- \ifx\@tempa\@tempb \global\let#2#1%
- \else
- \edef\@tempb{\meaning#2}%
- \ifx\@tempa\@tempb
- \else \@saveprimitive@a#1#2%
- \fi
- \fi
- \endgroup
-}
-\providecommand\@saveprimitive@a[2]{%
- \begingroup
- \def\@tempb##1#1##2{\edef\@tempb{##2}\@car{}}%
- \@tempb\nullfont{select font nullfont}%
- \topmark{\string\topmark:}%
- \firstmark{\string\firstmark:}%
- \botmark{\string\botmark:}%
- \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%
- \else
- \PackageError{mathstyle}%
- {Unable to properly define \string#2; primitive
- \noexpand#1no longer primitive}\@eha
- \fi
- \fi
- \endgroup
-}
-\everydisplay=\expandafter{\the\everydisplay\chardef\mathstyle\z@}
-\chardef\mathstyle\@ne
-\@saveprimitive\displaystyle\@@displaystyle
-\@saveprimitive\textstyle\@@textstyle
-\@saveprimitive\scriptstyle\@@scriptstyle
-\@saveprimitive\scriptscriptstyle\@@scriptscriptstyle
-\@saveprimitive\mathchoice\@@mathchoice
-\@saveprimitive\over\@@over
-\@saveprimitive\atop\@@atop
-\@saveprimitive\above\@@above
-\@saveprimitive\overwithdelims\@@overwithdelims
-\@saveprimitive\atopwithdelims\@@atopwithdelims
-\@saveprimitive\abovewithdelims\@@abovewithdelims
-\DeclareRobustCommand{\displaystyle}{%
- \@@displaystyle \chardef\mathstyle\z@}
-\DeclareRobustCommand{\textstyle}{%
- \@@textstyle \chardef\mathstyle\@ne}
-\DeclareRobustCommand{\scriptstyle}{%
- \@@scriptstyle \chardef\mathstyle\tw@}
-\DeclareRobustCommand{\scriptscriptstyle}{%
- \@@scriptscriptstyle \chardef\mathstyle\thr@@}
-\begingroup \catcode`\^=7\relax \catcode`\_=8\relax % just in case
-\lowercase{\endgroup
-\let\@@superscript=^ \let\@@subscript=_
-}%
-\begingroup \catcode`\^=12\relax \catcode`\_=12\relax % just in case
-\lowercase{\endgroup
-\let\@@superscript@other=^ \let\@@subscript@other=_
-}%
-\def\subsupstyle{%
- \ifnum\mathstyle<\tw@ \chardef\mathstyle\tw@
- \else \chardef\mathstyle\thr@@
- \fi
-}
-\let\mathsup=\@@superscript
-\let\mathsub=\@@subscript
-\def\sb#1{\mathsub{\protect\subsupstyle#1}}%
-\def\sp#1{\mathsup{\protect\subsupstyle#1}}%
-\def\mathchoice{%
- \relax\ifcase\mathstyle
- \expandafter\@firstoffour
- \or
- \expandafter\@secondoffour
- \or
- \expandafter\@thirdoffour
- \else
- \expandafter\@fourthoffour
- \fi
-}
-\providecommand\@firstoffour[4]{#1}
-\providecommand\@secondoffour[4]{#2}
-\providecommand\@thirdoffour[4]{#3}
-\providecommand\@fourthoffour[4]{#4}
-\DeclareRobustCommand\genfrac[6]{%
- {#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}%
- }%
-}
-\renewcommand{\frac}{\genfrac{}{}{}{}}
-\providecommand{\dfrac}{}
-\providecommand{\tfrac}{}
-\renewcommand{\dfrac}{\genfrac\displaystyle{}{}{}}
-\renewcommand{\tfrac}{\genfrac\textstyle{}{}{}}
-\providecommand{\binom}{}
-\providecommand{\tbinom}{}
-\providecommand{\dbinom}{}
-\renewcommand{\binom}{\genfrac{}(){0pt}}
-\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
-\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
-\def\fracstyle{\ifcase\mathstyle
- \chardef\mathstyle=\@ne
- \or
- \chardef\mathstyle=\tw@
- \else
- \chardef\mathstyle=\thr@@
- \fi
-}
-\def\currentmathstyle{%
- \ifcase\mathstyle
- \@@displaystyle
- \or
- \@@textstyle
- \or
- \@@scriptstyle
- \or
- \@@scriptscriptstyle
- \fi}
-\DeclareOption{mathactivechars}{%
- % \catcode`\^=12\relax
- % \catcode`\_=12\relax
-\AtBeginDocument{\catcode`\^=12\relax \catcode`\_=12\relax}%
-}
-\DeclareOption{activechars}{%
- % \catcode`\^=13\relax
- % \catcode`\_=13\relax
-\AtBeginDocument{\catcode`\^=13\relax \catcode`\_=13\relax}%
-}
-\DeclareOption{noactivechars}{%
- % \catcode`\^=7\relax
- % \catcode`\_=8\relax
-\AtBeginDocument{\catcode`\^=7\relax \catcode`\_=8\relax}%
-}
-\ExecuteOptions{mathactivechars}
-\ProcessOptions\relax
-\ifnum\catcode`\^=13\relax
- \let^=\sp \let_=\sb
-\else
- \mathcode`\^="8000\relax
- \mathcode`\_="8000\relax
- \begingroup
- \catcode`\^=\active
- \catcode`\_=\active
- \global\let^=\sp
- \global\let_=\sb
- \endgroup
-\fi
-\endinput
-%%
-%% End of file `mathstyle.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty
deleted file mode 100644
index 8eec6199a2b..00000000000
--- a/Master/texmf-dist/tex/latex/mh/mathtools.sty
+++ /dev/null
@@ -1,1606 +0,0 @@
-%%
-%% This is file `mathtools.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mathtools.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 2002-2011 by Morten Hoegholm
-%% Copyright (C) 2012- by Lars Madsen
-%%
-%%
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file mathtools.dtx
-%% and the derived files
-%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
-%%
-\ProvidesPackage{mathtools}%
- [2014/05/21 v1.14 mathematical typesetting tools]
-\RequirePackage{keyval,calc}
-\RequirePackage{mhsetup}[2010/01/21]
-\MHInternalSyntaxOn
- % 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}%
- \@eha
- }%
- {%
- \@ifundefined{\expandafter\@gobble\string#1\space}%
- {%
- \expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
- \edef\reserved@a{\string#1}%
- \def\reserved@b{#1}%
- \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
- \edef#1{%
- \ifx\reserved@a\reserved@b
- \noexpand\x@protect\noexpand#1%
- \fi
- \noexpand\protect\expandafter\noexpand
- \csname\expandafter\@gobble\string#1\space\endcsname}%
- }%
- {\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
-}
-\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}%
- \@eha
- }%
- {%
- % \@ifundefined{\expandafter\@gobble\string#1\space}%
- % {%
- \expandafter\let\csname
- \expandafter\@gobble\string#1\space\endcsname=#1%
- \edef\reserved@a{\string#1}%
- \def\reserved@b{#1}%
- \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@b}%
- \edef#1{%
- \ifx\reserved@a\reserved@b
- \noexpand\x@protect\noexpand#1%
- \fi
- \noexpand\protect\expandafter\noexpand
- \csname\expandafter\@gobble\string#1\space\endcsname}%
- % }%
- % {\@latex@info{The control sequence `\string#1' is already robust}}%
- }%
-}
-\def\MT_options_name:{mathtools}
-\newcommand*\mathtoolsset[1]{\setkeys{\MT_options_name:}{#1}}
-\MH_new_boolean:n {fixamsmath}
-\DeclareOption{fixamsmath}{
- \MH_set_boolean_T:n {fixamsmath}
-}
-\DeclareOption{donotfixamsmathbugs}{
- \MH_set_boolean_F:n {fixamsmath}
-}
-\DeclareOption{allowspaces}{
- \MH_let:NwN \MaybeMHPrecedingSpacesOff
- \relax
- \MH_let:NwN \MH_maybe_nospace_ifnextchar:Nnn \kernel@ifnextchar
-}
-\DeclareOption{disallowspaces}{
- \MH_let:NwN \MaybeMHPrecedingSpacesOff
- \MHPrecedingSpacesOff
- \MH_let:NwN \MH_maybe_nospace_ifnextchar:Nnn \MH_nospace_ifnextchar:Nnn
-}
-\MH_new_boolean:n {robustify}
-\MH_set_boolean_T:n {robustify}
-\DeclareOption{nonrobust}{
- \MH_set_boolean_F:n {robustify}
-}
-\DeclareOption*{
- \PassOptionsToPackage{\CurrentOption}{amsmath}
-}
-\ExecuteOptions{fixamsmath,disallowspaces}
-\ProcessOptions\relax
-\MHInternalSyntaxOff
-\RequirePackage{amsmath}[2000/07/18]
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-\def\MT_true_false_error:{
- \PackageError{mathtools}
- {You~ have~ to~ select~ either~ `true'~ or~ `false'}
- {I'll~ assume~ you~ chose~ `false'~ for~ now.}
-}
-\MH_if_boolean:nT {robustify}{
- \EQ_MakeRobust\(
- \EQ_MakeRobust\)
- \EQ_MakeRobust\[
- \EQ_MakeRobust\]
-}
-\def\MT_define_tagform:nwnn #1[#2]#3#4{
- \@namedef{MT_tagform_#1:n}##1
- {\maketag@@@{#3\ignorespaces#2{##1}\unskip\@@italiccorr#4}}
-}
-\providecommand*\newtagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {\@ifnextchar[%
- {\MT_define_tagform:nwnn #1}%
- {\MT_define_tagform:nwnn #1[]}%
- }{\PackageError{mathtools}
- {The~ tag~ form~ `#1'~ is~ already~ defined\MessageBreak
- You~ probably~ want~ to~ look~ up~ \@backslashchar renewtagform~
- instead}
- {I~ will~ just~ ignore~ your~ wish~ for~ now.}}
-}
-\newtagform{default}{(}{)}
-\providecommand*\renewtagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {\PackageError{mathtools}
- {The~ tag~ form~ `#1'~ is~ not~ defined\MessageBreak
- You~ probably~ want~ to~ look~ up~ \@backslashchar newtagform~ instead}
- {I~ will~ just~ ignore~ your~ wish~ for~ now.}}
- {\@ifnextchar[%
- {\MT_define_tagform:nwnn #1}%
- {\MT_define_tagform:nwnn #1[]}%
- }
-}
-\providecommand*\usetagform[1]{%
- \@ifundefined{MT_tagform_#1:n}
- {
- \PackageError{mathtools}{%
- You~ have~ chosen~ the~ tag~ form~ `#1'\MessageBreak
- but~ it~ appears~ to~ be~ undefined}
- {I~ will~ use~ the~ default~ tag~ form~ instead.}%
- \@namedef{tagform@}{\@nameuse{MT_tagform_default:n}}
- }
- { \@namedef{tagform@}{\@nameuse{MT_tagform_#1:n}} }
- \MH_if_boolean:nT {show_only_refs}{
- \MH_let:NwN \MT_prev_tagform:n \tagform@
- \def\tagform@##1{\MT_extended_tagform:n {##1}}
- }
-}
-\MH_new_boolean:n {manual_tag}
-\MH_new_boolean:n {raw_maketag}
-\MH_let:NwN \MT_AmS_tag_in_align: \tag@in@align
-\def\tag@in@align{
- \global\MH_set_boolean_T:n {manual_tag}
- \MT_AmS_tag_in_align:
-}
-\def\tag@in@display#1#{
- \relax
- \global\MH_set_boolean_T:n {manual_tag}
- \tag@in@display@a{#1}
-}
-\def\MT_extended_tagform:n #1{
- \MH_set_boolean_F:n {raw_maketag}
- \if_meaning:NN \df@label\@empty
- \MH_if_boolean:nTF {manual_tag}% this was \MH_if_boolean:nT before
- { \MH_if_boolean:nTF {show_manual_tags}
- { \MT_prev_tagform:n {#1} }
- { \stepcounter{equation} }
- }{\kern1sp}% this last {\kern1sp} is new.
- \else:
- \MH_if_boolean:nTF {manual_tag}
- { \MH_if_boolean:nTF {show_manual_tags}
- { \MT_prev_tagform:n {#1} }
- { \@safe@activestrue
- \@ifundefined{MT_r_\df@label}
- { \global\MH_set_boolean_F:n {manual_tag} }
- { \MT_prev_tagform:n {#1} }
- \@safe@activesfalse
- }
- }
- {
- \@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}
-}
-\def\MT_extended_maketag:n #1{
- \ifx\df@label\@empty
- \MT_maketag:n {#1}
- \else:
- \MH_if_boolean:nTF {raw_maketag}
- {
- \MH_if_boolean:nTF {show_manual_tags}
- { \MT_maketag:n {#1} }
- { \@safe@activestrue
- \@ifundefined{MT_r_\df@label}
- { }
- { \MT_maketag:n {#1} }
- \@safe@activesfalse
- }
- }
- { \MT_maketag:n {#1} }
- \fi:
- \global\MH_set_boolean_F:n {manual_tag}
-}
-\def\MT_extended_eqref:n #1{
- \protected@write\@auxout{}
- {\string\MT@newlabel{#1}}
- \textup{\MT_prev_tagform:n {\ref{#1}}}
-}
-\EQ_MakeRobust\MT_extended_eqref:n
-\newcommand*\refeq[1]{
- \textup{\ref{#1}}
-}
-\def\MT_extended_refeq:n #1{
- \protected@write\@auxout{}
- {\string\MT@newlabel{#1}}
- \textup{\ref{#1}}
-}
-\newcommand*\MT@newlabel[1]{ \global\@namedef{MT_r_#1}{} }
-\MH_new_boolean:n {show_only_refs}
-\MH_new_boolean:n {show_manual_tags}
-\define@key{\MT_options_name:}{showmanualtags}[true]{
- \@ifundefined{boolean_show_manual_tags_#1:}
- { \MT_true_false_error:
- \@nameuse{boolean_show_manual_tags_false:}
- }
- { \@nameuse{boolean_show_manual_tags_#1:} }
-}
-\newcommand*\MT_showonlyrefs_true:{
- \MH_if_boolean:nF {show_only_refs}{
- \MH_set_boolean_T:n {show_only_refs}
- \MH_let:NwN \MT_incr_eqnum: \incr@eqnum
- \MH_let:NwN \incr@eqnum \@empty
- \MH_let:NwN \MT_array_parbox_restore: \@arrayparboxrestore
- \@xp\def\@xp\@arrayparboxrestore\@xp{\@arrayparboxrestore
- \MH_let:NwN \incr@eqnum \@empty
- }
- \MH_let:NwN \MT_prev_tagform:n \tagform@
- \MH_let:NwN \MT_eqref:n \eqref
- \MH_let:NwN \MT_refeq:n \refeq
- \MH_let:NwN \MT_maketag:n \maketag@@@
- \MH_let:NwN \maketag@@@ \MT_extended_maketag:n
- \def\tagform@##1{\MT_extended_tagform:n {##1}}
- \MH_let:NwN \eqref \MT_extended_eqref:n
- \MH_let:NwN \refeq \MT_extended_refeq:n
- }
-}
-\def\MT_showonlyrefs_false: {
- \MH_if_boolean:nT {show_only_refs}{
- \MH_set_boolean_F:n {show_only_refs}
- \MH_let:NwN \tagform@ \MT_prev_tagform:n
- \MH_let:NwN \eqref \MT_eqref:n
- \MH_let:NwN \refeq \MT_refeq:n
- \MH_let:NwN \maketag@@@ \MT_maketag:n
- \MH_let:NwN \incr@eqnum \MT_incr_eqnum:
- \MH_let:NwN \@arrayparboxrestore \MT_array_parbox_restore:
- }
-}
-\define@key{\MT_options_name:}{showonlyrefs}[true]{
- \@nameuse{MT_showonlyrefs_#1:}
-}
-\renewcommand\nonumber{
- \if@eqnsw
- \if_meaning:NN \incr@eqnum\@empty
- \MH_if_boolean:nF {show_only_refs}
- {\addtocounter{equation}\m@ne}
- \fi:
- \fi:
- \MH_let:NwN \print@eqnum\@empty \MH_let:NwN \incr@eqnum\@empty
- \global\@eqnswfalse
-}
-\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%
- \@safe@activesfalse}
- \@esphack}
-
-\providecommand\@safe@activestrue{}%
-\providecommand\@safe@activesfalse{}%
-
-\MHInternalSyntaxOn
-\providecommand*\xleftrightarrow[2][]{%
- \ext@arrow 3095\MT_leftrightarrow_fill:{#1}{#2}}
-\def\MT_leftrightarrow_fill:{%
- \arrowfill@\leftarrow\relbar\rightarrow}
-\providecommand*\xLeftarrow[2][]{%
- \ext@arrow 0055{\Leftarrowfill@}{#1}{#2}}
-\providecommand*\xRightarrow[2][]{%
- \ext@arrow 0055{\Rightarrowfill@}{#1}{#2}}
-\providecommand*\xLeftrightarrow[2][]{%
- \ext@arrow 0055{\Leftrightarrowfill@}{#1}{#2}}
-\def\MT_rightharpoondown_fill:{%
- \arrowfill@\relbar\relbar\rightharpoondown}
-\def\MT_rightharpoonup_fill:{%
- \arrowfill@\relbar\relbar\rightharpoonup}
-\def\MT_leftharpoondown_fill:{%
- \arrowfill@\leftharpoondown\relbar\relbar}
-\def\MT_leftharpoonup_fill:{%
- \arrowfill@\leftharpoonup\relbar\relbar}
-\providecommand*\xrightharpoondown[2][]{%
- \ext@arrow 0359\MT_rightharpoondown_fill:{#1}{#2}}
-\providecommand*\xrightharpoonup[2][]{%
- \ext@arrow 0359\MT_rightharpoonup_fill:{#1}{#2}}
-\providecommand*\xleftharpoondown[2][]{%
- \ext@arrow 3095\MT_leftharpoondown_fill:{#1}{#2}}
-\providecommand*\xleftharpoonup[2][]{%
- \ext@arrow 3095\MT_leftharpoonup_fill:{#1}{#2}}
-\providecommand*\xleftrightharpoons[2][]{\mathrel{%
- \raise.22ex\hbox{%
- $\ext@arrow 3095\MT_leftharpoonup_fill:{\phantom{#1}}{#2}$}%
- \setbox0=\hbox{%
- $\ext@arrow 0359\MT_rightharpoondown_fill:{#1}{\phantom{#2}}$}%
- \kern-\wd0 \lower.22ex\box0}}
-\providecommand*\xrightleftharpoons[2][]{\mathrel{%
- \raise.22ex\hbox{%
- $\ext@arrow 0359\MT_rightharpoonup_fill:{\phantom{#1}}{#2}$}%
- \setbox0=\hbox{%
- $\ext@arrow 3095\MT_leftharpoondown_fill:{#1}{\phantom{#2}}$}%
- \kern-\wd0 \lower.22ex\box0}}
-\providecommand*\xhookleftarrow[2][]{%
- \ext@arrow 3095\MT_hookleft_fill:{#1}{#2}}
-\def\MT_hookleft_fill:{%
- \arrowfill@\leftarrow\relbar{\relbar\joinrel\rhook}}
-\providecommand*\xhookrightarrow[2][]{%
- \ext@arrow 3095\MT_hookright_fill:{#1}{#2}}
-\def\MT_hookright_fill:{%
- \arrowfill@{\lhook\joinrel\relbar}\relbar\rightarrow}
-\providecommand*\xmapsto[2][]{%
- \ext@arrow 0395\MT_mapsto_fill:{#1}{#2}}
-\def\MT_mapsto_fill:{%
- \arrowfill@{\mapstochar\relbar}\relbar\rightarrow}
-\providecommand*\underbracket{
- \@ifnextchar[
- {\MT_underbracket_I:w}
- {\MT_underbracket_I:w[\l_MT_bracketheight_fdim]}}
-\def\MT_underbracket_I:w[#1]{
- \@ifnextchar[
- {\MT_underbracket_II:w[#1]}
- {\MT_underbracket_II:w[#1][.7\fontdimen5\textfont2]}}
-\def\MT_underbracket_II:w[#1][#2]#3{%
- \mathop{\vtop{\m@th\ialign{##
- \crcr
- $\hfil\displaystyle{#3}\hfil$%
- \crcr
- \noalign{\kern .2\fontdimen5\textfont2 \nointerlineskip}%
- \upbracketfill {#1}{#2}%
- \crcr}}}
- \limits}
-\def\upbracketfill#1#2{%
- \sbox\z@{$\braceld$}
- \edef\l_MT_bracketheight_fdim{\the\ht\z@}%
- \upbracketend{#1}{#2}
- \leaders \vrule \@height \z@ \@depth #1 \hfill
- \upbracketend{#1}{#2}%
-}
-\def\upbracketend#1#2{\vrule \@height #2 \@width #1\relax}
-\providecommand*\overbracket{
- \@ifnextchar[
- {\MT_overbracket_I:w}
- {\MT_overbracket_I:w[\l_MT_bracketheight_fdim]}}
-\def\MT_overbracket_I:w[#1]{
- \@ifnextchar[
- {\MT_overbracket_II:w[#1]}
- {\MT_overbracket_II:w[#1][.7\fontdimen5\textfont2]}}
-\def\MT_overbracket_II:w[#1][#2]#3{%
- \mathop{\vbox{\m@th\ialign{##
- \crcr
- \downbracketfill{#1}{#2}%
- \crcr
- \noalign{\kern .2\fontdimen5\textfont2 \nointerlineskip}%
- $\hfil\displaystyle{#3}\hfil$
- \crcr}}}%
- \limits}
-\def\downbracketfill#1#2{%
- \sbox\z@{$\braceld$}\edef\l_MT_bracketheight_fdim{\the\ht\z@}
- \downbracketend{#1}{#2}
- \leaders \vrule \@height #1 \@depth \z@ \hfill
- \downbracketend{#1}{#2}%
-}
-\def\downbracketend#1#2{\vrule \@width #1\@depth #2\relax}
-\MH_let:NwN \LaTeXunderbrace \underbrace
-\def\underbrace#1{\mathop{\vtop{\m@th\ialign{##\crcr
- $\hfil\displaystyle{#1}\hfil$\crcr
- \noalign{\kern.7\fontdimen5\textfont2\nointerlineskip}%
- \upbracefill\crcr\noalign{\kern.5\fontdimen5\textfont2}}}}\limits}
-\MH_let:NwN \LaTeXoverbrace \overbrace
-\def\overbrace#1{\mathop{\vbox{\m@th\ialign{##\crcr
- \noalign{\kern.5\fontdimen5\textfont2}%
- \downbracefill\crcr
- \noalign{\kern.7\fontdimen5\textfont2\nointerlineskip}%
- $\hfil\displaystyle{#1}\hfil$\crcr}}}\limits}
-\providecommand*\lparen{(}
-\providecommand*\rparen{)}
-
-\def\vcentcolon{\mathrel{\mathop\ordinarycolon}}
-\providecommand\ordinarycolon{:}
-\begingroup
- \catcode`\:=\active
- \lowercase{\endgroup
-\def\MT_activate_colon{%
- \ifnum\mathcode`\:=32768\relax
- \let\ordinarycolon= :%
- \else
- \mathchardef\ordinarycolon\mathcode`\: %
- \fi
- \let :\vcentcolon
- }
-}
-\MH_new_boolean:n {center_colon}
-\define@key{\MT_options_name:}{centercolon}[true]{
- \@ifundefined{MT_active_colon_#1:}
- { \MT_true_false_error:n
- \@nameuse{MT_active_colon_false:}
- }
- { \@nameuse{MT_active_colon_#1:} }
-}
-\def\MT_active_colon_true: {
- \MT_activate_colon
- \MH_if_boolean:nF {center_colon}{
- \MH_set_boolean_T:n {center_colon}
- \edef\MT_active_colon_false:
- {\mathcode`\noexpand\:=\the\mathcode`\:\relax}
- \mathcode`\:=32768
- }
-}
-\AtBeginDocument{
- \providecommand*\dblcolon{\mathrel{\vcentcolon\mkern-.9mu\vcentcolon}}
- \providecommand*\coloneqq{\mathrel{\vcentcolon\mkern-1.2mu=}}
- \providecommand*\Coloneqq{\mathrel{\dblcolon\mkern-1.2mu=}}
- \providecommand*\coloneq{\mathrel{\vcentcolon\mkern-1.2mu\mathrel{-}}}
- \providecommand*\Coloneq{\mathrel{\dblcolon\mkern-1.2mu\mathrel{-}}}
- \providecommand*\eqqcolon{\mathrel{=\mkern-1.2mu\vcentcolon}}
- \providecommand*\Eqqcolon{\mathrel{=\mkern-1.2mu\dblcolon}}
- \providecommand*\eqcolon{\mathrel{\mathrel{-}\mkern-1.2mu\vcentcolon}}
- \providecommand*\Eqcolon{\mathrel{\mathrel{-}\mkern-1.2mu\dblcolon}}
- \providecommand*\colonapprox{\mathrel{\vcentcolon\mkern-1.2mu\approx}}
- \providecommand*\Colonapprox{\mathrel{\dblcolon\mkern-1.2mu\approx}}
- \providecommand*\colonsim{\mathrel{\vcentcolon\mkern-1.2mu\sim}}
- \providecommand*\Colonsim{\mathrel{\dblcolon\mkern-1.2mu\sim}}
-}
-\let \AMS@math@cr@@ \math@cr@@
-\MH_new_boolean:n {mult_firstline}
-\MH_new_boolean:n {outer_mult}
-\newcount\g_MT_multlinerow_int
-\newdimen\l_MT_multwidth_dim
-\newcommand*\MT_test_for_tcb_other:nnnnn [1]{
- \if:w t#1\relax
- \expandafter\MH_use_choice_i:nnnn
- \else:
- \if:w c#1\relax
- \expandafter\expandafter\expandafter\MH_use_choice_ii:nnnn
- \else:
- \if:w b#1\relax
- \expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\expandafter
- \MH_use_choice_iii:nnnn
- \else:
- \expandafter\expandafter\expandafter
- \expandafter\expandafter\expandafter\expandafter
- \MH_use_choice_iv:nnnn
- \fi:
- \fi:
- \fi:
-}
-\def\MT_mult_invisible_line: {
- \crcr
- \global\MH_set_boolean_F:n {mult_firstline}
- \hbox to \l_MT_multwidth_dim{}\crcr
- \noalign{\vskip-\baselineskip \vskip-\jot \vskip-\normallineskip}
-}
-\def\MT_mult_mathcr_atat:w [#1]{%
- \if_num:w 0=`{\fi: \iffalse}\fi:
- \MH_if_boolean:nT {mult_firstline}{
- \kern\l_MT_mult_left_fdim
- \MT_mult_invisible_line:
- }
- \crcr
- \noalign{\vskip#1\relax}
- \global\advance\g_MT_multlinerow_int\@ne
- \if_num:w \g_MT_multlinerow_int=\l_MT_multline_lastline_fint
- \MH_let:NwN \math@cr@@\MT_mult_last_mathcr:w
- \fi:
-}
-\def\MT_mult_firstandlast_mathcr:w [#1]{%
- \if_num:w 0=`{\fi: \iffalse}\fi:
- \kern\l_MT_mult_left_fdim
- \MT_mult_invisible_line:
- \noalign{\vskip#1\relax}
- \kern\l_MT_mult_right_fdim
-}
-\def\MT_mult_last_mathcr:w [#1]{
- \if_num:w 0=`{\fi: \iffalse}\fi:\math@cr@@@
- \noalign{\vskip#1\relax}
- \kern\l_MT_mult_right_fdim}
-\newcommand\MT_start_mult:N [1]{
- \MT_test_for_tcb_other:nnnnn {#1}
- { \MH_let:NwN \MT_next:\vtop }
- { \MH_let:NwN \MT_next:\vcenter }
- { \MH_let:NwN \MT_next:\vbox }
- {
- \PackageError{mathtools}
- {Invalid~ position~ specifier.~ I'll~ try~ to~ recover~ with~
- `c'}\@ehc
- }
- \collect@body\MT_mult_internal:n
-}
-\newcommand*\MT_shoveright:wn [2][0pt]{%
- #2\hfilneg
- \setlength\@tempdima{#1}
- \kern\@tempdima
-}
-\newcommand*\MT_shoveleft:wn [2][0pt]{%
- \hfilneg
- \setlength\@tempdima{#1}
- \kern\@tempdima
- #2
-}
-\newcommand*\MT_mult_internal:n [1]{
- \MH_if_boolean:nF {outer_mult}{\null\,}
- \MT_next:
- \bgroup
- \Let@
- \def\l_MT_multline_lastline_fint{0 }
- \chardef\dspbrk@context\@ne \restore@math@cr
- \MH_let:NwN \math@cr@@\MT_mult_mathcr_atat:w
- \MH_let:NwN \shoveleft\MT_shoveleft:wn
- \MH_let:NwN \shoveright\MT_shoveright:wn
- \spread@equation
- \MH_set_boolean_F:n {mult_firstline}
- \MT_measure_mult:n {#1}
- \if_dim:w \l_MT_multwidth_dim<\l_MT_multline_measure_fdim
- \MH_setlength:dn \l_MT_multwidth_dim{\l_MT_multline_measure_fdim}
- \fi
- \MH_set_boolean_T:n {mult_firstline}
- \if_num:w \l_MT_multline_lastline_fint=\@ne
- \MH_let:NwN \math@cr@@ \MT_mult_firstandlast_mathcr:w
- \fi:
- \ialign\bgroup
- \hfil\strut@$\m@th\displaystyle{}##$\hfil
- \crcr
- \hfilneg
- #1
-}
-\newcommand\MT_measure_mult:n [1]{
- \begingroup
- \g_MT_multlinerow_int\@ne
- \MH_let:NwN \label\MT_gobblelabel:w
- \MH_let:NwN \tag\gobble@tag
- \setbox\z@\vbox{
- \ialign{\strut@$\m@th\displaystyle{}##$
- \crcr
- #1
- \crcr
- }
- }
- \xdef\l_MT_multline_measure_fdim{\the\wdz@}
- \advance\g_MT_multlinerow_int\m@ne
- \xdef\l_MT_multline_lastline_fint{\number\g_MT_multlinerow_int}
- \endgroup
- \g_MT_multlinerow_int\@ne
-}
-\MaybeMHPrecedingSpacesOff
-\newcommand*\MT_multlined_second_arg:w [1][\@empty]{
- \MT_test_for_tcb_other:nnnnn {#1}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {
- \if_meaning:NN \@empty#1\@empty
- \else:
- \setlength \l_MT_multwidth_dim{#1}
- \fi:
- }
- \MT_start_mult:N \MT_mult_default_pos:
-}
-\newenvironment{multlined}[1][]
- {\MH_group_align_safe_begin:
- \MT_test_for_tcb_other:nnnnn {#1}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {\def\MT_mult_default_pos:{#1}}
- {
- \if_meaning:NN \@empty#1\@empty
- \else:
- \setlength \l_MT_multwidth_dim{#1}
- \fi:
- }
- \MT_multlined_second_arg:w
- }
- {
- \hfilneg \endaligned \MH_group_align_safe_end:
- }
-\MHPrecedingSpacesOn
-\define@key{\MT_options_name:}
- {firstline-afterskip}{\def\l_MT_mult_left_fdim{#1}}
-\define@key{\MT_options_name:}
- {lastline-preskip}{\def\l_MT_mult_right_fdim{#1}}
-\define@key{\MT_options_name:}
- {multlined-width}{\setlength \l_MT_multwidth_dim{#1}}
-\define@key{\MT_options_name:}
- {multlined-pos}{\def\MT_mult_default_pos:{#1}}
-\setkeys{\MT_options_name:}{
- firstline-afterskip=\multlinegap,
- lastline-preskip=\multlinegap,
- multlined-width=0pt,
- 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}%
- { \@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}}
- \@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:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-\def\MHempty{}
-\def\DeclarePairedDelimiterX#1[#2]#3#4#5{%
- \@ifdefinable{#1}{
- \MT_paired_delimx_arg_test:n{#2}
- \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
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
- {\left#3}{#5}{\right#4}
- \endgroup
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [1][\MHempty]
- {
- \begingroup
- \def\delimsize{##1}
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_inner:}
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname
- [#2]
- {
- %\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}
- {
- \let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4
- }
- \endgroup
- }
- \DeclareRobustCommand{#1}{
- \@ifstar
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-\def\MT_paired_delimx_arg_test:n #1{
- \ifnum#1>9\relax
- \PackageError{mathtools}{No~ more~ than~ 9~ arguments}{}
- \else
- \ifnum#1<1\relax
- \PackageError{mathtools}{Macro~ need~ 1~ or~ more~
- arguments.\MessageBreak Please~ change~ [#1]~ to~ [1]~ ... [9]}{}
- \fi
- \fi
- }
-
-\def\DeclarePairedDelimiterXPP#1[#2]#3#4#5#6#7{%
- \@ifdefinable{#1}{
- \MT_paired_delimx_arg_test:n{#2}
- \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}
- #3
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _star_wrapper:nnn}
- {\left#4}{#7}{\right#5}
- #6
- \endgroup
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [1][\MHempty]
- {
- \begingroup
- \def\delimsize{##1}
- \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar_inner:}
- }
- \@xp\@xp\@xp
- \newcommand
- \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname
- [#2]
- {
- #3
- \@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 #4
- }
- {#7}
- {
- \let\MHempty\@gobble
- \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #5
- }
- #6
- \endgroup
- }
- \DeclareRobustCommand{#1}{
- \@ifstar
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}}
- {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostar:}}
- }
- }
-}
-
-
-\def\MT_start_cases:nnnn #1#2#3#4{ % #1=sep,#2=lpreamble,#3=rpreamble,#4=delim
- \RIfM@\else
- \nonmatherr@{\begin{\@currenvir}}
- \fi
- \MH_group_align_safe_begin:
- \left#4
- \vcenter \bgroup
- \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
- \let \math@cr@@\AMS@math@cr@@
- \spread@equation
- \ialign\bgroup
- \strut@#2 &#1\strut@
- #3
- \crcr
-}
-\def\MH_end_cases:{\crcr\egroup
- \restorecolumn@
- \egroup
- \MH_group_align_safe_end:
-}
-\newcommand*\newcases[6]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right
- \newenvironment{#1}
- {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
- {\MH_end_cases:\right#6}
-}
-\newcommand*\renewcases[6]{
- \renewenvironment{#1}
- {\MT_start_cases:nnnn {#2}{#3}{#4}{#5}}
- {\MH_end_cases:\right#6}
-}
-\newcases{dcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.}
-\newcases{dcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{\lbrace}{.}
-\newcases{rcases}{\quad}{%
- $\m@th{##}$\hfil}{$\m@th{##}$\hfil}{.}{\rbrace}
-\newcases{rcases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{.}{\rbrace}
-\newcases{drcases}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{$\m@th\displaystyle{##}$\hfil}{.}{\rbrace}
-\newcases{drcases*}{\quad}{%
- $\m@th\displaystyle{##}$\hfil}{{##}\hfil}{.}{\rbrace}
-\newcases{cases*}{\quad}{%
- $\m@th{##}$\hfil}{{##}\hfil}{\lbrace}{.}
-\def\MT_matrix_begin:N #1{%
- \hskip -\arraycolsep
- \MH_let:NwN \@ifnextchar \MH_nospace_ifnextchar:Nnn
- \array{*\c@MaxMatrixCols #1}}
-\def\MT_matrix_end:{\endarray \hskip -\arraycolsep}
-\MaybeMHPrecedingSpacesOff
-\newenvironment{matrix*}[1][c]
- {\MT_matrix_begin:N #1}
- {\MT_matrix_end:}
-\newenvironment{pmatrix*}[1][c]
- {\left(\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right)}
-\newenvironment{bmatrix*}[1][c]
- {\left[\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right]}
-\newenvironment{Bmatrix*}[1][c]
- {\left\lbrace\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\rbrace}
-\newenvironment{vmatrix*}[1][c]
- {\left\lvert\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\rvert}
-\newenvironment{Vmatrix*}[1][c]
- {\left\lVert\MT_matrix_begin:N #1}
- {\MT_matrix_end:\right\lVert}
-\def\MT_smallmatrix_begin:N #1{%
- \Let@\restore@math@cr\default@tag
- \baselineskip6\ex@ \lineskip1.5\ex@ \lineskiplimit\lineskip
- \csname MT_smallmatrix_#1_begin:\endcsname
-}
-\def\MT_smallmatrix_end:{\crcr\egroup\egroup\MT_smallmatrix_inner_space:}
-\def\MT_smallmatrix_l_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup$\m@th\scriptstyle##$\hfil&&\thickspace
- $\m@th\scriptstyle##$\hfil\crcr
-}
-\def\MT_smallmatrix_c_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup\hfil$\m@th\scriptstyle##$\hfil&&\thickspace\hfil
- $\m@th\scriptstyle##$\hfil\crcr
-}
-\def\MT_smallmatrix_r_begin:{\null\MT_smallmatrix_inner_space:\vcenter\bgroup
- \ialign\bgroup\hfil$\m@th\scriptstyle##$&&\thickspace\hfil
- $\m@th\scriptstyle##$\crcr
-}
-\newenvironment{smallmatrix*}[1][\MT_smallmatrix_default_align:]
- {\MT_smallmatrix_begin:N #1}
- {\MT_smallmatrix_end:}
-\def\MT_fenced_sm_generator:nnn #1#2#3{%
- \@ifundefined{#1}{%
- \newenvironment{#1}
- {\@nameuse{#1hook}\mathopen{}\mathclose\bgroup\left#2\MT_smallmatrix_begin:N c}%
- {\MT_smallmatrix_end:\aftergroup\egroup\right#3}%
- }{}%
- \@ifundefined{#1*}{%
- \newenvironment{#1*}[1][\MT_smallmatrix_default_align:]%
- {\@nameuse{#1hook}\mathopen{}\mathclose\bgroup\left#2\MT_smallmatrix_begin:N ##1}%
- {\MT_smallmatrix_end:\aftergroup\egroup\right#3}%
- }{}%
-}
-\MT_fenced_sm_generator:nnn{psmallmatrix}()
-\MT_fenced_sm_generator:nnn{bsmallmatrix}[]
-\MT_fenced_sm_generator:nnn{Bsmallmatrix}\lbrace\rbrace
-\MT_fenced_sm_generator:nnn{vsmallmatrix}\lvert\rvert
-\MT_fenced_sm_generator:nnn{Vsmallmatrix}\lVert\rVert
-\define@key{\MT_options_name:}
- {smallmatrix-align}{\def\MT_smallmatrix_default_align:{#1}}
-\define@key{\MT_options_name:}
- {smallmatrix-inner-space}{\def\MT_smallmatrix_inner_space:{#1}}
-\setkeys{\MT_options_name:}{
- smallmatrix-align=c,
- smallmatrix-inner-space=\,
-}
-
-\MHPrecedingSpacesOn
-\newcommand*\smashoperator[2][lr]{
- \def\MT_smop_use:NNNNN {\@nameuse{MT_smop_smash_#1:NNNNN}}
- \toks@{#2}
- \expandafter\MT_smop_get_args:wwwNnNn
- \the\toks@\@nil\@nil\@nil\@nil\@nil\@nil\@@nil
-}
-\def\MT_smop_remove_nil_vi:N #1\@nil\@nil\@nil\@nil\@nil\@nil{#1}
-\def\MT_smop_mathop:n {\mathop}
-\def\MT_smop_limits: {\limits}
-\MH_new_boolean:n {smop_one}
-\MH_new_boolean:n {smop_two}
-\def\MT_smop_get_args:wwwNnNn #1#2#3#4#5#6#7\@@nil{%
- \begingroup
- \def\MT_smop_arg_A: {#1} \def\MT_smop_arg_B: {#2}
- \def\MT_smop_arg_C: {#3} \def\MT_smop_arg_D: {#4}
- \def\MT_smop_arg_E: {#5} \def\MT_smop_arg_F: {#6}
- \def\MT_smop_arg_G: {#7}
- \if_meaning:NN \MT_smop_arg_A: \MT_smop_mathop:n
- \if_meaning:NN \MT_smop_arg_C:\MT_smop_limits:
- \def\MT_smop_final_arg_A:{#1{#2}}%
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_D:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_E:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_F:
- \edef\MT_smop_final_arg_E:
- {\expandafter\MT_smop_remove_nil_vi:N \MT_smop_arg_G: }
- \fi:
- \fi:
- \else:
- \def\MT_smop_final_arg_A:{#1{#2}}%
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_C:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_D:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_E:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_F:
- \fi:
- \fi:
- \fi:
- \else:
- \if_meaning:NN \MT_smop_arg_B:\MT_smop_limits:
- \def\MT_smop_final_arg_A:{#1}%
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_C:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_D:
- \if_meaning:NN \MT_smop_arg_F: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_E:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_F:
- \fi:
- \fi:
- \else:
- \def\MT_smop_final_arg_A:{#1}%
- \if_meaning:NN \MT_smop_arg_C: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_one}
- \MH_let:NwN \MT_smop_final_arg_B: \MT_smop_arg_B:
- \MH_let:NwN \MT_smop_final_arg_C: \MT_smop_arg_C:
- \if_meaning:NN \MT_smop_arg_D: \@nnil
- \else:
- \MH_set_boolean_T:n {smop_two}
- \MH_let:NwN \MT_smop_final_arg_D: \MT_smop_arg_D:
- \MH_let:NwN \MT_smop_final_arg_E: \MT_smop_arg_E:
- \fi:
- \fi:
- \fi:
- \fi:
- \MH_if_boolean:nT {smop_one}{
- \MT_smop_measure:NNNNN
- \MT_smop_final_arg_A: \MT_smop_final_arg_B: \MT_smop_final_arg_C:
- \MT_smop_final_arg_D: \MT_smop_final_arg_E:
- }
- \MT_smop_use:NNNNN
- \MT_smop_final_arg_A: \MT_smop_final_arg_B: \MT_smop_final_arg_C:
- \MT_smop_final_arg_D: \MT_smop_final_arg_E:
- \endgroup
-}
-\def\MT_smop_needed_args:NNNNN #1#2#3#4#5{%
- \displaystyle #1
- \MH_if_boolean:nT {smop_one}{
- \limits#2{\MT_cramped_clap_internal:Nn \scriptstyle{#3}}
- \MH_if_boolean:nT {smop_two}{
- #4{\MT_cramped_clap_internal:Nn \scriptstyle{#5}}
- }
- }
-}
-\def\MT_smop_measure:NNNNN #1#2#3#4#5{%
- \MH_let:NwN \MT_saved_mathclap:Nn \MT_cramped_clap_internal:Nn
- \MH_let:NwN \MT_cramped_clap_internal:Nn \@secondoftwo
- \sbox\z@{$\m@th\MT_smop_needed_args:NNNNN #1#2#3#4#5$}
- \MH_let:NwN \MT_cramped_clap_internal:Nn \MT_saved_mathclap:Nn
- \sbox\tw@{$\m@th\displaystyle#1$}
- \@tempdima=.5\wd0
- \advance\@tempdima-.5\wd2
-}
-\def\MT_smop_smash_l:NNNNN #1#2#3#4#5{
- \MT_smop_needed_args:NNNNN #1#2#3#4#5\kern\@tempdima
-}
-\def\MT_smop_smash_r:NNNNN #1#2#3#4#5{
- \kern\@tempdima\MT_smop_needed_args:NNNNN #1#2#3#4#5
-}
-\def\MT_smop_smash_lr:NNNNN #1#2#3#4#5{
- \MT_smop_needed_args:NNNNN #1#2#3#4#5
-}
-\def\MT_vphantom:Nn {\v@true\h@false\MT_internal_phantom:N}
-\def\MT_hphantom:Nn {\v@false\h@true\MT_internal_phantom:N}
-\def\MT_phantom:Nn {\v@true\h@true\MT_internal_phantom:N}
-\def\MT_internal_phantom:N #1{
- \ifmmode
- \expandafter\mathph@nt\expandafter#1
- \else
- \expandafter\makeph@nt
- \fi
-}
-\newcommand*\adjustlimits[6]{
- \sbox\z@{$\m@th \displaystyle #1$}
- \sbox\tw@{$\m@th \displaystyle #4$}
- \@tempdima=\dp\z@ \advance\@tempdima-\dp\tw@
- \if_dim:w \@tempdima>\z@
- \mathop{#1}\limits#2{#3}
- \else:
- \mathop{#1\MT_vphantom:Nn \displaystyle{#4}}\limits
- #2{
- \def\finsm@sh{\ht\z@\z@ \box\z@}
- \mathsm@sh\scriptstyle{\MT_cramped_internal:Nn \scriptstyle{#3}}
- \MT_vphantom:Nn \scriptstyle
- {\MT_cramped_internal:Nn \scriptstyle{#6}}
- }
- \fi:
- \if_dim:w \@tempdima>\z@
- \mathop{#4\MT_vphantom:Nn \displaystyle{#1}}\limits
- #5
- {
- \MT_vphantom:Nn \scriptstyle
- {\MT_cramped_internal:Nn \scriptstyle{#3}}
- \def\finsm@sh{\ht\z@\z@ \box\z@}
- \mathsm@sh\scriptstyle{\MT_cramped_internal:Nn \scriptstyle{#6}}
- }
- \else:
- \mathop{#4}\limits#5{#6}
- \fi:
-}
-\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
- \iffalse{\fi\ifnum0=`}\fi
- \@ifstar{\ArrowBetweenLines@auxI{00}}{\ArrowBetweenLines@auxI{01}}}
-\def\ArrowBetweenLines@auxI#1{%
- \@ifnextchar[%
- {\ArrowBetweenLines@auxII{#1}}%
- {\ArrowBetweenLines@auxII{#1}[\Updownarrow]}}
-\def\ArrowBetweenLines@auxII#1[#2]{%
- \ifnum0=`{\fi \iffalse}\fi
- \expandafter\in@\expandafter{\@currenvir}%
- {alignedat,aligned,gathered}%
- \ifin@ \else
- \notag
- \fi%
- \\
- \noalign{\nobreak\vskip-\baselineskip\vskip-\lineskip}%
- \noalign{\expandafter\in@\expandafter{\@currenvir}%
- {alignedat,aligned,gathered}%
- \ifin@ \else\notag\fi%
- }%
- \if#1 &&\quad #2\else #2\quad\fi
- \\\noalign{\nobreak\vskip-\lineskip}}
-
-\MHInternalSyntaxOn
-\newcommand\vdotswithin[1]{%
- {\mathmakebox[\widthof{\ensuremath{{}#1{}}}][c]{{\vdots}}}}
-\newlength\origjot
-\setlength\origjot{\jot}
-\newdimen\l_MT_shortvdotswithinadjustabove_dim
-\newdimen\l_MT_shortvdotswithinadjustbelow_dim
-\define@key{\MT_options_name:}
- {shortvdotsadjustabove}{\setlength\l_MT_shortvdotswithinadjustabove_dim{#1}}
-\define@key{\MT_options_name:}
- {shortvdotsadjustbelow}{\setlength\l_MT_shortvdotswithinadjustbelow_dim{#1}}
-\setkeys{\MT_options_name:}{
- shortvdotsadjustabove=2.15\origjot,
- shortvdotsadjustbelow=\origjot
-}
-\def\shortvdotswithin{\relax
- \@ifstar{\MT_svwi_aux:nn{00}}{\MT_svwi_aux:nn{01}}}
-\def\MT_svwi_aux:nn #1#2{
- \MTFlushSpaceAbove
- \if#1 \vdotswithin{#2}& \else &\vdotswithin{#2} \fi
- \MTFlushSpaceBelow
-}
-\def\MT_remove_tag_unless_inner:n #1{%
- \begingroup
- \def\etb@tempa##1|#1|##2\MT@END{\endgroup
- \ifx\@empty##2\@empty\notag\fi}%
- \expandafter\etb@tempa\expandafter|alignedat|aligned|split|#1|\MT@END}
- %| emacs
-\newcommand\MTFlushSpaceAbove{
- \expandafter\MT_remove_tag_unless_inner:n\expandafter{\@currenvir}
- \\
- \noalign{%
- \nobreak\vskip-\baselineskip\vskip-\lineskip%
- \vskip-\l_MT_shortvdotswithinadjustabove_dim
- \vskip-\origjot
- \vskip\jot
- }%
- \noalign{
- \expandafter\MT_remove_tag_unless_inner:n\expandafter{\@currenvir}
- }
-}
-\newcommand\MTFlushSpaceBelow{
- \\\noalign{%
- \nobreak\vskip-\lineskip
- \vskip-\l_MT_shortvdotswithinadjustbelow_dim
- \vskip-\origjot
- \vskip\jot
- }
-}
-
-\def\MH_nrotarrow:NN #1#2{%
- \setbox0=\hbox{$\m@th#1\uparrow$}\dimen0=\dp0
- \setbox0=\hbox{%
- \reflectbox{\rotatebox[origin=c]{90}{$\m@th#1\mkern2.22mu #2$}}}%
- \dp0=\dimen0 \box0 \mkern2.3965mu
-}
-\def\MH_nuparrow: {%
- \mathrel{\mathpalette\MH_nrotarrow:NN\nrightarrow} }
-\def\MH_ndownarrow: {%
- \mathrel{\mathpalette\MH_nrotarrow:NN\nleftarrow} }
-\AtBeginDocument{%
- \RequirePackage{graphicx}%
- \@ifundefined{nrightarrow}{%
- \providecommand\nuparrow{%
- \PackageError{mathtools}{\string\nuparrow\space~ is~
- constructed~ from~ \string\nrightarrow,~ which~ is~ not~
- provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
- }}{ \providecommand\nuparrow{\MH_nuparrow:}}
- \@ifundefined{nleftarrow}{%
- \providecommand\ndownarrow{%
- \PackageError{mathtools}{\string\ndownarrow\space~ is~
- constructed~ from~ \string\nleftarrow,~ which~ is~ not~
- provided.~ Please~ load~ the~ amssymb~ package~ or~ similar}{}
- }}{ \providecommand\ndownarrow{\MH_ndownarrow:}} }
-\def\MH_bigtimes_scaler:N #1{%
- \vcenter{\hbox{#1$\m@th\mkern-2mu\times\mkern-2mu$}}}
-\def\MH_bigtimes_inner: {
- \mathchoice{\MH_bigtimes_scaler:N \huge} % display style
- {\MH_bigtimes_scaler:N \LARGE} % text style
- {\MH_bigtimes_scaler:N {}} % script style
- {\MH_bigtimes_scaler:N \footnotesize} % script script style
-}
-\def\MH_csym_bigtimes: {\mathop{\MH_bigtimes_inner:}\displaylimits}
-\AtBeginDocument{
- \providecommand\bigtimes{\MH_csym_bigtimes:}
-}
-\MH_let:NwN \MT_orig_intertext: \intertext@
-\newdimen\l_MT_above_intertext_sep
-\newdimen\l_MT_below_intertext_sep
-\define@key{\MT_options_name:}
- {aboveintertextdim}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {belowintertextdim}{\setlength\l_MT_below_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-intertext-dim}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-intertext-dim}{\setlength\l_MT_below_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-intertext-sep}{\setlength\l_MT_above_intertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-intertext-sep}{\setlength\l_MT_below_intertext_sep{#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_sep
- \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_sep
- }%
-}}
-\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
- \vbox{\normalbaselines
- \if_dim:w \linewidth=\columnwidth
- \else:
- \parshape\@ne \@totalleftmargin \linewidth
- \fi:
- \noindent#1\par}%
- \penalty\predisplaypenalty\vskip\abovedisplayshortskip%
- }%
-}
-\newdimen\l_MT_above_shortintertext_sep
-\newdimen\l_MT_below_shortintertext_sep
-\define@key{\MT_options_name:}
- {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-short-intertext-dim}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-short-intertext-dim}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-short-intertext-sep}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-short-intertext-sep}{\setlength \l_MT_below_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {above-shortintertext-sep}{\setlength \l_MT_above_shortintertext_sep{#1}}
-\define@key{\MT_options_name:}
- {below-shortintertext-sep}{\setlength \l_MT_below_shortintertext_sep{#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_sep
- \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_sep
- }%
-}
-\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
- \expandafter \mathpalette \expandafter \MT_mathllap:Nn
- \else
- \expandafter \MT_mathllap:Nn \expandafter #1
- \fi
-}
-\providecommand*\mathrlap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_mathrlap:Nn
- \else
- \expandafter \MT_mathrlap:Nn \expandafter #1
- \fi
-}
-\providecommand*\mathclap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_mathclap:Nn
- \else
- \expandafter \MT_mathclap:Nn \expandafter #1
- \fi
-}
-\def\MT_mathllap:Nn #1#2{{}\llap{$\m@th#1{#2}$}}
-\def\MT_mathrlap:Nn #1#2{{}\rlap{$\m@th#1{#2}$}}
-\def\MT_mathclap:Nn #1#2{{}\clap{$\m@th#1{#2}$}}
-\providecommand*\mathmbox{\mathpalette\MT_mathmbox:nn}
-\def\MT_mathmbox:nn #1#2{\mbox{$\m@th#1#2$}}
-\providecommand*\mathmakebox{
- \@ifnextchar[ \MT_mathmakebox_I:w
- \mathmbox}
-\def\MT_mathmakebox_I:w[#1]{%
- \@ifnextchar[ {\MT_mathmakebox_II:w[#1]}
- {\MT_mathmakebox_II:w[#1][c]}}
-\def\MT_mathmakebox_II:w[#1][#2]{
- \mathpalette{\MT_mathmakebox_III:w[#1][#2]}}
-\def\MT_mathmakebox_III:w[#1][#2]#3#4{%
- \@begin@tempboxa\hbox{$\m@th#3#4$}%
- \setlength\@tempdima{#1}%
- \hbox{\hb@xt@\@tempdima{\csname bm@#2\endcsname}}%
- \@end@tempboxa}
-\def\mathsm@sh#1#2{%
- \setbox\z@\hbox{$\m@th#1{#2}$}{}\finsm@sh}
-\providecommand*\cramped[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_internal:Nn
- \else
- \expandafter \MT_cramped_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_internal:Nn #1#2{
- \sbox\z@{$\m@th#1\nulldelimiterspace=\z@\radical\z@{#2}$}
- \ifx#1\displaystyle
- \dimen@=\fontdimen8\textfont3
- \advance\dimen@ .25\fontdimen5\textfont2
- \else
- \dimen@=1.25\fontdimen8
- \ifx#1\textstyle\textfont
- \else
- \ifx#1\scriptstyle
- \scriptfont
- \else
- \scriptscriptfont
- \fi
- \fi
- 3
- \fi
- \advance\dimen@-\ht\z@ \ht\z@=-\dimen@
- \box\z@
-}
-\providecommand*\crampedllap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_llap_internal:Nn
- \else
- \expandafter \MT_cramped_llap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_llap_internal:Nn #1#2{
- {}\llap{\MT_cramped_internal:Nn #1{#2}}
-}
-\providecommand*\crampedclap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_clap_internal:Nn
- \else
- \expandafter \MT_cramped_clap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_clap_internal:Nn #1#2{
- {}\clap{\MT_cramped_internal:Nn #1{#2}}
-}
-\providecommand*\crampedrlap[1][\@empty]{
- \ifx\@empty#1\@empty
- \expandafter \mathpalette \expandafter \MT_cramped_rlap_internal:Nn
- \else
- \expandafter \MT_cramped_rlap_internal:Nn \expandafter #1
- \fi
-}
-\def\MT_cramped_rlap_internal:Nn #1#2{
- {}\rlap{\MT_cramped_internal:Nn #1{#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:
- \setbox\tw@\hbox to\wd\z@{\hfil\unhbox\tw@}
- \fi:
- \mathop{}
- \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:}
- {prescript-sub-format}{\def\MT_prescript_sub:{#1}}
-\define@key{\MT_options_name:}
- {prescript-arg-format}{\def\MT_prescript_arg:{#1}}
-\setkeys{\MT_options_name:}{
- prescript-sup-format={},
- prescript-sub-format={},
- prescript-arg-format={},
-}
-\def\@DeclareMathSizes #1#2#3#4#5{%
- \@defaultunits\dimen@ #2pt\relax\@nnil
- \if:w $#3$%
- \MH_let:cN {S@\strip@pt\dimen@}\math@fontsfalse
- \else:
- \@defaultunits\dimen@ii #3pt\relax\@nnil
- \@defaultunits\@tempdima #4pt\relax\@nnil
- \@defaultunits\@tempdimb #5pt\relax\@nnil
- \toks@{#1}%
- \expandafter\xdef\csname S@\strip@pt\dimen@\endcsname{%
- \gdef\noexpand\tf@size{\strip@pt\dimen@ii}%
- \gdef\noexpand\sf@size{\strip@pt\@tempdima}%
- \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}%
- \the\toks@
- }%
- \fi:
-}
-\def\MT_mathic_true: {
- \MH_if_boolean:nF {math_italic_corr}{
- \MH_set_boolean_T:n {math_italic_corr}
- \MH_if_boolean:nTF {robustify}{
- \MH_let:NwN \MT_mathic_redeffer: \DeclareRobustCommand
- }{
- \MH_let:NwN \MT_mathic_redeffer: \renewcommand
- }
- \MH_let:NwN \MT_begin_inlinemath: \(
- %\renewcommand*\({
- \MT_mathic_redeffer:*\({
- \relax\ifmmode\@badmath\else
- \ifhmode
- \if_dim:w \fontdimen\@ne\font>\z@
- \if_dim:w \lastskip>\z@
- \skip@\lastskip\unskip
- \@@italiccorr
- \hskip\skip@
- \else:
- \@@italiccorr
- \fi:
- \fi:
- \fi:
- $\fi:
- }
- }
-}
-\def\MT_mathic_false: {
- \MH_if_boolean:nT {math_italic_corr}{
- \MH_set_boolean_F:n {math_italic_corr}
- \MH_if_boolean:nTF {robustify}{
- \edef\({\MT_begin_inlinemath:}%
- \forced_EQ_MakeRobust\(%
- }{
- \MH_let:NwN \( \MT_begin_inlinemath:
- }
- }
-}
-\MH_new_boolean:n {math_italic_corr}
-\define@key{\MT_options_name:}{mathic}[true]{
- \@ifundefined{MT_mathic_#1:}
- { \MT_true_false_error:
- \@nameuse{MT_mathic_false:}
- }
- { \@nameuse{MT_mathic_#1:} }
-}
-\newenvironment{spreadlines}[1]{
- \setlength{\jot}{#1}
- \ignorespaces
-}{ \ignorespacesafterend }
-\MaybeMHPrecedingSpacesOff
-\newenvironment{MT_gathered_env}[1][c]{%
- \RIfM@\else
- \nonmatherr@{\begin{\@currenvir}}%
- \fi
- \null\,%
- \if #1t\vtop \else \if#1b\vbox \else \vcenter \fi\fi \bgroup
- \Let@ \chardef\dspbrk@context\@ne \restore@math@cr
- \spread@equation
- \ialign\bgroup
- \MT_gathered_pre:
- \strut@$\m@th\displaystyle##$
- \MT_gathered_post:
- \crcr
-}{%
- \endaligned
- \MT_gathered_env_end:
-}
-\MHPrecedingSpacesOn
-\newcommand*\newgathered[4]{
- \newenvironment{#1}
- { \def\MT_gathered_pre:{#2}
- \def\MT_gathered_post:{#3}
- \def\MT_gathered_env_end:{#4}
- \MT_gathered_env
- }{\endMT_gathered_env}
-}
-\newcommand*\renewgathered[4]{
- \renewenvironment{#1}
- { \def\MT_gathered_pre:{#2}
- \def\MT_gathered_post:{#3}
- \def\MT_gathered_env_end:{#4}
- \MT_gathered_env
- }{\endMT_gathered_env}
-}
-\newgathered{lgathered}{}{\hfil}{}
-\newgathered{rgathered}{\hfil}{}{}
-\renewgathered{gathered}{\hfil}{\hfil}{}
-\newcommand*\splitfrac[2]{%
- \genfrac{}{}{0pt}{1}%
- {\textstyle#1\quad\hfill}%
- {\textstyle\hfill\quad\mathstrut#2}%
-}
-\newcommand*\splitdfrac[2]{%
- \genfrac{}{}{0pt}{0}{#1\quad\hfill}{\hfill\quad\mathstrut #2}%
-}
-\MH_if_boolean:nT {fixamsmath}{
-\def\place@tag{%
- \iftagsleft@
- \kern-\tagshift@
- \if@fleqn
- \if_num:w \xatlevel@=\tw@
- \kern-\@mathmargin
- \fi:
- \fi:
- \if:w 1\shift@tag\row@\relax
- \rlap{\vbox{%
- \normalbaselines
- \boxz@
- \vbox to\lineht@{}%
- \raise@tag
- }}%
- \else:
- \rlap{\boxz@}%
- \fi:
- \kern\displaywidth@
- \else:
- \kern-\tagshift@
- \if:w 1\shift@tag\row@\relax
- \llap{\vtop{%
- \raise@tag
- \normalbaselines
- \setbox\@ne\null
- \dp\@ne\lineht@
- \box\@ne
- \boxz@
- }}%
- \else:
- \llap{\boxz@}%
- \fi:
- \fi:
-}
-\def\x@calc@shift@lf{%
- \if_dim:w \eqnshift@=\z@
- \global\eqnshift@\@mathmargin\relax
- \alignsep@\displaywidth
- \advance\alignsep@-\totwidth@
- \if_num:w \@tempcntb=0
- \else:
- \global\divide\alignsep@\@tempcntb % original line
- \fi:
- \if_dim:w \alignsep@<\minalignsep\relax
- \global\alignsep@\minalignsep\relax
- \fi:
- \fi:
- \if_dim:w \tag@width\row@>\@tempdima
- \saveshift@1%
- \else:
- \saveshift@0%
- \fi:}%
-}
-\MaybeMHPrecedingSpacesOff
-\renewcommand\aligned@a[1][c]{\start@aligned{#1}\m@ne}
-\MHPrecedingSpacesOn
-\endinput
-%%
-%% End of file `mathtools.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/mhsetup.sty b/Master/texmf-dist/tex/latex/mh/mhsetup.sty
deleted file mode 100644
index b78969e5746..00000000000
--- a/Master/texmf-dist/tex/latex/mh/mhsetup.sty
+++ /dev/null
@@ -1,175 +0,0 @@
-%%
-%% This is file `mhsetup.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% mhsetup.dtx (with options: `package')
-%%
-%% This is a generated file.
-%%
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file mhsetup.dtx
-%% and the derived files
-%% mhsetup.sty, mhsetup.pdf, mhsetup.ins, mhsetup.drv.
-%%
-\ProvidesPackage{mhsetup}%
- [2010/01/21 v1.2a programming setup (MH)]
-\def\MHInternalSyntaxOn{
- \edef\MHInternalSyntaxOff{%
- \catcode`\noexpand\~=\the\catcode`\~\relax
- \catcode`\noexpand\ =\the\catcode`\ \relax
- \catcode`\noexpand\^^I=\the\catcode`\^^I\relax
- \catcode`\noexpand\@=\the\catcode`\@\relax
- \catcode`\noexpand\:=\the\catcode`\:\relax
- \catcode`\noexpand\_=\the\catcode`\_\relax
- \endlinechar=\the\endlinechar\relax
- }%
- \catcode`\~=10\relax
- \catcode`\ =9\relax
- \catcode`\^^I=9\relax
- \makeatletter
- \catcode`\_=11\relax
- \catcode`\:=11\relax
- \endlinechar=` %
- \relax
-}
-\MHInternalSyntaxOn
-\AtEndOfPackage{\MHInternalSyntaxOff}
-\let\MH_let:NwN \let
-\def\MH_let:cN #1#2{
- \expandafter\MH_let:NwN \csname#1\endcsname#2}
-\def\MH_let:cc #1#2{
- \expandafter\MH_let:NwN\csname#1\expandafter\endcsname
- \csname#2\endcsname}
-\def\MH_new_boolean:n #1{
- \expandafter\@ifdefinable\csname if_boolean_#1:\endcsname{
- \@namedef{boolean_#1_true:}
- {\MH_let:cN{if_boolean_#1:}\iftrue}
- \@namedef{boolean_#1_false:}
- {\MH_let:cN{if_boolean_#1:}\iffalse}
- \@nameuse{boolean_#1_false:}%
- }
-}
-\def\MH_set_boolean_F:n #1{ \@nameuse{boolean_#1_false:} }
-\def\MH_set_boolean_T:n #1{ \@nameuse{boolean_#1_true:} }
-\def\MH_if_boolean:nTF #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@firstoftwo
- \else:
- \expandafter\@secondoftwo
- \fi:
-}
-\def\MH_if_boolean:nT #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@firstofone
- \else:
- \expandafter\@gobble
- \fi:
-}
-\def\MH_if_boolean:nF #1{
- \@nameuse{if_boolean_#1:}
- \expandafter\@gobble
- \else:
- \expandafter\@firstofone
- \fi:
-}
-\@ifundefined{if:w}{\MH_let:NwN \if:w =\if}{}
-\@ifundefined{if_meaning:NN}{\MH_let:NwN \if_meaning:NN =\ifx}{}
-\@ifundefined{else:}{\MH_let:NwN \else:=\else}{}
-\@ifundefined{fi:}{\MH_let:NwN \fi:=\fi}{}
-\AtBeginDocument{
- \@ifundefined{if_num:w}{\MH_let:NwN \if_num:w =\ifnum}{}
- \@ifundefined{if_dim:w}{\MH_let:NwN \if_dim:w =\ifdim}{}
- \@ifundefined{if_case:w}{\MH_let:NwN \if_case:w =\ifcase}{}
-}
-\@ifundefined{or:}{\MH_let:NwN \or:=\or}{}
-\def\MH_cs_to_str:N {\expandafter\@gobble\string}
-\@ifundefined{eTeXversion}
- {
- \MH_let:NwN \MH_protected:\relax
- \def\MH_setlength:dn{\setlength}
- \def\MH_addtolength:dn{\addtolength}
- }
- {
- \MH_let:NwN \MH_protected:\protected
- \def\MH_setlength:dn #1#2{#1=\dimexpr#2\relax\relax}
- \def\MH_addtolength:dn #1#2{\advance#1 \dimexpr#2\relax\relax}
- }
-
-\def\MH_keyval_alias_with_addon:nnnn #1#2#3#4{
- \@namedef{KV@#1@#2}{\@nameuse{KV@#1@#3}#4}
- \@namedef{KV@#1@#2@default}{\@nameuse{KV@#1@#3@default}#4}}
-\def\MH_keyval_alias:nnn #1#2#3{
- \MH_keyval_alias_with_addon:nnnn {#1}{#2}{#3}{}}
-\def\MH_use_choice_i:nnnn #1#2#3#4{#1}
-\def\MH_use_choice_ii:nnnn #1#2#3#4{#2}
-\def\MH_use_choice_iii:nnnn #1#2#3#4{#3}
-\def\MH_use_choice_iv:nnnn #1#2#3#4{#4}
-\long\def\MH_nospace_ifnextchar:Nnn #1#2#3{
- \MH_let:NwN\reserved@d=~#1
- \def\reserved@a{#2}
- \def\reserved@b{#3}
- \futurelet\@let@token\MH_nospace_nextchar:
-}
-\def\MH_nospace_nextchar:{
- \if_meaning:NN \@let@token\reserved@d
- \MH_let:NwN \reserved@b\reserved@a
- \fi:
- \reserved@b
-}
-\long\def\MH_nospace_testopt:nn #1#2{
- \MH_nospace_ifnextchar:Nnn[
- {#1}
- {#1[{#2}]}
-}
-\def\MH_nospace_protected_testopt:n #1{
- \if_meaning:NN \protect\@typeset@protect
- \expandafter\MH_nospace_testopt:nn
- \else:
- \@x@protect#1
- \fi:
-}
-\@ifundefined{kernel@ifnextchar}
- {\MH_let:NwN \kernel@ifnextchar \@ifnextchar}
- {}
-\MH_let:NwN \MH_kernel_xargdef:nwwn \@xargdef
-\long\def\MH_nospace_xargdef:nwwn #1[#2][#3]#4{
- \@ifdefinable#1{
- \expandafter\def\expandafter#1\expandafter{
- \expandafter
- \MH_nospace_protected_testopt:n
- \expandafter
- #1
- \csname\string#1\endcsname
- {#3}}
- \expandafter\@yargdef
- \csname\string#1\endcsname
- \tw@
- {#2}
- {#4}}}
-\providecommand*\MHPrecedingSpacesOff{
- \MH_let:NwN \@xargdef \MH_nospace_xargdef:nwwn
-}
-\providecommand*\MHPrecedingSpacesOn{
- \MH_let:NwN \@xargdef \MH_kernel_xargdef:nwwn
-}
-\def \MH_group_align_safe_begin: {\iffalse{\fi\ifnum0=`}\fi}
-\def \MH_group_align_safe_end: {\ifnum0=`{}\fi}
-\endinput
-%%
-%% End of file `mhsetup.sty'.
diff --git a/Master/texmf-dist/tex/latex/mh/msabm.sym b/Master/texmf-dist/tex/latex/mh/msabm.sym
deleted file mode 100644
index 5a01ad56b60..00000000000
--- a/Master/texmf-dist/tex/latex/mh/msabm.sym
+++ /dev/null
@@ -1,256 +0,0 @@
-%%
-%% This is file `msabm.sym',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% flexisym.dtx (with options: `msabm')
-%%
-%% This is a generated file.
-%%
-%% Copyright (C) 1997-2003 by Michael J. Downes
-%% 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
-%% 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, Will Robertson and Joseph Wright.
-%%
-%% This work consists of the main source file flexisym.dtx
-%% and the derived files
-%% flexisym.sty, flexisym.pdf, flexisym.ins, flexisym.drv,
-%% cmbase.sym, mathpazo.sym, mathptmx.sym, msabm.sym.
-%%
-\ProvidesSymbols{msabm}[2001/09/08 v0.91]
-\ExplSyntaxOn
-\RequirePackage{amsfonts}\relax
-\cs_gset:cpx{mg@MSA}{\hexnumber@\symAMSa}%
-\cs_gset:cpx{mg@MSB}{\hexnumber@\symAMSb}%
-\DeclareFlexSymbol{\boxdot} {Bin}{MSA}{00}
-\DeclareFlexSymbol{\boxplus} {Bin}{MSA}{01}
-\DeclareFlexSymbol{\boxtimes} {Bin}{MSA}{02}
-\DeclareFlexSymbol{\square} {Ord}{MSA}{03}
-\DeclareFlexSymbol{\blacksquare} {Ord}{MSA}{04}
-\DeclareFlexSymbol{\centerdot} {Bin}{MSA}{05}
-\DeclareFlexSymbol{\lozenge} {Ord}{MSA}{06}
-\DeclareFlexSymbol{\blacklozenge} {Ord}{MSA}{07}
-\DeclareFlexSymbol{\circlearrowright} {Rel}{MSA}{08}
-\DeclareFlexSymbol{\circlearrowleft} {Rel}{MSA}{09}
-%%\DeclareFlexSymbol{\rightleftharpoons}{Rel}{MSA}{0A}
-\DeclareFlexSymbol{\leftrightharpoons} {Rel}{MSA}{0B}
-\DeclareFlexSymbol{\boxminus} {Bin}{MSA}{0C}
-\DeclareFlexSymbol{\Vdash} {Rel}{MSA}{0D}
-\DeclareFlexSymbol{\Vvdash} {Rel}{MSA}{0E}
-\DeclareFlexSymbol{\vDash} {Rel}{MSA}{0F}
-\DeclareFlexSymbol{\twoheadrightarrow} {Rel}{MSA}{10}
-\DeclareFlexSymbol{\twoheadleftarrow} {Rel}{MSA}{11}
-\DeclareFlexSymbol{\leftleftarrows} {Rel}{MSA}{12}
-\DeclareFlexSymbol{\rightrightarrows} {Rel}{MSA}{13}
-\DeclareFlexSymbol{\upuparrows} {Rel}{MSA}{14}
-\DeclareFlexSymbol{\downdownarrows} {Rel}{MSA}{15}
-\DeclareFlexSymbol{\upharpoonright} {Rel}{MSA}{16}
- \let\restriction\upharpoonright
-\DeclareFlexSymbol{\downharpoonright} {Rel}{MSA}{17}
-\DeclareFlexSymbol{\upharpoonleft} {Rel}{MSA}{18}
-\DeclareFlexSymbol{\downharpoonleft}{Rel}{MSA}{19}
-\DeclareFlexSymbol{\rightarrowtail} {Rel}{MSA}{1A}
-\DeclareFlexSymbol{\leftarrowtail} {Rel}{MSA}{1B}
-\DeclareFlexSymbol{\leftrightarrows}{Rel}{MSA}{1C}
-\DeclareFlexSymbol{\rightleftarrows}{Rel}{MSA}{1D}
-\DeclareFlexSymbol{\Lsh} {Rel}{MSA}{1E}
-\DeclareFlexSymbol{\Rsh} {Rel}{MSA}{1F}
-\DeclareFlexSymbol{\rightsquigarrow} {Rel}{MSA}{20}
-\DeclareFlexSymbol{\leftrightsquigarrow}{Rel}{MSA}{21}
-\DeclareFlexSymbol{\looparrowleft} {Rel}{MSA}{22}
-\DeclareFlexSymbol{\looparrowright} {Rel}{MSA}{23}
-\DeclareFlexSymbol{\circeq} {Rel}{MSA}{24}
-\DeclareFlexSymbol{\succsim} {Rel}{MSA}{25}
-\DeclareFlexSymbol{\gtrsim} {Rel}{MSA}{26}
-\DeclareFlexSymbol{\gtrapprox} {Rel}{MSA}{27}
-\DeclareFlexSymbol{\multimap} {Rel}{MSA}{28}
-\DeclareFlexSymbol{\therefore} {Rel}{MSA}{29}
-\DeclareFlexSymbol{\because} {Rel}{MSA}{2A}
-\DeclareFlexSymbol{\doteqdot} {Rel}{MSA}{2B}
- \let\Doteq\doteqdot
-\DeclareFlexSymbol{\triangleq} {Rel}{MSA}{2C}
-\DeclareFlexSymbol{\precsim} {Rel}{MSA}{2D}
-\DeclareFlexSymbol{\lesssim} {Rel}{MSA}{2E}
-\DeclareFlexSymbol{\lessapprox} {Rel}{MSA}{2F}
-\DeclareFlexSymbol{\eqslantless} {Rel}{MSA}{30}
-\DeclareFlexSymbol{\eqslantgtr} {Rel}{MSA}{31}
-\DeclareFlexSymbol{\curlyeqprec} {Rel}{MSA}{32}
-\DeclareFlexSymbol{\curlyeqsucc} {Rel}{MSA}{33}
-\DeclareFlexSymbol{\preccurlyeq} {Rel}{MSA}{34}
-\DeclareFlexSymbol{\leqq} {Rel}{MSA}{35}
-\DeclareFlexSymbol{\leqslant} {Rel}{MSA}{36}
-\DeclareFlexSymbol{\lessgtr} {Rel}{MSA}{37}
-\DeclareFlexSymbol{\backprime} {Ord}{MSA}{38}
-\DeclareFlexSymbol{\risingdotseq} {Rel}{MSA}{3A}
-\DeclareFlexSymbol{\fallingdotseq}{Rel}{MSA}{3B}
-\DeclareFlexSymbol{\succcurlyeq} {Rel}{MSA}{3C}
-\DeclareFlexSymbol{\geqq} {Rel}{MSA}{3D}
-\DeclareFlexSymbol{\geqslant} {Rel}{MSA}{3E}
-\DeclareFlexSymbol{\gtrless} {Rel}{MSA}{3F}
-%% \DeclareFlexSymbol{\sqsubset} {Rel}{MSA}{40}
-%% \DeclareFlexSymbol{\sqsupset} {Rel}{MSA}{41}
-\DeclareFlexSymbol{\vartriangleright}{Rel}{MSA}{42}
-\DeclareFlexSymbol{\vartriangleleft} {Rel}{MSA}{43}
-\DeclareFlexSymbol{\trianglerighteq} {Rel}{MSA}{44}
-\DeclareFlexSymbol{\trianglelefteq} {Rel}{MSA}{45}
-\DeclareFlexSymbol{\bigstar} {Ord}{MSA}{46}
-\DeclareFlexSymbol{\between} {Rel}{MSA}{47}
-\DeclareFlexSymbol{\blacktriangledown} {Ord}{MSA}{48}
-\DeclareFlexSymbol{\blacktriangleright} {Rel}{MSA}{49}
-\DeclareFlexSymbol{\blacktriangleleft} {Rel}{MSA}{4A}
-\DeclareFlexSymbol{\vartriangle} {Rel}{MSA}{4D}
-\DeclareFlexSymbol{\blacktriangle} {Ord}{MSA}{4E}
-\DeclareFlexSymbol{\triangledown} {Ord}{MSA}{4F}
-\DeclareFlexSymbol{\eqcirc} {Rel}{MSA}{50}
-\DeclareFlexSymbol{\lesseqgtr} {Rel}{MSA}{51}
-\DeclareFlexSymbol{\gtreqless} {Rel}{MSA}{52}
-\DeclareFlexSymbol{\lesseqqgtr} {Rel}{MSA}{53}
-\DeclareFlexSymbol{\gtreqqless} {Rel}{MSA}{54}
-\DeclareFlexSymbol{\Rrightarrow} {Rel}{MSA}{56}
-\DeclareFlexSymbol{\Lleftarrow} {Rel}{MSA}{57}
-\DeclareFlexSymbol{\veebar} {Bin}{MSA}{59}
-\DeclareFlexSymbol{\barwedge} {Bin}{MSA}{5A}
-\DeclareFlexSymbol{\doublebarwedge} {Bin}{MSA}{5B}
-%%\DeclareFlexSymbol{\angle} {Ord}{MSA}{5C}
-\DeclareFlexSymbol{\measuredangle} {Ord}{MSA}{5D}
-\DeclareFlexSymbol{\sphericalangle} {Ord}{MSA}{5E}
-\DeclareFlexSymbol{\varpropto} {Rel}{MSA}{5F}
-\DeclareFlexSymbol{\smallsmile} {Rel}{MSA}{60}
-\DeclareFlexSymbol{\smallfrown} {Rel}{MSA}{61}
-\DeclareFlexSymbol{\Subset} {Rel}{MSA}{62}
-\DeclareFlexSymbol{\Supset} {Rel}{MSA}{63}
-\DeclareFlexSymbol{\Cup} {Bin}{MSA}{64}
- \let\doublecup\Cup
-\DeclareFlexSymbol{\Cap} {Bin}{MSA}{65}
- \let\doublecap\Cap
-\DeclareFlexSymbol{\curlywedge} {Bin}{MSA}{66}
-\DeclareFlexSymbol{\curlyvee} {Bin}{MSA}{67}
-\DeclareFlexSymbol{\leftthreetimes} {Bin}{MSA}{68}
-\DeclareFlexSymbol{\rightthreetimes}{Bin}{MSA}{69}
-\DeclareFlexSymbol{\subseteqq} {Rel}{MSA}{6A}
-\DeclareFlexSymbol{\supseteqq} {Rel}{MSA}{6B}
-\DeclareFlexSymbol{\bumpeq} {Rel}{MSA}{6C}
-\DeclareFlexSymbol{\Bumpeq} {Rel}{MSA}{6D}
-\DeclareFlexSymbol{\lll} {Rel}{MSA}{6E}
- \let\llless\lll
-\DeclareFlexSymbol{\ggg} {Rel}{MSA}{6F}
- \let\gggtr\ggg
-\DeclareFlexSymbol{\circledS} {Ord}{MSA}{73}
-\DeclareFlexSymbol{\pitchfork} {Rel}{MSA}{74}
-\DeclareFlexSymbol{\dotplus} {Bin}{MSA}{75}
-\DeclareFlexSymbol{\backsim} {Rel}{MSA}{76}
-\DeclareFlexSymbol{\backsimeq} {Rel}{MSA}{77}
-\DeclareFlexSymbol{\complement} {Ord}{MSA}{7B}
-\DeclareFlexSymbol{\intercal} {Bin}{MSA}{7C}
-\DeclareFlexSymbol{\circledcirc} {Bin}{MSA}{7D}
-\DeclareFlexSymbol{\circledast} {Bin}{MSA}{7E}
-\DeclareFlexSymbol{\circleddash} {Bin}{MSA}{7F}
-\DeclareFlexSymbol{\lvertneqq} {Rel}{MSB}{00}
-\DeclareFlexSymbol{\gvertneqq} {Rel}{MSB}{01}
-\DeclareFlexSymbol{\nleq} {Rel}{MSB}{02}
-\DeclareFlexSymbol{\ngeq} {Rel}{MSB}{03}
-\DeclareFlexSymbol{\nless} {Rel}{MSB}{04}
-\DeclareFlexSymbol{\ngtr} {Rel}{MSB}{05}
-\DeclareFlexSymbol{\nprec} {Rel}{MSB}{06}
-\DeclareFlexSymbol{\nsucc} {Rel}{MSB}{07}
-\DeclareFlexSymbol{\lneqq} {Rel}{MSB}{08}
-\DeclareFlexSymbol{\gneqq} {Rel}{MSB}{09}
-\DeclareFlexSymbol{\nleqslant} {Rel}{MSB}{0A}
-\DeclareFlexSymbol{\ngeqslant} {Rel}{MSB}{0B}
-\DeclareFlexSymbol{\lneq} {Rel}{MSB}{0C}
-\DeclareFlexSymbol{\gneq} {Rel}{MSB}{0D}
-\DeclareFlexSymbol{\npreceq} {Rel}{MSB}{0E}
-\DeclareFlexSymbol{\nsucceq} {Rel}{MSB}{0F}
-\DeclareFlexSymbol{\precnsim} {Rel}{MSB}{10}
-\DeclareFlexSymbol{\succnsim} {Rel}{MSB}{11}
-\DeclareFlexSymbol{\lnsim} {Rel}{MSB}{12}
-\DeclareFlexSymbol{\gnsim} {Rel}{MSB}{13}
-\DeclareFlexSymbol{\nleqq} {Rel}{MSB}{14}
-\DeclareFlexSymbol{\ngeqq} {Rel}{MSB}{15}
-\DeclareFlexSymbol{\precneqq} {Rel}{MSB}{16}
-\DeclareFlexSymbol{\succneqq} {Rel}{MSB}{17}
-\DeclareFlexSymbol{\precnapprox} {Rel}{MSB}{18}
-\DeclareFlexSymbol{\succnapprox} {Rel}{MSB}{19}
-\DeclareFlexSymbol{\lnapprox} {Rel}{MSB}{1A}
-\DeclareFlexSymbol{\gnapprox} {Rel}{MSB}{1B}
-\DeclareFlexSymbol{\nsim} {Rel}{MSB}{1C}
-\DeclareFlexSymbol{\ncong} {Rel}{MSB}{1D}
-\DeclareFlexSymbol{\diagup} {Ord}{MSB}{1E}
-\DeclareFlexSymbol{\diagdown} {Ord}{MSB}{1F}
-\DeclareFlexSymbol{\varsubsetneq} {Rel}{MSB}{20}
-\DeclareFlexSymbol{\varsupsetneq} {Rel}{MSB}{21}
-\DeclareFlexSymbol{\nsubseteqq} {Rel}{MSB}{22}
-\DeclareFlexSymbol{\nsupseteqq} {Rel}{MSB}{23}
-\DeclareFlexSymbol{\subsetneqq} {Rel}{MSB}{24}
-\DeclareFlexSymbol{\supsetneqq} {Rel}{MSB}{25}
-\DeclareFlexSymbol{\varsubsetneqq} {Rel}{MSB}{26}
-\DeclareFlexSymbol{\varsupsetneqq} {Rel}{MSB}{27}
-\DeclareFlexSymbol{\subsetneq} {Rel}{MSB}{28}
-\DeclareFlexSymbol{\supsetneq} {Rel}{MSB}{29}
-\DeclareFlexSymbol{\nsubseteq} {Rel}{MSB}{2A}
-\DeclareFlexSymbol{\nsupseteq} {Rel}{MSB}{2B}
-\DeclareFlexSymbol{\nparallel} {Rel}{MSB}{2C}
-\DeclareFlexSymbol{\nmid} {Rel}{MSB}{2D}
-\DeclareFlexSymbol{\nshortmid} {Rel}{MSB}{2E}
-\DeclareFlexSymbol{\nshortparallel} {Rel}{MSB}{2F}
-\DeclareFlexSymbol{\nvdash} {Rel}{MSB}{30}
-\DeclareFlexSymbol{\nVdash} {Rel}{MSB}{31}
-\DeclareFlexSymbol{\nvDash} {Rel}{MSB}{32}
-\DeclareFlexSymbol{\nVDash} {Rel}{MSB}{33}
-\DeclareFlexSymbol{\ntrianglerighteq}{Rel}{MSB}{34}
-\DeclareFlexSymbol{\ntrianglelefteq}{Rel}{MSB}{35}
-\DeclareFlexSymbol{\ntriangleleft} {Rel}{MSB}{36}
-\DeclareFlexSymbol{\ntriangleright} {Rel}{MSB}{37}
-\DeclareFlexSymbol{\nleftarrow} {Rel}{MSB}{38}
-\DeclareFlexSymbol{\nrightarrow} {Rel}{MSB}{39}
-\DeclareFlexSymbol{\nLeftarrow} {Rel}{MSB}{3A}
-\DeclareFlexSymbol{\nRightarrow} {Rel}{MSB}{3B}
-\DeclareFlexSymbol{\nLeftrightarrow}{Rel}{MSB}{3C}
-\DeclareFlexSymbol{\nleftrightarrow}{Rel}{MSB}{3D}
-\DeclareFlexSymbol{\divideontimes} {Bin}{MSB}{3E}
-\DeclareFlexSymbol{\varnothing} {Ord}{MSB}{3F}
-\DeclareFlexSymbol{\nexists} {Ord}{MSB}{40}
-\DeclareFlexSymbol{\Finv} {Ord}{MSB}{60}
-\DeclareFlexSymbol{\Game} {Ord}{MSB}{61}
-%%\DeclareFlexSymbol{\mho} {Ord}{MSB}{66}
-\DeclareFlexSymbol{\eth} {Ord}{MSB}{67}
-\DeclareFlexSymbol{\eqsim} {Rel}{MSB}{68}
-\DeclareFlexSymbol{\beth} {Ord}{MSB}{69}
-\DeclareFlexSymbol{\gimel} {Ord}{MSB}{6A}
-\DeclareFlexSymbol{\daleth} {Ord}{MSB}{6B}
-\DeclareFlexSymbol{\lessdot} {Bin}{MSB}{6C}
-\DeclareFlexSymbol{\gtrdot} {Bin}{MSB}{6D}
-\DeclareFlexSymbol{\ltimes} {Bin}{MSB}{6E}
-\DeclareFlexSymbol{\rtimes} {Bin}{MSB}{6F}
-\DeclareFlexSymbol{\shortmid} {Rel}{MSB}{70}
-\DeclareFlexSymbol{\shortparallel} {Rel}{MSB}{71}
-\DeclareFlexSymbol{\smallsetminus} {Bin}{MSB}{72}
-\DeclareFlexSymbol{\thicksim} {Rel}{MSB}{73}
-\DeclareFlexSymbol{\thickapprox} {Rel}{MSB}{74}
-\DeclareFlexSymbol{\approxeq} {Rel}{MSB}{75}
-\DeclareFlexSymbol{\succapprox} {Rel}{MSB}{76}
-\DeclareFlexSymbol{\precapprox} {Rel}{MSB}{77}
-\DeclareFlexSymbol{\curvearrowleft} {Rel}{MSB}{78}
-\DeclareFlexSymbol{\curvearrowright}{Rel}{MSB}{79}
-\DeclareFlexSymbol{\digamma} {Ord}{MSB}{7A}
-\DeclareFlexSymbol{\varkappa} {Ord}{MSB}{7B}
-\DeclareFlexSymbol{\Bbbk} {Ord}{MSB}{7C}
-\DeclareFlexSymbol{\hslash} {Ord}{MSB}{7D}
-%%\DeclareFlexSymbol{\hbar} {Ord}{MSB}{7E}
-\DeclareFlexSymbol{\backepsilon} {Rel}{MSB}{7F}
-\ExplSyntaxOff
-\endinput
-%%
-%% End of file `msabm.sym'.
diff --git a/Master/tlpkg/libexec/ctan2tds b/Master/tlpkg/libexec/ctan2tds
index e83d1cbb663..d404aec99be 100755
--- a/Master/tlpkg/libexec/ctan2tds
+++ b/Master/tlpkg/libexec/ctan2tds
@@ -662,6 +662,7 @@ chomp ($Build = `cd $Master/../Build/source && pwd`);
'mff', "die 'skipping, noinfo license'",
'mftoeps', "die 'skipping, bat-only (mirror.ctan.org/graphics/MF-PS)'",
'mfpic', "&MAKEcopy",
+ 'mh', "die 'skipping, replaced by breqn and mathtools'",
'mhs', "die 'skipping, nomodify license'",
'milstd', "die 'skipping, have milstd.sty from logic'",
'mimetex', "die 'skipping, CGI'",
diff --git a/Master/tlpkg/tlpsrc/mh.tlpsrc b/Master/tlpkg/tlpsrc/mh.tlpsrc
deleted file mode 100644
index e69de29bb2d..00000000000
--- a/Master/tlpkg/tlpsrc/mh.tlpsrc
+++ /dev/null