#### 26.5.10 Configuring multi-paragraph list items

By default, at the end of each paragraph DITA2Go closes the block element to which the paragraph format is mapped (see §26.4.2 Mapping paragraph formats to DocBook elements). If any list items in your document include multiple paragraphs or sublists, you must make sure that each <listitem> can include more than one block element, but also that the last item in each list or sublist does not slurp up any following paragraphs.

To configure list elements:

Map formats to <para> instead of to <listitem>.

Specify ancestry for each format.

Make each format first in <listitem>.

Make sure each list ends where it should.

Map formats to <para> instead of to <listitem>

Map list-item paragraph formats to <para> rather than to <listitem>:

    [DocBookParaTags]
    Numbered1 = para
    Numbered = para
    Bulleted = para
    BulletedLast = para

Specify ancestry for each format

Designate the appropriate ancestors for each type of list element:

    [DocBookParents]
    Numbered1 = orderedlist listitem
    Numbered = orderedlist listitem
    Bulleted = itemizedlist listitem
    BulletedLast = itemizedlist listitem

Make each format first in <listitem>

Make sure each list-item paragraph is first in its <listitem> element:

    [DocBookFirst]
    Numbered1 = orderedlist listitem
    Numbered = listitem
    Bulleted = listitem
    BulletedLast = listitem

Make sure each list ends where it should

If the last paragraph in a multi-paragraph list item is followed by a paragraph whose format is mapped to an element that is valid in <listitem>, that paragraph will be included in the list item. To prevent including the following paragraph, you can explicitly close the list:

    [DocBookCloseAfter]
    BulletedLast = itemizedlist listitem

Or insert a DocBookCloseAfter PI marker in the last list-item paragraph, with content itemizedlist orderedlist.

As an alternative, you can make sure the list closes before the following paragraph:

    [DocBookCloseBefore]
    Body = itemizedlist orderedlist

Or insert a DocBookCloseBefore PI marker in the following paragraph, with content:

    itemizedlist orderedlist

Previous Topic: 26.5.9.2 Starting a new hierarchy after the current block

Next Topic: 26.5.11 Specifying DocBook element levels

Parent Topic: 26.5 Nesting DocBook block elements

Sibling Topics:

26.5.1 Understanding how DITA2Go determines element nesting

26.5.2 Designating DocBook ancestor elements

26.5.3 Fixing up interpolated ancestries

26.5.4 Deciding when to fully specify ancestry

26.5.5 Specifying alternate ancestries for the same element

26.5.6 Specifying first-child status for nested elements

26.5.7 Specifying full ancestry for nested sections

26.5.8 Closing DocBook ancestor elements

26.5.9 Opening DocBook ancestor elements

26.5.11 Specifying DocBook element levels

Table of Contents • Index