Adding a Table of Contents
With a little advance planning as you design your word-processing document, Pages can automatically generate a table of contents for you with one click. The secret is to format all your headings and subheadings using styles. In fact, that’s the only way to do it—to let Pages build a table of contents, you have to consistently use styles to identify the headings in your document. If you’re not yet converted to the church of styles, it’s high time to become a believer: See page 93.
Note
You can’t include a table of contents in a page-layout document. The feature is available only for word-processing documents.
Before adding a table of contents to your book, for example, make sure you’ve applied paragraph styles to your chapter titles, headings, and subheadings throughout the manuscript. You might use the Title, Heading 1, and Heading 2 styles that come with Pages’ Blank templates, for example, or you could use your own custom styles—perhaps Chapter Title, Section, and Subsection. It doesn’t matter what styles you use, as long as you’re consistent in the way you use them.
With your heading styles to guide the way, Pages can now rocket through the document, noting those headings and their page numbers, and assembling them all into a tidy list. Here’s how to set it up:
Open the Document Inspector and click the TOC tab.
Pages displays a list of every paragraph style used in the document (Figure 5-25).
Turn on the checkbox to the left of each style you want to include ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access