The L0 Markup Language

The L0 Markup language takes inspiration from Lisp. Text in L0 consists of blocks and elements. An element is a span of ordinary text or a function element like [i blocks], where i (for "italic") is the function and the rest of the text up to the matching right bracket, in this case "blocks", is the function argument. Function elements can be nested, e.g., [i [b blocks]]. In this case "blocks" is rendered in bold italic. One could also write [i special [b blocks]], in which case "special" would be italicized and "blocks" would be rendered in bold italic.

There are a few special elements: text enclosed in backticks for inline code, and text enclosed in dollar signs for inline mathematics, e.g., $a^2 + b^2 = c^2$.

There are three kinds of blocks: anonymous blocks (paragraphs), named blocks, and verbatim blocks. Blocks are bounded above and below by one or more blank lines. An anonymous block, aka paragraph, is a sequence of elements containing no blank lines. Named and verbatim blocks consist of a header and a body. The header is a line of the form | Name Arguments in the case of a named block. In the case of a verbatim block, the header takes the form || Name Arguments. The body is a sequence of elements containing no blank lines. Blocks may be indented, thus defining a tree structure.