1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" xml:
lang=
"en" lang=
"en">
5 <meta http-equiv=
"Content-Type" content=
"application/xhtml+xml; charset=utf-8" />
6 <meta name=
"generator" content=
"Docutils 0.8: http://docutils.sourceforge.net/" />
7 <title>Testing Math
</title>
8 <link rel=
"stylesheet" href=
"../../../docutils/writers/html4css1/html4css1.css" type=
"text/css" />
11 <div class=
"document" id=
"testing-math">
12 <h1 class=
"title">Testing Math
</h1>
14 <p>Docutils supports inline math with the prefix or postfix
<tt class=
"docutils literal">:math:
</tt>
15 role specificator,
<math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mi>n
</mi><mo>!
</mo><mo>+
</mo><mo>sin
</mo><mo>(
</mo><msubsup><mi>x
</mi><mi>n
</mi><mn>2</mn></msubsup><mo>)
</mo></mrow></math> and
<math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>A
</mi><mtext>c
</mtext></msub><mo>=
</mo><mfrac><mrow><mi>π
</mi></mrow><mrow><mn>4</mn></mrow></mfrac><msup><mi>d
</mi><mn>2</mn></msup></mrow></math>, as well as displayed math via the
16 <tt class=
"docutils literal">math
</tt> directive:
</p>
17 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mi>f
</mi><mo>(
</mo><mi>ϵ
</mi><mo>)
</mo><mo>=
</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>1</mn><mo>+
</mo><mo>exp
</mo><mfenced open=
"(" close=
")"><mrow><mfrac><mrow><mi>ε
</mi></mrow><mrow><msub><mi>k
</mi><mtext>B
</mtext></msub><mi>T
</mi></mrow></mfrac></mrow></mfenced></mrow></mfrac></mtd></mtr></mtable></math><math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mi>N
</mi><mo>=
</mo><mfrac><mrow><mtext>number of apples
</mtext></mrow><mrow><mn>7</mn></mrow></mfrac></mtd></mtr></mtable></math><p>The determinant of the matrix
</p>
18 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mstyle fontweight=
"bold"><mrow><mi>M
</mi></mrow></mstyle><mo>=
</mo><mfenced open=
"(" close=
")"><mrow><mtable><mtr><mtd><mi>a
</mi></mtd><mtd><mi>b
</mi></mtd></mtr><mtr><mtd><mi>c
</mi></mtd><mtd><mi>d
</mi></mtd></mtr></mtable></mrow></mfenced></mtd></mtr></mtable></math><p>is
<math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mo>|
</mo><mstyle fontweight=
"bold"><mrow><mi>M
</mi></mrow></mstyle><mo>|
</mo><mo>=
</mo><mi>a
</mi><mi>d
</mi><mo>-
</mo><mi>b
</mi><mi>c
</mi></mrow></math>.
</p>
19 <p>Sum and Integral with limits:
</p>
20 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><munderover><mo>∫
</mo><mn>0</mn><mn>1</mn></munderover><msup><mi>x
</mi><mi>n
</mi></msup><mi>d
</mi><mi>x
</mi><mo>=
</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mi>n
</mi><mo>+
</mo><mn>1</mn></mrow></mfrac></mtd></mtr></mtable></math><math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><munderover><mo>∑
</mo><mrow><mi>n
</mi><mo>=
</mo><mn>1</mn></mrow><mi>m
</mi></munderover><mi>n
</mi><mo>=
</mo><mfrac><mrow><mi>m
</mi><mo>(
</mo><mi>m
</mi><mo>+
</mo><mn>1</mn><mo>)
</mo></mrow><mrow><mn>2</mn></mrow></mfrac></mtd></mtr></mtable></math><dl class=
"docutils">
21 <dt>Math-Accents:
</dt>
22 <dd><table border=
"1" class=
"borderless first last docutils">
29 <tr><td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>a
</mi></mrow><mo>´
</mo></mover></mrow></math> <tt class=
"docutils literal">\acute{a}
</tt></td>
30 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>t
</mi></mrow><mo>˙
</mo></mover></mrow></math> <tt class=
"docutils literal">\dot{t}
</tt></td>
31 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>γ
</mi></mrow><mo>^
</mo></mover></mrow></math> <tt class=
"docutils literal"><span class=
"pre">\hat{\gamma}
</span></tt></td>
33 <tr><td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>a
</mi></mrow><mo>`
</mo></mover></mrow></math> <tt class=
"docutils literal">\grave{a}
</tt></td>
34 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>t
</mi></mrow><mo>¨
</mo></mover></mrow></math> <tt class=
"docutils literal">\ddot{t}
</tt></td>
35 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>α
</mi></mrow><mo>˜
</mo></mover></mrow></math> <tt class=
"docutils literal"><span class=
"pre">\tilde{\alpha}
</span></tt></td>
37 <tr><td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>x
</mi></mrow><mo>˘
</mo></mover></mrow></math> <tt class=
"docutils literal">\breve{x}
</tt></td>
38 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>t
</mi></mrow><mo>⃛
</mo></mover></mrow></math> <tt class=
"docutils literal">\dddot{t}
</tt></td>
39 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>ı
</mi></mrow><mo>⃗
</mo></mover></mrow></math> <tt class=
"docutils literal"><span class=
"pre">\vec{\imath}
</span></tt></td>
41 <tr><td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>a
</mi></mrow><mo>ˇ
</mo></mover></mrow></math> <tt class=
"docutils literal">\check{a}
</tt></td>
42 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>a
</mi></mrow><mo>¯
</mo></mover></mrow></math> <tt class=
"docutils literal">\bar{a}
</tt></td>
43 <td><math xmlns=
"http://www.w3.org/1998/Math/MathML"><mrow><mover><mrow><mi>R
</mi></mrow><mo>⃗
</mo></mover></mrow></math> <tt class=
"docutils literal">\vec{R}
</tt></td>
51 <p>Quantum mechanics:
</p>
52 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mo>-
</mo><mfrac><mrow><mn>1</mn></mrow><mrow><mn>2</mn></mrow></mfrac><msup><mo>∇
</mo><mn>2</mn></msup><mi>ψ
</mi><mo>+
</mo><mi>v
</mi><mi>ψ
</mi><mo>=
</mo><mi>ε
</mi><mi>ψ
</mi></mtd></mtr></mtable></math><p>Math split over two lines:
</p>
53 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mi>g
</mi><mo>(
</mo><mi>α
</mi><mo>)
</mo><mo>=
</mo></mtd><mtd><mo>(
</mo><mn>1</mn><mo>+
</mo><mi>α
</mi><mo>+
</mo><msup><mi>α
</mi><mn>2</mn></msup><mo>+
</mo><msup><mi>α
</mi><mn>3</mn></msup><mo>+
</mo><msup><mi>α
</mi><mn>4</mn></msup></mtd></mtr><mtr><mtd></mtd><mtd><mo>+
</mo><msup><mi>α
</mi><mn>5</mn></msup><mo>)
</mo></mtd></mtr></mtable></math><p>Cases (
"manually
", with
<tt class=
"docutils literal">matrix
</tt> environment):
</p>
54 <math xmlns=
"http://www.w3.org/1998/Math/MathML" mode=
"display"><mtable><mtr><mtd><mi>f
</mi><mo>(
</mo><mi>x
</mi><mo>)
</mo><mo>=
</mo><mfenced open=
"{" close=
""><mrow><mtable><mtr><mtd><mo>-
</mo><mn>1</mn></mtd><mtd><mi>x
</mi><mo><</mo><mn>0</mn></mtd></mtr><mtr><mtd><mn>1</mn></mtd><mtd><mi>x
</mi><mo>></mo><mn>0</mn></mtd></mtr></mtable></mrow></mfenced></mtd></mtr></mtable></math><p>Cases with the AMSmath
<tt class=
"docutils literal">cases
</tt> environment is not (yet)
55 supported by latex2MathML.
</p>
58 \mathrm{sgn}(x) = \begin{cases}