SUMMARY
One of the most common features of professional documents
is the table of contents (TOC). Microsoft Office Word 2003 and Microsoft Word 2002 make the creation of a TOC
easier by allowing you the option of creating a TOC without using styles, and
by allowing you to mark a single word or group of words in a particular body of
text and add that information to the TOC.
A TOC can be generated by
using the Lead-in Emphasis feature to apply heading styles to any lead-in text
(the first word or words in a paragraph or sentence). By using the Lead-in
Emphasis feature, you can create paragraphs where the first portion of the
paragraph is formatted with a heading style and appears in the TOC, but the
rest of the paragraph is normal text and does not appear in the TOC. This
article describes how to use this new feature to create a TOC.
back to the top
Create Table Of Contents
Word 2003 and Word 2002 allow you to create a TOC based on a portion of the
text in a paragraph without including the whole paragraph. You can mark text by
using the Lead-in Emphasis feature with heading styles to include the text in a
TOC.
To insert a table of contents:
- Start Word, and then open your document.
- Click an empty paragraph where you want to insert the
TOC.
- On the Insert menu, point to Reference, and then click Index and Tables.
- Click the Table of Contents tab, and then
click Show Outlining Toolbar.
- In the Index and Tables dialog box, select
the options that you want to apply to your TOC, and then click OK.
- Click OK to the following message:
To add or remove items in the table of contents:
1. Select text in your document.
2. Click the outline level in the toolbar to make the text appear in the TOC.
NOTE: If the text contained in your document is not marked to be
included in a TOC, you receive the following error message in your document
instead of the TOC: Error! No table of contents entries
found.
back to the top
Mark the Text to Include in the Table of Contents
The next step is to mark the text that you want to include in
your TOC by using Lead-in Emphasis with heading styles. Use one or more of the
following methods to mark text that you want to include in the
TOC.
back to the top
Use Lead-in Emphasis with Heading Styles
- Select any lead-in text in your document that you want to
include in your TOC. For example, you may have a paragraph that includes
lead-in text to introduce the remainder of the paragraph's text. In the
following paragraph, if you want to include the introductory words "Widow and
Orphan" in your TOC, just select these words, and then continue with the steps.
Widow and Orphan: A widow is the last line of a paragraph printed by itself at the
top of a page. An orphan is the first line of a paragraph printed by itself at
the bottom of a page.
- Click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.
- Click Update TOC on the Outlining toolbar to update the TOC.
- In the Update Table of Contents dialog
box, click Update the Entire table, and then click OK.
If you click
Show/Hide on the standard toolbar, note that there are no special
characters in the paragraph to indicate lead-in emphasis applied to the text.
However, the text formatted as a heading level appears in the document's TOC.
Because no hidden paragraph markers or other items are used, the whole process
is seamless. Word uses a new underlying feature to do this -- linked character
styles.
The heading style applied to the lead-in portion of the
document is displayed as a heading style, but it is actually a linked character
style. In Word 2003 and Word 2002, when you apply a paragraph style to a subset of paragraph,
the following behavior occurs:
- A hidden character style is created that takes the same
character properties as the paragraph style being applied.
-and- - The character style is applied to the selection.
NOTE: The hidden character style created with linked character styles
appears in the
Style drop-down list if the document is opened and viewed in earlier
versions of Word. The functionality of the style separator is lost if the
document is saved in an earlier version of Word.
To view the hidden
character style, follow these steps:
- On the Format menu, click Reveal Formatting.
The Reveal Formatting task pane appears. - Select the text in your document and notice that exact
formatting details appear in the Reveal Formatting task pane.
- Select the text that has the character style applied and
note that the text appears as a character style in the Reveal Formatting task pane. The linked style appears as Heading Char in the Reveal Formatting task pane. The actual character style remains hidden in the
Styles and Formatting task pane or the Style drop-down list on the Formatting toolbar.
Any paragraph style can be used for the linked character style.
A paragraph style can be created that looks exactly like the body text
paragraph style, and then applied to a portion of a paragraph. In this manner,
the text that is used to build the TOC can exactly match the text in the
paragraph, assuming the TOC options are modified to include the style for the
lead-in text.
back to the top
Use Style Separators with Heading Styles
The style separator is a new feature to Word 2003 and Word 2002. Style
separator tags allow you to do the following:
- Apply heading styles to a single word or phrase in a
paragraph so that only that word or phrase appears in the TOC.
- Include two styles in a single paragraph so that the
lead-in paragraph appears in the TOC.
- Apply outline levels to lead-in text so that only the
lead-in text appears in the TOC.
- Apply outline levels to a single word or phrase in a
paragraph so that only that word or phrase appears in the TOC.
The style separator is a hidden paragraph mark that serves as a
delineator between separate styles applied in a document. To make the style
separator mark visible, follow these steps:
- On the Tools menu, click Options.
- On the View tab, click All under Formatting Marks.
Before you can use the Style Separator feature, you must add
the
Style Separator button to your toolbar:
- Click Customize on the Tools menu.
- Click the Commands tab, and then click All Commands in the Categories list.
- Locate InsertStyleSeparator in the Commands list, and then drag it to the Formatting toolbar. Click Close.
Insert the style separator before you apply the heading style
to your text. To do this, use one of the following methods.
Method A: Use Style Separators to add a single word or phrase in a paragraph to
the TOC:
- As you type, and you reach a word or phrase in a paragraph
that you want to include in the TOC, click the Style Separator button. When you click the Style Separator button, the insertion point moves to the right of the separator
so that you can continue typing.
- Type the word or phrase that you want to include in the
TOC, and then click the Style Separator button again.
- Select the word or phrase that you want to include in the
TOC, click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.
The word or phrase between the two style separators appears in
the TOC.
Method B: Insert the Style Separator between two
existing paragraphs:
You can use the style separator between two
existing paragraphs so that the first paragraph becomes the lead-in text and
appears in the TOC, and the second paragraph is the remainder of the text and
does not appear in the TOC. To do this, follow these steps:
- Create two paragraphs of text, placing text that you want
to appear in the TOC in the first paragraph, the remainder of the text in the
second paragraph.
- Position the insertion point in the first paragraph, and
then click the Style Separator button.
The two paragraphs appear to become a single
paragraph by converting the paragraph mark at the end of the first paragraph to
a style separator. You now have a single compound paragraph, which shows up as
two separate paragraphs in Outline view, but which prints as a single
paragraph. - Select the text to the left of the separator, click the
drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want.
The TOC displays only the lead-in portion (the first paragraph)
formatted with the heading style.
NOTE: The style separator is a special form of a hidden paragraph
mark, so documents created in Word 2003 and Word 2002 with style separators appear the same
in Word 2000 and Microsoft Word 97 unless you click
All under
Formatting Marks. If you click
All under
Formatting Marks in earlier versions of Word, the style separator hidden paragraph
mark appears as a normal paragraph mark, and the document will be
repaginated.
When you view documents created in Word 2003 and Word 2002 with style
separators in earlier versions of Word, do not click
All under
Formatting Marks.
back to the top
Removing a Heading from the Table of Contents
If you want to remove a heading from the TOC, you can apply a new
paragraph style to the marked text:
- Select the marked text, click the drop-down arrow in the Style box on the Formatting toolbar, and then select the heading that you want. (Click Normal to remove the heading style.)
- Click Update TOC on the Outlining toolbar to update the TOC.
- In the Update Table of Contents dialog
box, click Update the Entire table, and then click OK.
NOTE: By applying the paragraph style that you want to the whole
paragraph, you do not remove the style. You must select the exact text as it
appears in the TOC, and then apply the new style.
back to the top
REFERENCES
For more information about creating a table of contents, click
Microsoft Word
2002 Help on the
Help menu, type
create a table of contents in the Office Assistant or the Answer Wizard, and then click
Search to view the topic.
For more information about how to create a
table of contents without changing the formatting of your
text, click the following article number to view the article in the Microsoft Knowledge Base:
285050
How to use outline levels to
create a table of contents in Word 2003 and in Word 2002
For more information about how to create
table of content entries with no page number, click the following article number to view the article in the Microsoft Knowledge Base:
319821
How to create table of contents entries without a page number in Word 2003 and in Word 2002
back to the top