ReStructuredText
ReStructuredText is a plain TXT format that is often used by Python programmers for their documentation.
Contents |
[edit] Overview
reStructuredText is an easy-to-read, what-you-see-is-what-you-get plaintext markup syntax and parser system. It is useful for in-line program documentation (such as Python docstrings), for quickly creating simple web pages, and for standalone documents. reStructuredText is designed for extensibility for specific application domains. The reStructuredText parser is a component of Docutils. reStructuredText is a revision and reinterpretation of the StructuredText and Setext lightweight markup systems. It can be read by Pandoc which can convert it into ePub and other formats.
[edit] Inline formats
Plain text | Typical result | Notes |
---|---|---|
*emphasis* | emphasis | Normally rendered as italics. |
**strong emphasis** | strong emphasis | Normally rendered as boldface. |
`interpreted text` | (see note at right) | The rendering and meaning of interpreted text is domain- or application-dependent. It can be used for things like index entries or explicit descriptive markup (like program identifiers). |
``inline literal`` | inline literal | Normally rendered as monospaced text. Spaces should be preserved, but line breaks will not be. |
`phrase reference`_ | phrase reference | A hyperlink reference with spaces or punctuation needs to be quoted with backquotes. See Hyperlink Targets. |
anonymous__ | anonymous | With two underscores instead of one, both simple and phrase references may be anonymous (the reference text is not repeated at the target). See Hyperlink Targets. |
_`inline internal target` | inline internal target | A crossreference target within text. See Hyperlink Targets. |
|substitution reference| | (see note at right) | The result is substituted in from the substitution definition. It could be text, an image, a hyperlink, or a combination of these and others. |
footnote reference [1]_ | footnote reference 1 | See Footnotes. |
citation reference [CIT2002]_ | citation reference [CIT2002] | See Citations. |
http://docutils.sf.net/ | http://docutils.sf.net/ | A standalone hyperlink. |
[edit] Structure
Plain text | Typical result |
---|---|
===== Title ===== Subtitle -------- Titles are underlined (or over- and underlined) with a printing non-alphanumeric 7-bit ASCII character. Recommended choices are "``= - ` : ' " ~ ^ _ * + # < >``". The underline/overline must be at least as long as the title text. A lone top-level (sub)section is lifted up to be the document's (sub)title. |
Title
Titles are underlined (or over- and underlined) with a printing non-alphanumeric 7-bit ASCII character. Recommended choices are "= - ` : ' " ~ ^ _ * + # < >". The underline/overline must be at least as long as the title text.
|