mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-01-08 23:11:52 +00:00
MOODLE-556: Added basic tests for the Math package
This commit is contained in:
parent
ef1c363119
commit
c2a8ca7681
98
tests/HTMLPurifier/HTMLModule/MathBasicTest.php
Normal file
98
tests/HTMLPurifier/HTMLModule/MathBasicTest.php
Normal file
@ -0,0 +1,98 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Positive tests (expected to pass) have been extracted from Mozilla's torture
|
||||
* tests for MathML. See:
|
||||
* https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/MathML_Torture_Test
|
||||
* Comments have been removed.
|
||||
*
|
||||
* Negative tests (those expected to fail) have been extracted from
|
||||
* W3C's MathML Test Suite. See:
|
||||
* http://www.w3.org/Math/testsuite/build/mathml3tests.zip -> ErrorHandling folder
|
||||
*/
|
||||
class HTMLPurifier_HTMLModule_MathBasicTest extends HTMLPurifier_HTMLModuleHarness
|
||||
{
|
||||
|
||||
public function setup() {
|
||||
|
||||
parent::setup();
|
||||
$this->config->set('HTML.Math', true);
|
||||
|
||||
// We load each snippet and its purified version each into a
|
||||
// separate XML document. This normalizes some self-closing
|
||||
// tags which can be either <a></a> or <a/> or <a /> into a
|
||||
// common format to compare the strings properly.
|
||||
$this->pre = new DOMDocument();
|
||||
$this->post = new DOMDocument();
|
||||
|
||||
}
|
||||
|
||||
// Correctly formed MathML trees
|
||||
public function testGood()
|
||||
{
|
||||
|
||||
foreach (glob('MathML/basic/good/*.mml') as $filename) {
|
||||
|
||||
$snippet = file_get_contents($filename);
|
||||
|
||||
$this->pre->loadXML($snippet);
|
||||
$this->pre->normalizeDocument();
|
||||
|
||||
$this->post->loadXML($this->purifier->purify($snippet, $this->config));
|
||||
$this->post->normalizeDocument();
|
||||
|
||||
$this->assertIdentical($this->pre->saveXML(), $this->post->saveXML());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Incorrectly formed MathML trees
|
||||
public function testBad() {
|
||||
|
||||
foreach (glob('MathML/basic/bad/*.mml') as $filename) {
|
||||
|
||||
$snippet = file_get_contents($filename);
|
||||
|
||||
$this->pre->loadXML($snippet);
|
||||
$this->pre->normalizeDocument();
|
||||
|
||||
$this->post->loadXML($this->purifier->purify($snippet, $this->config));
|
||||
$this->post->normalizeDocument();
|
||||
|
||||
$this->assertFalse($this->pre->saveXML() == $this->post->saveXML());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Incorrectly formed MathML trees that yield an error
|
||||
public function testError() {
|
||||
|
||||
$snippet = '' .
|
||||
'<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<math>
|
||||
<msup>
|
||||
<mn>5</mn>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</math>
|
||||
</math>';
|
||||
|
||||
$this->expectError();
|
||||
|
||||
$this->pre->loadXML($snippet);
|
||||
$this->pre->normalizeDocument();
|
||||
|
||||
$this->post->loadXML($this->purifier->purify($snippet, $this->config));
|
||||
$this->post->normalizeDocument();
|
||||
|
||||
$this->assertFalse($this->pre->saveXML() == $this->post->saveXML());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// vim: et sw=4 sts=4
|
10
tests/MathML/basic/bad/badAttribs2.mml
Normal file
10
tests/MathML/basic/bad/badAttribs2.mml
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<msup foo="blue">
|
||||
<mn>2</mn>
|
||||
<mn>5</mn>
|
||||
</msup>
|
||||
<mo bar="2ex">+</mo>
|
||||
<mi>x</mi>
|
||||
</math>
|
113
tests/MathML/basic/bad/badBvar1.mml
Normal file
113
tests/MathML/basic/bad/badBvar1.mml
Normal file
@ -0,0 +1,113 @@
|
||||
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>correct:</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<ci>x</ci>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>correct w/ degree</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<ci>x</ci>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>missing &amp;lt;ci&amp;gt;:</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar></bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>missing &amp;lt;ci&amp;gt; w/ degree:</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>2 &amp;lt;ci&amp;gt;s</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<ci>x</ci>
|
||||
<ci>y</ci>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>2 w/ degree</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<ci>x</ci>
|
||||
<ci>y</ci>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>&amp;#x003c;mi/&amp;#x0003E;used</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<mi>x</mi>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>&amp;#x003c;mi/&amp;#x0003E;used w/ degree</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<mi>x</mi>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>missing &amp;lt;ci&amp;gt;, 2 degrees</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<degree>
|
||||
<cn>4</cn>
|
||||
</degree>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
226
tests/MathML/basic/bad/badCondContent1.mml
Normal file
226
tests/MathML/basic/bad/badCondContent1.mml
Normal file
@ -0,0 +1,226 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar></bvar>
|
||||
<condition></condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar></bvar>
|
||||
<condition>
|
||||
<apply></apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply></apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition></condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<reln></reln>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<int></int>
|
||||
<bvar>
|
||||
<ci>2</ci>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<ci>x</ci>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<diff></diff>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<gt></gt>
|
||||
<cn>2</cn>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<divide></divide>
|
||||
<cn>2</cn>
|
||||
<ci>x</ci>
|
||||
<ci>y</ci>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<exp></exp>
|
||||
<cn>2</cn>
|
||||
<ci>x</ci>
|
||||
<ci>y</ci>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<limit></limit>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<gt></gt>
|
||||
<cn>2</cn>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<log></log>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<gt></gt>
|
||||
<cn>2</cn>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<moment></moment>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<gt></gt>
|
||||
<cn>2</cn>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<quotient></quotient>
|
||||
<bvar>
|
||||
<degree>
|
||||
<ci>2</ci>
|
||||
</degree>
|
||||
</bvar>
|
||||
<condition>
|
||||
<apply>
|
||||
<gt></gt>
|
||||
<cn>2</cn>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</condition>
|
||||
<apply></apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<apply>
|
||||
<times></times>
|
||||
<ci>2</ci>
|
||||
<ci>5</ci>
|
||||
</apply>
|
||||
<apply>
|
||||
<times></times>
|
||||
<ci>2</ci>
|
||||
<apply>
|
||||
<ci>5</ci>
|
||||
</apply>
|
||||
</apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
30
tests/MathML/basic/bad/badMoment1.mml
Normal file
30
tests/MathML/basic/bad/badMoment1.mml
Normal file
@ -0,0 +1,30 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mspace width="2em"></mspace>
|
||||
<apply>
|
||||
<moment></moment>
|
||||
<degree>
|
||||
<cn>3</cn>
|
||||
</degree>
|
||||
<momentabout>
|
||||
<cn>0</cn>
|
||||
</momentabout>
|
||||
<momentabout>
|
||||
<cn>4</cn>
|
||||
</momentabout>
|
||||
<ci>X</ci>
|
||||
</apply>
|
||||
<mspace width="2em"></mspace>
|
||||
<apply>
|
||||
<moment></moment>
|
||||
<degree>
|
||||
<cn>3</cn>
|
||||
</degree>
|
||||
<foo>x</foo>
|
||||
<momentabout>
|
||||
<cn>0</cn>
|
||||
</momentabout>
|
||||
<ci>X</ci>
|
||||
</apply>
|
||||
</math>
|
23
tests/MathML/basic/bad/badPiecewise1.mml
Normal file
23
tests/MathML/basic/bad/badPiecewise1.mml
Normal file
@ -0,0 +1,23 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<piecewise>
|
||||
<piece>
|
||||
<cn>0</cn>
|
||||
<apply>
|
||||
<lt></lt>
|
||||
<ci>x</ci>
|
||||
<cn>5</cn>
|
||||
</apply>
|
||||
</piece>
|
||||
<foo>
|
||||
<ci>x</ci>
|
||||
</foo>
|
||||
<otherwise>
|
||||
<ci>y</ci>
|
||||
</otherwise>
|
||||
<otherwise>
|
||||
<ci>x</ci>
|
||||
</otherwise>
|
||||
</piecewise>
|
||||
</math>
|
21
tests/MathML/basic/bad/badTag1.mml
Normal file
21
tests/MathML/basic/bad/badTag1.mml
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<msup>
|
||||
<mn>5</mn>
|
||||
<foo>2</foo>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<msup>
|
||||
<foo>2</foo>
|
||||
<mn>5</mn>
|
||||
</msup>
|
||||
<mo>+</mo>
|
||||
<mrow>
|
||||
<mn>5</mn>
|
||||
<foo>+</foo>
|
||||
<mn>5</mn>
|
||||
</mrow>
|
||||
<mo>+</mo>
|
||||
<foo></foo>
|
||||
</math>
|
9
tests/MathML/basic/bad/badTagPhantom2.mml
Normal file
9
tests/MathML/basic/bad/badTagPhantom2.mml
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mn>2</mn>
|
||||
<mo>+</mo>
|
||||
<mphantom>
|
||||
<foo>14</foo>
|
||||
</mphantom>
|
||||
</math>
|
5
tests/MathML/basic/bad/deprecated-mtd1.mml
Normal file
5
tests/MathML/basic/bad/deprecated-mtd1.mml
Normal file
@ -0,0 +1,5 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtd></mtd>
|
||||
</math>
|
7
tests/MathML/basic/bad/deprecated-mtd2.mml
Normal file
7
tests/MathML/basic/bad/deprecated-mtd2.mml
Normal file
@ -0,0 +1,7 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtd>
|
||||
<mrow></mrow>
|
||||
</mtd>
|
||||
</math>
|
18
tests/MathML/basic/bad/deprecated-test3.mml
Normal file
18
tests/MathML/basic/bad/deprecated-test3.mml
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mn>2</mn>
|
||||
<mtr>
|
||||
<mn>5</mn>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd></mtd>
|
||||
</mtr>
|
||||
<mtd>
|
||||
<mn>4</mn>
|
||||
<mo>+</mo>
|
||||
<mn>3</mn>
|
||||
</mtd>
|
||||
</mtable>
|
||||
</math>
|
1046
tests/MathML/basic/bad/emptyContent.mml
Normal file
1046
tests/MathML/basic/bad/emptyContent.mml
Normal file
File diff suppressed because it is too large
Load Diff
14
tests/MathML/basic/bad/mrootE2.mml
Normal file
14
tests/MathML/basic/bad/mrootE2.mml
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mrow>
|
||||
<mroot>
|
||||
<mn>3</mn>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</mroot>
|
||||
<mroot>
|
||||
<mn>3</mn>
|
||||
</mroot>
|
||||
</mrow>
|
||||
</math>
|
21
tests/MathML/basic/bad/mtable1.mml
Normal file
21
tests/MathML/basic/bad/mtable1.mml
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable columnalign="right left center" rowlines="solid none" equalrows="false" frame="solid" framespacing="1em 2ex">
|
||||
<mtr>
|
||||
<mn>1111.23</mn>
|
||||
<mn>0</mn>
|
||||
<mn>0</mn>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mn>0</mn>
|
||||
<mn>1123</mn>
|
||||
<mn>0</mn>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mn>0.2</mn>
|
||||
<mn>0</mn>
|
||||
<mn>1123</mn>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
202
tests/MathML/basic/bad/noChildContent.mml
Normal file
202
tests/MathML/basic/bad/noChildContent.mml
Normal file
@ -0,0 +1,202 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>apply</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<apply></apply>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>reln</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<reln></reln>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>fn</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<fn></fn>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>interval</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<interval></interval>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>condition</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<condition></condition>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>declare</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<declare></declare>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>lambda</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<lambda></lambda>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>domainofapp</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<domainofapplication></domainofapplication>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>piecewise</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<piecewise></piecewise>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>piece</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<piece></piece>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>otherwise</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<otherwise></otherwise>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>lowlimit</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<lowlimit></lowlimit>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>uplimit</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<uplimit></uplimit>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>bvar</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar></bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>degree</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<degree></degree>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>set</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<set></set>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>list</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<list></list>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>moment</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<moment></moment>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>momentabout</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<momentabout></momentabout>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>vector</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<vector></vector>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>matrix</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<matrix></matrix>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>matrixrow</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<matrix>
|
||||
<matrixrow></matrixrow>
|
||||
</matrix>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>semantics</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<semantics></semantics>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>annotation</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<semantics>
|
||||
<annotation></annotation>
|
||||
</semantics>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
172
tests/MathML/basic/bad/noChildPresentation.mml
Normal file
172
tests/MathML/basic/bad/noChildPresentation.mml
Normal file
@ -0,0 +1,172 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>mrow</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mrow></mrow>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>frac</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mfrac></mfrac>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>sqrt</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<msqrt></msqrt>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>root</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mroot></mroot>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>style</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mstyle></mstyle>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>error</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<merror></merror>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>padded</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mpadded></mpadded>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>phantom</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mphantom></mphantom>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>fenced</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mfenced></mfenced>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>enclose</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<menclose></menclose>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>sub</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<msub></msub>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>sup</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<msup></msup>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>subsup</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<msubsup></msubsup>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>under</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<munder></munder>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>over</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mover></mover>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>underover</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<munderover></munderover>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>multiscripts</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mmultiscripts></mmultiscripts>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>table</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mtable></mtable>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>table row</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mtable>
|
||||
<mtr></mtr>
|
||||
</mtable>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>table cell</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd></mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
93
tests/MathML/basic/bad/tooFewContentContainer.mml
Normal file
93
tests/MathML/basic/bad/tooFewContentContainer.mml
Normal file
@ -0,0 +1,93 @@
|
||||
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>reln</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<reln>
|
||||
<lt></lt>
|
||||
</reln>
|
||||
<mo>,</mo>
|
||||
<reln>
|
||||
<lt></lt>
|
||||
<ci>a</ci>
|
||||
</reln>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>interval</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<interval>
|
||||
<ci>2</ci>
|
||||
</interval>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>lambda</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<lambda>
|
||||
<bvar>
|
||||
<ci>x</ci>
|
||||
</bvar>
|
||||
</lambda>
|
||||
<mo>,</mo>
|
||||
<lambda>
|
||||
<apply>
|
||||
<ci>x</ci>
|
||||
</apply>
|
||||
</lambda>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>bvar</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<bvar>
|
||||
<degree>
|
||||
<cn>2</cn>
|
||||
</degree>
|
||||
</bvar>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>set</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<set>
|
||||
<condition>
|
||||
<reln>
|
||||
<lt></lt>
|
||||
<ci>x</ci>
|
||||
<cn>5</cn>
|
||||
</reln>
|
||||
</condition>
|
||||
</set>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd>
|
||||
<mtext>list</mtext>
|
||||
</mtd>
|
||||
<mtd>
|
||||
<list>
|
||||
<condition>
|
||||
<reln>
|
||||
<lt></lt>
|
||||
<ci>x</ci>
|
||||
<cn>5</cn>
|
||||
</reln>
|
||||
</condition>
|
||||
</list>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</math>
|
12
tests/MathML/basic/good/1.mml
Normal file
12
tests/MathML/basic/good/1.mml
Normal file
@ -0,0 +1,12 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<msup>
|
||||
<mi>y</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</mrow>
|
||||
</math>
|
31
tests/MathML/basic/good/10.mml
Normal file
31
tests/MathML/basic/good/10.mml
Normal file
@ -0,0 +1,31 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<munder>
|
||||
<mo>&sum;</mo>
|
||||
<mrow>
|
||||
<mfrac linethickness="0px">
|
||||
<mrow>
|
||||
<mn>0</mn>
|
||||
<mo>&leq;</mo>
|
||||
<mi>i</mi>
|
||||
<mo>&leq;</mo>
|
||||
<mi>m</mi>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mn>0</mn>
|
||||
<mo>&lt;</mo>
|
||||
<mi>j</mi>
|
||||
<mo>&lt;</mo>
|
||||
<mi>n</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</munder>
|
||||
<mi>P</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>i</mi>
|
||||
<mo>,</mo>
|
||||
<mi>j</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
</mrow>
|
||||
</math>
|
11
tests/MathML/basic/good/11.mml
Normal file
11
tests/MathML/basic/good/11.mml
Normal file
@ -0,0 +1,11 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>y</mi>
|
||||
</mrow>
|
||||
</msup>
|
||||
</mrow>
|
||||
</math>
|
52
tests/MathML/basic/good/12.mml
Normal file
52
tests/MathML/basic/good/12.mml
Normal file
@ -0,0 +1,52 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<munderover>
|
||||
<mo>&sum;</mo>
|
||||
<mrow>
|
||||
<mi>i</mi>
|
||||
<mo>=</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
<mi>p</mi>
|
||||
</munderover>
|
||||
<munderover>
|
||||
<mo>&sum;</mo>
|
||||
<mrow>
|
||||
<mi>j</mi>
|
||||
<mo>=</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
<mi>q</mi>
|
||||
</munderover>
|
||||
<munderover>
|
||||
<mo>&sum;</mo>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mo>=</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
<mi>r</mi>
|
||||
</munderover>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mrow>
|
||||
<mi>i</mi>
|
||||
<mi>j</mi>
|
||||
</mrow>
|
||||
</msub>
|
||||
<msub>
|
||||
<mi>b</mi>
|
||||
<mrow>
|
||||
<mi>j</mi>
|
||||
<mi>k</mi>
|
||||
</mrow>
|
||||
</msub>
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mi>i</mi>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mrow>
|
||||
</math>
|
33
tests/MathML/basic/good/13.mml
Normal file
33
tests/MathML/basic/good/13.mml
Normal file
@ -0,0 +1,33 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<msqrt>
|
||||
<mn>1</mn>
|
||||
<mo>+</mo>
|
||||
<mi>x</mi>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</msqrt>
|
||||
</mrow>
|
||||
</math>
|
51
tests/MathML/basic/good/14.mml
Normal file
51
tests/MathML/basic/good/14.mml
Normal file
@ -0,0 +1,51 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mfrac>
|
||||
<msup>
|
||||
<mo>∂</mo>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mrow>
|
||||
<mo>∂</mo>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<msup>
|
||||
<mo>∂</mo>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mrow>
|
||||
<mo>∂</mo>
|
||||
<msup>
|
||||
<mi>y</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
<msup>
|
||||
<mrow>
|
||||
<mo minsize="150%">|</mo>
|
||||
<mi>φ</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mi mathvariant="normal">i</mi>
|
||||
<mi>y</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
<mo minsize="150%">|</mo>
|
||||
</mrow>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<mo>=</mo>
|
||||
<mn>0</mn>
|
||||
</mrow>
|
||||
</math>
|
14
tests/MathML/basic/good/15.mml
Normal file
14
tests/MathML/basic/good/15.mml
Normal file
@ -0,0 +1,14 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msup>
|
||||
<mn>2</mn>
|
||||
<msup>
|
||||
<mn>2</mn>
|
||||
<msup>
|
||||
<mn>2</mn>
|
||||
<mi>x</mi>
|
||||
</msup>
|
||||
</msup>
|
||||
</msup>
|
||||
</mrow>
|
||||
</math>
|
13
tests/MathML/basic/good/16.mml
Normal file
13
tests/MathML/basic/good/16.mml
Normal file
@ -0,0 +1,13 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msubsup>
|
||||
<mo stretchy="false">&int;</mo>
|
||||
<mn>1</mn>
|
||||
<mi>x</mi>
|
||||
</msubsup>
|
||||
<mfrac>
|
||||
<mrow><mi>d</mi><mi>t</mi></mrow>
|
||||
<mi>t</mi>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
11
tests/MathML/basic/good/17.mml
Normal file
11
tests/MathML/basic/good/17.mml
Normal file
@ -0,0 +1,11 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msub>
|
||||
<mo>∬</mo>
|
||||
<mi>D</mi>
|
||||
</msub>
|
||||
<mi>d</mi><mi>x</mi>
|
||||
<mspace width="thinmathspace"/>
|
||||
<mi>d</mi><mi>y</mi>
|
||||
</mrow>
|
||||
</math>
|
62
tests/MathML/basic/good/18.mml
Normal file
62
tests/MathML/basic/good/18.mml
Normal file
@ -0,0 +1,62 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mi>f</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>x</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
<mo>=</mo>
|
||||
<mrow>
|
||||
<mo>{</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mn>1</mn>
|
||||
<mo>/</mo>
|
||||
<mn>3</mn>
|
||||
</mrow>
|
||||
</mtd>
|
||||
<mtd columnalign="left">
|
||||
<mrow>
|
||||
<mtext>if&nbsp;</mtext>
|
||||
<mn>0</mn>
|
||||
<mo>&leq;</mo>
|
||||
<mi>x</mi>
|
||||
<mo>&leq;</mo>
|
||||
<mn>1</mn>
|
||||
<mo>;</mo>
|
||||
</mrow>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mo>/</mo>
|
||||
<mn>3</mn>
|
||||
</mrow>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mtext>if&nbsp;</mtext>
|
||||
<mn>3</mn>
|
||||
<mo>&leq;</mo>
|
||||
<mi>x</mi>
|
||||
<mo>&leq;</mo>
|
||||
<mn>4</mn>
|
||||
<mo>;</mo>
|
||||
</mrow>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mn>0</mn>
|
||||
</mtd>
|
||||
<mtd columnalign="left">
|
||||
<mtext>elsewhere.</mtext>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
</mrow>
|
||||
</mrow>
|
||||
</math>
|
15
tests/MathML/basic/good/19.mml
Normal file
15
tests/MathML/basic/good/19.mml
Normal file
@ -0,0 +1,15 @@
|
||||
<math display="block">
|
||||
<mover>
|
||||
<mrow>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<mo>...</mo>
|
||||
<mo>+</mo>
|
||||
<mi>x</mi>
|
||||
</mrow>
|
||||
<mover>
|
||||
<mo>&OverBrace;</mo>
|
||||
<mrow><mi>k</mi> <mspace width="thinmathspace"/> <mtext>times</mtext></mrow>
|
||||
</mover>
|
||||
</mover>
|
||||
</math>
|
10
tests/MathML/basic/good/2.mml
Normal file
10
tests/MathML/basic/good/2.mml
Normal file
@ -0,0 +1,10 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mmultiscripts>
|
||||
<mi>F</mi>
|
||||
<mn>3</mn><none/>
|
||||
<mprescripts/>
|
||||
<mn>2</mn><none/>
|
||||
</mmultiscripts>
|
||||
</mrow>
|
||||
</math>
|
11
tests/MathML/basic/good/20.mml
Normal file
11
tests/MathML/basic/good/20.mml
Normal file
@ -0,0 +1,11 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>y</mi>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</msub>
|
||||
</mrow>
|
||||
</math>
|
34
tests/MathML/basic/good/21.mml
Normal file
34
tests/MathML/basic/good/21.mml
Normal file
@ -0,0 +1,34 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<munder>
|
||||
<mo>&sum;</mo>
|
||||
<mrow>
|
||||
<mi>p</mi>
|
||||
<mtext>&nbsp;prime</mtext>
|
||||
</mrow>
|
||||
</munder>
|
||||
<mi>f</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>p</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
<mo>=</mo>
|
||||
<msub>
|
||||
<mo stretchy="false">&int;</mo>
|
||||
<mrow>
|
||||
<mi>t</mi>
|
||||
<mo>&gt;</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
</msub>
|
||||
<mi>f</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>t</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
<mspace width="thinmathspace"/>
|
||||
<mi>d</mi>
|
||||
<mi>&pi;</mi>
|
||||
<mo stretchy="false">(</mo>
|
||||
<mi>t</mi>
|
||||
<mo stretchy="false">)</mo>
|
||||
</mrow>
|
||||
</math>
|
58
tests/MathML/basic/good/22.mml
Normal file
58
tests/MathML/basic/good/22.mml
Normal file
@ -0,0 +1,58 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mo stretchy="false">{</mo>
|
||||
<munder>
|
||||
<mrow>
|
||||
<mover>
|
||||
<mrow>
|
||||
<mpadded width="0em"><mphantom><mo>(</mo></mphantom></mpadded>
|
||||
<mi>a</mi>
|
||||
<mo>,</mo>
|
||||
<mo>...</mo>
|
||||
<mo>,</mo>
|
||||
<mi>a</mi>
|
||||
</mrow>
|
||||
<mover>
|
||||
<mo>&OverBrace;</mo>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mtext>&nbsp;</mtext>
|
||||
<mi>a</mi>
|
||||
<mtext>\'s</mtext>
|
||||
</mrow>
|
||||
</mover>
|
||||
</mover>
|
||||
<mo>,</mo>
|
||||
<mover>
|
||||
<mrow>
|
||||
<mpadded width="0em"><mphantom><mo>(</mo></mphantom></mpadded>
|
||||
<mi>b</mi>
|
||||
<mo>,</mo>
|
||||
<mo>...</mo>
|
||||
<mo>,</mo>
|
||||
<mi>b</mi>
|
||||
</mrow>
|
||||
<mover>
|
||||
<mo>&OverBrace;</mo>
|
||||
<mrow>
|
||||
<mi>&ell;</mi>
|
||||
<mtext>&nbsp;</mtext>
|
||||
<mi>b</mi>
|
||||
<mtext>\'s</mtext>
|
||||
</mrow>
|
||||
</mover>
|
||||
</mover>
|
||||
</mrow>
|
||||
<munder>
|
||||
<mo>&UnderBrace;</mo>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mo>+</mo>
|
||||
<mi>&ell;</mi>
|
||||
<mtext>&nbsp;elements</mtext>
|
||||
</mrow>
|
||||
</munder>
|
||||
</munder>
|
||||
<mo stretchy="false">}</mo>
|
||||
</mrow>
|
||||
</math>
|
87
tests/MathML/basic/good/23.mml
Normal file
87
tests/MathML/basic/good/23.mml
Normal file
@ -0,0 +1,87 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>a</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>b</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>c</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>d</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>e</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>f</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>g</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>h</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mn>0</mn>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>i</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>j</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mi>k</mi>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mi>l</mi>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
</math>
|
162
tests/MathML/basic/good/24.mml
Normal file
162
tests/MathML/basic/good/24.mml
Normal file
@ -0,0 +1,162 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mi>det</mi>
|
||||
<mo>|</mo>
|
||||
<mtable>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>0</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>1</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&mldr;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mi>n</mi>
|
||||
</msub>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>1</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>3</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&mldr;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mi>n</mi>
|
||||
<mo>+</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>3</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mn>4</mn>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&mldr;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mi>n</mi>
|
||||
<mo>+</mo>
|
||||
<mn>2</mn>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<mo>&#x22EE;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&#x22EE;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&#x22EE;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&#x22EE;</mo>
|
||||
</mtd>
|
||||
</mtr>
|
||||
<mtr>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mi>n</mi>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mi>n</mi>
|
||||
<mo>+</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mi>n</mi>
|
||||
<mo>+</mo>
|
||||
<mn>2</mn>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<mo>&mldr;</mo>
|
||||
</mtd>
|
||||
<mtd columnalign="center">
|
||||
<msub>
|
||||
<mi>c</mi>
|
||||
<mrow>
|
||||
<mn>2</mn>
|
||||
<mi>n</mi>
|
||||
</mrow>
|
||||
</msub>
|
||||
</mtd>
|
||||
</mtr>
|
||||
</mtable>
|
||||
<mo>|</mo>
|
||||
<mo>&gt;</mo>
|
||||
<mn>0</mn>
|
||||
</mrow>
|
||||
</math>
|
9
tests/MathML/basic/good/25.mml
Normal file
9
tests/MathML/basic/good/25.mml
Normal file
@ -0,0 +1,9 @@
|
||||
<math display="block">
|
||||
<msub>
|
||||
<mi>y</mi>
|
||||
<msub>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
</msub>
|
||||
</math>
|
11
tests/MathML/basic/good/26.mml
Normal file
11
tests/MathML/basic/good/26.mml
Normal file
@ -0,0 +1,11 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msubsup>
|
||||
<mi>x</mi>
|
||||
<mn>92</mn>
|
||||
<mn>31415</mn>
|
||||
</msubsup>
|
||||
<mo>+</mo>
|
||||
<mi>&pi;</mi>
|
||||
</mrow>
|
||||
</math>
|
15
tests/MathML/basic/good/27.mml
Normal file
15
tests/MathML/basic/good/27.mml
Normal file
@ -0,0 +1,15 @@
|
||||
<math display="block">
|
||||
<msubsup>
|
||||
<mi>x</mi>
|
||||
<msubsup>
|
||||
<mi>y</mi>
|
||||
<mi>b</mi>
|
||||
<mi>a</mi>
|
||||
</msubsup>
|
||||
<msubsup>
|
||||
<mi>z</mi>
|
||||
<mi>c</mi>
|
||||
<mi>d</mi>
|
||||
</msubsup>
|
||||
</msubsup>
|
||||
</math>
|
7
tests/MathML/basic/good/28.mml
Normal file
7
tests/MathML/basic/good/28.mml
Normal file
@ -0,0 +1,7 @@
|
||||
<math display="block">
|
||||
<msubsup>
|
||||
<mi>y</mi>
|
||||
<mn>3</mn>
|
||||
<mo>&#x2034;</mo>
|
||||
</msubsup>
|
||||
</math>
|
1
tests/MathML/basic/good/29.mml
Normal file
1
tests/MathML/basic/good/29.mml
Normal file
@ -0,0 +1 @@
|
||||
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><mrow><munder><mo lspace="0em" rspace="0em">lim</mo><mrow><mi>n</mi><mo stretchy="false">→</mo><mo>+</mo><mn>∞</mn></mrow></munder><mfrac><msqrt><mrow><mn>2</mn><mi>π</mi><mi>n</mi></mrow></msqrt><mrow><mi>n</mi><mo>!</mo></mrow></mfrac><msup><mrow><mo>(</mo><mfrac><mi>n</mi><mi>e</mi></mfrac><mo>)</mo></mrow><mi>n</mi></msup></mrow><mo>=</mo><mn>1</mn></math>
|
19
tests/MathML/basic/good/3.mml
Normal file
19
tests/MathML/basic/good/3.mml
Normal file
@ -0,0 +1,19 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mrow>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<msup>
|
||||
<mi>y</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</mrow>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mo>+</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
1
tests/MathML/basic/good/30.mml
Normal file
1
tests/MathML/basic/good/30.mml
Normal file
@ -0,0 +1 @@
|
||||
<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><mrow><mrow><mo lspace="0em" rspace="0em">det</mo><mo stretchy="false">(</mo><mi>A</mi><mo stretchy="false">)</mo></mrow><mo>=</mo><munder><mo>∑</mo><mrow><mi>σ</mi><mo>∊</mo><msub><mi>S</mi><mi>n</mi></msub></mrow></munder><mrow><mi>ϵ</mi><mo stretchy="false">(</mo><mi>σ</mi><mo stretchy="false">)</mo></mrow><mrow><munderover><mo>∏</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><msub><mi>a</mi><mrow><mi>i</mi><mo>,</mo><msub><mi>σ</mi><mi>i</mi></msub></mrow></msub></mrow></mrow></math>
|
17
tests/MathML/basic/good/4.mml
Normal file
17
tests/MathML/basic/good/4.mml
Normal file
@ -0,0 +1,17 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mi>x</mi>
|
||||
<mo>+</mo>
|
||||
<msup>
|
||||
<mi>y</mi>
|
||||
<mfrac>
|
||||
<mn>2</mn>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mo>+</mo>
|
||||
<mn>1</mn>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</msup>
|
||||
</mrow>
|
||||
</math>
|
12
tests/MathML/basic/good/5.mml
Normal file
12
tests/MathML/basic/good/5.mml
Normal file
@ -0,0 +1,12 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mfrac>
|
||||
<mi>a</mi>
|
||||
<mrow>
|
||||
<mi>b</mi>
|
||||
<mo>/</mo>
|
||||
<mn>2</mn>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
48
tests/MathML/basic/good/6.mml
Normal file
48
tests/MathML/basic/good/6.mml
Normal file
@ -0,0 +1,48 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>0</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mstyle displaystyle="true" scriptlevel="0">
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>1</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mstyle displaystyle="true" scriptlevel="0">
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mstyle displaystyle="true" scriptlevel="0">
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>3</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mstyle displaystyle="true" scriptlevel="0">
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>4</mn>
|
||||
</msub>
|
||||
</mstyle>
|
||||
</mfrac>
|
||||
</mstyle>
|
||||
</mfrac>
|
||||
</mstyle>
|
||||
</mfrac>
|
||||
</mstyle>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
48
tests/MathML/basic/good/7.mml
Normal file
48
tests/MathML/basic/good/7.mml
Normal file
@ -0,0 +1,48 @@
|
||||
<math>
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>0</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>1</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>2</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>3</mn>
|
||||
</msub>
|
||||
<mo>+</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<msub>
|
||||
<mi>a</mi>
|
||||
<mn>4</mn>
|
||||
</msub>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
14
tests/MathML/basic/good/8.mml
Normal file
14
tests/MathML/basic/good/8.mml
Normal file
@ -0,0 +1,14 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mfrac linethickness="0px">
|
||||
<mi>n</mi>
|
||||
<mrow>
|
||||
<mi>k</mi>
|
||||
<mo>/</mo>
|
||||
<mn>2</mn>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
</math>
|
44
tests/MathML/basic/good/9.mml
Normal file
44
tests/MathML/basic/good/9.mml
Normal file
@ -0,0 +1,44 @@
|
||||
<math display="block">
|
||||
<mrow>
|
||||
<mrow>
|
||||
<mo>(</mo>
|
||||
<mfrac linethickness="0px">
|
||||
<mi>p</mi>
|
||||
<mn>2</mn>
|
||||
</mfrac>
|
||||
<mo>)</mo>
|
||||
</mrow>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
<msup>
|
||||
<mi>y</mi>
|
||||
<mrow>
|
||||
<mi>p</mi>
|
||||
<mo>-</mo>
|
||||
<mn>2</mn>
|
||||
</mrow>
|
||||
</msup>
|
||||
<mo>-</mo>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<mn>1</mn>
|
||||
<mo>-</mo>
|
||||
<mi>x</mi>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
<mfrac>
|
||||
<mn>1</mn>
|
||||
<mrow>
|
||||
<mn>1</mn>
|
||||
<mo>-</mo>
|
||||
<msup>
|
||||
<mi>x</mi>
|
||||
<mn>2</mn>
|
||||
</msup>
|
||||
</mrow>
|
||||
</mfrac>
|
||||
</mrow>
|
||||
</math>
|
Loading…
Reference in New Issue
Block a user