Not only does this mean your contents page will update automatically, but it also means that you can apply custom formatting, and then use that for contents pages in other documents.
Here’s how to create a table of contents in InDesign.
Preparing Your Document for a Table of Contents
We’re going to be building a table of contents for Alice’s Adventures in Wonderland, a text file downloaded from Project Gutenberg. For the sake of simplicity, we’ve copied and pasted the entirety of the text into one document.
However, it’s possible to have different chapters in separate InDesign documents, and then collate them into one book file. InDesign can create tables of contents from not just one document, but all documents in a book file.
To begin, create a Master Page spread. Ours has page numbers on every page, the book title on left-hand pages, and a section marker on the right-hand pages. With all the text added and without any formatting applied, there are 102 pages, including the cover.
InDesign builds tables of contents using paragraph styles that you define. That means everything you want to be pulled through to your contents page must have a paragraph style applied to it.
Our document has chapter numbers and chapter titles, so we’ve applied a style to each. Chapter numbers use our Chapter paragraph style, while our Chapter Title style applies to the names of the chapters in the book. We went through the document and applied these styles where needed.
Our table of contents page will go on page three of our document. Page one is the cover, and page two is blank.
Getting Started with Tables of Contents in InDesign
With all our paragraph styles applied throughout our document, we can get on with building our contents page.
From the top menu, select Layout > Table of Contents. This opens the Table of Contents panel.
You can give your table of contents a title or use the default “Contents” title. Alternatively, you can also leave it blank if you don’t want to include a title as part of your table of contents.
From here, define a style for the title, which will change its formatting. We’ve used our Chapter Title style, but you can create a whole new paragraph style for this if you want.
Under the Styles in Table of Contents section, there are two columns: Include Paragraph Styles and Other Styles. From the Other Styles column, add the Chapter and Chapter Title styles we defined earlier. You can either click on them and then use the Add button, or you can click and drag them over.
This puts the two styles in a hierarchy, which InDesign will use to generate your table of contents. You can also drag and drop to rearrange this hierarchy, or you can use the Level buttons further down in the panel.
When you’re done, click OK. Drop the contents table where you want it to go.
Formatting Your InDesign Table of Contents
As you can see, the table still doesn’t look quite right. InDesign has pulled in the formatting from the paragraph styles, not just the content that uses them. Let’s fix that.
Go back into Layout > Table of Contents. Click on Chapter, and under Style: Chapter, you’ll see the Entry Style dropdown menu is set to Same Style.
Change this to a different paragraph style—either one that you’ve already defined or a new one. We’ve chosen [Basic Paragraph], a default paragraph style that every InDesign document includes. Do the same with Chapter Title and click OK.
Our table of contents’ text is now using the [Basic Paragraph] style formatting.
But we also have duplicate page numbers. There are numbers after each chapter number and each chapter name. With a few clicks, we can change this.
Go back into the Table of Contents panel and click More Options. From the expanded panel, under Include Paragraph Styles, click on the Chapter paragraph style.
Under Style: Chapter, use the dropdown next to Page Number and change it to No Page Number. Click OK. The page numbers will no longer appear next to the chapter numbers.
Next, let’s add some line breaks to make our table of contents more readable. Although you can do this manually, it’s better to create a paragraph style for this purpose.
In the Table of Contents panel, click on the Chapter style under Include Paragraph Styles. Then, under Style: Chapter, change the Entry Style to New Paragraph Style.
This opens the New Paragraph Style panel. In the General section, we’ll name the new style “Chapter with space above,” since that’s what it’s going to do. We’ll also choose [Basic paragraph] from the Based On dropdown menu.
Still in the New Paragraph Style panel, select Basic Character Formats from the left-hand side. Set the Leading to 25 and click OK.
There is now a space above all the chapter numbers.
You can add whatever formatting you want to your style. So, for example, you might want to put your page numbers in bold or a different font. Experiment to get different results.
Adding Spaces and Tab Leaders to Contents Pages
At the moment, our page numbers are separated from our chapter titles with a tab space, added automatically by the Table of Contents panel. You may have already noticed you can change this. Let’s do that now.
Click on the Chapter Title style under Include Paragraph Styles. Under Style: Chapter Title, click on the arrow next to Between Entry and Number.
Here, you can define a variety of spaces and formatting options. You can also enter combinations. For example, you could add a space, three tabs, then an em dash. Or you can simply type in whatever characters or spaces you want to be inserted.
To demonstrate, type in a series of period points. This will add exactly the amount of periods you define.
This isn’t quite what we’re after, though. What we want is for InDesign to align all the page numbers on the right, and to automatically fill in as many dots as needed. This isn’t an option in the Table of Contents panel, which means it requires a new paragraph style.
To get the effect we want, we need to create a paragraph style for our Chapter Title entries in our table of contents. Using the same process as before, create a new paragraph style called “Chapter title with dots,” again basing it on the [Basic Paragraph] style.
This time, though, go to the Tabs section of the New Paragraph Style panel. Click the right-hand tab arrow, which is the third from the left. Where it says Leader, add a period point. Use the ruler to place the tab marker and click OK.
You’ll be left with right-aligned page numbers, and the space preceding them is automatically filled with dots. You can, of course, use any symbol you like instead of periods.
Reusing Your Table of Contents Styles
Using the various techniques here, you can create a contents page that looks exactly how you want. We’ve only touched on the essentials, but you can also do things like sorting entries alphabetically and including content on hidden layers.
Whatever you do when you build a table of contents, you may want to import your work into other contents pages.
If you want to use the same styling in other tables of contents in other documents, click Save Style in the Table of Contents panel. Your work here will then be accessible from Layout > Table of Contents Styles.
Master the Table of Contents in InDesign
If you work on a lot of documents that use the same structure and styling, getting a grasp on creating a table of contents will save you a significant amount of time and effort. And it will enable your reader to more easily find what they’re looking for.