Tour: Nested Levels

Commands can have two kinds of arguments: flow arguments are given in parentheses “(…)” while blocks are appended after a potential list of flow arguments.

Flow arguments can be named, the name must then be an identifier followed by “=”. They are separated by commas “,”.

A colon “:” indicates that a list of blocks follows. The list of blocks ends with the special structure “\end(…)” where is the identifier of the current command structure. This would usually be the symbol that is currently called or assigned to.

In blocks, a line starting with a colon “:” starts a block name. The block name must be an identifier, after which a second colon “:” follows.

In blocks, the indentation of the first non-empty line defines the indentation of the block. This indentation will be stripped away and is not processed as content.


There are two substructures that allow commands to have nested levels: argument lists and block lists.

An argument list starts with an opening parenthesis “(”, which must succeed a command structure. The argument list ends with a closing parenthesis “)”. Parentheses are only special characters in this context and are processed as content elsewhere.

In an argument list, zero or more flow arguments may be given. The argument content cannot contain any of the characters “=(),” unless they are escaped. Flow arguments may be multi-line and cannot contain blocks.

A block list starts with an opening colon “:”, which must succeed a command structure. The identifier used in \end(…) is the name of the subject in the current command structure if that subject is a symbol, or empty otherwise. If the command started with a command character other than “\”, that character must also be used in front of end.

A block list may contain an optional primary block, and any number of named blocks.

A named block starts with a block name, which consists of an opening colon “:”, an identifier, and a closing colon “:”. Block names must start at the beginning of a line and may only be preceded by inline whitespace. Both the initial “:” and the block names may have block headers but no following content. Other lines make up the block content.

Whitespace is ignored at the beginning and end of any flow argument or block. In flow arguments, all whitespace at the beginning of each line is ignored, allowing for indentation of continuation lines.

The first non-empty line of a block's content defines the block's indentation, which may consist of either space or tabulator characters, but not both. At most this number of characters of the chosen kind will be removed from the beginning of every content line of the block. This feature allows you to visually present block levels with indentation in your source, without causing it to add whitespace content.