instiki/vendor/plugins/maruku/tests/math/syntax.xhtml
Jacques Distler 1085168bbf Update to latest HTML5lib, Add Maruku testdir
Sync with the latest html5lib.
Having the Maruku unit tests on-hand may be useful for debugging; so let's include them.
2008-01-08 00:01:35 -06:00

37 lines
5.9 KiB
HTML

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"
"http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">
<html xmlns:svg='http://www.w3.org/2000/svg' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head><meta content='application/xhtml+xml;charset=utf-8' http-equiv='Content-type' /><title></title><link href='math.css' rel='stylesheet' type='text/css' /></head>
<body>
<p>Here are some formulas:</p>
<ul>
<li><math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math></li>
<li><math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msup><mi>x</mi> <mi>n</mi></msup><mo>+</mo><msup><mi>y</mi> <mi>n</mi></msup><mo>&ne;</mo><msup><mi>z</mi> <mi>n</mi></msup></math></li>
</ul>
<p>Some inline maths: <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msubsup><mo rspace='thinmathspace' lspace='thinmathspace'>&Sum;</mo> <mrow><mi>n</mi><mo>=</mo><mn>1 </mn></mrow> <mn>&infin;</mn></msubsup><mfrac><mrow><mo stretchy='false'>(</mo><mo rspace='0em' lspace='verythinmathspace'>&minus;</mo><mn>1 </mn><msup><mo stretchy='false'>)</mo> <mi>n</mi></msup></mrow><mi>n</mi></mfrac><mo>=</mo><mi>ln</mi><mn>2 </mn></math>.</p>
<p>Some display maths:</p>
<div class='maruku-equation'><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><munderover><mo rspace='thinmathspace' lspace='thinmathspace'>&Sum;</mo> <mrow><mi>n</mi><mo>=</mo><mn>1 </mn></mrow> <mn>&infin;</mn></munderover><mfrac><mn>1 </mn><mi>n</mi></mfrac></math><div class='maruku-eq-tex'><code style='display: none'> \sum_{n=1}^\infty \frac{1}{n} </code></div></div><div class='maruku-equation' id='eq:a'><span class='maruku-eq-number'>(1)</span><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><munderover><mo rspace='thinmathspace' lspace='thinmathspace'>&Sum;</mo> <mrow><mi>n</mi><mo>=</mo><mn>1 </mn></mrow> <mn>&infin;</mn></munderover><mfrac><mn>1 </mn><mi>n</mi></mfrac><mtext> is divergent, but </mtext><munder><mi>lim</mi> <mrow><mi>n</mi><mo>&rightarrow;</mo><mn>&infin;</mn></mrow></munder><munderover><mo rspace='thinmathspace' lspace='thinmathspace'>&Sum;</mo> <mrow><mi>i</mi><mo>=</mo><mn>1 </mn></mrow> <mi>n</mi></munderover><mfrac><mn>1 </mn><mi>i</mi></mfrac><mo>&minus;</mo><mi>ln</mi><mi>n</mi><mtext> exists.</mtext></math><div class='maruku-eq-tex'><code style='display: none'> \sum_{n=1}^\infty \frac{1}{n} \text{ is divergent, but } \lim_{n \to \infty} \sum_{i=1}^n \frac{1}{i} - \ln n \text{ exists.} </code></div></div>
<p>Some random AMSTeX symbols - thanks to Robin Snader for adding these:</p>
<div class='maruku-equation'><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beth;</mi><mo>&Subset;</mo><mo>&bigtriangleup;</mo><mo rspace='thinmathspace' lspace='0em'>smallsmile</mo><mo>&bumpeq;</mo><mo>&ggg;</mo><mo>&pitchfork;</mo></math><div class='maruku-eq-tex'><code style='display: none'> \beth \Subset \bigtriangleup \smallsmile \bumpeq \ggg \pitchfork </code></div></div>
<p>Note that <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mover><mi>g</mi><mo stretchy='false'>&#x302;</mo></mover></math> , <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><mi>J</mi></math>, and <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>&gamma;</mi> <mn>1 </mn></msub><msub><mi>&gamma;</mi> <mn>2 </mn></msub></math> all restrict to</p>
<p><math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>x</mi> <mn>1 </mn></msub><mover><mrow><msub><mi>x</mi> <mn>2 </mn></msub></mrow><mo>&OverBar;</mo></mover><mo>&oplus;</mo><msub><mi>x</mi> <mn>2 </mn></msub><mover><mrow><msub><mi>x</mi> <mn>1 </mn></msub></mrow><mo>&OverBar;</mo></mover></math> and that this module is linear in <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>x</mi> <mn>1 </mn></msub></math> and <math display='inline' xmlns='http://www.w3.org/1998/Math/MathML'><msub><mi>x</mi> <mn>2 </mn></msub></math>.</p>
<p>See label <a href='#eq:a' class='maruku-eqref'>(1)</a>.</p>
<div class='maruku-equation'><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mrow xlink:href='#hello' xmlns:xlink='http://www.w3.org/1999/xlink' xlink:type='simple'><mrow><mi>&alpha;</mi><mo>+</mo><mi>&beta;</mi></mrow></mrow></math><div class='maruku-eq-tex'><code style='display: none'> \href{#hello}{\alpha+\beta} </code></div></div>
<h2 id='cross_references'>Cross references</h2>
<p>The following are 4 equations, labeled A,B,C,D:</p>
<div class='maruku-equation' id='eq:A'><span class='maruku-eq-number'>(2)</span><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&alpha;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \alpha </code></div></div><div class='maruku-equation' id='eq:B'><span class='maruku-eq-number'>(3)</span><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&beta;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \beta
</code></div></div><div class='maruku-equation' id='eq:C'><span class='maruku-eq-number'>(4)</span><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&gamma;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \gamma </code></div></div><div class='maruku-equation' id='eq:D'><span class='maruku-eq-number'>(5)</span><math display='block' xmlns='http://www.w3.org/1998/Math/MathML'><mi>&delta;</mi></math><div class='maruku-eq-tex'><code style='display: none'> \delta
</code></div></div>
<p>You can now refer to <a href='#eq:A' class='maruku-eqref'>(2)</a>, <a href='#eq:B' class='maruku-eqref'>(3)</a>, <a href='#eq:C' class='maruku-eqref'>(4)</a>, <a href='#eq:D' class='maruku-eqref'>(5)</a>.</p>
<div class='maruku_signature'><hr /><span style='font-size: small; font-style: italic'>Created by <a href='http://maruku.rubyforge.org' title='Maruku: a Markdown-superset interpreter for Ruby'>Maruku</a> at 21:13 on Sunday, January 14th, 2007.</span></div></body></html>