Tables of contents are to be found in many documents and act as a roadmap enabling the user to quickly find a particular section of the document. The ability to create tables of contents automatically is a useful facility found in most word processing and desktop publishing (DTP) programs. The mechanism used by most programs for generating the table of contents is what we might call style-tracking; one or more styles are designated as being associated with the table of contents. When the table of contents is created, all text in the designated style(s) is added to the list of items, usually with the appropriate page number next to it. In this article, we will look at how this feature is implemented in Adobe InDesign.
InDesign has three commands associated with the creation of TOCs, all of which are found under the Layout menu: Table of Contents Styles, Table of Contents and Update Table of Contents. The Table of Contents Styles command is used to specify the settings and attributes of the TOC. When you choose this command, you are given the choice of either editing the built-in, default TOC or creating a new one. As this choice implies, the TOC facility can be used to create a list of any items occurring within the document, as long as the text associated with the items uses styles.
The first table of contents setting is the title which will appear at the top of the list of items, along with the style in which you would like the title to appear. Next, you need to specify which styles you would like to include in your table of contents. All of the styles contained in the document are shown in a list on the right. Simply double-click on each of the styles you wish to include in order of priority. Finally, you need to specify the attributes of each of the styles which are to be included in the table of contents. The key attributes are the level, the style to be used to list items at that level and the position (or omission) of the page number.
Once the table of contents style definition is complete, you are ready to generate the table of contents itself. To do this, simply choose Table of Contents from the Layout menu, choose the name of the table of contents you wish to create and click OK. The cursor changes to the loaded text icon; at which point you click to place your text. If you redefine the attributes of your TOC at any time, just use the Layout – Update Table of Contents to bring your listing up to date.
