UNPKG

epubjs

Version:

Render ePub documents in the browser, across many devices

1,259 lines (1,101 loc) 22.4 kB
<?xml version="1.0" encoding="utf-8"?> <html xml:lang="en-us" lang="en-us" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <link rel="stylesheet" type="text/css" href="../css/commonltr.css"/> <title>Re-visiting MathML torture tests</title> <link type="text/css" rel="stylesheet" href="../css/epub.css"/> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ jax: ["input/TeX","input/MathML","output/SVG"], extensions: ["tex2jax.js","mml2jax.js","MathEvents.js"], TeX: { extensions: ["noErrors.js","noUndefined.js","autoload-all.js"] }, MathMenu: { showRenderer: false }, menuSettings: { zoom: "Click" }, messageStyle: "none" }); </script> <!-- <script type="text/javascript" src="../mathjax/MathJax.js"></script>--> </head> <body> <p> Derived from <a href="https://developer.mozilla.org/en-US/docs/Mozilla_MathML_Project/MathML_Torture_Test">Mozilla MathML Project</a>.</p> <table> <tbody><tr> <td></td> <th scope="col">As rendered by TeX</th> <th scope="col">As rendered by your browser</th></tr> <tr> <td>1</td> <td><img src="=ex1.png" width="38" height="22" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msup> <mi>x</mi> <mn>2</mn> </msup> <msup> <mi>y</mi> <mn>2</mn> </msup> </mrow> </math> </td></tr> <tr> <td>2</td> <td><img src="=ex2.png" width="30" height="17" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <mmultiscripts> <mi>F</mi> <mn>3</mn><none></none> <mprescripts></mprescripts> <mn>2</mn><none></none> </mmultiscripts> </mrow> </math> </td></tr> <tr> <td>3</td> <td><img src="=ex21.png" width="58" height="47" alt="TeXbook, 17-17.1"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>4</td> <td><img src="=ex22.png" width="76" height="25" alt="TeXbook, 17-17.1"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>5</td> <td><img src="=ex23.png" width="30" height="42" alt="TeXbook, 17-17.1"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <mfrac> <mi>a</mi> <mrow> <mi>b</mi> <mo>/</mo> <mn>2</mn> </mrow> </mfrac> </mrow> </math> </td></tr> <tr> <td>6</td> <td><img src="=ex24.png" width="220" height="138" alt="TeXbook, 17.5-17.6"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>7</td> <td><img src="=ex25.png" width="200" height="85" alt="TeXbook, 17.5-17.6"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" > <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> </td></tr> <tr> <td>8</td> <td><img src="=ex26.png" width="54" height="50" alt="TeXbook, 17.5-17.6"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <mo>(</mo> <mfrac linethickness="0"> <mi>n</mi> <mrow> <mi>k</mi> <mo>/</mo> <mn>2</mn> </mrow> </mfrac> <mo>)</mo> </mrow> </math> </td></tr> <tr> <td>9</td> <td><img src="=ex27.png" width="237" height="50" alt="TeXbook, 17.7"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <mrow> <mo>(</mo> <mfrac linethickness="0"> <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> </td></tr> <tr> <td>10</td> <td><img src="=ex29.png" width="116" height="63" alt="TeXbook, 17.7-17.8"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <munder> <mo></mo> <mrow> <mfrac linethickness="0"> <mrow> <mn>0</mn> <mo></mo> <mi>i</mi> <mo></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> </td></tr> <tr> <td>11</td> <td><img src="=ex3.png" width="27" height="18" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msup> <mi>x</mi> <mrow> <mn>2</mn> <mi>y</mi> </mrow> </msup> </mrow> </math> </td></tr> <tr> <td>12</td> <td><img src="=ex30.png" width="175" height="61" alt="TeXbook, 17.8"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <munderover> <mo></mo> <mrow> <mi>i</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>p</mi> </munderover> <munderover> <mo></mo> <mrow> <mi>j</mi> <mo>=</mo> <mn>1</mn> </mrow> <mi>q</mi> </munderover> <munderover> <mo></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> </td></tr> <tr> <td>13</td> <td><img src="=ex31.png" width="405" height="100" alt="TeXbook, 17.9-17.10"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>14</td> <td><img src="=ex34.png" width="272" height="50" alt="TeXbook, 17.10"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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="1.5">|</mo> <mi>φ <!-- \varphi --></mi> <mo stretchy="false">(</mo> <mi>x</mi> <mo>+</mo> <mi mathvariant="normal">i</mi> <mi>y</mi> <mo stretchy="false">)</mo> <mo minsize="1.5">|</mo> </mrow> <mn>2</mn> </msup> <mo>=</mo> <mn>0</mn> </mrow> </math> </td></tr> <tr> <td>15</td> <td><img src="=ex4.png" width="31" height="22" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msup> <mn>2</mn> <msup> <mn>2</mn> <msup> <mn>2</mn> <mi>x</mi> </msup> </msup> </msup> </mrow> </math> </td></tr> <tr> <td>16</td> <td><img src="=ex40.png" width="55" height="49" alt="TeXbook, 18.10-18.11"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msubsup> <mo stretchy="false"></mo> <mn>1</mn> <mi>x</mi> </msubsup> <mfrac> <mrow><mo mathvariant="italic">d</mo><mi>t</mi></mrow> <mi>t</mi> </mfrac> </mrow> </math> </td></tr> <tr> <td>17</td> <td><img src="=ex41.png" width="91" height="47" alt="TeXbook, 18.12-18.13"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msub> <mo><!-- \iint --></mo> <mi>D</mi> </msub> <mo mathvariant="italic">d</mo><mi>x</mi> <mo></mo> <mo mathvariant="italic">d</mo><mi>y</mi> </mrow> </math> </td></tr> <tr> <td>18</td> <td><img src="=ex43.png" width="250" height="66" alt="TeXbook, 18.23"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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 &#xa0;</mtext> <mn>0</mn> <mo></mo> <mi>x</mi> <mo></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 &#xa0;</mtext> <mn>3</mn> <mo></mo> <mi>x</mi> <mo></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> </td></tr> <tr> <td>19</td> <td><img src="=ex44.png" width="101" height="44" alt="TeXbook, 18.23-18.24"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mover> <mrow> <mi>x</mi> <mo>+</mo> <mo>...</mo> <mo>+</mo> <mi>x</mi> </mrow> <mover> <mo></mo> <mrow><mi>k</mi> <mspace width="thinmathspace"></mspace> <mtext>times</mtext></mrow> </mover> </mover> </math> </td></tr> <tr> <td>20</td> <td><img src="=ex5.png" width="25" height="13" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msub> <mi>y</mi> <msup> <mi>x</mi> <mn>2</mn> </msup> </msub> </mrow> </math> </td></tr> <tr> <td>21</td> <td><img src="=ex51.png" width="253" height="56" alt="TeXbook, 18.40"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <munder> <mo></mo> <mrow> <mi>p</mi> <mtext> &#xa0;prime</mtext> </mrow> </munder> <mi>f</mi> <mo stretchy="false">(</mo> <mi>p</mi> <mo stretchy="false">)</mo> <mo>=</mo> <msub> <mo stretchy="false"></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> <mo></mo> <mo mathvariant="italic">d</mo> <mi>π</mi> <mo stretchy="false">(</mo> <mi>t</mi> <mo stretchy="false">)</mo> </mrow> </math> </td></tr> <tr> <td>22</td> <td><img src="=ex52.png" width="159" height="81" alt="TeXbook, 18.41"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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></mo> <mrow> <mi>k</mi> <mtext> &#xa0;</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></mo> <mrow> <mi></mi> <mtext> &#xa0;</mtext> <mi>b</mi> <mtext>'s</mtext> </mrow> </mover> </mover> </mrow> <munder> <mo></mo> <mrow> <mi>k</mi> <mo>+</mo> <mi></mi> <mtext> &#xa0;elements</mtext> </mrow> </munder> </munder> <mo stretchy="false">}</mo> </mrow> </math> </td></tr> <tr> <td>23</td> <td><img src="=ex53.png" width="213" height="108" alt="TeXbook, 18.42"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>24</td> <td><img src="=ex54.png" width="344" height="130" alt="TeXbook, 18.43"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <mo>det</mo> <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></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></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></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></mo> </mtd> <mtd columnalign="center"> <mo></mo> </mtd> <mtd columnalign="center"> <mo></mo> </mtd> <mtd columnalign="center"> </mtd> <mtd columnalign="center"> <mo></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></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> </td></tr> <tr> <td>25</td> <td><img src="=ex6.png" width="25" height="14" alt="TeXbook, 16.2-16.3"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <msub> <mi>y</mi> <msub> <mi>x</mi> <mn>2</mn> </msub> </msub> </math> </td></tr> <tr> <td>26</td> <td><img src="=ex7.png" width="90" height="23" alt="TeXbook, 16.4-16.5"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <mrow> <msubsup> <mi>x</mi> <mn>92</mn> <mn>31415</mn> </msubsup> <mo>+</mo> <mi>π</mi> </mrow> </math> </td></tr> <tr> <td>27</td> <td><img src="=ex8.png" width="27" height="36" alt="TeXbook, 16.4-16.5"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" 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> </td></tr> <tr> <td>28</td> <td><img src="=ex9.png" width="24" height="22" alt="TeXbook, 16.4-16.5"></img></td> <td> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <msubsup> <mi>y</mi> <mn>3</mn> <mrow> <mo></mo> <mo></mo> <mo></mo> </mrow> </msubsup> </math> <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <msubsup> <mi>y</mi> <mn>3</mn> <mrow> <mo>'</mo> <mo>'</mo> <mo>'</mo> </mrow> </msubsup> </math> </td></tr> </tbody></table> </body> </html>