InDesign supports an unlimited number of tables of contents. Thus, you can create the standard document TOC like the one at the front of this book, but you can also create per-chapter tables of contents, lists of figures or tables, alphabetized lists of topics, and just about anything else you can imagine (and manage with paragraph styles).
Begin creating the table of contents by choosing Layout > Table of Contents, which opens the Table of Contents dialog (see Figure A). Click the More Options button to reveal the full depth of the dialog.
TOC Style. All of the options incorporated into the Table of Contents dialog may be saved as a preset called a TOC style. After setting the options, click the Save Style button on the right and give the style a name. TOC styles can also be created and edited from Layout > Table of Contents Styles. If a style has been pre-created, it will appear in the TOC Style list; choose it, and all the below options will fill in with their style-defined values.
Title. When the TOC is generated and placed, it will have a title as the first line of the story. By default, the title will be Contents, but it can be anything you like. Leaving the Title field blank removes the title from the generated TOC entirely, without leaving a blank carriage return where it would have been.
Style. The paragraph style for formatting the TOC title.
Styles in Table of Contents. This is the root of creating a TOC. On the right, in the Other Styles list, are all the paragraph styles defined in the document. Click a style on the right to highlight it, and then use the Add button to move it to the left, the Include Paragraph Styles list. You can also double-click an entry in either column to move it to the other. Each style included on the left will cause all text assigned to that style to be listed in the resulting
TOC; styles not in the list will not have their dependent text referenced by the TOC. The order of styles in the Include list establishes the TOC hierarchy. In other words, the first listed style is the most important, highest level of the generated TOC, with the next appearing below it, the next below that, and so on. If you insert styles in the wrong order, drag them up or down in the list just as you reorder styles in the Paragraph or Character styles panels. But you must also change their Level value in the Style section below. Figure B shows an example of the Include Paragraph Styles list and the TOC it would generate.
Click to highlight a style in the Include Paragraph Styles to set its options below in the Style section. Each included style may have its own entry style, page number options, and so on.
Entry Style. When the TOC is generated, the text for each entry level can have its own paragraph style. Unlike index styles, InDesign will not automatically created level-based paragraph styles. You’ll need to pre-create your TOC styles and then select them from the list for each Include Paragraph Style option. Alternatively, leave the default of [Same Style] to include the same style in the TOC as on the document pages.
Page Number. Choose whether to place the page number before or after the entry text or to omit the page number entirely. With the Style field to the right, the page number can be given its own character style for customized formatting.
Between Entry and Number. The separator character or characters to appear between the entry text and its number (or number and text, if the page number is placed before the text). The pop-up menu to the right offers many symbols, markers, and special characters. To create a leader dot separator, specify a tab (^t) in the field and then modify the paragraph style (outside of the Table of Contents dialog) to include a leader dot separator at that tab stop. The dropdown menu at the right allows assigning a character style to the separator itself, enabling any unique styling to be applied to just the separator.
Sort Entries in Alphabetical Order. By default, and in most cases, TOC entries are sorted in order of appearance in the document. However, especially when creating documents for electronic distribution as PDFs, this option opens numerous other possible uses for the Table of Contents feature beyond creating a standard TOC. When InDesign generates a TOC, it creates hyperlinks connecting the TOC entries to the text they reference. Exporting to PDF preserves these hyperlinks, enabling a reader of such a PDF to click on the TOC entry and jump to the content. Thus, the option to sort entries alphabetically rather than logically opens the possibilities of creating vastly different lists such as lists of product names, personnel referenced in the document, or even a replacement for a standard index—without having to manually create index entries. The only significant limitation to using the Table of Contents functions in place of index and other features is that InDesign’s Table of Contents is dependent upon paragraph styles; it cannot create an entry from a character style or a specific word in the middle of a paragraph.
Level. In a hierarchal TOC such as the one at the front of this book, entries from each successive style are considered inferior to their predecessors—Heading
1, for instance is superior to Heading.
2, which is superior to Heading.
3. The Level field defines that hierarchy. As each style is moved from the Other Styles list to the Include Paragraph Styles list, InDesign automatically assigns a successive level. If you have reordered the include list by dragging and dropping, you will also need to change the level for each affected style.
Often successive TOC entries are indented as visual cues to the hierarchy. The Include list mimics the hierarchy by indenting styles in the list, giving you a visual representation of how the generated TOC may look. The Level field is nonexclusive, meaning that you are not required to have only a single level 1 or level 2 entry. If you have two or more equally important styles, they can all be set to the same level.
Create PDF Bookmarks. Similar to the way each entry on the page itself will be hyperlinked to its content, InDesign can automatically generate PDF bookmarks, which are hidden until PDF export time. Adding these, and choosing to include bookmarks when exporting to PDF, creates something —a Bookmarks panel sidebar TOC-style list of topics that, when clicked in Acrobat or Adobe Reader, become hot links and jump the reader to the referenced content.
Replace Existing Table of Contents. If you have previously generated and placed a TOC, this option will replace (not update) it. When using the Table of Contents to build separate styles of tables, you want this option unchecked.
Include Book Documents. When generating a TOC for documents managed through an InDesign Book file, check this option to generate a single TOC that points to all instances of the included paragraph styles in all documents within the book.
Run-In By default, all TOC entries are given their own line, with a carriage return at the end. An alternate style is to use the run-in method that, like the same option within an index, only separated by top-level styles. All entries lower in the hierarchy than the top will be placed together in a paragraph (see Figure C).
Include Text on Hidden Layers Choose whether to include in the TOC text on hidden layers.
Numbered Paragraphs New to CS3, this option tells InDesign how to handle paragraphs that have been numbered through the List and Numbering functions. Note that InDesign does not recognize numbers that have been converted to standard text and will include them in the TOC regardless of this setting. The options are as follows:
Include Full Paragraph lists the text in the TOC exactly as it appears on the page, with all text automatic numbering intact. For example, you choose table 9 (if you have in the document) in a chapter whose number is defined within the paragraph Numbering options to include the prefix Table 9 and whose table caption is XYZ or ABC Products will list in both the main story and the TOC as Table 9. XYZ or ABC Products.
Include Numbers Only. ignores the text in the paragraph and includes only the automatic number and any prefixes. For example, to include a TOC entry for Table 9.9 without the table’s caption, choose Include Numbers Only.
Exclude Numbers. includes in the TOC the text of the paragraph but not the automatic number. The TOC output using the above example would therefore be simply KDY Capital- Class Products.
Click OK to return to the document with a loaded cursor ready to place the TOC story, which may be placed and flowed like any story. If any stories in the document contain overset text assigned to the included styles, you will be prompted after clicking OK whether to include those instances in the TOC.
Unlike an index, tables of contents don’t have their own panel. Also unlike an index, you needn’t go through the entire generate process to update a TOC. Instead, select a text frame holding the TOC style, and choose Layout > Update Table of Contents. Shortly, an alert dialog will inform you that the table of contents has been updated successfully. When creating a comprehensive TOC for book documents, it’s often better to place the TOC into its own self-contained document and to add that document to the Book panel.