summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mathtools/mathtools.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/mathtools/mathtools.sty')
-rw-r--r--Master/texmf-dist/tex/latex/mathtools/mathtools.sty461
1 files changed, 235 insertions, 226 deletions
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}