Blank lines and indentation

The separation and nesting of text body elements is done in reStructuredText using the following design elements:

Blank lines

Paragraph and line breaks

Indentation

Samples

Text block (paragraph)

If a paragraph or an other construct consists of more than one line of text, the lines must be left aligned.

This is a paragraph. The lines of
this paragraph are aligned at the left.

    This paragraph has problems. The
lines are not left-aligned.

Blank lines and indentation 1:

See also: Text block (paragraph)

Indented text block (block quote)

The indentation is the only marker for block quotes (indented text block).

This is a top-level paragraph.

    This paragraph belongs to a first-level block quote.

    This is the second paragraph of the first-level block quote.

        This paragraph belongs to a second-level block quote.

Another top-level paragraph.

        This paragraph belongs to a second-level block quote.

    This paragraph belongs to a first-level block quote. The
    second-level block quote above is inside this first-level
    block quote.

Blank lines and indentation 2:

See also: Indented text block (block quote)

Line-oriented text block (line block)

A line break can be implemented with a line block. Individual lines can be indented by indenting.

| Each new line begins with 
| a vertical bar ("|"). 
|     Line breaks and initial indents 
|     are preserved. 
| Continuation lines are wrapped 
  portions of long lines; they begin 
  with spaces in place of vertical bars.

Blank lines and indentation 3:

See also: Line-oriented text block (line block)

Simple and complex markup

Several constructs start with a markup. The body of the construct must then be indented relative to the markup.

For constructs with simple markup (unordered and ordered lists, footnotes, citations, hyperlink targets, directives and comments), the degree of indentation of the body is determined by the position of the first line of text starting on the same line as the markup.

- This is the first line of a bullet list
  item's paragraph. All lines must align
  relative to the first line. [1]_

    This indented paragraph is interpreted
    as a block quote.

Because it is not sufficiently indented,
this paragraph does not belong to the list
item.

.. [1] Here's a footnote. The second line is aligned
   with the beginning of the footnote label. The ".."
   marker is what determines the indentation.

Blank lines and indentation 4:

For constructs with more complex markup, the indentation of the first line after the markup usually determines the left edge of the text body. If the markup is very long, it may be useful to start with the text body in the next line. The line after the markup must be indented by at least one space (minimum indentation).

:Field: This field has a short field name, so aligning the field
        body with the first line is feasible.

:This field has a long field name: It would
    be very difficult to align the field body with the left edge
    of the first line.

:This field also has a long field name:
    It would be very difficult to align the field body with the left edge
    of the first line. It may even be preferable not to begin the
    body on the same line as the marker.

Blank lines and indentation 5:

See also: