StructuredText is also a plaintext markup syntax. It was first invented by Jim Fulton (now at Zope Corporation) in 1996. Zope Corporation was at that time called Digital Creations which is original copyright holder. The StructuredText syntax suffered from not being formally defined. Out of the experiences from using StructuredText in Zope David Godger started a project with the goal to have a properly specified markup syntax. This project led to a totally new implementation, which is now called ReStructuredText.
Description of StructuredText markup
Note that this markup is not supported by MoinMoin, which supports the better ReStructuredText instead.
Structured text is text that uses indentation and simple symbology to indicate the structure of a document.
A structured string consists of a sequence of paragraphs separated by one or more blank lines. Each paragraph has a level which is defined as the minimum indentation of the paragraph. A paragraph is a sub-paragraph of another paragraph if the other paragraph is the last preceedeing paragraph that has a lower level.
Special symbology is used to indicate special constructs:
- A paragraph of text followed by a single line containing only '-' like this one:
--------------------------------------------------------------
is interpreted as a section or subsection headline - A paragraph that begins with a '-', '*', or 'o' is treated as an unordered list (bullet) element.
- A paragraph that begins with a sequence of digits followed by a white-space character is treated as an ordered list element.
- A paragraph that begins with a sequence of sequences, where each sequence is a sequence of digits or a sequence of letters followed by a period, is treated as an ordered list element.
- A paragraph with a first line that contains some text, followed by some white-space and '--' is treated as a descriptive list element. The leading text is treated as the element title.
- Sub-paragraphs of a paragraph that ends in the word 'example' or the word 'examples' is treated as example code and is output as is.
- Text enclosed single quotes (with white-space to the left of the first quote and whitespace or puctuation to the right of the second quote) is treated as example code.
- Text surrounded by '*' characters (with white-space to the left of the first '*' and whitespace or puctuation to the right of the second '*') is emphasized.