@@ -11,9 +11,9 @@ Installing dependencies
11
11
-----------------------
12
12
13
13
The documentation for Matplotlib is generated from reStructuredText using
14
- the Sphinx _ documentation generation tool. There are several extra
15
- requirements that are needed to build the documentation. They are listed in
16
- :file: `doc-requirements.txt ` as well as listed below:
14
+ the Sphinx _ documentation generation tool. There are several extra requirements
15
+ that are needed to build the documentation. They are listed in
16
+ :file: `doc-requirements.txt ` and listed below:
17
17
18
18
1. Sphinx 1.3 or later (1.5.0 is not supported)
19
19
2. numpydoc 0.4 or later
@@ -45,33 +45,31 @@ Sphinx_.
45
45
the directories :file: `docs/gallery ` and :file: `docs/tutorials `
46
46
are generated.
47
47
48
- The configuration file for Sphinx is :file: `doc/conf.py `. It controls which
48
+ The configuration file for Sphinx is :file: `doc/conf.py `. It controls which
49
49
directories Sphinx parses, how the docs are built, and how the extensions are
50
50
used.
51
51
52
52
Building the docs
53
53
-----------------
54
54
55
- The documentation sources are found in the :file: `doc/ ` directory in
56
- the trunk. To build the documentation in html format, cd into
57
- :file: `doc/ ` and run:
55
+ The documentation sources are found in the :file: `doc/ ` directory in the trunk.
56
+ To build the documentation in html format, cd into :file: `doc/ ` and run:
58
57
59
58
.. code-block :: sh
60
59
61
60
python make.py html
62
61
63
- The list of comamnds and flags for ``make.py `` can be listed by running
64
- ``python make.py --help ``. In particular,
62
+ The list of commands and flags for ``make.py `` can be listed by running
63
+ ``python make.py --help ``. In particular,
65
64
66
- * ``python make.py clean `` will delete the built Sphinx files. Use this
67
- command if you're getting strange errors about missing paths or broken links,
65
+ * ``python make.py clean `` will delete the built Sphinx files. Use this command
66
+ if you're getting strange errors about missing paths or broken links,
68
67
particularly if you move files around.
69
68
* ``python make.py latex `` builds a PDF of the documentation.
70
69
* The ``--allowsphinxwarnings `` flag allows the docs to continue building even
71
- if Sphinx throws a warning. This is useful for debugging and spot-checking
70
+ if Sphinx throws a warning. This is useful for debugging and spot-checking
72
71
many warnings at once.
73
72
74
-
75
73
Documentation organization
76
74
==========================
77
75
@@ -94,7 +92,7 @@ statement, such as::
94
92
Formatting
95
93
==========
96
94
97
- Most documentaiton lives in "docstrings". These are comment blocks in the source
95
+ Most documentation lives in "docstrings". These are comment blocks in the source
98
96
code that explain how the code works. All new or edited docstrings should
99
97
conform to the numpydoc guidelines. These split the docstring into a number
100
98
of sections - see
@@ -139,8 +137,8 @@ An example docstring looks like:
139
137
axhline: horizontal line across the axes
140
138
"""
141
139
142
- The Sphinx website contains plenty of documentation _ concerning ReST markup and
143
- working with Sphinx in general.
140
+ The Sphinx website also contains plenty of documentation _ concerning ReST
141
+ markup and working with Sphinx in general.
144
142
145
143
Function arguments
146
144
------------------
@@ -165,58 +163,6 @@ nor the ````literal```` role:
165
163
166
164
Please do not describe ``argument`` like this.
167
165
168
- Maths
169
- -----
170
- Mathematical expressions can be rendered as png images in html, and in the
171
- usual way by LaTeX. For example,
172
-
173
- .. code-block :: rst
174
-
175
- :math:`\sin(x_n^2)`
176
-
177
- yields :math: `\sin (x_n^2 )`, and:
178
-
179
- .. code-block :: rst
180
-
181
- .. math::
182
-
183
- \int_{-\infty}^{\infty}\frac{e^{i\phi}}{1+x^2\frac{e^{i\phi}}{1+x^2}}
184
-
185
- yields :math: `\int _{-\infty }^{\infty }\frac {e^{i\phi }}{1 +x^2 \frac {e^{i\phi }}{1 +x^2 }}`.
186
-
187
- IPython code
188
- ------------
189
- Interactive IPython sessions can be illustrated in the documentation using
190
- the following directive:
191
-
192
- .. code-block :: rst
193
-
194
- .. sourcecode-block:: ipython
195
-
196
- In [69]: lines = plot([1,2,3])
197
-
198
- which yields
199
-
200
- .. code-block :: ipython
201
-
202
- In [69]: lines = plot([1,2,3])
203
-
204
- Footnotes
205
- ---------
206
- Footnotes [# ]_ can be added using ``[#]_ ``, followed later by:
207
-
208
- .. code-block :: rst
209
-
210
- .. rubric:: Footnotes
211
-
212
- .. [#]
213
-
214
- which yields
215
-
216
- .. rubric :: Footnotes
217
-
218
- .. [# ] For example.
219
-
220
166
Figures
221
167
=======
222
168
0 commit comments