Skip to main content

The PreTeXt Guide

Section 4.11 Lists

A list is an unusual construction, even if everybody knows exactly what one is. We view the list itself as a container of various chunks of text, while those chunks of text are the list items. Each item has a marker to identify it.
Markup and processing is complicated by the possibility of a list item containing a list, resulting in nested lists. We simplify this problem by requiring that a list appear within a paragraph (<p>), see Subsection 4.1.3. One of the three exceptions is the possibility to place a list into a block that earns a caption and a number, using the <list> element, see Section 4.20.
The final subsection contains some examples that you may wish to consult as you read this section.

Remark 4.11.0.25. Best Practice.

Lists are a very attractive device. Hopefully the discussion above has convinced you that they are more complicated than they first appear. Think carefully before using one, and consider if some other structure (<paragraphs>, <sidebyside>, a subdivision) might do a better job of organizing and communicating your meaning. And if a list is really necessary, consider if it should be named or anonymous, heavily-nested or nearly-flat, with columns, or with long or short content in the items. Cross-references from the items of a list to more complicated structures is another device that works well.