XML technologies / Markdown in publishing / Lists

Lists are more than lines of text with preceding characters. The parser must recognize where a list begins, which blocks belong to an entry and how sublists are nested. Misunderstandings occur precisely at these points, especially when exchanging between editors.

The following nine examples show unordered and ordered lists, start values, nesting, compact and loose forms, multi-part entries, task lists, definitions, and special numbering types. They are deliberately small enough to allow the effect of a single change to spaces or markers to be traced. S02, S06

Example 11: Unordered lists

CommonMark

A hyphen, an asterisk, or a plus sign followed by a space begins an unordered list item. The choice of character does not reliably determine the graphical form of the bullet; this is determined by the layout.

SOURCE

- Source manuscript
- Copy editing
- Final publication

Alternative markers:

* HTML edition
* EPUB edition

+ Print edition
+ Audio edition

RENDERED RESULT

HTML output of unordered lists

Within a list, the same marker should be used. A change from * to + starts a new list in the parser shown, even if both parts look the same. The first list contains three entries, the two following ones contain two each. Additional text paragraphs serve here as explanation and are not list entries. Without a space, for example with -Source, there is no ordinary list marker.

Example 12: Numbering and start value

CommonMark

The first number sets the starting value of an ordered list. The subsequent entries are numbered consecutively in the output. Therefore, the source text can contain 1. for each entry, even though 1, 2 and 3 appear in the result. This makes it easier to rearrange work steps.

SOURCE

1. Open the manuscript.
1. Check the references.
1. Publish the result.

Continue a separate procedure:

4. Archive the files.
5. Record the release.

RENDERED RESULT

HTML output of the numbered list

The second list deliberately starts at 4. However, its continuation is not logically linked to the first list. If an entry is added there, Markdown does not automatically update this starting value. Such a continuous counter across multiple lists requires an additional convention or processing logic.

Example 13: Nested and mixed lists

CommonMark

The indentation assigns sublists to their parent entry. The example combines an ordered main list, an unordered sublist and another ordered list. It thus shows a true tree structure and not just visually indented paragraphs.

SOURCE

1. Prepare the publication.
    - Check the text.
    - Check the assets.
        1. Verify image rights.
        2. Add alternative text.
2. Release the approved edition.

RENDERED RESULT

HTML output of the nested and mixed list

The four additional spaces per level used here are a readable writing convention for these short markers. However, the general CommonMark rule takes into account the width of the list marker and the spacing after it. With multi-digit starting numbers and continuation blocks, attention must therefore be paid to the actual content position. Tabs are unnecessarily error-prone for editorial sources.

Example 14: Compact and loose lists

CommonMark

A list without blank lines between its items is typically compact, called "tight" in the specification. Blank lines can turn it into a loose list. The difference is visible in the HTML structure: in a loose list, the texts are placed in paragraph elements within the list items.

SOURCE

- A compact item
- Another compact item

A separate list with paragraphs:

- A spacious item

- Another spacious item

RENDERED RESULT

HTML output of the compact and loose lists

The visible spacing also depends on the CSS A preview can therefore almost hide the structural difference. Blank lines should not be inserted merely to create a little more breathing room. They affect the parser result and therefore also downstream processing.

Example 15: Multiple blocks in one list item

CommonMark

A list item may contain multiple paragraphs and a code block. The indentation of the continuation blocks is decisive. Here they begin under the text after 1. and thus remain part of the first entry. The second main point follows only after the code block.

SOURCE

1. Inspect the source.

   Keep this explanation inside the first item.

   ```xml
   <status>approved</status>
   ```

2. Save the approved file.

RENDERED RESULT

HTML output of the list with multiple paragraphs and a code block

If the indentation is removed, the list can end prematurely. Too much indentation can in turn create an unintended code block. For technical instructions, this case is particularly important: An example that visually appears under a work step must also be assigned to that step in the document tree.

Example 16: Task lists

GFM, formal profile

After the list marker there are square brackets with a space or a x. In the HTML shown, these become checkboxes for open and completed tasks. The spacing after the closing bracket is part of the notation.

SOURCE

- [x] Manuscript checked
- [x] Figures approved
- [ ] EPUB validation completed

RENDERED RESULT

HTML output of the list with checkboxes for open and completed tasks

The preview is a document, not a task management application. Its checkboxes are disabled. Whether a click changes the Markdown source text or a database status is determined by the respective platform. A task list also does not define a learning task with points, permitted answers and evaluation logic. Such semantic information requires its own model.

Example 17: Definition lists with multiple paragraphs

Pandoc Markdown

In Pandoc, a term is followed by a definition that begins with a colon and a space. Multiple terms or definitions are possible. The additional indented paragraph remains part of the second definition in the example. The HTML output uses a definition list with dt and dd, not a table.

SOURCE

Manuscript
: The source text before final publication.

Edition
: A particular published form of a work.

    This edition includes revised figures.

RENDERED RESULT

HTML output of the definition list with multiple paragraphs

This is usable for a small glossary. However, a terminological specialist model with preferred designation, synonyms, language variants, sources, status and stable concept identifiers does not arise automatically from this. Alphabetical sorting or an index is also not triggered by the colon alone.

Example 18: Alphabetical and Roman numbering

Pandoc Markdown

The Pandoc extension fancy_lists recognises alphabetical and Roman list markers in addition to Arabic numerals. In the example, two ordered lists with different numbering types are created. The CommonMark profile does not interpret these notations as such lists.

SOURCE

a. Editorial review
b. Technical review

Another sequence:

i. Source files
ii. Generated files

RENDERED RESULT

HTML output of the alphabetical and Roman numbering

The exact presentation may depend on the target format. A printed list with Roman numerals is not the same as a sequence of digits permanently stored in the text. For stable references to work steps, independent identifiers are more suitable than the currently visible list number.

Example 19: Continuous example numbers

Pandoc Markdown

Pandoc offers with example_lists another, less well-known list form. The numbers can run continuously across the document. A named marker such as (@review) allows a reference to the corresponding example entry. This distinguishes this function from an ordinary list whose start value is set manually.

SOURCE

(@review) The source has been reviewed.
(@release) The release has been approved.

See example (@review) before publication.

RENDERED RESULT

HTML output of the list with continuous example numbers and a reference

These references are not a general numbering of figures, tables or sections. A name after @ can be understood in other contexts as a literature reference. The limited special syntax should therefore not be described as a universal cross-reference system.

For an editorial guideline, "lists are allowed" is not sufficient. A consistent indentation, a preferred marker, and clear rules for continuation paragraphs are useful. The technical quality check should verify entry counts and nesting. This way, a paragraph that has been accidentally moved out is detected, even if it still appears roughly at the expected position in the preview.

back to top