Generate a table of contents or list

Before you generate a table of contents or other paragraph list, do the following to avoid problems in generated lists:

  • Make sure that tags and elements are applied correctly and consistently. For example, use Heading1 for all first-level headings only.

  • Make each item you want to include in the list a single paragraph. For example, you won’t get the desired results if a heading is two lines, with each line in a separate paragraph.

  • Validate structured documents to make sure that they do not have structure errors.

Note: You usually generate a list of references—such as a list of fonts or unresolved cross-references—for your own use while working with a document. You do not need to prepare the document before generating such a list.

Generate a table of contents or list for a book

  1. Open the book window and select the file below where you want the generated file to appear.

  2. Do one of the following:

    • Choose Add > Table of Contents.

    • Choose Add > List of, and then choose a type of list from the menu.

    The items you see in the dialog box depend on the type of list you’re generating.

  3. In the Add File pop-up menu, specify whether the generated list will appear before or after the current document.

  4. Enter a suffix or keep the default one. The suffix indicates the type of generated file. For example, TOC is the usual suffix for a table of contents.

    Note: The suffix is not the same as the filename’s extension. The suffix is used with paragraph tags in the generated lists, and appears as part of the generated file’s filename, such as UserGuideTOC.fm.
  5. Move items to the Include scroll list. To move an item between scroll lists, select the item and click an arrow, or double-click the item. To move all items from one scroll list to the other, Shift‑click an arrow.

  6. To have each entry in the generated list be linked to its source, select Create Hypertext Links. These links let you jump to the source of an entry by clicking the entry.

  7. Click Add, and then click Update. FrameMaker generates the list. You can view the generated list by double-clicking its name in the book window.

  8. Save the generated list in the same folder as the source document or book. If you want to rename the generated file, use the book window to do so—FrameMaker will rename it on the disk and update all references.

    The first time you generate a list (if you don’t use a template), the list uses the page layout (master pages) of the first non-generated document in the book, and all entries look the same.

    If the list already exists in the source document’s folder when you save it, save it in the same folder and don’t change the filename. That way, the list’s formatting is used when you generate the list again. Otherwise, formatting changes won’t be retained when you update the list.

    To use a template or an existing generated file in a new book file, add it to the book as a generated file. Then put the existing file in the folder that contains the book file, using the name that appears in the book window.
  9. Save any open files in the book. Open files are updated only in your computer’s memory and not on the disk. If a file isn’t open, the changes are made on the disk.

Generate a table of contents or list for a single document

  1. Do one of the following:

    • Choose Special > Table of Contents.

    • Choose Special > List of, and then choose a type of list from the menu.

  2. When prompted, specify whether you want to create the generated file as a stand-alone document or add it to a book.

    If you choose Yes to create a standalone document, FrameMaker will create a generated list in the original document’s folder. If you choose No, FrameMaker adds the generated file to an open book, or creates a new book if necessary.

  3. Enter a suffix or keep the default one. The suffix indicates the type of generated file. For example, TOC is the usual suffix for a table of contents.

    Note: The suffix is not the same as the filename’s extension. The suffix is used with paragraph tags in the generated lists, and appears as part of the generated file’s filename, such as Chapter1TOC.fm.
  4. Move paragraph tags, marker types, or reference types to the Include scroll list. To move an item between scroll lists, select the item and click an arrow, or double-click the item. To move all items from one scroll list to the other, Shift‑click an arrow.

  5. To have each entry in the generated list be linked to its source, select Create Hypertext Links. These links let you jump to the source of an entry by clicking the entry.

  6. Do one of the following:

    • If you are creating a stand-alone list, click Set. FrameMaker generates and displays the list.

    • If you are adding the list to a book, click Add, and then click Update. If a new book is created, choose File > Save Book As, and then save the book.

  7. Save the generated list in the same folder as the source document or book.

    The first time you generate a list (if you don’t use a template), the list uses the page layout (master pages) of the source document or of the first nongenerated document in the book, and all entries look the same. For information on changing the format of a list—changes that won’t be lost when you regenerate the list.

  8. Save the list in the same folder as the source document or book.

Generating TOCs and other lists in structured documents

Although the steps for generating TOCs and lists in structured documents are the same as for unstructured documents, consider the following additional points:

  • A generated list is initially unstructured, but you can add structure to it. If a generated list is structured, you’ll lose the structure every time you regenerate it. Do not add structure to a list until it is in its final version.

  • The items in the scroll lists vary depending on the type of list you’re gathering. For example, the element and paragraph tags in the source document appear for a table of contents. (Paragraph tags appear after element tags and are preceded by a paragraph symbol .) For a list of references, the available reference types appear.

  • Some element tags may have context labels that provide information about the element’s location in the structure. For example, if Section elements can be nested within other Section elements, context labels might identify whether the elements are first-, second-, or third-level sections.

Context labels
  • If an element uses context labels, a <no label> entry also appears in the scroll list for occurrences not described by the labels. In the example above, Section(<no label>) represents Section elements that are at a fourth level or lower in the document.

  • If an element has more than one paragraph, only text from the first paragraph will appear in the generated list. For example, the first paragraph within a Section element—usually its Head—will appear.

  • The first time you generate a list (if you don’t use a template), it uses the page layout (master pages) of the first non-generated document in the book, and all entries look the same. The list also has element definitions from the source document.

Add a title or other static text to lists and indexes

If you want to add a title or other unchanging text in your list or index, add it after you generate the list or index the first time.

You can also add static text to a template and then use the template to format a list or index.

  1. Type the title before the first entry on a body page.

  2. Use the Paragraph Catalog to give the text a special paragraph format for static text; or create a new paragraph format for the title.

  3. If you create a new paragraph tag, make sure it does not end with the suffix assigned when you created the generated file, such as IX for a standard index or TOC for a table of contents. When you generate the index again, FrameMaker replaces only the paragraphs that have tags ending with the suffix.