summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mh/mathtools.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-18 22:35:12 +0000
committerKarl Berry <karl@freefriends.org>2010-09-18 22:35:12 +0000
commite2f4e4cbb4f7bb5e4c29d57bc37c3cc8090104fc (patch)
treedb38530d31b26472d5e63619a1a1daf43feb0809 /Master/texmf-dist/tex/latex/mh/mathtools.sty
parent1891cc4c24d7ce1ce1d8f334204f0af27d496c15 (diff)
mh update (18sep10)
git-svn-id: svn://tug.org/texlive/trunk@19794 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mh/mathtools.sty')
-rw-r--r--Master/texmf-dist/tex/latex/mh/mathtools.sty43
1 files changed, 29 insertions, 14 deletions
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty
index 989ed7e6fd6..79a2a3ddeed 100644
--- a/Master/texmf-dist/tex/latex/mh/mathtools.sty
+++ b/Master/texmf-dist/tex/latex/mh/mathtools.sty
@@ -27,8 +27,8 @@
%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv.
%%
\ProvidesPackage{mathtools}%
- [2010/07/11 v1.08 mathematical typesetting tools (MH)]
-\RequirePackage{keyval,calc,graphicx}
+ [2010/07/21 v1.08b mathematical typesetting tools (MH)]
+\RequirePackage{keyval,calc}
\RequirePackage{mhsetup}[2007/12/03]
\MHInternalSyntaxOn
\def\MT_options_name:{mathtools}
@@ -559,7 +559,7 @@
\newcommand*\DeclarePairedDelimiter[3]{%
\@ifdefinable{#1}{
\@namedef{MT_delim_\MH_cs_to_str:N #1 _star:}##1
- {\left#2 ##1 \right #3}%
+ {\mathopen{}\mathclose\bgroup\left#2 ##1 \aftergroup\egroup\right #3}%
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
@@ -575,33 +575,47 @@
}
}
\def\MHempty{}
-\def\DeclarePairedDelimiterX#1[#2]#3#4#5#6{%
+\def\DeclarePairedDelimiterX#1[#2]#3#4#5{%
\@ifdefinable{#1}{
- \ifnum#2>8\relax
- \PackageError{mathtools}{No~ more~ than~ 8~ arguments}{}
+ \ifnum#2>9\relax
+ \PackageError{mathtools}{No~ more~ than~ 9~ arguments}{}
\else
\ifnum#2<1\relax
\PackageError{mathtools}{Macro~ need~ 1~ or~ more~ arguments}{}
\fi
\fi
- % store the argument number in a temp counter
- \@tempcnta=#2
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _star:\endcsname
- [\@tempcnta]
+ [#2]
{
- \left#3 #6 \right#4
+ \begingroup
+ \def\delimsize{\middle}
+ \mathopen{}\mathclose\bgroup\left#3 #5 \aftergroup\egroup\right#4
+ \endgroup
}
- \advance\@tempcnta by 1
\@xp\@xp\@xp
\newcommand
\@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname
- [\@tempcnta][\MHempty]
+ [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\@nameuse {\MH_cs_to_str:N ##1 l} #3}
+ \mathopen{%
+ \let\MHempty\@gobble
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #3}
#5
- \mathclose{\let\MHempty\@gobble\@nameuse {\MH_cs_to_str:N ##1 r} #4}
+ \mathclose{%
+ \let\MHempty\@gobble
+ \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #4}
+ \endgroup
}
\DeclareRobustCommand{#1}{
\@ifstar
@@ -877,6 +891,7 @@
\def\MH_ndownarrow: {%
\mathrel{\mathpalette\MH_nrotarrow:NN\nleftarrow} }
\AtBeginDocument{%
+ \RequirePackage{graphicx}%
\@ifundefined{nrightarrow}{%
\providecommand\nuparrow{%
\PackageError{mathtools}{\string\nuparrow\space~ is~