diff options
author | Karl Berry <karl@freefriends.org> | 2017-06-06 21:53:26 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-06-06 21:53:26 +0000 |
commit | af4a841a3ac56bc89bf08019c254921b327d2af7 (patch) | |
tree | af2e36895b67aca097b7227d1e145f1822463c1c /Master/texmf-dist/tex/latex/mathtools | |
parent | d036e1b1dc4d59e9ce15b37af93ae0b55a50520c (diff) |
mathtools (24may17)
git-svn-id: svn://tug.org/texlive/trunk@44504 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathtools')
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/empheq.sty | 585 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/mathtools.sty | 461 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/mhsetup.sty | 66 |
3 files changed, 564 insertions, 548 deletions
diff --git a/Master/texmf-dist/tex/latex/mathtools/empheq.sty b/Master/texmf-dist/tex/latex/mathtools/empheq.sty index 919228d1e46..1c24bc158ab 100644 --- a/Master/texmf-dist/tex/latex/mathtools/empheq.sty +++ b/Master/texmf-dist/tex/latex/mathtools/empheq.sty @@ -30,8 +30,8 @@ %% empheq.sty, empheq.pdf, empheq.ins, empheq.drv. %% \ProvidesPackage{empheq}% - [2014/07/16 v2.14 Emphasizing equations] -\RequirePackage{mhsetup}[2004/10/10] + [2017/03/31 v2.15 Emphasizing equations] +\RequirePackage{mhsetup}[2017/03/31] \MHInternalSyntaxOn \MH_new_boolean:n {overload_ams} \DeclareOption{overload}{ @@ -53,7 +53,7 @@ \ExecuteOptions{newmultline} \ProcessOptions\relax \MHInternalSyntaxOff -\RequirePackage{mathtools}[2004/10/10] +\RequirePackage{mathtools}[2017/03/31] \MHInternalSyntaxOn \AtEndOfPackage{\MHInternalSyntaxOff} \newcount\l_EQ_equationtype_int @@ -61,16 +61,16 @@ \if@fleqn \iftagsleft@ \l_EQ_alignmentmode_int=4 - \else: + \MH_else: \l_EQ_alignmentmode_int=\thr@@ - \fi: -\else: + \MH_fi: +\MH_else: \iftagsleft@ \l_EQ_alignmentmode_int=\tw@ - \else: + \MH_else: \l_EQ_alignmentmode_int=\@ne - \fi: -\fi: + \MH_fi: +\MH_fi: \newdimen\l_EQ_totalwidth_dim \newdimen\l_EQ_displaywidth_dim \def\EmphEqdisplaywidth{\l_EQ_displaywidth_dim} @@ -97,12 +97,12 @@ \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 + \MH_if_num:w \l_EQ_equationtype_int=\z@ %ZeroCheckpoint \EQ_upgrade_error: - \else: + \MH_else: \EQ_post_process: \ignorespacesafterend - \fi:} + \MH_fi:} \def\EQ_post_process:{% \EQ_initialize: \EQ_begin_equation: @@ -114,9 +114,9 @@ } \ifodd \l_EQ_alignmentmode_int \setkeys{\MT_options_name:}{multlined-pos=b} - \else: + \MH_else: \setkeys{\MT_options_name:}{multlined-pos=t} - \fi: + \MH_fi: \g@addto@macro\EQ_complete_mathdisplay:{ \begin{MTmultlined}\relax} } @@ -139,49 +139,49 @@ \@nameuse{EQ_modify_linewidth_ \romannumeral\l_EQ_equationtype_int\EQ_next: :}% \EQ_typeset_display: - \@nameuse{find_displaywidth_ + \@nameuse{EQ_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: + \MH_if_case:w \l_EQ_alignmentmode_int\MH_or: \makebox[\l_EQ_displaywidth_dim][c] {\usebox{\EQ_mathdisplay_box}}% - \or: + \MH_or: \makebox[\l_EQ_displaywidth_dim][c] {\usebox{\EQ_mathdisplay_box}}% - \or: + \MH_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: + \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else: + \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else: \kern-\@mathmargin - \fi: - \fi: + \MH_fi: + \MH_fi: \usebox{\EQ_mathdisplay_box}}% - \or: + \MH_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: + \MH_if_num:w \l_EQ_equationtype_int=5 \MH_else: + \MH_if_num:w \l_EQ_equationtype_int=6 \MH_else: \kern-\@mathmargin - \fi: - \fi: + \MH_fi: + \MH_fi: \usebox{\EQ_mathdisplay_box}}% - \fi:}% + \MH_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_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: + \MH_if_case:w \l_EQ_alignmentmode_int + \MH_or: \EQ_place_tag:N r %#1 + \MH_or: \EQ_place_tag:N l %#2 + \MH_or: \EQ_place_tag:N r %#3 + \MH_or: \EQ_place_tag:N l %#4 + \MH_fi: + \MH_fi: \end{AmSequation*} \global\c@equation=\l_EQ_equation_fint\relax } @@ -209,7 +209,12 @@ \def\intertext##1{\PackageError{empheq}{% You~cannot~use~\string\intertext\space inside~the~`empheq' \MessageBreak - environment,~as~`empheq'~creates~an~unbreakable~box}\@eha}} + environment,~as~`empheq'~creates~an~unbreakable~box}\@eha} + \def\shortintertext##1{\PackageError{empheq}{% + You~cannot~use~\string\shortintertext\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'% @@ -234,6 +239,7 @@ \parbox{.5\maxdimen}{% \hbadness\@M \EQ_prevent_vertical_space: + \columnwidth\linewidth \EQ_typeset_tags_hook: \MH_let:NwN\set@gather@field\EQ_set_gather_field: \MH_let:NwN\set@field\EQ_set_align_field: @@ -244,30 +250,30 @@ \EQ_maketag:Nn \EQ_saved_maketag:n {##1}} \EQ_complete_mathdisplay:}}} \def\EQ_predisplay_adjustment:{% - \if_dim:w \g_EQ_toprow_height_dim<\baselineskip + \MH_if_dim:w \g_EQ_toprow_height_dim<\baselineskip \vskip\g_EQ_toprow_height_dim \vskip-\baselineskip - \else: + \MH_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 + \MH_fi: + \MH_if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim + \MH_if_dim:w \g_EQ_toptag_height_dim>\baselineskip \vskip-\g_EQ_toptag_height_dim \vskip\baselineskip \vskip-\normallineskip - \fi: - \fi:} + \MH_fi: + \MH_fi:} \def\EQ_postdisplay_adjustment:{% - \if_dim:w \g_EQ_bottomrow_depth_dim<\dp\strutbox + \MH_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 + \MH_fi: + \MH_if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim + \MH_if_dim:w \g_EQ_bottomtag_depth_dim>\dp\strutbox \vskip-\g_EQ_bottomtag_depth_dim \vskip\dp\strutbox - \fi: - \fi:} + \MH_fi: + \MH_fi:} \def\EQ_typeset_display:{% \sbox\EQ_mathdisplay_box{% \parbox{\l_EQ_temp_linewidth_dim}{% @@ -282,46 +288,46 @@ \abovedisplayskip\z@ \belowdisplayskip\z@\relax} \def\EQ_maketag:Nn #1#2{% \setboxz@h{#2}% - \if_num:w \row@=\@ne + \MH_if_num:w \row@=\@ne \global \g_EQ_toptag_height_dim = \ht\z@ - \fi: + \MH_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 + \MH_if_dim:w \@tempdima > \g_EQ_widesttag_dim \global \g_EQ_widesttag_dim = \@tempdima - \fi: + \MH_fi: #1{#2}% } \def\EQ_set_gather_field:{% \iftagsleft@ \global\lineht@\ht\z@ - \else: + \MH_else: \global\lineht@\dp\z@ - \fi: + \MH_fi: \kern\eqnshift@ %\boxz@ % Original amsmath version \EQ_measure_gather: \phantom{\boxz@}% \hfil} \def\EQ_measure_gather:{% - \if_num:w \row@=\@ne + \MH_if_num:w \row@=\@ne \g_EQ_toprow_height_dim=\ht\z@ - \fi: + \MH_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@ + \MH_if_dim:w \ht\z@>\lineht@ \global\lineht@\ht\z@ - \fi: - \else: - \if_dim:w \dp\z@>\lineht@ + \MH_fi: + \MH_else: + \MH_if_dim:w \dp\z@>\lineht@ \global\lineht@\dp\z@ - \fi: - \fi: + \MH_fi: + \MH_fi: %\boxz@ % Original amsmath version \MH_if_boolean:nT {continue_measuring}{ \EQ_measure_align: } \phantom{\boxz@}} @@ -329,32 +335,32 @@ \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_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@ + \MH_else: + \MH_if_num:w \g_EQ_temprow_int>\row@ \global\MH_set_boolean_F:n {continue_measuring} - \fi: + \MH_fi: \MH_set_boolean_F:n {still_in_samerow} \global\@tempdimc=\@tempdimb \global\@tempdimb=\g_EQ_bottomrow_depth_dim - \fi: + \MH_fi: \MH_if_boolean:nTF {continue_measuring}{ \global\g_EQ_temprow_int=\row@ \@tempcnta=\row@ - \if_num:w \@tempcnta=\z@ + \MH_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 + \MH_if_dim:w \g_EQ_toprow_height_dim<\@tempdima \g_EQ_toprow_height_dim\@tempdima - \fi: - \fi: + \MH_fi: + \MH_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 + \MH_if_dim:w \g_EQ_bottomrow_depth_dim<\@tempdima \g_EQ_bottomrow_depth_dim\@tempdima - \fi: + \MH_fi: }{ \g_EQ_bottomrow_depth_dim\dp\z@\relax } @@ -369,29 +375,29 @@ \def\EQ_vertical_tag_adjustment:n #1{{% \@tempdima\z@\@tempdimb\z@ \@tempdimc=\dp\strutbox - \if_dim:w \g_EQ_toprow_height_dim<\baselineskip + \MH_if_dim:w \g_EQ_toprow_height_dim<\baselineskip \MH_setlength:dn \@tempdima{\g_EQ_toprow_height_dim-\baselineskip} - \else: + \MH_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_fi: + \MH_if_dim:w \g_EQ_toptag_height_dim>\g_EQ_toprow_height_dim + \MH_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_fi: + \MH_fi: + \MH_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_fi: + \MH_if_dim:w \g_EQ_bottomtag_depth_dim>\g_EQ_bottomrow_depth_dim + \MH_if_dim:w \g_EQ_bottomtag_depth_dim<\@tempdimc + \MH_else: \MH_addtolength:dn \@tempdimb {-\g_EQ_bottomtag_depth_dim+\@tempdimc} - \fi: - \fi: + \MH_fi: + \MH_fi: \raisebox{-0.5\@tempdima+0.5\@tempdimb}{#1}}}% \def\EQ_use_mathdisplay:{% \EQ_outerbox:{\usebox{\EQ_mathdisplay_box}}} @@ -411,41 +417,41 @@ \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: + \MH_if_num:w \maxfields@=\tw@ + \MH_else: \setlength{\l_EQ_temp_linewidth_dim}{% \linewidth-\l_EQ_totalwidth_dim-\widthof{\EQ_outerbox:{}}}% - \fi:} + \MH_fi:} \def\EQ_modify_linewidth_ii:{\EQ_modify_linewidth_i:} -\def\find_displaywidth_i:{% +\def\EQ_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_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}% - \or: % #2: + \MH_or: % #2: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\alignsep@}% - \or: % #3: + \MH_or: % #3: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \or: % #4: + \MH_or: % #4: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \fi:} -\def\find_displaywidth_ii:{\find_displaywidth_i:} + \MH_fi:} +\def\EQ_find_displaywidth_ii:{\EQ_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:{% +\def\EQ_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_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2: + \MH_or: % #3: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \or: % #4: + \MH_or: % #4: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \fi:} -\def\find_displaywidth_iv:{\find_displaywidth_iii:} + \MH_fi:} +\def\EQ_find_displaywidth_iv:{\EQ_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} @@ -454,33 +460,34 @@ {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_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{% -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}% - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{% -\g_EQ_widesttag_dim-\multlinetaggap-\multlinegap}% - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{% -\@mathmargin-\g_EQ_widesttag_dim-\multlinetaggap}% - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}% - \fi: + \MH_fi: } \def\EQ_multline_modify_linewidth_notag:{% - \if_case:w \l_EQ_alignmentmode_int\or: + \MH_if_case:w \l_EQ_alignmentmode_int + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap} - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-2\multlinegap} - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}% - \or: + \MH_or: \MH_addtolength:dn \l_EQ_temp_linewidth_dim{-\@mathmargin-\multlinegap}% - \fi: + \MH_fi: } \MH_let:NwN \MTmultlined \multlined \MH_let:NwN \endMTmultlined \endmultlined @@ -492,57 +499,57 @@ \def\EQ_modify_linewidth_iii_mult:{ \setlength{\l_EQ_temp_linewidth_dim}{% \linewidth-\widthof{\EQ_outerbox:{}}}% - \if_dim:w \g_EQ_widesttag_dim>\z@ + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ \EQ_multline_modify_linewidth_tag: - \else: + \MH_else: \EQ_multline_modify_linewidth_notag: - \fi: + \MH_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:{% +\def\EQ_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_if_case:w \l_EQ_alignmentmode_int \MH_or: \MH_or: % #1 & #2: + \MH_or: % #3: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \or: % #4: + \MH_or: % #4: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \fi:} -\def\find_displaywidth_iv_mult:{\find_displaywidth_iii_mult:} + \MH_fi:} +\def\EQ_find_displaywidth_iv_mult:{\EQ_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@ + \MH_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ \abovedisplayshortskip=\abovedisplayskip \rlap{ \kern-.5\linewidth \kern\multlinegap \EQ_use_mathdisplay: } - \else: + \MH_else: \EQ_use_mathdisplay: - \fi: - \or: % #2: - \if_dim:w \g_EQ_widesttag_dim>\z@ + \MH_fi: + \MH_or: % #2: + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ \llap{ \EQ_use_mathdisplay: \kern-.5\linewidth \kern\multlinegap }% - \else: + \MH_else: \EQ_use_mathdisplay: - \fi: - \or: % #3: + \MH_fi: + \MH_or: % #3: \EQ_use_mathdisplay: - \or: % #4: + \MH_or: % #4: \EQ_use_mathdisplay: - \fi: + \MH_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:} + \MH_if:w *#1\relax\MH_else:\notag\MH_fi:} \def\multleft{\@ifstar{% \MH_if_boolean:nTF {multlined}{ \def\EQ_next:{\EQ_multlined_left:n} @@ -592,16 +599,16 @@ \MH_if_boolean:nTF {multlined}{ \def\EQ_next:{\EQ_multlined_left:n }% }{ - \if_case:w \l_EQ_alignmentmode_int - \or: % #1: + \MH_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: \def\EQ_next:{\multleft}% - \or: % #2: + \MH_or: % #2: \def\EQ_next:{\multleft*}% - \or: % #3: + \MH_or: % #3: \def\EQ_next:{\multleft}% - \or: % #4: + \MH_or: % #4: \def\EQ_next:{\multleft*}% - \fi: + \MH_fi: } \EQ_next:} \def\multmiddle{% @@ -617,16 +624,16 @@ \MH_if_boolean:nTF {multlined}{ \def\EQ_next:{\EQ_multlined_right:n }% }{ - \if_case:w \l_EQ_alignmentmode_int - \or: % #1: + \MH_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: \def\EQ_next:{\multright*}% - \or: % #2: + \MH_or: % #2: \def\EQ_next:{\multright}% - \or: % #3: + \MH_or: % #3: \def\EQ_next:{\multright*}% - \or: % #4: + \MH_or: % #4: \def\EQ_next:{\multright}% - \fi: + \MH_fi: } \EQ_next:} \MH_new_boolean:n {multlined} @@ -643,16 +650,16 @@ \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: + \MH_if:w t#1\relax \EQ_multlined_III:nn {#1}{#2}% + \MH_else: + \MH_if:w b#1\relax \EQ_multlined_III:nn {#1}{#2}% + \MH_else: + \MH_if:w c#1\relax \EQ_multlined_III:nn {#1}{#2}% + \MH_else: \EQ_multlined_III:nn {#2}{#1}% - \fi: - \fi: - \fi: + \MH_fi: + \MH_fi: + \MH_fi: \mkern-\thinmuskip \EQ_next:} \def\EQ_multlined_III:nn #1#2{% @@ -670,39 +677,39 @@ \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_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_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: \MH_addtolength:dn \l_EQ_temp_linewidth_dim {-\g_EQ_widesttag_dim-\mintagsep} - \or: % #2: + \MH_or: % #2: \MH_addtolength:dn \l_EQ_temp_linewidth_dim {-\g_EQ_widesttag_dim-\mintagsep}% - \or: % #3: + \MH_or: % #3: \MH_addtolength:dn \l_EQ_temp_linewidth_dim {-\g_EQ_widesttag_dim-\mintagsep} - \or: % #4: + \MH_or: % #4: \MH_addtolength:dn \l_EQ_temp_linewidth_dim {-\@mathmargin} - \fi: + \MH_fi: } - \else: + \MH_else: \MH_if_boolean:nT {multline}{ \EQ_multline_modify_linewidth_notag: } - \fi:} + \MH_fi:} \def\EQ_modify_linewidth_vi:{\EQ_modify_linewidth_v:} -\def\find_displaywidth_v:{% +\def\EQ_find_displaywidth_v:{% \MH_setlength:dn \l_EQ_displaywidth_dim{\l_EQ_temp_linewidth_dim}} -\def\find_displaywidth_vi:{\find_displaywidth_v:} +\def\EQ_find_displaywidth_vi:{\EQ_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_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ \MH_if_boolean:nTF {multline}{ \rlap{\kern\multlinegap \kern-.5\linewidth \EQ_use_mathdisplay: @@ -710,11 +717,11 @@ }{ \rlap{\kern-.5\linewidth\EQ_use_mathdisplay:}% } - \else: + \MH_else: \EQ_use_mathdisplay: - \fi: - \or: % #2: - \if_dim:w \g_EQ_widesttag_dim>\z@ + \MH_fi: + \MH_or: % #2: + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ \MH_if_boolean:nTF {multline}{ \llap{\kern-\mintagsep \kern\multlinetaggap \EQ_use_mathdisplay: @@ -722,36 +729,36 @@ }{ \llap{\EQ_use_mathdisplay:\kern-.5\linewidth}% } - \else: + \MH_else: \EQ_use_mathdisplay: - \fi: - \or: % #3: + \MH_fi: + \MH_or: % #3: \MH_if_boolean:nF {multline}{ \kern-\multlinetaggap } \EQ_use_mathdisplay: - \or: % #4: - \if_dim:w \g_EQ_widesttag_dim>\z@ - \else: + \MH_or: % #4: + \MH_if_dim:w \g_EQ_widesttag_dim>\z@ + \MH_else: \MH_if_boolean:nF {multline}{ \kern-\@mathmargin } - \fi: + \MH_fi: \EQ_use_mathdisplay: - \fi: + \MH_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:{% +\def\EQ_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_if_case:w \l_EQ_alignmentmode_int + \MH_or: % #1: + \MH_or: % #2: + \MH_or: % #3: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\eqnshift@}% - \or: % #4: + \MH_or: % #4: \MH_addtolength:dn \l_EQ_displaywidth_dim{-\@mathmargin}% - \fi:} -\def\find_displaywidth_viii:{\find_displaywidth_vii:} + \MH_fi:} +\def\EQ_find_displaywidth_viii:{\EQ_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}} @@ -1013,15 +1020,15 @@ \else \expandafter\endinput \fi -\def\default_raisetag:{\nobreak} +\def\EQ_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: + \xdef\raise@tag{\EQ_default_raisetag: + \vskip\iftagsleft@\MH_else:-\MH_fi:\the\skip@\relax}} +\MH_let:NwN\raise@tag\EQ_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: + \global\tag@false \global\MH_let:NwN\raise@tag\EQ_default_raisetag: }} \def\MT_gobblelabel:w #1{\@ifnextchar[{\EQ_gobbleoptional:w}{}} \def\EQ_gobbleoptional:w [#1]{} @@ -1033,14 +1040,14 @@ \savecounters@ \setbox\@ne\vbox{% \everycr{\noalign{\global\tag@false - \global\MH_let:NwN\raise@tag\default_raisetag: + \global\MH_let:NwN\raise@tag\EQ_default_raisetag: \global\column@\z@}}% \MH_let:NwN\label\MT_gobblelabel:w \halign{% \setboxz@h{$\m@th\displaystyle{##}$}% - \if_dim:w \wdz@>\totwidth@ + \MH_if_dim:w \wdz@>\totwidth@ \global\totwidth@\wdz@ - \fi: + \MH_fi: &\setboxz@h{\strut@{##}}% \savetaglength@ \crcr @@ -1051,14 +1058,14 @@ \restorecounters@ \if@fleqn \global\advance\totwidth@\@mathmargin - \fi: + \MH_fi: \iftagsleft@ - \if_dim:w \totwidth@>\displaywidth + \MH_if_dim:w \totwidth@>\displaywidth \global\MH_let:NwN\gdisplaywidth@\totwidth@ - \else: + \MH_else: \global\MH_let:NwN\gdisplaywidth@\displaywidth - \fi: - \fi: + \MH_fi: + \MH_fi: \endgroup } \def\measure@#1{% @@ -1072,7 +1079,7 @@ \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\MH_let:NwN\raise@tag\EQ_default_raisetag: \global\column@\z@}}% \MH_let:NwN\label\MT_gobblelabel:w \global\row@\z@ @@ -1087,43 +1094,43 @@ \restorecounters@ \ifodd\maxfields@ \global\advance\maxfields@\@ne - \fi: - \if_num:w \xatlevel@=\tw@ - \if_num:w \maxfields@<\thr@@ + \MH_fi: + \MH_if_num:w \xatlevel@=\tw@ + \MH_if_num:w \maxfields@<\thr@@ \MH_let:NwN\xatlevel@\z@ - \fi: - \fi: + \MH_fi: + \MH_fi: \setbox\z@\vbox{% \unvbox\z@ \unpenalty \global\setbox\@ne\lastbox }% \global\totwidth@\wd\@ne - \if@fleqn \global\advance\totwidth@\@mathmargin \fi: + \if@fleqn \global\advance\totwidth@\@mathmargin \MH_fi: \global\MH_let:NwN\maxcolumn@widths\@empty \begingroup - \MH_let:NwN\or:\relax + \MH_let:NwN\MH_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}% + \xdef\maxcolumn@widths{ \MH_or: \the\wd\thr@@ \maxcolumn@widths}% \repeat \endgroup \dimen@\displaywidth \advance\dimen@-\totwidth@ - \if_case:w \xatlevel@ + \MH_if_case:w \xatlevel@ \global\alignsep@\z@ \MH_let:NwN\minalignsep\z@ \@tempcntb\z@ \if@fleqn \@tempcnta\@ne \global\eqnshift@\@mathmargin - \else: + \MH_else: \@tempcnta\tw@ \global\eqnshift@\dimen@ \global\divide\eqnshift@\@tempcnta - \fi: - \or: + \MH_fi: + \MH_or: \@tempcntb\maxfields@ \divide\@tempcntb\tw@ \@tempcnta\@tempcntb @@ -1132,13 +1139,13 @@ \global\eqnshift@\@mathmargin \global\alignsep@\dimen@ \global\divide\alignsep@\@tempcnta - \else: + \MH_else: \global\advance\@tempcnta\@ne \global\eqnshift@\dimen@ \global\divide\eqnshift@\@tempcnta \global\alignsep@\eqnshift@ - \fi: - \or: + \MH_fi: + \MH_or: \@tempcntb\maxfields@ \divide\@tempcntb\tw@ \global\advance\@tempcntb\m@ne @@ -1147,43 +1154,43 @@ \global\alignsep@\dimen@ \if@fleqn \global\advance\alignsep@\@mathmargin\relax - \fi: + \MH_fi: \global\divide\alignsep@\@tempcntb - \fi: - \if_dim:w \alignsep@<\minalignsep\relax + \MH_fi: + \MH_if_dim:w \alignsep@<\minalignsep\relax \global\alignsep@\minalignsep\relax - \if_dim:w \eqnshift@>\z@ - \if@fleqn\else: + \MH_if_dim:w \eqnshift@>\z@ + \if@fleqn\MH_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@ + \MH_fi: + \MH_fi: + \MH_fi: + \MH_if_dim:w \eqnshift@<\z@ \global\eqnshift@\z@ - \fi: + \MH_fi: \calc@shift@align \global\tagshift@\totwidth@ \global\advance\tagshift@\@tempcntb\alignsep@ \if@fleqn - \if_num:w \xatlevel@=\tw@ + \MH_if_num:w \xatlevel@=\tw@ \global\advance\tagshift@-\@mathmargin\relax - \fi: - \else: + \MH_fi: + \MH_else: \global\advance\tagshift@\eqnshift@ - \fi: - \iftagsleft@ \else: + \MH_fi: + \iftagsleft@ \MH_else: \global\advance\tagshift@-\displaywidth - \fi: + \MH_fi: \dimen@\minalignsep\relax \global\advance\totwidth@\@tempcntb\dimen@ - \if_dim:w \totwidth@>\displaywidth + \MH_if_dim:w \totwidth@>\displaywidth \global\MH_let:NwN\displaywidth@\totwidth@ - \else: + \MH_else: \global\MH_let:NwN\displaywidth@\displaywidth - \fi: + \MH_fi: \endgroup } \def\EQ_multline_labelhack:n #1{% @@ -1196,22 +1203,22 @@ \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: + \global\tag@false \global\MH_let:NwN\raise@tag\EQ_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: + \tabskip \if@fleqn \@mathmargin \MH_else: \z@skip \MH_fi: \totwidth@\displaywidth \if@fleqn \advance\totwidth@-\@mathmargin - \fi: + \MH_fi: \halign\bgroup \hbox to\totwidth@{% \if@fleqn \hskip \@centering \relax - \else: + \MH_else: \hfil - \fi: + \MH_fi: \strut@ $\m@th\displaystyle{}##\endmultline@math%$ \hfil @@ -1220,10 +1227,10 @@ \if@fleqn \hskip-\@mathmargin \def\multline@indent{\hskip\@mathmargin}% put it back - \else: + \MH_else: \hfilneg \def\multline@indent{\hskip\multlinegap}% - \fi: + \MH_fi: \iftagsleft@ \iftag@ \begingroup @@ -1238,21 +1245,21 @@ \raise@tag }}% \multline@indent - \else: + \MH_else: \setbox\z@\hbox{\make@display@tag}% \dimen@\@mathmargin \advance\dimen@-\wd\z@ - \if_dim:w \dimen@<\multlinetaggap + \MH_if_dim:w \dimen@<\multlinetaggap \dimen@\multlinetaggap - \fi: + \MH_fi: \box\z@ \hskip\dimen@\relax - \fi: + \MH_fi: \endgroup - \else: + \MH_else: \multline@indent - \fi: - \else: + \MH_fi: + \MH_else: \multline@indent - \fi: + \MH_fi: #1% } \def\mmeasure@#1{% @@ -1272,49 +1279,49 @@ \halign{% \setboxz@h{\@lign$\m@th\displaystyle{}##$}% \iftagsleft@ - \if_num:w \row@=\@ne + \MH_if_num:w \row@=\@ne \global\totwidth@\wdz@ \global\lineht@\ht\z@ - \fi: - \else: + \MH_fi: + \MH_else: \global\totwidth@\wdz@ \global\lineht@\dp\z@ - \fi: + \MH_fi: \crcr #1% \crcr }% }% - \if_meaning:NN + \MH_if_meaning:NN \df@tag\@empty - \else: + \MH_else: \global\tag@true - \fi: - \if@eqnsw\global\tag@true\fi: + \MH_fi: + \if@eqnsw\global\tag@true\MH_fi: \iftag@ \setboxz@h{% \if@eqnsw \stepcounter{equation}% \tagform@\theequation - \else: + \MH_else: \df@tag - \fi: + \MH_fi: }% \global\tagwidth@\wdz@ \dimen@\totwidth@ \advance\dimen@\tagwidth@ \advance\dimen@\multlinetaggap - \iftagsleft@\else: + \iftagsleft@\MH_else: \if@fleqn \advance\dimen@\@mathmargin - \fi: - \fi: - \if_dim:w \dimen@>\displaywidth + \MH_fi: + \MH_fi: + \MH_if_dim:w \dimen@>\displaywidth \global\shifttag@true - \else: + \MH_else: \global\shifttag@false - \fi: - \fi: + \MH_fi: + \MH_fi: \restorecounters@ \endgroup } @@ -1333,12 +1340,12 @@ -\dp\EQ_mathdisplay_box -\ht\EQ_mathdisplay_box} [0pt][0pt]{\PotEndMark{\maketag@@@}}}} - \else: + \MH_else: \gdef\df@tag{% \raisebox{-\dp\EQ_mathdisplay_box -\depthof{\EQ_outerbox:{}}} {\PotEndMark{\maketag@@@}}}% - \fi:} + \MH_fi:} \def\EQ_tag_plus_endmark:{% \iftagsleft@ \gdef\maketag@@@##1{% @@ -1348,7 +1355,7 @@ \raisebox{-\dp\EQ_mathdisplay_box -\depthof{\EQ_outerbox:{}}} {\PotEndMark{\hss}}}}}% - \else: + \MH_else: \gdef\maketag@@@##1{% \hbox{\m@th\normalfont##1\llap{\hss\PotEndMark{% \settoheight{\@tempdima}{\@nameuse{\InTheoType Symbol}}% @@ -1357,32 +1364,32 @@ \setlength{\@tempdimb} {\g_EQ_bottomrow_depth_dim+\depthof{\EQ_outerbox:{}} +\depthof{\EQ_innerbox:{}}} - \if_dim:w \@tempdima>\@tempdimb + \MH_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: + \MH_else: \def\EQ_next:{ \raisebox{-\dp\EQ_mathdisplay_box -\depthof{\EQ_outerbox:{}}}}% - \fi:\EQ_next:}}}}% - \fi:} + \MH_fi:\EQ_next:}}}}% + \MH_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@@ + \MH_if_num:w \l_EQ_equationtype_int=\thr@@ \advance\@tempcnta\m@ne - \else: - \if_num:w \l_EQ_equationtype_int=4\relax + \MH_else: + \MH_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: + \MH_fi: + \MH_fi: + \MH_if_num:w \g_EQ_latest_nonzerodepth_row_fint=\@tempcnta + \MH_else: \global\g_EQ_bottomtag_depth_dim=-\baselineskip - \fi: + \MH_fi: \MT_nonumber: } \endinput diff --git a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty index 136fdb6e495..0e2563f7422 100644 --- a/Master/texmf-dist/tex/latex/mathtools/mathtools.sty +++ b/Master/texmf-dist/tex/latex/mathtools/mathtools.sty @@ -30,9 +30,9 @@ %% mathtools.sty, mathtools.pdf, mathtools.ins, mathtools.drv. %% \ProvidesPackage{mathtools}% - [2015/11/12 v1.18 mathematical typesetting tools] + [2017/05/24 v1.19 mathematical typesetting tools] \RequirePackage{keyval,calc} -\RequirePackage{mhsetup}[2010/01/21] +\RequirePackage{mhsetup}[2017/03/31] \MHInternalSyntaxOn % borrowed from fixltx2e \def\EQ_MakeRobust#1{% @@ -113,7 +113,7 @@ \ExecuteOptions{fixamsmath,disallowspaces} \ProcessOptions\relax \MHInternalSyntaxOff -\RequirePackage{amsmath}[2000/07/18] +\RequirePackage{amsmath}[2016/11/05] \MHInternalSyntaxOn \AtEndOfPackage{\MHInternalSyntaxOff} \def\MT_true_false_error:{ @@ -183,13 +183,13 @@ } \def\MT_extended_tagform:n #1{ \MH_set_boolean_F:n {raw_maketag} - \if_meaning:NN \df@label\@empty + \MH_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_else: \MH_if_boolean:nTF {manual_tag} { \MH_if_boolean:nTF {show_manual_tags} { \MT_prev_tagform:n {#1} } @@ -207,13 +207,13 @@ { \refstepcounter{equation}\MT_prev_tagform:n {#1} } \@safe@activesfalse } - \fi: + \MH_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_else: \MH_if_boolean:nTF {raw_maketag} { \MH_if_boolean:nTF {show_manual_tags} @@ -226,7 +226,7 @@ } } { \MT_maketag:n {#1} } - \fi: + \MH_fi: \global\MH_set_boolean_F:n {manual_tag} } \def\MT_extended_eqref:n #1{ @@ -247,11 +247,11 @@ \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:} + \@ifundefined{MH_boolean_show_manual_tags_#1:} { \MT_true_false_error: - \@nameuse{boolean_show_manual_tags_false:} + \@nameuse{MH_boolean_show_manual_tags_false:} } - { \@nameuse{boolean_show_manual_tags_#1:} } + { \@nameuse{MH_boolean_show_manual_tags_#1:} } } \newcommand*\MT_showonlyrefs_true:{ \MH_if_boolean:nF {show_only_refs}{ @@ -288,16 +288,16 @@ } \renewcommand\nonumber{ \if@eqnsw - \if_meaning:NN \incr@eqnum\@empty + \MH_if_meaning:NN \incr@eqnum\@empty \MH_if_boolean:nF {show_only_refs} {\addtocounter{equation}\m@ne} - \fi: - \fi: + \MH_fi: + \MH_fi: \MH_let:NwN \print@eqnum\@empty \MH_let:NwN \incr@eqnum\@empty \global\@eqnswfalse } \MHInternalSyntaxOff -\newcommand\noeqref[1]{\@bsphack +\newcommand\noeqref[1]{\@bsphack% \@for\@tempa:=#1\do{% \@safe@activestrue% \edef\@tempa{\expandafter\@firstofone\@tempa}% @@ -308,7 +308,7 @@ }{}% \if@filesw\protected@write\@auxout{}% {\string\MT@newlabel{\@tempa}}\fi% - \@safe@activesfalse} + \@safe@activesfalse}% \@esphack} \providecommand\@safe@activestrue{}% @@ -480,32 +480,32 @@ \newcount\g_MT_multlinerow_int \newdimen\l_MT_multwidth_dim \newcommand*\MT_test_for_tcb_other:nnnnn [1]{ - \if:w t#1\relax + \MH_if:w t#1\relax \expandafter\MH_use_choice_i:nnnn - \else: - \if:w c#1\relax + \MH_else: + \MH_if:w c#1\relax \expandafter\expandafter\expandafter\MH_use_choice_ii:nnnn - \else: - \if:w b#1\relax + \MH_else: + \MH_if:w b#1\relax \expandafter\expandafter\expandafter \expandafter\expandafter\expandafter\expandafter \MH_use_choice_iii:nnnn - \else: + \MH_else: \expandafter\expandafter\expandafter \expandafter\expandafter\expandafter\expandafter \MH_use_choice_iv:nnnn - \fi: - \fi: - \fi: + \MH_fi: + \MH_fi: + \MH_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} + \noalign{\vskip-\baselineskip \vskip-\normallineskip} } \def\MT_mult_mathcr_atat:w [#1]{% - \if_num:w 0=`{\fi: \iffalse}\fi: + \MH_if_num:w 0=`{\MH_fi: \iffalse}\MH_fi: \MH_if_boolean:nT {mult_firstline}{ \kern\l_MT_mult_left_fdim \MT_mult_invisible_line: @@ -513,19 +513,19 @@ \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_if_num:w \g_MT_multlinerow_int=\l_MT_multline_lastline_fint \MH_let:NwN \math@cr@@\MT_mult_last_mathcr:w - \fi: + \MH_fi: } \def\MT_mult_firstandlast_mathcr:w [#1]{% - \if_num:w 0=`{\fi: \iffalse}\fi: + \MH_if_num:w 0=`{\MH_fi: \iffalse}\MH_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@@@ + \MH_if_num:w 0=`{\MH_fi: \iffalse}\MH_fi:\math@cr@@@ \noalign{\vskip#1\relax} \kern\l_MT_mult_right_fdim} \newcommand\MT_start_mult:N [1]{ @@ -552,7 +552,7 @@ #2 } \newcommand*\MT_mult_internal:n [1]{ - \MH_if_boolean:nF {outer_mult}{\null\,} + \MH_if_boolean:nF {outer_mult}{\alignedspace@left} %<-- requires amsmath 2016/11/05 \MT_next: \bgroup \Let@ @@ -564,13 +564,13 @@ \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_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_if_num:w \l_MT_multline_lastline_fint=\@ne \MH_let:NwN \math@cr@@ \MT_mult_firstandlast_mathcr:w - \fi: + \MH_fi: \ialign\bgroup \hfil\strut@$\m@th\displaystyle{}##$\hfil \crcr @@ -603,10 +603,10 @@ {\def\MT_mult_default_pos:{#1}} {\def\MT_mult_default_pos:{#1}} { - \if_meaning:NN \@empty#1\@empty - \else: + \MH_if_meaning:NN \@empty#1\@empty + \MH_else: \setlength \l_MT_multwidth_dim{#1} - \fi: + \MH_fi: } \MT_start_mult:N \MT_mult_default_pos: } @@ -614,7 +614,7 @@ \renewenvironment{subarray}[1]{% \vcenter\bgroup \Let@ \restore@math@cr \default@tag - \let\math@cr@@\AMS@math@cr@@ + \let\math@cr@@\AMS@math@cr@@ % <--- the fix \baselineskip\fontdimen10 \scriptfont\tw@ \advance\baselineskip\fontdimen12 \scriptfont\tw@ \lineskip\thr@@\fontdimen8 \scriptfont\thr@@ @@ -634,10 +634,10 @@ {\def\MT_mult_default_pos:{#1}} {\def\MT_mult_default_pos:{#1}} { - \if_meaning:NN \@empty#1\@empty - \else: + \MH_if_meaning:NN \@empty#1\@empty + \MH_else: \setlength \l_MT_multwidth_dim{#1} - \fi: + \MH_fi: } \MT_multlined_second_arg:w } @@ -664,22 +664,50 @@ \@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{ + \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostarscaled_wrapper:nnn}##1##2##3{ \mathopen{##1}##2\mathclose{##3} } + \@namedef{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_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 + \@ifundefined{MT_delim_\MH_cs_to_str:N #1 _ #2 _wrapper:nnn}{ + \PackageError{mathtools}{ + Wrapper~not~found~for~\string#1~and~option~'#2'.\MessageBreak + Either~\string#1~is~ not~ defined,~or~ you~ are~using~ the~ + \MessageBreak + 'nostar'~ option,~which~ is~ no~ longer~ supported.~ + \MessageBreak + Please~ use~ 'nostarnonscaled'~ or~ 'nostarscaled~ + \MessageBreak instead.~ + }{See the manual} + }{ + \@namedef{MT_delim_\MH_cs_to_str:N #1 _ #2 _wrapper:nnn}##1##2##3{ + #3 + } } } +\def\MT_etb_ifdefempty_x:nnn #1{ + \expandafter\expandafter\expandafter + \MT_etb_ifblank:nnn + \expandafter\expandafter\expandafter{% + \expandafter\strip@prefix\meaning#1} +} +\def\MT_etb_ifblank:nnn #1{ + \expandafter\ifx\expandafter\relax\detokenize\expandafter{\@gobble#1?}\relax + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} + \newcommand*\DeclarePairedDelimiter[3]{% \@ifdefinable{#1}{ - \MT_delim_default_inner_wrappers:n{#1} + \MT_delim_default_inner_wrappers:n{#1} % define the wrappers \@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 @@ -687,69 +715,26 @@ \@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 + \def\@tempa{\\@gobble} + \def\@tempb{##1} + \ifx\@tempa\@tempb + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_wrapper:nnn}% + {#2} + {##2} + {#3} + \else + \MT_etb_ifblank:nnn {##1}{ + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_wrapper:nnn}% + {#2} + {##2} + {#3} + }{ + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarscaled_wrapper:nnn}% + {\@nameuse {\MH_cs_to_str:N ##1 l} #2} + {##2} + {\@nameuse {\MH_cs_to_str:N ##1 r} #3} + } + \fi } \DeclareRobustCommand{#1}{ \@ifstar @@ -769,6 +754,39 @@ \fi } +\def\@MHempty{} +\newcommand\MT_delim_inner_generator:nnnnnnn [7]{ + \@xp\@xp\@xp + \newcommand + \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar_inner:\endcsname + [#2] + { + #3 + \def\@tempa{\@MHempty} + \@xp\def\@xp\@tempb\@xp{\delimsize} + \ifx\@tempa\@tempb + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_wrapper:nnn} + {#4}{#7}{#5} + \else + \MT_etb_ifdefempty_x:nnn {\delimsize}{ + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarnonscaled_wrapper:nnn} + {#4}{#7}{#5} + }{ + \@nameuse{MT_delim_\MH_cs_to_str:N #1 _nostarscaled_wrapper:nnn} + { + \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize l\endcsname #4 + } + {#7} + { + \@xp\@xp\@xp\csname\@xp\MH_cs_to_str:N \delimsize r\endcsname #5 + } + } + \fi + #6 + \endgroup + } +} + \def\DeclarePairedDelimiterXPP#1[#2]#3#4#5#6#7{% \@ifdefinable{#1}{ \MT_paired_delimx_arg_test:n{#2} @@ -789,31 +807,13 @@ \@xp\@xp\@xp \newcommand \@xp\csname MT_delim_\MH_cs_to_str:N #1 _nostar:\endcsname - [1][\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] - { - #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 - } + \MT_delim_inner_generator:nnnnnnn {#1}{#2}{#3}{#4}{#5}{#6}{#7} \DeclareRobustCommand{#1}{ \@ifstar {\@nameuse{MT_delim_\MH_cs_to_str:N #1 _star:}} @@ -822,6 +822,9 @@ } } +\def\DeclarePairedDelimiterX#1[#2]#3#4#5{ + \DeclarePairedDelimiterXPP{#1}[#2]{}{#3}{#4}{}{#5} +} \def\MT_start_cases:nnnn #1#2#3#4{ % #1=sep,#2=lpreamble,#3=rpreamble,#4=delim \RIfM@\else @@ -956,68 +959,68 @@ \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: + \MH_if_meaning:NN \MT_smop_arg_A: \MT_smop_mathop:n + \MH_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_if_meaning:NN \MT_smop_arg_D: \@nnil + \MH_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_if_meaning:NN \MT_smop_arg_F: \@nnil + \MH_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: + \MH_fi: + \MH_fi: + \MH_else: \def\MT_smop_final_arg_A:{#1{#2}}% - \if_meaning:NN \MT_smop_arg_D: \@nnil - \else: + \MH_if_meaning:NN \MT_smop_arg_D: \@nnil + \MH_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_if_meaning:NN \MT_smop_arg_F: \@nnil + \MH_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: + \MH_fi: + \MH_fi: + \MH_fi: + \MH_else: + \MH_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_if_meaning:NN \MT_smop_arg_D: \@nnil + \MH_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_if_meaning:NN \MT_smop_arg_F: \@nnil + \MH_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: + \MH_fi: + \MH_fi: + \MH_else: \def\MT_smop_final_arg_A:{#1}% - \if_meaning:NN \MT_smop_arg_C: \@nnil - \else: + \MH_if_meaning:NN \MT_smop_arg_C: \@nnil + \MH_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_if_meaning:NN \MT_smop_arg_D: \@nnil + \MH_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_fi: + \MH_fi: + \MH_fi: + \MH_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: @@ -1069,9 +1072,9 @@ \sbox\z@{$\m@th \displaystyle #1$} \sbox\tw@{$\m@th \displaystyle #4$} \@tempdima=\dp\z@ \advance\@tempdima-\dp\tw@ - \if_dim:w \@tempdima>\z@ + \MH_if_dim:w \@tempdima>\z@ \mathop{#1}\limits#2{#3} - \else: + \MH_else: \mathop{#1\MT_vphantom:Nn \displaystyle{#4}}\limits #2{ \def\finsm@sh{\ht\z@\z@ \box\z@} @@ -1079,8 +1082,8 @@ \MT_vphantom:Nn \scriptstyle {\MT_cramped_internal:Nn \scriptstyle{#6}} } - \fi: - \if_dim:w \@tempdima>\z@ + \MH_fi: + \MH_if_dim:w \@tempdima>\z@ \mathop{#4\MT_vphantom:Nn \displaystyle{#1}}\limits #5 { @@ -1089,9 +1092,9 @@ \def\finsm@sh{\ht\z@\z@ \box\z@} \mathsm@sh\scriptstyle{\MT_cramped_internal:Nn \scriptstyle{#6}} } - \else: + \MH_else: \mathop{#4}\limits#5{#6} - \fi: + \MH_fi: } \newcommand\SwapAboveDisplaySkip{% \noalign{\vskip-\abovedisplayskip\vskip\abovedisplayshortskip} @@ -1248,14 +1251,19 @@ =\columnwidth \else \parshape\@ne \@totalleftmargin \linewidth \fi - \noindent##1\par}% + \noindent\ignorespaces##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: } + }% + \MH_let:NwN \shortintertext \shortintertext@ +} +\def\MT_orig_intertext_true: { + \MH_let:NwN \intertext@ \MT_orig_intertext: + \MH_let:NwN \shortintertext \shortintertext@ +} \def\MT_orig_intertext_false: { \MH_let:NwN \intertext@ \MT_intertext: } \define@key{\MT_options_name:}{original-intertext}[true]{ \@nameuse{MT_orig_intertext_#1:} @@ -1268,17 +1276,17 @@ \noalign{% \penalty\postdisplaypenalty\vskip\abovedisplayshortskip \vbox{\normalbaselines - \if_dim:w - \if_dim:w \@totalleftmargin=\z@ + \MH_if_dim:w + \MH_if_dim:w \@totalleftmargin=\z@ \linewidth - \else: + \MH_else: -\maxdimen - \fi: + \MH_fi: =\columnwidth - \else: + \MH_else: \parshape\@ne \@totalleftmargin \linewidth - \fi: - \noindent#1\par}% + \MH_fi: + \noindent\ignorespaces#1\par}% \penalty\predisplaypenalty\vskip\abovedisplayshortskip% }% } @@ -1312,25 +1320,26 @@ \vskip\normallineskiplimit \vskip\l_MT_above_shortintertext_sep \vbox{\normalbaselines - \if_dim:w - \if_dim:w \@totalleftmargin=\z@ + \MH_if_dim:w + \MH_if_dim:w \@totalleftmargin=\z@ \linewidth - \else: + \MH_else: -\maxdimen - \fi: + \MH_fi: =\columnwidth - \else: + \MH_else: \parshape\@ne \@totalleftmargin \linewidth - \fi: - \noindent#1\par}% + \MH_fi: + \noindent\ignorespaces#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 } +\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 } +\newcommand{\shortintertext}{\@amsmath@err{\Invalid@@\shortintertext}\@eha} \define@key{\MT_options_name:}{original-shortintertext}[true]{ \@nameuse{MT_orig_shortintertext_#1:} } @@ -1439,11 +1448,11 @@ \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@ + \MH_if_dim:w \wd\tw@>\wd\z@ \setbox\z@\hbox to\wd\tw@{\hfil\unhbox\z@} - \else: + \MH_else: \setbox\tw@\hbox to\wd\z@{\hfil\unhbox\tw@} - \fi: + \MH_fi: \mathop{} \mathopen{\vphantom{\MT_prescript_arg:{#3}}}^{\box\z@}\sb{\box\tw@} \MT_prescript_arg:{#3} @@ -1469,9 +1478,9 @@ \ifx\e@alloc\@undefined% kernel thus older than 2015 \def\@DeclareMathSizes #1#2#3#4#5{% \@defaultunits\dimen@ #2pt\relax\@nnil - \if:w $#3$% + \MH_if:w $#3$% \MH_let:cN {S@\strip@pt\dimen@}\math@fontsfalse - \else: + \MH_else: \@defaultunits\dimen@ii #3pt\relax\@nnil \@defaultunits\@tempdima #4pt\relax\@nnil \@defaultunits\@tempdimb #5pt\relax\@nnil @@ -1482,7 +1491,7 @@ \gdef\noexpand\ssf@size{\strip@pt\@tempdimb}% \the\toks@ }% - \fi: + \MH_fi: } \fi \def\MT_mathic_true: { @@ -1498,23 +1507,23 @@ \MT_mathic_redeffer:*\({ \relax\ifmmode\@badmath\else \ifhmode - \if_dim:w \fontdimen\@ne\font>\z@ - \if_dim:w \lastskip>\z@ + \MH_if_dim:w \fontdimen\@ne\font>\z@ + \MH_if_dim:w \lastskip>\z@ \skip@\lastskip\unskip - \if_num:w \lastpenalty>\z@ + \MH_if_num:w \lastpenalty>\z@ \count@\lastpenalty\unpenalty - \fi: + \MH_fi: \@@italiccorr - \if_num:w \count@>\z@ + \MH_if_num:w \count@>\z@ \penalty\count@ - \fi: + \MH_fi: \hskip\skip@ - \else: + \MH_else: \@@italiccorr - \fi: - \fi: - \fi: - $\fi: + \MH_fi: + \MH_fi: + \MH_fi: + $\MH_fi: } } } @@ -1592,24 +1601,24 @@ \iftagsleft@ \kern-\tagshift@ \if@fleqn - \if_num:w \xatlevel@=\tw@ + \MH_if_num:w \xatlevel@=\tw@ \kern-\@mathmargin - \fi: - \fi: - \if:w 1\shift@tag\row@\relax + \MH_fi: + \MH_fi: + \MH_if:w 1\shift@tag\row@\relax \rlap{\vbox{% \normalbaselines \boxz@ \vbox to\lineht@{}% \raise@tag }}% - \else: + \MH_else: \rlap{\boxz@}% - \fi: + \MH_fi: \kern\displaywidth@ - \else: + \MH_else: \kern-\tagshift@ - \if:w 1\shift@tag\row@\relax + \MH_if:w 1\shift@tag\row@\relax \llap{\vtop{% \raise@tag \normalbaselines @@ -1618,29 +1627,29 @@ \box\@ne \boxz@ }}% - \else: + \MH_else: \llap{\boxz@}% - \fi: - \fi: + \MH_fi: + \MH_fi: } \def\x@calc@shift@lf{% - \if_dim:w \eqnshift@=\z@ + \MH_if_dim:w \eqnshift@=\z@ \global\eqnshift@\@mathmargin\relax \alignsep@\displaywidth \advance\alignsep@-\totwidth@ - \if_num:w \@tempcntb=0 - \else: + \MH_if_num:w \@tempcntb=0 + \MH_else: \global\divide\alignsep@\@tempcntb % original line - \fi: - \if_dim:w \alignsep@<\minalignsep\relax + \MH_fi: + \MH_if_dim:w \alignsep@<\minalignsep\relax \global\alignsep@\minalignsep\relax - \fi: - \fi: - \if_dim:w \tag@width\row@>\@tempdima + \MH_fi: + \MH_fi: + \MH_if_dim:w \tag@width\row@>\@tempdima \saveshift@1% - \else: + \MH_else: \saveshift@0% - \fi:}% + \MH_fi:}% } \MaybeMHPrecedingSpacesOff \renewcommand\aligned@a[1][c]{\start@aligned{#1}\m@ne} diff --git a/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty b/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty index b78969e5746..cf84c8ff77c 100644 --- a/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty +++ b/Master/texmf-dist/tex/latex/mathtools/mhsetup.sty @@ -9,6 +9,7 @@ %% This is a generated file. %% %% Copyright (C) 2002-2007,2010 by Morten Hoegholm +%% Copyright (C) 2017 by Lars Madsen %% %% This work may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either @@ -20,15 +21,14 @@ %% %% This work has the LPPL maintenance status "maintained". %% -%% This Current Maintainer of this work is -%% Lars Madsen, Will Robertson and Joseph Wright. +%% This Current Maintainer of this work is Lars Madsen <daleif@math.au.dk> %% %% 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)] + [2017/03/31 v1.3 programming setup (MH)] \def\MHInternalSyntaxOn{ \edef\MHInternalSyntaxOff{% \catcode`\noexpand\~=\the\catcode`\~\relax @@ -57,47 +57,47 @@ \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:}% + \expandafter\@ifdefinable\csname MH_if_boolean_#1:\endcsname{ + \@namedef{MH_boolean_#1_true:} + {\MH_let:cN{MH_if_boolean_#1:}\iftrue} + \@namedef{MH_boolean_#1_false:} + {\MH_let:cN{MH_if_boolean_#1:}\iffalse} + \@nameuse{MH_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_set_boolean_F:n #1{ \@nameuse{MH_boolean_#1_false:} } +\def\MH_set_boolean_T:n #1{ \@nameuse{MH_boolean_#1_true:} } \def\MH_if_boolean:nTF #1{ - \@nameuse{if_boolean_#1:} + \@nameuse{MH_if_boolean_#1:} \expandafter\@firstoftwo - \else: + \MH_else: \expandafter\@secondoftwo - \fi: + \MH_fi: } \def\MH_if_boolean:nT #1{ - \@nameuse{if_boolean_#1:} + \@nameuse{MH_if_boolean_#1:} \expandafter\@firstofone - \else: + \MH_else: \expandafter\@gobble - \fi: + \MH_fi: } \def\MH_if_boolean:nF #1{ - \@nameuse{if_boolean_#1:} + \@nameuse{MH_if_boolean_#1:} \expandafter\@gobble - \else: + \MH_else: \expandafter\@firstofone - \fi: + \MH_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}{} +\@ifundefined{MH_if:w}{\MH_let:NwN \MH_if:w =\if}{} +\@ifundefined{MH_if_meaning:NN}{\MH_let:NwN \MH_if_meaning:NN =\ifx}{} +\@ifundefined{MH_else:}{\MH_let:NwN \MH_else:=\else}{} +\@ifundefined{MH_fi:}{\MH_let:NwN \MH_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{MH_if_num:w}{\MH_let:NwN \MH_if_num:w =\ifnum}{} + \@ifundefined{MH_if_dim:w}{\MH_let:NwN \MH_if_dim:w =\ifdim}{} + \@ifundefined{MH_if_case:w}{\MH_let:NwN \MH_if_case:w =\ifcase}{} } -\@ifundefined{or:}{\MH_let:NwN \or:=\or}{} +\@ifundefined{MH_or:}{\MH_let:NwN \MH_or:=\or}{} \def\MH_cs_to_str:N {\expandafter\@gobble\string} \@ifundefined{eTeXversion} { @@ -127,9 +127,9 @@ \futurelet\@let@token\MH_nospace_nextchar: } \def\MH_nospace_nextchar:{ - \if_meaning:NN \@let@token\reserved@d + \MH_if_meaning:NN \@let@token\reserved@d \MH_let:NwN \reserved@b\reserved@a - \fi: + \MH_fi: \reserved@b } \long\def\MH_nospace_testopt:nn #1#2{ @@ -138,11 +138,11 @@ {#1[{#2}]} } \def\MH_nospace_protected_testopt:n #1{ - \if_meaning:NN \protect\@typeset@protect + \MH_if_meaning:NN \protect\@typeset@protect \expandafter\MH_nospace_testopt:nn - \else: + \MH_else: \@x@protect#1 - \fi: + \MH_fi: } \@ifundefined{kernel@ifnextchar} {\MH_let:NwN \kernel@ifnextchar \@ifnextchar} |