diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathtools/empheq.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/mathtools/empheq.sty | 585 |
1 files changed, 296 insertions, 289 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 |