summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-02-13 00:07:08 +0000
committerKarl Berry <karl@freefriends.org>2013-02-13 00:07:08 +0000
commit2544b4503021f61f279205ee9cecd1b29a6615ec (patch)
tree89d542a6cf783a92dbebec9ef461f8a06a7712ab /Master/texmf-dist
parent33b9decf3736250e2c7bc7c110b29116cef82dda (diff)
mh (12feb13)
git-svn-id: svn://tug.org/texlive/trunk@29094 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/latex/mh/README7
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn-technotes.pdfbin173598 -> 174293 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/breqn.pdfbin543911 -> 543456 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/empheq.pdfbin306946 -> 311696 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/flexisym.pdfbin243526 -> 243526 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathstyle.pdfbin173367 -> 173367 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mathtools.pdfbin412727 -> 415113 bytes
-rw-r--r--Master/texmf-dist/doc/latex/mh/mhsetup.pdfbin233716 -> 233716 bytes
-rw-r--r--Master/texmf-dist/source/latex/mh/empheq.dtx102
-rw-r--r--Master/texmf-dist/source/latex/mh/mathtools.dtx262
-rw-r--r--Master/texmf-dist/tex/latex/mh/empheq.sty21
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathtools.sty120
12 files changed, 446 insertions, 66 deletions
diff --git a/Master/texmf-dist/doc/latex/mh/README b/Master/texmf-dist/doc/latex/mh/README
index 2cc75849a53..5c249655ccb 100644
--- a/Master/texmf-dist/doc/latex/mh/README
+++ b/Master/texmf-dist/doc/latex/mh/README
@@ -1,6 +1,7 @@
The mh bundle
=============
-Morten cHoegholm (c) 2002-2011
+Morten Hoegholm (c) 2002-2011
+Lars Madsen (c) 2012
email: mh.ctan@gmail.com
License: LaTeX Project Public License
@@ -107,7 +108,7 @@ The bundle is maintained by:
Will Robertson <wspr81@gmail.com>
Joseph Wright <joseph.wright@morningstar2.co.uk>
-Please report bugs to the entire team.
+Please report bugs mh.ctan@gmail.com (or the entire team).
===========
-This README file was last revised 2012/05/10.
+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
index 72ca38b115c..cf08f259da8 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn-technotes.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/breqn.pdf b/Master/texmf-dist/doc/latex/mh/breqn.pdf
index c82c8c94870..821e360498c 100644
--- a/Master/texmf-dist/doc/latex/mh/breqn.pdf
+++ b/Master/texmf-dist/doc/latex/mh/breqn.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/empheq.pdf b/Master/texmf-dist/doc/latex/mh/empheq.pdf
index 342b483d2f7..e42e409f94e 100644
--- a/Master/texmf-dist/doc/latex/mh/empheq.pdf
+++ b/Master/texmf-dist/doc/latex/mh/empheq.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/flexisym.pdf b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
index 6faf5fdcf4c..3421fdbc11f 100644
--- a/Master/texmf-dist/doc/latex/mh/flexisym.pdf
+++ b/Master/texmf-dist/doc/latex/mh/flexisym.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
index 5cfdec9db4d..e806fe343e4 100644
--- a/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathstyle.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mathtools.pdf b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
index d0345ffd052..107d5ad7ef2 100644
--- a/Master/texmf-dist/doc/latex/mh/mathtools.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mathtools.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
index df524b3240f..d798a417d59 100644
--- a/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
+++ b/Master/texmf-dist/doc/latex/mh/mhsetup.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/mh/empheq.dtx b/Master/texmf-dist/source/latex/mh/empheq.dtx
index 8d598a56b02..5edb64bcf0a 100644
--- a/Master/texmf-dist/source/latex/mh/empheq.dtx
+++ b/Master/texmf-dist/source/latex/mh/empheq.dtx
@@ -1,6 +1,7 @@
% \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
@@ -78,6 +79,8 @@
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
@@ -128,11 +131,12 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{empheq.drv}%
- [2012/05/09 v2.13 Emphasizing equations]
+ [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}
@@ -1405,6 +1409,50 @@ and the derived files
% 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
@@ -1682,7 +1730,7 @@ and the derived files
% \begin{macrocode}
%<*package>
\ProvidesPackage{empheq}%
- [2007/12/03 v2.12 Emphasizing equations (MH)]
+ [2013/02/12 v2.13 Emphasizing equations]
% \end{macrocode}
% \begin{macrocode}
\RequirePackage{mhsetup}[2004/10/10]
@@ -1700,7 +1748,7 @@ and the derived files
% \end{verbatim}
% when they really mean
% \begin{verbatim}
-% \begin{empheq}{gather}[box=\fbox]
+% \begin{empheq}[box=\fbox]{gather}
% a = b
% \end{empheq}
% \end{verbatim}
@@ -3188,14 +3236,38 @@ and the derived files
\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{environment}
+% \end{macro}
+% \end{environment}
% \begin{macro}{\DeclareLeftDelimiter}
% \begin{macro}{\EQ_declare_left_delimiter:nnnn}
% \begin{macro}{\DeclareRightDelimiter}
@@ -3452,6 +3524,14 @@ and the derived files
\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
@@ -3527,11 +3607,23 @@ and the derived files
\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}
@@ -4184,5 +4276,5 @@ and the derived files
% \begin{macrocode}
%</package>
% \end{macrocode}
-% \Finale
+% Finale
\endinput
diff --git a/Master/texmf-dist/source/latex/mh/mathtools.dtx b/Master/texmf-dist/source/latex/mh/mathtools.dtx
index 6c76f41d408..8f3414345b9 100644
--- a/Master/texmf-dist/source/latex/mh/mathtools.dtx
+++ b/Master/texmf-dist/source/latex/mh/mathtools.dtx
@@ -1,6 +1,7 @@
% \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
@@ -67,7 +68,7 @@
\input docstrip.tex
\Msg{************************************************************************}
\Msg{* Installation}
-\Msg{* Package: mathtools 2012/05/10 v1.12}
+\Msg{* Package: mathtools 2013/02/12 v1.13}
\Msg{************************************************************************}
\keepsilent
@@ -78,6 +79,8 @@
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
@@ -128,7 +131,7 @@ and the derived files
%<*driver>
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{mathtools.drv}%
- [2012/05/10 v1.12 mathematical typesetting tools]
+ [2013/02/12 v1.13 mathematical typesetting tools]
\documentclass{ltxdoc}
\IfFileExists{fourier.sty}{\usepackage{fourier}}{}
\addtolength\marginparwidth{-25pt}
@@ -319,6 +322,11 @@ and the derived files
% \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}
%
%
@@ -789,7 +797,7 @@ and the derived files
% 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)
+% do its thing, \pkg{ntheorem} has to mess with the tags\dots)
%
% \subsubsection{Showing only referenced tags}
%
@@ -919,12 +927,29 @@ and the derived files
% \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). The
-% easiest fix is to add the following line
+% 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}. The \pkg{empheq} package fixes some
+% 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.
%
@@ -989,7 +1014,25 @@ and the derived files
% \cs{xleftrightharpoons}\oarg{sub}\marg{sup}
% \end{codesyntax}
% \pkg{mathtools} also provides the extensible harpoons shown above.
-% They're taken from~\cite{Voss:2004}.
+% 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}
%
@@ -1372,14 +1415,14 @@ and the derived files
% \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 2em
-% (or if needed by a smaller amount). That is we are talking about
-% displayes that end up looking like this
+% \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}\\
@@ -1668,10 +1711,10 @@ and the derived files
% \SpecialKeyIndex{original-intertext}$\key{original-intertext}=\texttt{true}\vert\texttt{false}$ \quad(default: \texttt{false})\\
% \SpecialKeyIndex{original-shortintertext}$\key{original-shortintertext}=\texttt{true}\vert\texttt{false}$
% \quad(default: \texttt{false})\\
-% \SpecialKeyIndex{above-intertext-dim}$\key{above-intertext-dim}=\meta{dimen}$ \quad(default: 0pt)\\
-% \SpecialKeyIndex{below-intertext-dim}$\key{below-intertext-dim}=\meta{dimen}$ \quad(default: 0pt)\\
-% \SpecialKeyIndex{above-shortintertext-dim}$\key{above-shortintertext-dim}=\meta{dimen}$ \quad(default: 3pt)\\
-% \SpecialKeyIndex{below-shortintertext-dim}$\key{below-shortintertext-dim}=\meta{dimen}$ \quad(default: 3pt)
+% \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
@@ -2031,6 +2074,8 @@ and the derived files
% \par
% \end{quote}
%
+% As of 2013, \cs(\cs) are robust, as is the italic corrected versions.
+%
% \subsection{Left sub/superscripts}
%
% \begin{codesyntax}
@@ -2397,7 +2442,7 @@ and the derived files
% \begin{macrocode}
%<*package>
\ProvidesPackage{mathtools}%
- [2012/04/24 v1.12 mathematical typesetting tools]
+ [2013/02/12 v1.13 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}}
@@ -2406,8 +2451,71 @@ and the derived files
\RequirePackage{mhsetup}[2010/01/21]
\MHInternalSyntaxOn
% \end{macrocode}
-%
-% \begin{macro}{\MT_options_name:}
+% \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}
@@ -2442,11 +2550,24 @@ and the derived files
\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}
@@ -2467,6 +2588,19 @@ and the derived files
}
% \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}
%
@@ -4516,20 +4650,31 @@ and the derived files
% original \cs{intertext} in case a user would rather want it.
% \begin{macro}{\MT_orig_intertext:}
% \begin{macro}{\MT_intertext:}
-% \begin{macro}{\l_MT_above_intertext_dim}
-% \begin{macro}{\l_MT_below_intertext_dim}
+% \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_dim
-\newdimen\l_MT_below_intertext_dim
+\newdimen\l_MT_above_intertext_sep
+\newdimen\l_MT_below_intertext_sep
\define@key{\MT_options_name:}
- {aboveintertextdim}{\setlength\l_MT_above_interetext_dim{#1}}
+ {aboveintertextdim}{\setlength\l_MT_above_intertext_sep{#1}}
\define@key{\MT_options_name:}
- {belowintertextdim}{\setlength\l_MT_below_intertext_dim{#1}}
+ {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.
@@ -4541,7 +4686,7 @@ and the derived files
\penalty\postdisplaypenalty\vskip\belowdisplayskip
\vskip-\lineskiplimit % CCS
\vskip\normallineskiplimit % CCS
- \vskip\l_MT_above_intertext_dim
+ \vskip\l_MT_above_intertext_sep
\vbox{\normalbaselines
\ifdim\linewidth=\columnwidth
\else \parshape\@ne \@totalleftmargin \linewidth
@@ -4550,7 +4695,7 @@ and the derived files
\penalty\predisplaypenalty\vskip\abovedisplayskip%
\vskip-\lineskiplimit % CCS
\vskip\normallineskiplimit % CCS
- \vskip\l_MT_above_intertext_dim
+ \vskip\l_MT_above_intertext_sep
}%
}}
% \end{macrocode}
@@ -4578,8 +4723,8 @@ and the derived files
% \begin{macro}{\shortintertext}
% \begin{macro}{\MT_orig_shortintertext}
% \begin{macro}{\MT_shortintertext}
-% \begin{macro}{\l_above_shortintertext_dim}
-% \begin{macro}{\l_below_shortintertext_dim}
+% \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.
@@ -4599,13 +4744,24 @@ and the derived files
}
% \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.}
% \begin{macrocode}
-\newdimen\l_MT_above_shortintertext_dim
-\newdimen\l_MT_below_shortintertext_dim
+\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:}
- {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_dim{#1}}
+ {above-short-intertext-dim}{\setlength \l_MT_above_shortintertext_sep{#1}}
\define@key{\MT_options_name:}
- {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_dim{#1}}
+ {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}}
% \end{macrocode}
% Looks best with the `old' values of the original \cs{jot}
% setting. So we set them to 3pt each.
@@ -4623,7 +4779,7 @@ and the derived files
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip
\vskip-\lineskiplimit
\vskip\normallineskiplimit
- \vskip\l_MT_above_shortintertext_dim
+ \vskip\l_MT_above_shortintertext_sep
\vbox{\normalbaselines
\if_dim:w \linewidth=\columnwidth
\else:
@@ -4633,7 +4789,7 @@ and the derived files
\penalty\predisplaypenalty\vskip\abovedisplayshortskip%
\vskip-\lineskiplimit
\vskip\normallineskiplimit
- \vskip\l_MT_below_shortintertext_dim
+ \vskip\l_MT_below_shortintertext_sep
}%
}
% \end{macrocode}
@@ -4982,16 +5138,28 @@ and the derived files
% \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.
+% 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.
+% 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*\({\relax\ifmmode\@badmath\else
+ %\renewcommand*\({
+ \MT_mathic_redeffer:*\({
+ \relax\ifmmode\@badmath\else
\ifhmode
\if_dim:w \fontdimen\@ne\font>\z@
\if_dim:w \lastskip>\z@
@@ -5014,7 +5182,17 @@ and the derived files
\def\MT_mathic_false: {
\MH_if_boolean:nT {math_italic_corr}{
\MH_set_boolean_F:n {math_italic_corr}
- \MH_let:NwN \( \MT_begin_inlinemath:
+% \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}
diff --git a/Master/texmf-dist/tex/latex/mh/empheq.sty b/Master/texmf-dist/tex/latex/mh/empheq.sty
index a80ea8e19ee..7b0a0cf5956 100644
--- a/Master/texmf-dist/tex/latex/mh/empheq.sty
+++ b/Master/texmf-dist/tex/latex/mh/empheq.sty
@@ -9,6 +9,8 @@
%% 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
@@ -28,7 +30,7 @@
%% empheq.sty, empheq.pdf, empheq.ins, empheq.drv.
%%
\ProvidesPackage{empheq}%
- [2007/12/03 v2.12 Emphasizing equations (MH)]
+ [2013/02/12 v2.13 Emphasizing equations]
\RequirePackage{mhsetup}[2004/10/10]
\MHInternalSyntaxOn
\MH_new_boolean:n {overload_ams}
@@ -773,7 +775,12 @@
\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][]{%
@@ -903,6 +910,10 @@
\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
@@ -948,10 +959,18 @@
\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}
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty
index 22afd81b053..79781cdb487 100644
--- a/Master/texmf-dist/tex/latex/mh/mathtools.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathtools.sty
@@ -9,6 +9,8 @@
%% 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
@@ -28,10 +30,59 @@
%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
%%
\ProvidesPackage{mathtools}%
- [2012/04/24 v1.12 mathematical typesetting tools]
+ [2013/02/12 v1.13 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}
@@ -51,6 +102,11 @@
\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}
}
@@ -65,6 +121,12 @@
{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}}
@@ -1075,12 +1137,20 @@
\providecommand\bigtimes{\MH_csym_bigtimes:}
}
\MH_let:NwN \MT_orig_intertext: \intertext@
-\newdimen\l_MT_above_intertext_dim
-\newdimen\l_MT_below_intertext_dim
+\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:}
- {aboveintertextdim}{\setlength\l_MT_above_interetext_dim{#1}}
+ {above-intertext-dim}{\setlength\l_MT_above_intertext_sep{#1}}
\define@key{\MT_options_name:}
- {belowintertextdim}{\setlength\l_MT_below_intertext_dim{#1}}
+ {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
@@ -1088,7 +1158,7 @@
\penalty\postdisplaypenalty\vskip\belowdisplayskip
\vskip-\lineskiplimit % CCS
\vskip\normallineskiplimit % CCS
- \vskip\l_MT_above_intertext_dim
+ \vskip\l_MT_above_intertext_sep
\vbox{\normalbaselines
\ifdim\linewidth=\columnwidth
\else \parshape\@ne \@totalleftmargin \linewidth
@@ -1097,7 +1167,7 @@
\penalty\predisplaypenalty\vskip\abovedisplayskip%
\vskip-\lineskiplimit % CCS
\vskip\normallineskiplimit % CCS
- \vskip\l_MT_above_intertext_dim
+ \vskip\l_MT_above_intertext_sep
}%
}}
\def\MT_orig_intertext_true: { \MH_let:NwN \intertext@ \MT_orig_intertext: }
@@ -1121,12 +1191,20 @@
\penalty\predisplaypenalty\vskip\abovedisplayshortskip%
}%
}
-\newdimen\l_MT_above_shortintertext_dim
-\newdimen\l_MT_below_shortintertext_dim
+\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:}
- {aboveshortintertextdim}{\setlength \l_MT_above_shortintertext_dim{#1}}
+ {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_sep{#1}}
\define@key{\MT_options_name:}
- {belowshortintertextdim}{\setlength \l_MT_below_shortintertext_dim{#1}}
+ {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}}
\setkeys{\MT_options_name:}{
aboveshortintertextdim=3pt,
belowshortintertextdim=3pt
@@ -1137,7 +1215,7 @@
\penalty\postdisplaypenalty\vskip\abovedisplayshortskip
\vskip-\lineskiplimit
\vskip\normallineskiplimit
- \vskip\l_MT_above_shortintertext_dim
+ \vskip\l_MT_above_shortintertext_sep
\vbox{\normalbaselines
\if_dim:w \linewidth=\columnwidth
\else:
@@ -1147,7 +1225,7 @@
\penalty\predisplaypenalty\vskip\abovedisplayshortskip%
\vskip-\lineskiplimit
\vskip\normallineskiplimit
- \vskip\l_MT_below_shortintertext_dim
+ \vskip\l_MT_below_shortintertext_sep
}%
}
\def\MT_orig_shortintertext_true: { \MH_let:NwN \shortintertext \MT_orig_shortintertext:n }
@@ -1307,8 +1385,15 @@
\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*\({\relax\ifmmode\@badmath\else
+ %\renewcommand*\({
+ \MT_mathic_redeffer:*\({
+ \relax\ifmmode\@badmath\else
\ifhmode
\if_dim:w \fontdimen\@ne\font>\z@
\if_dim:w \lastskip>\z@
@@ -1327,7 +1412,12 @@
\def\MT_mathic_false: {
\MH_if_boolean:nT {math_italic_corr}{
\MH_set_boolean_F:n {math_italic_corr}
- \MH_let:NwN \( \MT_begin_inlinemath:
+ \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}