@@ -18,45 +18,68 @@ Getting started
18
18
General file structure
19
19
----------------------
20
20
21
- All documentation is built from the :file: `doc/ ` directory. This directory
22
- contains both reStructuredText (ReST _; ``.rst ``) files that contain pages in
23
- the documentation and configuration files for Sphinx _.
21
+ All documentation is built from the :file: `doc/ `, :file: `tutorials/ `, and
22
+ :file: `examples/ ` directories. The :file: `doc/ ` directory contains
23
+ configuration files for Sphinx and reStructuredText (ReST _; ``.rst ``) files
24
+ that are rendered to documentation pages.
24
25
25
- The `` .rst `` files are kept in :file: ` doc/users `,
26
- :file: ` doc/devel `, :file: ` doc/api ` and :file: `doc/faq `. The main entry point is
27
- :file: `doc/ index.rst `, which pulls in the :file: `index.rst ` file for the users
28
- guide, developers guide , api reference, and FAQs. The documentation suite is
29
- built as a single document in order to make the most effective use of cross
30
- referencing.
26
+
27
+ The main entry point is :file: `doc/index.rst `, which pulls in the
28
+ :file: `index.rst ` file for the users guide ( :file: `doc/users `), developers
29
+ guide ( :file: ` doc/devel `) , api reference ( :file: ` doc/api `) , and FAQs
30
+ ( :file: ` doc/faq `). The documentation suite is built as a single document in
31
+ order to make the most effective use of cross referencing.
31
32
32
33
Sphinx _ also creates ``.rst `` files that are staged in :file: `doc/api ` from
33
34
the docstrings of the classes in the Matplotlib library. Except for
34
35
:file: `doc/api/api_changes/ `, these ``.rst `` files are created when the
35
36
documentation is built.
36
37
37
38
Similarly, the contents of :file: `doc/gallery ` and :file: `doc/tutorials ` are
38
- generated by the `Sphinx Gallery `_ from the sources in :file: `examples ` and
39
- :file: `tutorials `. These sources consist of python scripts that have ReST _
40
- documentation built into their comments. Don't directly edit the
41
- ``.rst `` files in :file: `doc/gallery ` and :file: `doc/tutorials ` as they are
42
- regenerated when the documentation are built.
39
+ generated by the `Sphinx Gallery `_ from the sources in :file: `examples/ ` and
40
+ :file: `tutorials/ `. These sources consist of python scripts that have ReST _
41
+ documentation built into their comments.
42
+
43
+ .. note ::
44
+
45
+ Don't directly edit the ``.rst `` files in :file: `doc/gallery `,
46
+ :file: `doc/tutorials `, and :file: `doc/api ` (excepting
47
+ :file: `doc/api/api_changes/ `). Sphinx _ regenerates files in these
48
+ directories when building documentation.
43
49
44
50
Installing dependencies
45
51
-----------------------
46
52
47
53
The documentation for Matplotlib is generated from reStructuredText (ReST _)
48
- using the Sphinx _ documentation generation tool. There are several extra
49
- requirements that are needed to build the documentation. They are listed in
50
- :file: `doc-requirements.txt `, which is shown below:
54
+ using the Sphinx _ documentation generation tool. To build the documentation
55
+ you will need to (1) set up an appropriate Python environment and (2)
56
+ separately install LaTeX and Graphviz.
57
+
58
+ To (1) set up an appropriate Python environment for building the
59
+ documentation, you should:
60
+
61
+ * create a clean virtual environment with no existing Matplotlib
62
+ installation
63
+ * install the Python packages required for Matplotlib
64
+ * install the additional Python packages required to build the documentation
65
+
66
+ There are several extra python packages that are needed to build the
67
+ documentation. They are listed in :file: `doc-requirements.txt `, which is
68
+ shown below:
51
69
52
70
.. include :: ../../requirements/doc/doc-requirements.txt
53
71
:literal:
54
72
73
+ To (2) set up LaTeX and Graphviz dependencies you should:
74
+
75
+ * install a minimal working LaTeX distribution
76
+ * install the LaTeX packages cm-super and dvipng
77
+ * install `Graphviz <http://www.graphviz.org/download >`_
78
+
55
79
.. note ::
56
80
57
- * You'll need a minimal working LaTeX distribution for many examples to run.
58
- * `Graphviz <http://www.graphviz.org/Download.php >`_ is not a Python package,
59
- and needs to be installed separately.
81
+ The documentation will not build without LaTeX and Graphviz. These are not
82
+ Python packages and must be installed separately.
60
83
61
84
Building the docs
62
85
-----------------
0 commit comments