The longer a document grows, the harder it is to find specific topics of interest. And when a document becomes a book, you must give the reader tools to find the information they need. Fortunately, Microsoft Word 2002 makes it easy for you to include two of the most commonly employed tools — a table of contents for the front of the book and an index for the end. This article will show you how to use both of the features.
Table of Contents
In its most standard form, a table of contents is a page near the front of a book with a list of chapter names and the page numbers where they start. Sometimes you may also see subchapter or sub-subchapters included within each chapter. (Depending on the type of publication, you may want to refer to the parts as sections and subsections, etc.) Book publishers may manually create a table of contents page after the rest of the book is printed. Word processing users can create the table of contents page as they are working on the document, and have page numbers and chapter names modified as they edit the rest of the pages. Figure 1 illustrates a sample table of contents from a fictitious book.
Figure 1: An example of a table of contents
The most important part of maintaining a table of contents in your document is to label your chapter names in a consistent manner. You can do this by using styles to format and identify your chapter names. If you are going to include subchapter or sub-subchapters in the TOC (a common abbreviation for the table of contents), you can format them using other styles. The normal Word template upon which new documents are created by default has three built-in heading styles —Heading 1, Heading 2, and Heading 3. There are two other ways to mark your chapters — using outline levels or table entries. This article will concentrate on marking your chapters with styles, however.
Figure 2 illustrates a document’s chapter and subchapter levels that have been formatted using the default Heading styles.
Figure 2: A portion of a document with chapter/subchapter names in Heading styles
Building the TOC
You can build the TOC before or after marking the chapter names with appropriate styles. Move your insertion point to where you want the TOC to begin, click the Insert, Reference menu, and select the Index and Tables. All of the options necessary to create the TOC appear when you click the Table of Contents tab, as shown in Figure 3.
Figure 3: The Index and Tables dialog box, Table of Contents tab
Two preview windows dominate the dialog box. The left window displays the formatting choices for the chapter names while the right window shows how the levels would appear if the document is published as a Web page over the Internet. As you make changes to the settings in this dialog box, you will see these changes reflected in the preview windows.
The Show page numbers check box is checked by default. As long as this option is on, the Right align page numbers check box is available. When this box is checked, the starting page numbers for each chapter or subsection appear on the right margin of the page. Otherwise, the page number displays immediately to the right of the chapter name. When page numbers are right aligned, you can choose the kind of tab leaders that draw the reader’s eye from the chapter name to the page number. The drop-down list of tab leaders uses dots (periods) by default, but you can choose dashes or underlines, or use no tab leaders at all.
The General section of the dialog box contains options to control the formatting and number of levels used by the TOC. There are six alternative styles to the plain formatting used by default by the Normal template. Select one of these styles from the drop-down list to give your TOC a more distinctive look. If your TOC should only list the chapter or section names, change the number of levels to 1. If you want to include subchapters or sub-subchapters, etc., increase the number of levels up to 9. (Remember that each level of subchapters should be formatting using its own heading style.)
The Options and Modify buttons let you set the heading styles to be used for each TOC level and let you change the formatting for each of the TOC levels, respectively.
The Show Outlining Toolbar button displays the toolbar at the top of the Word window. This toolbar can be used to quickly mark text when you are selecting the chapter and subchapter names, in addition or instead of marking the text with styles. The Outlining toolbar is illustrated in Figure 4.
Figure 4: The Outlining toolbar
The drop-down list, which reads Body text by default, lets you assign any level from 1 to 9 to a paragraph. The arrow all the way to the left sets the text as Heading 1; the next arrow “promotes” the paragraph to a higher level. Thus, if the name is set at Heading 3, the Promote arrow would make it Heading 2. The arrow to the right of the drop-down list “demotes” the paragraph; that is, makes it a lower level. The arrow all the way to the right makes the selected text Body text or not a heading at all.
Once you click OK in the dialog box, your TOC will be created. However, you may choose to add new chapter names, promote or demote subchapters, or rename chapters. Additionally, the page numbers to which the chapter names begin may change as you insert or delete text. The Update TOC button rebuilds your TOC to reflect any of these changes. When you click this button, you are given the option of changing the page numbers only or rebuilding the entire TOC. If you haven’t made any alterations to the set of chapter names, fixing the page numbers is much faster. If you’re not sure or ready for the final draft, rebuilding the TOC ensures its accuracy. The final button on the toolbar jumps you to the TOC page for quick viewing or updating.
Building an Index
While a table of contents lists the chapters and subchapters that appear in the text that follows, an index lists the topics and subtopics at the end of the book. The technique for creating an index is similar to that of the TOC — you must mark the text at the appropriate level and set the location and configuration of the index. Typically, the index appears at or near the back of the publication. Figure 5 shows the dialog box opened when you click Insert, Reference, Index and Tables, and select the Index tab.
Figure 5: The Index and Tables dialog box, Index tab
The Print Preview window shows an example of an index and the effect of the options and formats you select. As you can see in the preview window, the index consists of an alphabetical list of words or phrases representing topics and the numbers on which they appear. Subtopics appear within or beside the main topics.
Many of the options in the dialog box are similar to those under the TOC tab. Page numbers can be beside the topic or right aligned with or without tab leaders. The drop-down list of formats lets you select from six styles. If you choose the Indented option, your subtopics appear beneath the main topic; the Run-in button causes the subtopics to begin on the same line as the main topic. By default, the index is in two columns, but you can change this setting as well. If you want to change the format of the various levels of index styles, click the Modify button. The AutoMark button lets you open a file containing all of the topics and subtopics. When you create such a file (known as a concordance file), Word automatically scans the document, noting the pages on which the words or phrases appear and including them in the index. The Mark Entry button lets you select the topics and subtopics directly from the text in the document.
Marking entries is the most difficult part of making an index. Unlike marking chapter names, which appear in order throughout the document, index entries can appear on any page, in any order. You must go through the document very carefully looking for the topics and subtopics you want to index. Because of this, clicking the Mark Entry button opens a dialog box that lets you select options and mark text in the document without having to keep opening and closing the dialog box. The Mark Index Entry dialog box appears in Figure 6.
Figure 6: The Mark Index Entry dialog box
When you select text and click on the dialog box, the text appears in the Main entry text box. If the text is a subtopic, type it in the Subentry text box. (Use semicolons to create subtopics within subtopics.) If you want to have every occurrence of the topic included in the index, click the Mark All button. The Mark button will include only the selected text on the current page as an entry.
Sometimes entries do not have to have page references and subtopics of their own, as when they are synonyms of a topic. In such cases you can click the Cross-reference button and type in the similar topic after the word See in the text box. If a topic needs to reference a range of pages, you first have to select the range of text and insert a bookmark. Then you can name the bookmark in the Page range drop-down list. If you want the page number of an entry to be bold and/or italic (such as for an illustration or table), check the corresponding boxes.
Each marked entry is given an XE (Index Entry) field code. Although the codes are normally hidden, click the Show/Hide toolbar button to see them.
The Index tab of the Index and Tables dialog box builds the index when you set the options and click OK. Make sure you position your insertion point where you want the index pages to begin. Turn off the display of the hidden text by clicking the Show/Hide toolbar button so the document will be paginated correctly. Word builds the index by locating and alphabetizing the topics, noting the pages upon which they appear, and inserting the index using the formats and options you have selected. When you need to update the index, click to the left of the index and press F9.
Creating a table of contents and an index takes a bit of time. Not only must you choose the settings, but you must mark the entries carefully. While manually creating these reference tools may seem easy, updating would be tedious and would cause many inaccuracies. Take the time to set them up using the techniques you have learned here, and let Word do the updating with the click of a button.