@@ -7,9 +7,14 @@ Developer's tips for documenting matplotlib
77Getting started
88===============
99
10+ Installing dependencies
11+ -----------------------
12+
1013The 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:
1318
14191. Sphinx-1.3 or later(Version 1.5.0 is not supported)
15202. numpydoc 0.4 or later
@@ -19,6 +24,30 @@ The requirements are as follows (https://github.com/matplotlib/matplotlib/blob/m
19246. pillow
20257. graphviz
2126
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+ -----------------
2251
2352The documentation sources are found in the :file: `doc/ ` directory in
2453the trunk. To build the users guide in html format, cd into
3059
3160 ./make.py html
3261
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:
3570
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.
3874
3975
4076Organization of matplotlib's documentation
0 commit comments