Skip to main content

The PreTeXt Guide

Subsection 4.11.2 List Markers

Do nothing, and your ordered and unordered lists will get sensible default markers. They are consistent in the following sense. If your list has two items, and each of the two items contains a list, then these two lists will use the same type of marker.
For a description list, you author each marker as part of each list item, as discussed below in the discussion of list items.
If you want to change how an ordered list is marked, then you use the @marker attribute on the <ol>, whose value is a format code. This string contains one of five codes (a single character), which may be surrounded by other characters, excluding the five codes. For example marker="(A)" will produce uppercase letters wrapped in parentheses: (A), (B), (C), …. The extra formatting works well in a conversion to , but is not possible technically in a conversion to HTML, so it should be considered decorative, and not relied upon for meaning. The formatting does not carry through to the numbers of list items in cross-references.
If you want to change how an unordered list is marked, then you use the @marker attribute on the <ul>, whose value is a format code. This string contains one of three codes in the table below. Then every item of the list will have that symbol as its marker.
Code Realization
1 Arabic numerals
a Lowercase letters
i Lowercase Roman numerals
A Uppercase letters
I Uppercase Roman numerals
0 Arabic numerals, from zero
Table 4.11.2.1. Ordered List Markers
Code Realization
disc Filled small circle, aka a bullet
circle Small circle
square A square
Table 4.11.2.2. Unordered List Markers
Default marker types are assigned to each level of nested lists in the order shown in the table, and cycle back to the top of the table if necessary, though zero-based Arabic numerals will be skipped for ordered lists.
Start with the defaults, and experiment as needed. See the examples below for some extreme (and unwise) customizations of markers.
For a description list, possible markers are more varied than what you can express within an attribute. So the list item must have a <title> element (see below). This should be very short text, and may contain inline mathematics. It is often rendered in bold, so be aware that some markup may get lost. Perhaps for obvious reasons, do not include footnotes, cross-references, or display mathematics. The <dl> element has a @width attribute, with possible values narrow, medium, and wide. The default is narrow. This is a hint about how much text you have in these markers, and in certain presentations may make better use of horizontal space on a page.