You want to know what list types are available in DocBook.
DocBook provides three basic lists that are used most often:
itemizedlist
, for unordered lists (like
ul
in HTML)
orderedlist
for numbered lists (like
ol
in HTML)
variablelist
, for lists containing terms and their
definition (like dl
in HTML)
Additionally, for specific purposes, DocBook provides special lists (not explained in this topic):
bibliolist
is a wrapper for bibliographic
content. A bibliolist
is usually inserted in
section-like elements where a bibliography
is not
allowed.
calloutlist
, a usually numbered list that
points to lines in a listing
glosslist
is a wrapper for glossary content.
A glosslist
is usually inserted in section-like
elements where a glossary
is not allowed.
segmentedlist
is a list that can be used for items that
have a one-to-one correspondence to their title. A
segmentedlist
can be formatted in a number of ways
(tabular or as a list block).
simplelist
is an unordered list for single
words or small phrases.
The previous lists are used to maintain semantic distinction.
The list types orderedlist
and itemizedlist
are structurally identical (except for their enclosing element) as you will
see in the following subsections.
The variablelist
is slightly different and contains
the term
element for its term.
itemizedlist
An itemizedlist
is an unordered list and can be
written as shown in the following example:
The itemizedlist
list in DocBook uses by default
a bullet character (• solid circle). If you nest an
itemizedlist
, it will start with a bullet (• solid
circle), then use a circle (○ open circle) and finally a square
(■ solid square). If you nest your list deeper, the sequence is
repeated. The hierarchy looks like this:
Level | Shown as |
---|---|
1. | • • • |
2. | ○ ○ ○ |
3. | ■ ■ ■ |
The default bullet character can be overwritten with the mark
attribute:
<itemizedlist mark="circle">
It is even possible to deviate from its default symbol in a
listitem
by using the overwrite
attribute:
<itemizedlist> <listitem> <para>The first entry</para> </listitem> <listitem overwrite="square"> <para>The second entry</para> </listitem> <listitem> <para>The third entry</para> </listitem> </itemizedlist>
orderedlist
An orderedlist
can be written as shown in the
following example:
The orderedlist
in DocBook numbers as Arabic
numbers by default. If you nest an orderedlist
, it
will be automatically numbered as shown in the following
sequence:
Level | Shows as |
---|---|
1. | 1, 2, 3 |
2. | a, b, c |
3. | i, ii, iii |
4. | A, B, C |
5. | I, II, III |
The numbering style in an orderedlist
can be
changed with the numeration
attribute. Allowed values are arabic, loweralpha, lowerroman, upperalpha, or upperroman.
variablelist
An variablelist
, despite its confusing name,
holds all sort of terms and their definitions. It is not limited
to variables only. The following example shows how to use a
variablelist
.
A varlistentry
can contain more than one term.
How the terms are displayed usually depends on the output
formats. Each term
can either be printed on a
separate line or all term
s on the same line separated by commas.
Project@GitHub | Issue#6 |