@@ -15,13 +15,14 @@ the Sphinx_ documentation generation tool. There are several extra
15
15
requirements that are needed to build the documentation. They are listed in
16
16
:file: `doc-requirements.txt ` as well as listed below:
17
17
18
- 1. Sphinx 1.3 or later (1.5.0 is not supported)
19
- 2. numpydoc 0.4 or later
20
- 3. IPython
21
- 4. mock
22
- 5. colorspacious
23
- 6. Pillow
24
- 7. Graphviz
18
+ * Sphinx>=1.3, !=1.5.0, !=1.6.4
19
+ * colorspacious
20
+ * IPython
21
+ * mock
22
+ * numpydoc>=0.4
23
+ * Pillow
24
+ * sphinx-gallery>=0.1.12
25
+ * graphviz
25
26
26
27
.. note ::
27
28
@@ -39,12 +40,12 @@ Sphinx_.
39
40
40
41
.. note ::
41
42
42
- An exception to this are the directories :file: `gallery ` and
43
- :file: `tutorials `, which exist in the root directory. These contain Python
44
- files that are built by `Sphinx Gallery `_. When the docs are built,
45
- directories of the same name will be generated inside of :file: `docs/ `. The
46
- generated directories :file: `docs/gallery ` and :file: `docs/tutorials ` can be
47
- safely deleted.
43
+ An exception to this are the directories :file: `gallery ` and
44
+ :file: `tutorials `, which exist in the root directory. These contain Python
45
+ files that are built by `Sphinx Gallery `_. When the docs are built,
46
+ directories of the same name will be generated inside of :file: `docs/ `. The
47
+ generated directories :file: `docs/gallery ` and :file: `docs/tutorials ` can be
48
+ safely deleted.
48
49
49
50
The configuration file for Sphinx is :file: `doc/conf.py `. It controls which
50
51
directories Sphinx parses, how the docs are built, and how the extensions are
@@ -55,23 +56,34 @@ Building the docs
55
56
56
57
The documentation sources are found in the :file: `doc/ ` directory in
57
58
the trunk. To build the users guide in html format, cd into
58
- :file: `doc/ ` and do:
59
+ :file: `doc/ ` and run
59
60
60
61
.. code-block :: sh
61
62
62
- python make.py html
63
+ make html
63
64
64
- The list of comamnds and flags for ``make.py `` can be listed by running
65
- ``python make.py --help ``. In particular,
65
+ Other useful invocations include
66
66
67
- * ``python make.py clean `` will delete the built Sphinx files. Use this
68
- command if you're getting strange errors about missing paths or broken links,
69
- particularly if you move files around.
70
- * ``python make.py latex `` builds a PDF of the documentation.
71
- * The ``--allowsphinxwarnings `` flag allows the docs to continue building even
72
- if Sphinx throws a warning. This is useful for debugging and spot-checking
73
- many warnings at once.
67
+ .. code :: sh
74
68
69
+ # Delete built files. May help if you get errors about missing paths or
70
+ # broken links.
71
+ make clean
72
+
73
+ # Build pdf docs.
74
+ make latexpdf
75
+
76
+ You can build the documentation with several options:
77
+
78
+ * ``make O=-W html `` turns Sphinx warnings into errors. The continuous
79
+ integration script uses this option.
80
+ * ``make O=-j4 html `` (for example) runs a parallel build with 4 processes.
81
+ * ``make O=-Dplot_formats=png:100 html `` saves figures in low resolution.
82
+ * ``make O=-Dplot_gallery=0 html `` skips the gallery build.
83
+
84
+ Multiple options can be combined using e.g. ``make O='-W -j4 ...' html ``. On
85
+ Windows, the option needs to be set as the ``SPHINXOPTS `` environment
86
+ variable, e.g. ``set SPHINXOPTS=-W -j4 & make html ``.
75
87
76
88
Organization of Matplotlib's documentation
77
89
==========================================
0 commit comments