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: Dazuru Akinolkree
Country: Dominican Republic
Language: English (Spanish)
Genre: Medical
Published (Last): 1 February 2017
Pages: 370
PDF File Size: 3.22 Mb
ePub File Size: 8.82 Mb
ISBN: 877-9-95043-889-5
Downloads: 70889
Price: Free* [*Free Regsitration Required]
Uploader: Gutaur

reStructuredText – Wikipedia

Inline literals may contain any characters except two adjacent backquotes in an end-string context according to the recognition rules above. In field listscare must be taken when using interpreted text with explicit roles in field names: Block markup and inline markup within cells is supported.

While it is possible to use the “header” and “footer” directives to create navigational elements for web pages, you should be aware that Docutils is meant to be used for document processing, and that a navigation bar is rdt typically part of a document.

When resolving reference names internally: Blank Lines Blank lines are used to separate paragraphs and other elements. They are interpreted by the directive parser which runs the directive class: The “contents” directive generates a table of contents TOC in a topic. This document was generated on date at time.


reStructuredText Markup Specification

By using this site, you agree to the Terms of Use and Privacy Policy. The “csv-table” directive’s “: For example, this directive can be used to expand abbreviations: Inline markup cannot be nested. No start-string or end-string.

Note that any separating punctuation in the example, a period, “. This text is parsed as an enumerated list item: Body elements and topics may not contain nested topics. Not to be confused with Representational state transfer.

The number of anonymous hyperlink references in a document must match the number of anonymous targets. Users who have questions or need assistance with Docutils or reStructuredText should post docutlls message to the Docutils-users mailing list.

For example, after setting the default role like this:. These options except “align” are passed on to the contained image.

In general you should only pass an empty id value for the title of standalone rst documents they are special for the mergeIndexes proc, see Index idx file format for more information. For example, the following indirect hyperlink targets are equivalent: Auto-enumerated lists are new in Docutils 0.


Tables Dcutils tables need more structure than the reStructuredText syntax supplies. Gather input a multi-line stringby reading a file or the standard input:: The RCS keyword processing only kicks in when the field list is in bibliographic context first non-comment construct in the document, after a document title if there is one. Take it away, Eric the Orchestra Leader!

— docutils documentation

This paragraph belongs to a second-level block quote. The text within inline markup may not begin or end with whitespace. This can be an empty list if there is nothing to insert. The following example should be illustrative:. While parsing an enumerated list, a new list will be started whenever: Blank lines within multi-line docutlls may separate paragraphs or other body elements within cells.

The input format is LaTeX math syntax [1] with support for Unicode symbols, for example: One, required image URI. Inline equivalents of the “raw” directive can be defined via custom interpreted text roles derived from the “raw” role.