Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@

# -- General configuration -----------------------------------------------------

# this line tells sampledoc where the extensions begin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is un-necessary


# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['matplotlib.sphinxext.mathmpl',
'matplotlib.sphinxext.only_directives',
extensions = ['matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
'matplotlib.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_directive',
'IPython.sphinxext.ipython_console_highlighting',
'sphinx.ext.mathjax',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.inheritance_diagram',
'ipython_console_highlighting',
'numpydoc']

# this line tells sampledoc where the extensions end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here, this is un-necessary



# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
Expand Down
42 changes: 13 additions & 29 deletions extensions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,12 @@ file by adding the following. First we tell it where to find the extensions::
# os.path.abspath to make it absolute, like shown here.
sys.path.append(os.path.abspath('sphinxext'))

And then we tell it what extensions to load::

# Add any Sphinx extension module names here, as strings. They can
# be extensions coming with Sphinx (named 'sphinx.ext.*') or your
# custom ones.
extensions = [
'matplotlib.sphinxext.mathmpl',
'matplotlib.sphinxext.only_directives',
'matplotlib.sphinxext.plot_directive',
'matplotlib.sphinxext.ipython_directive',
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'ipython_console_highlighting',
'inheritance_diagram',
'numpydoc']
And then we tell it what extensions to load:

.. literalinclude:: conf.py
:language: python
:start-after: # this line tells sampledoc where the extensions begin
:end-before: # this line tells sampledoc where the extensions end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i see what you did - this makes it hard to read the docs unrendered...


Now let's look at some of these in action. You can see the literal
source for this file at :ref:`extensions-literal`.
Expand Down Expand Up @@ -115,25 +106,18 @@ which is rendered as

W^{3\beta}_{\delta_1 \rho_1 \sigma_2} \approx U^{3\beta}_{\delta_1 \rho_1}

This documentation framework includes a Sphinx extension,
:file:`sphinxext/mathmpl.py`, that uses matplotlib to render math
equations when generating HTML, and LaTeX itself when generating a
PDF. This can be useful on systems that have matplotlib, but not
LaTeX, installed. To use it, add ``mathmpl`` to the list of
extensions in :file:`conf.py`.
Recent versions of Sphinx include built-in support for math.
There are three flavors:

Current SVN versions of Sphinx now include built-in support for math.
There are two flavors:
- sphinx.ext.pngmath: uses dvipng to render the equation

- pngmath: uses dvipng to render the equation
- sphinx.ext.mathjax: renders the math in the browser using Javascript

- jsmath: renders the math in the browser using Javascript
- sphinx.ext.jsmath: it's an older code, but it checks out

To use these extensions instead, add ``sphinx.ext.pngmath`` or
``sphinx.ext.jsmath`` to the list of extensions in :file:`conf.py`.
Additionally, matplotlib has its own math support:

All three of these options for math are designed to behave in the same
way.
- matplotlib.sphinxext.mathmpl

See the matplotlib `mathtext guide
<http://matplotlib.sourceforge.net/users/mathtext.html>`_ for lots
Expand Down
114 changes: 0 additions & 114 deletions sphinxext/ipython_console_highlighting.py

This file was deleted.