Add eqation numbers and references to the mathjax tutorial

This commit is contained in:
Kovid Goyal 2012-08-19 11:37:28 +05:30
parent 253a5ed165
commit 7eb1db3b7c
3 changed files with 8 additions and 7 deletions

View File

@ -6,7 +6,10 @@
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<!-- This script tag is needed to make calibre's ebook-viewer recpgnize that this file needs math typesetting --> <!-- This script tag is needed to make calibre's ebook-viewer recpgnize that this file needs math typesetting -->
<script type="text/x-mathjax-config"></script> <script type="text/x-mathjax-config">
// This line adds numbers to all equations automatically, unless explicitly suppressed.
MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "all"} } });
</script>
<style> <style>
h1 {text-align:center} h1 {text-align:center}
@ -24,13 +27,11 @@ h2 {
<h1>Sample Equations</h1> <h1>Sample Equations</h1>
<blockquote>
<h2>The Lorenz Equations</h2> <h2>The Lorenz Equations</h2>
<p> <p>
\begin{align} \begin{align}
\dot{x} &amp; = \sigma(y-x) \\ \dot{x} &amp; = \sigma(y-x) \label{lorenz}\\
\dot{y} &amp; = \rho x - y - xz \\ \dot{y} &amp; = \rho x - y - xz \\
\dot{z} &amp; = -\beta z + xy \dot{z} &amp; = -\beta z + xy
\end{align} \end{align}
@ -87,14 +88,15 @@ h2 {
<h2>In-line Mathematics</h2> <h2>In-line Mathematics</h2>
<p>Finally, while display equations look good for a page of samples, the <p>While display equations look good for a page of samples, the
ability to mix math and text in a paragraph is also important. This ability to mix math and text in a paragraph is also important. This
expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation. As expression \(\sqrt{3x-1}+(1+x)^2\) is an example of an inline equation. As
you see, equations can be used this way as well, without unduly you see, equations can be used this way as well, without unduly
disturbing the spacing between lines.</p> disturbing the spacing between lines.</p>
<h2>References to equations</h2>
</blockquote> <p>Here is a reference to the Lorenz Equations (\ref{lorenz}). Clicking on the equation number will take you back to the equation.</p>
</body> </body>
</html> </html>

Binary file not shown.

View File

@ -53,5 +53,4 @@ HTML file to EPUB in |app|: `mathjax.epub <_static/mathjax.epub>`_.
.. literalinclude:: mathjax.html .. literalinclude:: mathjax.html
:language: html :language: html
:emphasize-lines: 8,9,29-38