@@ -9,7 +9,7 @@ Paragraph-level markup
9
9
These directives create short paragraphs and can be used inside information
10
10
units as well as normal text:
11
11
12
- .. directive :: note
12
+ .. directive :: .. note::
13
13
14
14
An especially important bit of information about an API that a user should be
15
15
aware of when using whatever bit of API the note pertains to. The content of
@@ -22,13 +22,13 @@ units as well as normal text:
22
22
23
23
This function is not suitable for sending spam e-mails.
24
24
25
- .. directive :: warning
25
+ .. directive :: .. warning::
26
26
27
27
An important bit of information about an API that a user should be very aware
28
28
of when using whatever bit of API the warning pertains to. The content of
29
29
the directive should be written in complete sentences and include all
30
- appropriate punctuation. This differs from `` note `` in that it is recommended
31
- over `` note ` ` for information regarding security.
30
+ appropriate punctuation. This differs from :dir: ` note ` in that it is
31
+ recommended over :dir: ` note ` for information regarding security.
32
32
33
33
.. directive :: .. versionadded:: version
34
34
@@ -49,34 +49,35 @@ units as well as normal text:
49
49
50
50
.. directive :: .. versionchanged:: version
51
51
52
- Similar to `` versionadded ` `, but describes when and what changed in the named
52
+ Similar to :dir: ` versionadded `, but describes when and what changed in the named
53
53
feature in some way (new parameters, changed side effects, etc.).
54
54
55
55
--------------
56
56
57
57
.. directive :: seealso
58
58
59
59
Many sections include a list of references to module documentation or
60
- external documents. These lists are created using the ``seealso `` directive.
60
+ external documents. These lists are created using the :dir: `seealso `
61
+ directive.
61
62
62
- The `` seealso ` ` directive is typically placed in a section just before any
63
+ The :dir: ` seealso ` directive is typically placed in a section just before any
63
64
sub-sections. For the HTML output, it is shown boxed off from the main flow
64
65
of the text.
65
66
66
- The content of the `` seealso ` ` directive should be a reST definition list.
67
+ The content of the :dir: ` seealso ` directive should be a reST definition list.
67
68
Example::
68
69
69
70
.. seealso::
70
71
71
- Module :mod:`zipfile`
72
- Documentation of the :mod:`zipfile` standard module.
72
+ Module :py: mod:`zipfile`
73
+ Documentation of the :py: mod:`zipfile` standard module.
73
74
74
75
`GNU tar manual, Basic Tar Format <http://link>`_
75
76
Documentation for tar archive files, including GNU tar extensions.
76
77
77
78
There's also a "short form" allowed that looks like this::
78
79
79
- .. seealso:: modules :mod:`zipfile`, :mod:`tarfile`
80
+ .. seealso:: modules :py: mod:`zipfile`, :py :mod:`tarfile`
80
81
81
82
.. versionadded :: 0.5
82
83
The short form.
@@ -96,7 +97,8 @@ units as well as normal text:
96
97
97
98
.. directive :: centered
98
99
99
- This directive creates a centered boldfaced line of text. Use it as follows::
100
+ This directive creates a centered boldfaced line of text. Use it as
101
+ follows::
100
102
101
103
.. centered:: LICENSE AGREEMENT
102
104
@@ -126,16 +128,17 @@ Table-of-contents markup
126
128
------------------------
127
129
128
130
The :dir: `toctree ` directive, which generates tables of contents of
129
- subdocuments, is described in "Sphinx concepts" .
131
+ subdocuments, is described in :ref: ` toctree-directive ` .
130
132
131
- For local tables of contents, use the standard reST :dir: `contents ` directive.
133
+ For local tables of contents, use the standard reST :rstdir: `contents directive
134
+ <contents> `.
132
135
133
136
134
137
Index-generating markup
135
138
-----------------------
136
139
137
- Sphinx automatically creates index entries from all information units (like
138
- functions, classes or attributes) like discussed before .
140
+ Sphinx automatically creates index entries from all object descriptions (like
141
+ functions, classes or attributes) like discussed in :ref: ` domains ` .
139
142
140
143
However, there is also an explicit directive available, to make the index more
141
144
comprehensive and enable index entries in documents where information is not
@@ -159,9 +162,9 @@ mainly contained in information units, such as the language reference.
159
162
160
163
...
161
164
162
- This directive contains five entries, which will be converted to entries in the
163
- generated index which link to the exact location of the index statement (or, in
164
- case of offline media, the corresponding page number).
165
+ This directive contains five entries, which will be converted to entries in
166
+ the generated index which link to the exact location of the index statement
167
+ (or, in case of offline media, the corresponding page number).
165
168
166
169
Since index directives generate cross-reference targets at their location in
167
170
the source, it makes sense to put them *before * the thing they refer to --
@@ -171,18 +174,19 @@ mainly contained in information units, such as the language reference.
171
174
172
175
single
173
176
Creates a single index entry. Can be made a subentry by separating the
174
- subentry text with a semicolon (this notation is also used below to describe
175
- what entries are created).
177
+ subentry text with a semicolon (this notation is also used below to
178
+ describe what entries are created).
176
179
pair
177
180
``pair: loop; statement `` is a shortcut that creates two index entries,
178
181
namely ``loop; statement `` and ``statement; loop ``.
179
182
triple
180
- Likewise, ``triple: module; search; path `` is a shortcut that creates three
181
- index entries, which are ``module; search path ``, ``search; path, module `` and
182
- ``path; module search ``.
183
+ Likewise, ``triple: module; search; path `` is a shortcut that creates
184
+ three index entries, which are ``module; search path ``, ``search; path,
185
+ module `` and ``path; module search ``.
183
186
module, keyword, operator, object, exception, statement, builtin
184
- These all create two index entries. For example, ``module: hashlib `` creates
185
- the entries ``module; hashlib `` and ``hashlib; module ``.
187
+ These all create two index entries. For example, ``module: hashlib ``
188
+ creates the entries ``module; hashlib `` and ``hashlib; module ``. (These
189
+ are Python-specific and therefore deprecated.)
186
190
187
191
For index directives containing only "single" entries, there is a shorthand
188
192
notation::
@@ -195,7 +199,7 @@ mainly contained in information units, such as the language reference.
195
199
Glossary
196
200
--------
197
201
198
- .. directive :: glossary
202
+ .. directive :: .. glossary::
199
203
200
204
This directive must contain a reST definition list with terms and
201
205
definitions. The definitions will then be referencable with the :role: `term `
0 commit comments