Automatically Generate a Table of Contents

Hederis can automatically generate a Table of Contents for you, and insert it into your print file in any location you choose. Additionally, you can specify not to include certain chapters or sections in your generated Table of Contents, and specify how many levels deep you want the Table of Contents to go (for example, you can include only chapter-level headings, or include nested subsections to any level). Here’s how:


EPUB files will always include an auto-generated Table of Contents. You can use the same processing instruction option (see step 5 below) to exclude a section from the EPUB Table of Contents.

  1. In your Word manuscript, insert a paragraph in the exact location that you’d like your Table of Contents to appear. This paragraph can use any style, and contain any text, which will be deleted when your generated Table of Contents is inserted.

  2. Insert another paragraph below this placeholder paragraph, and style it with the HED Processing instruction style.

  3. Inside this processing instruction paragraph, type the following text: ATTRS=data-auto-toc: true; data-toc-level: 2.

  4. Set the level number to the depth of subsections that you’d like to include. For example, data-toc-level: 1 would only include chapter-level headings; data-toc-level:2 would also include the first level of subsections within any chapters; data-toc-level: 3 would include a further level of nested subsections within the first level of subsections; and so on.

  5. To exclude a chapter or section from being listed in your Table of Contents, go to the section divider paragraph for the section that you want to exclude and insert a HED Processing instruction paragraph below the section divider paragraph.

    If you already have a HED Processing instruction paragraph in that location, then there’s no need to insert another one—simply type a + after your existing processing instruction text, and then proceed to the next step.

  6. Type the following text in your processing instruction paragraph: ATTRS=data-toc-display: none.

    Here we have two examples of sections to be excluded from a Table of Contents. The first section also uses a processing instruction to suppress it from the print version of the book.

The next time you upload and build your PDF, a Table of Contents will automatically be created and inserted in the text. If you’d like your Table of Contents to appear in its own section, precede it with a HED SECT TOC paragraph, like this:

For even finer control over your Table of Contents (e.g., to customize all the text that appears in each Table of Contents item), you can insert a Table of Contents manually. See “Set up a Table of Contents Manually” for instructions.

Using Footnotes
Set up a Table of Contents Manually
Getting Started
Step-by-Step Guide
File Management, Uploads, and Downloads
Working with Book Text
Validation and Preflight
Groups and Billing
How Do I…