##### 24.5.9.2 Ending ancestor elements after the current block

In some cases, it is not clear whether the end of a block element should also end the enclosing parent element. For example, if your document includes illustrations with the figure title above the image, body paragraphs following the image would normally be included in the <fig> element, because the content model allows <p> inside <fig>.

To close a parent element at the end of the current block element (for example):

    [DITACloseAfter]
    ; para format = parent to be closed, with any other elements
    ;  nested under it, at the end of the current block element.
    FigAnchor = fig

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

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

Previous Topic: 24.5.9.1 Ending ancestor elements before the current block

Next Topic: 24.5.10 Opening DITA ancestor elements

Parent Topic: 24.5.9 Closing DITA ancestor elements

Sibling Topics:

24.5.9.1 Ending ancestor elements before the current block

Table of Contents • Index