diff options
author | Karl Berry <karl@freefriends.org> | 2007-12-15 00:58:47 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-12-15 00:58:47 +0000 |
commit | 954e518677de512ede9e6ee73428d4a0b8a933c4 (patch) | |
tree | b1c4281d69926b8ce4d9ee22f0fb1aad321fb9be /Master/texmf-dist/tex/latex/mh/mathtools.sty | |
parent | fd485c0f15d7cf5ea685ec6ff197e384025ada26 (diff) |
mh update (11dec07)
git-svn-id: svn://tug.org/texlive/trunk@5787 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.sty | 119 |
1 files changed, 66 insertions, 53 deletions
diff --git a/Master/texmf-dist/tex/latex/mh/mathtools.sty b/Master/texmf-dist/tex/latex/mh/mathtools.sty index e91b6692726..aa4391daa6c 100644 --- a/Master/texmf-dist/tex/latex/mh/mathtools.sty +++ b/Master/texmf-dist/tex/latex/mh/mathtools.sty @@ -6,26 +6,30 @@ %% %% mathtools.dtx (with options: `package') %% -%% It 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 2003/12/01 or later. +%% This is a generated file. +%% +%% Copyright (C) 2002-2007 by Morten Hoegholm <mh.ctan@gmail.com> +%% +%% 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". %% -%% The Current Maintainer of this work is Morten H\o gholm. +%% This Current Maintainer of this work is Morten Hoegholm. %% -%% This work consists of the files mathtools.dtx and mathtools.ins -%% and the derived file mathtools.sty. +%% This work consists of the main source file mathtools.dtx +%% and the derived files +%% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv. %% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mathtools} - [2004/10/10 v1.01a mathematical typesetting tools (MH)] +\ProvidesPackage{mathtools}% + [2007/12/03 v1.03 mathematical typesetting tools (MH)] \RequirePackage{keyval,calc} -\RequirePackage{mhsetup}[2004/10/10] +\RequirePackage{mhsetup}[2007/12/03] \MHInternalSyntaxOn \def\MT_options_name:{mathtools} \newcommand*\mathtoolsset[1]{\setkeys{\MT_options_name:}{#1}} @@ -117,11 +121,11 @@ \def\MT_extended_tagform:n #1{ \MH_set_boolean_F:n {raw_maketag} \if_meaning:NN \df@label\@empty - \MH_if_boolean:nT {manual_tag} - { \MH_if_boolean:nTF {show_manual_tags} - { \MT_prev_tagform:n {#1} } - { \stepcounter{equation} } - } + \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} @@ -255,9 +259,9 @@ \kern-\wd0 \lower.22ex\box0}} \providecommand*\xrightleftharpoons[2][]{\mathrel{% \raise.22ex\hbox{% - $\ext@arrow 3095\MT_rightharpoonup_fill:{\phantom{#1}}{#2}$}% + $\ext@arrow 0359\MT_rightharpoonup_fill:{\phantom{#1}}{#2}$}% \setbox0=\hbox{% - $\ext@arrow 0359\MT_leftharpoondown_fill:{#1}{\phantom{#2}}$}% + $\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}} @@ -376,6 +380,7 @@ \providecommand*\colonsim{\vcentcolon\mkern-1.2mu\sim} \providecommand*\Colonsim{\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 @@ -511,7 +516,7 @@ \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}} @@ -525,7 +530,7 @@ \MT_multlined_second_arg:w } { - \hfilneg \endaligned + \hfilneg \endaligned \MH_group_align_safe_end: } \MHPrecedingSpacesOn \define@key{\MT_options_name:} @@ -545,14 +550,15 @@ \def\MT_gobblelabel:w #1{} \newcommand*\DeclarePairedDelimiter[3]{% \@ifdefinable{#1}{ - \edef\MT_next: {\MH_cs_to_str:N #1} - \@namedef{MT_delim_\MT_next: _star:}##1 + \@namedef{MT_delim_\MH_cs_to_str:N #1 _star:}##1 {\left#2 ##1 \right #3}% \@xp\@xp\@xp \newcommand - \@xp\csname MT_delim_\MT_next: _nostar:\endcsname[2][\\@gobble] - { \edef\MT_next: {\MH_cs_to_str:N ##1} - \@nameuse {\MT_next: l} #2 ##2 \@nameuse {\MT_next: r} #3} + \@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}} \newcommand{#1}{ \@ifstar {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}} @@ -560,31 +566,38 @@ } } } -\def\MT_start_cases:nn #1#2{ - \RIfM@\else - \nonmatherr@{\begin{\@currenvir}}% - \fi - \left\lbrace - \vcenter \bgroup - \Let@ \chardef\dspbrk@context\@ne \restore@math@cr - \spread@equation - \ialign\bgroup - \strut@$\m@th\displaystyle{##}$\hfil\strut@ - #2 - \crcr -} -\newcommand*\newcases[3]{ - \newenvironment{#1} - {\MT_start_cases:nn {#2}{#3}} - {\endaligned\right.} -} -\newcommand*\renewcases[3]{ - \renewenvironment{#1} - {\MT_start_cases:nn {#2}{#3}} - {\endaligned\right.} -} -\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil} -\newcases{dcases*}{\quad}{{##}\hfil} +\def\MT_start_cases:nnn #1#2#3{ % #1=sep,#2=preamble,#3=delim + \RIfM@\else + \nonmatherr@{\begin{\@currenvir}} + \fi + \MH_group_align_safe_begin: + \left#3 + \vcenter \bgroup + \Let@ \chardef\dspbrk@context\@ne \restore@math@cr + \let \math@cr@@\AMS@math@cr@@ + \spread@equation + \ialign\bgroup + \strut@$\m@th \displaystyle{##}$\hfil \strut@ + #2 + \crcr +} +\def\MH_end_cases:{\crcr\egroup + \restorecolumn@ + \egroup + \MH_group_align_safe_end: +} +\newcommand*\newcases[5]{% #1=name, #2=sep, #3=preamble, #4=left, #5=right + \newenvironment{#1} + {\MT_start_cases:nnn {#2}{#3}{#4}} + {\MH_end_cases:\right#5} +} +\newcommand*\renewcases[5]{ + \renewenvironment{#1} + {\MT_start_cases:nnn {#2}{#3}{#4}} + {\MH_end_cases:\right#5} +} +\newcases{dcases}{\quad}{$\m@th\displaystyle{##}$\hfil}{\lbrace}{.} +\newcases{dcases*}{\quad}{{##}\hfil}{\lbrace}{.} \def\MT_matrix_begin:N #1{% \hskip -\arraycolsep \MH_let:NwN \@ifnextchar \MH_nospace_ifnextchar:Nnn |