title: Zettelmarkup: Nested Lists role: manual tags: #manual #zettelmarkup #zettelstore syntax: zmk back: 00001007010000 00001007030000 00001007030600 00001007720900 00001007800000 00001007990000 00001012920513 backward: 00001007010000 00001007030000 00001007030600 00001007720900 00001007800000 00001007990000 00001012920513 box-number: 1 copyright: (c) 2020-present by Detlef Stern created: 20210126175322 forward: 00001007040000 00001007040350 lang: en license: EUPL-1.2-or-later modified: 20241213121000 published: 20241213121000 visibility: public There are three kinds of lists that can be nested: ordered lists, unordered lists, and quotation lists. Ordered lists are specified with the number sign (""''#''"", U+0023), unordered lists use the asterisk (""''*''"", U+002A), and quotation lists are specified with the greater-than sign (""''>''"", U+003E). Let's call these three characters __list characters__. Any nested list item is specified by a non-empty sequence of list characters, followed by a space character and a sequence of [[inline elements|00001007040000]]. In case of a quotation list as the last list character, the space character followed by a sequence of inline elements is optional. The number / count of list characters gives the nesting of the lists. If the following lines should also be part of the list item, exactly the same number of spaces must be given at the beginning of each of the following lines as it is the lists are nested, plus one additional space character. In other words: the inline elements must begin at the same column as it was on the previous line. The resulting sequence of inline elements is merged into a paragraph. Appropriately indented paragraphs can be specified after the first one. Since each blocks-structured element has to be specified at the first position of a line, none of the nested list items may contain anything else than paragraphs. Some examples: ```{="zmk"} # One # Two # Three ``` is rendered in HTML as :::{="example"} # One # Two # Three ::: Similar an unordered list: ```{="zmk"} * A * B * C ``` is rendered in HTML as :::{="example"} * A * B * C ::: A quotation list is in most cases not a real list. Mostly, it results by copying replies from emails: ```{="zmk"} > Please add some > more parsers to > the Zettelstore software. ``` is rendered in HTML as :::{="example"} > Please add some more parsers to the Zettelstore software. ::: You can freely mix these three types of nested lists. And you can nest them: ```{="zmk"} * A *# A.1 *# A.2 *#* A.2.a *#* A.2.b *#> Quote A.2.b.I *#># A.2.b.I.1 *#># A.2.b.I.2 *# A.3 * B * C ``` is rendered in HTML as: :::{="example"} * A *# A.1 *# A.2 *#* A.2.a *#* A.2.b *#> Quote A.2.b.I *#># A.2.b.I.1 *#># A.2.b.I.2 *# A.3 * B * C ::: Please note that two lists cannot be separated by an empty line. Instead you should put a horizontal rule (""thematic break"") between them. You could also use a [[mark element|00001007040350]] or a hard line break to separate the two lists: ```{="zmk"} # One # Two [!sep] # Uno # Due --- # Eins # Zwei \ # Une # Deux ``` is rendered in HTML as :::{="example"} # One # Two [!sep] # Uno # Due --- # Eins # Zwei # Une # Deux ::: Here an example using multiple paragraphs: ```{="zmk"} * Para A-1 Para A-2 * Para B-1 (continued) Para B-2 ** Para B.b-1 Para B.b-2 Para B-3 ``` is rendered in HTML as :::{="example"} * Para A-1 Para A-2 * Para B-1 (continued) Para B-2 ** Para B.b-1 Para B.b-2 Para B-3 :::