diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2012-10-18 23:13:45 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2012-10-18 23:13:45 +0000 |
commit | 553ed8e60f9d35b4584e2edeaba4647a04140f37 (patch) | |
tree | 835bdb71fc03088e48fba409dceadff0b4f9b78d /test | |
parent | 9d4623c13eb5b71b30f3ce70f6eef0d94bafb190 (diff) | |
download | docutils-553ed8e60f9d35b4584e2edeaba4647a04140f37.tar.gz |
Customizable MathJax URL (based on patch by Dmitry Shachnev).
Also: No line break after opening inline math tag.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7532 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/expected/math_output_html.html | 48 | ||||
-rw-r--r-- | test/functional/expected/math_output_latex.html | 48 | ||||
-rw-r--r-- | test/functional/expected/math_output_mathjax.html | 48 | ||||
-rw-r--r-- | test/functional/expected/standalone_rst_html4css1.html | 3 |
4 files changed, 49 insertions, 98 deletions
diff --git a/test/functional/expected/math_output_html.html b/test/functional/expected/math_output_html.html index 25f4f4e19..c77336787 100644 --- a/test/functional/expected/math_output_html.html +++ b/test/functional/expected/math_output_html.html @@ -13,10 +13,8 @@ <h1 class="title">Mathematics</h1> <p>Docutils supports inline math with the prefix or postfix <tt class="docutils literal">:math:</tt> -role specificator, <span class="formula"> -<i>n</i>! + sin(<i>x</i><span class="scripts"><sup class="script">2</sup><sub class="script"><i>n</i></sub></span>)</span> - and <span class="formula"> -<i>A</i><sub><span class="text">c</span></sub> = <span class="fraction"><span class="ignored">(</span><span class="numerator"><i>π</i></span><span class="ignored">)/(</span><span class="denominator">4</span><span class="ignored">)</span></span><i>d</i><sup>2</sup></span> +role specificator, <span class="formula"><i>n</i>! + sin(<i>x</i><span class="scripts"><sup class="script">2</sup><sub class="script"><i>n</i></sub></span>)</span> + and <span class="formula"><i>A</i><sub><span class="text">c</span></sub> = <span class="fraction"><span class="ignored">(</span><span class="numerator"><i>π</i></span><span class="ignored">)/(</span><span class="denominator">4</span><span class="ignored">)</span></span><i>d</i><sup>2</sup></span> , as well as displayed math via the <cite>math</cite> directive:</p> <div class="formula"> @@ -59,8 +57,7 @@ See <a class="reference internal" href="#eq-m">eq:M</a> and <a class="reference </span> </span><span class="array"><span class="arrayrow"><span class="bracket align-right">⎞</span></span><span class="arrayrow"><span class="bracket align-right">⎟</span></span><span class="arrayrow"><span class="bracket align-right">⎠</span></span></span> </div> -<p>is <span class="formula"> -|<b>M</b>| = <i>ad</i> − <i>bc</i></span> +<p>is <span class="formula">|<b>M</b>| = <i>ad</i> − <i>bc</i></span> .</p> <p>More than one display math block can be put in one math directive. For example, the following sum and integral with limits:</p> @@ -76,8 +73,7 @@ directives:</p> <div class="formula" id="eq-schrodinger"> <i>i</i>ℏ<span class="fraction"><span class="ignored">(</span><span class="numerator">∂</span><span class="ignored">)/(</span><span class="denominator">∂<i>t</i></span><span class="ignored">)</span></span>Ψ = <i>Ĥ</i>Ψ, </div> -<p>with the <em>wave function</em> <span class="formula"> -Ψ</span> +<p>with the <em>wave function</em> <span class="formula">Ψ</span> , describes how the quantum state of a physical system changes in time.</p> <dl class="docutils"> @@ -89,44 +85,32 @@ physical system changes in time.</p> <col width="33%" /> </colgroup> <tbody valign="top"> -<tr><td><span class="formula"> -<i>á</i></span> +<tr><td><span class="formula"><i>á</i></span> <tt class="docutils literal">\acute{a}</tt></td> -<td><span class="formula"> -<i>ṫ</i></span> +<td><span class="formula"><i>ṫ</i></span> <tt class="docutils literal">\dot{t}</tt></td> -<td><span class="formula"> -<i>γ̂</i></span> +<td><span class="formula"><i>γ̂</i></span> <tt class="docutils literal"><span class="pre">\hat{\gamma}</span></tt></td> </tr> -<tr><td><span class="formula"> -<i>à</i></span> +<tr><td><span class="formula"><i>à</i></span> <tt class="docutils literal">\grave{a}</tt></td> -<td><span class="formula"> -<i>ẗ</i></span> +<td><span class="formula"><i>ẗ</i></span> <tt class="docutils literal">\ddot{t}</tt></td> -<td><span class="formula"> -<i>α̃</i></span> +<td><span class="formula"><i>α̃</i></span> <tt class="docutils literal"><span class="pre">\tilde{\alpha}</span></tt></td> </tr> -<tr><td><span class="formula"> -<i>x̆</i></span> +<tr><td><span class="formula"><i>x̆</i></span> <tt class="docutils literal">\breve{x}</tt></td> -<td><span class="formula"> -<i>t⃛</i></span> +<td><span class="formula"><i>t⃛</i></span> <tt class="docutils literal">\dddot{t}</tt></td> -<td><span class="formula"> -<i>ı⃗</i></span> +<td><span class="formula"><i>ı⃗</i></span> <tt class="docutils literal"><span class="pre">\vec{\imath}</span></tt></td> </tr> -<tr><td><span class="formula"> -<i>ǎ</i></span> +<tr><td><span class="formula"><i>ǎ</i></span> <tt class="docutils literal">\check{a}</tt></td> -<td><span class="formula"> -<span class="bar"><i>a</i></span></span> +<td><span class="formula"><span class="bar"><i>a</i></span></span> <tt class="docutils literal">\bar{a}</tt></td> -<td><span class="formula"> -<i>R⃗</i></span> +<td><span class="formula"><i>R⃗</i></span> <tt class="docutils literal">\vec{R}</tt></td> </tr> </tbody> diff --git a/test/functional/expected/math_output_latex.html b/test/functional/expected/math_output_latex.html index c8605bab8..6a0d5cef1 100644 --- a/test/functional/expected/math_output_latex.html +++ b/test/functional/expected/math_output_latex.html @@ -12,10 +12,8 @@ <h1 class="title">Mathematics</h1> <p>Docutils supports inline math with the prefix or postfix <tt class="docutils literal">:math:</tt> -role specificator, <tt class="math"> -n! + \sin(x_n^2)</tt> - and <tt class="math"> -A_\text{c} = +role specificator, <tt class="math">n! + \sin(x_n^2)</tt> + and <tt class="math">A_\text{c} = \frac{\pi}{4} d^2</tt> , as well as displayed math via the <cite>math</cite> directive:</p> @@ -32,8 +30,7 @@ See <a class="reference internal" href="#eq-m">eq:M</a> and <a class="reference <pre class="math" id="eq-m"> \mathbf{M} = \left(\begin{matrix}a&b\\c&d\end{matrix}\right) </pre> -<p>is <tt class="math"> -|\mathbf{M}| = ad - bc</tt> +<p>is <tt class="math">|\mathbf{M}| = ad - bc</tt> .</p> <p>More than one display math block can be put in one math directive. For example, the following sum and integral with limits:</p> @@ -49,8 +46,7 @@ directives:</p> <pre class="math" id="eq-schrodinger"> i\hbar \frac{\partial }{\partial t}\Psi = \hat{H}\Psi , </pre> -<p>with the <em>wave function</em> <tt class="math"> -\Psi </tt> +<p>with the <em>wave function</em> <tt class="math">\Psi </tt> , describes how the quantum state of a physical system changes in time.</p> <dl class="docutils"> @@ -62,44 +58,32 @@ physical system changes in time.</p> <col width="33%" /> </colgroup> <tbody valign="top"> -<tr><td><tt class="math"> -\acute{a}</tt> +<tr><td><tt class="math">\acute{a}</tt> <tt class="docutils literal">\acute{a}</tt></td> -<td><tt class="math"> -\dot{t}</tt> +<td><tt class="math">\dot{t}</tt> <tt class="docutils literal">\dot{t}</tt></td> -<td><tt class="math"> -\hat{\gamma}</tt> +<td><tt class="math">\hat{\gamma}</tt> <tt class="docutils literal"><span class="pre">\hat{\gamma}</span></tt></td> </tr> -<tr><td><tt class="math"> -\grave{a}</tt> +<tr><td><tt class="math">\grave{a}</tt> <tt class="docutils literal">\grave{a}</tt></td> -<td><tt class="math"> -\ddot{t}</tt> +<td><tt class="math">\ddot{t}</tt> <tt class="docutils literal">\ddot{t}</tt></td> -<td><tt class="math"> -\tilde{\alpha}</tt> +<td><tt class="math">\tilde{\alpha}</tt> <tt class="docutils literal"><span class="pre">\tilde{\alpha}</span></tt></td> </tr> -<tr><td><tt class="math"> -\breve{x}</tt> +<tr><td><tt class="math">\breve{x}</tt> <tt class="docutils literal">\breve{x}</tt></td> -<td><tt class="math"> -\dddot{t}</tt> +<td><tt class="math">\dddot{t}</tt> <tt class="docutils literal">\dddot{t}</tt></td> -<td><tt class="math"> -\vec{\imath}</tt> +<td><tt class="math">\vec{\imath}</tt> <tt class="docutils literal"><span class="pre">\vec{\imath}</span></tt></td> </tr> -<tr><td><tt class="math"> -\check{a}</tt> +<tr><td><tt class="math">\check{a}</tt> <tt class="docutils literal">\check{a}</tt></td> -<td><tt class="math"> -\bar{a}</tt> +<td><tt class="math">\bar{a}</tt> <tt class="docutils literal">\bar{a}</tt></td> -<td><tt class="math"> -\vec{R}</tt> +<td><tt class="math">\vec{R}</tt> <tt class="docutils literal">\vec{R}</tt></td> </tr> </tbody> diff --git a/test/functional/expected/math_output_mathjax.html b/test/functional/expected/math_output_mathjax.html index 2d8fb52f1..cf79bb3a3 100644 --- a/test/functional/expected/math_output_mathjax.html +++ b/test/functional/expected/math_output_mathjax.html @@ -13,10 +13,8 @@ <h1 class="title">Mathematics</h1> <p>Docutils supports inline math with the prefix or postfix <tt class="docutils literal">:math:</tt> -role specificator, <span class="math"> -\(n! + \sin(x_n^2)\)</span> - and <span class="math"> -\(A_\text{c} = +role specificator, <span class="math">\(n! + \sin(x_n^2)\)</span> + and <span class="math">\(A_\text{c} = \frac{\pi}{4} d^2\)</span> , as well as displayed math via the <cite>math</cite> directive:</p> @@ -39,8 +37,7 @@ See <a class="reference internal" href="#eq-m">eq:M</a> and <a class="reference \mathbf{M} = \left(\begin{matrix}a&b\\c&d\end{matrix}\right) \end{equation*} </div> -<p>is <span class="math"> -\(|\mathbf{M}| = ad - bc\)</span> +<p>is <span class="math">\(|\mathbf{M}| = ad - bc\)</span> .</p> <p>More than one display math block can be put in one math directive. For example, the following sum and integral with limits:</p> @@ -62,8 +59,7 @@ directives:</p> i\hbar \frac{\partial }{\partial t}\Psi = \hat{H}\Psi , \end{equation*} </div> -<p>with the <em>wave function</em> <span class="math"> -\(\Psi \)</span> +<p>with the <em>wave function</em> <span class="math">\(\Psi \)</span> , describes how the quantum state of a physical system changes in time.</p> <dl class="docutils"> @@ -75,44 +71,32 @@ physical system changes in time.</p> <col width="33%" /> </colgroup> <tbody valign="top"> -<tr><td><span class="math"> -\(\acute{a}\)</span> +<tr><td><span class="math">\(\acute{a}\)</span> <tt class="docutils literal">\acute{a}</tt></td> -<td><span class="math"> -\(\dot{t}\)</span> +<td><span class="math">\(\dot{t}\)</span> <tt class="docutils literal">\dot{t}</tt></td> -<td><span class="math"> -\(\hat{\gamma}\)</span> +<td><span class="math">\(\hat{\gamma}\)</span> <tt class="docutils literal"><span class="pre">\hat{\gamma}</span></tt></td> </tr> -<tr><td><span class="math"> -\(\grave{a}\)</span> +<tr><td><span class="math">\(\grave{a}\)</span> <tt class="docutils literal">\grave{a}</tt></td> -<td><span class="math"> -\(\ddot{t}\)</span> +<td><span class="math">\(\ddot{t}\)</span> <tt class="docutils literal">\ddot{t}</tt></td> -<td><span class="math"> -\(\tilde{\alpha}\)</span> +<td><span class="math">\(\tilde{\alpha}\)</span> <tt class="docutils literal"><span class="pre">\tilde{\alpha}</span></tt></td> </tr> -<tr><td><span class="math"> -\(\breve{x}\)</span> +<tr><td><span class="math">\(\breve{x}\)</span> <tt class="docutils literal">\breve{x}</tt></td> -<td><span class="math"> -\(\dddot{t}\)</span> +<td><span class="math">\(\dddot{t}\)</span> <tt class="docutils literal">\dddot{t}</tt></td> -<td><span class="math"> -\(\vec{\imath}\)</span> +<td><span class="math">\(\vec{\imath}\)</span> <tt class="docutils literal"><span class="pre">\vec{\imath}</span></tt></td> </tr> -<tr><td><span class="math"> -\(\check{a}\)</span> +<tr><td><span class="math">\(\check{a}\)</span> <tt class="docutils literal">\check{a}</tt></td> -<td><span class="math"> -\(\bar{a}\)</span> +<td><span class="math">\(\bar{a}\)</span> <tt class="docutils literal">\bar{a}</tt></td> -<td><span class="math"> -\(\vec{R}\)</span> +<td><span class="math">\(\vec{R}\)</span> <tt class="docutils literal">\vec{R}</tt></td> </tr> </tbody> diff --git a/test/functional/expected/standalone_rst_html4css1.html b/test/functional/expected/standalone_rst_html4css1.html index 9e08674cc..87a5e91be 100644 --- a/test/functional/expected/standalone_rst_html4css1.html +++ b/test/functional/expected/standalone_rst_html4css1.html @@ -862,8 +862,7 @@ directly (the code will not be parsed/tagged, as the language is not known) or as base for special code roles, e.g. the LaTeX code in the next paragraph.</p> <p>Docutils uses LaTeX syntax for math directives and roles: -<code class="tex">\alpha = f(x)</code> prints <span class="math"> -\(\alpha = f(x)\)</span> +<code class="tex">\alpha = f(x)</code> prints <span class="math">\(\alpha = f(x)\)</span> .</p> <p>The <tt class="docutils literal">:code:</tt> option of the <cite>include</cite> directive sets the included content as a code block, here the rst file <tt class="docutils literal">header_footer.txt</tt> with line numbers:</p> |