The Crash Course to DocBook

6.4. The variablelist

The variablelist is similar to an HTML definition list. It is used when you have a list of terms and definitions. The variablelist consists of several tags: <varlistentry>, which is used to group related terms together, <term>, which contains the term, and <listitem>, which contains the decription of the term.

Example 6-4. A variablelist


<variablelist>
<varlistentry>
<term>Black Beans</term>
<listitem><para>My favorite black bean recipe is black bean
soup, but they also go well with rice.</para></listitem>
</varlistentry>
<varlistentry>
<term>Apples</term>
<term>Bananas</term>
<listitem><para>You can eat them straight, but they also go
well in salads and in desserts.</para></listitem>
</varlistentry>
</variablelist> 

When converted, the example variablelist will look something like this:

Black Beans

My favorite black bean recipe is black bean soup, but they also go well with rice.

Apples, Bananas

You can eat them straight, but they also go well in salads and in desserts.