Release 0.11: set version number to 0.12
[docutils.git] / test / functional / expected / math_output_mathjax.html
blobb2bd3d74e97577b3ef6d2409b869db4170093c5f
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">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6 <meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
7 <title>Mathematics</title>
8 <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
9 <link rel="stylesheet" href="../input/data/html4css1.css" type="text/css" />
10 </head>
11 <body>
12 <div class="document" id="mathematics">
13 <h1 class="title">Mathematics</h1>
15 <p>Docutils supports inline math with the prefix or postfix <tt class="docutils literal">:math:</tt>
16 role specificator, <span class="math">\(n! + \sin(x_n^2)\)</span>
17 and <span class="math">\(A_\text{c} =
18 \frac{\pi}{4} d^2\)</span>
19 , as well as displayed math via the
20 <cite>math</cite> directive:</p>
21 <div class="math">
22 \begin{equation*}
23 f(\epsilon) = \frac{1}{1 + \exp\left(\frac{\varepsilon}{k_\text{B}T}\right)}
24 \end{equation*}
25 </div>
26 <p>Content may start on the first line of the directive, e.g.</p>
27 <div class="math">
28 \begin{equation*}
29 N = \frac{\text{number of apples}}{7}
30 \end{equation*}
31 </div>
32 <p>Equations can be labeled with a reference name using the <tt class="docutils literal">:name:</tt> option.
33 See <a class="reference internal" href="#eq-m">eq:M</a> and <a class="reference internal" href="#eq-schrodinger">eq:schrödinger</a> below.</p>
34 <p>The determinant of the matrix</p>
35 <div class="math" id="eq-m">
36 \begin{equation*}
37 \mathbf{M} = \left(\begin{matrix}a&amp;b\\c&amp;d\end{matrix}\right)
38 \end{equation*}
39 </div>
40 <p>is <span class="math">\(|\mathbf{M}| = ad - bc\)</span>
41 .</p>
42 <p>More than one display math block can be put in one math directive.
43 For example, the following sum and integral with limits:</p>
44 <div class="math">
45 \begin{equation*}
46 \int_0^1 x^n dx = \frac{1}{n + 1}
47 \end{equation*}
48 </div>
49 <div class="math">
50 \begin{equation*}
51 \sum_{n=1}^m n = \frac{m(m+1)}{2}
52 \end{equation*}
53 </div>
54 <p>LaTeX-supported Unicode math symbols can be used in math roles and
55 directives:</p>
56 <p>The Schrödinger equation</p>
57 <div class="math" id="eq-schrodinger">
58 \begin{equation*}
59 i\hbar \frac{\partial }{\partial t}\Psi = \hat{H}\Psi ,
60 \end{equation*}
61 </div>
62 <p>with the <em>wave function</em> <span class="math">\(\Psi \)</span>
63 , describes how the quantum state of a
64 physical system changes in time.</p>
65 <dl class="docutils">
66 <dt>Math-Accents:</dt>
67 <dd><table border="1" class="borderless first last docutils">
68 <colgroup>
69 <col width="33%" />
70 <col width="33%" />
71 <col width="33%" />
72 </colgroup>
73 <tbody valign="top">
74 <tr><td><span class="math">\(\acute{a}\)</span>
75 <tt class="docutils literal">\acute{a}</tt></td>
76 <td><span class="math">\(\dot{t}\)</span>
77 <tt class="docutils literal">\dot{t}</tt></td>
78 <td><span class="math">\(\hat{\gamma}\)</span>
79 <tt class="docutils literal"><span class="pre">\hat{\gamma}</span></tt></td>
80 </tr>
81 <tr><td><span class="math">\(\grave{a}\)</span>
82 <tt class="docutils literal">\grave{a}</tt></td>
83 <td><span class="math">\(\ddot{t}\)</span>
84 <tt class="docutils literal">\ddot{t}</tt></td>
85 <td><span class="math">\(\tilde{\alpha}\)</span>
86 <tt class="docutils literal"><span class="pre">\tilde{\alpha}</span></tt></td>
87 </tr>
88 <tr><td><span class="math">\(\breve{x}\)</span>
89 <tt class="docutils literal">\breve{x}</tt></td>
90 <td><span class="math">\(\dddot{t}\)</span>
91 <tt class="docutils literal">\dddot{t}</tt></td>
92 <td><span class="math">\(\vec{\imath}\)</span>
93 <tt class="docutils literal"><span class="pre">\vec{\imath}</span></tt></td>
94 </tr>
95 <tr><td><span class="math">\(\check{a}\)</span>
96 <tt class="docutils literal">\check{a}</tt></td>
97 <td><span class="math">\(\bar{a}\)</span>
98 <tt class="docutils literal">\bar{a}</tt></td>
99 <td><span class="math">\(\vec{R}\)</span>
100 <tt class="docutils literal">\vec{R}</tt></td>
101 </tr>
102 </tbody>
103 </table>
104 </dd>
105 </dl>
106 <!-- \widetilde{xxx}
107 \widehat{xxx} -->
108 <p>Modulation Transfer Function:</p>
109 <div class="math">
110 \begin{equation*}
111 \text{MTF} = \left|\frac{\mathcal{F}\{s(x)\}}
112 {\mathcal{F}\{ s(x)\} |_{\omega _{x}=0}}\right|
113 = \mathrm{abs}\left(\frac
114 {\int _{-\infty }^{\infty }s(x) \mathrm{e}^{\mathrm{i}\omega _{x}x}\mathrm{d}{x}}
115 {\int _{-\infty }^{\infty }s(x)\mathrm{d}{x}}
116 \right).
117 \end{equation*}
118 </div>
119 <p>Math split over two lines: If a double backslash is detected outside a
120 <tt class="docutils literal"><span class="pre">\begin{...}</span> <span class="pre">\end{...}</span></tt> pair, the math code is wrapped in an <a class="reference external" href="ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf">AMSmath</a>
121 <tt class="docutils literal">align</tt> environment:</p>
122 <div class="math">
123 \begin{align*}
124 s_{\mathrm{out}}(x) &amp; = s_{\mathrm{in}}(x') * s_\delta (x-x') \\
125 &amp; = \int s_{\mathrm{in}}(x')s_\delta (x-x')\mathrm{d}x'
126 \end{align*}
127 </div>
128 <p>Cases (&quot;manually&quot;, with <tt class="docutils literal">matrix</tt> environment):</p>
129 <div class="math">
130 \begin{equation*}
131 \mathrm{sgn}(x) = \left\{\begin{matrix}
132 -1 &amp; x&lt;0\\
133 1 &amp; x&gt;0
134 \end{matrix}\right.
135 \end{equation*}
136 </div>
137 <p>Cases with the <a class="reference external" href="ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf">AMSmath</a> <tt class="docutils literal">cases</tt> environment (not (yet) supported by
138 HTML writers with <tt class="docutils literal"><span class="pre">--math-output=MathML</span></tt>):</p>
139 <div class="math">
140 \begin{equation*}
141 \mathrm{sgn}(x) = \begin{cases}
142 -1 &amp; x&lt;0\\
143 1 &amp; x&gt;0
144 \end{cases}
145 \end{equation*}
146 </div>
147 </div>
148 </body>
149 </html>