3.3. Lists


3.3.1. Overview

SDF supports 3 types of lists:

As lists are so common, they are supported by a special syntax:

   special_tag text

where special_tag is a sequence of 1 to 6 special characters. Spaces or tabs between the tag and text are ignored.


3.3.2. Unordered Lists

To define an unordered list, use the '*' character. For example:

* peach
* banana
* mango.

The result is:


3.3.3. Plain Lists

To define a plain list, use the '.' character. For example:

. peach
. banana
. mango.

The result is:


3.3.4. Ordered Lists

To define an ordered list, use the '^' character for the first item and the '+' character for remaining items. For example:

^ peach
+ banana
+ mango.

The result is:

  1. peach
  2. banana
  3. mango.

3.3.5. List Paragraphs

To nest a normal paragraph inside a list, use the '.' tag. For example:

* peach
. This is one of my favorites.

The result is:


3.3.6. Nested Lists

Lists can be nested up to 6 levels. The nesting level is taken from the number of special characters in the tag. For example:

** a bulleted list at level 2
^^^ an ordered list at level 3

To nest normal paragraphs inside these lists, use plain list items. For example:

** a bulleted list at level 2
.. A normal paragraph at level 2.

3.3.7. The '-' Special Tag

As a convenience, the '-' character can be used to specify a bulleted list at level 2. For example:

* inputs:
  - programmers
  - pizza
* outputs:
  - software
  - empty pizza boxes.

The result is:

Likewise, the tags '--' to '-----' are equivalent to the tags '***' to '******'.