Creating Multi-Level Autonumbering

Next, for the PDF output, we are going to change the autonumbering format for our h1 style, and we're going to add formats to the h2, h3, and h4 styles. This allows us to have autonumbering for different levels when multiple heading styles are used. In this tutorial, the online output will not have autonumbering on the headings; we are designing it for print output only.

How to Edit Heading Styles With Autonumbering

  1. On the left side of the Stylesheet Editor, select the h1 style, and expand the AutoNumber group on the right.

    Note If the Stylesheet Editor happened to adjust showing only one medium, click the Medium drop-down and make sure check marks are added next to both the (default) and print mediums.

  2. In the Medium: print section, to the right of mc-autonumber-format, click .

  3. Copy the following format, and paste it into the field at the top of the dialog, replacing the previous format. Add a couple of spaces at the end. Click OK when you're done.

    CH:{chapnum}

  4. Using the same steps, select the h2 style on the left, and set the mc-autonumber-format to the following. Add a couple of spaces at the end. Click OK when you're done.

    CH:{chapnum}.{n+}

  5. Using the same steps, select the h3 style on the left, and set the mc-autonumber-format to the following. Add a couple of spaces at the end. Click OK when you're done.

    CH:{chapnum}.{n}.{n+}

  6. Using the same steps, select the h4 style on the left, and set the mc-autonumber-format to the following. Add a couple of spaces at the end. Click OK when you're done.

    CH:{chapnum}.{n}.{n}.{n+}

  7. Click to save your work.

How to Add More Content

We have added autonumbering up through the fourth heading level, but currently we only have content that goes to the third level. So let's add some more content.

  1. From the Content Explorer, open the Austin-City-Limits.htm topic.
  2. Place your cursor after the paragraph under "Format," and press ENTER to create an empty paragraph.
  3. Type Performances and press ENTER.
  4. Type Here is some placeholder text that we will replace later. Then press ENTER again.
  5. Type Interviews and press ENTER.
  6. Type Here is some placeholder text that we will replace later.
  7. Apply the h3 style to both Performances and Interviews.

    The topic should now look like this.

    Note We're attempting to create fourth-level headings here, but in this topic we've only created third-level headings. However, when you look at the "outline TOC," you will see that this topic is placed under another one and is indented.

    Not only that, but on the Advanced tab of our PDF target, we have enabled Use TOC depth for heading levels. This means that when the PDF is generated, Flare will turn these h3 headings into h4 headings automatically due to their depth placement in the outline TOC.

  8. Click to save your work.

How to Review the End Results

  1. Build the PDF target and view the output.
  2. Scroll down and notice the autonumbering on all of the headings. When you get to the page about Austin City Limits, you will see the autonumbering all the way to the fourth level.

Ta-Da!

Congratulations! You've reached the end of this tutorial. Be sure to check out others. See Tutorials.