Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests to correspond with the changes for mathjax/MathJax#3300 #1164

Merged
merged 10 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
410 changes: 184 additions & 226 deletions testsuite/tests/input/tex/Ams.test.ts

Large diffs are not rendered by default.

54 changes: 26 additions & 28 deletions testsuite/tests/input/tex/Amscd.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('AmsCD', () => {
toXmlMatch(
tex2mml('\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('AmsCD', () => {
toXmlMatch(
tex2mml('\\begin{CD}A @<<< B @>>> C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}'),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&lt;&lt;&lt; B @&gt;&gt;&gt; C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&lt;&lt;&lt; B @&gt;&gt;&gt; C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&lt;&lt;&lt; B @&gt;&gt;&gt; C\\\\@. @| @AAA\\\\@. D @= E\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('AmsCD', () => {
toXmlMatch(
tex2mml('\\begin{CD}A @>a>b> B\\\\@VlVrV @AlArA\\\\C @<a<b< D\\end{CD}'),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&gt;a&gt;b&gt; B\\\\@VlVrV @AlArA\\\\C @&lt;a&lt;b&lt; D\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;a&gt;b&gt; B\\\\@VlVrV @AlArA\\\\C @&lt;a&lt;b&lt; D\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;a&gt;b&gt; B\\\\@VlVrV @AlArA\\\\C @&lt;a&lt;b&lt; D\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -234,7 +234,7 @@ describe('AmsCD', () => {
'\\begin{CD}A @>>> B@>\\text{very long label}>>C\\\\@VVV @VVV @VVV\\\\D @>>> E@>>> F\\end{CD}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&gt;&gt;&gt; B@&gt;\\text{very long label}&gt;&gt;C\\\\@VVV @VVV @VVV\\\\D @&gt;&gt;&gt; E@&gt;&gt;&gt; F\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B@&gt;\\text{very long label}&gt;&gt;C\\\\@VVV @VVV @VVV\\\\D @&gt;&gt;&gt; E@&gt;&gt;&gt; F\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B@&gt;\\text{very long label}&gt;&gt;C\\\\@VVV @VVV @VVV\\\\D @&gt;&gt;&gt; E@&gt;&gt;&gt; F\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -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}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -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}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @&gt;&gt;&gt; B @&gt;{\\text{very long label}}&gt;&gt; C \\\\@VVV @VVV @VVV \\\\D @&gt;&gt;&gt; E @&gt;{\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}\\phantom{\\text{very long label}}}&gt;&gt; F\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -470,14 +470,12 @@ describe('AmsCD', () => {
<mrow data-mjx-texclass="ORD" data-latex="{\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}\\phantom{\\text{very long label}}}">
<mrow data-mjx-texclass="ORD" data-latex="\\rlap{\\scriptstyle{\\ \\ \\ \\text{shorter}}}">
<mpadded width="0">
<mstyle displaystyle="false" scriptlevel="1" data-latex="\\scriptstyle{\\ \\ \\ \\text{shorter}}">
<mrow data-mjx-texclass="ORD" data-latex="{\\text{shorter}}">
<mtext>&#xA0;</mtext>
<mtext>&#xA0;</mtext>
<mtext>&#xA0;</mtext>
<mtext data-latex="\\text{shorter}">shorter</mtext>
</mrow>
</mstyle>
<mrow data-mjx-texclass="ORD" data-latex="\\scriptstyle{\\ \\ \\ \\text{shorter}}">
<mtext>&#xA0;</mtext>
<mtext>&#xA0;</mtext>
<mtext>&#xA0;</mtext>
<mtext data-latex="\\text{shorter}">shorter</mtext>
</mrow>
</mpadded>
</mrow>
<mrow data-mjx-texclass="ORD" data-latex="\\phantom{\\text{very long label}}">
Expand All @@ -502,7 +500,7 @@ describe('AmsCD', () => {
'\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -574,7 +572,7 @@ describe('AmsCD', () => {
'\\minCDarrowheight{4cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\minCDarrowheight{4cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\minCDarrowheight{4cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\minCDarrowheight{4cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -646,7 +644,7 @@ describe('AmsCD', () => {
'\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @>a>> B\\\\@VVbV @VVcV\\\\C @>d>> D\\end{CD}'
),
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" displaystyle="true" data-latex-item="{CD}" data-latex="\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\minCDarrowheight{4cm}\\minCDarrowwidth{5cm}\\begin{CD}A @&gt;a&gt;&gt; B\\\\@VVbV @VVcV\\\\C @&gt;d&gt;&gt; D\\end{CD}">
<mtr>
<mtd>
<mi data-latex="A">A</mi>
Expand Down Expand Up @@ -715,20 +713,20 @@ describe('AmsCD', () => {
it('Suspicious Return', () =>
toXmlMatch(
tex2mml('\\begin{CD}A @Ra>> BaD\\end{CD}'),
`<math xmlns=\"http://www.w3.org/1998/Math/MathML\" data-latex=\"\\begin{CD}A @Ra&gt;&gt; BaD\\end{CD}\" display=\"block\">
<mtable columnspacing=\"5pt\" rowspacing=\"5pt\" displaystyle=\"true\" data-latex-item=\"{CD}\" data-latex=\"\\begin{CD}A @Ra&gt;&gt; BaD\\end{CD}\">
`<math xmlns="http://www.w3.org/1998/Math/MathML" data-latex="\\begin{CD}A @Ra&gt;&gt; BaD\\end{CD}" display="block">
<mtable columnspacing="5pt" rowspacing="5pt" data-latex-item="{CD}" data-latex="\\begin{CD}A @Ra&gt;&gt; BaD\\end{CD}">
<mtr>
<mtd>
<mi data-latex=\"A\">A</mi>
<mrow data-mjx-texclass=\"ORD\">
<mo data-latex=\"@\">@</mo>
<mi data-latex="A">A</mi>
<mrow data-mjx-texclass="ORD">
<mo data-latex="@">@</mo>
</mrow>
<mi data-latex=\"R\">R</mi>
<mi data-latex=\"a\">a</mi>
<mo data-latex=\"&gt;\">&gt;&gt;</mo>
<mi data-latex=\"B\">B</mi>
<mi data-latex=\"a\">a</mi>
<mi data-latex=\"D\">D</mi>
<mi data-latex="R">R</mi>
<mi data-latex="a">a</mi>
<mo data-latex="&gt;">&gt;&gt;</mo>
<mi data-latex="B">B</mi>
<mi data-latex="a">a</mi>
<mi data-latex="D">D</mi>
</mtd>
</mtr>
</mtable>
Expand Down
Loading