Explore tables of contents in Word

Applies to
Microsoft Office Word 2003
Microsoft Word 2002

What is a table of contents?

A table of contents, or TOC, is a list of topics in a document. Generally, it includes each topic's page number (in a document) or a link to the section that the topic is in (on the Web). You can use a TOC to give readers an overview of your topics or to help them find the starting page or section for your topics.

In Word, you have many different options for creating a TOC. You choose where to put the TOC in your document or Web page, what the content and formatting of each entry will be, and whether to include page numbers. For example, a teacher might want to include a table of contents in a class syllabus or training documents so that students have an outline of the class and know where to find a particular topic. Students may need to include a TOC in a research paper. Or, a class may have a Web site for sharing information and tracking homework assignments, and they may want to add a TOC to the home page to make finding things easier.

A TOC in a document is made up of a list of topics or headings, tab leader characters (solid, dotted, or dashed lines that fill the space used by the tab character), and page numbers. The last two items are optional. On a Web page, hyperlinks replace the page numbers.

Table of contents using standard format from template

Examples of tables of contents

Each table of contents entry has a style (TOC 1 through TOC 9) that determines the formatting of that entry, such as the indentation and font. Each TOC entry is also assigned a TOC level (1-9) that indicates the TOC style used for that entry. You can create your own style or use one of the built-in formats of TOC entry styles in Word. Here are a few examples of these built-in formats.

Table of contents using standard format from template Table of contents using Modern format Table of contents using Distinctive format Table of contents using Classic format
Table of contents using standard format from template Table of contents using Modern format Table of contents using Distinctive format Table of contents using Classic format

Creating a table of contents in Word requires two main steps. First, you need to mark the text in your document that you want to include in the table of contents. Marking means designating the text you want to appear as an entry in the TOC. This text is usually headings, titles, or subtitles that show the reader the order of the main points. Second, you must actually insert or update the table of contents.

Ways to mark text to include in a table of contents

When you insert or update a TOC, Word looks through the document for all the text you marked. It lists the marked text in order, determines the TOC level for the text, and determines the page number that each item is on. There are several ways of marking text that you want to include in the TOC. You can use Word's built-in heading styles (Heading 1, Heading 2, and so on), outline-level formatting, your own custom styles, TC fields, or a combination of these. Let's explore each of these options for marking text.

Built-in heading styles

A heading style is a combination of formatting options (like font type, size, and color) applied to a heading in your document. Word has nine different built-in heading styles, Heading 1 through Heading 9.

To see the style of your text, highlight some text in your document and then look at the Style box , located on the Formatting toolbar. If you use one of Word's nine built-in heading styles to format the headings you want to include in your TOC, you can choose the TOC level for each of the heading styles in the Table of Contents Options dialog box to include them in your TOC.

Outline-level formatting

An outline-level format is formatting that you can use to assign a hierarchical level (Level 1 through Level 9) to paragraphs in your document. This formatting is not visible; applying Level 1 outline-level formatting to a paragraph does not change the visible formatting (alignment, font color, and so on). Every paragraph in your document has an outline-level format applied, either body text (no outline level) or a level (Level 1, Level 2, and so on).

By selecting a heading that you want to include in your TOC and then selecting a level from the Outline Level box, you can apply outline levels to mark the heading to be included in your TOC without changing the appearance of your heading.

 Note   The built-in heading styles have corresponding outline-level formatting assigned. That is, the style Heading 1 has Level 1 outline-level formatting, Heading 2 has Level 2 outline-level formatting, and so on.

Custom heading styles

A custom heading style is simply one that you have created yourself. If you use your own custom heading styles to format the headings you want in your TOC, you can choose the TOC level for these heading styles in the Table of Contents Options dialog box to include them in your TOC.

TC fields

A TC field, or table entry field, is a special code designated by the letters TC within curly bracket characters, like this: {TC}. It instructs Word to insert the text within the code into a table of contents. To include text that occurs in the middle of a paragraph, you can insert a TC field that contains the text you want. (Although it's possible to mark a portion of a paragraph with a heading style, Microsoft Word includes this text in the TOC only if the marked text is at the beginning of the paragraph.)

You can also use a TC field to further customize your table of contents. For example, you can use TC fields to omit page numbers from part of the TOC by adding a switch (\) in the TC field for a given entry (see A note about using TC field switches).

To mark a table of contents entry with a TC field, select the text that you want to appear in the table of contents and then press ALT+SHIFT+O. This displays the Mark Table of Contents Entry dialog box.

Using the Mark Table of Contents Entry dialog box

1 TC field for TOC entry "Sit Amet." The TC field is formatted as hidden text.

The Mark Table of Contents Entry dialog box allows you to select the outline level that each TOC entry should have. (This level corresponds to the TOC style that the entry will be displayed with in the table of contents).

In this example, the user selected the text "Sit Amet" and then displayed the Mark Table of Contents Entry dialog box. The selected options show that the TC entry "Sit Amet" will appear in the TOC as a level 3 entry (formatted with the style TOC 3). The Mark button inserts the TC field in the document ({TC "Sit Amet" \f C \l "3"} in this example).

Since the code in the TC field is just instructions for your Word program, the TC field is formatted as hidden text — it is not displayed on the screen unless you view hidden text, and it does not print. (To view hidden text, click Show/Hide on the Standard toolbar.)

Example of results of TC field

1 Five sample TC entries with TOC levels specified. For example, {TC "Ipsum" \l 2} marks the TOC entry "Ipsum" as a level-2 entry.

2 Corresponding entries when the TOC is built. The entry "Ipsum" is formatted with the style TOC 2.

A note about using TC field switches

The switches in the TC field, denoted by the slash character (\), give you additional control over how the entry should look in the table of contents. The \l switch controls the TOC level of the TC entry. For example, the field { TC "Entering Data" \l 4 } marks a level-4 entry, and Microsoft Word applies the built-in style TOC 4 to that entry in the table of contents. If no level is specified, level 1 is assumed. To omit the page number for an entry, include the \n switch in the TC field for that entry; for example, {TC "Entering Data" \l 4 \n}.

Options for inserting a table of contents

The Table of Contents tab in the Index and Tables dialog box has the options for inserting and formatting your TOC. To find it:

  1. On the Insert menu in Word, point to Reference.
  2. Click Index and Tables, and then click the Table of Contents tab.

Table of Contents tab with Outlining toolbar

You can also use the Table of Contents tab to display the Outlining toolbar. With the Outlining toolbar, you can:

  • Apply outline levels quickly (even in a view other than Outline view).
  • Update the table of contents.
  • Go to the table of contents from whatever part of the document you're working in.

The Update TOC button and the Go to TOC button work only with the first TOC in your document and only with TOCs created from built-in styles from Word.

The Options button displays the Table of Contents Options dialog box and allows you to select the entries that you want to include in the TOC (based on the way you marked the text in your document). The options you select indicate whether the entries are marked by certain styles, by outline level, as table entry fields (TC fields), or by a combination of these.

The Table of Contents Options dialog box

1 If you use built-in heading styles to format the headings you want to include in your TOC, enter a TOC level (1-9) corresponding to the heading level (TOC level 1 for Heading 1, and so on) in the Available Styles list.

2 If you use outline levels to mark the headings, you can select the Outline levels option. Each outline level is automatically assigned a corresponding TOC level (that is, a heading marked with outline level 1 formatting uses TOC 1, and so on).

3 If you use custom styles to format the headings you want to include in your TOC, enter a TOC level (1-9) for each of the headings you want in the Available styles list.

4 If you use TC fields to mark the entries you want to include in your TOC, select the Table entry fields box. The TOC level for each entry is assigned when you insert the TC field.

After you have inserted your TOC, remember that the Modify button on the Index and Tables dialog box dialog box allows you to change the formatting of the entries in the TOC.

 Note   The Modify button is only available when From template is selected in the Formats list. Additionally, if you change the formatting of one TOC entry style (such as TOC 1), you change it for all TOC entries that use that style in the document. Every TOC in your document uses the same TOC entry styles and has the same formatting. For example, you cannot insert one TOC using the Classic format, and then add a second TOC to the same document using the Modern style.

Adding a table of contents to a Web page

You can also create a table of contents for a Web page. The TOC can appear either in the same frame as the body text (like the TOC at the top of this article) or within a separate frame so that it stays visible as you view the text in another frame (as shown below).

A TOC on a Web page uses hyperlinks rather than page numbers: each table of contents entry is linked text. The links are helpful for navigating the Web page quickly and for viewing a summary of the contents of the Web page. When you switch to Web layout view in a document with a TOC, the TOC entries are displayed as hyperlinks instead of entries with page numbers.

Table of contents in a Web frame

To insert and display a TOC in the same frame as the text, use the Table of Contents tab in the Index and Tables dialog box. To insert a TOC in a separate frame, point to Frames on the Format menu, and then click Table of Contents in Frame.

You can customize a TOC that you created in a frame using the Index and Tables command (on the Insert menu, Table of Contents tab). However, the frame that contains the TOC must be active (that is, you must click in the frame) when you customize.

Keyboard shortcuts for working with a table of contents

When you insert a TOC, a TOC field is added to your document. This field contains the "code" that instructs Word to create and display your TOC. When you toggle the field code (by selecting the TOC and pressing SHIFT+F9), you can view the code that makes your TOC.

Because the TOC itself is actually a field, there are some helpful shortcut keys for working with fields that you can also use to work with your TOC:

  • F9     Updates the selected TOC.
    When you update your table of contents by pressing F9 or by using the Update TOC button, you have the option to either update the page numbers only or to update the entire TOC. If the page numbers for TOC entries have changed because of edits you've made to your document, you only need to update the page numbers. However, if you have added, removed, or modified the text marked as TOC entries, you need to update the entire TOC.
  • CTRL+SHIFT+F9     Unlinks the selected TOC.
    Because your table of contents is actually a field code ({TOC} field), you can unlink your TOC to make last-minute changes to the TOC itself (for example, just before printing). However, in general, you don't want to disable the TOC from being updated.
  • SHIFT+F9     Switches between a selected TOC field code ({TOC}) and its result (the actual TOC.)
  • ALT+F9     Switches between displaying all field codes in your document (such as {TOC} and {TC}) and their results (such as your TOC).
  • ALT+SHIFT+O     Marks a selection in your document that you want to include in your TOCs. The selected text is marked with a TC field.
 
 
Applies to:
Word 2003