Create a parser:: parser = () Several optional arguments may be passed to modify the parser’s behavior. Please see. 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. RST is a file format formely created by Python community to write documentation (and so, is part of Docutils). RST files are simple text files with lightweight syntax.

Author: Mazugore Zolojind
Country: Mongolia
Language: English (Spanish)
Genre: Literature
Published (Last): 17 May 2004
Pages: 87
PDF File Size: 19.55 Mb
ePub File Size: 20.82 Mb
ISBN: 264-3-41169-262-3
Downloads: 15357
Price: Free* [*Free Regsitration Required]
Uploader: Arashigul

In the following example, target “one” indirectly references whatever target “two” references, and target “two” references target “three”, an internal hyperlink target. It has markup, and you can use it to the extreme. This is also true, if the class directive is “nested” at the docutild of an indented text block, for example:. Literal block Fully minimized form: Discovering those gems is left as an exercise for the reader.

One, required topic title.

The underscore can be thought of as a right-pointing arrow. Pages with login required references or sources All articles with unsourced statements Articles with unsourced statements from June Wikipedia articles in need of updating from May All Wikipedia articles in need of updating. If both are present, the literal block syntax takes priority over Doctest block syntax: However, a document must be consistent in its use of section titles: The first line after the field name marker determines the indentation of the field body.


System messages are inserted where target links have been removed. Option listsfor listing command-line options:.


The ‘rm’ command is very dangerous. However, in well-defined contexts such as when a field list invariably occurs at the beginning of a document PEPs and email messagesstandard RFC headers could be used. For example, a Zope author might write: Several solutions are possible.

This means that after declaring a role like this:. For example, the following “note” admonition directive contains one paragraph and a bullet list consisting of two list items: The CSS1 spec defines identifiers based on the “name” token “flex” tokenizer notation below; “latin1” and “escape” 8-bit characters have been replaced with XML entities:. This requires many options and tweaking, but you are not limited to snippets and can generate LaTeX documents too.

reStructuredText Markup Specification

Below are examples of section title styles: Each line of text starts a new row, except when there is a blank cell in the first column.

Field bodies may be checked for RCS keywords and cleaned up. A role name is a single word consisting of alphanumerics plus isolated internal hyphens, underscores, plus signs, colons, and periods; no whitespace or other characters are allowed. The parser must return a set of unique hyperlink targets. Rather than imposing a fixed number and order of section title adornment styles, the order enforced will be the order as encountered. This is the second line of the first paragraph. Docutils identifiers are converted to conform to the regular expression [a-z] -?


Specifying the name option of a directive, e. See Implicit Hyperlink Targets for a complete description.

The initial default interpreted text role of the standard reStructuredText parser is “title-reference”. Parsing the above results in the following pseudo-XML: For example, all the element names in this content model are links: An external hyperlink’s URI may begin on the same line as the explicit markup start and target name, or it may begin in an indented text block immediately following, with no intervening blank lines.

A rubric is like an informal heading that doesn’t correspond to the document’s structure. Source Edit proc escChar target: Read the Docs v: Sidebars can also be likened to super-footnotes; their content is outside dodutils the flow of the document’s main text. Individual directives can employ any combination of these parts. Rationale for “classes” Attribute Value Conversion Docutils identifiers are converted to conform docuitls the regular expression ddocutils -?

The image directive may be used both in substitution definitions and in the standalone context.