In this article, the topic of ReStructuredText will be addressed from different perspectives and approaches. ReStructuredText is a topic of great relevance today, which has captured the attention of experts, researchers and the general public. Throughout history, ReStructuredText has been the subject of numerous studies, debates and reflections, demonstrating the importance of understanding its impact and reach. In this sense, the main objective of this article is to analyze the different dimensions of ReStructuredText, offering a comprehensive overview that allows readers to understand its meaning, implications and possible repercussions in different areas of society. In addition, new research and discoveries will be presented that expand our understanding of ReStructuredText, offering an updated and enriching view on this very relevant topic.
Filename extension |
.rst |
---|---|
Internet media type | text/x-rst |
Developed by | David Goodger |
Initial release | June 1, 2001 |
Latest release | Revision 8407 October 29, 2019 |
Open format? | Public domain |
Website | docutils |
reStructuredText (RST, ReST, or reST) is a file format for textual data used primarily in the Python programming language community for technical documentation.
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.
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.
reStructuredText evolved from an earlier lightweight markup language called StructuredText (developed by Zope). There were a number of problems with StructuredText, and reST was developed to address them. The name reStructuredText was chosen to indicate that reST is a "revised, reworked, and reinterpreted StructuredText."
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.
reStructuredText was first released in June 2001. It began to see significant use in the Python community in 2002.
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.
There is no official MIME type registered for reStructuredText, but the unofficial one is text/x-rst
.
reStructuredText is commonly used for technical documentation, for example, in documentation of Python libraries. 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.
Trac also supports reStructuredText, as do GitHub and Bitbucket.
In 2011, Distributed Proofreaders, which prepared texts for Project Gutenberg, was considering adoption of reST as a basic format from which other ebook formats could be generated.[needs update]
In July 2016 the Linux kernel project decided to transition from DocBook based documentation to reStructuredText and the Sphinx toolchain.
The software build tool CMake switched from a custom markup language to reStructuredText in version 3.0 for its documentation.
Text using rST syntax | Corresponding HTML produced by an rST processor | Text viewed in a browser |
---|---|---|
================
Document Heading
================
Heading
=======
Sub-heading
-----------
Paragraphs are separated
by a blank line.
|
<h1>Document Heading</h1>
<h2>Heading</h2>
<h3>Sub-heading</h3>
<p>Paragraphs are separated
by a blank line.</p>
|
Paragraphs are separated by a blank line. |
Text attributes *emphasis*, **strong emphasis**, ``monospace``.
Horizontal rule:
----
|
<p>Text attributes <em>emphasis</em>,
<strong>strong emphasis</strong>, <code>monospace</code>.</p>
<p>Horizontal rule:</p>
<hr />
|
Text attributes emphasis,
strong emphasis, monospace .
Horizontal rule: |
Bullet list:
* apples
* oranges
* pears
Numbered list:
1. lather
2. rinse
3. repeat
Nested lists:
1. fruits
* apple
* banana
2. vegetables
* carrot
* broccoli
|
<p>Bullet list:</p>
<ul>
<li>apples</li>
<li>oranges</li>
<li>pears</li>
</ul>
<p>Numbered list:</p>
<ol>
<li>lather</li>
<li>rinse</li>
<li>repeat</li>
</ol>
<p>Nested lists:</p>
<ol>
<li>fruits
<ul>
<li>apple</li>
<li>banana</li>
</ul>
</li>
<li>vegetables
<ul>
<li>carrot</li>
<li>broccoli</li>
</ul>
</li>
</ol>
|
Bullet list:
Numbered list:
Nested lists:
|
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 :: 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 <a href="http://example.com">example</a>.</p>
<p><img alt="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 :: prior to a pre-formatted code block:</p>
<pre class="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>
|
An example.
If text is indented, it is treated as a block quotation, and the final attribution line is handled automatically:
reST uses :: prior to a pre-formatted code block: Y = lambda f: (lambda x: f(x(x)))(lambda x: f(x(x))) Multi-line text can |