19. Creating Tables of Contents and Indexes

In a long document, like this book, for example, it can be hard to find the content you are seeking quickly just by thumbing through the pages or scrolling through the file on your screen. To help users quickly locate specific content, writers often employ a table of contents at the beginning of the document and an index at the end. You might have already used the index in this book to look up topics!

In this lesson, you discover how to generate tables of contents and indexes to provide to your readers. You also find out about some other types of tables that Word can create, including tables of figures and tables of authorities.

Creating a Table of Contents

A table of contents (TOC) is a listing at the beginning of a document (usually) that shows all the headings of a certain level and higher and their page numbers. This book has one, and so does almost every other technical book. Don’t confuse a TOC with an index, covered later in the chapter; an index appears at the end of the document (again, usually) and shows an alphabetic list of topics and their page numbers. Figure 19.1 shows a typical TOC. It contains multiple levels and uses dot leaders to align the entries with the right-aligned page numbers.

Image

Figure 19.1. A typical TOC.

Checking Style Outline Levels

The key to generating an accurate TOC is making sure the document is properly formatted beforehand, with the correct styles in place.

As you learned in Chapter 17, “Outlining and Combining Documents,” you can assign an outline level to each style (Level 1 through Level 9 or Body). Word uses each style’s heading level to determine the level of the TOC to which it belongs. For example, all styles defined as Level 1 are at the top level of the TOC, and so on. So your first task is to check out the styles you’ve used for the document headings and make sure that they are appropriately assigned to an outline level. (This is not an issue if you use Word’s built-in heading styles because they are already appropriately assigned.)

To view and change the outline level for a heading style, follow these steps:

1. Click the dialog box launcher in the Styles group on the Home tab. The Styles task pane opens.

2. Right-click the style and choose Modify. The Modify Style dialog box opens.

3. Click the Format button and choose Paragraph. The Paragraph dialog box opens.

4. If needed, change the Outline Level to reflect the style’s level of importance in the outline and click OK.

5. Click OK to close the Modify Style dialog box.

Creating a TOC from a Preset

After making sure your style usage is consistent, you are ready to generate the TOC. It can be as easy or as difficult as you make it, depending on how picky you want to get with the options.

By far, the easiest way to go is to choose one of the TOC presets, as shown in the following steps:

1. (Optional) Position the insertion point in a new blank paragraph where you want the TOC. Typically, it goes at the beginning of the document, but this is not mandatory. In step 3 you can specify that the TOC be placed at the beginning or end of the document or section, regardless of the current insertion point position, if you prefer.

2. On the References tab, click the Table of Contents button. A menu opens.

3. Click one of the presets on the menu, or right-click a preset and choose where you want to insert it (if not at the current insertion point position) (see Figure 19.2).

Image

Figure 19.2. Select a preset from the menu for a quick-and-easy Table of Contents.

The presets on the Built-In section of the menu are

Automatic Table 1—Places a default TOC at the insertion point, with the title “Contents.”

Automatic Table 2—Places a default TOC at the insertion point, with the title “Table of Contents.”

Manual Table—Creates a TOC using content control placeholders that turn into regular text after you type in them. This is not an automatically updating TOC, and it does not use the TOC feature; it simply creates the look of a TOC for manual use.

Image For more information about content controls, see “Creating a Form with Content Controls,” p. 650.

The TOC appears in a content control frame (yes, it’s a content control, like the ones in Chapter 16, “Working with Fields and Forms”). When you click inside the TOC, two buttons become available, as shown in Figure 19.3. The left one opens the Table of Contents menu, the same as the one on the References tab. The right one updates the TOC (as described in the next section).

Image

Figure 19.3. A TOC is in a content control frame, with buttons at the top for controlling it.

Updating a TOC

As the document changes, the table of contents might become out of date. A TOC does not update automatically by default, so you must issue a command to update it.

To update a table of contents, follow these steps:

1. Click the Update Table button at the top of the TOC’s frame (refer to Figure 19.3). The Update Table of Contents dialog box opens.

You can also click the Update Table button on the References tab.

2. Select the type of update you want:

Update Page Numbers Only—This is the quickest update method, but it ignores any changes made to the headings or any new headings you might have added.

Update Entire Table—This method takes a little longer; it completely regenerates the TOC. Except in long documents, you will not notice much difference in the speed.


Image I See an “Error! Bookmark Not Defined” Message

This happens if you delete one or more of the headings or {TC} codes from the document and then update the TOC using the Update Page Numbers Only option. Do an update that re-creates the entire TOC instead to fix this.


Removing a TOC

To get rid of the TOC, you can just select it in the document and press Delete, the same as with any other content control. Here’s an easier way, though:

1. On the References tab, click Table of Contents. (You can also display this same menu by clicking the Table of Contents button at the top of the TOC’s frame.)

2. Click Remove Table of Contents.

Manually Marking Entries for the TOC

Besides the headings in your document, you might occasionally want some nonheading text to appear in the TOC. One way to do this is to use a unique style for that text and set that style’s outline level to the desired TOC level. (Refer to “Checking Style Outline Levels” earlier in this chapter if you want.)

However, if you don’t want to change the text’s style to force its inclusion in the TOC, there are a couple of alternatives.

Including an Entire Paragraph with Add Text

If you want an entire paragraph to appear in the TOC that is styled such that it would not normally appear (for example, a body paragraph or a note), here’s a simple way to mark it for inclusion:

1. Click in the paragraph to be included in the TOC.

You do not actually have to select the text; just move the insertion point into its paragraph. The entire paragraph is included in the TOC regardless of what portion of it you select.


Image Note

To reverse an inclusion so that the paragraph no longer shows up in the TOC, repeat steps 1–3 for the paragraph, but instead of choosing a level in step 3, choose Do Not Show in Table of Contents.


2. On the References tab, click Add Text. A menu opens.

3. Click the level at which that text should appear. A field code is inserted that marks the entry.

4. Repeat steps 1–3 for each additional entry to include.

Using {TC} Fields to Manually Mark Entries

You can also use {TC} fields to manually create TOC entries. There’s a bit of extra work involved in setting them up, and you have to change the TOC options to make sure that they are included, but these fields offer excellent flexibility. Options are available with a {TC} field that aren’t available with the newfangled method described in the preceding section. For example, you can specify the exact text that should appear in the TOC (not necessarily the whole paragraph), and you can specify that the page number should be suppressed for that entry.

Image To learn more about specifying what is included in the TOC, see “Choosing Which Styles and Entries Are Included,” p. 738.

To begin inserting a {TC} field, position the insertion point where you want the field and press Alt+Shift+O. This opens the Mark Table of Contents Entry dialog box shown in Figure 19.4.

Image

Figure 19.4. Use the Mark Table of Contents Entry dialog box to insert a legacy-style {TC} code.

From here, enter the following information:

Entry—This is the literal text that appears in the table of contents.

Table Identifier—If you have more than one TOC in the document, you can pick the one to which you want the entry to apply. Leave this set to the default for the main TOC.

Level—Select the TOC level at which the entry should appear.

Image For more information about multiple TOCs in the same document, see “Working with Multiple TOCs,” p. 742.

Another way to insert a {TC} field is to press Ctrl+F9 to create a new set of field brackets and then manually type the code. Here’s the basic syntax:

{ TC "Text that should appear in the TOC" [switches] }

These are the switches you can use:

l—That’s a lowercase L, not a 1. It specifies the outline level. Examples:

{ TC "Summary" l 3 }
{ TC "Sales Plan" l 2}

This suppresses the page number for the entry. Example:

{ TC "Main Office" }


Image Caution

When manually typing field codes, don’t forget the syntax rules for fields, as described in a “Common Syntax Errors in Field Codes” troubleshooting note in Chapter 16.


After creating a {TC} field with the correct syntax, you can copy that code, paste it into other spots, and then just change the text within the quotation marks.

Creating Custom TOCs

You can generate a TOC using your own custom settings, changing nearly every aspect of the table of contents from the text styles to the type of tab leader. Then, you can save your custom TOC as a preset that appears on the Table of Contents button’s menu, so you can reuse those settings in other documents.

Starting a Custom TOC

To start a custom TOC, click Table of Contents on the References tab and choose Custom Table of Contents. The Table of Contents dialog box opens, as shown in Figure 19.5.

Image

Figure 19.5. Start a custom TOC from the Table of Contents dialog box.

Setting Basic TOC Options

The most basic options for a TOC are found on the Table of Contents tab. Set any of these as desired:

Show Page Numbers—This toggles on/off the page numbering. Each page number is generated based on the page on which the heading appears.

Right Align Page Numbers—When this option is disabled, the page numbers appear immediately after the text; when it’s enabled, they appear at the right margin.

Tab Leader—By default, a dotted leader is used when Right Align Page Numbers is turned on (see previous bullet). You can use other styles of leaders or not use a leader at all.

Use Hyperlinks Instead of Page Numbers—This refers only to Web Preview versions of the document and versions saved to web formats. Online it is more useful for the reader to have each heading be a hyperlink because page numbering is relative onscreen.

Formats—This drop-down list contains alternative style sets, like the ones you find on the Home tab when you click Change Styles. The TOC can use a different style set than the rest of the document. (The default, From Template, matches the TOC with the document’s style set.)

Show Levels—This indicates the number of heading levels that will be included in the TOC. The default is 3, which includes outline levels 1–3.

Image For more information about style sets, see “Changing the Style Set,” p. 217.

Choosing Which Styles and Entries Are Included

By default, the following are included in a TOC:

• All headings using the built-in heading styles (Heading 1, Heading 2, and so on).

• All paragraph styles that have outline levels assigned to them, up to the level indicated in the Show Levels setting, covered in the preceding section.

• All paragraphs manually marked for the TOC with the Add Text button on the References tab. (See “Manually Marking Entries for the TOC” earlier in this chapter for details.)

If you want to include other styles in the TOC, or if you want to include entries you have manually marked with the {TC} field, you must make some adjustments.

To specify which styles and entries should be included, follow these steps:

1. From the Table of Contents dialog box (refer to Figure 19.5), click Options. The Table of Contents Options dialog box opens.

2. For each style that you want to include in the TOC, type a number in the TOC Level column indicating the desired level (see Figure 19.6).

Image

Figure 19.6. Select the styles to be included in the TOC.


Image Caution

Don’t confuse the styles that go into the TOC with the styles that are used to display it. The TOC includes entries for various headings in the document, but when those entries are in the TOC, they are formatted with the corresponding TOC style, not their original style. So, for example, text that is Heading 1 in the document will be TOC 1 in the TOC.


3. (Optional) To include outline styles or not (that is, custom styles based on their Outline Level setting), mark or clear the Outline Levels check box. It is marked by default.


Image Note

If you do not want any styles to be included (only {TC} entries and outline levels), clear the Styles check box.


4. (Optional) To include entries marked with {TC} field codes, mark the Table Entry Fields check box.

Image To use {TC} fields, see “Using {TC} Fields to Manually Mark Entries,” p. 736.

5. Click OK.


Image Why Can’t I Add a New Style for TOC Entries?

From the Table of Contents dialog box, if you click Modify, a Style dialog box appears that lists TOC styles 1 through 9. There is a New button, but it is grayed out. You can’t add new TOC styles.

So, why is the button there, if you can’t use it? It’s because this same dialog box is used for other parts of the program, such as indexing, and in some of those parts you can add new styles.


Defining the Appearance of the TOC

The entries in the TOC are formatted according to special built-in paragraph styles with names that begin with “TOC”. You can modify these styles as you would any other style, from the Styles pane, as you learned in Chapter 6, “Creating and Applying Styles and Themes.”

There is also a TOC-specific interface for modifying TOC styles. Follow these steps to use it:

1. From the Table of Contents dialog box, click Modify. The Style dialog box appears. Only the TOC styles appear on the list (see Figure 19.7).

Image

Figure 19.7. You can modify the TOC styles by selecting one and clicking Modify.

2. Click one of the TOC styles and review its specifications in the Preview area.

3. (Optional) If you need to change the definition of the style, click Modify.

4. Use the Modify Style dialog box to change the style definition, and then click OK.

5. Click OK to close the Style dialog box.

Image For information about using the Modify Style dialog box to change a style, see “Modifying a Style Definition,” p. 236.

Understanding the {TOC} Field Code

When you insert a TOC, you are actually inserting a {TOC} field code. It has certain switches based on the settings you choose in the Table of Contents dialog box. You can view the field code by selecting the TOC, right-clicking it, and choosing Toggle Field Codes.

For example, here’s a typical code:

{ TOC o "1-3" h z u }


Image Tip

You can manually construct a table of contents code. To do so, press Ctrl+F9 to place a blank field code bracket set at the insertion point, and then type TOC followed by the desired switches, as in Table 19.1.


Table 19.1 Common Field Code Switches for {TOC}

Image

Table 19.1 lists a few of the most common switches for the {TOC} field; for practice, decipher the preceding example from that table. You don’t need to memorize these or be able to manually construct complex TOCs from them because the Table of Contents dialog box handles this for you in almost all cases; this reference is handy mostly for when you need to make small tweaks to the TOC’s behavior.

Creating a Custom TOC Preset

After generating the TOC exactly as you want it, you can save its specifications for later reuse. To do so, follow these steps:

1. Select the TOC. Make sure that you select the entire TOC by clicking the field information bar at the top of the TOC; the bar should turn blue and all the contents should be highlighted.

2. On the References tab, click Table of Contents, and then choose Save Selection to Table of Contents Gallery. The Create New Building Block dialog box opens.

3. In the Name box, type the name to assign to the preset.

4. Leave the Gallery set to Table of Contents. Leave the Category assigned to General (or create/change the category if you prefer).

5. Leave Save In set to Building Blocks.dotx.

6. In the Options list, choose whether the new TOC should be on its own page:

Insert Content in Its Own Paragraph—Starts a new paragraph for the TOC but not a new page.

Insert Content in Its Own Page—Starts the TOC on a new page.

Insert Content Only—Inserts the TOC wherever the insertion point is, without starting a new paragraph or page.

7. Click OK to create the new entry. It now appears on the Table of Contents button’s menu.

To delete a custom preset, right-click it on the Table of Contents button’s menu and choose Organize and Delete. Then in the Building Blocks Organizer dialog box, click Delete, click Yes to confirm, and click Close to close the dialog box.

Working with Multiple TOCs

You can have multiple TOCs in a single document. This book has that—did you notice? There is a brief TOC at the beginning that lists just the chapter titles, and then a second, more detailed TOC following it.

If you have multiple TOCs, you might want them to both cover the same content, as the ones in this book do, but at different levels of detail. Alternatively, you might want each of them to cover different content—perhaps a separate TOC for Parts I and II of a book, for example.

Adding a Second TOC for the Entire Document

To add another TOC that covers the entire document, simply position the insertion point and repeat the TOC insertion as you normally would. A dialog box appears, asking whether you want to replace the current TOC; click No, and a second TOC appears.

Adding a TOC That Covers Only Part of a Document

Things get a little trickier if you don’t want the TOC to cover the entire document. You must define a bookmark that includes all the text you want to include, and then manually edit the {TOC} field’s code string to specify a bookmark with the  switch.

Here are the specifics:

1. Select all the text to be included in the TOC, and define a bookmark for it. To do so, on the Insert tab, click Bookmark. Type a bookmark name and click Add.

Image To learn about bookmarks, see “Working with Bookmarks,” p. 601.

2. To edit the code for an existing TOC, select the TOC, right-click it, and choose Toggle Field Codes. Or, to create a new TOC code, press Ctrl+F9 to insert new brackets and then type TOC followed by a space.

3. In the TOC field code, add the  switch, followed by the bookmark name. (The bookmark name does not appear in quotation marks, because it is not literal text but an identifier.)

4. Generate (or regenerate) the TOC by right-clicking the field code and choosing Update Field.

Image For more information about field codes, including updating them and toggling their displays, see Chapter 16, “Working with Fields and Forms,” p. 623.

Building a TOC Across Multiple Documents

To create a TOC that covers multiple documents, use the Master Documents feature to bring the documents together in a single container document, and then generate the TOC with all the subdocuments expanded.

Image To learn about master documents, see “Understanding Master Documents,” p. 688.

If you do not want to use master documents (and that’s understandable, because the feature is a bit clumsy), there’s an alternative: the {RD} field. RD stands for Referenced Document; it provides a way of inserting a reference to an external document within the current one.

You can either press Ctrl+F9 and type RD, or you can insert the field with the Insert, Quick Parts, Field command, as you learned in Chapter 16. Make sure that you position the insertion point where you want the reference.

If you are referencing a file in the same location as the file receiving the field, you can simply place the filename in quotation marks, like this:

{ RD "extrainfo.docx" }

If you need to point to another location, use the complete path, like this:

{ RD "C:\projectfilesdocumentsextrainfo.docx" }

After inserting the {RD} field, generate the TOC as you normally would. The contents of the referenced document are included in the TOC using the same rules as applied to the TOC in the current document. For example, if you create a TOC that uses outline levels 1–2, any headings in the referenced document at those outline levels are included as well.

Creating a Table of Figures

A table of figures is just like a TOC except instead of headings, it lists figures and their captions. Many technical manuals provide a table of figures that is separate from the TOC so users can easily look up a particular diagram or schematic, for example.

Captioning Figures

A table of figures is easiest to generate if you have used Word to insert captions for each figure. You learned how to do this in Chapter 10, “Working with Pictures and Videos,” but here is a quick review:

1. Right-click a graphic and choose Insert Caption, or select the graphic and click the Insert Caption button on the References tab. The Caption dialog box opens.


Image Tip

You do not have to use the Insert Caption feature to create figure captions. You can simply type the desired text and then apply the Caption paragraph style to it. The captions are not automatically numbered that way, however.


2. In the Caption box, the numbering is already filled in. Click after the numbering and type a descriptive caption if desired (see Figure 19.8).

Image

Figure 19.8. Create a caption for the selected graphic.

Image For more information about the options available for captions, see “Using Figure Captions,” p. 412.

3. Click OK. The caption appears adjacent to the graphic.

The caption’s paragraph style is Caption; you’ll use that style to generate the table of figures in the next section.

Generating the Table of Figures

After ensuring that all the figure captions use a common paragraph style (for example, Caption), you can generate the table of figures. Its options are virtually identical to those for a TOC except there are no presets.

Follow these steps to generate a table of figures:

1. Position the insertion point where you want the table of figures to appear.

2. On the References tab, in the Captions group, click Insert Table of Figures. The Table of Figures dialog box opens (see Figure 19.9).

Image

Figure 19.9. Build a table of figures.

3. Click the Options button. The Table of Figures Options dialog box opens.

4. Open the Style drop-down list and select the style used for the captions (probably Caption), as shown in Figure 19.10.

Image

Figure 19.10. Set the style to be used for the table of figures.

5. Click OK.

6. Set up the other options for the table of figures. They are the same as the options available for a TOC. See “Creating Custom TOCs” earlier in this chapter for a full explanation.

7. Click OK. The table of figures appears in the document.

Manually Marking Captions

As you saw in the preceding steps, you must specify a single style that all the figure captions share, and the table of figures is based on that style. (It is the Caption style if you use Word’s captioning feature.)

But, what if there is more than one style used for the figure captions? In that case, you must insert {TC} field codes to manually mark the entries. This is similar to using the {TC} codes to mark TOC entries, covered earlier in this chapter.


Image Note

If you want to include {TC} codes in the table of figures, as described in the following section, mark the Table Entry Fields check box.


The main difference is that you need to add an extra switch: f. Then, you follow the switch with a letter identifier to identify the table of figures. It can be any letter you want as long as you use the same letter for all entries that should share a common table of figures. For example:

{ TC "A typical network topography" f a }

Then, as you are compiling the TOC, make sure that in the Table of Figures Options dialog box, you mark the Table Entry Fields check box. This tells Word to include {TC} codes in the listing.

Creating Citations and Tables of Authorities

“Citation” might sound like a generic term, but it actually has a specific meaning in Word. A citation is a reference to a legal document, such as a case or statute. Citations are different from footnotes and bibliography entries and are used almost exclusively in the legal profession. Word makes it easy to enter citations inline in the text and then compile them into a master reference called a table of authorities.

Marking Citations

When citing a source for the first time in a document, you typically enter a long (full) version of it, which includes the case numbers, dates, and other information. Then in later references within the same document, you usually enter a short version, which typically consists of only the case name.

To create a citation, follow these steps.

1. Select the long version (first usage) of the first in-text citation in the document.

2. Press Alt+Shift+I or click Mark Citation on the References tab. The Mark Citation dialog box opens with the citation already filled into the Selected Text box (see Figure 19.11).

Image

Figure 19.11. Mark a citation.

3. Edit the text as needed in the Selected Text box.

4. Open the Category list and choose the type of citation (cases, statutes, treatises, and so on).

5. In the Short Citation box, enter a shortened version of the citation, to use for subsequent references. The default is for it to be the same as the selected text.


Image Tip

You can create a custom category if needed. Click the Category button, and in the Edit Category dialog box, select one of the numbers at the bottom of the list and type a new name for it in the Replace With box. Click Replace and then click OK.


6. Click Mark. The selected text appears in the Long Citation box.

Alternatively, if you want Word to search the whole document and mark all references to the same citation, long and short, click Mark All.

7. To move to another citation, click Next Citation. Word jumps to the next citation.


Image Note

Word looks for the next citation by looking for telltale identifiers such as “v.” or “In re.”


8. Select the entire citation, and repeat steps 3–6 for it.

So, what’s actually happening behind the scenes here? Word is inserting a {TA} field code. You can see that code by clicking the Show/Hide (¶) button on the Home tab to toggle on the display of hidden text. For example, it might look something like this for a long citation:

{ TA l "Bond v. Floyd, 385 U.S. 116 (1966)" s "Bond v. Floyd" c 1 }

For a short citation, the syntax is simpler:

{ TA s "Bond v. Floyd" }

Table 19.2 explains the switches you can use with the {TA} field.

Table 19.2. Switches for the {TA} Field

Image

Generating the Table of Authorities

After you have marked all the citations, you are ready to compile the table of authorities. Follow these steps to do so:

1. Position the insertion point where you want the table of authorities to appear.

2. On the References tab, click Insert Table of Authorities. The Table of Authorities dialog box opens (see Figure 19.12).

Image

Figure 19.12. Set the style to be used for the table of authorities.

3. Set any of these options as needed:

Use Passim—It is common when listing citations that appear repeatedly in the same document to substitute the word passim for the multiple page references. By default, Word uses passim whenever there are at least five references to the same citation. Clear this check box if you want to display the actual page numbers in each instance instead.

Keep Original Formatting—Some citations contain character formatting such as bold, italic, and underlining. That formatting carries over to the table of authorities automatically by default. If you do not want it to, clear this check box.

Tab Leader—This is the same as with a table of contents. Select the leader type or none at all.

Formats—This is also the same as with a table of contents. Select one of the style sets, or use From Template to match the style set that the document uses.

Category—The default here is All, which generates a table containing all categories. You can narrow that down to a certain category by selecting it here.

4. (Optional) Click Modify to modify the styles used for the table of authorities, as you did with the TOC styles earlier in the chapter. There are only two styles used here: Table of Authorities and TOA Heading.

5. Click OK to generate the table of authorities.

Creating an Index

An index is an alphabetic listing of topics, usually at the back of a book or long document, that lists the page numbers on which the topics are covered. There’s one in this book, for example, and you might have even used it already to look up a topic or two.


Image Caution

It’s okay to mark index entries as you write, but there’s no point in generating the index until the document is complete. If changes you make to the document affect pagination, you must regenerate the index afterward.


Creating a really good index is a skill that takes time to learn. It’s not as simple as marking every instance of every word, because some words are not important to index (such as “the”), and some words are used so often in the document that you must decide which are the most significant occurrences. There are people who make a full-time living creating indexes, and there are even international conventions and seminars for indexers. Word’s indexing capabilities are adequate for most people, although professional indexers might use other tools.


Image Note

Each document is indexed separately in Word, so if you are writing a publication with different chapters in separate Word documents, you need to tie them all together somehow before indexing. See “Indexing Across Multiple Documents” later in this chapter for some ideas.


Creating an index is a three-step process:

1. Decide on the conventions for the index.

2. Mark the entries for the index.

3. Generate the index.

The next several sections of the chapter elaborate on those steps.

Deciding on the Indexing Conventions

As you mark entries, you specify the wording of the entry and the formatting of the page numbers. Therefore, before you start marking entries, you should make some basic decisions about conventions. Here are some things to think about:

Page number format—Will page numbers be bold, italic, or both?

Proper names—Will proper names be listed by the person’s last name, as in Smith, John? (That’s usually the best way to go.)

Acronyms—Will acronyms be listed by acronym or by the spelled-out version, or both? If both, will they both have the page number, or will one of them be a cross-reference to the other?

Verb forms—Will you index verbs by the gerund form (Saving) or the infinitive form (Save)?

Verb versus noun entries—When there’s an action being performed on an object, will it be listed under the noun or the verb? For example, when saving a file, will it be under File with a subentry of Save, or will be under Save with a subentry of File?

Adjectives—Most professional indexers avoid entries that start with adjectives. For example, instead of listing Multiple Tables, you might want to list that under Tables with a subentry of Multiple.

Word form—You’ll want to avoid multiple forms of the same word as primary entries. For example, instead of having separate entries for Install, Installation, and Installing, combine them with a common usage.

Create your list of rules that you’ll follow when indexing, and keep that list handy as you proceed through this chapter.

Marking Index Entries

When you mark an index entry, you specify that the selected word or phrase should be included in the index, along with the page number. You can mark entries manually or automatically.

When you mark entries manually, you maintain complete control over which instances of a term are marked. You might not want every mention of a word to be marked, for example—just the instances where the topic is discussed in detail. Marking entries manually takes a long time in a large document, but this results in a superior index because you can follow the conventions you set in the preceding section.

When you mark entries automatically, you create an Index AutoMark file that contains the words to include in the index. Then you use the AutoMark feature to apply that list to your document, and Word automatically inserts indexing codes for all instances it finds of the words contained in the AutoMark file. AutoMarking is fast, but you lose the ability to make little adjustments to the wording as you go. For example, if you wanted to combine several word forms into a single entry, AutoMarking would not be able to accomplish that.

Manually Marking Index Codes

When you manually mark an index entry, you insert an {XE} field. You don’t have to manually create the field, though; you can use the Mark Index Entry dialog box. The dialog box interface helps you set up the field code, so you don’t have to remember the syntax.


Image Note

Index entries are inserted immediately before the selected text. You do not have to select text in step 1; if you prefer, you can just position the insertion point where you want to place the index entry. If you don’t select text, though, you need to type the entry in step 3; it will not be prefilled for you.


To mark an index entry, follow these steps:

1. Select the text to include in the index. This is usually a single word or phrase (something concise).

Alternatively, if you want to create a single entry for a multiparagraph section, create a bookmark that marks the entire section, and then position the insertion point at the beginning of the section.

2. Press Alt+Shift+X, or on the References tab, click Mark Entry. The Mark Index Entry dialog box opens.

3. In the Main Entry text box, the text you selected in step 1 appears. Confirm that it appears as you want it to appear in the index; change it if needed (see Figure 19.13).

Image

Figure 19.13. Mark an index entry.


Image Tip

If you selected text in step 1 that contains a colon or a quotation mark, Word adds a backslash () symbol before the character to indicate that it is a literal character, not a special code. If you manually type the text in step 3 for the entry, put in the backslash symbol if you’re including a colon or quotation mark.


4. (Optional) Apply any bold, italic, or underline formatting to the Main Entry text as desired. Select the text in the Main Entry text box, and then use these shortcut keys: Ctrl+B for bold, Ctrl+I for italic, or Ctrl+U for underline. To strip off existing formatting, press Ctrl+spacebar.


Image Caution

Use manual formatting as specified in step 4 sparingly and strategically. In most cases, index entries should be plain text. If you selected some text in step 1 that was already marked as bold, italic, or underlined, that formatting carries over automatically; strip it off with Ctrl+spacebar if needed.


5. In the Options section, choose the option button that best represents what you want for this entry:

Cross-Reference—Use this for a reference to another main entry. See “Creating Indexing Cross-References” later in this chapter if you want one of these.

Current Page—This is the default setting. It prints the page number on which the index entry begins.

Page Range—If you choose this, you must then select a bookmark from the Bookmark list. The page range shown is the range on which the bookmarked range lies. You must have created the bookmark in step 1 (or prior to that).

6. (Optional) If you want the page number to be bold or italic, mark the Bold or Italic check boxes.

7. Click Mark. The entry is marked with an {XE} code.


Image Caution

Be consistent with your use of bold and italic for page numbers. Professional indexers sometimes use bold and italic to give special meaning to entries. For example, if there are many entries for a particular topic, they might bold the page number for the most important entry.


8. If you have other entries to mark, leave the Mark Index Entry dialog box open, and select other text and repeat the process. The Mark Index Entry dialog box can remain open as you edit the document.


Image Tip

You can see the indexing codes by turning on the display of hidden characters; click the Show/Hide (¶) button on the Home tab.


9. When you are finished marking entries, click Cancel to close the dialog box.


Image How Can I Use a Colon or Quotation Mark in an Index Entry?

Word interprets a colon in the main entry as a separator between it and a subentry; this enables you to enter the main entry and the subentry together in the Main Entry text box, saving some time. If you want a literal colon in the index entry, precede it with a symbol, like this: 10:00 Appointment.

The same goes for quotation marks. In an {XE} field code, the text is set in quotation marks, so you cannot use regular quotation marks within the code string. If you need a literal quotation mark in an entry, precede it with a symbol, like this: ""WYSIWYG"".



Image I Can’t See the Index Marking Codes I Created

Index field codes show up only when hidden text is displayed. On the Home tab, click the Show/Hide (¶) button to toggle on the display of hidden text.



Image I Manually Created an Index Field Code and It Doesn’t Work

Make sure that you are following the syntax prescribed for field codes in Word. One of the most common mistakes people make is to forget to leave a space after the opening bracket and before the closing bracket. See the “Common Syntax Errors in Field Codes” troubleshooting note in Chapter 16 for more help with field syntax.


Creating Subentries

Often, it is useful to have a multilevel index, in which one major topic is placed in the alphabetic main list and beneath it multiple subtopics form their own mini-list. For example:

Folders
       Attributes, 22
       Creating, 18
       Deleting, 19
       Renaming, 21

To create a subentry, follow the steps in the preceding section, but after step 4, enter the subentry text in the Subentry box. The resulting code creates an entry that is alphabetized according to the Main Entry text, but with a page number next to the Subentry text.

You can also enter a subentry in the Main Entry text box. To do this, separate the main entry and the subentry by a colon, like this: Folders:Creating. Don’t put a space on either side of the colon. To save even more time, you can copy such an entry to the Clipboard and then paste it into the Main Entry text box for each entry you want to create, changing the subentry for each one.

Occasionally; you might find that you need more than two levels of subentries. You can create that by entering multiple colon-separated items in the Main Entry text box. For example:

Folders:Creating:In Windows 7


Image Some of My Marked Entries Don’t Appear in the Index

Here are some things to check:

• Check the spelling of the entry and subentry to make sure that no typos are placing the entry in an unexpected location.

• If your index is in a master document, verify that all the subdocuments were expanded when you generated the index.

• If you are using the f switch to limit an entry to a certain index, ensure that you are using the correct letter with it and that the letter is in quotation marks.

• Ensure that each subentry is separated from the other entries by a colon.

• If you manually added any switches, ensure that you have the syntax right for those switches.

• If the index depends on a bookmark, double-check that the bookmark exists and is spelled correctly in the reference to it in the {Index} field code’s  switch.


Creating Indexing Cross-References

Sometimes. the same content goes by two or more different names, and you aren’t sure which one the user will look up in your index. In a situation like that, if it’s a single entry, you might just include both entries in both places. However, if it’s a complex, multilevel series of entries, you can save space in your index by creating the entries in one place and then cross-referencing them with all the other possible synonyms the user might look up.


Image Note

These cross-references for indexing are different from the cross-references you learned about in Chapter 15, “Copying, Linking, and Embedding Data.” The cross-references covered there insert in-document references and have nothing to do with indexing.


To create a cross-reference, follow the same steps as in “Manually Marking Index Codes” earlier in this chapter, except choose Cross-Reference in step 5, and then enter the cross-reference text in the Cross-Reference text box.

There are two subtly different types of indexing cross-references. The standard “See” type points to the alternate name of a topic where the index entries for it occur. For example, because a folder and a directory refer to the same thing in PC computing, under Directory you might have a listing such as See Folder. A “See also” type, on the other hand, points to a related but not synonymous entry. For example, if some of the information presented in a section on files is also applicable to folders, you might have an entry like this under Folders: See Also Files.

A cross-reference does not insert a page number; it just inserts the literal text you specify. Therefore, it does not really matter where you insert the cross-reference code. You can insert all the cross-reference codes at the beginning or end of the document if you find that more convenient, or you can insert them throughout the document wherever they occur to you.

Marking Multiple Instances of the Same Text

To save some time, you can have Word mark all the instances of a specific text phrase in the document.

Follow the steps in “Manually Marking Index Codes” earlier in this chapter, but instead of clicking Mark in step 7, click Mark All.

Although this procedure marks every instance of a specific word or phrase, it does not mark multiple phrases at once; you have to repeat it for each individual index entry. If you want to automatically mark multiple entries at once, see the next section.

Understanding {XE} Field Codes

The {XE} index marker codes are simple. They do not have options switches; all they have is the XE code plus the index entry in quotation marks, like this:

{ XE "Folders" }

AutoMarking Index Entries

AutoMarking can save you some time if you have a large document to be indexed. Not only does it mark multiple instances of the same text, as in the earlier section, but it marks multiple words and phrases at once. There are two steps in this process: Create the AutoMark file, and then run it to create the entries in your main document.

Creating the AutoMark File

To create the AutoMark file, start a new blank document and insert a two-column table.

Image For information about creating tables, see “Creating a Table,” p. 332.

In that table, in the left column, type words or phrases to be included in the index. In the right column, type the entry the way it should appear in the index. You can use colons to create subentries where needed, as you learned in “Creating Subentries” earlier in this chapter. Apply bold or italic as needed to the text in the right column. If you leave the right column blank for a row, Word uses the same text as in the left column.

Indexing is case-sensitive, so be sure that the left column includes all variations of words that might appear in your document in both uppercase and lowercase. However, make sure that you standardize on either uppercase or lowercase in the right column so that your index contains only one main entry for that word. Further, ensure that you capture all the forms of a word in the left column, but place the same entry for each of them in the right column. For example, Figure 19.14 shows all the entries for words that appear under a single heading of Training in an index.

Image

Figure 19.14. A portion of an AutoMark file.


Image Caution

To prepare for AutoMarking, you must set up a list of words to be marked. Creating this list can take a significant amount of time, so you might find that AutoMarking does not save you all that much time after you’ve taken the trouble to compile the AutoMark file. AutoMarking also will probably not mark everything you want to include in the index, so you will likely need to go back though your document afterward and add more entries manually. It’s a trade-off, and you must determine its usefulness on a case-by-case basis.


After creating all the entries in the table, save and close the file. It does not matter what name you give it, as long as you remember what you chose.


Image Tip

You might want to view the AutoMark table side by side with the main document you are indexing to help you recall what words you want to include. You can manually arrange the windows or use the View tab’s Arrange All button or View Side by Side button to auto-arrange the open windows.


AutoMarking the Main Document

Generating the AutoMark file is the time-consuming part; using it to mark the entries in the main document is quick and easy. Follow these steps:

1. Open the main document to be indexed.

2. On the References tab, click Insert Index. The Index dialog box opens.

3. Click the AutoMark button. The Open Index AutoMark File dialog box opens.

4. Select the AutoMark document you created in the preceding section and click Open. The entries are automatically marked with {XE} codes.

Working Directly with {Index} Field Codes

The index is generated by an {Index} field code. You can see it by selecting the index, right-clicking it, and choosing Toggle Field Codes. Table 19.3 lists the switches for the {Index} field. You do not need to change these in most cases, because they are automatically generated based on your choices in the Index dialog box. They are provided here in case you want to add one of the more obscure options that the dialog box does not control. Some of the sections later in this chapter use a few of these codes for special functions.

Table 19.3. Switches for the {Index} Field

Image

Each of the switches is followed by a parameter, usually entered in quotation marks (except in the case of the  switch, where the bookmark name is not in quotation marks).

Generating the Index

After marking the entries for the index, you are ready to compile it. If you accept all the default formatting options, generating the index is simple. Follow these steps:

1. Position the insertion point where you want the index to appear.

2. On the References tab, click Insert Index. The Index dialog box opens (see Figure 19.15).

Image

Figure 19.15. Create an index from the Index dialog box.

3. Click OK. The index appears in the document.

The index appears in its own section, and a section break is inserted between it and the rest of the document. Because it is in its own section, you can apply different page formatting to it, such as different margins, headers/footers, and page numbering.

If the index doesn’t match what you want in content or appearance, see “Formatting the Index” later in this chapter to learn about the options available for it.

Updating the Index

If you change the document after creating the index, the index might become out of sync with the actual page numbers. To fix this, update the index.

The index is a field code, the same as a TOC or any other similar listing, so you can update it by selecting it, right-clicking it, and choosing Update Field. You can also click the Update Index button on the References tab, or click inside the index and press F9.


Image The Page Numbering in the Index Doesn’t Match the Printed Copy of the Document

This can happen if your document contains hidden text (enough to throw off the page numbering) and the hidden text is displayed when you generate the index. The onscreen version is tracked with the onscreen text (which contains the hidden text), but when you print the document, the hidden text doesn’t print, so the page numbering is off.

On the Home tab, click Show/Hide (¶) to hide the hidden text and then regenerate the index.


Indexing Only Selected Entries

Not every entry marked with an {XE} code must necessarily appear in every index. By manually editing the field codes for your {XE} markers, you can define an entry as belonging to one index or another.

The switch you’ll use for this is f. Follow the switch by a letter, in quotation marks. It can be any letter except “i”. Using “i” indicates it belongs in the master index, which is the same as omitting the f switch entirely. Use the same letter for each entry that should be in the same index together. You can use any single character from the ANSI character set, including letters, numbers, and symbols.

Display the {XE} field codes by toggling Show/Hide (¶) on from the Home tab. Then in each {XE} field, add the f switch and the chosen letter, like this:

{ XE "Tables:Creating" f "k" }


Image Tip

If you need a single {XE} field to appear in more than one custom index, or the custom index plus the main one, insert separate {XE} codes for each index it should appear in. Just copy and paste the existing {XE} code, and then change the letter specified for the f switch.


Next, modify the {Index} field code by right-clicking it and selecting Toggle Field Codes, and then add the same switch and letter to it. Or, to create a new index, create a new {Index} field by pressing Ctrl+F9 and typing Index:

{ Index f "k" }

Indexing Only Selected Letters of the Alphabet

If you need to split your index into multiple sections alphabetically, you might want to create a separate index for each letter or for groups of letters. To do this, use the p switch.

Modify the {Index} field code by right-clicking it and selecting Toggle Field Codes, and add the p switch to it followed by the range of letters (no quotation marks). Place two hyphens between the first and last letters in the range, like this:

{ Index p a--h }


Image Caution

If AutoCorrect tries to convert the double hyphen into a dash, press Ctrl+Z to undo it. If you find yourself using double hyphens a lot, you might be better off disabling the dash conversion in AutoCorrect (covered in “Automating Corrections with AutoCorrect” in Chapter 3, “Correcting and Printing Documents”).


Formatting the Index

Indexes, like TOCs, can be formatted in various ways. Some of those formatting options are layout related and are controlled from the Index dialog box (refer to Figure 19.15); others are style related and are controlled by modifying the Index styles. The following sections explain the details.

Setting the Index Layout

In the Index dialog box (References tab, Insert Index), you can choose from among several options that control the way the index is laid out on the page.

Type

The Type setting controls how subentries appear. The default is Indented, which places each subentry on a separate line and indents it, like this:

Folders
       Attributes, 22
       Creating, 18
       Deleting, 19
       Renaming, 21

The alternative is Run-In, which runs in subentries with the main entry, separating each part with semicolons, like this:

Folders: Attributes, 22; Creating, 18; Deleting, 19; Renaming, 21

Indented layouts are much easier to read but take up more space. If page count is an issue, using a run-in index layout can help fit the index onto fewer pages.

Columns

The Columns setting determines the number of newspaper-style (snaking) columns to be used for the index. Because most index lines are fairly short, using several columns can help fit the index on fewer pages. An average number of columns for a typical index is three. Fewer than that, and there is too much whitespace; more than that, and longer entries are broken into too many short lines.

Language

The Language setting determines the alphabetization rules. There is probably only one option on this menu—the one for the default language and country for your copy of Word.

Right Align Page Numbers

This setting places the page numbers at the right margin of the column; optionally, it adds a tab leader (in your choice of styles) between the entry and the number, like this:

Folders
       Attributes........22
       Creating..........18
       Deleting..........19
       Renaming..........21

Formats

As with TOCs, this setting enables you to apply a different style set to the index than to the rest of the document. The default setting, From Template, uses the same style set as the main document.

Image For more information about style sets, see “Changing the Style Set,” p. 217.

Defining Index Styles

As with TOCs and tables of authorities, the styles for index entries come from built-in styles Index 1 through Index 9. You can modify the definitions of these styles to control the various levels of the index. (An index can have up to nine levels of subentries, which is why there are nine index styles.)

To modify an index style, follow these steps:

1. On the References tab, click Insert Index. The Index dialog box opens.

2. Click Modify. The Style dialog box appears, listing only the index styles (see Figure 19.16).

Image

Figure 19.16. Redefine one or more of the paragraph styles that govern index formatting.

3. Click one of the styles and then click Modify. The Modify Style dialog box opens.


Image Tip

If you want the new definitions of the index styles to be saved with the template so that new documents will use them too, in the Modify Style dialog box, mark the New Documents Based on This Template option button.


4. Make changes to the style, as you learned to do in Chapter 6.

5. Click OK to accept the changes to the style.

6. Repeat steps 3–5 to modify other styles if needed and then click OK.

Image For information about using the Modify Style dialog box to change a style, see “Modifying a Style Definition,” p. 236.

Controlling the Appearance of Index Headings

An index can have headings for each letter—an A heading followed by all the entries that begin with A, and so on. To include such a heading, add the h switch to the {Index} field code.

To use capital letters, follow the switch with a capital A in quotation marks, like this:

{ Index h "A" }

To add other symbols to the heading, include them along with the capital A, like this:

{ Index h "====A====" }

You can use any symbol character in a normal text font (such as * or $), but you cannot use letters of the alphabet. (You can’t use an all-symbol font such as Symbol or Wingdings, however.)

To use lowercase letters, add *lower (not in quotation marks), like this:

{ Index h *lower }

To omit the letter but include spacing, place a space in quotation marks, like this:

{ Index h " " }

Indexing Across Multiple Documents

If you need to index multiple documents as a single unit, your best bet is to use a master document, as described in Chapter 17. Expand all the subdocuments, and then make sure that the insertion point is at the end of the master document (outside of any subdocument) and generate the index. You can mark the entries in the individual documents while they are open within the subdocument, or you can prepare each one individually ahead of time outside the master document.

Another alternative if you don’t like master documents, or if you have problems with them crashing, is to use the {RD} field, which stands for Referenced Document. This was mentioned earlier in this chapter, in the context of TOCs, but it works for indexes as well. An {RD} field tells Word to search another file and use its contents in any index or TOC you create in your current document. You could start a new blank document just for the index and then refer to each of your Word files with a separate {RD} code within it. Then, when you generate the index, the index pulls marked entries from all the referenced files.

You can either press Ctrl+F9 and type RD, or you can insert the field with the Insert, Quick Parts, Field command, as you learned in Chapter 16.

If you are referencing a file in the same location as the file receiving the field, you can place the filename in quotation marks, like this:

{ RD "Chapter1.docx" }

If you need to point to another location, use the complete path, like this:

{ RD "C:\projectfilesdocumentsChapter1.docx" }

After inserting the {RD} field, generate the index as you normally would. The contents of the referenced documents are included in the index using the same rules as applied to the index in the current document.

Creating Multiple Indexes in a Single Document

Just like with TOCs, you can use bookmarks to define regions of the document to include in an index and then index only those bookmarked regions. To do this, you must manually edit the index’s field code to add the  switch.

Follow these steps:

1. Select all the text to be included in the index, and define a bookmark for it. To do so, on the Insert tab, click Bookmark. Type a bookmark name and click Add.

Image To learn about bookmarks, see “Working with Bookmarks,” p. 601.

2. To edit the code for an existing index, select the index, right-click it, and choose Toggle Field Codes. Or, to create a new index code, press Ctrl+F9 to insert new brackets and then type Index followed by a space.

3. In the Index field code, add the  switch, followed by the bookmark name. (The bookmark name does not appear in quotation marks, because it is not literal text but an identifier.)

4. Generate (or regenerate) the index by right-clicking the field code and choosing Update Field.

Image For more information about field codes, including updating them and toggling their displays, see Chapter 16, “Working with Fields and Forms,” p. 623.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.223.99