Hack 25 Include Only Part of a Heading in a TOCGive your headings more flexibility while keeping the table of contents (TOC) under control. Tables of content can provide useful roadmaps for navigating long documents. Typically, a TOC displays a document's headings alongside the page numbers on which they appear. Sometimes, however, you may want only part of a heading to appear in the TOC. For example, consider the document shown in Figure 3-47. The title is included on the same line as the chapter number, but in the TOC only the chapter number should appear, as shown in Figure 3-48. Figure 3-47. Chapter numbers and titles appear on the same lineFigure 3-48. Only the chapter number should be included in the TOCAccomplishing this task became much easier in Word 2002, but it's still a bit tricky. How you implement these "run-in headings" depends on which version of Word you're using. 3.13.1 Word 2002 and Higher
Microsoft included a feature in Word 2002 to make it easier to include only part of a heading in the TOC. A new type of formatting mark, called a StyleSeparator, creates a hidden barricade between portions of text in a paragraph. As the name implies, this mark lets you use two different paragraph styles within the same paragraph (and you avoid the Char Char problem [Hack #55] typically encountered with multiple paragraph styles applied within the same paragraph). Immediately following a heading, you can insert one of these new StyleSeparators to create, in effect, a new paragraph that starts on the same line as the heading, as shown in Figure 3-49. Thus, you can apply a paragraph style independent of the heading, which means it won't appear in the TOC. By default, you can access the StyleSeparator only from the Commands
tab of the Customize dialog. Select Tools Figure 3-49. Locating the InsertStyleSeparator commandTo create a run-in heading (such as those shown in Figure 3-47) using a StyleSeparator, put your cursor anywhere in the heading paragraph, then select the InsertStyleSeparator command you just placed on a menu or toolbar. If you've got paragraph marks turned on [Hack #1], you'll notice that the one at the end of the heading paragraph is no longer visible.
3.13.2 Word 2000
To get the run-in-heading effect in Word 2000, you need to do a bit more legwork. First, select Tools Select the trailing paragraph mark for the first heading
you'd like to run in. Then select
Format It would be tedious work to apply this hack to every heading in a document, but you can simplify it with a Find and Replace. In the "Find what" box, put ^p. Click the More button if the Format button isn't visible. With your cursor in the "Find what" box, click the Format button, select Style, and select Heading 1 (or the heading style that you'd like to run in). In the "Replace with" box, put ^&. With your cursor in the "Replace with" box, click the Format button, choose Font, and check the Hidden box. Click the Replace All button. |