Leerzeilen und Einrückung

Die Trennung und Verschachtelung von Textkörperelementen erfolgt in reStructuredText über folgende Gestaltungselemente:

Leerzeilen

Absatz- und Zeilenwechsel

Einrückung

Beispiele

Textblock (Absatz)

Wenn ein Absatz oder ein anderes Konstrukt aus mehr als einer Textzeile besteht, müssen die Zeilen linksbündig ausgerichtet sein.

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

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

Leerzeilen und Einrückung 1:

Siehe auch: Textblock (Absatz)

Eingerückter Textblock (Blockzitat)

Die Einrückung ist die einzige Kennzeichnung für Blockzitate (eingerückter Textblock).

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.

Leerzeilen und Einrückung 2:

Siehe auch: Eingerückter Textblock (Blockzitat)

Zeilenorientierter Textblock (Zeilenblock)

Mit einem Zeilenblock kann ein Zeilenwechsel realisiert werden. Durch Einrückungen können einzelne Zeilen eingerückt werden.

| 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.

Leerzeilen und Einrückung 3:

Siehe auch: Zeilenorientierter Textblock (Zeilenblock)

Einfache und komplexe Markup

Mehrere Konstrukte beginnen mit einem Markup. Der Körper des Konstrukts muss dann relativ zum Markup eingerückt werden.

Bei Konstrukten mit einfachen Markup (ungeordnete und geordnete Aufzählungslisten, Fußnoten, Zitate, Hyperlink-Ziele, Direktiven und Kommentare) wird der Grad der Einrückung des Körpers durch die Position der ersten Textzeile bestimmt, die auf derselben Zeile beginnt wie das 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.

Leerzeilen und Einrückung 4:

Bei Konstrukten mit komplexeren Markup bestimmt in der Regel die Einrückung der ersten Zeile nach dem Markup den linken Rand des Textkörpers. Wenn das Markup sehr lang ist, kann es sinnvoll sein, mit dem Textkörper in der nächsten Zeile zu beginnen. Die Zeile nach dem Markup muss um mindestens ein Leerzeichen eingerückt sein (minimale Einrückung).

: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.

Leerzeilen und Einrückung 5:

Siehe auch: