summaryrefslogtreecommitdiff
path: root/doc/markup
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-04-17 10:39:51 +0200
committerGeorg Brandl <georg@python.org>2010-04-17 10:39:51 +0200
commit22ac79e1af541e66b002ba35f1cd902a91cceb88 (patch)
tree65279525ae9619d532d21ee67d6bc8c5b9727d38 /doc/markup
parentea85d7fb1fdad1fbac214c2653daf388738c3935 (diff)
downloadsphinx-22ac79e1af541e66b002ba35f1cd902a91cceb88.tar.gz
Use the new rst domain in the sphinx docs.
Diffstat (limited to 'doc/markup')
-rw-r--r--doc/markup/code.rst10
-rw-r--r--doc/markup/inline.rst58
-rw-r--r--doc/markup/misc.rst14
-rw-r--r--doc/markup/para.rst42
-rw-r--r--doc/markup/toctree.rst8
5 files changed, 66 insertions, 66 deletions
diff --git a/doc/markup/code.rst b/doc/markup/code.rst
index 96871115..eaaf17d0 100644
--- a/doc/markup/code.rst
+++ b/doc/markup/code.rst
@@ -43,14 +43,14 @@ installed) and handled in a smart way:
This language is used until the next ``highlight`` directive is encountered.
* For documents that have to show snippets in different languages, there's also
- a :dir:`code-block` directive that is given the highlighting language
+ a :rst:dir:`code-block` directive that is given the highlighting language
directly::
.. code-block:: ruby
Some Ruby code.
- The directive's alias name :dir:`sourcecode` works as well.
+ The directive's alias name :rst:dir:`sourcecode` works as well.
* The valid values for the highlighting language are:
@@ -70,7 +70,7 @@ Line numbers
If installed, Pygments can generate line numbers for code blocks. For
automatically-highlighted blocks (those started by ``::``), line numbers must be
-switched on in a :dir:`highlight` directive, with the ``linenothreshold``
+switched on in a :rst:dir:`highlight` directive, with the ``linenothreshold``
option::
.. highlight:: python
@@ -78,7 +78,7 @@ option::
This will produce line numbers for all code blocks longer than five lines.
-For :dir:`code-block` blocks, a ``linenos`` flag option can be given to switch
+For :rst:dir:`code-block` blocks, a ``linenos`` flag option can be given to switch
on line numbers for the individual block::
.. code-block:: ruby
@@ -90,7 +90,7 @@ on line numbers for the individual block::
Includes
^^^^^^^^
-.. directive:: .. literalinclude:: filename
+.. rst:directive:: .. literalinclude:: filename
Longer displays of verbatim text may be included by storing the example text in
an external file containing only plain text. The file may be included using the
diff --git a/doc/markup/inline.rst b/doc/markup/inline.rst
index 298c999c..558f813d 100644
--- a/doc/markup/inline.rst
+++ b/doc/markup/inline.rst
@@ -49,7 +49,7 @@ more versatile:
Cross-referencing arbitrary locations
-------------------------------------
-.. role:: ref
+.. rst:role:: ref
To support cross-referencing to arbitrary locations in any document, the
standard reST labels are used. For this to work label names must be unique
@@ -87,7 +87,7 @@ Cross-referencing arbitrary locations
to, but you must give the link an explicit title, using this syntax:
``:ref:`Link title <label-name>```.
- Using :role:`ref` is advised over standard reStructuredText links to sections
+ Using :rst:role:`ref` is advised over standard reStructuredText links to sections
(like ```Section title`_``) because it works across files, when section
headings are changed, and for all builders that support cross-references.
@@ -99,7 +99,7 @@ Cross-referencing documents
There is also a way to directly link to documents:
-.. role:: doc
+.. rst:role:: doc
Link to the specified document; the document name can be specified in
absolute or relative fashion. For example, if the reference
@@ -116,7 +116,7 @@ Referencing downloadable files
.. versionadded:: 0.6
-.. role:: download
+.. rst:role:: download
This role lets you link to files within your source tree that are not reST
documents that can be viewed, but files that can be downloaded.
@@ -144,7 +144,7 @@ Other semantic markup
The following roles don't do anything special except formatting the text
in a different style:
-.. role:: abbr
+.. rst:role:: abbr
An abbreviation. If the role content contains a parenthesized explanation,
it will be treated specially: it will be shown in a tool-tip in HTML, and
@@ -154,16 +154,16 @@ in a different style:
.. versionadded:: 0.6
-.. role:: command
+.. rst:role:: command
The name of an OS-level command, such as ``rm``.
-.. role:: dfn
+.. rst:role:: dfn
Mark the defining instance of a term in the text. (No index entries are
generated.)
-.. role:: file
+.. rst:role:: file
The name of a file or directory. Within the contents, you can use curly
braces to indicate a "variable" part, for example::
@@ -173,7 +173,7 @@ in a different style:
In the built documentation, the ``x`` will be displayed differently to
indicate that it is to be replaced by the Python minor version.
-.. role:: guilabel
+.. rst:role:: guilabel
Labels presented as part of an interactive user interface should be marked
using ``guilabel``. This includes labels from text-based interfaces such as
@@ -182,7 +182,7 @@ in a different style:
labels, window titles, field names, menu and menu selection names, and even
values in selection lists.
-.. role:: kbd
+.. rst:role:: kbd
Mark a sequence of keystrokes. What form the key sequence takes may depend
on platform- or application-specific conventions. When there are no relevant
@@ -192,7 +192,7 @@ in a different style:
reference to a specific application or platform, the same sequence should be
marked as ``:kbd:`Control-x Control-f```.
-.. role:: mailheader
+.. rst:role:: mailheader
The name of an RFC 822-style mail header. This markup does not imply that
the header is being used in an email message, but can be used to refer to any
@@ -202,16 +202,16 @@ in a different style:
being preferred where there is more than one common usage. For example:
``:mailheader:`Content-Type```.
-.. role:: makevar
+.. rst:role:: makevar
The name of a :command:`make` variable.
-.. role:: manpage
+.. rst:role:: manpage
A reference to a Unix manual page including the section,
e.g. ``:manpage:`ls(1)```.
-.. role:: menuselection
+.. rst:role:: menuselection
Menu selections should be marked using the ``menuselection`` role. This is
used to mark a complete sequence of menu selections, including selecting
@@ -227,26 +227,26 @@ in a different style:
ellipsis some operating systems use to indicate that the command opens a
dialog, the indicator should be omitted from the selection name.
-.. role:: mimetype
+.. rst:role:: mimetype
The name of a MIME type, or a component of a MIME type (the major or minor
portion, taken alone).
-.. role:: newsgroup
+.. rst:role:: newsgroup
The name of a Usenet newsgroup.
-.. role:: program
+.. rst:role:: program
The name of an executable program. This may differ from the file name for
the executable for some platforms. In particular, the ``.exe`` (or other)
extension should be omitted for Windows programs.
-.. role:: regexp
+.. rst:role:: regexp
A regular expression. Quotes should not be included.
-.. role:: samp
+.. rst:role:: samp
A piece of literal text, such as code. Within the contents, you can use
curly braces to indicate a "variable" part, as in ``:file:``.
@@ -257,13 +257,13 @@ in a different style:
The following roles generate external links:
-.. role:: pep
+.. rst:role:: pep
A reference to a Python Enhancement Proposal. This generates appropriate
index entries. The text "PEP *number*\ " is generated; in the HTML output,
this text is a hyperlink to an online copy of the specified PEP.
-.. role:: rfc
+.. rst:role:: rfc
A reference to an Internet Request for Comments. This generates appropriate
index entries. The text "RFC *number*\ " is generated; in the HTML output,
@@ -280,31 +280,31 @@ Cross-referencing other items of interest
The following roles do possibly create a cross-reference, but do not refer to
objects:
-.. role:: envvar
+.. rst:role:: envvar
An environment variable. Index entries are generated. Also generates a link
- to the matching :dir:`envvar` directive, if it exists.
+ to the matching :rst:dir:`envvar` directive, if it exists.
-.. role:: token
+.. rst:role:: token
The name of a grammar token (used to create links between
- :dir:`productionlist` directives).
+ :rst:dir:`productionlist` directives).
-.. role:: keyword
+.. rst:role:: keyword
The name of a keyword in Python. This creates a link to a reference label
with that name, if it exists.
-.. role:: option
+.. rst:role:: option
A command-line option to an executable program. The leading hyphen(s) must
- be included. This generates a link to a :dir:`option` directive, if it
+ be included. This generates a link to a :rst:dir:`option` directive, if it
exists.
The following role creates a cross-reference to the term in the glossary:
-.. role:: term
+.. rst:role:: term
Reference to a term in the glossary. The glossary is created using the
``glossary`` directive containing a definition list with terms and
diff --git a/doc/markup/misc.rst b/doc/markup/misc.rst
index ba045165..6173589b 100644
--- a/doc/markup/misc.rst
+++ b/doc/markup/misc.rst
@@ -39,7 +39,7 @@ At the moment, these metadata fields are recognized:
Meta-information markup
-----------------------
-.. directive:: .. sectionauthor:: name <email>
+.. rst:directive:: .. sectionauthor:: name <email>
Identifies the author of the current section. The argument should include
the author's name such that it can be used for presentation and email
@@ -54,10 +54,10 @@ Meta-information markup
output.
-.. directive:: .. codeauthor:: name <email>
+.. rst:directive:: .. codeauthor:: name <email>
- The :dir:`codeauthor` directive, which can appear multiple times, names the
- authors of the described code, just like :dir:`sectionauthor` names the
+ The :rst:dir:`codeauthor` directive, which can appear multiple times, names the
+ authors of the described code, just like :rst:dir:`sectionauthor` names the
author(s) of a piece of documentation. It too only produces output if the
:confval:`show_authors` configuration value is True.
@@ -67,7 +67,7 @@ Meta-information markup
Including content based on tags
-------------------------------
-.. directive:: .. only:: <expression>
+.. rst:directive:: .. only:: <expression>
Include the content of the directive only if the *expression* is true. The
expression should consist of tags, like this::
@@ -92,7 +92,7 @@ HTML output, however there are some gotchas when using tables in LaTeX: the
column width is hard to determine correctly automatically. For this reason, the
following directive exists:
-.. directive:: .. tabularcolumns:: column spec
+.. rst:directive:: .. tabularcolumns:: column spec
This directive gives a "column spec" for the next table occurring in the
source file. The spec is the second argument to the LaTeX ``tabulary``
@@ -128,5 +128,5 @@ following directive exists:
therefore set with the standard LaTeX ``tabular`` environment. Also, the
verbatim environment used for literal blocks only works in ``p{width}``
columns, which means that by default, Sphinx generates such column specs for
- such tables. Use the :dir:`tabularcolumns` directive to get finer control
+ such tables. Use the :rst:dir:`tabularcolumns` directive to get finer control
over such tables.
diff --git a/doc/markup/para.rst b/doc/markup/para.rst
index 9abae1dc..2fdc8d5a 100644
--- a/doc/markup/para.rst
+++ b/doc/markup/para.rst
@@ -9,7 +9,7 @@ Paragraph-level markup
These directives create short paragraphs and can be used inside information
units as well as normal text:
-.. directive:: .. note::
+.. rst:directive:: .. note::
An especially important bit of information about an API that a user should be
aware of when using whatever bit of API the note pertains to. The content of
@@ -22,15 +22,15 @@ units as well as normal text:
This function is not suitable for sending spam e-mails.
-.. directive:: .. warning::
+.. rst:directive:: .. warning::
An important bit of information about an API that a user should be very aware
of when using whatever bit of API the warning pertains to. The content of
the directive should be written in complete sentences and include all
- appropriate punctuation. This differs from :dir:`note` in that it is
- recommended over :dir:`note` for information regarding security.
+ appropriate punctuation. This differs from :rst:dir:`note` in that it is
+ recommended over :rst:dir:`note` for information regarding security.
-.. directive:: .. versionadded:: version
+.. rst:directive:: .. versionadded:: version
This directive documents the version of the project which added the described
feature to the library or C API. When this applies to an entire module, it
@@ -47,24 +47,24 @@ units as well as normal text:
Note that there must be no blank line between the directive head and the
explanation; this is to make these blocks visually continuous in the markup.
-.. directive:: .. versionchanged:: version
+.. rst:directive:: .. versionchanged:: version
- Similar to :dir:`versionadded`, but describes when and what changed in the named
+ Similar to :rst:dir:`versionadded`, but describes when and what changed in the named
feature in some way (new parameters, changed side effects, etc.).
--------------
-.. directive:: seealso
+.. rst:directive:: seealso
Many sections include a list of references to module documentation or
- external documents. These lists are created using the :dir:`seealso`
+ external documents. These lists are created using the :rst:dir:`seealso`
directive.
- The :dir:`seealso` directive is typically placed in a section just before any
+ The :rst:dir:`seealso` directive is typically placed in a section just before any
sub-sections. For the HTML output, it is shown boxed off from the main flow
of the text.
- The content of the :dir:`seealso` directive should be a reST definition list.
+ The content of the :rst:dir:`seealso` directive should be a reST definition list.
Example::
.. seealso::
@@ -82,7 +82,7 @@ units as well as normal text:
.. versionadded:: 0.5
The short form.
-.. directive:: .. rubric:: title
+.. rst:directive:: .. rubric:: title
This directive creates a paragraph heading that is not used to create a
table of contents node.
@@ -95,7 +95,7 @@ units as well as normal text:
empty heading.
-.. directive:: centered
+.. rst:directive:: centered
This directive creates a centered boldfaced line of text. Use it as
follows::
@@ -103,7 +103,7 @@ units as well as normal text:
.. centered:: LICENSE AGREEMENT
-.. directive:: hlist
+.. rst:directive:: hlist
This directive must contain a bullet list. It will transform it into a more
compact list by either distributing more than one item horizontally, or
@@ -127,7 +127,7 @@ units as well as normal text:
Table-of-contents markup
------------------------
-The :dir:`toctree` directive, which generates tables of contents of
+The :rst:dir:`toctree` directive, which generates tables of contents of
subdocuments, is described in :ref:`toctree-directive`.
For local tables of contents, use the standard reST :rstdir:`contents directive
@@ -144,7 +144,7 @@ However, there is also an explicit directive available, to make the index more
comprehensive and enable index entries in documents where information is not
mainly contained in information units, such as the language reference.
-.. directive:: .. index:: <entries>
+.. rst:directive:: .. index:: <entries>
This directive contains one or more index entries. Each entry consists of a
type and a value, separated by a colon.
@@ -199,10 +199,10 @@ mainly contained in information units, such as the language reference.
Glossary
--------
-.. directive:: .. glossary::
+.. rst:directive:: .. glossary::
This directive must contain a reST definition list with terms and
- definitions. The definitions will then be referencable with the :role:`term`
+ definitions. The definitions will then be referencable with the :rst:role:`term`
role. Example::
.. glossary::
@@ -231,7 +231,7 @@ derived forms), but provides enough to allow context-free grammars to be
displayed in a way that causes uses of a symbol to be rendered as hyperlinks to
the definition of the symbol. There is this directive:
-.. directive:: .. productionlist:: [name]
+.. rst:directive:: .. productionlist:: [name]
This directive is used to enclose a group of productions. Each production is
given on a single line and consists of a name, separated by a colon from the
@@ -239,7 +239,7 @@ the definition of the symbol. There is this directive:
continuation line must begin with a colon placed at the same column as in the
first line.
- The argument to :dir:`productionlist` serves to distinguish different sets of
+ The argument to :rst:dir:`productionlist` serves to distinguish different sets of
production lists that belong to different grammars.
Blank lines are not allowed within ``productionlist`` directive arguments.
@@ -247,7 +247,7 @@ the definition of the symbol. There is this directive:
The definition can contain token names which are marked as interpreted text
(e.g. ``sum ::= `integer` "+" `integer```) -- this generates cross-references
to the productions of these tokens. Outside of the production list, you can
- reference to token productions using :role:`token`.
+ reference to token productions using :rst:role:`token`.
Note that no further reST parsing is done in the production, so that you
don't have to escape ``*`` or ``|`` characters.
diff --git a/doc/markup/toctree.rst b/doc/markup/toctree.rst
index af2fc223..9b987a2e 100644
--- a/doc/markup/toctree.rst
+++ b/doc/markup/toctree.rst
@@ -11,7 +11,7 @@ documents into multiple output files, Sphinx uses a custom directive to add
relations between the single files the documentation is made of, as well as
tables of contents. The ``toctree`` directive is the central element.
-.. directive:: toctree
+.. rst:directive:: toctree
This directive inserts a "TOC tree" at the current location, using the
individual TOCs (including "sub-TOC trees") of the documents given in the
@@ -40,7 +40,7 @@ tables of contents. The ``toctree`` directive is the central element.
document, the library index. From this information it generates "next
chapter", "previous chapter" and "parent chapter" links.
- Document titles in the :dir:`toctree` will be automatically read from the
+ Document titles in the :rst:dir:`toctree` will be automatically read from the
title of the referenced document. If that isn't what you want, you can
specify an explicit title and target using a similar syntax to reST
hyperlinks (and Sphinx's :ref:`cross-referencing syntax <xref-syntax>`). This
@@ -147,10 +147,10 @@ The special document names (and pages generated for them) are:
page, respectively.
The general index is populated with entries from modules, all index-generating
- :ref:`object descriptions <basic-domain-markup>`, and from :dir:`index`
+ :ref:`object descriptions <basic-domain-markup>`, and from :rst:dir:`index`
directives.
- The module index contains one entry per :dir:`module` directive.
+ The module index contains one entry per :rst:dir:`module` directive.
The search page contains a form that uses the generated JSON search index and
JavaScript to full-text search the generated documents for search words; it