Working with Microsoft Word Styles for Heading Numbering across Doclets

To apply a numbering scheme to the headings in your report package, where the numbering is retained across doclets, use multi-level list templates and built-in heading styles (Heading 1, Heading 2, and so on) in Microsoft Word. For example, you can number headings so that top-level headings (Heading 1) are numbered 1, 2, 3, and second-level headings (Heading 2) are numbered 1.1, 1.2, and 1.3. Figure 3-1 shows an example of using Heading 1, Heading 2, and Heading 3 styles for numbered headings.

Figure 3-1 Numbered Heading Example


screenshot shows a Word doclet with headings numbered 3, 3.1, 3.1.1, and 3.1.2

To use Word styles to apply a numbering scheme to the headings in your doclets, the report package owner must add multi-level list numbering heading styles in the report package style sample document. Then, all of the Word doclets that use the heading styles will retain the proper numbering scheme.

In addition, heading numbering will be included in a report package automatic table of contents. See Working with an Automatic Table of Contents.


screenshot shows table of contents with heading numbering 1, 2, 2.1, 2.2, 3, 3.1, 3.1.1, 3.1.2, and so on.

Report Package and Doclet Heading Numbering Display Considerations

The report package heading numbering is dynamically calculated whenever the report package is merged, such as previewing, downloading or publishing the report package. If a doclet or section is previewed or downloaded as a standalone doclet or section, the heading numbering will be calculated based on the content within the doclet or section and will typically be reset starting at "1". When the doclet's contents are merged into the report package, the heading numbering will be correctly reflected.

In Figure 3-2, the image on the left shows a doclet that is previewed as a standalone doclet, and the image on the right shows the doclet's contents when the entire report package is previewed. Notice that the heading numbering is updated to reflect the report package numbering scheme in the image on the right.

Figure 3-2 Before and After Merging a Doclet into a Report Package


Image shows two screenshots, with a standalone doclet on the left with headings 1, 1.1, 1.1.1, 1.1.2, and the doclet on the right with headings 3, 3.1, 3.1.1, 3.1.2.

Troubleshooting Heading Numbering Display Issues

Perform these actions if the heading numbering display in your report package is not numbered sequentially or correctly:

  • Ensure that all headings in all doclets are utilizing the built-in heading styles in Word (for example, Heading 1, Heading 2).

  • Ask the report package owner to reset the styles of an existing report package by updating the style sample document with a minor change.

  • In rare cases, the heading numbering may become hard-coded behind-the-scenes in Word. Even if it is correctly displayed in the doclet, the numbering may not be correctly displayed in the report package preview or download. To resolve this:

    1. Check out and download the affected doclet.

    2. Select the affected text and change it to use a different Word style (for example, Normal), and then change it back to the Heading style that contains the required numbering (for example, Heading 3).

    3. Upload and check in the doclet.

    4. Preview, download, or publish the report package, and verify that the heading numbering is correct.