From 5de33598e9bed05c078b94c0736e98d83e29c789 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 23 Nov 2024 21:32:15 -0500 Subject: [PATCH 1/2] Fix regression with tables due to #1146 --- ts/core/MmlTree/MmlNode.ts | 10 ++++++++-- ts/core/MmlTree/MmlNodes/mstyle.ts | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ts/core/MmlTree/MmlNode.ts b/ts/core/MmlTree/MmlNode.ts index 05cc36241..dfc64e0b0 100644 --- a/ts/core/MmlTree/MmlNode.ts +++ b/ts/core/MmlTree/MmlNode.ts @@ -773,8 +773,14 @@ export abstract class AbstractMmlNode delete attributes[key]; } } - this.attributes.setInherited('displaystyle', display); - this.attributes.setInherited('scriptlevel', level); + const displaystyle = this.attributes.getExplicit('displaystyle'); + if (displaystyle === undefined) { + this.attributes.setInherited('displaystyle', display); + } + const scriptlevel = this.attributes.getExplicit('scriptlevel'); + if (scriptlevel === undefined) { + this.attributes.setInherited('scriptlevel', level); + } if (prime) { this.setProperty('texprimestyle', prime); } diff --git a/ts/core/MmlTree/MmlNodes/mstyle.ts b/ts/core/MmlTree/MmlNodes/mstyle.ts index fdfa58b99..6a50518c8 100644 --- a/ts/core/MmlTree/MmlNodes/mstyle.ts +++ b/ts/core/MmlTree/MmlNodes/mstyle.ts @@ -60,6 +60,20 @@ export class MmlMstyle extends AbstractMmlLayoutNode { return this.childNodes[0] && this.childNodes[0].childNodes.length === 1; } + /** + * @override + */ + public setInheritedAttributes( + attributes: AttributeList = {}, + display: boolean = false, + level: number = 0, + prime: boolean = false + ) { + this.attributes.setInherited('displaystyle', display); + this.attributes.setInherited('scriptlevel', level); + super.setInheritedAttributes(attributes, display, level, prime); + } + /** * Handle scriptlevel changes, and add mstyle attributes to the ones being inherited. * From 831bc0b7fc311599333bc0ec694ce3c6f0c7f37e Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 24 Nov 2024 05:11:35 -0500 Subject: [PATCH 2/2] Fix table tests --- testsuite/tests/input/tex/Ams.test.ts | 104 ++++++++-------- testsuite/tests/input/tex/Amscd.test.ts | 20 +-- testsuite/tests/input/tex/Base.test.ts | 52 ++++---- testsuite/tests/input/tex/Physics.test.ts | 78 ++++++------ testsuite/tests/input/tex/Tag.test.ts | 144 +++++++++++----------- 5 files changed, 199 insertions(+), 199 deletions(-) diff --git a/testsuite/tests/input/tex/Ams.test.ts b/testsuite/tests/input/tex/Ams.test.ts index c1f47fabd..bb506766a 100644 --- a/testsuite/tests/input/tex/Ams.test.ts +++ b/testsuite/tests/input/tex/Ams.test.ts @@ -556,7 +556,7 @@ describe('Ams Environments', () => { tex2mml('\\begin{subarray}{c}a\\end{subarray}'), ` - + a @@ -571,7 +571,7 @@ describe('Ams Environments', () => { tex2mml('\\begin{smallmatrix}a\\end{smallmatrix}'), ` - + a @@ -585,7 +585,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{align} a&=b \\\\ c&=d \\end{align}'), ` - + a @@ -617,7 +617,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{align*} a&=b \\\\ c&=d \\end{align*}'), ` - + a @@ -649,7 +649,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b \\\\ c \\end{multline}'), ` - + a @@ -672,7 +672,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{multline*} a\\\\ b \\\\ c \\end{multline*}'), ` - + a @@ -697,7 +697,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{split} r&=s\\\\ & =t \\end{split} \\\\ c&=d \\end{align*}' ), ` - + a @@ -707,7 +707,7 @@ describe('Ams Environments', () => { = b - + r @@ -753,7 +753,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{gather} a=b \\\\ c=d \\end{gather}'), ` - + a @@ -775,7 +775,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{gather*} a=b \\\\ c=d \\end{gather*}'), ` - + a @@ -797,7 +797,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{alignat}{2} a&=b \\\\ c&=d \\end{alignat}'), ` - + a @@ -829,7 +829,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{alignat*}{2} a&=b \\\\ c&=d \\end{alignat*}'), ` - + a @@ -863,7 +863,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{alignedat}{2} r&=s\\\\ & =t \\end{alignedat} \\\\ c&=d \\end{align*}' ), ` - + a @@ -873,7 +873,7 @@ describe('Ams Environments', () => { = b - + r @@ -921,7 +921,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{aligned} r&=s\\\\ & =t \\end{aligned} \\\\ c&=d \\end{align*}' ), ` - + a @@ -931,7 +931,7 @@ describe('Ams Environments', () => { = b - + r @@ -979,7 +979,7 @@ describe('Ams Environments', () => { '\\begin{align*} a&=b \\begin{gathered} r=s\\\\ =t \\end{gathered} \\\\ c&=d \\end{align*}' ), ` - + a @@ -989,7 +989,7 @@ describe('Ams Environments', () => { = b - + r @@ -1040,7 +1040,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray} a & = & b\\\\ c & = & d \\end{eqnarray}'), ` - + a @@ -1076,7 +1076,7 @@ describe('Ams Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray*} a & = & b\\\\ c & = & d \\end{eqnarray*}'), ` - + a @@ -1117,7 +1117,7 @@ describe('Ams Labelled Environments', () => { tex2mml('\\begin{subarray}{c}a\\end{subarray}'), ` - + a @@ -1132,7 +1132,7 @@ describe('Ams Labelled Environments', () => { tex2mml('\\begin{smallmatrix}a\\end{smallmatrix}'), ` - + a @@ -1146,7 +1146,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{align} a&=b \\\\ c&=d \\end{align}'), ` - + (1) @@ -1184,7 +1184,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{align*} a&=b \\\\ c&=d \\end{align*}'), ` - + a @@ -1216,7 +1216,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b \\\\ c \\end{multline}'), ` - + a @@ -1242,7 +1242,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{multline*} a\\\\ b \\\\ c \\end{multline*}'), ` - + a @@ -1267,7 +1267,7 @@ describe('Ams Labelled Environments', () => { '\\begin{align*} a&=b \\begin{split} r&=s\\\\ & =t \\end{split} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1277,7 +1277,7 @@ describe('Ams Labelled Environments', () => { = b - + r @@ -1323,7 +1323,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{gather} a=b \\\\ c=d \\end{gather}'), ` - + (1) @@ -1351,7 +1351,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{gather*} a=b \\\\ c=d \\end{gather*}'), ` - + a @@ -1373,7 +1373,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{alignat}{2} a&=b \\\\ c&=d \\end{alignat}'), ` - + (1) @@ -1411,7 +1411,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{alignat*}{2} a&=b \\\\ c&=d \\end{alignat*}'), ` - + a @@ -1445,7 +1445,7 @@ describe('Ams Labelled Environments', () => { '\\begin{align*} a&=b \\begin{alignedat}{2} r&=s\\\\ & =t \\end{alignedat} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1455,7 +1455,7 @@ describe('Ams Labelled Environments', () => { = b - + r @@ -1503,7 +1503,7 @@ describe('Ams Labelled Environments', () => { '\\begin{align*} a&=b \\begin{aligned} r&=s\\\\ & =t \\end{aligned} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1513,7 +1513,7 @@ describe('Ams Labelled Environments', () => { = b - + r @@ -1561,7 +1561,7 @@ describe('Ams Labelled Environments', () => { '\\begin{align*} a&=b \\begin{gathered} r=s\\\\ =t \\end{gathered} \\\\ c&=d \\end{align*}' ), ` - + a @@ -1571,7 +1571,7 @@ describe('Ams Labelled Environments', () => { = b - + r @@ -1608,7 +1608,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{equation} a \\end{equation}'), ` - + (1) @@ -1631,7 +1631,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray} a & = & b\\\\ c & = & d \\end{eqnarray}'), ` - + (1) @@ -1673,7 +1673,7 @@ describe('Ams Labelled Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray*} a & = & b\\\\ c & = & d \\end{eqnarray*}'), ` - + a @@ -1874,7 +1874,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -1897,7 +1897,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline}\\shoveleft a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -1920,7 +1920,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\\\shoveleft b\\\\ c\\end{multline}'), ` - + a @@ -1943,7 +1943,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\\\shoveleft c\\end{multline}'), ` - + a @@ -1966,7 +1966,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline}\\shoveright a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -1989,7 +1989,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\\\shoveright b\\\\ c\\end{multline}'), ` - + a @@ -2012,7 +2012,7 @@ describe('MultlineShove', () => { toXmlMatch( tex2mml('\\begin{multline} a\\\\ b\\\\\\shoveright c\\end{multline}'), ` - + a @@ -2037,7 +2037,7 @@ describe('MultlineShove', () => { '\\begin{multline} a\\\\\\shoveright\\shoveleft b\\\\ c\\end{multline}' ), ` - + a @@ -2062,7 +2062,7 @@ describe('MultlineShove', () => { '\\begin{multline} a\\\\\\shoveleft\\shoveright b\\\\ c\\end{multline}' ), ` - + a @@ -2126,7 +2126,7 @@ describe('Ams Complex', () => { '\\begin{align}\\dot{x} & = \\sigma(y-x) \\\\\\dot{y} & = \\rho x - y - xz \\\\\\dot{z} & = -\\beta z + xy\\end{align}' ), ` - + @@ -2203,7 +2203,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}' ), ` - + diff --git a/testsuite/tests/input/tex/Amscd.test.ts b/testsuite/tests/input/tex/Amscd.test.ts index 1c9bfc59d..33904d6e4 100644 --- a/testsuite/tests/input/tex/Amscd.test.ts +++ b/testsuite/tests/input/tex/Amscd.test.ts @@ -9,7 +9,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'), ` - + A @@ -79,7 +79,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @<<< B @>>> C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}'), ` - + A @@ -142,7 +142,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @>a>b> B\\\\@VlVrV @AlArA\\\\C @ - + A @@ -234,7 +234,7 @@ describe('AmsCD', () => { '\\begin{CD}A @>>> B@>\\text{very long label}>>C\\\\@VVV @VVV @VVV\\\\D @>>> E@>>> F\\end{CD}' ), ` - + A @@ -314,7 +314,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 @@ -402,7 +402,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 @@ -500,7 +500,7 @@ describe('AmsCD', () => { '\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -572,7 +572,7 @@ describe('AmsCD', () => { '\\minCDarrowheight{4cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -644,7 +644,7 @@ describe('AmsCD', () => { '\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}' ), ` - + A @@ -714,7 +714,7 @@ describe('AmsCD', () => { toXmlMatch( tex2mml('\\begin{CD}A @Ra>> BaD\\end{CD}'), ` - + A diff --git a/testsuite/tests/input/tex/Base.test.ts b/testsuite/tests/input/tex/Base.test.ts index 8744eb0dd..c74dd079c 100644 --- a/testsuite/tests/input/tex/Base.test.ts +++ b/testsuite/tests/input/tex/Base.test.ts @@ -2302,7 +2302,7 @@ describe('Matrix', () => { toXmlMatch( tex2mml('\\eqalignno{a&b&c}'), ` - + c @@ -2321,7 +2321,7 @@ describe('Matrix', () => { toXmlMatch( tex2mml('\\leqalignno{a&b&c}'), ` - + c @@ -2340,7 +2340,7 @@ describe('Matrix', () => { toXmlMatch( tex2mml('\\eqalign{a&b&c}'), ` - + a @@ -2359,7 +2359,7 @@ describe('Matrix', () => { toXmlMatch( tex2mml('\\displaylines{a\\\\ b}'), ` - + a @@ -2776,7 +2776,7 @@ describe('Array', () => { toXmlMatch( tex2mml('\\eqalignno{a & & {\\hbox{(3)}}}'), ` - + @@ -4208,7 +4208,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a&=&b\\end{eqnarray}'), ` - + a @@ -4333,7 +4333,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{c}a\\end{darray}'), ` - + a @@ -4346,7 +4346,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{c}a\\\\b\\end{darray}'), ` - + a @@ -4364,7 +4364,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{rcl}a&=&b\\end{darray}'), ` - + a @@ -4383,7 +4383,7 @@ describe('Environments', () => { toXmlMatch( tex2mml('\\begin{darray}{rcl}a&=&b\\\\c&=&d\\end{darray}'), ` - + a @@ -4464,7 +4464,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{c}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -4486,7 +4486,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a&\\breakAlign{c}{t}=&b\\end{eqnarray}'), ` - + a @@ -4508,7 +4508,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -4530,7 +4530,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{t}a&=&b\\\\\\breakAlign{r}{t}c&=&d\\end{eqnarray}'), ` - + a @@ -4566,7 +4566,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{r}{tbmc}a&=&b\\end{eqnarray}'), ` - + a @@ -4588,7 +4588,7 @@ describe('BreakAlign', () => { toXmlMatch( tex2mml('\\begin{eqnarray}\\breakAlign{t}{t}a&=&b\\end{eqnarray}'), ` - + a @@ -9058,7 +9058,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('a\\label{A}'), ` - + (1) @@ -9074,7 +9074,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('a\\label{}'), ` - + (1) @@ -9090,7 +9090,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a\\label{A}\\\\c\\label{B}\\end{eqnarray}'), ` - + (1) @@ -9132,7 +9132,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('a\\label{A}\\ref{A}'), ` - + (1) @@ -9151,7 +9151,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('a\\label{A}\\ref{B}'), ` - + (1) @@ -9170,7 +9170,7 @@ describe('Referencing', () => { toXmlMatch( tex2mml('\\begin{eqnarray}a\\\\c\\nonumber\\end{eqnarray}'), ` - + (1) @@ -10035,7 +10035,7 @@ describe('Complete Array', () => { toXmlMatch( tex2mml('\\begin{eqnarray}{rcl}a & b \\\\d&c&c&c \\\\\\end{eqnarray}'), ` - + @@ -10225,7 +10225,7 @@ describe('User Defined Environments', () => { tex2mml('\\begin{smallmatrix} a & b \\\\ c & d \\end{smallmatrix}'), ` - + a @@ -10279,7 +10279,7 @@ describe('User Defined Environments', () => { tex2mml('\\begin{crampedsubarray}{cc} a & b \\\\ c & d \\end{crampedsubarray}'), ` - + a @@ -10304,7 +10304,7 @@ describe('User Defined Environments', () => { toXmlMatch( tex2mml('\\begin{gather}a\\end{gather}'), ` - + a diff --git a/testsuite/tests/input/tex/Physics.test.ts b/testsuite/tests/input/tex/Physics.test.ts index 0efcd477e..02c2296ea 100644 --- a/testsuite/tests/input/tex/Physics.test.ts +++ b/testsuite/tests/input/tex/Physics.test.ts @@ -8604,7 +8604,7 @@ describe('Physics7_11', () => { tex2mml('\\begin{smallmatrix} a & b \\\\ c & d \\end{smallmatrix}'), ` - + a @@ -8630,7 +8630,7 @@ describe('Physics7_11', () => { tex2mml('\\smqty{\\imat{3}}'), ` - + @@ -9232,7 +9232,7 @@ describe('Physics7_2', () => { tex2mml('\\smallmatrixquantity{Q}'), ` - + @@ -9248,7 +9248,7 @@ describe('Physics7_2', () => { tex2mml('\\smallmatrixquantity*{a & b \\\\ c & d}'), ` - + @@ -9277,7 +9277,7 @@ describe('Physics7_2', () => { - + @@ -9308,7 +9308,7 @@ describe('Physics7_2', () => { ( - + @@ -9339,7 +9339,7 @@ describe('Physics7_2', () => { | - + @@ -9368,7 +9368,7 @@ describe('Physics7_2', () => { tex2mml('\\smqty{a & b \\\\ c & d}'), ` - + @@ -9397,7 +9397,7 @@ describe('Physics7_2', () => { ( - + @@ -9428,7 +9428,7 @@ describe('Physics7_2', () => { - + @@ -9459,7 +9459,7 @@ describe('Physics7_2', () => { [ - + @@ -9490,7 +9490,7 @@ describe('Physics7_2', () => { | - + @@ -9524,7 +9524,7 @@ describe('Physics7_3', () => { ( - + @@ -9538,7 +9538,7 @@ describe('Physics7_3', () => { ( - + @@ -9558,7 +9558,7 @@ describe('Physics7_3', () => { - + @@ -9572,7 +9572,7 @@ describe('Physics7_3', () => { - + @@ -9592,7 +9592,7 @@ describe('Physics7_3', () => { [ - + @@ -9606,7 +9606,7 @@ describe('Physics7_3', () => { [ - + @@ -9626,7 +9626,7 @@ describe('Physics7_3', () => { | - + @@ -9640,7 +9640,7 @@ describe('Physics7_3', () => { | - + @@ -9660,7 +9660,7 @@ describe('Physics7_3', () => { ( - + @@ -9691,7 +9691,7 @@ describe('Physics7_3', () => { - + @@ -9722,7 +9722,7 @@ describe('Physics7_3', () => { [ - + @@ -9753,7 +9753,7 @@ describe('Physics7_3', () => { | - + @@ -9843,7 +9843,7 @@ describe('Physics7_4', () => { | - + @@ -9910,7 +9910,7 @@ describe('Physics7_4', () => { | - + @@ -10183,7 +10183,7 @@ describe('Physics7_6', () => { ( - + @@ -10220,7 +10220,7 @@ describe('Physics7_6', () => { ( - + @@ -10268,7 +10268,7 @@ describe('Physics7_6', () => { ( - + @@ -10298,7 +10298,7 @@ describe('Physics7_6', () => { ( - + @@ -10324,7 +10324,7 @@ describe('Physics7_6', () => { ( - + @@ -10421,7 +10421,7 @@ describe('Physics7_6', () => { ( - + @@ -10559,7 +10559,7 @@ describe('Physics7_6', () => { ( - + @@ -10604,7 +10604,7 @@ describe('Physics7_6', () => { ( - + @@ -10645,7 +10645,7 @@ describe('Physics7_6', () => { ( - + @@ -10665,7 +10665,7 @@ describe('Physics7_6', () => { ( - + @@ -10685,7 +10685,7 @@ describe('Physics7_6', () => { ( - + @@ -10711,7 +10711,7 @@ describe('Physics7_6', () => { ( - + @@ -10748,7 +10748,7 @@ describe('Physics7_6', () => { ( - + diff --git a/testsuite/tests/input/tex/Tag.test.ts b/testsuite/tests/input/tex/Tag.test.ts index e85c0db51..08f005d9d 100644 --- a/testsuite/tests/input/tex/Tag.test.ts +++ b/testsuite/tests/input/tex/Tag.test.ts @@ -8,7 +8,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('a'), ` - + (1) @@ -24,7 +24,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + (1) @@ -40,7 +40,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -66,7 +66,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + (1) @@ -82,7 +82,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + (1) @@ -98,7 +98,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -111,7 +111,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -134,7 +134,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -147,7 +147,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + (1) @@ -166,7 +166,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + (1) @@ -185,7 +185,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + (1) @@ -204,7 +204,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a=b\\label{A}\\\\ c&=d \\label{B}\\end{align}'), ` - + (1) @@ -273,7 +273,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + (1) @@ -289,7 +289,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + (A) @@ -305,7 +305,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + (A) @@ -329,7 +329,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + (A) @@ -353,7 +353,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + (1) @@ -369,7 +369,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + (A) @@ -385,7 +385,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + (A) @@ -411,7 +411,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + (A) @@ -435,7 +435,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + (1) @@ -454,7 +454,7 @@ describe('TagAll', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + (A) @@ -475,7 +475,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A) @@ -507,7 +507,7 @@ describe('TagAll', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A) @@ -548,7 +548,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('a\\tag{0}'), ` - + (0) @@ -564,7 +564,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + a @@ -577,7 +577,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{split}a\\end{split}'), ` - + a @@ -590,7 +590,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -613,7 +613,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + a @@ -626,7 +626,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + a @@ -639,7 +639,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -652,7 +652,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -675,7 +675,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -688,7 +688,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + a @@ -704,7 +704,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + a @@ -720,7 +720,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + a @@ -781,7 +781,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + a @@ -794,7 +794,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + (A) @@ -810,7 +810,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + (A) @@ -831,7 +831,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + (A) @@ -855,7 +855,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + a @@ -868,7 +868,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + (A) @@ -884,7 +884,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + (A) @@ -907,7 +907,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + (A) @@ -931,7 +931,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + a @@ -947,7 +947,7 @@ describe('TagNone', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + (A) @@ -968,7 +968,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A) @@ -997,7 +997,7 @@ describe('TagNone', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A) @@ -1038,7 +1038,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + (1) @@ -1054,7 +1054,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{split}a\\end{split}'), ` - + a @@ -1067,7 +1067,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\end{multline}'), ` - + a @@ -1093,7 +1093,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{}\\end{align}'), ` - + (1) @@ -1109,7 +1109,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + (1) @@ -1125,7 +1125,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\notag\\end{align}'), ` - + a @@ -1138,7 +1138,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{multline}a\\\\ b\\\\ c\\notag\\end{multline}'), ` - + a @@ -1161,7 +1161,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\notag\\end{align}'), ` - + a @@ -1174,7 +1174,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + (1) @@ -1193,7 +1193,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{B}'), ` - + (1) @@ -1212,7 +1212,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\eqref{A}'), ` - + (1) @@ -1231,7 +1231,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a=b\\label{A}\\\\ c&=d \\label{B}\\end{align}'), ` - + (1) @@ -1300,7 +1300,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\end{align}'), ` - + (1) @@ -1316,7 +1316,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\end{align}'), ` - + (A) @@ -1332,7 +1332,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\end{align}'), ` - + (A) @@ -1356,7 +1356,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\\\b\\tag{B}\\end{align}'), ` - + (A) @@ -1380,7 +1380,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}'), ` - + (1) @@ -1396,7 +1396,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}'), ` - + (A) @@ -1412,7 +1412,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}'), ` - + (A) @@ -1438,7 +1438,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}' ), ` - + (A) @@ -1462,7 +1462,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\label{A}\\end{align}\\ref{A}'), ` - + (1) @@ -1481,7 +1481,7 @@ describe('TagAms', () => { toXmlMatch( tex2mml('\\begin{align}a\\tag{A}\\label{A}\\end{align}\\ref{A}'), ` - + (A) @@ -1502,7 +1502,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A) @@ -1534,7 +1534,7 @@ describe('TagAms', () => { '\\begin{align}a\\tag{A}\\label{A}\\\\b\\tag{B}\\label{B}\\end{align}\\ref{A}\\ref{B}' ), ` - + (A)