Merge pull request #30 from chebee7i/mathjax

Add math equations to demo docs.
This commit is contained in:
Dave Snider 2013-11-04 20:09:27 -08:00
commit 5f7032ff8f
2 changed files with 21 additions and 2 deletions

View File

@ -28,7 +28,13 @@ sys.path.append(os.path.abspath('./test_py_module'))
# Add any Sphinx extension module names here, as strings. They can be extensions # Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc',] extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.mathjax',
]
# Math
mathjax_path = "http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
# Add any paths that contain templates here, relative to this directory. # Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates'] templates_path = ['_templates']

View File

@ -11,6 +11,19 @@ Contents:
.. toctree:: .. toctree::
:maxdepth: 2 :maxdepth: 2
This is a test. Here is an equation:
:math:`X_{0:5} = (X_0, X_1, X_2, X_3, X_4)`.
Here is another:
.. math::
\nabla^2 f =
\frac{1}{r^2} \frac{\partial}{\partial_r}
\left( r^2 \frac{\partial f}{\partial_r} \right) +
\frac{1}{r^2 \sin \theta} \frac{\partial f}{\partial_\theta}
\left( \sin \theta \, \frac{\partial f}{\partial_\theta} \right) +
\frac{1}{r^2 \sin^2\theta} \frac{\partial^2 f}{\partial_\phi^2}
API Test API Test
======== ========
@ -65,4 +78,4 @@ Citation
Here I am making a citation [1]_ Here I am making a citation [1]_
.. [1] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal repsonsive table stuff. .. [1] This is the citation I made, let's make this extremely long so that we can tell that it doesn't follow the normal responsive table stuff.