Tables of Contents (TOCs)

Manually building a table of contents for a large document is one of the punishments awaiting those who fail to use paragraph styles for headers and subheaders. InDesign’s ability to scour long documents (including Book documents composed of many individual files) to automatically create a table of contents is one of the great rewards for using paragraph styles.

Preparation

Consider this document: each chapter header has a paragraph style called Chapter title applied to it. Major topics (like the one at the top of this page) have their own style, as do the headers under them (like “Preparation” just above). In some cases there are more granular headers used, too. In this book’s table of contents, I chose to include the first three heading levels as its entries.

I strongly recommend making a mock-up table of contents with its own paragraph styles to decorate the entries that will be generated from text using the styles you’ll target in the document. In my case, I made styles with names like TOC chap header, TOC topic header, and TOC header. I wanted names that clearly showed that these would be used only in my table of contents (TOC). When InDesign is configured to look for text that uses certain styles, you are offered the option of using the same styles to decorate the TOC entries. This is rarely what we want. So it’s best to have other options at the ready.

You’ll also need a paragraph style for the TOC’s title (usually the word “Contents,” but that’s up to you). And you’ll be offered the chance to choose a character style for the page numbers that appear in the generated entries. In the case of this book, I made a character style that gives a consistent size and weight to the page numbers, no matter what the rest of the entry is like.

InDesign does offer to create styles for you. You’ll see them in the list of styles where you also find your own, and they’ll become real if you choose them. But they’re very generic and you’ll have to redefine them anyway.

Creating the TOC

Once you’re sure that styles have been applied to all the paragraphs with text that is to become TOC entries, and you have built styles for the TOC itself, you’ll need to go to the page(s) where the TOC will be. When you’ve configured and committed the Table of Contents dialog box, the cursor will become a loaded text gun. You can either create a text frame then or flow the TOC into an awaiting frame. Since I often have a master page with a primary text frame governing my tables of contents pages, I use the latter option.

There is a lot to configure in the Table of Contents dialog box, so I use my dummy TOC to guide me. To gain access to all of the available options, click the button labeled More Options, if you see it. On the other hand, if the button says Fewer Options, don’t click it. Near the bottom of the dialog, check Include Book Documents if you need to trawl for styles in all the documents of a Book document.

Now you can work from near the top of the dialog down. In the Title field, enter the text that should appear at the top of the TOC, and choose the Style for it just to the right. In the example here, I’m building the TOC for a magazine, so I chose “Articles” as my TOC’s title.

The two sections that follow are used in tandem. The Styles in Table of Contents section is where we choose the styles whose text is to become entries in the table of contents. Double-clicking on a style listed in the Other Styles box on the right adds it to the Include Paragraph Styles list on the left. Simple TOCs, like those for a novel in which we want only the chapter headers noted, may have only one style chosen. For this magazine, I’ll be choosing three: the titles of the articles, the bylines, and a brief synopsis. The first will be a Level 1 entry, which is assigned in the next section of the dialog, Style. The other two will be Level 2, since they’re both subordinate to the title, but not to each other.

In the Style section, you also choose how to style the entries generated from the style currently highlighted in the Include Paragraph Styles section above. For entries pulled from the style called Title (which decorates the article titles), I’m using a style called TOC Article Title. As in my mock-up, I chose to have the page number Before Entry with a tab (^t) Between Entry and Number. For the Level 2 entries, I chose No Page Number since they’re already next to the main entry.

There are times when we need a TOC entry to help a reader find a specific page, but we’d prefer to not have the text appear on that page. There are three common ways to do this:

  1. Put the text on a hidden layer, then check the box Include Text on Hidden Layers in the Options section of the Table of Contents dialog;
  2. Set the frame that holds the text to be Nonprinting using the Attributes panel; or
  3. Place the text frame on the Pasteboard mostly off the page, barely overlapping it.

I prefer method 2 because I can see the text when I zip through my pages in InDesign, but it disappears in Preview mode and won’t output. I may forget the text exists if it’s on a hidden layer or if I’m zoomed too close to see the text that is mostly offstage.

When I’m very on top of things, I may create an object style that gives the frame a garish fill or stroke and makes it nonprinting. This way, I can recognize them when I see them, but no one else will see the garishness.

Updating a Table of Contents

What if any of the text changes? Tables of Contents don’t update automatically. However, it’s easy to prompt them. Insert the Type tool cursor anywhere in the TOC. Then choose Layout > Update Table of Contents.

TOC Styles

You will likely generate a table of contents a few times before it’s right, especially if it has several levels of entries. Sometimes you’ll choose the wrong style to look for or to apply to the entry. When you finally dial it in, and you suspect you may need to use those settings again (the next issue of the magazine, for example), you can create a Table of Contents Style. I very much wish they called it a “preset” as the word “style” is used so much here.

When you’re in the TOC dialog, and all the settings are correct, click the Save Style… button and give this preset a name. TOC Styles are among the things that get synchronized in a Book file.

They’re also used to generate the electronic TOC in an eBook (like those read on an iPad or Kindle). You may generate an attractive TOC from that TOC Style as well, but for those media it’s truly optional. However, the TOC Style is not; it’s the way we describe the hierarchy in an eBook’s code.

We will discuss eBooks in the “Output” chapter of this book—see “ePub and Tagged File Formats” (page 347)—but you might consider creating a TOC Style that excludes page numbers just for that medium. In a reflowable ePub, a reader can change the font or font size of the text, which makes the whole concept of a page rather fluid. TOC entries become hyperlinks that will take the reader to the correct page, so knowing the number of a page becomes irrelevant.

To load TOC Styles from a different document (a previous project, perhaps), choose Layout > Table of Contents Styles… where you can click a Load button. You can also create new or edit existing TOC Styles, but it’s done a bit blindly, as this approach doesn’t generate a TOC afterward.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset