7. Lists

Lists are fairly simple as well. Let's add one to our growing document.

<itemizedlist>
   <listitem>
   <para>
   Item 1
   </para>
   </listitem>

   <listitem>
   <para>
   Item 2
   </para>
   </listitem>

   <listitem>
   <para>
   Item 3
   </para>
   </listitem>
</itemizedlist>

And here is what that list looks like after it's run through the SGML parser:

Here's how you create one which has numbers:

<!-- we could also change the numeration attribute to equal any of Arabic, Loweralpha,
     Lowerroman, Upperalpha, Upperroman
-->

<orderedlist numeration="Arabic">
   <listitem>
   <para>One</para>
   </listitem>

   <listitem>
   <para>Two</para>
   </listitem>

   <listitem>
   <para>Three</para>
   </listitem>

   <listitem>
   <para>Four</para>
   </listitem>
</orderedlist>

Notice I added a comment just above our list. We can change the numeration value to equal any of those values and get different types of numbered lists! And here is what that one looks like:

  1. One

  2. Two

  3. Three

  4. Four