Test MathML + SVG
fwsmail35 <[email protected]> Fri, 27 Apr 2007 16:37:36 +0200
| Newsgroups | gmane.comp.web.amaya.devel |
|---|---|
| Message-ID | <[email protected]> |
Here is a xml file with MathML + SVG. In Amaya, there are some bugs when you move the insertion point with the arrow keys in this xml document. Also, if you select a SVG element and try to insert a MathML element, the code generated is not valid. Fred
test_svg_mathml.xml
(text/xml, 6.3 KB)
<?xml version="1.0" encoding="iso-8859-15"?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type"
content="application/xhtml+xml; charset=iso-8859-15" />
<meta name="author" content="Frédéric WANG" />
<title>test svg + mathml</title>
<meta name="generator" content="Amaya, see http://www.w3.org/Amaya/" />
</head>
<body>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="100">
<g>
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
</g>
</svg>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="100">
<g>
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<munderover>
<mi>a</mi>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math></foreignObject>
</switch>
</g>
</svg>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="250">
<g transform="matrix(0.707107,-0.707107,0.707107,0.707107,0,150)">
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<munderover>
<mi>a</mi>
<mi>b</mi>
<mi>c</mi>
</munderover>
</math></foreignObject>
</switch>
</g>
</svg>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="250">
<g transform="matrix(0.707107,-0.707107,0.707107,0.707107,0,150)">
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle mathcolor="#000080;">
<mrow>
<mi>Γ</mi>
<mo>⁡</mo>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
</mrow>
<mo>=</mo>
<mrow>
<msubsup>
<mo>∫</mo>
<mn>0</mn>
<mrow>
<mo>+</mo>
<mi>∞</mi>
</mrow>
</msubsup>
<msup>
<mi>t</mi>
<mrow>
<mi>x</mi>
<mo>−</mo>
<mn>1</mn>
</mrow>
</msup>
<msup>
<mi>ⅇ</mi>
<mrow>
<mo>−</mo>
<mi>t</mi>
</mrow>
</msup>
<mrow>
<mo>ⅆ</mo>
<mi>t</mi>
</mrow>
</mrow>
</mstyle>
</math> </foreignObject>
</switch>
</g>
</svg>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="250">
<g transform="matrix(0.707107,-0.707107,0.707107,0.707107,0,150)">
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
<path
d="M 44.727272,21.090909 L 36.359858,29.587325 L 40.292606,40.845041 L 28.432844,39.600562 L 22.083235,49.69438 L 15.661767,39.646124 L 3.8111859,40.975193 L 7.6635087,29.689702 L -0.76431515,21.253205 L 10.460921,17.228684 L 11.802177,5.3794762 L 21.947495,11.646471 L 32.047838,5.3072476 L 33.473606,17.146584 L 44.727272,21.090909 z "
transform="translate(150,40)"
style="stroke:#ffaa00;stroke-width:1px;fill:#ffff00;"/>
<path
d="M 50.363636,43.81818 C 50.090154,43.025081 51.297791,43.058245 51.681818,43.363636 C 52.722508,44.191224 52.181922,45.777285 51.272725,46.454544 C 49.646384,47.666002 47.379434,46.796331 46.40909,45.181813 C 44.98507,42.812444 46.220462,39.785248 48.545459,38.545452 C 51.644314,36.892997 55.454153,38.507192 56.954547,41.545458 C 58.842639,45.368806 56.844001,49.970617 53.090902,51.727273 C 48.545397,53.854818 43.146815,51.468849 41.136361,46.999991 C 38.767111,41.733596 41.542078,35.535434 46.727281,33.272723 C 52.713804,30.660333 59.713334,33.825342 62.227275,39.727281 C 65.083776,46.433439 61.528027,54.235551 54.909079,57.000002 C 47.483621,60.101298 38.878068,56.15432 35.863632,48.818168 C 32.517038,40.673649 36.8556,31.26402 44.909104,27.999994"
transform="translate(-5,30)"
style="fill:none;stroke:#000000;stroke-width:1px;"/>
<path
d="M 43.454546 30.272728 A 16.454546 7.3636365 0 1 1 10.545454,30.272728 A 16.454546 7.3636365 0 1 1 43.454546 30.272728 z"
style="stroke:#ff0000;stroke-width:3px;fill:#ffaaaa;"
transform="translate(70,40)"/>
<switch>
<foreignObject requiredExtensions="http://www.w3.org/1998/Math/MathML">
<math xmlns="http://www.w3.org/1998/Math/MathML">
<mstyle mathcolor="#000080;">
<mrow>
<mi>Γ</mi>
<mo>⁡</mo>
<mrow>
<mo>(</mo>
<mi>x</mi>
<mo>)</mo>
</mrow>
</mrow>
<mo>=</mo>
<mrow>
<msubsup>
<mo>∫</mo>
<mn>0</mn>
<mrow>
<mo>+</mo>
<mi>∞</mi>
</mrow>
</msubsup>
<msup>
<mi>t</mi>
<mrow>
<mi>x</mi>
<mo>−</mo>
<mn>1</mn>
</mrow>
</msup>
<msup>
<mi>ⅇ</mi>
<mrow>
<mo>−</mo>
<mi>t</mi>
</mrow>
</msup>
<mrow>
<mo>ⅆ</mo>
<mi>t</mi>
</mrow>
</mrow>
</mstyle>
</math> </foreignObject>
</switch>
</g>
</svg>
<p>text</p>
<svg xmlns="http://www.w3.org/2000/svg" height="100">
<g>
<rect style="stroke:#50ff50;stroke-width:3px;fill:#aaffaa;" width="200"
height="100"/>
</g>
</svg>
<p>text</p>
</body>
</html>