diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl')
-rw-r--r-- | Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl | 90 |
1 files changed, 83 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl b/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl index b37887332d2..7b61fd234df 100644 --- a/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl +++ b/Master/texmf-dist/tex/context/base/mkxl/math-ali.mkxl @@ -938,13 +938,18 @@ \def\math_cases_NC_two {\ifmmode\stopimath\fi} -\def\math_cases_TC_zero +\def\math_cases_TC_zero % needs checking + %{\ifmmode\else\startimath\fi} {} \def\math_cases_TC_one {\ifmmode\stopimath\fi \aligntab} +\def\math_cases_TC_two + %{\ifmmode\stopimath\fi} % needs checking + {} + \permanent\protected\def\math_cases_NC {\ifcase\c_math_cases_nc \expandafter\math_cases_NC_zero @@ -1268,6 +1273,7 @@ \newconditional\c_math_matrix_first \newconstant \c_math_matrix_anchor_mode +\newconditional\c_math_matrix_sl_seen % enabled : 1 % left/both : 2 @@ -1403,9 +1409,41 @@ \c!toffset=.25\exheight, \c!boffset=\mathmatrixparameter\c!toffset] -\noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*% +% \noaligned\permanent\tolerant\protected\def\math_matrix_HL[#1]#*% +% {\noalign\bgroup +% \math_matrix_check_rule[#1]% +% \divideby\scratchdimen\plustwo +% \ifdim\scratchdimen>\zeropoint +% % \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax +% \scratchdistance\mathmatrixparameter\c!toffset\relax +% \ifdim\scratchdistance>\zeropoint +% \nohrule +% \s!attr \mathalignmentvruleattribute\plustwo +% \s!height\scratchdistance +% \s!depth \zeropoint +% \relax +% \fi +% \hrule +% \s!attr \mathalignmentvruleattribute\plusthree +% \s!height\scratchdimen +% \s!depth \scratchdimen +% \relax +% \scratchdistance\mathmatrixparameter\c!boffset\relax +% \ifdim\scratchdistance>\zeropoint +% \nohrule +% \s!attr \mathalignmentvruleattribute\plusfour +% \s!height\zeropoint +% \s!depth \scratchdistance +% \relax +% \fi +% \else +% % zero dimensions disable the rule +% \fi +% \egroup} + +\def\math_matrix_HL_indeed#1#2% {\noalign\bgroup - \math_matrix_check_rule[#1]% + \math_matrix_check_rule[#2]% \divideby\scratchdimen\plustwo \ifdim\scratchdimen>\zeropoint % \autorule\s!height\scratchdimen\s!depth\scratchdimen\relax @@ -1422,6 +1460,17 @@ \s!height\scratchdimen \s!depth \scratchdimen \relax + \ifnum#1>\plusone + \localcontrolledloop\plustwo#1\plusone + {\kern.125\d_math_eqalign_distance % hskip + \hrule + \s!attr \mathalignmentvruleattribute\plusthree + \s!height\scratchdimen + \s!depth \scratchdimen + \relax}% + \kern-2\scratchdimen + \kern-.125\d_math_eqalign_distance % hskip + \fi \scratchdistance\mathmatrixparameter\c!boffset\relax \ifdim\scratchdistance>\zeropoint \nohrule @@ -1435,6 +1484,9 @@ \fi \egroup} +\permanent\tolerant\noaligned\protected\def\math_matrix_HL [#1]#*{\math_matrix_HL_indeed\plusone{#1}} +\permanent\tolerant\noaligned\protected\def\math_matrix_HLHL[#1]#*{\math_matrix_HL_indeed\plustwo{#1}} + \protected\def\math_matrix_vertical_rule_indeed#1#2% {\math_matrix_check_rule[#2]% \enablematrixrules @@ -1456,7 +1508,7 @@ \protected\def\math_matrix_horizontal_rule_indeed#1#2% {\math_matrix_check_rule[#2]% \global\setfalse\c_math_matrix_first - \global\settrue\c_math_matrix_sl_seen + \global\settrue \c_math_matrix_sl_seen \enablematrixrules \leaders#1% \s!attr \mathalignmenthruleattribute\plusone @@ -1514,19 +1566,38 @@ %boundary\c_math_matrix_sl_boundary \enforced\let\NR\math_matrix_NL_NR} -\permanent\tolerant\protected\def\math_matrix_VL[#1]#*% +% \permanent\tolerant\protected\def\math_matrix_VL[#1]#*% +% {\span\omit +% \ifconditional\c_math_matrix_first\else +% \kern.5\d_math_eqalign_distance % hskip +% \fi +% \math_matrix_vertical_rule_yes{#1}% +% \kern.5\d_math_eqalign_distance % hskip +% \global\setfalse\c_math_matrix_first +% \aligntab +% \boundary\c_math_matrix_vl_boundary +% \enforced\let\NR\math_matrix_NL_NR +% } + +\def\math_matrix_VL_indeed#1#2%% {\span\omit \ifconditional\c_math_matrix_first\else \kern.5\d_math_eqalign_distance % hskip \fi - \math_matrix_vertical_rule_yes{#1}% - \kern.5\d_math_eqalign_distance % hskip + \math_matrix_vertical_rule_yes{#2}% + \localcontrolledloop\plustwo#1\plusone + {\kern.125\d_math_eqalign_distance % hskip + \math_matrix_vertical_rule_yes{#2}}% + \kern.5\d_math_eqalign_distance \global\setfalse\c_math_matrix_first \aligntab \boundary\c_math_matrix_vl_boundary \enforced\let\NR\math_matrix_NL_NR } +\permanent\tolerant\protected\def\math_matrix_VL [#1]#*{\math_matrix_VL_indeed\plusone{#1}} +\permanent\tolerant\protected\def\math_matrix_VLVL[#1]#*{\math_matrix_VL_indeed\plustwo{#1}} + \permanent\tolerant\protected\def\math_matrix_NL[#1]#*% {\span\omit \ifconditional\c_math_matrix_first\else @@ -1585,6 +1656,9 @@ \enforced\let\VC\math_matrix_VC % bonus, extra column \enforced\let\VT\math_matrix_VT % bonus, idem but tight \enforced\let\TB\math_common_TB + % just because it's easy: + \enforced\let\VLVL\math_matrix_VLVL + \enforced\let\HLHL\math_matrix_HLHL \to \everymathmatrix \definesystemattribute[mathmatrixornament][public] @@ -2818,6 +2892,8 @@ {\unskip \strc_formulas_place_number_nested{#1}{#2}\crcr} +\aliased\let\math_align_strut\relax + \permanent\tolerant\protected\def\math_simplealign_start[#1]#*[#2]% {\begingroup \edef\currentmathsimplealign{#1}% |