From 37699eefb2f7b65b771b727c69420f3382b05028 Mon Sep 17 00:00:00 2001 From: chebee7i Date: Mon, 4 Nov 2013 22:02:16 -0600 Subject: [PATCH] Add math equations to demo docs. --- demo_docs/source/conf.py | 8 +++++++- demo_docs/source/index.rst | 15 ++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/demo_docs/source/conf.py b/demo_docs/source/conf.py index 903c4327..0c059188 100644 --- a/demo_docs/source/conf.py +++ b/demo_docs/source/conf.py @@ -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 # 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. templates_path = ['_templates'] diff --git a/demo_docs/source/index.rst b/demo_docs/source/index.rst index c25eaa26..c82293f6 100644 --- a/demo_docs/source/index.rst +++ b/demo_docs/source/index.rst @@ -11,6 +11,19 @@ Contents: .. toctree:: :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 ======== @@ -65,4 +78,4 @@ Citation 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.