Generating a table of contents
With InDesign, you can generate a fully formatted table of contents with accurate page numbers for a single document or all the documents in a book file. The table of contents consists of text that you can place anywhere—at the beginning of a document or in its own document within a book file. The feature works by copying text formatted with specific paragraph styles, compiling the text in order, and then reformatting the text with new paragraph styles. The veracity of the table of contents, therefore, depends on correctly applied paragraph styles.
In this exercise, you will generate a table of contents for the book.
Preparing to generate the table of contents
To generate a table of contents, you need to know what paragraph styles are applied to the text that will go in the table of contents. You also need to create paragraph styles to format the text in the table of contents. Now you will open a chapter to study its paragraph styles and open the table of contents chapter to see how it is formatted.
- In the Book panel, double-click 12_01_ID_HowTos_GettingStarted to open the chapter.
- Choose Type > Paragraph Styles to open the Paragraph Styles panel.
- On page 1 of the Getting Started chapter, click in the chapter title. In the Paragraph Styles panel, notice the Chapter Title paragraph style is applied.
- On page 2 of the chapter, click in the numbered section name. In the Paragraph Styles panel, notice the Head 1 paragraph style is applied.
- Close the Getting Started chapter; then double-click 12_00_ID_HowTos_TOC in the Book panel to open it.
- With the Paragraph Styles panel open, use the Type tool () to click in the three different types of formatting you see on the page:
- TOC Chapter Title is applied to the first-level heads, the chapter names.
- TOC Section Name is applied to the second-level heads, the numbered section names.
- Choose Edit > Select All. Then press Backspace or Delete to delete the table of contents.
- Choose File > Save.
You are going to generate your own table of contents in the next two exercises.
Setting up the table of contents
Now that you are familiar with all the paragraph styles that will be used to generate the table of contents, you will “map” them in the Table of Contents dialog box. In this exercise, you will specify the title, what paragraph styles to include, and how to format the final table of contents.
- Choose Layout > Table of Contents.
- In the Table Of Contents dialog box, type Contents in the Title box. This is the title that will appear above the table of contents.
- To specify how the title is formatted, choose Chapter Title from the Style menu.
- Under Styles In Table Of Contents, scroll through the Other Styles list box to locate Chapter Title. Select it and click Add.
- Repeat step 4 to locate and select Head 1. Click Add. Leave the dialog box open.
- On the left side of the Table of Contents dialog box in the Include Paragraph Styles list box, select Chapter Title. Under Style: Chapter Title, choose TOC Chapter Title from the Entry Style menu.
- In the Include Paragraph Styles list box, select Head 1. Under Style: Head 1, select TOC Section Name from the Entry Style menu.
- Select Include Book Documents to generate a table of contents for all the chapters in the book file.
- Click OK. This loads the pointer with the table of contents text.
Now that you have specified what text needs to go in the table of contents—text formatted with Chapter Title followed by Head 1—you will specify how it should look in the table of contents.
Flowing the table of contents
You flow the table of contents text the same way you flow other imported text. You can either click in an existing text frame or drag to create a new text frame.
- Click in the frame that held the sample table of contents. The table of contents flows into the text frame.
- Choose File > Save and close the document.
- From the Book panel menu, choose Save Book. This saves all changes made to the book file.