Creating a TOC

You can create a table of contents (TOC) by adding books and links to topics, movies, external files, other TOCs, browse sequences, or other Help systems in any kind of structure you want.

You can easily create a TOC manually, adding books, as well as links to topics, other TOCs, and external files, in any kind of structure you want. Another option is to create a TOC automatically. This method is based on the heading levels in your topics (h1 through h6). When you create TOC automatically, you will use some of the same steps that you used when creating a TOC manually; you still add topic entries to a TOC manually. The difference is that the automatic method lets you automatically create sub-entries in a TOC for the subheadings in your topics.

Which method should you choose (a manual TOC or an automatic TOC)? There are advantages to both methods. Plus, you can use both methods if you want. You can start by using the automatic method and then supplementing the TOC manually.

The advantage of creating a TOC manually is that you have more flexibility in the way to structure a TOC. In addition, you can include more than just topics and books when creating a TOC manually. For example, you can include links to other TOCs.

The advantage of automatic method is that it can be faster.

How to Create a Table of Contents Manually

  1. In the Project Organizer, right-click the TOCs folder, select Add Table of Contents, give it a name, and click Add.

    Note When creating a new project, Flare sometimes provides you with an initial TOC, depending on the project template you use; therefore, you may not need to add one.

  2. If you have an existing TOC file, double-click it to open it in the editor to the right.
  3. Drag and drop topics from the Content Explorer to the TOC Editor, or use buttons in the local toolbar of the TOC Editor to add TOC entries and link them to files.

    Tip If you want to choose multiple files at the same time from the Content Explorer, click the Show Files button Click to show or hide files within a folder. in the local toolbar. The Content Explorer splits into two halves. On the right half of the Content Explorer, find and select the folder and topic files that you want to include in the TOC. You can hold the SHIFT key to select a range, or you can hold the CTRL key to select individual items.

    Note Make sure you do not select the Resources folder in the Content Explorer, which holds your ancillary content files (e.g., images, stylesheets). If you do, that folder and its contents will also be included in the TOC.

  4. Click Save the active file. to save your work.

Creating a TOC for Print Output…

If the animation below is cut off, you can see the complete animation by clicking the link under it to open the full topic.

How to Create a Table of Contents Automatically

  1. Make sure your topics include headings with the h1, h2, h3, h4, h5, or h6 styles.
  2. Create at least part of a TOC manually.
  3. Double-click a TOC entry for which you want to auto-create sub-entries. The Properties dialog opens.
  4. Select the Auto-generate tab.
  5. Select the check box Compute sub-entries from linked file.
  6. In the Action field, select either Insert Computed Entries or Replace with Computed Entries. "Insert Computed Entries" will add the TOC sub-entries below the one you selected. "Replace with Computed Entries" will remove the TOC entry that you selected, replacing it with the sub-entries based on the h1 through h6 styles in the topic.
  7. In the Depth field, click the down arrow and select a number from the list to specify how many levels of headings you want to include in the auto-generation.

    Example If you select 3, Flare will create TOC sub-entries for all h1, h2, and h3 headings in the topic.

  8. Click OK.
  9. Click Save the active file. to save your work.

Blue Text = Links to System Variables

Blue Text = Links to System Variables

When you drag a topic into a TOC to create a link to it—or if you click Create a new topic and link to it. to create a new topic at the same time that you add a new TOC entry—you’ll notice that the text is blue.

The TOC Editor with topics that contain links, that displays as blue text.

This doesn’t mean that the text will show up as blue in the output. Instead, what it means is that the TOC entry contains a system variable (see System Variables). This variable is called “LinkedTitle.”

It means that the TOC entry text is tied to the title for that topic. The title can be changed in the properties dialog for the topic.

Topic properties showing the topic title tied to the TOC or browse sequence entry text.

It can also be changed in the markup.

The topic title displayed in the HTML markup.

If the title for the topic changes, the TOC entry will automatically change too so that you don’t have to remember to do it manually.

If your topic doesn’t have a title (and it doesn’t have to), Flare will then use the first heading it finds in the topic instead.

The TOC Editor showing the first heading from the topic.

And if it doesn’t find a heading, it will use the file name for the topic.

The TOC Editor displaying the file name when no header is in the topic.

You can keep the TOC entry associated with the LinkedTitle variable. But you also have the option of forcing it to use something else instead.

In the Properties dialog for the entry, you can click Add a variable definition. next to the Label field to open the Variables dialog. You can choose the LinkedHeader variable if you want the TOC entry to always use the heading instead of the title.

The Properties dialog using the LinkedHeader variable, rather than using a title entry.

You also have the option of choosing the LinkedFile variable if you want to force it to use the file name.

The Properties dialog using a LinkedFile variable for an entry.

And finally, you might decide not to use a variable at all and simply type text manually for the label, in which case the text will be black in the TOC Editor.

The TOC Editor displaying manually added labels that show as black text.

What’s Noteworthy?

Note You can stitch existing PDFs into your output by adding links to them in a table of contents (TOC). This is supported in PDF output and all of the online targets. See Stitching PDFs.

Note You can add even more TOCs to your project, building them in conjunction with the primary TOC. This might be a good option if you have an especially large project or if you are working with other authors on the same project.

Note When you create a TOC intended for Eclipse output, you should make sure all items are linked. Unlinked items may not display in the output.

Note For print-based outputs, you can also use an option to auto-generate TOCs for the output. See Auto-Generating TOCs for Print.

What’s Next?

After you create a TOC, you can edit various properties for the individual entries within it. See Editing TOCs.

You also need to enable TOCs in the skin you want to use for the target. This applies to all types of skins, except for HTML5 Side and Top Navigation skins. See Enabling TOCs in Skins.