diff --git a/doc/_static/mpl.css b/doc/_static/mpl.css index 7aa01b731654..c6b8b5327e60 100644 --- a/doc/_static/mpl.css +++ b/doc/_static/mpl.css @@ -505,3 +505,33 @@ ul.search li div.context { ul.keywordmatches li.goodmatch a { font-weight: bold; } + +table.docutils { + border-spacing: 2px; + border: collapse; + border-top-width: 1px; + border-right-width: 0px; + border-bottom-width: 1px; + border-left-width: 0px; +} + +table.docutils tr:nth-child(even) { + background-color: #F3F3FF; +} +table.docutils tr:nth-child(odd) { + background-color: #FFFFEE; +} + +table.docutils tr { + border-style: solid none solid none; + border-width: 1px 0 1px 0; + border-color: #AAAAAA; +} + +table.docutils th { + padding: 1px 8px 1px 5px; +} + +table.docutils td { + border-width: 1px 0 1px 0; +} diff --git a/doc/conf.py b/doc/conf.py index 445ced4c048b..a89820efb252 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -11,12 +11,14 @@ # All configuration values have a default value; values that are commented out # serve to show the default value. -import sys, os +import os +import sys +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. -sys.path.append(os.path.abspath('sphinxext')) +sys.path.insert(0, os.path.abspath('sphinxext')) # General configuration # --------------------- @@ -25,10 +27,24 @@ # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = ['matplotlib.sphinxext.mathmpl', 'math_symbol_table', 'sphinx.ext.autodoc', 'matplotlib.sphinxext.only_directives', - 'sphinx.ext.doctest', + 'sphinx.ext.doctest', 'sphinx.ext.autosummary', 'matplotlib.sphinxext.plot_directive', 'sphinx.ext.inheritance_diagram', 'gen_gallery', 'gen_rst', - 'matplotlib.sphinxext.ipython_console_highlighting', 'github'] + 'matplotlib.sphinxext.ipython_console_highlighting', 'github', + 'numpy_ext.numpydoc'] + + +try: + import numpydoc +except ImportError: + raise ImportError("No modyle named numpydoc - you need to install " + "numpydoc to build the documentation.") + + +autosummary_generate = True + +if sphinx.__version__ >= 1.1: + autodoc_docstring_signature = True # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -133,7 +149,9 @@ # Additional templates that should be rendered to pages, maps page names to # template names. -html_additional_pages = {'index': 'index.html', 'gallery':'gallery.html', 'citing':'citing.html'} +html_additional_pages = {'index': 'index.html', + 'gallery':'gallery.html', + 'citing': 'citing.html'} # If false, no module index is generated. #html_use_modindex = True diff --git a/doc/devel/documenting_mpl.rst b/doc/devel/documenting_mpl.rst index f93fed655ab5..a1e1eb107e9c 100644 --- a/doc/devel/documenting_mpl.rst +++ b/doc/devel/documenting_mpl.rst @@ -7,9 +7,9 @@ Documenting matplotlib Getting started =============== -The documentation for matplotlib is generated from ReStructured Text -using the Sphinx_ documentation generation tool. Sphinx-1.0 or later -is required. +The documentation for matplotlib is generated from ReStructured Text using the +Sphinx_ documentation generation tool. Sphinx-1.0 or later and numpydoc 0.4 or +later is required. The documentation sources are found in the :file:`doc/` directory in the trunk. To build the users guide in html format, cd into