:tocdepth: 2 .. highlight:: rst .. metadata-placeholder :DC.title: What is reStructuredText? :DC.creator: Fernanda Nery :DC.date: 2013-05-01 :DC.description: Brief introduction to reStructuredText (reST) concepts and syntax. This is a modified version of Sphinx's reStructuredText Primer (http://sphinx-doc.org/). :DC.language: eng :DC.format: text/x-rst :DC.license: https://creativecommons.org/licenses/by/4.0/ :DC.rights: Public. :DC.rightsHolder: Copyright (c) 2007-2011 by Georg Brandl Copyright (c) 2007-2013 by the Sphinx team .. _rst-primer-ref: Using reStructuredText ************************* .. note:: This document is an abridged and modified version of `Sphinx's reStructuredText Primer`_. What is reStructuredText ======================== reStructuredText_ (reST) is a simple, easy-to-read markup language used by Sphinx_. A reStructuredText document is a text file with some markup to specify the format or the semantics of the text. Most of the markup used by Sphinx is standard reST markup Exceptions (i.e. markup specific to Sphinx) are signalled in the text. There are two types of markup: * **inline markup**: for example, ``*the surrounding asterisks would mark this text as italics*``, like *this*. * **explicit markup**: is used for blocks of text that need special handling, such as footnotes, tables, or generic directives. Explicit markup always starts with ``..`` followed by whitespace. .. _rst-paragraphs-ref: Paragraphs ========== Paragraphs are simply chunks of text separated by one or more blank lines. All lines of the same paragraph must be left-aligned to the same level of indentation. **Quoted paragraphs** are created by just indenting them more than the surrounding paragraphs:: Normal paragraph. Indented paragraph. .. tip:: Each indentation level is created with 4 whitespaces. Do not use tabs. Line blocks are a way of preserving **line breaks**:: | the sweet & aged people | who rule this world(and me and | you if we’re not very | careful) Here is the result of the above markup: | the sweet & aged people | who rule this world(and me and | you if we’re not very | careful) .. _rst-sections-ref: Sections ========= Section are created by underlining the title with a punctuation character:: This is a heading ================= The underlining must be at least as long as the text itself. Sections must be properly nested. .. admonition:: This is a style convention. Use the following punctuation characters in the section titles: * ``#`` for Chapters * ``*`` for Heading 1 * ``=`` for Heading 2 * ``-`` for Heading 3 When converting to HTML format, sections are converted to an appropriate heading tag (for example: ``