##### 26.5.8.1 Ending ancestor elements before the current block

In some cases, it is not clear whether a paragraph is supposed to be a child of the preceding element (or nest of elements). For example, by default a <para> element following a list item becomes part of the <listitem>, and that is not necessarily what you want.

To close an element (or a hierarchy of elements) before starting the current block (for example):

    [DocBookCloseBefore]
    ; para format = elements to be closed, with any other elements
    ;   nested under them, before the current block element starts.
    Recap = listitem
    Body = itemizedlist orderedlist

Use this setting to force closure of elements that were opened based on settings in [DocBookParents]; see §26.5.2 Designating DocBook ancestor elements. You can list as many possible ancestors as necessary; order is not important.

For individual cases, you can insert a DocBookCloseBefore PI marker in the paragraph for the current block element instead, with content the name(s) of the element(s) to close. You can also use a DocBookCloseBefore PI marker to override a [DocBookCloseBefore] setting when you want to close a higher (or lower) ancestor than the setting specifies.

Previous Topic: 26.5.8 Closing DocBook ancestor elements

Next Topic: 26.5.8.2 Ending ancestor elements after the current block

Parent Topic: 26.5.8 Closing DocBook ancestor elements

Sibling Topics:

26.5.8.2 Ending ancestor elements after the current block