Editing Heading Levels for a Print TOC

When creating print output, you can determine which topic headings will be displayed at which level in the generated TOC. For example, even though all of your topics may use a heading style of h1, you might want some of those topic headings to display at the first level in the print TOC (acting as an h1), others at the second level (acting as an h2), and still others at the third level (acting as an h3). This can be determined via one of the following methods.

You might even use both methods for your print output. Maybe you decide to use the TOC depth to determine the heading levels. But you also might use the mc-heading-level, setting it to 0 for certain styles (e.g., h3, h4, h5, h6) in order to limit the number of levels shown in the generated TOC.

TOC Depth Method

You can use the TOC depth setting to automatically change heading levels based on structure of an outline TOC (e.g., a topic with an h1 might change to an h3 in output if it is on third level of outline TOC). Not only will those headings be reflected in the generated TOC in the output, but the corresponding headings will be converted in the main body too (e.g., if a heading becomes an h2 in the TOC, it will become an h2 in the text as well).

How to Use the TOC Depth for Heading Levels

  1. Open the print-based target (e.g., PDF).
  2. In the Target Editor, select the Advanced tab.
  3. In the Generated TOC section, select Use TOC depth for heading levels.
  4. Click to save your work.

How to Use the TOC Depth for Heading Levels

  1. Open the print-based target (e.g., PDF).
  2. In the Target Editor, select the Advanced tab.
  3. In the Generated TOC section, select Use TOC depth for heading levels.
  4. Click to save your work.

Example The first paragraph in each topic that you create uses the h1 style (except your title page and print TOC topic), and you structure the outline TOC like this:

If you do not use the depth feature, the print TOC will look like this in the output:

But if you turn this feature on, the result will instead look like this in the output:

Notice that "NewTopic3" is indented to the third level in the print TOC (because that is its position in the outline TOC). The other topics are at the second level. The books ("Chapter 1" and "Chapter 2") are at the first level, but they are not linked to topics; therefore, they are not included in the output. If you want the unlinked books to be included in the output, you can create headings for them.

Note If you create books in the outline TOC (whether they are linked to topics or not), they will affect the heading level in the print TOC. If you want unlinked books to be converted to headings in the output (both in the print TOC and in the main body), you can do so. See Creating Headings for Unlinked Books in a Generated TOC.

Note What happens if you are using classes of heading styles and then select the "Use TOC depth for heading levels option"? For example, let's say you have classes of your h1 and h2 heading styles. Suppose you created h1.Special (with a blue font), and h2.Special (with a red font). Meanwhile the primary h1 and h2 styles both use a black font. In your topics, you've applied your heading style classes to some heading content. And in your outline TOC, you organized the structure like this:

Because you selected the option to use TOC depth for heading levels, some of the level-1 headings will become level-2 headings or even level-3 headings in the output. If you have headings where you used h1.Special but their level in the output was not affected (i.e., they remain as level-1 headings), they will keep the properties from the style class. In other words, they will stay blue. But if the structure of the outline TOC causes them to become level-2 headings in the output, they will take on the properties of the h2.Special tag—because the class has the same name ("Special") as its h1 counterpart. Therefore, those headings will have a red font. However, let's say that your level-2 class was named something different (e.g., h2.Red). In that case, h1.Special headings that are pushed to become level-2 headings will instead use properties from the main h2 style. In other words, they will have a black font—not blue like h1.Special and not red like h2.Red.

Heading Styles Method

The mc-heading-level property is used to indicate a TOC level for a style. This property is already set to 1 for h1 styles, 2 for h2 styles, 3 for h3 styles, and so on. Therefore, you can simply use the h1 through h6 styles in your content. You can also set the mc-heading-level property to the appropriate depth level for any paragraph style that you want to use as a heading, or you can set the mc-heading-level property to 0 for styles that you do not want to include in the TOC. In the output, the print TOC will display styles with an mc-heading-level value of 1 at the highest (far left) level, those with a value of 2 at the next level, and so on (regardless of the structure of the outline TOC).

How to Use Styles for Heading Levels

  1. From the Content Explorer, open the stylesheet that you want to modify.
  2. From the Medium drop-down in the Stylesheet Editor, make sure the proper medium is selected before you begin. In the Advanced view, you can open multiple mediums at once; you just need to look at the title at the top of the medium pane and make sure you are working in the correct one. If you are not using stylesheet mediums for your different outputs or if you want all mediums to have the same settings, just leave the medium set to default and continue.

    Mediums can be used if you want to use one group of settings for online output types and another group of settings for print-based output types. For example, you might use the default medium for your online outputs and the print medium for your print outputs. See Mediums and Media Queries.

    Please note that Flare remembers the last medium that you used when working in the stylesheet, so it may or may not be the one that you want to use the next time around.

  3. In the local toolbar, make sure the first button displays . If the button displays instead, then click it.
  4. In the upper-left corner of the editor, click in the drop-down field and select .
  5. From the area below, select the h1 through h6 style (h1, h2, h3, h4, h5, h6) that you want to customize. If you created other custom styles for your headings (e.g., p.MyIndexHeading), you can select those styles instead (you may first need to switch to a view that shows all paragraph styles). The mc-heading-level property (which is the property that determines the heading level in a print TOC) can be applied to any paragraph style.
  6. From the Show drop-down list on the upper-right side of the editor, select .
  7. (Optional) You can use the toggle button in the local toolbar to show properties below in a group view or an alphabetical view .
  8. If you are using the grouped view, expand the PrintSupport group.
  9. To the right of mc-heading-level, click , and select the level for the heading style (e.g., 0, 1, 2, 3). The higher the number, the lower in the hierarchy the heading will be displayed in the print TOC. If you select 0, the heading will not be included in the print TOC.
  10. Click to save your work.

Example You have applied h1, h2, and h3 styles to headings in your topics, but you only want the headings with h2 and h3 styles to be included in the print TOC (omitting h1 headings from the print TOC). You can do this by designating the level of the "mc-heading-level." A level of 0 means the heading is not included in the print TOC, a level of 1 means that it is included at the highest level in the TOC hierarchy (farthest to the left), a level of 2 means that it is included at the second highest level in the TOC hierarchy, and so on. Therefore, for this example, you might set the mc-heading-level for the h1 style to 0. And if you want to move the h2 and h3 headings up a level, you could set the mc-heading-level property for h2 to 1, and the property for h3 to 2.

What’s Next?

Make sure you apply the styles to be used in the generated TOC to the appropriate headings in your content. See Applying Styles to Content.