Skip to content

Commit 3e91825

Browse files
committed
Review markup chapter.
1 parent 0f812e7 commit 3e91825

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

doc/markup/misc.rst

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ File-wide metadata
1111
reST has the concept of "field lists"; these are a sequence of fields marked up
1212
like this::
1313

14-
:Field name: Field content
14+
:fieldname: Field content
1515

16-
A field list at the very top of a file is parsed as the "docinfo", which in
17-
normal documents can be used to record the author, date of publication and
18-
other metadata. In Sphinx, the docinfo is used as metadata, too, but not
19-
displayed in the output.
16+
A field list at the very top of a file is parsed by docutils as the "docinfo",
17+
which is normally used to record the author, date of publication and other
18+
metadata. *In Sphinx*, the docinfo is used as metadata, too, but not displayed
19+
in the output.
2020

2121
At the moment, these metadata fields are recognized:
2222

doc/markup/para.rst

+31-27
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Paragraph-level markup
99
These directives create short paragraphs and can be used inside information
1010
units as well as normal text:
1111

12-
.. directive:: note
12+
.. directive:: .. note::
1313

1414
An especially important bit of information about an API that a user should be
1515
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:
2222

2323
This function is not suitable for sending spam e-mails.
2424

25-
.. directive:: warning
25+
.. directive:: .. warning::
2626

2727
An important bit of information about an API that a user should be very aware
2828
of when using whatever bit of API the warning pertains to. The content of
2929
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.
3232

3333
.. directive:: .. versionadded:: version
3434

@@ -49,34 +49,35 @@ units as well as normal text:
4949

5050
.. directive:: .. versionchanged:: version
5151

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
5353
feature in some way (new parameters, changed side effects, etc.).
5454

5555
--------------
5656

5757
.. directive:: seealso
5858

5959
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.
6162

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
6364
sub-sections. For the HTML output, it is shown boxed off from the main flow
6465
of the text.
6566

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.
6768
Example::
6869

6970
.. seealso::
7071

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.
7374

7475
`GNU tar manual, Basic Tar Format <http://link>`_
7576
Documentation for tar archive files, including GNU tar extensions.
7677

7778
There's also a "short form" allowed that looks like this::
7879

79-
.. seealso:: modules :mod:`zipfile`, :mod:`tarfile`
80+
.. seealso:: modules :py:mod:`zipfile`, :py:mod:`tarfile`
8081

8182
.. versionadded:: 0.5
8283
The short form.
@@ -96,7 +97,8 @@ units as well as normal text:
9697

9798
.. directive:: centered
9899

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::
100102

101103
.. centered:: LICENSE AGREEMENT
102104

@@ -126,16 +128,17 @@ Table-of-contents markup
126128
------------------------
127129

128130
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`.
130132

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>`.
132135

133136

134137
Index-generating markup
135138
-----------------------
136139

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`.
139142

140143
However, there is also an explicit directive available, to make the index more
141144
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.
159162

160163
...
161164

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).
165168

166169
Since index directives generate cross-reference targets at their location in
167170
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.
171174

172175
single
173176
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).
176179
pair
177180
``pair: loop; statement`` is a shortcut that creates two index entries,
178181
namely ``loop; statement`` and ``statement; loop``.
179182
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``.
183186
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.)
186190

187191
For index directives containing only "single" entries, there is a shorthand
188192
notation::
@@ -195,7 +199,7 @@ mainly contained in information units, such as the language reference.
195199
Glossary
196200
--------
197201

198-
.. directive:: glossary
202+
.. directive:: .. glossary::
199203

200204
This directive must contain a reST definition list with terms and
201205
definitions. The definitions will then be referencable with the :role:`term`

0 commit comments

Comments
 (0)