\(\newcommand{\B}[1]{ {\bf #1} }\) \(\newcommand{\R}[1]{ {\rm #1} }\)
indent_cmd¶
View page sourceIndent Command¶
Syntax¶
indentation {xrst_indent}
Discussion¶
The xrst documentation for a page can be indented so that it is grouped with the source code it is next to.
We call lines that have just spaces or tabs empty lines
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.
If there is an indent command in a page, lines before the first indent command do not have any indentation.
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.
Example¶
indent_example, Indent, and xrst_indent .
Comment Character¶
The indentation is calculated before processing the comment_ch_cmd command.