diff --git a/testsuite/tests/input/tex/Ams.test.ts b/testsuite/tests/input/tex/Ams.test.ts index e1d13aaa7..359e2ae84 100644 --- a/testsuite/tests/input/tex/Ams.test.ts +++ b/testsuite/tests/input/tex/Ams.test.ts @@ -48,10 +48,10 @@ describe('Ams', () => { toXmlMatch( tex2mml('\\left\\ulcorner A \\right\\urcorner'), ` - - + + A - + ` ); @@ -151,7 +151,7 @@ describe('Ams', () => { ` a - + n k @@ -168,7 +168,7 @@ describe('Ams', () => { ` a - + n k @@ -187,7 +187,7 @@ describe('Ams', () => { ` a - + n k @@ -274,7 +274,7 @@ describe('Ams', () => { ` a - + ( @@ -299,7 +299,7 @@ describe('Ams', () => { ` a - + ( @@ -326,7 +326,7 @@ describe('Ams', () => { ` a - + ( @@ -799,13 +799,13 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{subarray}{c}a\\end{subarray}'), ` - + - + a - + ` @@ -818,7 +818,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix}a\\end{smallmatrix}'), ` - + @@ -837,7 +837,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{align} a&=b \\\\ c&=d \\end{align}'), ` - + a @@ -873,7 +873,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{align*} a&=b \\\\ c&=d \\end{align*}'), ` - + a @@ -909,7 +909,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b \\\\ c \\end{multline}'), ` - + a @@ -936,7 +936,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{multline*} a\\\\ b \\\\ c \\end{multline*}'), ` - + a @@ -965,7 +965,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{split} r&=s\\\\ & =t \\end{split} \\\\ c&=d \\end{align*}' ), ` - + a @@ -975,7 +975,7 @@ describe('Ams Environments', () => { = b - + r @@ -1025,7 +1025,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{gather} a=b \\\\ c=d \\end{gather}'), ` - + a @@ -1051,7 +1051,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{gather*} a=b \\\\ c=d \\end{gather*}'), ` - + a @@ -1077,8 +1077,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{alignat}{2} a&=b \\\\ c&=d \\end{alignat}'), ` - - + + a @@ -1090,7 +1090,7 @@ describe('Ams Environments', () => { - + c @@ -1113,8 +1113,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{alignat*}{2} a&=b \\\\ c&=d \\end{alignat*}'), ` - - + + a @@ -1126,7 +1126,7 @@ describe('Ams Environments', () => { - + c @@ -1151,7 +1151,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{alignedat}{2} r&=s\\\\ & =t \\end{alignedat} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1161,8 +1161,8 @@ describe('Ams Environments', () => { = b - - + + r @@ -1174,7 +1174,7 @@ describe('Ams Environments', () => { - + @@ -1213,7 +1213,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{aligned} r&=s\\\\ & =t \\end{aligned} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1223,8 +1223,8 @@ describe('Ams Environments', () => { = b - - + + r @@ -1236,7 +1236,7 @@ describe('Ams Environments', () => { - + @@ -1275,7 +1275,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{gathered} r=s\\\\ =t \\end{gathered} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1285,15 +1285,15 @@ describe('Ams Environments', () => { = b - - + + r = s - + = t @@ -1326,7 +1326,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{equation} a \\end{equation}'), ` - a + a ` ); }); @@ -1337,7 +1337,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{equation*} a \\end{equation*}'), ` - a + a ` ); }); @@ -1348,7 +1348,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray} a & = & b\\\\ c & = & d \\end{eqnarray}'), ` - + a @@ -1388,7 +1388,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray*} a & = & b\\\\ c & = & d \\end{eqnarray*}'), ` - + a @@ -1428,7 +1428,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{flalign} a & = & b\\\\ c & = & d \\end{flalign}'), ` - + a @@ -1470,8 +1470,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{xalignat}{2} a&b & c&d \\end{xalignat}'), ` - - + + a @@ -1510,8 +1510,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{xxalignat}{2} a&b & c&d \\end{xxalignat}'), ` - - + + a @@ -1548,8 +1548,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{xalignat}{2} a&b \\end{xalignat}'), ` - - + + a @@ -1577,8 +1577,8 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{xalignat}{2} a & b \\tag{1}\\end{xalignat}'), ` - - + + ( @@ -1613,7 +1613,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{flalign} a&b \\end{flalign}'), ` - + a @@ -1635,7 +1635,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{matrix} a & b \\\\ c & d \\end{matrix}'), ` - + a @@ -1663,7 +1663,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix} a & b \\\\ c & d \\end{pmatrix}'), ` - + ( @@ -1695,7 +1695,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{bmatrix} a & b \\\\ c & d \\end{bmatrix}'), ` - + [ @@ -1727,7 +1727,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{Bmatrix} a & b \\\\ c & d \\end{Bmatrix}'), ` - + { @@ -1759,7 +1759,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{Vmatrix} a & b \\\\ c & d \\end{Vmatrix}'), ` - + @@ -1796,7 +1796,7 @@ describe('Ams Environments', () => { x ) = - + { @@ -1845,9 +1845,9 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{subarray}{c}a\\end{subarray}'), ` - + - + a @@ -1864,7 +1864,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix}a\\end{smallmatrix}'), ` - + @@ -1883,7 +1883,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{align} a&=b \\\\ c&=d \\end{align}'), ` - + ( @@ -1929,7 +1929,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{align*} a&=b \\\\ c&=d \\end{align*}'), ` - + a @@ -1965,7 +1965,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b \\\\ c \\end{multline}'), ` - + a @@ -1997,7 +1997,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{multline*} a\\\\ b \\\\ c \\end{multline*}'), ` - + a @@ -2026,7 +2026,7 @@ describe('Ams Tagged Environments', () => { '\\begin{align*} a&=b \\begin{split} r&=s\\\\ & =t \\end{split} \\\\ c&=d \\end{align*}' ), ` - + a @@ -2036,7 +2036,7 @@ describe('Ams Tagged Environments', () => { = b - + r @@ -2086,7 +2086,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{gather} a=b \\\\ c=d \\end{gather}'), ` - + ( @@ -2122,7 +2122,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{gather*} a=b \\\\ c=d \\end{gather*}'), ` - + a @@ -2148,8 +2148,8 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{alignat}{2} a&=b \\\\ c&=d \\end{alignat}'), ` - - + + ( 1 @@ -2166,7 +2166,7 @@ describe('Ams Tagged Environments', () => { - + ( 2 @@ -2194,8 +2194,8 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{alignat*}{2} a&=b \\\\ c&=d \\end{alignat*}'), ` - - + + a @@ -2207,7 +2207,7 @@ describe('Ams Tagged Environments', () => { - + c @@ -2232,7 +2232,7 @@ describe('Ams Tagged Environments', () => { '\\begin{align*} a&=b \\begin{alignedat}{2} r&=s\\\\ & =t \\end{alignedat} \\\\ c&=d \\end{align*}' ), ` - + a @@ -2242,8 +2242,8 @@ describe('Ams Tagged Environments', () => { = b - - + + r @@ -2255,7 +2255,7 @@ describe('Ams Tagged Environments', () => { - + @@ -2294,7 +2294,7 @@ describe('Ams Tagged Environments', () => { '\\begin{align*} a&=b \\begin{aligned} r&=s\\\\ & =t \\end{aligned} \\\\ c&=d \\end{align*}' ), ` - + a @@ -2304,8 +2304,8 @@ describe('Ams Tagged Environments', () => { = b - - + + r @@ -2317,7 +2317,7 @@ describe('Ams Tagged Environments', () => { - + @@ -2356,7 +2356,7 @@ describe('Ams Tagged Environments', () => { '\\begin{align*} a&=b \\begin{gathered} r=s\\\\ =t \\end{gathered} \\\\ c&=d \\end{align*}' ), ` - + a @@ -2366,15 +2366,15 @@ describe('Ams Tagged Environments', () => { = b - - + + r = s - + = t @@ -2407,7 +2407,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{equation} a \\end{equation}'), ` - + ( @@ -2429,7 +2429,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{equation*} a \\end{equation*}'), ` - a + a ` ); }); @@ -2440,7 +2440,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray} a & = & b\\\\ c & = & d \\end{eqnarray}'), ` - + ( @@ -2490,7 +2490,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray*} a & = & b\\\\ c & = & d \\end{eqnarray*}'), ` - + a @@ -2530,7 +2530,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{align} a&=b \\\\ &=c \\notag \\end{align}'), ` - + ( @@ -2569,8 +2569,8 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{xalignat}{1} a&b \\end{xalignat}'), ` - - + + ( @@ -2600,8 +2600,8 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{xalignat*}{1} a&b \\end{xalignat*}'), ` - - + + a @@ -2624,7 +2624,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{flalign} a&b & \\end{flalign}'), ` - + ( @@ -2653,7 +2653,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{flalign*} a&b & \\end{flalign*}'), ` - + a @@ -2677,13 +2677,13 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{aligned} [b] a \\\\ b \\end{aligned}'), ` - - + + a - + b @@ -2699,7 +2699,7 @@ describe('Ams Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{aligned} [x] a \\\\ b \\end{aligned}'), ` - + [ @@ -2734,8 +2734,8 @@ describe('Ams Tagged Environments Left', () => { toXmlMatch( tex2mml('\\begin{xalignat}{2} a & b \\tag{1}\\end{xalignat}'), ` - - + + ( @@ -2770,7 +2770,7 @@ describe('Ams Tagged Environments Left', () => { toXmlMatch( tex2mml('\\begin{multline} a\\tag{1} \\end{multline}'), ` - + ( @@ -2799,7 +2799,7 @@ describe('Ams Tagged Environments Left', () => { toXmlMatch( tex2mml('\\begin{gather}\\begin{align} a &= b \\end{align}\\end{gather}'), ` - + ( @@ -2807,7 +2807,7 @@ describe('Ams Tagged Environments Left', () => { ) - + ( @@ -3051,7 +3051,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -3078,7 +3078,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline}\\shoveleft a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -3105,7 +3105,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\\\shoveleft b\\\\ c\\end{multline}'), ` - + a @@ -3132,7 +3132,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\\\shoveleft c\\end{multline}'), ` - + a @@ -3159,7 +3159,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline}\\shoveright a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -3186,7 +3186,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\\\shoveright b\\\\ c\\end{multline}'), ` - + a @@ -3213,7 +3213,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\\\shoveright c\\end{multline}'), ` - + a @@ -3242,7 +3242,7 @@ describe('MultlineShove', () => { '\\begin{multline} a\\\\\\shoveright\\shoveleft b\\\\ c\\end{multline}' ), ` - + a @@ -3271,7 +3271,7 @@ describe('MultlineShove', () => { '\\begin{multline} a\\\\\\shoveleft\\shoveright b\\\\ c\\end{multline}' ), ` - + a @@ -3337,7 +3337,7 @@ describe('Ams Complex', () => { '\\begin{align}\\dot{x} & = \\sigma(y-x) \\\\\\dot{y} & = \\rho x - y - xz \\\\\\dot{z} & = -\\beta z + xy\\end{align}' ), ` - + @@ -3418,7 +3418,7 @@ describe('Ams Complex', () => { '\\begin{align} \\nabla \\times \\vec{\\mathbf{B}} -\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{E}}}{\\partial t} & = \\frac{4\\pi}{c}\\vec{\\mathbf{j}} \\\\ \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\ \\nabla \\times \\vec{\\mathbf{E}}\\, +\\, \\frac1c\\, \\frac{\\partial\\vec{\\mathbf{B}}}{\\partial t} & = \\vec{\\mathbf{0}} \\\\ \\nabla \\cdot \\vec{\\mathbf{B}} & = 0 \\end{align}' ), ` - + @@ -3588,7 +3588,7 @@ describe('Ams Complex', () => { '\\begin{eqnarray}(x+y)^{3}&=&(x+y)(x+y)(x+y)\\\\&=&xxx+xxy+xyx+{\\underline {xyy}}+yxx+{\\underline {yxy}}+{\\underline {yyx}}+yyy\\\\&=&x^{3}+3x^{2}y+{\\underline {3xy^{2}}}+y^{3}.\\end{eqnarray}' ), ` - + ( @@ -3767,7 +3767,7 @@ describe('Ams Complex', () => { 2 = - + | @@ -4063,20 +4063,20 @@ describe('Ams symbols', () => { '\\left\\llcorner X \\right\\lrcorner \\left\\lvert X \\right\\rvert \\left\\lVert X \\right\\rVert' ), ` - - + + X - + - - | + + | X - | + | - - + + X - + ` ); @@ -4185,14 +4185,14 @@ describe('Ams symbols', () => { toXmlMatch( tex2mml('\\substack{a\\\\b}'), ` - + - + a - + b diff --git a/testsuite/tests/input/tex/Amscd.test.ts b/testsuite/tests/input/tex/Amscd.test.ts index ffb6c36c8..e61515126 100644 --- a/testsuite/tests/input/tex/Amscd.test.ts +++ b/testsuite/tests/input/tex/Amscd.test.ts @@ -15,7 +15,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'), ` - + A @@ -101,7 +101,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @<<< B @>>> C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}'), ` - + A @@ -168,7 +168,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @>a>b> B\\\\@VlVrV @AlArA\\\\C @ - + A @@ -288,7 +288,7 @@ describe('AmsCD', () => { '\\begin{CD}A @>>> B@>\\text{very long label}>>C\\\\@VVV @VVV @VVV\\\\D @>>> E@>>> F\\end{CD}' ), ` - + A @@ -372,7 +372,7 @@ describe('AmsCD', () => { '\\begin{CD}A @>>> B @>{\\text{very long label}}>> C \\\\@VVV @VVV @VVV \\\\D @>>> E @>{\\phantom{\\text{very long label}}}>> F\\end{CD}' ), ` - + A @@ -464,7 +464,7 @@ describe('AmsCD', () => { '\\begin{CD}A @>>> B @>{\\text{very long label}}>> C \\\\@VVV @VVV @VVV \\\\D @>>> E @>{\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}\\phantom{\\text{very long label}}}>> F\\end{CD}' ), ` - + A @@ -533,9 +533,9 @@ describe('AmsCD', () => { -   -   -   +   +   +   shorter @@ -566,7 +566,7 @@ describe('AmsCD', () => { '\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -654,7 +654,7 @@ describe('AmsCD', () => { '\\minCDarrowheight{4cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -742,7 +742,7 @@ describe('AmsCD', () => { '\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -828,7 +828,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @ > x > > B \\end{CD}'), ` - + A @@ -857,7 +857,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @Ra>> BaD\\end{CD}'), ` - + A @@ -881,12 +881,12 @@ describe('AmsCD', () => { toXmlMatch( tex2mml(`\\begin{CD}A' @>>> B\\end{CD}`), ` - + A - + @@ -924,7 +924,7 @@ describe('AmsCD Options', () => { toXmlMatch( tex2mml('\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'), ` - + A diff --git a/testsuite/tests/input/tex/Autoload.test.ts b/testsuite/tests/input/tex/Autoload.test.ts index e8fe288ba..c8491ddba 100644 --- a/testsuite/tests/input/tex/Autoload.test.ts +++ b/testsuite/tests/input/tex/Autoload.test.ts @@ -27,7 +27,7 @@ describe('Autoload', () => { toXmlMatch( await typeset2mml('\\begin{CD} a @>>> b\\end{CD}'), ` - + a diff --git a/testsuite/tests/input/tex/Base.test.ts b/testsuite/tests/input/tex/Base.test.ts index 6fda81e22..c10f7c389 100644 --- a/testsuite/tests/input/tex/Base.test.ts +++ b/testsuite/tests/input/tex/Base.test.ts @@ -86,7 +86,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('^2'), ` - + 2 @@ -100,7 +100,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('{}^2'), ` - + 2 @@ -114,7 +114,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('x^2'), ` - + x 2 @@ -128,7 +128,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('x^3'), ` - + x 3 @@ -142,7 +142,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('\\sum^2_1'), ` - + 1 2 @@ -158,14 +158,14 @@ describe('Sub and Superscripts', () => { tex2mml('\\left( \\sum_1^n \\right)^{2}'), ` - - ( + + ( 1 n - ) + ) 2 @@ -181,7 +181,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('_3'), ` - + 3 @@ -195,7 +195,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('{}_3'), ` - + 3 @@ -209,7 +209,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('x_3'), ` - + x 3 @@ -223,7 +223,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('x^a_3'), ` - + x 3 a @@ -238,7 +238,7 @@ describe('Sub and Superscripts', () => { toXmlMatch( tex2mml('\\mathop{X}^2', false), ` - + X @@ -293,7 +293,7 @@ describe('Negations', () => { toXmlMatch( tex2mml(' \\not\\longrightarrow'), ` - ⟶̸ + ⟶̸ ` ); }); @@ -325,9 +325,9 @@ describe('Negations', () => { - - ( - + + ( + ` ); @@ -380,10 +380,10 @@ describe('Primes', () => { it('Double Prime', () => { toXmlMatch( tex2mml("x''"), - ` - + ` + x - + ` ); @@ -397,7 +397,7 @@ describe('Primes', () => { ` x - + ` ); @@ -411,7 +411,7 @@ describe('Primes', () => { ` x - + ` ); @@ -425,7 +425,7 @@ describe('Primes', () => { ` x - ′′′′′ + ′′′′′ ` ); @@ -608,8 +608,8 @@ describe('Digits', () => { toXmlMatch( tex2mml('1{,}0000.10'), ` - 1,000 - 0.10 + 1,000 + 0.10 ` ); }); @@ -691,8 +691,8 @@ describe('DigitsEuropean', () => { toXmlMatch( tex2mml('1{.}0000,10'), ` - 1.000 - 0,10 + 1.000 + 0,10 ` ); }); @@ -1160,18 +1160,18 @@ describe('Fenced', () => { toXmlMatch( tex2mml('\\left(\\frac{a}{\\left[bc\\right]}\\right)'), ` - - ( + + ( a - - [ + + [ b c - ] + ] - ) + ) ` ); @@ -1206,22 +1206,22 @@ describe('Fenced', () => { '\\left\\{\\left\\vert \\left[ \\left\\| A \\right.\\right| \\right]\\right\\}' ), ` - - { - - | - - [ - - + + { + + | + + [ + + A - + - | + | - ] + ] - } + } ` ); @@ -1233,14 +1233,14 @@ describe('Fenced', () => { toXmlMatch( tex2mml('\\left(a\\middle|b\\right)'), ` - - ( + + ( a - | + | b - ) + ) ` ); @@ -1273,11 +1273,11 @@ describe('Fenced', () => { toXmlMatch( tex2mml('\\left. ab \\right)'), ` - - + + a b - ) + ) ` ); @@ -1289,11 +1289,11 @@ describe('Fenced', () => { toXmlMatch( tex2mml('\\left( ab \\right.'), ` - - ( + + ( a b - + ` ); @@ -1307,18 +1307,18 @@ describe('Fenced', () => { '\\left\\{\\frac{a}{\\left\\uparrow bc\\right\\downarrow}\\right\\}' ), ` - - { + + { a - - + + b c - + - } + } ` ); @@ -1330,13 +1330,13 @@ describe('Fenced', () => { toXmlMatch( tex2mml('\\left\\uparrow \\frac{a}{b} \\right\\downarrow'), ` - - + + a b - + ` ); @@ -1366,17 +1366,17 @@ describe('Fenced', () => { '\\left\\uparrow \\frac{a}{b}\\middle\\downarrow c \\right\\uparrow' ), ` - - + + a b - + c - + ` ); @@ -1596,7 +1596,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a \\over b'), ` - + a b @@ -1610,7 +1610,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a + b \\over c'), ` - + a + @@ -1714,7 +1714,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('1 \\over 2'), ` - + 1 2 @@ -1728,7 +1728,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a \\above 1pt b'), ` - + a b @@ -1742,7 +1742,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('n \\choose k'), ` - + ( @@ -1767,7 +1767,7 @@ describe('Stacking expressions', () => { X - + ( @@ -1797,7 +1797,7 @@ describe('Stacking expressions', () => { 1 - + ( @@ -1832,7 +1832,7 @@ describe('Stacking expressions', () => { 2 - + ( @@ -1872,7 +1872,7 @@ describe('Stacking expressions', () => { 3 - + ( @@ -1902,7 +1902,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('1 \\overwithdelims [ ] 2'), ` - + [ @@ -1927,7 +1927,7 @@ describe('Stacking expressions', () => { X - + [ @@ -1957,7 +1957,7 @@ describe('Stacking expressions', () => { 1 - + [ @@ -1992,7 +1992,7 @@ describe('Stacking expressions', () => { 2 - + [ @@ -2032,7 +2032,7 @@ describe('Stacking expressions', () => { 3 - + [ @@ -2062,7 +2062,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a \\abovewithdelims [ ] 1pt b'), ` - + [ @@ -2087,7 +2087,7 @@ describe('Stacking expressions', () => { X - + [ @@ -2117,7 +2117,7 @@ describe('Stacking expressions', () => { 1 - + [ @@ -2152,7 +2152,7 @@ describe('Stacking expressions', () => { 2 - + [ @@ -2192,7 +2192,7 @@ describe('Stacking expressions', () => { 3 - + [ @@ -2228,7 +2228,7 @@ describe('Stacking expressions', () => { ) = - + ( @@ -2311,7 +2311,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a \\atop b'), ` - + a b @@ -2325,7 +2325,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('a \\atopwithdelims [ ] b'), ` - + [ @@ -2347,7 +2347,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('n \\brack k'), ` - + [ @@ -2369,7 +2369,7 @@ describe('Stacking expressions', () => { toXmlMatch( tex2mml('n \\brace k'), ` - + { @@ -2559,7 +2559,7 @@ describe('Matrix', () => { tex2mml('\\matrix{a}'), ` - + a @@ -2576,7 +2576,7 @@ describe('Matrix', () => { tex2mml('\\array{a&b}'), ` - + a @@ -2596,7 +2596,7 @@ describe('Matrix', () => { tex2mml('\\array{a&b\\\\ c&d}'), ` - + a @@ -2604,7 +2604,7 @@ describe('Matrix', () => { b - + c @@ -2627,7 +2627,7 @@ describe('Matrix', () => { X - + a @@ -2651,7 +2651,7 @@ describe('Matrix', () => { ( - + a @@ -2678,7 +2678,7 @@ describe('Matrix', () => { ( - + a @@ -2704,7 +2704,7 @@ describe('Matrix', () => { ( - + a @@ -2728,7 +2728,7 @@ describe('Matrix', () => { { - + a @@ -2749,7 +2749,7 @@ describe('Matrix', () => { { - + a @@ -2770,7 +2770,7 @@ describe('Matrix', () => { { - + a @@ -2794,7 +2794,7 @@ describe('Matrix', () => { { - + a @@ -2818,7 +2818,7 @@ describe('Matrix', () => { { - + a @@ -2826,7 +2826,7 @@ describe('Matrix', () => { b - + c @@ -2850,7 +2850,7 @@ describe('Matrix', () => { { - + a @@ -2872,7 +2872,7 @@ describe('Matrix', () => { tex2mml('\\eqalignno{a&b&c}'), ` - + c @@ -2895,7 +2895,7 @@ describe('Matrix', () => { tex2mml('\\leqalignno{a&b&c}'), ` - + c @@ -2918,7 +2918,7 @@ describe('Matrix', () => { tex2mml('\\eqalign{a&b&c}'), ` - + a @@ -2941,12 +2941,12 @@ describe('Matrix', () => { tex2mml('\\displaylines{a\\\\ b}'), ` - + a - + b @@ -3104,8 +3104,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c}a\\end{array}'), ` - - + + a @@ -3121,9 +3121,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|}a\\end{array}'), ` - + - + a @@ -3140,9 +3140,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c}a\\end{array}'), ` - + - + a @@ -3159,9 +3159,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c|}a\\end{array}'), ` - + - + a @@ -3178,9 +3178,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c}\\hline a\\end{array}'), ` - + - + a @@ -3197,9 +3197,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c} a\\\\\\hline\\end{array}'), ` - + - + a @@ -3216,9 +3216,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c}\\hline a\\\\\\hline\\end{array}'), ` - + - + a @@ -3235,8 +3235,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|}\\hline a\\\\\\hline\\end{array}'), ` - - + + a @@ -3252,8 +3252,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{:c:}\\hline a\\\\\\hline\\end{array}'), ` - - + + a @@ -3269,8 +3269,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c:} a\\end{array}'), ` - - + + a @@ -3286,8 +3286,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c:c}a&c\\\\b&d\\end{array}'), ` - - + + a @@ -3295,7 +3295,7 @@ describe('Array', () => { c - + b @@ -3314,8 +3314,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c|c}a&c\\\\b&d\\end{array}'), ` - - + + a @@ -3323,7 +3323,7 @@ describe('Array', () => { c - + b @@ -3342,13 +3342,13 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c}a\\\\\\hdashline b\\end{array}'), ` - - + + a - + b @@ -3364,13 +3364,13 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c}a\\\\\\hline b\\end{array}'), ` - - + + a - + b @@ -3386,14 +3386,14 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|}a\\\\\\hdashline b\\end{array}'), ` - + - + a - + b @@ -3410,14 +3410,14 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|}a\\\\\\hline b\\end{array}'), ` - + - + a - + b @@ -3434,9 +3434,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c:c|}a&c\\\\b&d\\end{array}'), ` - + - + a @@ -3444,7 +3444,7 @@ describe('Array', () => { c - + b @@ -3464,9 +3464,9 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|c|}a&c\\\\b&d\\end{array}'), ` - + - + a @@ -3474,7 +3474,7 @@ describe('Array', () => { c - + b @@ -3494,8 +3494,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}[b]{c}a\\end{array}'), ` - - + + a @@ -3511,8 +3511,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}[x]{c}a\\end{array}'), ` - - + + a @@ -3528,7 +3528,7 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{>{x}c} \\end{array}'), ` - + ` ); }); @@ -3540,7 +3540,7 @@ describe('Array', () => { tex2mml('\\eqalignno{a & & {\\hbox{(3)}}}'), ` - + @@ -3564,8 +3564,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\begin{array}{c|cc}a&b&c\\\\d&e&f\\end{array}'), ` - - + + a @@ -3576,7 +3576,7 @@ describe('Array', () => { c - + d @@ -3600,8 +3600,8 @@ describe('Array', () => { '\\begin{array}{ccc}a&b&c\\\\\\hline d&e&f\\\\ g&h&i \\end{array}' ), ` - - + + a @@ -3612,7 +3612,7 @@ describe('Array', () => { c - + d @@ -3623,7 +3623,7 @@ describe('Array', () => { f - + g @@ -3647,8 +3647,8 @@ describe('Array', () => { '\\begin{array}{c|cc}a&b&c\\\\\\hline d&e&f\\\\ g&h&i \\end{array}' ), ` - - + + a @@ -3659,7 +3659,7 @@ describe('Array', () => { c - + d @@ -3670,7 +3670,7 @@ describe('Array', () => { f - + g @@ -3694,8 +3694,8 @@ describe('Array', () => { '\\begin{array}{c|c:cc}0&a&b&c\\\\\\hline 1&d&e&f\\\\\\hdashline 2&g&h&i\\\\ 3&j&k&l \\end{array}' ), ` - - + + 0 @@ -3709,7 +3709,7 @@ describe('Array', () => { c - + 1 @@ -3723,7 +3723,7 @@ describe('Array', () => { f - + 2 @@ -3737,7 +3737,7 @@ describe('Array', () => { i - + 3 @@ -3764,10 +3764,10 @@ describe('Array', () => { '\\left( \\begin{array}{ccc}a & b & c \\\\d & e & f \\\\g & h & i \\end{array} \\right)' ), ` - - ( - - + + ( + + a @@ -3778,7 +3778,7 @@ describe('Array', () => { c - + d @@ -3789,7 +3789,7 @@ describe('Array', () => { f - + g @@ -3801,7 +3801,7 @@ describe('Array', () => { - ) + ) ` ); @@ -3813,8 +3813,8 @@ describe('Array', () => { toXmlMatch( tex2mml('\\newcolumntype{a}{c}\\begin{array}{a|a}a&b\\\\c&d\\end{array}'), ` - - + + a @@ -3822,7 +3822,7 @@ describe('Array', () => { b - + c @@ -3841,7 +3841,7 @@ describe('Array', () => { toXmlMatch( tex2mml('\\newcolumntype{a}[1]{m{#1}}\\begin{array}{a{1em}|a{2em}}a&b\\\\c&d\\end{array}'), ` - + @@ -3914,7 +3914,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\int^2\\limits_3'), ` - + 3 2 @@ -3929,7 +3929,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\lim_3\\nolimits^2'), ` - + lim 3 2 @@ -3944,7 +3944,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\sum\\limits^2_3'), ` - + 3 2 @@ -3992,7 +3992,7 @@ describe('Moving limits', () => { - + 2 @@ -4053,7 +4053,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\overline{\\mathop{a}}^2'), ` - + a @@ -4075,7 +4075,7 @@ describe('Moving limits', () => { - + 3 2 @@ -4093,7 +4093,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\overline{\\sum}^2_3'), ` - + @@ -4136,7 +4136,7 @@ describe('Moving limits', () => { X - + y @@ -4208,7 +4208,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\overbrace{\\mathop{a}}^2'), ` - + @@ -4245,7 +4245,7 @@ describe('Moving limits', () => { toXmlMatch( tex2mml('\\overbrace{\\sum}^2'), ` - + @@ -4923,8 +4923,8 @@ describe('Base Complex', () => { ), ` - - ( + + ( @@ -4942,7 +4942,7 @@ describe('Base Complex', () => { b k - ) + ) @@ -4955,8 +4955,8 @@ describe('Base Complex', () => { - - ( + + ( @@ -4971,10 +4971,10 @@ describe('Base Complex', () => { k 2 - ) + ) - - ( + + ( @@ -4989,7 +4989,7 @@ describe('Base Complex', () => { k 2 - ) + ) ` ); @@ -5044,7 +5044,7 @@ describe('Base Complex', () => { π - + 1 + @@ -5056,7 +5056,7 @@ describe('Base Complex', () => { π - + 1 + @@ -5068,7 +5068,7 @@ describe('Base Complex', () => { π - + 1 + @@ -5107,7 +5107,7 @@ describe('Base Complex', () => { 1 + - + q 2 @@ -5121,7 +5121,7 @@ describe('Base Complex', () => { + - + q 6 @@ -5210,17 +5210,17 @@ describe('Base Complex', () => { toXmlMatch( tex2mml('\\sum_{n=1}^\\infty {1\\over n^2} = {\\pi^2\\over 6}'), ` - + n = 1 - + - + 1 n @@ -5230,7 +5230,7 @@ describe('Base Complex', () => { = - + π 2 @@ -5253,9 +5253,9 @@ describe('Base Complex', () => { a ) = - + - γ + γ @@ -5331,7 +5331,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a&=&b\\end{eqnarray}'), ` - + a @@ -5370,7 +5370,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{displaymath}a\\end{displaymath}'), ` - a + a ` ); }); @@ -5381,7 +5381,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{math}a\\end{math}'), ` - a + a ` ); }); @@ -5392,8 +5392,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{array}{c}a\\end{array}'), ` - - + + a @@ -5409,13 +5409,13 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{array}{c}a\\\\b\\end{array}'), ` - - + + a - + b @@ -5431,8 +5431,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{array}{rcl}a&=&b\\end{array}'), ` - - + + a @@ -5454,8 +5454,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{array}{rcl}a&=&b\\\\c&=&d\\end{array}'), ` - - + + a @@ -5466,7 +5466,7 @@ describe('Environments', () => { b - + c @@ -5488,8 +5488,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{c}a\\end{darray}'), ` - - + + a @@ -5505,13 +5505,13 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{c}a\\\\b\\end{darray}'), ` - - + + a - + b @@ -5527,8 +5527,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{rcl}a&=&b\\end{darray}'), ` - - + + a @@ -5550,8 +5550,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{rcl}a&=&b\\\\c&=&d\\end{darray}'), ` - - + + a @@ -5562,7 +5562,7 @@ describe('Environments', () => { b - + c @@ -5584,8 +5584,8 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{array}{rcl}a&{}{b}&c\\begin{array}{cc}f&h\\\\g\\end{array}\\end{array}'), ` - - + + a @@ -5597,8 +5597,8 @@ describe('Environments', () => { c - - + + f @@ -5606,7 +5606,7 @@ describe('Environments', () => { h - + g @@ -5710,7 +5710,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{c}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -5736,7 +5736,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a&\\breakAlign{c}{t}=&b\\end{eqnarray}'), ` - + a @@ -5762,7 +5762,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -5788,7 +5788,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{t}a&=&b\\\\\\breakAlign{r}{t}c&=&d\\end{eqnarray}'), ` - + a @@ -5828,7 +5828,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{tbmc}a&=&b\\end{eqnarray}'), ` - + a @@ -5854,7 +5854,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{t}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -6269,8 +6269,8 @@ describe('Spaces', () => { toXmlMatch( tex2mml('\\begin{array}{cc}a&\\hfil b\\\\d&ccc\\end{array}'), ` - - + + a @@ -6278,7 +6278,7 @@ describe('Spaces', () => { b - + d @@ -6299,8 +6299,8 @@ describe('Spaces', () => { toXmlMatch( tex2mml('\\begin{array}{cc}a&\\hfill b\\\\d&ccc\\end{array}'), ` - - + + a @@ -6308,7 +6308,7 @@ describe('Spaces', () => { b - + d @@ -6329,8 +6329,8 @@ describe('Spaces', () => { toXmlMatch( tex2mml('\\begin{array}{cc}a&\\hfilll b\\\\d&ccc\\end{array}'), ` - - + + a @@ -6338,7 +6338,7 @@ describe('Spaces', () => { b - + d @@ -6359,8 +6359,8 @@ describe('Spaces', () => { toXmlMatch( tex2mml('\\begin{array}{l} \\hfil x\\hfil \\end{array}'), ` - - + + x @@ -6399,10 +6399,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left< a \\right>'), ` - - + + a - + ` ); @@ -6427,10 +6427,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\lt a \\right\\gt'), ` - - + + a - + ` ); @@ -6475,10 +6475,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\lmoustache a \\right\\rmoustache'), ` - - + + a - + ` ); @@ -6503,10 +6503,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\lgroup a \\right\\rgroup'), ` - - + + a - + ` ); @@ -6531,10 +6531,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\arrowvert a \\right\\Arrowvert'), ` - - + + a - + ` ); @@ -6559,10 +6559,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\bracevert a \\right\\Vert'), ` - - + + a - + ` ); @@ -6587,10 +6587,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\updownarrow a \\right\\Updownarrow'), ` - - + + a - + ` ); @@ -6615,10 +6615,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left/ a \\right\\backslash'), ` - - / + + / a - \\ + \\ ` ); @@ -6643,10 +6643,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\Uparrow a \\right\\Downarrow'), ` - - + + a - + ` ); @@ -6671,10 +6671,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\rangle a \\right\\langle'), ` - - + + a - + ` ); @@ -6699,10 +6699,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\rbrace a \\right\\lbrace'), ` - - } + + } a - { + { ` ); @@ -6727,10 +6727,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\rceil a \\right\\lceil'), ` - - + + a - + ` ); @@ -6755,10 +6755,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\rfloor a \\right\\lfloor'), ` - - + + a - + ` ); @@ -6783,10 +6783,10 @@ describe('Delimiters', () => { toXmlMatch( tex2mml('\\left\\lbrack a \\right\\rbrack'), ` - - [ + + [ a - ] + ] ` ); @@ -6874,9 +6874,9 @@ describe('Named Functions', () => { ` sin - - ( - ) + + ( + ) ` ); @@ -9200,10 +9200,10 @@ describe('Dots', () => { tex2mml('\\dots\\left( A\\right)'), ` - - ( + + ( A - ) + ) ` ); @@ -10501,7 +10501,7 @@ describe('Special macros', () => { tex2mml('A \\ B'), ` A -   +   B ` ); @@ -10514,7 +10514,7 @@ describe('Special macros', () => { tex2mml('A \\ B'), ` A -   +   B ` ); @@ -11439,12 +11439,12 @@ describe('Linebreaks', () => { tex2mml('\\array{a\\cr b}'), ` - + a - + b @@ -11461,12 +11461,12 @@ describe('Linebreaks', () => { tex2mml('\\array{a\\\\[1cm] b}'), ` - + a - + b @@ -12320,16 +12320,16 @@ describe('Spacing', () => { toXmlMatch( tex2mml('\\left. a \\nonscript\\;\\middle|\\nonscript\\; b \\right.'), ` - - + + a - | + | b - + ` ); @@ -12344,14 +12344,14 @@ describe('Spacing', () => { X - - + + a - | + | b - + @@ -12528,7 +12528,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a\\label{A}\\\\c\\label{B}\\end{eqnarray}'), ` - + ( @@ -12624,7 +12624,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a\\\\c\\nonumber\\end{eqnarray}'), ` - + ( @@ -12660,8 +12660,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{rcl}a & b &c\\\\ d & e & f\\end{array}'), ` - - + + a @@ -12672,7 +12672,7 @@ describe('Complete Array', () => { c - + d @@ -12694,8 +12694,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r|c|l}a & b & c\\\\d & e & f\\end{array}'), ` - - + + a @@ -12706,7 +12706,7 @@ describe('Complete Array', () => { c - + d @@ -12728,8 +12728,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r:c:l}a & b &c\\\\ d & e & f\\end{array}'), ` - - + + a @@ -12740,7 +12740,7 @@ describe('Complete Array', () => { c - + d @@ -12762,7 +12762,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r@{h}c@{h}l}a & b &c\\\\ d & e & f\\end{array}'), ` - + a @@ -12808,7 +12808,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r!{h}c!{h}l}a & b &c\\\\ d & e & f\\end{array}'), ` - + a @@ -12854,7 +12854,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{p{1cm}p{1cm}p{1cm}}a & b &c\\\\ d & e & f\\end{array}'), ` - + @@ -12900,7 +12900,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{m{1cm}m{1cm}m{1cm}}a & b &c\\\\ d & e & f\\end{array}'), ` - + @@ -12946,7 +12946,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{b{1cm}b{1cm}b{1cm}}a & b &c\\\\ d & e & f\\end{array}'), ` - + @@ -12992,7 +12992,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{>{A}rcl}a & b &c\\\\ d & e & f\\end{array}'), ` - + A @@ -13028,7 +13028,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r<{A}cl}a & b &c\\\\ d & e & f\\end{array}'), ` - + a @@ -13064,7 +13064,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{>{A}c}a \\\\ d\\end{array}'), ` - + A @@ -13088,7 +13088,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{c<{A}}a\\\\ d \\end{array}'), ` - + a @@ -13112,7 +13112,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{c@{h}}a\\\\ d \\end{array}'), ` - + a @@ -13140,7 +13140,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{c@{\\alpha}c}a&\\hfill&b\\\\ d&\\hfill&e \\end{array}'), ` - + a @@ -13176,8 +13176,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{cw{c}{1cm}c}a&b&c\\\\ d&e&f \\end{array}'), ` - - + + a @@ -13190,7 +13190,7 @@ describe('Complete Array', () => { c - + d @@ -13214,8 +13214,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{cW{c}{1cm}c}a&b&c\\\\ d&e&f \\end{array}'), ` - - + + a @@ -13228,7 +13228,7 @@ describe('Complete Array', () => { c - + d @@ -13252,8 +13252,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{*{2}rc}a & b & c\\\\d & e & f\\end{array}'), ` - - + + a @@ -13264,7 +13264,7 @@ describe('Complete Array', () => { c - + d @@ -13286,8 +13286,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r*{2}c}a & b & c\\\\d & e & f\\end{array}'), ` - - + + a @@ -13298,7 +13298,7 @@ describe('Complete Array', () => { c - + d @@ -13320,7 +13320,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r*{2}|c}a& b & c\\\\d & e & f\\end{array}'), ` - + a @@ -13365,7 +13365,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r*{2}|c}a {\\hbox{(3)}}& b & c\\\\d & e & f\\end{array}'), ` - + a @@ -13412,13 +13412,13 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r*{2}|c}a {\\begin{array}{c}Q\\end{array}}& b & c\\\\d & e & f\\end{array}'), ` - + a - - + + Q @@ -13465,12 +13465,12 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{r*{2}|c}a \\begin{array}{c}Q\\end{array}& b & c\\\\d & e & f\\end{array}'), ` - + a - - + + Q @@ -13517,7 +13517,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{c@{\\alpha}c}a&&b\\\\ d&&e\\hfil \\end{array}'), ` - + a @@ -13560,8 +13560,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{rcl}a & b &c\\\\[2cm] d & e & f\\\\[2cm] \\end{array}'), ` - - + + a @@ -13572,7 +13572,7 @@ describe('Complete Array', () => { c - + d @@ -13594,7 +13594,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{eqnarray}{rcl}a & b \\\\d&c&c&c \\\\\\end{eqnarray}'), ` - + @@ -13635,13 +13635,13 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{|c|}\\hline a\\\\\\hline b\\\\\\hline\\end{array}'), ` - - + + a - + b @@ -13657,7 +13657,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{!{a}|@{b}c} X\\end{array}'), ` - + a @@ -13681,7 +13681,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{@{}|!{x}c} X \\end{array}'), ` - + @@ -13703,7 +13703,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{@{x}p{1em}m{1em}} X & Y \\end{array}'), ` - + x @@ -13730,8 +13730,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{cc@{x}} X & Y \\end{array}'), ` - - + + X @@ -13753,8 +13753,8 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{cc|c} X & Y & Z \\end{array}'), ` - - + + X @@ -13776,7 +13776,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{array}{> {x} c} X \\end{array}'), ` - + x @@ -13925,15 +13925,15 @@ describe('User Defined Macros', () => { toXmlMatch( tex2mml('\\left(A\\middle|B\\color{red}\\right)'), ` - - ( + + ( A - | + | B - ) + ) ` ); @@ -13945,15 +13945,15 @@ describe('User Defined Macros', () => { toXmlMatch( tex2mml('\\left(A\\color{red}\\middle|B\\right)'), ` - - ( + + ( A - | + | B - ) + ) ` ); @@ -14019,7 +14019,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix} a & b \\\\ c & d \\end{smallmatrix}'), ` - + @@ -14049,7 +14049,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix} a & b \\\\ c & d \\end{pmatrix}'), ` - + ( @@ -14081,9 +14081,9 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{crampedsubarray}{cc} a & b \\\\ c & d \\end{crampedsubarray}'), ` - + - + a @@ -14091,7 +14091,7 @@ describe('User Defined Environments', () => { b - + c @@ -14111,7 +14111,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{gather}a\\end{gather}'), ` - + a @@ -14141,7 +14141,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{mmtool} a & test a\\\\ b & test b \\end{mmtool}'), ` - + { @@ -14173,7 +14173,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{eqntest} a & b \\end{eqntest}'), ` - + a @@ -14205,7 +14205,7 @@ describe('Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{eqntest} a & b \\end{eqntest}'), ` - + ( @@ -14232,7 +14232,7 @@ describe('Tagged Environments', () => { toXmlMatch( tex2mml('\\begin{equation} x \\end{equation}'), ` - + ( diff --git a/testsuite/tests/input/tex/Bboldx.test.ts b/testsuite/tests/input/tex/Bboldx.test.ts index a45fd2690..856f9efcc 100644 --- a/testsuite/tests/input/tex/Bboldx.test.ts +++ b/testsuite/tests/input/tex/Bboldx.test.ts @@ -17,7 +17,7 @@ describe('Bboldx', () => { tex2mml('\\mathbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ @@ -32,7 +32,7 @@ describe('Bboldx', () => { tex2mml('\\mathbfbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ @@ -479,7 +479,7 @@ describe('Bboldx light', () => { tex2mml('\\mathbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ @@ -494,7 +494,7 @@ describe('Bboldx light', () => { tex2mml('\\mathbfbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ @@ -534,7 +534,7 @@ describe('Bboldx bfbb', () => { tex2mml('\\mathbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ @@ -549,7 +549,7 @@ describe('Bboldx bfbb', () => { tex2mml('\\mathbfbb{Aa\u{393}\u{3B3}}'), ` - Aa + Aa Γ γ diff --git a/testsuite/tests/input/tex/Begingroup.test.ts b/testsuite/tests/input/tex/Begingroup.test.ts index 5636c39f0..263a30103 100644 --- a/testsuite/tests/input/tex/Begingroup.test.ts +++ b/testsuite/tests/input/tex/Begingroup.test.ts @@ -116,20 +116,20 @@ describe('Begingroup', () => { toXmlMatch( tex2mml('\\let\\x=\\| \\left\\x A\\right\\x \\begingroup \\let\\x=| \\left\\x B \\right\\x \\endgroup \\left\\x C \\right\\x'), ` - - + + A - + - - | + + | B - | + | - - + + C - + ` ); @@ -141,30 +141,30 @@ describe('Begingroup', () => { toXmlMatch( tex2mml('\\let\\x=\\| \\left\\x A\\right\\x \\begingroup \\let\\x=| \\left\\x B \\right\\x \\begingroup \\let\\x=( \\left\\x C \\right\\x \\endgroup \\left\\x D \\right\\x \\endgroup \\left\\x E \\right\\x'), ` - - + + A - + - - | + + | B - | + | - - ( + + ( C - ( + ( - - | + + | D - | + | - - + + E - + ` ); diff --git a/testsuite/tests/input/tex/Braket.test.ts b/testsuite/tests/input/tex/Braket.test.ts index 17d98f21e..01c30b930 100644 --- a/testsuite/tests/input/tex/Braket.test.ts +++ b/testsuite/tests/input/tex/Braket.test.ts @@ -53,15 +53,15 @@ describe('Braket', () => { tex2mml('\\Bra{\\frac{x}{y}}'), ` - - + + x y - | + | ` @@ -112,15 +112,15 @@ describe('Braket', () => { tex2mml('\\Ket{\\frac{x}{y}}'), ` - - | + + | x y - + ` @@ -232,22 +232,22 @@ describe('Braket', () => { tex2mml('\\Ketbra{\\frac{x}{y}}{z}'), ` - - | + + | x y - + - - + + z - | + | ` @@ -339,7 +339,7 @@ describe('Braket', () => { { - + x y diff --git a/testsuite/tests/input/tex/Bussproofs.test.ts b/testsuite/tests/input/tex/Bussproofs.test.ts index 7028d66ce..eed7ddbb1 100644 --- a/testsuite/tests/input/tex/Bussproofs.test.ts +++ b/testsuite/tests/input/tex/Bussproofs.test.ts @@ -16,7 +16,7 @@ describe('BussproofsRegInf', () => { toXmlMatch( tex2mml('\\begin{prooftree}\\AxiomC{A}\\end{prooftree}'), ` - + A @@ -33,7 +33,7 @@ describe('BussproofsRegInf', () => { toXmlMatch( tex2mml('\\begin{prooftree}\\AxiomC{A}\\UnaryInfC{B}\\end{prooftree}'), ` - + @@ -71,7 +71,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\AxiomC{B}\\BinaryInfC{C}\\end{prooftree}' ), ` - + @@ -117,7 +117,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\AxiomC{B}\\AxiomC{C}\\TrinaryInfC{D}\\end{prooftree}' ), ` - + @@ -171,7 +171,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\AxiomC{B}\\AxiomC{C}\\AxiomC{D}\\QuaternaryInfC{E}\\end{prooftree}' ), ` - + @@ -233,7 +233,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\AxiomC{B}\\AxiomC{C}\\AxiomC{D}\\AxiomC{E}\\QuinaryInfC{F}\\end{prooftree}' ), ` - + @@ -303,7 +303,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\LeftLabel{L}\\UnaryInfC{B}\\end{prooftree}' ), ` - + L @@ -348,7 +348,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\RightLabel{R}\\UnaryInfC{B}\\end{prooftree}' ), ` - + @@ -393,7 +393,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AxiomC{A}\\LeftLabel{L}\\RightLabel{R}\\UnaryInfC{B}\\end{prooftree}' ), ` - + L @@ -441,7 +441,7 @@ describe('BussproofsRegInf', () => { toXmlMatch( tex2mml('\\begin{prooftree}\\AXC{A}\\end{prooftree}'), ` - + A @@ -458,7 +458,7 @@ describe('BussproofsRegInf', () => { toXmlMatch( tex2mml('\\begin{prooftree}\\AXC{A}\\UIC{B}\\end{prooftree}'), ` - + @@ -494,7 +494,7 @@ describe('BussproofsRegInf', () => { toXmlMatch( tex2mml('\\begin{prooftree}\\AXC{A}\\AXC{B}\\BIC{C}\\end{prooftree}'), ` - + @@ -540,7 +540,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AXC{A}\\AXC{B}\\AXC{C}\\TIC{D}\\end{prooftree}' ), ` - + @@ -594,7 +594,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AXC{A}\\LeftLabel{L}\\UIC{B}\\end{prooftree}' ), ` - + L @@ -639,7 +639,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AXC{A}\\RightLabel{R}\\UIC{B}\\end{prooftree}' ), ` - + @@ -684,7 +684,7 @@ describe('BussproofsRegInf', () => { '\\begin{prooftree}\\AXC{A}\\LeftLabel{L}\\RightLabel{R}\\UIC{B}\\end{prooftree}' ), ` - + L @@ -744,7 +744,7 @@ describe('BussproofsRegProofs', () => { ), ` - + @@ -859,7 +859,7 @@ describe('BussproofsRegProofs', () => { '\\begin{prooftree}\\AxiomC{D}\\AxiomC{A}\\AxiomC{B}\\AxiomC{R}$\\alpha$\\BinaryInfC{$C \\rightarrow D \\rightarrow Q$}\\BinaryInfC{E}\\BinaryInfC{F}\\end{prooftree}' ), ` - + $ α $ @@ -980,7 +980,7 @@ describe('BussproofsRegProofs', () => { ` - + @@ -1174,7 +1174,7 @@ describe('BussproofsRegProofs', () => { ` - + @@ -1396,7 +1396,7 @@ describe('BussproofsRegProofs', () => { ` - + QERE @@ -1616,7 +1616,7 @@ describe('BussproofsRegProofs', () => { ` - + DD @@ -1844,7 +1844,7 @@ describe('BussproofsRegProofs', () => { ` - + @@ -2137,7 +2137,7 @@ describe('BussproofsRegProofs', () => { - + @@ -2237,7 +2237,7 @@ describe('BussproofsRegProofs', () => { - + Q 2 @@ -2336,7 +2336,7 @@ describe('BussproofsRegProofs', () => { Rit - + 2 @@ -2402,7 +2402,7 @@ describe('BussproofsRegProofs', () => { - + @@ -2433,7 +2433,7 @@ describe('BussproofsRegProofs', () => { - + @@ -2473,7 +2473,7 @@ describe('BussproofsRegProofs', () => { - + Q 2 @@ -2632,7 +2632,7 @@ describe('BussproofsRegProofs', () => { Rit - + 2 @@ -2698,7 +2698,7 @@ describe('BussproofsRegProofs', () => { - + @@ -2728,7 +2728,7 @@ describe('BussproofsRegProofs', () => { ` - + BBB diff --git a/testsuite/tests/input/tex/Cases.test.ts b/testsuite/tests/input/tex/Cases.test.ts index 6dfc082bb..1e46ec267 100644 --- a/testsuite/tests/input/tex/Cases.test.ts +++ b/testsuite/tests/input/tex/Cases.test.ts @@ -18,7 +18,7 @@ describe('Cases', () => { tex2mml('\\begin{numcases}{f(x)=} 1 & if $x > 0$ \\\\ 0 & otherwise \\end{numcases}'), ` - + ( 1 @@ -37,7 +37,7 @@ describe('Cases', () => { - + ( 1 @@ -63,7 +63,7 @@ describe('Cases', () => { - + ( 2 @@ -88,7 +88,7 @@ describe('Cases', () => { - + ( 1 @@ -139,7 +139,7 @@ describe('Cases', () => { - + ( 2 @@ -170,7 +170,7 @@ describe('Cases', () => { tex2mml('\\begin{subnumcases}{f(x)=} 1 & if $x > 0$ \\\\ 0 & otherwise \\end{subnumcases}'), ` - + ( 1a @@ -189,7 +189,7 @@ describe('Cases', () => { - + ( 1a @@ -215,7 +215,7 @@ describe('Cases', () => { - + ( 1b @@ -240,7 +240,7 @@ describe('Cases', () => { - + ( 1a @@ -291,7 +291,7 @@ describe('Cases', () => { - + ( 1b @@ -322,7 +322,7 @@ describe('Cases', () => { tex2mml('\\begin{numcases}{A=} 1 & if {x\\\\y}\\$ \\end{numcases}'), ` - + ( 1 @@ -338,7 +338,7 @@ describe('Cases', () => { - + ( 1 @@ -363,7 +363,7 @@ describe('Cases', () => { - + ( 1 @@ -423,8 +423,8 @@ describe('Cases', () => { toXmlMatch( tex2mml('\\begin{array}{cc} x & y \\end{array}'), ` - - + + x @@ -444,7 +444,7 @@ describe('Cases', () => { tex2mml('\\begin{numcases}{A=} x\\tag{A} & y \\end{numcases}'), ` - + ( A @@ -460,7 +460,7 @@ describe('Cases', () => { - + ( A @@ -485,7 +485,7 @@ describe('Cases', () => { - + ( A diff --git a/testsuite/tests/input/tex/Colortbl.test.ts b/testsuite/tests/input/tex/Colortbl.test.ts index 1a0244457..d25ad1479 100644 --- a/testsuite/tests/input/tex/Colortbl.test.ts +++ b/testsuite/tests/input/tex/Colortbl.test.ts @@ -19,8 +19,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\cellcolor{red} b \\\\ \\cellcolor{yellow} c & d \\end{array}'), ` - - + + a @@ -28,7 +28,7 @@ describe('Colortbl', () => { b - + c @@ -47,8 +47,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & b \\cellcolor{red} \\end{array}'), ` - - + + a @@ -67,8 +67,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & b \\\\ \\rowcolor{yellow} c & d \\end{array}'), ` - - + + a @@ -76,7 +76,7 @@ describe('Colortbl', () => { b - + c @@ -102,8 +102,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\columncolor{yellow} b \\\\ c & d \\end{array}'), ` - - + + a @@ -111,7 +111,7 @@ describe('Colortbl', () => { b - + c @@ -137,8 +137,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{c>{\\columncolor{yellow}}c} a & b \\\\ c & d \\end{array}'), ` - - + + a @@ -146,7 +146,7 @@ describe('Colortbl', () => { b - + c @@ -165,8 +165,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{c>{\\cellcolor{yellow}}c} a & b \\\\ c & d \\end{array}'), ` - - + + a @@ -174,7 +174,7 @@ describe('Colortbl', () => { b - + c @@ -193,8 +193,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & b \\\\ \\rowcolor{red} c & \\cellcolor{yellow} d \\end{array}'), ` - - + + a @@ -202,7 +202,7 @@ describe('Colortbl', () => { b - + c @@ -221,8 +221,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\columncolor{red} b \\\\ c & \\cellcolor{yellow} d \\end{array}'), ` - - + + a @@ -230,7 +230,7 @@ describe('Colortbl', () => { b - + c @@ -249,8 +249,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\columncolor{red} b \\\\ \\rowcolor{yellow} c & d \\end{array}'), ` - - + + a @@ -258,7 +258,7 @@ describe('Colortbl', () => { b - + c @@ -277,8 +277,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\columncolor{red} b \\\\ \\rowcolor{yellow} c & \\cellcolor{green} d \\end{array}'), ` - - + + a @@ -286,7 +286,7 @@ describe('Colortbl', () => { b - + c @@ -305,8 +305,8 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{cc} a & \\columncolor{red}[ignore][ignore] b \\\\ c & d \\end{array}'), ` - - + + a @@ -314,7 +314,7 @@ describe('Colortbl', () => { b - + c @@ -347,9 +347,9 @@ describe('Colortbl', () => { toXmlMatch( tex2mml('\\begin{array}{|c|} \\cellcolor{red} a \\end{array}'), ` - + - + a @@ -369,7 +369,7 @@ describe('Colortbl', () => { ( - + a @@ -388,7 +388,7 @@ describe('Colortbl', () => { tex2mml('\\matrix{ \\cellcolor[rgb]{1,0,0} a }'), ` - + a @@ -416,7 +416,7 @@ describe('Colortbl', () => { tex2mml('\\matrix{ \\cellcolor[rgb]{1,0,0} a }'), ` - + a diff --git a/testsuite/tests/input/tex/Empheq.test.ts b/testsuite/tests/input/tex/Empheq.test.ts index 29ac1039b..8e7f1129e 100644 --- a/testsuite/tests/input/tex/Empheq.test.ts +++ b/testsuite/tests/input/tex/Empheq.test.ts @@ -253,7 +253,7 @@ describe('Empheq', () => { tex2mml('\\begin{numcases}{A=\\label{test}} a&=b \\end{numcases}'), ` - + ( 1 @@ -269,7 +269,7 @@ describe('Empheq', () => { - + ( 1 @@ -294,7 +294,7 @@ describe('Empheq', () => { - + ( 1 @@ -499,7 +499,7 @@ describe('Empheq', () => { tex2mml('\\begin{empheq}{alignat=2} a & b & c & d \\end{empheq}'), ` - + ( 1 diff --git a/testsuite/tests/input/tex/Mathtools.test.ts b/testsuite/tests/input/tex/Mathtools.test.ts index e27c549bf..b1974e6d7 100644 --- a/testsuite/tests/input/tex/Mathtools.test.ts +++ b/testsuite/tests/input/tex/Mathtools.test.ts @@ -275,7 +275,7 @@ describe('Mathtools Spacing Control', () => { 2 - + x 2 @@ -290,7 +290,7 @@ describe('Mathtools Spacing Control', () => { - + x 2 @@ -311,7 +311,7 @@ describe('Mathtools Spacing Control', () => { - + x 2 @@ -331,7 +331,7 @@ describe('Mathtools Spacing Control', () => { - + x 2 @@ -357,7 +357,7 @@ describe('Mathtools Spacing Control', () => { - + x 2 @@ -379,8 +379,8 @@ describe('Mathtools Spacing Control', () => { - - + + x @@ -388,7 +388,7 @@ describe('Mathtools Spacing Control', () => { - + y @@ -514,7 +514,7 @@ describe('Mathtools Tagging', () => { E = m - + c 2 @@ -542,7 +542,7 @@ describe('Mathtools Tagging', () => { E = m - + c 2 @@ -591,7 +591,7 @@ describe('Mathtools Tagging', () => { E = m - + c 2 @@ -608,7 +608,7 @@ describe('Mathtools Tagging', () => { toXmlMatch( tex2mml('\\begin{align}E=mc^2\\label{test}\\tag*{\\textsf{A}}\\\\ \\refeq{test}\\end{align}'), ` - + \\textsf{A} @@ -617,7 +617,7 @@ describe('Mathtools Tagging', () => { E = m - + c 2 @@ -673,10 +673,10 @@ describe('Mathtools Symbols', () => { toXmlMatch( tex2mml('\\left\\lparen X \\right\\rparen'), ` - - ( + + ( X - ) + ) ` ); @@ -1462,8 +1462,8 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{matrix*} -1 & 3 \\\\ 2 & -4 \\end{matrix*}'), ` - - + + 1 @@ -1472,7 +1472,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1492,8 +1492,8 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{matrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{matrix*}'), ` - - + + 1 @@ -1502,7 +1502,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1522,8 +1522,8 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{matrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{matrix*}'), ` - - + + 1 @@ -1532,7 +1532,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1552,8 +1552,8 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{matrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{matrix*}'), ` - - + + 1 @@ -1562,7 +1562,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1582,10 +1582,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix*} -1 & 3 \\\\ 2 & -4 \\end{pmatrix*}'), ` - + ( - + 1 @@ -1594,7 +1594,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1616,10 +1616,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{pmatrix*}'), ` - + ( - + 1 @@ -1628,7 +1628,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1650,10 +1650,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{pmatrix*}'), ` - + ( - + 1 @@ -1662,7 +1662,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1684,10 +1684,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{pmatrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{pmatrix*}'), ` - + ( - + 1 @@ -1696,7 +1696,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1718,10 +1718,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bmatrix*} -1 & 3 \\\\ 2 & -4 \\end{bmatrix*}'), ` - + [ - + 1 @@ -1730,7 +1730,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1752,10 +1752,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bmatrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{bmatrix*}'), ` - + [ - + 1 @@ -1764,7 +1764,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1786,10 +1786,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bmatrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{bmatrix*}'), ` - + [ - + 1 @@ -1798,7 +1798,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1820,10 +1820,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bmatrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{bmatrix*}'), ` - + [ - + 1 @@ -1832,7 +1832,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1854,10 +1854,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bmatrix*} -1 & 3 \\\\ 2 & -4 \\end{Bmatrix*}'), ` - + { - + 1 @@ -1866,7 +1866,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1888,10 +1888,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bmatrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{Bmatrix*}'), ` - + { - + 1 @@ -1900,7 +1900,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1922,10 +1922,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bmatrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{Bmatrix*}'), ` - + { - + 1 @@ -1934,7 +1934,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1956,10 +1956,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bmatrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{Bmatrix*}'), ` - + { - + 1 @@ -1968,7 +1968,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -1990,10 +1990,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vmatrix*} -1 & 3 \\\\ 2 & -4 \\end{vmatrix*}'), ` - + | - + 1 @@ -2002,7 +2002,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2024,10 +2024,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vmatrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{vmatrix*}'), ` - + | - + 1 @@ -2036,7 +2036,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2058,10 +2058,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vmatrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{vmatrix*}'), ` - + | - + 1 @@ -2070,7 +2070,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2092,10 +2092,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vmatrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{vmatrix*}'), ` - + | - + 1 @@ -2104,7 +2104,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2126,10 +2126,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vmatrix*} -1 & 3 \\\\ 2 & -4 \\end{Vmatrix*}'), ` - + - + 1 @@ -2138,7 +2138,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2160,10 +2160,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vmatrix*}[l] -1 & 3 \\\\ 2 & -4 \\end{Vmatrix*}'), ` - + - + 1 @@ -2172,7 +2172,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2194,10 +2194,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vmatrix*}[c] -1 & 3 \\\\ 2 & -4 \\end{Vmatrix*}'), ` - + - + 1 @@ -2206,7 +2206,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2228,10 +2228,10 @@ describe('Mathtools Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vmatrix*}[r] -1 & 3 \\\\ 2 & -4 \\end{Vmatrix*}'), ` - + - + 1 @@ -2240,7 +2240,7 @@ describe('Mathtools Matrix Environments', () => { 3 - + 2 @@ -2271,9 +2271,9 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix*} -a & b \\\\ c & -d \\end{smallmatrix*}'), ` - + - + a @@ -2282,7 +2282,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2303,9 +2303,9 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix*}[l] -a & b \\\\ c & -d \\end{smallmatrix*}'), ` - + - + a @@ -2314,7 +2314,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2335,9 +2335,9 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix*}[c] -a & b \\\\ c & -d \\end{smallmatrix*}'), ` - + - + a @@ -2346,7 +2346,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2367,9 +2367,9 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix*}[r] -a & b \\\\ c & -d \\end{smallmatrix*}'), ` - + - + a @@ -2378,7 +2378,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2399,11 +2399,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{psmallmatrix*} -a & b \\\\ c & -d \\end{psmallmatrix*}'), ` - + ( - + a @@ -2412,7 +2412,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2435,11 +2435,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{psmallmatrix*}[l] -a & b \\\\ c & -d \\end{psmallmatrix*}'), ` - + ( - + a @@ -2448,7 +2448,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2471,11 +2471,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{psmallmatrix*}[c] -a & b \\\\ c & -d \\end{psmallmatrix*}'), ` - + ( - + a @@ -2484,7 +2484,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2507,11 +2507,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{psmallmatrix*}[r] -a & b \\\\ c & -d \\end{psmallmatrix*}'), ` - + ( - + a @@ -2520,7 +2520,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2543,11 +2543,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bsmallmatrix*} -a & b \\\\ c & -d \\end{bsmallmatrix*}'), ` - + [ - + a @@ -2556,7 +2556,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2579,11 +2579,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bsmallmatrix*}[l] -a & b \\\\ c & -d \\end{bsmallmatrix*}'), ` - + [ - + a @@ -2592,7 +2592,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2615,11 +2615,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bsmallmatrix*}[c] -a & b \\\\ c & -d \\end{bsmallmatrix*}'), ` - + [ - + a @@ -2628,7 +2628,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2651,11 +2651,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bsmallmatrix*}[r] -a & b \\\\ c & -d \\end{bsmallmatrix*}'), ` - + [ - + a @@ -2664,7 +2664,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2687,11 +2687,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bsmallmatrix*} -a & b \\\\ c & -d \\end{Bsmallmatrix*}'), ` - + { - + a @@ -2700,7 +2700,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2723,11 +2723,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bsmallmatrix*}[l] -a & b \\\\ c & -d \\end{Bsmallmatrix*}'), ` - + { - + a @@ -2736,7 +2736,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2759,11 +2759,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bsmallmatrix*}[c] -a & b \\\\ c & -d \\end{Bsmallmatrix*}'), ` - + { - + a @@ -2772,7 +2772,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2795,11 +2795,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bsmallmatrix*}[r] -a & b \\\\ c & -d \\end{Bsmallmatrix*}'), ` - + { - + a @@ -2808,7 +2808,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2831,11 +2831,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vsmallmatrix*} -a & b \\\\ c & -d \\end{vsmallmatrix*}'), ` - + | - + a @@ -2844,7 +2844,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2867,11 +2867,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vsmallmatrix*}[l] -a & b \\\\ c & -d \\end{vsmallmatrix*}'), ` - + | - + a @@ -2880,7 +2880,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2903,11 +2903,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vsmallmatrix*}[c] -a & b \\\\ c & -d \\end{vsmallmatrix*}'), ` - + | - + a @@ -2916,7 +2916,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2939,11 +2939,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vsmallmatrix*}[r] -a & b \\\\ c & -d \\end{vsmallmatrix*}'), ` - + | - + a @@ -2952,7 +2952,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -2975,11 +2975,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vsmallmatrix*} -a & b \\\\ c & -d \\end{Vsmallmatrix*}'), ` - + - + a @@ -2988,7 +2988,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -3011,11 +3011,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vsmallmatrix*}[l] -a & b \\\\ c & -d \\end{Vsmallmatrix*}'), ` - + - + a @@ -3024,7 +3024,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -3047,11 +3047,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vsmallmatrix*}[c] -a & b \\\\ c & -d \\end{Vsmallmatrix*}'), ` - + - + a @@ -3060,7 +3060,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -3083,11 +3083,11 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vsmallmatrix*}[r] -a & b \\\\ c & -d \\end{Vsmallmatrix*}'), ` - + - + a @@ -3096,7 +3096,7 @@ describe('Mathtools Small Matrix Environments', () => { b - + c @@ -3119,7 +3119,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix} -a & b \\\\ c & -d \\end{smallmatrix}'), ` - + @@ -3151,7 +3151,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{smallmatrix} -a & b \\\\ c & -d \\end{smallmatrix}'), ` - + @@ -3183,7 +3183,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{psmallmatrix} -a & b \\\\ c & -d \\end{psmallmatrix}'), ` - + ( @@ -3219,7 +3219,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{bsmallmatrix} -a & b \\\\ c & -d \\end{bsmallmatrix}'), ` - + [ @@ -3255,7 +3255,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Bsmallmatrix} -a & b \\\\ c & -d \\end{Bsmallmatrix}'), ` - + { @@ -3291,7 +3291,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{vsmallmatrix} -a & b \\\\ c & -d \\end{vsmallmatrix}'), ` - + | @@ -3327,7 +3327,7 @@ describe('Mathtools Small Matrix Environments', () => { toXmlMatch( tex2mml('\\begin{Vsmallmatrix} -a & b \\\\ c & -d \\end{Vsmallmatrix}'), ` - + @@ -3376,7 +3376,7 @@ describe('Mathtools More Environments', () => { ` A = - + @@ -3415,7 +3415,7 @@ describe('Mathtools More Environments', () => { '\\begin{multlined}[b][7cm]\\framebox[4cm]{first}\\\\\\framebox[4cm]{last}\\end{multlined} = B' ), ` - + @@ -3455,7 +3455,7 @@ describe('Mathtools More Environments', () => { '\\begin{multlined}[c][7cm]\\framebox[4cm]{first}\\\\\\framebox[4cm]{last}\\end{multlined} = B' ), ` - + @@ -3495,7 +3495,7 @@ describe('Mathtools More Environments', () => { '\\begin{multlined}[t][7cm]\\framebox[4cm]{first}\\\\\\framebox[4cm]{last}\\end{multlined} = B' ), ` - + @@ -3533,7 +3533,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{multlined}[7cm]\\framebox[4cm]{first}\\\\\\framebox[4cm]{last}\\end{multlined}'), ` - + @@ -3578,7 +3578,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + @@ -3645,7 +3645,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + @@ -3735,7 +3735,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{multlined} a \\\\ \\end{multlined}'), ` - + a @@ -3752,7 +3752,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{dcases} 1 & x>0 \\\\ -1 & x\\le 0 \\end{dcases}'), ` - + { @@ -3789,7 +3789,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{dcases*} 1 & if $x>0$ \\\\ -1 & otherwise \\end{dcases*}'), ` - + { @@ -3831,7 +3831,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{rcases} 1 & x>0 \\\\ -1 & x\\le 0 \\end{rcases}'), ` - + @@ -3868,7 +3868,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{rcases*} 1 & if $x>0$ \\\\ -1 & otherwise \\end{rcases*}'), ` - + @@ -3908,7 +3908,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{drcases} 1 & x>0 \\\\ -1 & x\\le 0 \\end{drcases}'), ` - + @@ -3945,7 +3945,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{drcases*} 1 & if $x>0$ \\\\ -1 & otherwise \\end{drcases*}'), ` - + @@ -3987,7 +3987,7 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{cases*} 1 & if $x>0$ \\\\ -1 & otherwise \\end{cases*}'), ` - + { @@ -4035,7 +4035,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + @@ -4099,7 +4099,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + a @@ -4158,7 +4158,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + a @@ -4175,7 +4175,7 @@ describe('Mathtools More Environments', () => { - + x @@ -4199,8 +4199,8 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{lgathered} a+b+c \\\\ d \\end{lgathered}'), ` - - + + a + @@ -4209,7 +4209,7 @@ describe('Mathtools More Environments', () => { c - + d @@ -4225,8 +4225,8 @@ describe('Mathtools More Environments', () => { toXmlMatch( tex2mml('\\begin{rgathered} a+b+c \\\\ d \\end{rgathered}'), ` - - + + a + @@ -4235,7 +4235,7 @@ describe('Mathtools More Environments', () => { c - + d @@ -4259,8 +4259,8 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - - + + @@ -4284,13 +4284,13 @@ describe('Mathtools More Environments', () => { - + - + @@ -4333,8 +4333,8 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - - + + @@ -4362,7 +4362,7 @@ describe('Mathtools More Environments', () => { - + @@ -4372,7 +4372,7 @@ describe('Mathtools More Environments', () => { - + @@ -4435,7 +4435,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + a @@ -4521,7 +4521,7 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - + A @@ -4584,8 +4584,8 @@ describe('Mathtools More Environments', () => { ].join('') ), ` - - + + A @@ -4613,7 +4613,7 @@ describe('Mathtools More Environments', () => { - + @@ -4649,7 +4649,7 @@ describe('Mathtools More Environments', () => { - + C @@ -4714,13 +4714,13 @@ describe('Mathtools Paired Delimiters', () => { tex2mml('\\DeclarePairedDelimiter\\abs{\\lvert}{\\rvert} \\abs*{\\frac{a}{b}}'), ` - - | + + | a b - | + | @@ -4817,7 +4817,7 @@ describe('Mathtools Boxed Equations', () => { toXmlMatch( tex2mml('\\begin{align*}\\Aboxed{ a & = b} \\\\ & = c \\end{align*}'), ` - + @@ -4882,8 +4882,8 @@ describe('Mathtools Boxed Equations', () => { toXmlMatch( tex2mml('\\begin{aligned} & \\Aboxed{ a & = b} \\end{aligned}'), ` - - + + @@ -4934,7 +4934,7 @@ describe('Mathtools Boxed Equations', () => { toXmlMatch( tex2mml('\\MakeAboxedCommand\\Afbox\\fbox \\begin{align}\\Afbox{a &= b}\\end{align}'), ` - + @@ -4985,7 +4985,7 @@ describe('Mathtools Boxed Equations', () => { '\\def\\mybox#1{\\bbox[yellow, 5px, border:2px solid]{#1}}\\MakeAboxedCommand*\\Afbox\\mybox \\begin{align}\\Afbox{a &= b}\\end{align}' ), ` - + @@ -5888,7 +5888,7 @@ describe('Mathtools setoptions', () => { ` a + - + a @@ -5921,7 +5921,7 @@ describe('Mathtools setoptions', () => { ` a + - + a @@ -5952,7 +5952,7 @@ describe('Mathtools setoptions', () => { ].join('') ), ` - + a @@ -5981,7 +5981,7 @@ describe('Mathtools setoptions', () => { ].join('') ), ` - + a @@ -6010,16 +6010,16 @@ describe('Mathtools setoptions', () => { ].join('') ), ` - + ( - + a - + b @@ -6262,10 +6262,10 @@ describe('Mathtools options', () => { x ] - - [ + + [ x - ] + ] @@ -6287,12 +6287,12 @@ describe('Mathtools options', () => { ] | - - | + + | [ x ] - | + | @@ -6318,12 +6318,12 @@ describe('Mathtools options', () => { } ⇐⇒ - - { + + { [ x ] - } + } @@ -6349,7 +6349,7 @@ describe('Mathtools options', () => { toXmlMatch( tex2mml('\\mathtoolsset{multlined-pos={}}\\begin{multlined} a \\end{multlined}'), ` - + a diff --git a/testsuite/tests/input/tex/Mhchem.test.ts b/testsuite/tests/input/tex/Mhchem.test.ts index 92e345a76..ba0fc030c 100644 --- a/testsuite/tests/input/tex/Mhchem.test.ts +++ b/testsuite/tests/input/tex/Mhchem.test.ts @@ -104,8 +104,8 @@ describe('Mhchem0', () => { ] = - - 75.3 + + 75.3   @@ -354,7 +354,7 @@ describe('Mhchem0', () => { Y - + @@ -364,8 +364,8 @@ describe('Mhchem0', () => { - - 99 + + 99 + @@ -393,7 +393,7 @@ describe('Mhchem1', () => { Y - + @@ -403,8 +403,8 @@ describe('Mhchem1', () => { - - 99 + + 99 + @@ -496,7 +496,7 @@ describe('Mhchem1', () => { tex2mml('\\ce{0.5 H2O}'), ` - 0.5 + 0.5 H @@ -1620,8 +1620,8 @@ describe('Mhchem3', () => { 2 - - ( + + ( O @@ -1674,7 +1674,7 @@ describe('Mhchem3', () => { - ) + ) ` @@ -1887,7 +1887,7 @@ describe('Mhchem4', () => { - x + x @@ -2068,7 +2068,7 @@ describe('Mhchem4', () => { ` - β + β @@ -2202,7 +2202,7 @@ describe('Mhchem4', () => { - e + e @@ -2263,7 +2263,7 @@ describe('Mhchem4', () => { - + 6 2 @@ -2308,7 +2308,7 @@ describe('Mhchem5', () => { - i + i @@ -2355,7 +2355,7 @@ describe('Mhchem5', () => { - i + i @@ -2474,7 +2474,7 @@ describe('Mhchem5', () => { ( h P - 12 + 12 ) ` @@ -3016,7 +3016,7 @@ describe('Mhchem6', () => { - 12 + 12 H @@ -3103,7 +3103,7 @@ describe('Mhchem6', () => { - 12 + 12 H @@ -3190,7 +3190,7 @@ describe('Mhchem6', () => { - 12 + 12 H @@ -3568,7 +3568,7 @@ describe('Mhchem7', () => { , - 0.8 + 0.8 @@ -3594,7 +3594,7 @@ describe('Mhchem7', () => { , - 0.2 + 0.2 @@ -4432,7 +4432,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 kJ}'), ` - 123 + 123   kJ @@ -4449,11 +4449,11 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 mm2}'), ` - 123 + 123   - mm + mm 2 @@ -4471,7 +4471,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 J s}'), ` - 123 + 123   J @@ -4492,7 +4492,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 J*s}'), ` - 123 + 123   J @@ -4517,7 +4517,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 kJ/mol}'), ` - 123 + 123   kJ @@ -4538,7 +4538,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 kJ//mol}'), ` - 123 + 123   @@ -4562,7 +4562,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 kJ mol-1}'), ` - 123 + 123   kJ @@ -4570,7 +4570,7 @@ describe('Mhchem9', () => { - mol + mol 1 @@ -4589,7 +4589,7 @@ describe('Mhchem9', () => { tex2mml('\\pu{123 kJ*mol-1}'), ` - 123 + 123   kJ @@ -4601,7 +4601,7 @@ describe('Mhchem9', () => { - mol + mol 1 @@ -4620,10 +4620,10 @@ describe('Mhchem9', () => { tex2mml('\\pu{1.2e3 kJ}'), ` - 1.2 + 1.2 - - 10 + + 10 3 @@ -4650,8 +4650,8 @@ describe('Mhchem9', () => { 2 - - 10 + + 10 3 @@ -4672,10 +4672,10 @@ describe('Mhchem9', () => { tex2mml('\\pu{1.2E3 kJ}'), ` - 1.2 + 1.2 × - - 10 + + 10 3 @@ -4702,8 +4702,8 @@ describe('Mhchem9', () => { 2 × - - 10 + + 10 3 @@ -5018,7 +5018,7 @@ describe('Mhchem-Ams', () => { - x + x @@ -5141,7 +5141,7 @@ describe('Mhchem-Ams', () => { - x + x diff --git a/testsuite/tests/input/tex/Newcommand.test.ts b/testsuite/tests/input/tex/Newcommand.test.ts index 99f5095c9..74878c3a1 100644 --- a/testsuite/tests/input/tex/Newcommand.test.ts +++ b/testsuite/tests/input/tex/Newcommand.test.ts @@ -315,13 +315,13 @@ describe('Newcommand', () => { toXmlMatch( tex2mml('\\let\\lb=\\{\\left\\lb \\frac{1}{2} \\right\\}'), ` - - { + + { 1 2 - } + } ` ); @@ -333,13 +333,13 @@ describe('Newcommand', () => { toXmlMatch( tex2mml('\\let\\lb( \\left\\lb \\frac{1}{2} \\right)'), ` - - ( + + ( 1 2 - ) + ) ` ); @@ -420,17 +420,17 @@ describe('Newcommand', () => { '\\let\\lp(\\let\\rp)\\let\\mp\\rp\\left\\lp \\frac{a}{b}\\middle\\mp c \\right\\rp' ), ` - - ( + + ( a b - ) + ) c - ) + ) ` ); @@ -444,17 +444,17 @@ describe('Newcommand', () => { '\\let\\lp\\langle\\let\\rp\\rangle\\let\\mp\\rp\\left\\lp \\frac{a}{b}\\middle\\mp c \\right\\rp' ), ` - - + + a b - + c - + ` ); @@ -491,7 +491,7 @@ describe('Newcommand', () => { toXmlMatch( tex2mml('\\let\\sqrt\\choose a\\sqrt b'), ` - + ( @@ -847,10 +847,10 @@ describe('Newcommand Ams', () => { toXmlMatch( tex2mml('\\let\\b\\lvert\\let\\lvert\\langle\\left\\b q \\right\\lvert'), ` - - | + + | q - + ` ); @@ -1085,10 +1085,10 @@ describe('Newcommand Overrides', () => { toXmlMatch( tex2mml('\\def\\test{x} \\let\\test=\\| \\left\\test X \\right\\test'), ` - - + + X - + ` ); @@ -1112,10 +1112,10 @@ describe('Newcommand Overrides', () => { toXmlMatch( tex2mml('\\let\\sqrt=\\| \\left\\sqrt X \\right\\sqrt'), ` - - + + X - + ` ); @@ -1154,10 +1154,10 @@ describe('Newcommand Overrides', () => { toXmlMatch( tex2mml('\\let\\test=< \\left\\test X \\right\\test'), ` - - + + X - + ` ); @@ -1195,8 +1195,8 @@ describe('Nested Environments', () => { ].join('') ), ` - - + + a @@ -1204,7 +1204,7 @@ describe('Nested Environments', () => { b - + c @@ -1228,11 +1228,11 @@ describe('Nested Environments', () => { ].join('') ), ` - - + + - - + + a @@ -1240,7 +1240,7 @@ describe('Nested Environments', () => { b - + c diff --git a/testsuite/tests/input/tex/Physics.test.ts b/testsuite/tests/input/tex/Physics.test.ts index 570b14dd1..0ec2cce60 100644 --- a/testsuite/tests/input/tex/Physics.test.ts +++ b/testsuite/tests/input/tex/Physics.test.ts @@ -502,13 +502,13 @@ describe('Physics1_2', () => { toXmlMatch( tex2mml('\\pqty{\\frac{a}{b}}'), ` - - ( + + ( a b - ) + ) ` ); @@ -560,13 +560,13 @@ describe('Physics1_2', () => { toXmlMatch( tex2mml('\\Bqty{\\frac{a}{b}}'), ` - - { + + { a b - } + } ` ); @@ -671,9 +671,9 @@ describe('Physics1_3', () => { toXmlMatch( tex2mml('\\absolutevalue{}'), ` - - | - | + + | + | ` ); @@ -757,9 +757,9 @@ describe('Physics1_3', () => { toXmlMatch( tex2mml('\\norm{}'), ` - - - + + + ` ); @@ -781,8 +781,8 @@ describe('Physics1_4', () => { tex2mml('\\evaluated{x}_0^\\infty'), ` - - + + x @@ -791,10 +791,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -807,8 +807,8 @@ describe('Physics1_4', () => { tex2mml('\\eval{x}_0^\\infty'), ` - - + + x @@ -817,10 +817,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -833,8 +833,8 @@ describe('Physics1_4', () => { tex2mml('\\eval*{x}_0^\\infty'), ` - - + + x @@ -847,10 +847,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -876,7 +876,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -906,7 +906,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -919,8 +919,8 @@ describe('Physics1_4', () => { tex2mml('\\eval*{\\frac{A}{\\frac{A}{\\int x}}}_0^\\infty'), ` - - + + @@ -942,10 +942,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -958,8 +958,8 @@ describe('Physics1_4', () => { tex2mml('\\eval{\\frac{A}{\\frac{A}{\\int x}}}_0^\\infty'), ` - - + + A @@ -977,10 +977,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -1019,7 +1019,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -1054,7 +1054,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -1093,7 +1093,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -1128,7 +1128,7 @@ describe('Physics1_4', () => { | 0 - + ` ); @@ -1141,8 +1141,8 @@ describe('Physics1_4', () => { tex2mml('\\eval_0^\\infty'), ` - - + + @@ -1150,10 +1150,10 @@ describe('Physics1_4', () => { - | + | 0 - + ` ); @@ -1174,9 +1174,9 @@ describe('Physics1_5', () => { ` O - - ( - ) + + ( + ) ` ); @@ -1190,13 +1190,13 @@ describe('Physics1_5', () => { ` O - - ( + + ( x 2 - ) + ) ` ); @@ -1232,8 +1232,8 @@ describe('Physics1_5', () => { ` O - - ( + + ( A @@ -1244,7 +1244,7 @@ describe('Physics1_5', () => { - ) + ) ` ); @@ -1289,12 +1289,12 @@ describe('Physics1_6', () => { toXmlMatch( tex2mml('\\comm{A}{B}'), ` - - [ + + [ A , B - ] + ] ` ); @@ -1306,8 +1306,8 @@ describe('Physics1_6', () => { toXmlMatch( tex2mml('\\comm{\\frac{A}{\\frac{A}{\\int x}}}{B}'), ` - - [ + + [ A @@ -1320,7 +1320,7 @@ describe('Physics1_6', () => { , B - ] + ] ` ); @@ -1393,12 +1393,12 @@ describe('Physics1_6', () => { toXmlMatch( tex2mml('\\comm{A}B'), ` - - [ + + [ A , B - ] + ] ` ); @@ -1419,12 +1419,12 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\acomm{A}{B}'), ` - - { + + { A , B - } + } ` ); @@ -1436,12 +1436,12 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\anticommutator{A}{B}'), ` - - { + + { A , B - } + } ` ); @@ -1453,12 +1453,12 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\poissonbracket{A}{B}'), ` - - { + + { A , B - } + } ` ); @@ -1470,12 +1470,12 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\pb{A}{B}'), ` - - { + + { A , B - } + } ` ); @@ -1487,8 +1487,8 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\acomm{\\frac{A}{\\frac{A}{\\int x}}}{B}'), ` - - { + + { A @@ -1501,7 +1501,7 @@ describe('Physics1_7', () => { , B - } + } ` ); @@ -1556,12 +1556,12 @@ describe('Physics1_7', () => { toXmlMatch( tex2mml('\\acomm{A}B'), ` - - { + + { A , B - } + } ` ); @@ -1863,7 +1863,7 @@ describe('Physics2_1', () => { ` - + ^ @@ -2399,7 +2399,7 @@ describe('Physics2_4', () => { toXmlMatch( tex2mml('\\gradient '), ` - + ` @@ -2474,7 +2474,7 @@ describe('Physics2_4', () => { toXmlMatch( tex2mml('\\grad '), ` - + ` @@ -2573,7 +2573,7 @@ describe('Physics2_5', () => { toXmlMatch( tex2mml('\\divergence{\\frac{a}{b}c}'), ` - + @@ -2592,7 +2592,7 @@ describe('Physics2_5', () => { toXmlMatch( tex2mml('\\div{\\frac{a}{b}c}'), ` - + @@ -2611,7 +2611,7 @@ describe('Physics2_5', () => { toXmlMatch( tex2mml('\\div{(\\frac{a}{b}c)}'), ` - + @@ -2632,7 +2632,7 @@ describe('Physics2_5', () => { toXmlMatch( tex2mml('\\div(\\frac{a}{b}c)'), ` - + @@ -2659,14 +2659,14 @@ describe('Physics2_5', () => { - - ( + + ( a b c - ) + ) ` ); @@ -2687,7 +2687,7 @@ describe('Physics2_6', () => { toXmlMatch( tex2mml('\\curl '), ` - + × @@ -2701,7 +2701,7 @@ describe('Physics2_6', () => { toXmlMatch( tex2mml('\\curl(\\frac{a}{b})'), ` - + × @@ -2723,7 +2723,7 @@ describe('Physics2_6', () => { toXmlMatch( tex2mml('\\curl[\\frac{a}{b}]'), ` - + × @@ -2745,7 +2745,7 @@ describe('Physics2_6', () => { toXmlMatch( tex2mml('\\curl{\\frac{a}{b}}'), ` - + × @@ -2772,7 +2772,7 @@ describe('Physics2_7', () => { toXmlMatch( tex2mml('\\laplacian '), ` - + 2 @@ -2786,7 +2786,7 @@ describe('Physics2_7', () => { toXmlMatch( tex2mml('\\laplacian(\\frac{a}{b})'), ` - + 2 @@ -2809,7 +2809,7 @@ describe('Physics2_7', () => { toXmlMatch( tex2mml('\\laplacian[\\frac{a}{b}]'), ` - + 2 @@ -2832,7 +2832,7 @@ describe('Physics2_7', () => { toXmlMatch( tex2mml('\\laplacian{\\frac{a}{b}}'), ` - + 2 @@ -4314,13 +4314,13 @@ describe('Physics3_5', () => { Res - - { + + { x y - } + } ` ); @@ -4414,7 +4414,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4439,7 +4439,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4464,7 +4464,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4480,7 +4480,7 @@ describe('Physics3_6', () => { toXmlMatch( tex2mml('\\pv\\int f(z) \\dd{z}a'), ` - + P @@ -4490,7 +4490,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4506,7 +4506,7 @@ describe('Physics3_6', () => { toXmlMatch( tex2mml('\\pv(\\int f(z))'), ` - + P @@ -4527,7 +4527,7 @@ describe('Physics3_6', () => { toXmlMatch( tex2mml('\\pv|\\int f(z)|'), ` - + P @@ -4548,7 +4548,7 @@ describe('Physics3_6', () => { toXmlMatch( tex2mml('\\pv[\\int f(z)]'), ` - + P @@ -4582,7 +4582,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4610,7 +4610,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4626,7 +4626,7 @@ describe('Physics3_6', () => { toXmlMatch( tex2mml('\\PV\\int f(z) \\dd{z}a'), ` - + P . V @@ -4639,7 +4639,7 @@ describe('Physics3_6', () => { z ) - + d z @@ -4723,13 +4723,13 @@ describe('Physics3_7', () => { Re - - { + + { x y - } + } ` ); @@ -4886,13 +4886,13 @@ describe('Physics3_7', () => { Im - - { + + { x y - } + } ` ); @@ -5128,11 +5128,11 @@ describe('Physics5_0', () => { tex2mml('\\dv x'), ` - + d - - + + d x @@ -5149,11 +5149,11 @@ describe('Physics5_0', () => { tex2mml('\\dv x(ll)'), ` - + d - - + + d x @@ -5177,13 +5177,13 @@ describe('Physics5_0', () => { ` - + d x - - + + d y @@ -5201,8 +5201,8 @@ describe('Physics5_0', () => { ` - - + + d @@ -5211,8 +5211,8 @@ describe('Physics5_0', () => { f - - + + d @@ -5235,13 +5235,13 @@ describe('Physics5_0', () => { ` - + d f - - + + d x @@ -5262,13 +5262,13 @@ describe('Physics5_0', () => { ` - + d f - - + + d x @@ -5286,11 +5286,11 @@ describe('Physics5_0', () => { tex2mml('\\dv{x}y'), ` - + d - - + + d x @@ -5309,15 +5309,15 @@ describe('Physics5_0', () => { ` - + d n - - + + d @@ -5348,8 +5348,8 @@ describe('Physics5_0', () => { ` - - + + d @@ -5358,8 +5358,8 @@ describe('Physics5_0', () => { f - - + + d @@ -5389,10 +5389,10 @@ describe('Physics5_0', () => { toXmlMatch( tex2mml('\\dv*[n]{f}{x}{y}(\\frac{x}{y})'), ` - - - - + + + + d @@ -5401,9 +5401,9 @@ describe('Physics5_0', () => { f - / + / - + d @@ -5412,7 +5412,7 @@ describe('Physics5_0', () => { n - + y @@ -5433,26 +5433,26 @@ describe('Physics5_0', () => { toXmlMatch( tex2mml('\\dv*[]{f}{x}{y}(\\frac{x}{y})'), ` - - - - + + + + d f - / + / - + d x - + y @@ -5475,16 +5475,16 @@ describe('Physics5_0', () => { ` - - + + d f - - + + d @@ -5514,15 +5514,15 @@ describe('Physics5_0', () => { ` - + d 5 - - + + d @@ -5550,15 +5550,15 @@ describe('Physics5_0', () => { ` - + d 5 - - + + d @@ -5580,11 +5580,11 @@ describe('Physics5_0', () => { tex2mml('\\dv{f}'), ` - + d - - + + d f @@ -5609,14 +5609,14 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\flatfrac{x}{y}'), ` - - + + x - / + / y - + ` ); @@ -5628,17 +5628,17 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\flatfrac{x^2}{y}'), ` - - + + x 2 - / + / y - + ` ); @@ -5651,8 +5651,8 @@ describe('Physics5_1', () => { tex2mml('\\pdv x'), ` - - + + x @@ -5668,8 +5668,8 @@ describe('Physics5_1', () => { tex2mml('\\pdv x(ll)'), ` - - + + x @@ -5691,8 +5691,8 @@ describe('Physics5_1', () => { tex2mml('\\pdv{f}'), ` - - + + f @@ -5712,7 +5712,7 @@ describe('Physics5_1', () => { x - + y @@ -5737,7 +5737,7 @@ describe('Physics5_1', () => { f - + x @@ -5789,7 +5789,7 @@ describe('Physics5_1', () => { f - + x @@ -5806,8 +5806,8 @@ describe('Physics5_1', () => { tex2mml('\\pdv{x}y'), ` - - + + x @@ -5823,16 +5823,16 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\pdv*{f}{x}'), ` - - + + f - / + / x - + ` ); @@ -5844,8 +5844,8 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\pdv*[3]{f}{x}'), ` - - + + @@ -5854,7 +5854,7 @@ describe('Physics5_1', () => { f - / + / @@ -5863,7 +5863,7 @@ describe('Physics5_1', () => { 3 - + ` ); @@ -5882,7 +5882,7 @@ describe('Physics5_1', () => { n - + f @@ -5937,8 +5937,8 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\pdv*[n]{f}{x}{y}(\\frac{x}{y})'), ` - - + + @@ -5947,13 +5947,13 @@ describe('Physics5_1', () => { f - / + / x y - + ` ); @@ -5965,8 +5965,8 @@ describe('Physics5_1', () => { toXmlMatch( tex2mml('\\pdv*[]{f}{x}{y}(\\frac{x}{y})'), ` - - + + @@ -5975,13 +5975,13 @@ describe('Physics5_1', () => { f - / + / x y - + ` ); @@ -6027,7 +6027,7 @@ describe('Physics5_1', () => { 5 - + ( @@ -6059,7 +6059,7 @@ describe('Physics5_1', () => { 5 - + f @@ -6089,8 +6089,8 @@ describe('Physics5_2', () => { tex2mml('\\fdv x'), ` - δ - + δ + δ x @@ -6106,8 +6106,8 @@ describe('Physics5_2', () => { tex2mml('\\fdv x(ll)'), ` - δ - + δ + δ x @@ -6133,7 +6133,7 @@ describe('Physics5_2', () => { δ x - + δ y @@ -6149,8 +6149,8 @@ describe('Physics5_2', () => { tex2mml('\\fdv{f}'), ` - δ - + δ + δ f @@ -6175,7 +6175,7 @@ describe('Physics5_2', () => { f - + δ x @@ -6200,7 +6200,7 @@ describe('Physics5_2', () => { δ f - + δ x @@ -6223,7 +6223,7 @@ describe('Physics5_2', () => { δ f - + δ x @@ -6240,8 +6240,8 @@ describe('Physics5_2', () => { tex2mml('\\fdv{x}y'), ` - δ - + δ + δ x @@ -6257,16 +6257,16 @@ describe('Physics5_2', () => { toXmlMatch( tex2mml('\\functionalderivative*{F}{x}'), ` - - + + δ F - / + / δ x - + ` ); @@ -6278,16 +6278,16 @@ describe('Physics5_2', () => { toXmlMatch( tex2mml('\\fderivative*{F}{x}'), ` - - + + δ F - / + / δ x - + ` ); @@ -6299,16 +6299,16 @@ describe('Physics5_2', () => { toXmlMatch( tex2mml('\\fdv*{F}{x}'), ` - - + + δ F - / + / δ x - + ` ); @@ -6325,7 +6325,7 @@ describe('Physics5_2', () => { δ F - + δ x @@ -6350,7 +6350,7 @@ describe('Physics5_2', () => { F - + δ x @@ -6377,7 +6377,7 @@ describe('Physics5_2', () => { n - + δ f @@ -6415,7 +6415,7 @@ describe('Physics5_2', () => { f - + δ x @@ -6444,8 +6444,8 @@ describe('Physics5_2', () => { toXmlMatch( tex2mml('\\fdv*[n]{f}{x}{y}(\\frac{x}{y})'), ` - - + + δ @@ -6454,7 +6454,7 @@ describe('Physics5_2', () => { f - / + / δ @@ -6463,7 +6463,7 @@ describe('Physics5_2', () => { n - + y @@ -6484,22 +6484,22 @@ describe('Physics5_2', () => { toXmlMatch( tex2mml('\\fdv*[]{f}{x}{y}(\\frac{x}{y})'), ` - - + + δ f - / + / δ x - + y @@ -6528,7 +6528,7 @@ describe('Physics5_2', () => { f - + δ x @@ -6562,7 +6562,7 @@ describe('Physics5_2', () => { 5 - + δ f @@ -6674,7 +6674,7 @@ describe('Physics5_3', () => { toXmlMatch( tex2mml('\\var(E-TS)'), ` - δ + δ ( E @@ -6721,13 +6721,13 @@ describe('Physics5_3', () => { F [ g - - ( + + ( x y - ) + ) ] @@ -6741,7 +6741,7 @@ describe('Physics5_3', () => { toXmlMatch( tex2mml('\\var(\\frac{a}{b})'), ` - δ + δ ( @@ -6852,7 +6852,7 @@ describe('Physics5_4', () => { toXmlMatch( tex2mml('\\dd x'), ` - + d x @@ -6867,7 +6867,7 @@ describe('Physics5_4', () => { tex2mml('\\dd{x}'), ` - + d x @@ -6883,8 +6883,8 @@ describe('Physics5_4', () => { tex2mml('\\dd[3]{x}'), ` - - + + d @@ -6903,8 +6903,8 @@ describe('Physics5_4', () => { toXmlMatch( tex2mml('\\dd[3]x'), ` - - + + d @@ -6922,7 +6922,7 @@ describe('Physics5_4', () => { toXmlMatch( tex2mml('\\dd(\\frac{\\frac{\\cos}{\\theta}}{\\theta})'), ` - + d @@ -6947,7 +6947,7 @@ describe('Physics5_4', () => { tex2mml('\\dd[4](\\frac{\\frac{\\cos}{\\theta}}{\\theta})'), ` - + d @@ -6976,7 +6976,7 @@ describe('Physics5_4', () => { tex2mml('\\dd{x}(\\frac{\\frac{\\cos}{\\theta}}{\\theta})'), ` - + d x @@ -7001,8 +7001,8 @@ describe('Physics5_4', () => { tex2mml('\\dd[4]{x}(\\frac{\\frac{\\cos}{\\theta}}{\\theta})'), ` - - + + d @@ -7031,7 +7031,7 @@ describe('Physics5_4', () => { tex2mml('\\dd[5]'), ` - + d @@ -7049,7 +7049,7 @@ describe('Physics5_4', () => { tex2mml('{\\dd}'), ` - + d @@ -7073,7 +7073,7 @@ describe('Physics5_5', () => { tex2mml('A\\dd A'), ` A - + d A @@ -7088,7 +7088,7 @@ describe('Physics5_5', () => { tex2mml('A\\dd x A'), ` A - + d x @@ -7105,7 +7105,7 @@ describe('Physics5_5', () => { ` A - + d x @@ -7122,7 +7122,7 @@ describe('Physics5_5', () => { tex2mml('A\\dd xA'), ` A - + d x @@ -7159,8 +7159,8 @@ describe('Physics5_5', () => { ` A - - + + d @@ -7181,8 +7181,8 @@ describe('Physics5_5', () => { tex2mml('A\\dd[3]x A'), ` A - - + + d @@ -7202,7 +7202,7 @@ describe('Physics5_5', () => { tex2mml('A\\dd(\\frac{\\frac{\\cos}{\\theta}}{\\theta}) A'), ` A - + d @@ -7229,7 +7229,7 @@ describe('Physics5_5', () => { ` A - + d @@ -7260,7 +7260,7 @@ describe('Physics5_5', () => { ` A - + d x @@ -7287,8 +7287,8 @@ describe('Physics5_5', () => { ` A - - + + d @@ -7323,8 +7323,8 @@ describe('Physics5_5', () => { d - - ( + + ( cos @@ -7332,7 +7332,7 @@ describe('Physics5_5', () => { θ - ) + ) A ` @@ -7352,8 +7352,8 @@ describe('Physics5_5', () => { d - - ( + + ( cos @@ -7361,7 +7361,7 @@ describe('Physics5_5', () => { θ - ) + ) A @@ -7384,18 +7384,18 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra{\\phi}\\ket{\\psi}'), ` - - + + ϕ - | + | ψ - + ` ); @@ -7407,18 +7407,18 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra{A}\\ket{B}'), ` - - + + A - | + | B - + ` ); @@ -7430,30 +7430,30 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra{\\phi}\\dyad{\\psi}{\\xi}'), ` - - + + ϕ - | + | - - - | + + + | ψ - + - + ξ - | + | ` ); @@ -7465,16 +7465,16 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra A \\ket B'), ` - - + + A - | + | - + B ` @@ -7537,18 +7537,18 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra A\\ket{B}'), ` - - + + A - | + | B - + ` ); @@ -7560,16 +7560,16 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra A\\ket '), ` - - + + A - | + | - + ` ); @@ -7581,16 +7581,16 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra {A}\\ket '), ` - - + + A - | + | - + ` ); @@ -7602,16 +7602,16 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra {A}\\ket B'), ` - - + + A - | + | - + B ` @@ -7624,8 +7624,8 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\bra {\\frac{a}{b}} \\ket* \\alpha'), ` - - + + a @@ -7633,10 +7633,10 @@ describe('Physics6_0', () => { - | + | - + α @@ -7650,12 +7650,12 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\ket{A}'), ` - - | + + | A - + ` ); @@ -7667,15 +7667,15 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\ket{\\frac{a}{b}}'), ` - - | + + | a b - + ` ); @@ -7702,12 +7702,12 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\ket a'), ` - - | + + | a - + ` ); @@ -7734,12 +7734,12 @@ describe('Physics6_0', () => { toXmlMatch( tex2mml('\\ket \\alpha'), ` - - | + + | α - + ` ); @@ -7778,18 +7778,18 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket{A}'), ` - - + + A - | + | A - + ` ); @@ -7801,8 +7801,8 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket{\\frac{a}{b}}'), ` - - + + a @@ -7810,7 +7810,7 @@ describe('Physics6_1', () => { - | + | @@ -7818,7 +7818,7 @@ describe('Physics6_1', () => { b - + ` ); @@ -7874,18 +7874,18 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket a'), ` - - + + a - | + | a - + ` ); @@ -7916,18 +7916,18 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket \\alpha'), ` - - + + α - | + | α - + ` ); @@ -7939,8 +7939,8 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket{\\frac{a}{b}}{A}'), ` - - + + a @@ -7948,12 +7948,12 @@ describe('Physics6_1', () => { - | + | A - + ` ); @@ -7987,8 +7987,8 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket{\\frac{a}{b}} A'), ` - - + + a @@ -7996,7 +7996,7 @@ describe('Physics6_1', () => { - | + | @@ -8004,7 +8004,7 @@ describe('Physics6_1', () => { b - + A ` @@ -8043,8 +8043,8 @@ describe('Physics6_1', () => { toXmlMatch( tex2mml('\\braket{\\frac{a}{b}}{} '), ` - - + + a @@ -8052,10 +8052,10 @@ describe('Physics6_1', () => { - | + | - + ` ); @@ -8096,22 +8096,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{A}'), ` - - | + + | A - + - + A - | + | ` ); @@ -8123,8 +8123,8 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{\\frac{a}{b}}'), ` - - | + + | a @@ -8132,11 +8132,11 @@ describe('Physics6_2', () => { - + - + @@ -8144,7 +8144,7 @@ describe('Physics6_2', () => { b - | + | ` ); @@ -8204,22 +8204,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra a'), ` - - | + + | a - + - + a - | + | ` ); @@ -8252,22 +8252,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra \\alpha'), ` - - | + + | α - + - + α - | + | ` ); @@ -8279,8 +8279,8 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{\\frac{a}{b}}{A}'), ` - - | + + | a @@ -8288,16 +8288,16 @@ describe('Physics6_2', () => { - + - + A - | + | ` ); @@ -8333,8 +8333,8 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{\\frac{a}{b}} A'), ` - - | + + | a @@ -8342,11 +8342,11 @@ describe('Physics6_2', () => { - + - + @@ -8354,7 +8354,7 @@ describe('Physics6_2', () => { b - | + | A ` @@ -8395,8 +8395,8 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{\\frac{a}{b}}{} '), ` - - | + + | a @@ -8404,14 +8404,14 @@ describe('Physics6_2', () => { - + - + - | + | ` ); @@ -8445,17 +8445,17 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\left\\vert A \\middle\\rangle\\middle\\langle B\\right\\vert'), ` - - | + + | A - + - + B - | + | ` ); @@ -8467,22 +8467,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\ketbra{A}{B}'), ` - - | + + | A - + - + B - | + | ` ); @@ -8494,22 +8494,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\outerproduct{A}{B}'), ` - - | + + | A - + - + B - | + | ` ); @@ -8521,22 +8521,22 @@ describe('Physics6_2', () => { toXmlMatch( tex2mml('\\dyad{a}{b}'), ` - - | + + | a - + - + b - | + | ` ); @@ -8557,12 +8557,12 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{A}'), ` - - + + A - + ` ); @@ -8574,15 +8574,15 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{\\frac{A}{B}}'), ` - - + + A B - + ` ); @@ -8630,28 +8630,28 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{A}{\\frac{A}{B}}'), ` - - + + A B - | + | A - - | + + | A B - + ` ); @@ -8663,12 +8663,12 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{\\frac{A}{B}}{A}'), ` - - + + A - | + | @@ -8676,12 +8676,12 @@ describe('Physics6_3', () => { B - - | + + | A - + ` ); @@ -8722,8 +8722,8 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev**{A} {\\frac{A}{B}}'), ` - - + + A @@ -8731,13 +8731,13 @@ describe('Physics6_3', () => { - | + | A - | + | @@ -8745,7 +8745,7 @@ describe('Physics6_3', () => { B - + ` ); @@ -8757,12 +8757,12 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev A B'), ` - - + + A - + B ` @@ -8775,28 +8775,28 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev A {\\frac{A}{B}}'), ` - - + + A B - | + | A - - | + + | A B - + ` ); @@ -8808,15 +8808,15 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev {\\frac{A}{B}} A'), ` - - + + A B - + A ` @@ -8858,8 +8858,8 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev** A {\\frac{A}{B}}'), ` - - + + A @@ -8867,13 +8867,13 @@ describe('Physics6_3', () => { - | + | A - | + | @@ -8881,7 +8881,7 @@ describe('Physics6_3', () => { B - + ` ); @@ -8893,15 +8893,15 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{\\frac{A}{B}}{\\frac{\\Psi}{\\Phi}}'), ` - - + + Ψ Φ - | + | @@ -8909,15 +8909,15 @@ describe('Physics6_3', () => { B - - | + + | Ψ Φ - + ` ); @@ -8929,14 +8929,14 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev{\\frac{A}{B}}{{\\Psi}}'), ` - - + + Ψ - | + | @@ -8944,14 +8944,14 @@ describe('Physics6_3', () => { B - - | + + | Ψ - + ` ); @@ -8995,8 +8995,8 @@ describe('Physics6_3', () => { toXmlMatch( tex2mml('\\ev**{\\frac{A}{B}}{\\frac{\\Psi}{\\Phi}}'), ` - - + + Ψ @@ -9004,7 +9004,7 @@ describe('Physics6_3', () => { - | + | @@ -9013,7 +9013,7 @@ describe('Physics6_3', () => { - | + | @@ -9021,7 +9021,7 @@ describe('Physics6_3', () => { Φ - + ` ); @@ -9042,22 +9042,22 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\matrixel{n}{A}{m}'), ` - - + + n - | + | A - - | + + | m - + ` ); @@ -9069,22 +9069,22 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\mel{n}{A}{m}'), ` - - + + n - | + | A - - | + + | m - + ` ); @@ -9096,15 +9096,15 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\mel{\\frac{a}{b}}{\\frac{a}{b}}{\\frac{a}{b}}'), ` - - + + a b - | + | @@ -9112,15 +9112,15 @@ describe('Physics6_4', () => { b - - | + + | a b - + ` ); @@ -9132,22 +9132,22 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\mel A B C'), ` - - + + A - | + | B - - | + + | C - + ` ); @@ -9217,13 +9217,13 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\mel**{n}{\\frac{a}{b}}{m}'), ` - - + + n - | + | @@ -9232,12 +9232,12 @@ describe('Physics6_4', () => { - | + | m - + ` ); @@ -9249,8 +9249,8 @@ describe('Physics6_4', () => { toXmlMatch( tex2mml('\\mel**{\\frac{a}{b}}{\\frac{a}{b}}{\\frac{a}{b}}'), ` - - + + a @@ -9258,7 +9258,7 @@ describe('Physics6_4', () => { - | + | @@ -9267,7 +9267,7 @@ describe('Physics6_4', () => { - | + | @@ -9275,7 +9275,7 @@ describe('Physics6_4', () => { b - + ` ); @@ -9296,8 +9296,8 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity{Q}'), ` - - + + Q @@ -9313,8 +9313,8 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity*{a & b \\\\ c & d}'), ` - - + + a @@ -9322,7 +9322,7 @@ describe('Physics7_0', () => { b - + c @@ -9341,10 +9341,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity*(a & b \\\\ c & d)'), ` - - - - + + + + a @@ -9352,7 +9352,7 @@ describe('Physics7_0', () => { b - + c @@ -9361,7 +9361,7 @@ describe('Physics7_0', () => { - + ` ); @@ -9373,10 +9373,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity(a & b \\\\ c & d)'), ` - - ( - - + + ( + + a @@ -9384,7 +9384,7 @@ describe('Physics7_0', () => { b - + c @@ -9393,7 +9393,7 @@ describe('Physics7_0', () => { - ) + ) ` ); @@ -9405,10 +9405,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity[a & b \\\\ c & d]'), ` - - [ - - + + [ + + a @@ -9416,7 +9416,7 @@ describe('Physics7_0', () => { b - + c @@ -9425,7 +9425,7 @@ describe('Physics7_0', () => { - ] + ] ` ); @@ -9437,10 +9437,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\matrixquantity|a & b \\\\ c & d|'), ` - - | - - + + | + + a @@ -9448,7 +9448,7 @@ describe('Physics7_0', () => { b - + c @@ -9457,7 +9457,7 @@ describe('Physics7_0', () => { - | + | ` ); @@ -9469,8 +9469,8 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty{a & b \\\\ c & d}'), ` - - + + a @@ -9478,7 +9478,7 @@ describe('Physics7_0', () => { b - + c @@ -9497,10 +9497,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty(a & b \\\\ c & d)'), ` - - ( - - + + ( + + a @@ -9508,7 +9508,7 @@ describe('Physics7_0', () => { b - + c @@ -9517,7 +9517,7 @@ describe('Physics7_0', () => { - ) + ) ` ); @@ -9529,10 +9529,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty*(a & b \\\\ c & d)'), ` - - - - + + + + a @@ -9540,7 +9540,7 @@ describe('Physics7_0', () => { b - + c @@ -9549,7 +9549,7 @@ describe('Physics7_0', () => { - + ` ); @@ -9561,10 +9561,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty[a & b \\\\ c & d]'), ` - - [ - - + + [ + + a @@ -9572,7 +9572,7 @@ describe('Physics7_0', () => { b - + c @@ -9581,7 +9581,7 @@ describe('Physics7_0', () => { - ] + ] ` ); @@ -9593,10 +9593,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty|a & b \\\\ c & d|'), ` - - | - - + + | + + a @@ -9604,7 +9604,7 @@ describe('Physics7_0', () => { b - + c @@ -9613,7 +9613,7 @@ describe('Physics7_0', () => { - | + | ` ); @@ -9625,10 +9625,10 @@ describe('Physics7_0', () => { toXmlMatch( tex2mml('\\mqty*|a & b\\\\ c& d|'), ` - - | - - + + | + + a @@ -9636,7 +9636,7 @@ describe('Physics7_0', () => { b - + c @@ -9645,7 +9645,7 @@ describe('Physics7_0', () => { - | + | ` ); @@ -9666,14 +9666,14 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat{1,2&3\\\\4&5})'), ` - - ( - - + + ( + + - - + + 1 @@ -9681,10 +9681,10 @@ describe('Physics7_10', () => { - + - - + + 2 @@ -9692,7 +9692,7 @@ describe('Physics7_10', () => { 3 - + 4 @@ -9704,7 +9704,7 @@ describe('Physics7_10', () => { - ) + ) ` ); @@ -9716,16 +9716,16 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat 1)'), ` - - ( - - + + ( + + 1 - ) + ) ` ); @@ -9737,10 +9737,10 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat 1,2)'), ` - - ( - - + + ( + + 1 , @@ -9748,7 +9748,7 @@ describe('Physics7_10', () => { - ) + ) ` ); @@ -9760,16 +9760,16 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat{1,2&3\\\\4&5&6,7,8})'), ` - - ( - - + + ( + + - - + + 1 @@ -9777,12 +9777,12 @@ describe('Physics7_10', () => { - + - - + + 2 @@ -9790,7 +9790,7 @@ describe('Physics7_10', () => { 3 - + 4 @@ -9804,11 +9804,11 @@ describe('Physics7_10', () => { - + - - + + 7 @@ -9816,10 +9816,10 @@ describe('Physics7_10', () => { - + - - + + 8 @@ -9828,7 +9828,7 @@ describe('Physics7_10', () => { - ) + ) ` ); @@ -9840,17 +9840,17 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat{1,2&3\\\\4&5,6,7,8})'), ` - - ( - - + + ( + + - - + + 1 @@ -9858,13 +9858,13 @@ describe('Physics7_10', () => { - + - - + + 2 @@ -9872,7 +9872,7 @@ describe('Physics7_10', () => { 3 - + 4 @@ -9883,12 +9883,12 @@ describe('Physics7_10', () => { - + - - + + 6 @@ -9896,11 +9896,11 @@ describe('Physics7_10', () => { - + - - + + 7 @@ -9908,10 +9908,10 @@ describe('Physics7_10', () => { - + - - + + 8 @@ -9920,7 +9920,7 @@ describe('Physics7_10', () => { - ) + ) ` ); @@ -9932,17 +9932,17 @@ describe('Physics7_10', () => { toXmlMatch( tex2mml('\\mqty(\\admat{1,2&3\\\\4&5&6,7,8,\\dmat{9,10}})'), ` - - ( - - + + ( + + - - + + 1 @@ -9950,13 +9950,13 @@ describe('Physics7_10', () => { - + - - + + 2 @@ -9964,7 +9964,7 @@ describe('Physics7_10', () => { 3 - + 4 @@ -9978,12 +9978,12 @@ describe('Physics7_10', () => { - + - - + + 7 @@ -9991,11 +9991,11 @@ describe('Physics7_10', () => { - + - - + + 8 @@ -10003,13 +10003,13 @@ describe('Physics7_10', () => { - + - - + + - - + + 9 @@ -10017,13 +10017,13 @@ describe('Physics7_10', () => { - + - - + + - 10 + 10 @@ -10033,7 +10033,7 @@ describe('Physics7_10', () => { - ) + ) ` ); @@ -10054,10 +10054,10 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\mqty a'), ` - - ( - - ) + + ( + + ) a ` @@ -10070,10 +10070,10 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\mqty1'), ` - - ( - - ) + + ( + + ) 1 ` @@ -10086,18 +10086,18 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\pmqty* 34'), ` - - ( - - + + ( + + - ) + ) - 34 + 34 ` ); }); @@ -10110,13 +10110,13 @@ describe('Physics7_11', () => { '\\mqty(\\dmat{1,2&3,4&4&5\\\\4&5,33,4,5,7,8\\\\0\\\\10&20\\\\3,200}) ' ), ` - - ( - - + + ( + + - - + + 1 @@ -10124,11 +10124,11 @@ describe('Physics7_11', () => { - + - - + + 2 @@ -10139,12 +10139,12 @@ describe('Physics7_11', () => { - + - - + + 4 @@ -10155,7 +10155,7 @@ describe('Physics7_11', () => { 5 - + 4 @@ -10166,28 +10166,28 @@ describe('Physics7_11', () => { - + - - + + - 33 + 33 - + - - + + 4 @@ -10195,15 +10195,15 @@ describe('Physics7_11', () => { - + - - + + 5 @@ -10211,7 +10211,7 @@ describe('Physics7_11', () => { - + @@ -10219,8 +10219,8 @@ describe('Physics7_11', () => { - - + + 7 @@ -10228,7 +10228,7 @@ describe('Physics7_11', () => { - + @@ -10237,26 +10237,26 @@ describe('Physics7_11', () => { - - + + 8 - + 0 - + - 10 + 10 - 20 + 20 - + 3 @@ -10264,7 +10264,7 @@ describe('Physics7_11', () => { - + @@ -10274,17 +10274,17 @@ describe('Physics7_11', () => { - - + + - 200 + 200 - ) + ) ` ); @@ -10296,13 +10296,13 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5}) '), ` - - ( - - + + ( + + - - + + 1 @@ -10310,11 +10310,11 @@ describe('Physics7_11', () => { - + - - + + 2 @@ -10322,7 +10322,7 @@ describe('Physics7_11', () => { 3 - + 4 @@ -10334,7 +10334,7 @@ describe('Physics7_11', () => { - ) + ) ` ); @@ -10346,13 +10346,13 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5&6,\\imat{3},7,8,\\dmat{9,10}})'), ` - - ( - - + + ( + + - - + + 1 @@ -10360,11 +10360,11 @@ describe('Physics7_11', () => { - + - - + + 2 @@ -10372,7 +10372,7 @@ describe('Physics7_11', () => { 3 - + 4 @@ -10386,12 +10386,12 @@ describe('Physics7_11', () => { - + - - + + 1 @@ -10402,7 +10402,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10413,7 +10413,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10427,13 +10427,13 @@ describe('Physics7_11', () => { - + - - + + 7 @@ -10441,14 +10441,14 @@ describe('Physics7_11', () => { - + - - + + 8 @@ -10456,18 +10456,18 @@ describe('Physics7_11', () => { - + - - + + - - + + 9 @@ -10475,13 +10475,13 @@ describe('Physics7_11', () => { - + - - + + - 10 + 10 @@ -10491,7 +10491,7 @@ describe('Physics7_11', () => { - ) + ) ` ); @@ -10505,13 +10505,13 @@ describe('Physics7_11', () => { '\\mqty(\\mqty{1}\\\\ & \\mqty{2 & 3\\\\ 4 & 5 & 6}\\\\ & & \\mqty{\\imat{3}} \\\\ & & & \\mqty{7})' ), ` - - ( - - + + ( + + - - + + 1 @@ -10519,11 +10519,11 @@ describe('Physics7_11', () => { - + - - + + 2 @@ -10531,7 +10531,7 @@ describe('Physics7_11', () => { 3 - + 4 @@ -10545,12 +10545,12 @@ describe('Physics7_11', () => { - + - - + + 1 @@ -10561,7 +10561,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10572,7 +10572,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10586,13 +10586,13 @@ describe('Physics7_11', () => { - + - - + + 7 @@ -10601,7 +10601,7 @@ describe('Physics7_11', () => { - ) + ) ` ); @@ -10613,13 +10613,13 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\left\\lgroup\\frac{a}{b}\\right\\rgroup'), ` - - + + a b - + ` ); @@ -10631,7 +10631,7 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\begin{smallmatrix} a & b \\\\ c & d \\end{smallmatrix}'), ` - + @@ -10661,7 +10661,7 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\smqty{\\imat{3}}'), ` - + @@ -10709,8 +10709,8 @@ describe('Physics7_11', () => { toXmlMatch( tex2mml('\\mqty{\\imat{10}}'), ` - - + + 1 @@ -10742,7 +10742,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10774,7 +10774,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10806,7 +10806,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10838,7 +10838,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10870,7 +10870,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10902,7 +10902,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10934,7 +10934,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10966,7 +10966,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -10998,7 +10998,7 @@ describe('Physics7_11', () => { 0 - + 0 @@ -11050,27 +11050,27 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\pmqty{Q} \\mqty(R)'), ` - - ( - - + + ( + + Q - ) + ) - - ( - - + + ( + + R - ) + ) ` ); @@ -11082,27 +11082,27 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\Pmqty{Q} \\mqty*(R)'), ` - - - - + + + + Q - + - - - - + + + + R - + ` ); @@ -11114,27 +11114,27 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\bmqty{Q} \\mqty[R]'), ` - - [ - - + + [ + + Q - ] + ] - - [ - - + + [ + + R - ] + ] ` ); @@ -11146,27 +11146,27 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\vmqty{Q} \\mqty|R|'), ` - - | - - + + | + + Q - | + | - - | - - + + | + + R - | + | ` ); @@ -11178,10 +11178,10 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\pmqty{a & b \\\\ c & d}'), ` - - ( - - + + ( + + a @@ -11189,7 +11189,7 @@ describe('Physics7_1', () => { b - + c @@ -11198,7 +11198,7 @@ describe('Physics7_1', () => { - ) + ) ` ); @@ -11210,10 +11210,10 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\Pmqty{a & b \\\\ c & d}'), ` - - - - + + + + a @@ -11221,7 +11221,7 @@ describe('Physics7_1', () => { b - + c @@ -11230,7 +11230,7 @@ describe('Physics7_1', () => { - + ` ); @@ -11242,10 +11242,10 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\bmqty{a & b \\\\ c & d}'), ` - - [ - - + + [ + + a @@ -11253,7 +11253,7 @@ describe('Physics7_1', () => { b - + c @@ -11262,7 +11262,7 @@ describe('Physics7_1', () => { - ] + ] ` ); @@ -11274,10 +11274,10 @@ describe('Physics7_1', () => { toXmlMatch( tex2mml('\\vmqty{a & b \\\\ c & d}'), ` - - | - - + + | + + a @@ -11285,7 +11285,7 @@ describe('Physics7_1', () => { b - + c @@ -11294,7 +11294,7 @@ describe('Physics7_1', () => { - | + | ` ); @@ -11315,7 +11315,7 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smallmatrixquantity{Q}'), ` - + @@ -11335,7 +11335,7 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smallmatrixquantity*{a & b \\\\ c & d}'), ` - + @@ -11366,9 +11366,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smallmatrixquantity*(a & b \\\\ c & d)'), ` - - - + + + @@ -11389,7 +11389,7 @@ describe('Physics7_2', () => { - + ` ); @@ -11401,9 +11401,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smallmatrixquantity(a & b \\\\ c & d)'), ` - - ( - + + ( + @@ -11420,11 +11420,11 @@ describe('Physics7_2', () => { d - + - ) + ) ` ); @@ -11436,9 +11436,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smallmatrixquantity|a & b \\\\ c & d|'), ` - - | - + + | + @@ -11459,7 +11459,7 @@ describe('Physics7_2', () => { - | + | ` ); @@ -11471,7 +11471,7 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smqty{a & b \\\\ c & d}'), ` - + @@ -11502,9 +11502,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smqty(a & b \\\\ c & d)'), ` - - ( - + + ( + @@ -11525,7 +11525,7 @@ describe('Physics7_2', () => { - ) + ) ` ); @@ -11537,9 +11537,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smqty*(a & b \\\\ c & d)'), ` - - - + + + @@ -11560,7 +11560,7 @@ describe('Physics7_2', () => { - + ` ); @@ -11572,9 +11572,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smqty[a & b \\\\ c & d]'), ` - - [ - + + [ + @@ -11595,7 +11595,7 @@ describe('Physics7_2', () => { - ] + ] ` ); @@ -11607,9 +11607,9 @@ describe('Physics7_2', () => { toXmlMatch( tex2mml('\\smqty|a & b \\\\ c & d|'), ` - - | - + + | + @@ -11630,7 +11630,7 @@ describe('Physics7_2', () => { - | + | ` ); @@ -11651,9 +11651,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\spmqty{Q} \\smqty(R)'), ` - - ( - + + ( + @@ -11663,11 +11663,11 @@ describe('Physics7_3', () => { - ) + ) - - ( - + + ( + @@ -11677,7 +11677,7 @@ describe('Physics7_3', () => { - ) + ) ` ); @@ -11689,9 +11689,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\sPmqty{Q} \\smqty*(R)'), ` - - - + + + @@ -11701,11 +11701,11 @@ describe('Physics7_3', () => { - + - - - + + + @@ -11715,7 +11715,7 @@ describe('Physics7_3', () => { - + ` ); @@ -11727,9 +11727,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\sbmqty{Q} \\smqty[R]'), ` - - [ - + + [ + @@ -11739,11 +11739,11 @@ describe('Physics7_3', () => { - ] + ] - - [ - + + [ + @@ -11753,7 +11753,7 @@ describe('Physics7_3', () => { - ] + ] ` ); @@ -11765,9 +11765,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\svmqty{Q} \\smqty|R|'), ` - - | - + + | + @@ -11777,11 +11777,11 @@ describe('Physics7_3', () => { - | + | - - | - + + | + @@ -11791,7 +11791,7 @@ describe('Physics7_3', () => { - | + | ` ); @@ -11803,9 +11803,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\spmqty{a & b \\\\ c & d}'), ` - - ( - + + ( + @@ -11826,7 +11826,7 @@ describe('Physics7_3', () => { - ) + ) ` ); @@ -11838,9 +11838,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\sPmqty{a & b \\\\ c & d}'), ` - - - + + + @@ -11861,7 +11861,7 @@ describe('Physics7_3', () => { - + ` ); @@ -11873,9 +11873,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\sbmqty{a & b \\\\ c & d}'), ` - - [ - + + [ + @@ -11896,7 +11896,7 @@ describe('Physics7_3', () => { - ] + ] ` ); @@ -11908,9 +11908,9 @@ describe('Physics7_3', () => { toXmlMatch( tex2mml('\\svmqty{a & b \\\\ c & d}'), ` - - | - + + | + @@ -11931,7 +11931,7 @@ describe('Physics7_3', () => { - | + | ` ); @@ -11952,10 +11952,10 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\matrixdeterminant{a & b \\\\ c & d}'), ` - - | - - + + | + + a @@ -11963,7 +11963,7 @@ describe('Physics7_4', () => { b - + c @@ -11972,7 +11972,7 @@ describe('Physics7_4', () => { - | + | ` ); @@ -11984,10 +11984,10 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\mdet{a & b \\\\ c & d}'), ` - - | - - + + | + + a @@ -11995,7 +11995,7 @@ describe('Physics7_4', () => { b - + c @@ -12004,7 +12004,7 @@ describe('Physics7_4', () => { - | + | ` ); @@ -12016,9 +12016,9 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\smdet{a & b \\\\ c & d} '), ` - - | - + + | + @@ -12039,7 +12039,7 @@ describe('Physics7_4', () => { - | + | ` ); @@ -12051,16 +12051,16 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\matrixdeterminant a b'), ` - - | - - + + | + + a - | + | b ` @@ -12073,16 +12073,16 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\mdet a b'), ` - - | - - + + | + + a - | + | b ` @@ -12095,9 +12095,9 @@ describe('Physics7_4', () => { toXmlMatch( tex2mml('\\smdet a b'), ` - - | - + + | + @@ -12107,7 +12107,7 @@ describe('Physics7_4', () => { - | + | b ` @@ -12129,8 +12129,8 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\mqty{\\imat{3}}'), ` - - + + 1 @@ -12141,7 +12141,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12152,7 +12152,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12174,10 +12174,10 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\vmqty{\\imat{5}}'), ` - - | - - + + | + + 1 @@ -12194,7 +12194,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12211,7 +12211,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12228,7 +12228,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12245,7 +12245,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12263,7 +12263,7 @@ describe('Physics7_5', () => { - | + | ` ); @@ -12275,16 +12275,16 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\vmqty{\\imat{0}}'), ` - - | - - + + | + + 1 - | + | ` ); @@ -12296,16 +12296,16 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\vmqty{\\imat{1}}'), ` - - | - - + + | + + 1 - | + | ` ); @@ -12317,16 +12317,16 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\vmqty{\\imat{-1}}'), ` - - | - - + + | + + 1 - | + | ` ); @@ -12338,10 +12338,10 @@ describe('Physics7_5', () => { toXmlMatch( tex2mml('\\pmqty{\\imat{3}\\pmat{0}}'), ` - - ( - - + + ( + + 1 @@ -12352,7 +12352,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12363,7 +12363,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12378,7 +12378,7 @@ describe('Physics7_5', () => { 0 - + 0 @@ -12387,7 +12387,7 @@ describe('Physics7_5', () => { - ) + ) ` ); @@ -12408,9 +12408,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat{1}{2}{3})'), ` - - ( - + + ( + @@ -12437,7 +12437,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12449,9 +12449,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat{a}{3}{3}) '), ` - - ( - + + ( + @@ -12489,7 +12489,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12501,9 +12501,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat{a}{3}{1}) '), ` - - ( - + + ( + @@ -12523,7 +12523,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12535,15 +12535,15 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat{a}{1}{3})'), ` - - ( - + + ( + a - + a @@ -12553,7 +12553,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12565,9 +12565,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{1}{2}{3})'), ` - - ( - + + ( + @@ -12654,7 +12654,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12666,9 +12666,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{a}{3}{3})'), ` - - ( - + + ( + @@ -12783,7 +12783,7 @@ describe('Physics7_6', () => { a - + 3 @@ -12796,7 +12796,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12808,9 +12808,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{a}{3}{1})'), ` - - ( - + + ( + @@ -12845,7 +12845,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12857,9 +12857,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{a}{1}{3})'), ` - - ( - + + ( + @@ -12890,7 +12890,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12902,9 +12902,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{a}{1}{1})'), ` - - ( - + + ( + @@ -12914,7 +12914,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12926,9 +12926,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\xmat*{a}{-1}{-1})'), ` - - ( - + + ( + @@ -12938,7 +12938,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12950,9 +12950,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\zmat{1}{3})'), ` - - ( - + + ( + @@ -12968,7 +12968,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -12980,9 +12980,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\zmat{2}{3})'), ` - - ( - + + ( + @@ -13009,7 +13009,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -13021,9 +13021,9 @@ describe('Physics7_6', () => { toXmlMatch( tex2mml('\\smqty(\\zmat{3}{1})'), ` - - ( - + + ( + @@ -13043,7 +13043,7 @@ describe('Physics7_6', () => { - ) + ) ` ); @@ -13064,8 +13064,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{0}}'), ` - - + + 1 @@ -13073,7 +13073,7 @@ describe('Physics7_7', () => { 0 - + 0 @@ -13092,10 +13092,10 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{0}}'), ` - - ( - - + + ( + + 1 @@ -13103,7 +13103,7 @@ describe('Physics7_7', () => { 0 - + 0 @@ -13112,7 +13112,7 @@ describe('Physics7_7', () => { - ) + ) ` ); @@ -13124,8 +13124,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{1}}'), ` - - + + 0 @@ -13133,7 +13133,7 @@ describe('Physics7_7', () => { 1 - + 1 @@ -13152,8 +13152,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{2}}'), ` - - + + 0 @@ -13162,7 +13162,7 @@ describe('Physics7_7', () => { i - + i @@ -13181,8 +13181,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{3}}'), ` - - + + 1 @@ -13190,7 +13190,7 @@ describe('Physics7_7', () => { 0 - + 0 @@ -13210,7 +13210,7 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{4}}'), ` - + ` ); }); @@ -13221,8 +13221,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{x}}'), ` - - + + 0 @@ -13230,7 +13230,7 @@ describe('Physics7_7', () => { 1 - + 1 @@ -13249,8 +13249,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{y}}'), ` - - + + 0 @@ -13259,7 +13259,7 @@ describe('Physics7_7', () => { i - + i @@ -13278,8 +13278,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{z}}'), ` - - + + 1 @@ -13287,7 +13287,7 @@ describe('Physics7_7', () => { 0 - + 0 @@ -13307,7 +13307,7 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{a}}'), ` - + ` ); }); @@ -13318,10 +13318,10 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{a}}'), ` - - ( - - ) + + ( + + ) ` ); @@ -13333,8 +13333,8 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\mqty{\\pmat{aa}}'), ` - - + + a @@ -13350,10 +13350,10 @@ describe('Physics7_7', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{0.a}}'), ` - - ( - - + + ( + + . a @@ -13363,7 +13363,7 @@ describe('Physics7_7', () => { 0 - + 0 @@ -13372,7 +13372,7 @@ describe('Physics7_7', () => { - ) + ) ` ); @@ -13393,10 +13393,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{1}}'), ` - - ( - - + + ( + + 0 @@ -13404,7 +13404,7 @@ describe('Physics7_8', () => { 1 - + 1 @@ -13413,7 +13413,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13425,10 +13425,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{2}}'), ` - - ( - - + + ( + + 0 @@ -13437,7 +13437,7 @@ describe('Physics7_8', () => { i - + i @@ -13446,7 +13446,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13458,10 +13458,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{3}}'), ` - - ( - - + + ( + + 1 @@ -13469,7 +13469,7 @@ describe('Physics7_8', () => { 0 - + 0 @@ -13479,7 +13479,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13491,10 +13491,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{4}}'), ` - - ( - - ) + + ( + + ) ` ); @@ -13506,10 +13506,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{x}}'), ` - - ( - - + + ( + + 0 @@ -13517,7 +13517,7 @@ describe('Physics7_8', () => { 1 - + 1 @@ -13526,7 +13526,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13538,10 +13538,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{y}}'), ` - - ( - - + + ( + + 0 @@ -13550,7 +13550,7 @@ describe('Physics7_8', () => { i - + i @@ -13559,7 +13559,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13571,10 +13571,10 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{z}}'), ` - - ( - - + + ( + + 1 @@ -13582,7 +13582,7 @@ describe('Physics7_8', () => { 0 - + 0 @@ -13592,7 +13592,7 @@ describe('Physics7_8', () => { - ) + ) ` ); @@ -13604,16 +13604,16 @@ describe('Physics7_8', () => { toXmlMatch( tex2mml('\\pmqty{\\pmat{aa}}'), ` - - ( - - + + ( + + a - ) + ) ` ); @@ -13634,13 +13634,13 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5})'), ` - - ( - - + + ( + + - - + + 1 @@ -13648,11 +13648,11 @@ describe('Physics7_9', () => { - + - - + + 2 @@ -13660,7 +13660,7 @@ describe('Physics7_9', () => { 3 - + 4 @@ -13672,7 +13672,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -13684,16 +13684,16 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat 1)'), ` - - ( - - + + ( + + 1 - ) + ) ` ); @@ -13705,10 +13705,10 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat 1,2)'), ` - - ( - - + + ( + + 1 , @@ -13716,7 +13716,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -13728,13 +13728,13 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5&6,7,8})'), ` - - ( - - + + ( + + - - + + 1 @@ -13742,11 +13742,11 @@ describe('Physics7_9', () => { - + - - + + 2 @@ -13754,7 +13754,7 @@ describe('Physics7_9', () => { 3 - + 4 @@ -13768,12 +13768,12 @@ describe('Physics7_9', () => { - + - - + + 7 @@ -13781,13 +13781,13 @@ describe('Physics7_9', () => { - + - - + + 8 @@ -13796,7 +13796,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -13808,13 +13808,13 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5,6,7,8})'), ` - - ( - - + + ( + + - - + + 1 @@ -13822,11 +13822,11 @@ describe('Physics7_9', () => { - + - - + + 2 @@ -13834,7 +13834,7 @@ describe('Physics7_9', () => { 3 - + 4 @@ -13845,12 +13845,12 @@ describe('Physics7_9', () => { - + - - + + 6 @@ -13858,13 +13858,13 @@ describe('Physics7_9', () => { - + - - + + 7 @@ -13872,14 +13872,14 @@ describe('Physics7_9', () => { - + - - + + 8 @@ -13888,7 +13888,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -13900,13 +13900,13 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2\\\\3\\\\4\\\\5\\\\6,7,8})'), ` - - ( - - + + ( + + - - + + 1 @@ -13914,31 +13914,31 @@ describe('Physics7_9', () => { - + - - + + 2 - + 3 - + 4 - + 5 - + 6 @@ -13946,12 +13946,12 @@ describe('Physics7_9', () => { - + - - + + 7 @@ -13959,13 +13959,13 @@ describe('Physics7_9', () => { - + - - + + 8 @@ -13974,7 +13974,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -13986,13 +13986,13 @@ describe('Physics7_9', () => { toXmlMatch( tex2mml('\\mqty(\\dmat{1,2&3\\\\4&5&6,7,8,\\dmat{9,10}})'), ` - - ( - - + + ( + + - - + + 1 @@ -14000,11 +14000,11 @@ describe('Physics7_9', () => { - + - - + + 2 @@ -14012,7 +14012,7 @@ describe('Physics7_9', () => { 3 - + 4 @@ -14026,12 +14026,12 @@ describe('Physics7_9', () => { - + - - + + 7 @@ -14039,13 +14039,13 @@ describe('Physics7_9', () => { - + - - + + 8 @@ -14053,17 +14053,17 @@ describe('Physics7_9', () => { - + - - + + - - + + 9 @@ -14071,13 +14071,13 @@ describe('Physics7_9', () => { - + - - + + - 10 + 10 @@ -14087,7 +14087,7 @@ describe('Physics7_9', () => { - ) + ) ` ); @@ -14787,11 +14787,11 @@ describe('Derivative Macros Rest', () => { tex2mml('\\derivative{x}'), ` - + d - - + + d x @@ -14809,13 +14809,13 @@ describe('Derivative Macros Rest', () => { ` - + d x - - + + d y @@ -14833,13 +14833,13 @@ describe('Derivative Macros Rest', () => { ` - + d x - - + + d y @@ -14859,8 +14859,8 @@ describe('Derivative Macros Rest', () => { tex2mml('\\partialderivative{x}'), ` - - + + x @@ -14880,7 +14880,7 @@ describe('Derivative Macros Rest', () => { x - + y @@ -14953,8 +14953,8 @@ describe('Derivative Macros Rest', () => { tex2mml('\\pderivative{x}'), ` - - + + x @@ -14974,7 +14974,7 @@ describe('Derivative Macros Rest', () => { x - + y @@ -15347,18 +15347,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\innerproduct{A}'), ` - - + + A - | + | A - + ` ); @@ -15370,18 +15370,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\innerproduct{A}{B}'), ` - - + + A - | + | B - + ` ); @@ -15393,18 +15393,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\innerproduct{A}{B}{C}'), ` - - + + A - | + | B - + C @@ -15419,18 +15419,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\ip{A}'), ` - - + + A - | + | A - + ` ); @@ -15442,18 +15442,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\ip{A}{B}'), ` - - + + A - | + | B - + ` ); @@ -15465,18 +15465,18 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\ip{A}{B}{C}'), ` - - + + A - | + | B - + C @@ -15491,22 +15491,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\op{A}'), ` - - | + + | A - + - + A - | + | ` ); @@ -15518,22 +15518,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\op{A}{B}'), ` - - | + + | A - + - + B - | + | ` ); @@ -15545,22 +15545,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\op{A}{B}{C}'), ` - - | + + | A - + - + B - | + | C @@ -15575,12 +15575,12 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expectationvalue{A}'), ` - - + + A - + ` ); @@ -15592,22 +15592,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expectationvalue{A}{B}'), ` - - + + B - | + | A - - | + + | B - + ` ); @@ -15619,22 +15619,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expectationvalue{A}{B}{C}'), ` - - + + B - | + | A - - | + + | B - + C @@ -15649,12 +15649,12 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expval{A}'), ` - - + + A - + ` ); @@ -15666,22 +15666,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expval{A}{B}'), ` - - + + B - | + | A - - | + + | B - + ` ); @@ -15693,22 +15693,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\expval{A}{B}{C}'), ` - - + + B - | + | A - - | + + | B - + C @@ -15723,22 +15723,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\matrixelement{A}{B}{C}'), ` - - + + A - | + | B - - | + + | C - + ` ); @@ -15750,22 +15750,22 @@ describe('Bra-Ket Macros Rest', () => { toXmlMatch( tex2mml('\\matrixelement{A}{B}{C}{D}'), ` - - + + A - | + | B - - | + + | C - + D @@ -15789,10 +15789,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\zeromatrix{2}{3}}'), ` - - ( - - + + ( + + 0 @@ -15803,7 +15803,7 @@ describe('Matrix Macros Rest', () => { 0 - + 0 @@ -15815,7 +15815,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -15827,10 +15827,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\paulimatrix{0}}'), ` - - ( - - + + ( + + 1 @@ -15838,7 +15838,7 @@ describe('Matrix Macros Rest', () => { 0 - + 0 @@ -15847,7 +15847,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -15859,10 +15859,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\paulimatrix{1}}'), ` - - ( - - + + ( + + 0 @@ -15870,7 +15870,7 @@ describe('Matrix Macros Rest', () => { 1 - + 1 @@ -15879,7 +15879,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -15891,10 +15891,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\paulimatrix{2}}'), ` - - ( - - + + ( + + 0 @@ -15903,7 +15903,7 @@ describe('Matrix Macros Rest', () => { i - + i @@ -15912,7 +15912,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -15924,10 +15924,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\paulimatrix{3}}'), ` - - ( - - + + ( + + 1 @@ -15935,7 +15935,7 @@ describe('Matrix Macros Rest', () => { 0 - + 0 @@ -15945,7 +15945,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -15957,10 +15957,10 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\paulimatrix{4}}'), ` - - ( - - ) + + ( + + ) ` ); @@ -15972,13 +15972,13 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\diagonalmatrix{0,1\\\\2&3}}'), ` - - ( - - + + ( + + - - + + 0 @@ -15986,16 +15986,16 @@ describe('Matrix Macros Rest', () => { - + - - + + 1 - + 2 @@ -16007,7 +16007,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -16019,14 +16019,14 @@ describe('Matrix Macros Rest', () => { toXmlMatch( tex2mml('\\pmqty{\\antidiagonalmatrix{0,1\\\\2&3}}'), ` - - ( - - + + ( + + - - + + 0 @@ -16034,15 +16034,15 @@ describe('Matrix Macros Rest', () => { - + - - + + 1 - + 2 @@ -16054,7 +16054,7 @@ describe('Matrix Macros Rest', () => { - ) + ) ` ); @@ -16105,7 +16105,7 @@ describe('Rest for Completion', () => { ( - + 1 2 diff --git a/testsuite/tests/input/tex/SetOptions.test.ts b/testsuite/tests/input/tex/SetOptions.test.ts index 92458a028..fe1af8ce0 100644 --- a/testsuite/tests/input/tex/SetOptions.test.ts +++ b/testsuite/tests/input/tex/SetOptions.test.ts @@ -77,7 +77,7 @@ describe('Setoptions', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a @@ -161,7 +161,7 @@ describe('Setoptions options', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a @@ -207,7 +207,7 @@ describe('Setoptions options', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a @@ -231,7 +231,7 @@ describe('Setoptions options', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a @@ -253,7 +253,7 @@ describe('Setoptions options', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a @@ -275,7 +275,7 @@ describe('Setoptions options', () => { toXmlMatch( tex2mml('\\setOptions[ams]{multlineWidth=50%} \\begin{multline} a \\end{multline}'), ` - + a diff --git a/testsuite/tests/input/tex/Tag.test.ts b/testsuite/tests/input/tex/Tag.test.ts index c613f5cee..15ab047b7 100644 --- a/testsuite/tests/input/tex/Tag.test.ts +++ b/testsuite/tests/input/tex/Tag.test.ts @@ -45,7 +45,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + ( @@ -67,7 +67,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -99,7 +99,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + ( @@ -121,7 +121,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + ( @@ -143,7 +143,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -160,7 +160,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -187,7 +187,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -204,7 +204,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -229,7 +229,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + ( @@ -254,7 +254,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + ( @@ -279,7 +279,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a=b\\label{A}\\\\ c&=d \\label{B}\\end{align}'), ` - + ( @@ -348,7 +348,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + ( @@ -370,7 +370,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + ( @@ -392,7 +392,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + ( @@ -424,7 +424,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + ( @@ -456,7 +456,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + ( @@ -478,7 +478,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + ( @@ -500,7 +500,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + ( @@ -534,7 +534,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + ( @@ -566,7 +566,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -591,7 +591,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -618,7 +618,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( @@ -658,7 +658,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( @@ -739,7 +739,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + a @@ -756,7 +756,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{split}a\\end{split}'), ` - + a @@ -773,7 +773,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -800,7 +800,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + a @@ -817,7 +817,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + a @@ -834,7 +834,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -851,7 +851,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -878,7 +878,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -895,7 +895,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + a @@ -915,7 +915,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + a @@ -935,7 +935,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + a @@ -990,7 +990,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + a @@ -1007,7 +1007,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + ( @@ -1029,7 +1029,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + ( @@ -1056,7 +1056,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + ( @@ -1088,7 +1088,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + a @@ -1105,7 +1105,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + ( @@ -1127,7 +1127,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + ( @@ -1156,7 +1156,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + ( @@ -1188,7 +1188,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + a @@ -1208,7 +1208,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -1235,7 +1235,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( @@ -1270,7 +1270,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( @@ -1329,7 +1329,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + ( @@ -1351,7 +1351,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{split}a\\end{split}'), ` - + a @@ -1368,7 +1368,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -1400,7 +1400,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + ( @@ -1422,7 +1422,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + ( @@ -1444,7 +1444,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -1461,7 +1461,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -1488,7 +1488,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -1505,7 +1505,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -1530,7 +1530,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + ( @@ -1555,7 +1555,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + ( @@ -1580,7 +1580,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a=b\\label{A}\\\\ c&=d \\label{B}\\end{align}'), ` - + ( @@ -1649,7 +1649,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + ( @@ -1671,7 +1671,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + ( @@ -1693,7 +1693,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + ( @@ -1725,7 +1725,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + ( @@ -1757,7 +1757,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + ( @@ -1779,7 +1779,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + ( @@ -1801,7 +1801,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + ( @@ -1835,7 +1835,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + ( @@ -1867,7 +1867,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -1892,7 +1892,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + ( @@ -1919,7 +1919,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( @@ -1959,7 +1959,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + ( diff --git a/testsuite/tests/input/tex/TagFormat.test.ts b/testsuite/tests/input/tex/TagFormat.test.ts index 2ab96418d..22076df16 100644 --- a/testsuite/tests/input/tex/TagFormat.test.ts +++ b/testsuite/tests/input/tex/TagFormat.test.ts @@ -68,7 +68,7 @@ describe('Tagformat', () => { toXmlMatch( tex2mml('\\begin{align}x \\label{test}\\tag{x}\\\\ \\ref{test} \\end{align}'), ` - + [ @@ -102,7 +102,7 @@ describe('Tagformat', () => { toXmlMatch( tex2mml('\\begin{align}x \\label{test}\\tag{x}\\\\ \\eqref{test} \\end{align}'), ` - + [ @@ -142,7 +142,7 @@ describe('Tagformat', () => { toXmlMatch( tex2mml('\\begin{align}x \\label{test}\\tag{x}\\\\ \\eqref{test} \\end{align}'), ` - + ( diff --git a/testsuite/tests/input/tex/Tex.test.ts b/testsuite/tests/input/tex/Tex.test.ts index a77f12244..5ec1a5d24 100644 --- a/testsuite/tests/input/tex/Tex.test.ts +++ b/testsuite/tests/input/tex/Tex.test.ts @@ -504,7 +504,7 @@ describe('TexParser', () => { toXmlMatch( tex2mml('\\let\\vert=x \\begin{vmatrix} a \\end{vmatrix}'), ` - + a diff --git a/testsuite/tests/input/tex/TexHtml.test.ts b/testsuite/tests/input/tex/TexHtml.test.ts index 0ec094006..6c3dad532 100644 --- a/testsuite/tests/input/tex/TexHtml.test.ts +++ b/testsuite/tests/input/tex/TexHtml.test.ts @@ -25,7 +25,7 @@ describe('Texhtml', () => { ` x + - bold + bold + y ` @@ -40,9 +40,9 @@ describe('Texhtml', () => { ` x + - bold + bold + - italic + italic y ` ); @@ -56,7 +56,7 @@ describe('Texhtml', () => { ` x + -
bold and html
+
bold and html
+ y
` @@ -70,7 +70,7 @@ describe('Texhtml', () => { render2mml('x + + y'), ` x - + + + + y ` diff --git a/testsuite/tests/input/tex/Units.test.ts b/testsuite/tests/input/tex/Units.test.ts index 2ee049e10..72253c610 100644 --- a/testsuite/tests/input/tex/Units.test.ts +++ b/testsuite/tests/input/tex/Units.test.ts @@ -29,7 +29,7 @@ describe('Units', () => { tex2mml('\\units{m^2}'), ` - + m 2 @@ -44,7 +44,7 @@ describe('Units', () => { toXmlMatch( tex2mml('\\units[2.5]{kg}'), ` - 2.5 + 2.5 kg @@ -77,14 +77,14 @@ describe('Units', () => { toXmlMatch( tex2mml('\\unitfrac[9.8]{m}{s^2}'), ` - 9.8 + 9.8 m - + s 2 diff --git a/ts/input/tex/FilterUtil.ts b/ts/input/tex/FilterUtil.ts index 64ffaca32..aeab0530d 100644 --- a/ts/input/tex/FilterUtil.ts +++ b/ts/input/tex/FilterUtil.ts @@ -24,6 +24,7 @@ import { TEXCLASS, MMLNODE, MmlNode } from '../../core/MmlTree/MmlNode.js'; import NodeUtil from './NodeUtil.js'; import ParseOptions from './ParseOptions.js'; +import { TexConstant } from './TexConstants.js'; import { MmlMo } from '../../core/MmlTree/MmlNodes/mo.js'; import { Attributes } from '../../core/MmlTree/Attributes.js'; @@ -184,6 +185,7 @@ const FilterUtil = { ((mml.getProperty('keep-attrs') as string) || '').split(/ /) ); const attribs = mml.attributes; + attribs.unset(TexConstant.Attr.LATEXITEM); for (const key of attribs.getExplicitNames()) { if ( !keep.has(key) && diff --git a/ts/input/tex/NodeUtil.ts b/ts/input/tex/NodeUtil.ts index 3ccbe01c5..83517d9a7 100644 --- a/ts/input/tex/NodeUtil.ts +++ b/ts/input/tex/NodeUtil.ts @@ -228,7 +228,9 @@ const NodeUtil = { */ copyAttributes(oldNode: MmlNode, newNode: MmlNode) { newNode.attributes = oldNode.attributes; - this.setProperties(newNode, oldNode.getAllProperties()); + for (const [prop, value] of Object.entries(oldNode.getAllProperties())) { + newNode.setProperty(prop, value); + } }, /** diff --git a/ts/input/tex/ParseMethods.ts b/ts/input/tex/ParseMethods.ts index 934423f8c..c3e037dde 100644 --- a/ts/input/tex/ParseMethods.ts +++ b/ts/input/tex/ParseMethods.ts @@ -80,12 +80,12 @@ const ParseMethods = { digit(parser: TexParser, _c: string): ParseResult { const pattern = parser.configuration.options['numberPattern']; const n = parser.string.slice(parser.i - 1).match(pattern); - // @test Integer Font - const def = ParseUtil.getFontDef(parser); if (!n) { // @test Decimal Point, Decimal Point European return false; } + // @test Integer Font + const def = ParseUtil.getFontDef(parser); // @test Integer, Number, Decimal (European) const mml = parser.create('token', 'mn', def, n[0].replace(/[{}]/g, '')); parser.i += n[0].length - 1; diff --git a/ts/input/tex/StackItem.ts b/ts/input/tex/StackItem.ts index f230ecbbb..82c405367 100644 --- a/ts/input/tex/StackItem.ts +++ b/ts/input/tex/StackItem.ts @@ -25,6 +25,7 @@ import { MmlNode } from '../../core/MmlTree/MmlNode.js'; import { FactoryNodeClass } from '../../core/Tree/Factory.js'; import TexError from './TexError.js'; import StackItemFactory from './StackItemFactory.js'; +import { TexConstant } from './TexConstants.js'; // Union types for abbreviation. export type EnvProp = string | number | boolean; @@ -351,6 +352,14 @@ export interface StackItem extends NodeStack { * @returns {CheckType} True/false or an item or node. */ checkItem(item: StackItem): CheckType; + + /** + * Adds auxiliary attributes for LaTeX output to node. + * + * @param {MmlNode} node The current node. + * @param {string=} prefix A prefix for the LaTeX command. + */ + addLatexItem(node: MmlNode, prefix?: string): void; } export interface StackItemClass extends FactoryNodeClass { @@ -563,4 +572,21 @@ export abstract class BaseItem extends MmlStack implements StackItem { const CLASS = this.constructor as typeof BaseItem; return CLASS.errors[kind] || BaseItem.errors[kind]; } + + /** + * Adds auxiliary attributes for LaTeX output to node. + * + * @param {MmlNode} node The current node. + * @param {string=} prefix A prefix for the LaTeX command. + */ + public addLatexItem(node: MmlNode, prefix: string = '') { + const str = this.startStr.slice(this.startI, this.stopI); + if (str) { + const tex = prefix ? prefix + str : str; + node.attributes.set(TexConstant.Attr.LATEXITEM, tex); + if (tex !== '}') { + node.attributes.set(TexConstant.Attr.LATEX, tex); + } + } + } } diff --git a/ts/input/tex/TexParser.ts b/ts/input/tex/TexParser.ts index 237812a46..766a089d8 100644 --- a/ts/input/tex/TexParser.ts +++ b/ts/input/tex/TexParser.ts @@ -99,7 +99,6 @@ export default class TexParser { this.stack = new Stack(this.itemFactory, ENV, inner ? isInner : true); this.Parse(); this.Push(this.itemFactory.create('stop')); - this.updateResult(this.string, this.i); this.stack.env = ENV; } @@ -149,9 +148,17 @@ export default class TexParser { */ public parse(kind: HandlerType, input: ParseInput): ParseResult { const i = this.saveI; - this.saveI = this.i; + // + // Back up one to pick up the parsed character (this.i is past it at this point). + // + this.saveI = this.i - (kind === 'character' && input[1] !== '&' ? 1 : 0); const result = this.configuration.handlers.get(kind).parse(input); - this.updateResult(input[1], i); + // + // The macro gets processed by the \\ character later + // + if (kind !== 'macro') { + this.updateResult(input[1], i); + } this.saveI = i; return result; } @@ -246,7 +253,10 @@ export default class TexParser { } const node = this.stack.Top().First; this.configuration.popParser(); - node.attributes.set(TexConstant.Attr.LATEX, this.string); + const latex = this.trimTex(this.string); + if (latex) { + node.attributes.set(TexConstant.Attr.LATEX, latex); + } return node; } @@ -613,6 +623,16 @@ export default class TexParser { return node; } + /** + * Trim spaces from the ends of a TeX string, leave a space when the last item is "\ " + * + * @param {string} tex The TeX string to trim + * @returns {string} The trimmed string + */ + protected trimTex(tex: string): string { + return tex.trim() + (tex.match(/(?:^|[^\\])(?:\\\\)*\\\s+$/) ? ' ' : ''); + } + /** * Finalizes the LaTeX for the topmost Mml element on the stack after parsing * has been completed. @@ -626,68 +646,99 @@ export default class TexParser { if (!node) { return; } - // TODO: This can probably be removed once processed. But needs more - // testing. + const LATEX = TexConstant.Attr.LATEX; + // + // Check if there is a latex-item and process it if there isn't already latex attached. + // + const latex = node.attributes.get(LATEX); const existing = node.attributes.get(TexConstant.Attr.LATEXITEM); if (existing !== undefined) { - node.attributes.set(TexConstant.Attr.LATEX, existing); - return; - } - old = old < this.saveI ? this.saveI : old; - let str = old !== this.i ? this.string.slice(old, this.i) : input; - str = str.trim(); - if (!str) { - return; - } - if (input === '\\') { - str = '\\' + str; - } - // These are the cases to handle sub and superscripts. - if ( - node.attributes.get(TexConstant.Attr.LATEX) === '^' && - str !== '^' && - str !== '\\^' - ) { - if (node.childNodes[2]) { - if (str === '}') { - this.composeBraces(node.childNodes[2]); + if (!latex) { + if (input === '}' || existing === '}') { + this.composeBraces(node); } else { - node.childNodes[2].attributes.set(TexConstant.Attr.LATEX, str); + node.attributes.set(LATEX, existing); } } - if (node.childNodes[1]) { - const sub = node.childNodes[1].attributes.get(TexConstant.Attr.LATEX); - this.composeLatex(node, `_${sub}^`, 0, 2); - } else { - this.composeLatex(node, '^', 0, 2); - } return; } - if ( - node.attributes.get(TexConstant.Attr.LATEX) === '_' && - str !== '_' && - str !== '\\_' - ) { - if (node.childNodes[1]) { - if (str === '}') { - this.composeBraces(node.childNodes[1]); - } else { - node.childNodes[1].attributes.set(TexConstant.Attr.LATEX, str); - } - } - if (node.childNodes[2]) { - const sub = node.childNodes[2].attributes.get(TexConstant.Attr.LATEX); - this.composeLatex(node, `^${sub}_`, 0, 1); - } else { - this.composeLatex(node, '_', 0, 1); - } + // + // Get the current latex sub-string and check that it isn't already the saved latex + // and that the input and string are not both backslashes (the start of a macro). + // + old = old < this.saveI ? this.saveI : old; + const str = this.trimTex( + old !== this.i ? this.string.slice(old, this.i) : input + ); + if (!str || str === latex || (input === '\\' && str === '\\')) { return; } - if (str === '}') { - this.composeBraces(node); - return; + if (str === '_' || str === '^') { + // + // If the input is _ or ^, mark that we are doing a sub-sup. + // + node.setProperty('sub-sup', str); + } else { + // + // Otherwise, if we are doing a sub-sup, do the proper one. + // + switch (node.getProperty('sub-sup')) { + case '^': + // + // If we have a superscript, process the superscript latex. + // + if (node.childNodes[2]) { + if (str === '}') { + this.composeBraces(node.childNodes[2]); + } else if (!node.childNodes[2].attributes.hasExplicit(LATEX)) { + node.childNodes[2].attributes.set(LATEX, str); + } + } + // + // Make the latex for the superscript (possibly with subscript). + // + if (node.childNodes[1]) { + const sub = node.childNodes[1].attributes.get(LATEX); + this.composeLatex(node, `_${sub}^`, 0, 2); + } else { + this.composeLatex(node, '^', 0, 2); + } + return; + + case '_': + // + // If we have a subscript, process the subscript latex. + // + if (node.childNodes[1]) { + if (str === '}') { + this.composeBraces(node.childNodes[1]); + } else if (!node.childNodes[1].attributes.hasExplicit(LATEX)) { + node.childNodes[1].attributes.set(LATEX, str); + } + } + // + // Update the latex for the subscript (possibly with superscript). + // + if (node.childNodes[2]) { + const sup = node.childNodes[2].attributes.get(LATEX); + this.composeLatex(node, `^${sup}_`, 0, 1); + } else { + this.composeLatex(node, '_', 0, 1); + } + return; + } + // + // If this is a close brace, get the braced contents. + // + if (str === '}') { + this.composeBraces(node); + return; + } } - node.attributes.set(TexConstant.Attr.LATEX, str); + // + // Otherwise, set the node's latex. + // + node.attributes.set(LATEX, str); } /** @@ -705,11 +756,12 @@ export default class TexParser { pos2: number ) { if (!node.childNodes[pos1] || !node.childNodes[pos2]) return; + const LATEX = TexConstant.Attr.LATEX; const expr = - (node.childNodes[pos1].attributes.get(TexConstant.Attr.LATEX) || '') + + (node.childNodes[pos1].attributes.get(LATEX) || '') + comp + - node.childNodes[pos2].attributes.get(TexConstant.Attr.LATEX); - node.attributes.set(TexConstant.Attr.LATEX, expr); + node.childNodes[pos2].attributes.get(LATEX); + node.attributes.set(LATEX, expr); } /** diff --git a/ts/input/tex/base/BaseItems.ts b/ts/input/tex/base/BaseItems.ts index b69cf4b3c..960fa3a2a 100644 --- a/ts/input/tex/base/BaseItems.ts +++ b/ts/input/tex/base/BaseItems.ts @@ -136,7 +136,7 @@ export class OpenItem extends BaseItem { // @test PrimeSup const mml = this.toMml(); const node = this.create('node', 'TeXAtom', [mml]); - addLatexItem(node, item); + item.addLatexItem(node); return [[this.factory.create('mml', node)], true]; } return super.checkItem(item); @@ -418,8 +418,8 @@ export class LeftItem extends BaseItem { const left = fenced.childNodes[0]; const right = fenced.childNodes[fenced.childNodes.length - 1]; const mrow = this.factory.create('mml', fenced); - addLatexItem(left, this, '\\left'); - addLatexItem(right, item, '\\right'); + this.addLatexItem(left, '\\left'); + item.addLatexItem(right, '\\right'); mrow .Peek()[0] .attributes.set( @@ -437,7 +437,7 @@ export class LeftItem extends BaseItem { def.mathcolor = item.getProperty('color'); } const middle = this.create('token', 'mo', def, item.getProperty('delim')); - addLatexItem(middle, item, '\\middle'); + item.addLatexItem(middle, '\\middle'); this.Push( this.create('node', 'TeXAtom', [], { texClass: TEXCLASS.CLOSE }), middle, @@ -595,7 +595,7 @@ export class BeginItem extends BaseItem { } // @test Hfill const node = this.toMml(); - addLatexItem(node, item); + item.addLatexItem(node); return [[this.factory.create('mml', node)], true]; } if (item.isKind('stop')) { @@ -788,10 +788,7 @@ export class FnItem extends BaseItem { } } // @test Mathop Apply, Mathop No Apply - if ( - top.isKind('TeXAtom') && - top.childNodes[0].childNodes.length === 0 - ) { + if (top.isKind('TeXAtom') && top.childNodes[0].childNodes.length === 0) { return [[top, item], true]; } // @test Named Function, Named Function Arg @@ -1373,7 +1370,7 @@ export class ArrayItem extends BaseItem { NodeUtil.setAttribute(node, 'data-break-align', this.breakAlign.row); this.breakAlign.row = ''; } - addLatexItem(node, this); + this.addLatexItem(node); this.table.push(node); this.row = []; this.atEnd = false; @@ -1656,21 +1653,3 @@ export class EquationItem extends BaseItem { return super.checkItem(item); } } - -/** - * Adds auxiliary attributes for LaTeX output to node. - * - * @param {MmlNode} node The current node. - * @param {StackItem} item The stack item. - * @param {string=} prefix A prefix for the LaTeX command. - */ -function addLatexItem(node: MmlNode, item: StackItem, prefix: string = '') { - const str = item.startStr.slice(item.startI, item.stopI); - if (str) { - node.attributes.set( - TexConstant.Attr.LATEXITEM, - prefix ? prefix + str : str - ); - node.attributes.set(TexConstant.Attr.LATEX, prefix ? prefix + str : str); - } -} diff --git a/ts/input/tex/base/BaseMappings.ts b/ts/input/tex/base/BaseMappings.ts index 4ce295840..41264a434 100644 --- a/ts/input/tex/base/BaseMappings.ts +++ b/ts/input/tex/base/BaseMappings.ts @@ -690,23 +690,17 @@ new sm.CommandMap('macros', { // TeX substitution macros bmod: [ BaseMethods.Macro, - '\\mmlToken{mo}[lspace="' + - THICKMATHSPACE + - '"' + - ' rspace="' + - THICKMATHSPACE + - '"]{mod}', + `\\mmlToken{mo}[lspace="${THICKMATHSPACE}" rspace="${THICKMATHSPACE}"]{mod}`, ], pmod: [BaseMethods.Macro, '\\pod{\\mmlToken{mi}{mod}\\kern 6mu #1}', 1], mod: [ BaseMethods.Macro, - '\\mathchoice{\\kern18mu}{\\kern12mu}' + - '{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1', + '\\mathchoice{\\kern18mu}{\\kern12mu}{\\kern12mu}{\\kern12mu}\\mmlToken{mi}{mod}\\,\\,#1', 1, ], pod: [ BaseMethods.Macro, - '\\mathchoice{\\kern18mu}{\\kern8mu}' + '{\\kern8mu}{\\kern8mu}(#1)', + '\\mathchoice{\\kern18mu}{\\kern8mu}{\\kern8mu}{\\kern8mu}(#1)', 1, ], iff: [BaseMethods.Macro, '\\;\\Longleftrightarrow\\;'], @@ -716,7 +710,7 @@ new sm.CommandMap('macros', { TeX: [BaseMethods.Macro, 'T\\kern-.14em\\lower.5ex{E}\\kern-.115em X'], LaTeX: [ BaseMethods.Macro, - 'L\\kern-.325em\\raise.21em' + '{\\scriptstyle{A}}\\kern-.17em\\TeX', + 'L\\kern-.325em\\raise.21em{\\scriptstyle{A}}\\kern-.17em\\TeX', ], // Specially handled