lines 6-55 of file: xrst/indent_command.py {xrst_begin indent_cmd user} Indent 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. Comment Character ***************** The indentation is calculated before processing the :ref:`comment_ch_cmd-name` command. Example ******* :ref:`indent_example-name`, :ref:`comment_ch_example@Indent`, and :ref:`example_ad_double@xrst_indent` . {xrst_end indent_cmd}