##### 27.3.2.1 Preventing splits that leave dangling headings

Suppose you have designated the following criterion for split points:

    [HtmlStyles]
    Heading2 = Split

Now suppose your DITA document has content organized as follows:

    Heading1
       Heading2
          Body text
       Heading2
          Body text
    Heading1
       . . .

And you want split points as follows:

    Heading1
       Heading2
          Body text
    ------------------- split here
       Heading2
          Body text
    ------------------- split here
    Heading1
       . . .

That is, to avoid a title-only topic, you want to suppress a split between the first Heading1 and the first Heading2.

Instead of the first Heading2 you could use a different paragraph format that is not assigned the Split property, such as Heading2First, and add that format to the paragraph catalog. Or, you could use [HelpContentsLevels] to assign level numbers to your heading formats, and set SmartSplit=Yes:

    [HelpContentsLevels]
    ; FM paragraph format name = TOC level (MS or Java)
    Heading1 = 1
    Heading2 = 2

    [HtmlStyles]
    Heading1 = Split
    Heading2 = Split

    [HTMLOptions]
    ; SmartSplit = No (default) or Yes (suppress splits in sequences of
    ;  heads which lack text bodies, as long as the [HelpContentsLevels]
    ;  values continue to increase)
    SmartSplit = Yes

The effect of these settings is to suppress splits as long as the heading level number increases for each paragraph in an unbroken sequence of paragraphs. For example, these settings would keep all of the following together:

    Heading1
       Heading2
          Heading3
             Body text

In other words, SmartSplit prevents splits when both of the following are true:

- the later heading is subordinate to the earlier heading
- there is no body content between headings (but see §27.3.2.2 Keeping headings together when other content intervenes).

Note: It is not a good idea to use SmartSplit in conjunction with trails of links; see §29.2.1 Understanding trails of links.

Previous Topic: 27.3.2 Managing split points

Next Topic: 27.3.2.2 Keeping headings together when other content intervenes

Parent Topic: 27.3.2 Managing split points

Sibling Topics:

27.3.2.2 Keeping headings together when other content intervenes