indent_cmd

View page source

Indent Command

Syntax

indentation {xrst_indent}

Discussion

  1. The xrst documentation for a page can be indented so that it is grouped with the source code it is next to.

  2. We call lines that have just spaces or tabs empty lines

  3. Empty lines below an indent command, and before the next indent command, must begin with indent . The indent characters are not included in the rst output; i.e., the indentation is removed.

  4. If there is an indent command in a page, lines before the first indent command do not have any indentation.

  5. If there is no indent command in a page, the indentation for the page is computed automatically.

indentation

This is the sequence of spaces or a sequence of tabs that come before {xrst_indent} . It cannot mix both spaces and tabs.

Automatic Indentation

If there is no indent command in a page, the indentation is calculated automatically as follows: The number of spaces (or tabs) before all of the xrst documentation for a page (not counting lines with just spaces or tabs) is used for the indentation for that page.

Comment Character

The indentation is calculated before processing the comment_ch_cmd command.

Example

indent_example, Indent, and xrst_indent .