reStructuredText evolved from an earlier lightweight markup language called StructuredText2 (developed by Zope). There were a number of problems with StructuredText, and reST was developed to address them.3 The name reStructuredText was chosen to indicate that reST is a "revised, reworked, and reinterpreted StructuredText."4
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.5
reStructuredText was first released in June 2001.6 It began to see significant use in the Python community in 2002.7
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.11
reStructuredText is commonly used for technical documentation, for example, in documentation of Python libraries.12 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,13 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.14[needs update]
In July 2016 the Linux kernel project decided to transition from DocBook based documentation to reStructuredText and the Sphinx toolchain.1516[circular reference]
The software build tool CMake switched from a custom markup language to reStructuredText in version 3.0 for its documentation.17
Paragraphs are separatedby a blank line.
Horizontal rule:
Numbered list:
Nested lists:
If text is indented, it is treated as a block quotation, and the final attribution line is handled automatically:
Should array indices start at 0 or 1?My suggested compromise of 0.5 was rejected without, I thought, proper consideration.-- Stan Kelly-Bootle
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:
Multi-line text canspan in tableswith a pipe character.
Mertz, David (2003-02-01). "XML Matters: reStructuredText". IBM developerWorks. Retrieved 2016-10-05. https://www.ibm.com/developerworks/library/x-matters24/ ↩
"zope.structuredtext Documentation". Read the Docs. Retrieved 2022-08-16. https://zopestructuredtext.readthedocs.io/en/latest/ ↩
Goodger, David (2016-05-24). "Problems With StructuredText". Docutils Project. Retrieved 2022-08-16. https://docutils.sourceforge.io/docs/dev/rst/problems.html ↩
Goodger, David (2016-02-26). "Docutils FAQ (Frequently Asked Questions)". Docutils Project. Retrieved 2016-10-05. http://docutils.sourceforge.net/FAQ.html#why-is-it-called-restructuredtext ↩
Goodger, David (2022-04-02). "A Record of reStructuredText Syntax Alternatives". docutils.sourceforge.io. Docutils Project. Retrieved 2022-08-16. https://docutils.sourceforge.io/docs/dev/rst/alternatives.html ↩
"Project: reStructuredText - File List". SourceForge. Archived from the original on 19 October 2001. Retrieved 5 February 2023. https://sourceforge.net/projects/structuredtext/files/restructuredtext/ ↩
"Introduction to reStructuredText". Write The Docs. Retrieved 2022-06-25. https://www.writethedocs.org/guide/writing/reStructuredText/ ↩
"What's the official MIME type for reStructuredText data? in Docutils FAQ". Docutils Project. Retrieved 2017-12-20. http://docutils.sourceforge.net/FAQ.html#what-s-the-official-mime-type-for-restructuredtext-data ↩
"freedesktop.org.xml.in". shared-mime-info. freedesktop.org. https://gitlab.freedesktop.org/xdg/shared-mime-info/-/blob/815b520eb01992a05d41a5434f1227a8be101e15/data/freedesktop.org.xml.in#L6708 ↩
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.) https://www.iana.org/assignments/media-types/text/prs.fallenstein.rst ↩
Goodger, David (2002-04-02). "PEP 287 -- reStructuredText Docstring Format". Python Software Foundation. Retrieved 2016-10-05. https://www.python.org/dev/peps/pep-0287/ ↩
"reStructuredText Support in Trac". Trac. 2016-09-13. Retrieved 2016-10-05. https://trac.edgewall.org/wiki/WikiRestructuredText ↩
Newby, Greg (2011-01-08). "Minutes of 2010 December 11 meeting". Distributed Proofreaders. Retrieved 2011-01-08. http://www.pgdp.net/phpBB2/viewtopic.php?t=44456 ↩
"Kernel documentation with Sphinx, part 1: how we got here". LWN.net. 2016-07-06. Retrieved 2016-10-27. http://lwn.net/Articles/692704/ ↩
"Sphinx. Linux kernel". Wikipedia. 2024-04-02. Retrieved 2024-04-02. https://en.wikipedia.org/wiki/Sphinx_(documentation_generator)#Linux_kernel ↩
"CMake 3.0.0 Release Notes". Kitware, Inc. 2014-06-10. Retrieved 2016-10-05. https://cmake.org/cmake/help/v3.0/release/3.0.0.html ↩