Indexing

Although Microsoft may hate to admit it, even with its new Publishing Layout view, few people actually use Word to publish books. Most “real” books may be written in Word, but they’re usually then poured into a page-layout program like Quark XPress or InDesign for the rest of the process.

That doesn’t stop Microsoft from wishing its word processor were up to the challenge, though. As evidence, here’s Microsoft’s indexing feature, which can spew forth a professional-looking index for a document, complete with page numbers, subentries, and the works. (The operative word, however, is can; indexing involves considerable patience and tolerance on your part. As you’ll soon find out, indexing often involves a descent into Word’s sub-basement of field codes—a pseudo-programming language that’s not intended for casual experimentation.)

Phase 1: Create Index Entries

As smart as Word 2008 is, it can’t read your document and ascertain what the important topics are; you have to tell it which concepts you want indexed.

You do so by reading over each page of your document. Each time you come to an important point that you want included in the index, perform the following steps:

  1. Select the word or phrase that you want to index.

    For instance, in a book about birds, you might want to create an index entry for eggs. So you’d highlight the word eggs in the manuscript.

  2. Press Shift-Option-⌘-X.

    You could also choose Insert → “Index and Tables” → Index tab and then click Mark Entry in the dialog box—but life’s too short.

    Shift-Option-⌘ -X is a keystroke well worth learning (or redefining to something easier—see Resetting everything back to normal), since you’ll be using it often. It opens the Mark Index Entry dialog box with your selected word in the Main entry field, as shown in Figure 7-26. This field represents exactly how it will appear in the index, so, for example if you want your entry capitalized, or not, make it so here.

    The index entry for the term you highlighted doesn’t have to match the text you highlighted. If you’d rather have this index entry say Omelettes instead of Eggs, for example, feel free to type right over the proposed “Main entry” text here.

    Figure 7-26. The index entry for the term you highlighted doesn’t have to match the text you highlighted. If you’d rather have this index entry say Omelettes instead of Eggs, for example, feel free to type right over the proposed “Main entry” text here.

  3. Choose Bold or Italic for the page number, if you like.

    Use this feature to make the principal mention of the indexed term boldface or italic. This will make it stand out from the rest of the page numbers for the same term—to indicate a page where an illustration appears, for example (Eggs, 9, 11–13, 34, 51–52).

  4. Specify a subentry, if applicable.

    For instance, if the material on the current page is mainly about yellow-bellied nut hatch eggs, you may want the index to show “yellow-bellied nuthatch” as a subentry under “eggs” (see Figure 7-26). Type Yellow-bellied nuthatch in the Subentry box. Word assumes that you want this particular phrase indexed as a subentry under “eggs” (or whatever your main entry was in step 1).

  5. Click Mark to create an index entry for your selected word or phrase.

    If you click Mark All instead, Word creates an index entry for every occurrence in the document of the word or phrase you selected in step 1. (The fact that it flags only the first occurrence in each paragraph is actually beneficial, since the entry maybe repeated frequently in a paragraph. The purpose of the index is to direct the reader to the correct paragraph or page; to index each occurrence would create an overly long, cumbersome index.)

    Note

    Mark All is case-sensitive. In other words, Mark All will create entries for each occurrence of eggs, but not Eggs.

  6. Highlight the next entry in your document.

    Unlike just about any other dialog box you’ve ever run across, this one remains open even after you click Mark or Mark All. However, to move on to the next entry, you have to select another word or phrase and then press Shift-Option-⌘ -X again.

  7. Proceed through your entire document, marking each entry you want in the index by highlighting it and then pressing Shift-Option-⌘-X.

    A field code (see Fields) appears in your document after each term you’ve indexed. Because these fields are formatted as hidden text (see Hidden Text), Word automatically turns on the Show/Hide button on the Standard toolbar. That’s why you see line breaks, paragraph breaks, and any other hidden text in addition to the index field codes.

  8. Click Close.

    Now you’re ready to build the index as described on Phase 3: Building the Index.

Cross-references

A cross-reference in an index looks like this: “Eggs, See reproduction.” It tells your reader: "You may be looking under Eggs, but actually I’ve listed all of these entries under Reproduction.” (Of course, if you create a cross-reference for “reproduction,” you have to actually create index entries for that topic!)

To create a cross-reference, follow the steps above, but before clicking Mark Entry in step 3, type the cross-referenced term into the “Cross-reference” box. The word “See” already appears in the “Cross-reference” box; you can type text after it (or over it). For instance, you can change it to “See also” or just “also.”

Page range entries

Occasionally, the information related to your index entry spans several pages, like this: “Eggs, 9-19.” Unfortunately, Word requires that you bookmark the range of pages before creating the index entry. To do so:

  1. Select the entire block of text that you want indexed, even if it’s many pages long. Choose Insert → Bookmark; name the bookmark in the “Bookmark name” box, then click Add.

    You can name the bookmark anything, because this name doesn’t affect the index entry name. If this is the first mention of eggs in the document, for example, you could call it Eggs1. After you click Add, the Bookmark dialog box closes. (See Bookmarks for more on bookmarking.)

  2. Back in your document, click at the end of the selected bookmark text.

    This tells Word where to mark the index entry field. (If you don’t see the bookmark brackets around the text, turn on Bookmarks on the Word → Preferences → View panel.)

  3. Press Shift-Option-⌘-X.

    The Mark Index Entry dialog box appears.

  4. Type the index entry, but then click “Page range.” From the pop-up menu, choose the name of the bookmark you just created.

    This menu lists all the bookmarks you’ve created so far in the document you’re indexing.

  5. Click Mark and continue creating index entries, if you wish.

When you later create the index, the range of pages you bookmarked will appear next to the index entry.

Phase 2: Editing Index Field Codes (Optional)

Like many Word features, Word’s indexing feature relies on fields (invisible placeholders, as described on Fields). Because index entry fields are marked as hidden text (Hidden Text), you can only see them when the Show/Hide (¶) button located on the Standard toolbar (or Formatting Palette) is on. At that point, the indexing codes show up, looking something like this: { XE “eggsFIXME(WDEND)eggs1” }. In other words, if you’d like to see the field codes—so that you can delete them, edit them, or just see where they are—click ¶ on the Standard toolbar or the Document section of the Formatting Palette.

Once you’ve made your field codes visible, you can edit or delete them. To delete an index entry, select it by dragging over its field code (including the brackets), and then press Delete. Unless you want to fool around with editing field codes, deleting an entry is also the easiest way to edit an entry; after deleting the faulty field codes, simply create a new replacement entry, as described on Indexing.

If you’re unafraid to edit field codes directly, however, here’s how to edit the four kinds of index field codes:

  • Single page entry (eggs, 234). The field code looks like { XE “eggs" }. If you misspelled the main entry, made an error in capitalization, or whatever, you can edit the word between the quotation marks. But be careful not to disturb any other part of the code, including the spaces. Also, in this example, the b after the backslash indicates boldface; an i here stands for italic. To change a boldface page number to plain text, for example, delete both the letter b and the backslash.

  • Cross-reference entry (eggs, See reproduction). The field code looks like { XE “eggs" "See reproduction” }. In addition to editing the main entry, you can also change the cross-reference (reproduction) or the additional text (See). Again, be careful not to disturb any other part of the code.

  • Page range entry (eggs, 234-236). The field code looks like { XE “eggsFIXME(WDEND)Eggs1” }. This one’s tricky to edit, because in order to change the range bookmark name (see “Page range entries” on Phase 2: Editing Index Field Codes (Optional)), you have to type in the exact name of the bookmark. However, you can change this into a single-page entry by deleting the bookmark name with its quotes, the backslash, and the r. And, of course, you can edit the main entry name.

  • Subentries (eggs, robin’s, 21). The field code looks like { XE “eggs:robin’s” }. The main entry is before the colon, the subentry is after. You can edit either one, and also create additional layers of subentries just by adding another colon followed by another subentry, and so on.

Phase 3: Building the Index

Once you’ve marked index entries in the document you’re indexing, you can generate the index itself, as follows:

  1. If the field codes in your document are showing, turn off Show/Hide by clicking ¶ on the Standard toolbar to hide them.

    This step ensures that your document is paginated correctly. When field codes are showing, they take up room just like extra words and throw off the page numbers.

    Most of the time, you’ll want to insert a page break or section break just before the index, so that the index will begin at the top of a new page. Then:

  2. Click in your document where you want the index to begin. Choose Insert → “Index and Tables” → Index tab.

    The “Index and Tables” dialog box opens, as shown in Figure 7-27.

    Choose a Type radio button to specify the layout of your subentries.

    If you click Indented, each subentry appears indented under the main entry. If you click Run-in, all entries in the index are flush left. (Watch the Preview window for an example of each.)

    The “Index and Tables” dialog box previews the index you’re about to create. If the Preview in your copy of Word—or, indeed, the final index itself—shows text that’s cramped and hard to read, you need to click the Modify button and adjust the Index1, Index2, and Index3 predefined styles to clearer fonts and paragraph spacing.

    Figure 7-27. The “Index and Tables” dialog box previews the index you’re about to create. If the Preview in your copy of Word—or, indeed, the final index itself—shows text that’s cramped and hard to read, you need to click the Modify button and adjust the Index1, Index2, and Index3 predefined styles to clearer fonts and paragraph spacing.

  3. Choose a Format from the Formats list.

    If you choose “From template,” Word uses your current template’s styles (Styles). To see what the other canned index designs look like (Classic, Modern, and so on), click each and view the results in the Preview window.

  4. Choose a number of columns in the Columns box by clicking the arrows or entering a number.

    You can choose one, two, three, or four columns per page. To save space, most indexes use a multiple-column format. If your document already has columns, choose Auto to make your index match the same number of columns.

  5. Turn on “Right align page numbers” to move the page number out to the right margin of the page or column.

    Turning this on affords you the option of using a tab leader (dots or dashes between the entry and its page number), as shown in Figure 7-27. Choose it from the small pop-up menu at the lower right.

  6. Click OK.

    Word creates an index. This will take a few minutes, especially if your document is long. You can stare at the watch icon or go get a snack.

Phase 4: Cleaning Up the Index

Once Word has finished building the index, you can edit it as you would any text. You can also revisit it in any of these ways:

  • Reformat the index. Click the index and choose Insert → “Index and Tables”; in the resulting dialog box, you can change any of the options on the Index tab, as described above. (Because you clicked the index first, any changes you make will apply to it, even though this dialog box normally creates a new index.)

  • Update the index (Shift-Option-⌘-U). If, after sleepless nights of soul-searching, you decide to edit your document by inserting or deleting text, Word doesn’t automatically update your index; all of its page numbering is now off. Similarly, if you decide to add, delete, or edit some index entries themselves, they won’t be reflected in the index you’ve already generated.

    The solution, either way, is to click in your index and press Shift-Option-⌘ -U. Word updates the index; as when you created the index, this will take some time.

  • Deleting an index. To remove an index from your document, click it and press Option-F9 (it will be represented as a field code). Select and delete the entire field code to delete the index.

Tip

Deleting the index doesn’t delete the index entries you’ve marked in your document. Usually, leaving them in place does no harm, since they’re marked as hidden text and generally don’t print or show up onscreen. But if you need a genuinely clean document, use the Replace command described on Advanced Find. Using the Special pop-up menu, choose Field and replace it with nothing. Word will neatly extract them from your file.

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

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