Jump to content

reStructuredText

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Kentborg (talk | contribs) at 16:12, 22 March 2009 (Qualified that ctrl-numbers to enter odd characters are MS only, are number keypad only. -kb, the Kent who uses Linux). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

reStructuredText is a lightweight markup language intended to be highly readable in source format. Its formal name indicates that it is a "revised, reworked, and reinterpreted StructuredText."[1]

reStructuredText is sometimes abbreviated as RST; while sometimes abbreviated as ReST, this can create confusion with REST, an unrelated technology.

The reference parser is implemented as a component of the Docutils text processing framework in the Python programming language, but other parsers are available. It was a re-implementation and extension of the StructuredText and Setext lightweight markup systems,[2] and was meant in particular to address the Problems with StructuredText.

reStructuredText is commonly used for technical documentation, for example, in documentation of Python libraries. However, reStructuredText is suitable for a wide range of texts.

Examples of markup

Headers:

Section Header
==============

Subsection Header
-----------------

Lists:

- A bullet list item

- Second item

  - A sub item

- Third item


1) An enumerated list item

2) Second item

   a) Sub item

      i) Sub-sub item

3) Third item


# Another enumerated list item

# Second item   


Named links:

A sentence with links to Wikipedia_ and the `Linux kernel archive`_.

.. _Wikipedia: http://www.wikipedia.org/
.. _Linux kernel archive: http://www.kernel.org/

Anonymous links:

Another sentence with an `anonymous link to the Python website`__.

__ http://www.python.org/


Please note that Named links and Anonymous links enclose text in grave accents (`), and not in apostrophes ('). If your keyboard doesn't have the grave accent key, on Microsoft Windows you can type it on the number keypad with the combination Ctrl+96.

See also

References

  1. ^ Goodger, David (2008-01-05). "Docutils FAQ (Frequently Asked Questions)". Docutils Project. Retrieved 2008-06-25. {{cite web}}: Check date values in: |date= (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)
  2. ^ Goodger, David (2006-09-22). "reStructuredText: Markup Syntax and Parser Component of Docutils". Docutils Project. Retrieved 2008-06-11. {{cite web}}: Check date values in: |date= (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)