It is part of the Docutils project of the Python Doc-SIG (Documentation Special Interest Group), aimed at creating a set of tools for Python similar to Javadoc for Java or Plain Old Documentation (POD) for Perl. Docutils can extract comments and information from Python programs, and format them into various forms of program documentation.[2]
In this sense, reStructuredText is a lightweight markup language designed to be both processable by documentation-processing software such as Docutils, and be easily readable by human programmers who are reading and writing Python source code.
History
reStructuredText evolved from an earlier lightweight markup language called StructuredText[3] (developed by Zope). There were a number of problems with StructuredText, and reST was developed to address them.[4]
The name reStructuredText was chosen to indicate that reST is a "revised, reworked, and reinterpreted StructuredText."[5]
Parts of the reST syntax were inspired by the Setext language from the early 1990s. Elements of the common RFC822 Internet Message Format and Javadoc formats were also considered for inclusion in the design.[6]
reStructuredText was first released in June 2001.[1] It began to see significant use in the Python community in 2002.[7]
Reference implementation
The reference implementation of the reST parser is a component of the Docutils text processing framework in the Python programming language, but other parsers are available.
The Docutils project has not registered any MIME type for reStructuredText nor designated any unregistered MIME type as official, but documents the MIME type text/x-rst as in de facto use by, for example, the build system for the Python website.[8] The same MIME type is used in the freedesktop.org file type database used by desktop environments on Linux.[9] Another MIME type, text/prs.fallenstein.rst, was registered as a vanity MIME type by a third party in 2003 to represent reStructuredText, and remains the only IANA-registered MIME type for reStructuredText,[10] although it is not acknowledged as such by the Docutils project.[8]
Applications
reStructuredText is commonly used for technical documentation, for example, in documentation of Python libraries.[11] However, it is suitable for a wide range of texts.
Since 2008, reST has been a core component of Python's Sphinx document generation system.
An `example <http://example.com>`_.
..image:: Icon-pictures.png
:alt: Image
If text is indented, it is treated as a block quotation:
Should array indices start at 0 or 1?
My suggested compromise of 0.5 was rejected without, I thought, proper consideration.
-- Stan Kelly-Bootle
reST uses :: at the end of the paragraph prior to a pre-formatted code block:: Y = lambda f: (lambda x: f(x(x)))(lambda x: f(x(x)))| Multi-line text can
| span in tables
| with a pipe character.
<p>An <ahref="http://example.com">example</a>.</p><p><imgalt="Image"src="Icon-pictures.png"/></p><p>If text is indented, it is treated as a block quotation, and the final attribution line is handled automatically:</p><blockquote>
Should array indices start at 0 or 1?
My suggested compromise of 0.5 was rejected without, I thought, proper consideration.
-- Stan Kelly-Bootle</blockquote><p>reST uses :: at the end of the paragraph prior to a pre-formatted code block:</p><preclass="literal-block">
Y = lambda f: (lambda x: f(x(x)))(lambda x: f(x(x)))
</pre><p>Multi-line text can<br/>span in tables<br/>with a pipe character.</p>
^Fallenstein, Benja (2003-10-02). "text/prs.fallenstein.rst". IANA. ReStructuredText was designed and implemented by David Goodger, not by the registrant of this media type. The registrant just happened to have need of a registered media type for it. […] Change control for this registration is currently with Benja Fallenstein. (If anybody more intimately involved with ReStructuredText wants to take it over, it will be surrendered gladly.)