@@ -7,9 +7,14 @@ Developer's tips for documenting matplotlib
7
7
Getting started
8
8
===============
9
9
10
+ Installing dependencies
11
+ -----------------------
12
+
10
13
The documentation for matplotlib is generated from ReStructured Text using the
11
- Sphinx _ documentation generation tool.
12
- The requirements are as follows (https://github.com/matplotlib/matplotlib/blob/master/doc-requirements.txt)
14
+ Sphinx _ documentation generation tool. There are several extra requirements that
15
+ are needed to build the documentation. They are listed in the file
16
+ `doc-requirements.txt <https://github.com/matplotlib/matplotlib/blob/master/doc-requirements.txt >`_
17
+ as well as listed below:
13
18
14
19
1. Sphinx-1.3 or later(Version 1.5.0 is not supported)
15
20
2. numpydoc 0.4 or later
@@ -19,6 +24,30 @@ The requirements are as follows (https://github.com/matplotlib/matplotlib/blob/m
19
24
6. pillow
20
25
7. graphviz
21
26
27
+ .. note ::
28
+
29
+ * You'll need a minimal working latex distribution for many examples to run.
30
+ * Graphviz is not pip-installable so you need to install this on your own.
31
+
32
+ General structure
33
+ -----------------
34
+
35
+ All documentation is built from the :file: `doc/ ` directory. This folder contains both
36
+ ``.rst `` files that contains pages in the documentation, folders that contain more
37
+ ``.rst `` files, and configuration for Sphinx.
38
+
39
+ .. note ::
40
+
41
+ An exception to this are the folders :file: `gallery ` and :file: `tutorials `, which
42
+ exist in the root folder. These contain python files that are built by ``sphinx-gallery ``.
43
+ When the docs are built, folders of the same name will be generated inside of :file: `docs/ `.
44
+ These can be safely deleted.
45
+
46
+ The configuration file for Sphinx is in :file: `doc/conf.py `. It controls which folders
47
+ sphinx parses, how the docs are built, and how the extensions are used.
48
+
49
+ Building the docs
50
+ -----------------
22
51
23
52
The documentation sources are found in the :file: `doc/ ` directory in
24
53
the trunk. To build the users guide in html format, cd into
30
59
31
60
./make.py html
32
61
33
- you can also pass a ``latex `` flag to make.py to build a pdf, or pass no
34
- arguments to build everything.
62
+ There are many other flags you can pass to ``make.py ``, and you can see the
63
+ full list inside that file. Here are two useful ones:
64
+
65
+ * ``clean `` will delete the built sphinx files. Call if you're getting strange
66
+ errors about missing paths or broken links, particularly if you move files around.
67
+ * ``latex `` builds a pdf of the documentation
68
+
69
+ In addition, these are useful flags:
35
70
36
- The output produced by Sphinx can be configured by editing the :file: `conf.py `
37
- file located in the :file: `doc/ `.
71
+ * ``--allowsphinxwarnings `` will allow the docs to continue building even if sphinx
72
+ throws a warning. This is useful for debugging and spot-checking many warnings
73
+ at once.
38
74
39
75
40
76
Organization of matplotlib's documentation
0 commit comments