Working with Long Documents in Adobe InDesign CS3: Indexes (or Indices)
Indexes (Or Indices)
Sitting down and indexing a book is—in our experience—the most painful, horrible, mind-numbing activity you could ever wish on your worst enemy. And yet, where this is the kind of task that a computer should be great at, it’s actually impossible for a computer to do a good job of indexing a book by itself. A good index requires careful thought, an understanding of the subject matter, and an ability to keep the whole project in your head at all times. In short, it requires comprehension—a quality computer software, at this early stage of its evolution, lacks. Until recently, it also required a large stack of note cards, highlighter pens, Post-It notes, and serious medication.
Fortunately, InDesign has a built-in indexing feature, which, while it won’t make the index for you, does remove the note card and highlighter requirements.
Some people ask us, “Why can’t a computer build an index? InDesign should just give me a list of all the words in my document and what page they’re on.” Unfortunately, this is not an index; it’s a concordance. A concordance records the location of words; an index records the location of ideas. There are times when a concordance can be useful, especially in catalogs. In those cases, you might want to use a plug-in such as Sonar Bookends, which can build concordances automatically and very quickly. But in general, if you’re looking for an index, you’re going to have to do it manually with InDesign’s indexing features.
You can index a document at any time in the production cycle, but it’s almost always best to wait until the text has become fixed—until no text in the document will be deleted, copied, cut, pasted, and so on. The reason: as you edit the text, you may accidentally delete index markers.
The Index panel (choose Index from the Type & Tables submenu, under the Window menu) lets you add either single words or whole phrases to the index, and it displays a list of currently indexed words and phrases (see Figure 8-13). First we’re going to discuss how to add, edit, and remove index entries with the Index panel. Then we’ll explore how to collect all the tagged entries and build a finished index on your document pages.
A Note to the Author Contemplating Self-Indexing
Hire a professional indexer. The author of a text is the worst person for the job. You simply know the material too well (or, if you don’t, why in the world did you write the book?) to create a useful index. A professional indexer will read and understand your text, and will create an index that opens it up to a wider range of possible readers than you ever could. It’s what they do.
Adding a New First-Level Index Entry
There’s very little that is automatic about building an index. Again, it’s not difficult, but you have to be methodical about it. Here are the steps you should go through for each new index entry. (Note that we always differentiate between a new index entry or topic and a new reference to an index entry. For example, “Pigs” might be a new entry for page 34, but when it appears again on page 59, it would simply be a new reference to your already added index entry—see “Adding a New Reference to an Entry,” later in this section.)
To add an index entry, follow these steps (see Figure 8-14).
- If the word or phrase you want indexed appears on the page, select it and click the New Entry button at the bottom of the Index panel, or select New Page Reference from the panel’s menu (or better yet, just press Command-U/Ctrl-U). If the index entry isn’t found on the page, place the text cursor anywhere in the text related to the topic and click the New Entry button. For example, a page may include a discussion of cows, but you want to index the word under the phrase “Farm animals.” In this case, you would simply insert the cursor in the text and click New Entry (or press the keystroke).
- In the New Page Reference dialog box, edit the entry under the Topic Levels heading, if needed. Whatever you type here will be what shows up in the index. Since we’re focusing on first-level entries right now, you can just skip over the other two Topic Levels fields. (We’ll discuss the finer points of second-level entries in “Adding a New Second-Level Index Entry,” later.)
- Index entries always appear in alphabetical order. However, occasionally you may not want your index entry to appear where it would normally be alphabetized. For instance, the famous “17-Mile Drive” would ordinarily be placed at the beginning of the index, before the “A”s. You can place it along with other words that begin with “S” by typing “Seventeen” in the first Sort As field of the New Page Reference dialog box. You’ll probably leave this field blank most of the time.
- The Number Style Override feature is yet one more control that you will ignore most of the time. Let’s say you want the page numbers that refer to an illustration (rather than to just text on the page) to appear bold in the final index. You can build a character style to define how you want the page numbers to appear and—when you’re indexing that illustration—you can turn on the Number Style Override check box and choose that character style from the pop-up menu.
- An index entry can span a range of pages or text. If, for example, your treatise on pigs and goats spans six pages of your
document, you don’t want to have to make a separate index entry for each and every page. Instead, you can specify one index
entry and choose a range of pages in the Type pop-up menu. There are nine page-range choices in the Type pop-up menu, plus
six more cross-reference choices. We cover those last six in “Cross References (X-Refs),” later in the chapter.
In the previous edition, an online reviewer chastized us (thereby taking food away from our hungry children) for our failure to explain in detail when and why we might use each of these index entries. We admit that we thought it was self-evident.
We still think so. You, the indexer, know the text. Knowing the text means that you understand that a given topic covers a specific range of pages or paragraphs (you’d use the For Next # of Pages option or the For Next # of Paragraphs option), or runs from one heading to another (you’d use the To Next Use of Style option and choose the paragraph style of the heading).
- Current page, the default page range, indexes the page that includes the index marker.
- To Next Style Change tells InDesign to index from the paragraph containing the index marker to the next paragraph style change.
- To Next Use of Style is the option we use most often. This indexes from the paragraph containing the index marker to the next use of a specific style, which you can choose in a pop-up menu next to the Type pop-up menu. For instance, let’s say you’ve got a book about farm animals where each animal’s heading is tagged with a paragraph style called “Heading-A.” You could select the heading “Rabbit” and set the Type to “To Next Use of Style.” Then you could choose Heading-A from the pop-up menu of styles. If the “Horse” section starts three pages after the Rabbit section, the page range in the index will span three pages; if it starts 14 pages after, the page range will span 14 pages, and so on.
- To End of Story tells InDesign to index from the paragraph containing the index marker to the end of the current story. Note that InDesign assumes that the story falls on every page. If your story starts on page 1, then skips to page 9, and ends on page 12, the index will display pages 1–12, ignoring the skipped pages.
- To End of Document is the same as To End of Story, but it spans from the paragraph containing the index marker to the end of the file. In the example of the farm animals chapter, you could index the entire chapter by placing the cursor anywhere on the first page of the chapter, specifying an index entry labeled “Farm animals,” and choosing To End of Document.
- To End of Section is the same as the previous two options, but the page range extends from the index marker to the end of the current section (see Chapter 2, “Page Layout”).
- For Next # of Paragraphs works when you know exactly how many paragraphs you want indexed. Unfortunately, currently InDesign only spans to the beginning of the final paragraph, rather than the end of the paragraph—a problem if that paragraph spans two pages.
- For Next # of Pages indexes from the index entry marker for the number of pages you specify.
- Suppress Page Range. Some first-level index entries don’t include page numbers at all. For instance, in the book we’ve been discussing, “Animals” is too broad a topic to include page numbers (every page in the book would be indexed). So you might specify Suppress Page Range for this one entry, and then follow it with 15 second-level entries, each with appropriate page numbers listed. (Again, we discuss second-level entries later.)
- After you’ve chosen the scope from the Type menu, click OK and InDesign adds the index entry to the Index panel, along with the page range. If the indexed text sits on a master page or on the pasteboard, the master page label or “PB” shows up in the Index panel, but these items will not actually appear in the final index.
If you’re happy with the default settings of the New Page Reference dialog box, you can streamline this process significantly by selecting a word or phrase on your page and typing Ctrl-Alt-Shift-[ or Command-Option-Shift-[, which adds the selection to the index, skipping the dialog box. Or, if the selection is a proper name, press the ] (right bracket) instead—that indexes the selection based on the last word in the selection (so James Joyce would show up as Joyce, James). You can control how words in a proper name show up by placing a nonbreaking space between them; for instance, if you put a nonbreaking space between “King” and “Jr.,” then this keyboard shortcut will index the name under King instead of Jr.
Add and Add All
You may already have spotted the Add and Add All buttons in the New Page Reference dialog box. Clicking the Add button adds the index entry but leaves the dialog box open so that you can add more entries. This is very helpful—you frequently need to index the same text using more than one entry.
Add All searches throughout your document for every instance of the index entry and adds it automatically to the index. If you select the word “Bee” on your page and then click Add All, InDesign places another identical index entry at each instance of the word “Bee” in your file. (If you have turned on the Book option in the Index panel, InDesign also adds all instances of the index entry in other documents, too—as long as those documents are open.)
When you click Add All, InDesign uses the same scope (Type) settings for every instance of the entry text. Whether this is a great feature or a potential problem depends on the formatting of your index. If each instance of an indexed topic needs special attention (this one only showing up on this page, the next one using a To Next Use of Style scope, and so on), you should avoid this feature.
You also need to be careful with Add All because it only finds exact matches. That is, if you type “Cow” in the New Page Reference dialog box and then click Add All, InDesign won’t find “Cows” or even “cows”.
As you build an index, think of all the ways that your reader might look for a topic and include those words in your index. For instance, because you’re familiar with your own book, you might include an index entry called “Llamas.” However, another reader might look for “Cute wool-producing animals that spit.” Fortunately, InDesign lets you add cross-references in your index such as “Spitting animals. See Llamas” and “Wool 34–46. See also Llamas”.
To add a cross-reference to your index, you go through the same steps as you would to add a normal index entry. The one difference is that you set the Type pop-up menu to one of the six cross-reference settings: See [also], See, See also, See herein, See also herein, and Custom Cross-Reference. When you select any of these, InDesign provides a text field in which you can enter the cross-referenced word or phrase. If you want your index entry to be “Koi. See Carp” you would type “Koi” in the first Topic Levels field, and type “Carp” in the Referenced field (see Figure 8-15).
- See is generally used when an index entry has no page number references, such as “Supermarket. See Grocery”.
- See also is used when an index entry does have page references, but you also want to refer the reader to other topics, such as “Grocery
34–51. See also Farmer’s Market”.
We like the See [also] option best, because it uses either See or See also, depending on whether you’ve specified page references.
- See herein is a special case in which you are cross-referencing to a second-level entry within the same entry as the cross-reference itself, and it’s used more in legal indexes than anywhere else.
- If you choose Custom Cross-Reference, you can type any kind of cross-reference you prefer, such as “Hey dude, go look at page”.
Note that if you’re cross-referencing to an index entry that you’ve already added to your index, you can find that entry in the list of entries at the bottom of the dialog box and drag it to the Referenced field. That’s certainly faster (and probably more accurate) than typing the words again.
Because no page number is involved in a cross-reference, it doesn’t matter where in your document you specify it (though it must be in a text frame).
Some people prefer to put cross-references at the end of a list of second-level index entries rather than directly after the first-level entry. InDesign won’t do this for you automatically, but you can fake it by creating a dummy second-level entry (see “Adding a New Second-Level Index Entry,” below) and setting its Type to a cross-reference. The dummy second-level entry should just be named with “zzz” so that it automatically falls at the end of the alphabetized list of second-level entries. Later, once you build the index onto your document pages, you will have to perform a Find/Change to remove these symbols.
Adding a New Reference to an Entry
Once you’ve got an entry on your Index panel, you can easily add more page references to it. Let’s say you added the name “Farmer Jones” to your index back on page 13 of your document. Now, “Farmer Jones” appears again on page 51.
- Place the cursor in the appropriate place in the text story. In this case, you’d probably put the cursor next to the word “Farmer” on page 51.
- Click the entry in the Index panel. Here, you’d select “Farmer Jones”.
- Alt/Option-click the New Entry button. Make sure that the Type pop-up menu is set up according to how you want your new reference to appear, and then click OK. If you want to use the default New Page Reference dialog box settings, you can just drag the index entry on top of the New Entry button instead.
Note that while you don’t necessarily have to click the entry in the Index panel in step 2 (you could just retype the entry in the New Page Reference dialog box or select it on the page), we recommend clicking because it ensures consistency. For example, if you relied on your typing ability, you might create the index entry “Chickens” and then later—meaning to type the same thing—create a new entry, “Chicken,” causing two different entries to be made when you only meant to make one.
Adding a New Second-Level Index Entry
Now that you’ve specified first-level index entries, you can—if you wish—add second-level entries. As we mentioned earlier, second-level entries are subcategories of the first-level entries. For example, under the first-level index entry “Grape Varieties,” you might find the second-level entries “Merlot,” “Chardonnay,” and “Syrah.” You can make a second-level index entry just as you would make the first-level index entry, but with two added steps.
After you open the New Page Reference dialog box, click the down arrow button to move your index entry to the second Topic Level field. Then, double-click the first-level entry in the list at the bottom of the dialog box (which enters it in the first Topic Level field).
Once you’ve created a second-level entry, you can place a third-level entry under it. Similarly, you can put fourth-level entries under third-level entries.
Many people prefer to index their text in Microsoft Word before placing the text in InDesign. Fortunately, InDesign can import Word’s index markers, adding the index entries to the Index panel automatically. In fact, if you delete the Word file after importing it, the index topics remain in the Index panel. This is one good way to import a list of topics into the panel without having to type them manually in InDesign. Another way to import index topics is to choose Import Topics from the Index panel’s menu, which lets you select any other already-indexed InDesign document.
Index entries in your panel that don’t have corresponding index markers in the text won’t show up in your final index. If you don’t want to see these topics in your Index panel, select Hide Unused Topics in the panel’s menu to them. To view the topics you’ve hidden, choose Show from the panel menu.
There are several ways to delete an entry from your index.
- To delete an entire entry, including all its page references, select it in the Index panel and click the Delete button. Note that this also deletes all the subcategories under it and their page references, too.
- To delete a single page reference, you can select it in the Index panel (click the gray triangle next to the index entry to display its page references) and click the Delete button.
- To remove a particular page reference in your index, delete the index marker. The marker is a zero-width character, but it is a character nevertheless. To view the character, choose Show Hidden Characters from the Type menu. To delete it, put the text cursor immediately after it (you may have to use the arrow keys to accomplish this) and press Backspace/Delete.
We make mistakes, so it’s a good thing that InDesign gives us a way to edit our flubbed index entries. When you’re editing an index entry, you have to decide whether you want to edit the entry itself or a particular page reference of the entry.
Let’s say that halfway through indexing your document, you realize that the index entry “Martha Washington” should have been indexed as “Washington, Martha.” You can select the entry in the Index panel and choose Topic Options from the panel’s menu—or even faster, you can just double-click the entry. In this case, you’d change the first Topic Level field to “Washington, Martha,” and then click OK.
One of the most common entry edits is capitalizing an entry, so the folks at Adobe snuck a Capitalize feature into the Index panel’s menu (see Figure 8-16). While this is nice, we wish there were a further option to change an entry to lowercase (useful for level 2 entries, which are usually set in lowercase). Maybe next version.
You can also change the scope (type) or style of a particular page reference. For instance, let’s say the reference to Martha Washington on page 47 should have spanned nine paragraphs, but you accidentally set it to Current Page instead. To fix this, click the gray triangle next to the index entry; this displays the page references for the entry. Double-click the page reference that corresponds to the one you want to change (in this case, you’d double-click the number 47). Change the index entry options, and when done, press Return/Enter.
If you actually wanted the above reference to begin on page 48 instead of page 47, you have to select the entry, cut it to the Clipboard, and then paste it in the new location. Selecting entries can be difficult, so make use of the arrow keys and the Shift key.
Know you indexed “bugs” as a second-level entry, but can’t remember which first-level entry it was under? Select Find from the Index panel’s menu to display the panel’s Find field. After typing “bugs” into the field, you can click the down arrow to see the next instance of this entry in your panel. (Or click the up arrow to see the previous instance.)
To control which language scripts (such as Greek, Cyrllic, Japanese Kana, and so on) you want included in your index, and in what order they should appear, choose Sort Options from the Index panel menu (see Figure 8-17). For example, if you have indexed special symbols (such as π), and you want those to be listed at the end of the index, select Symbols and then click the down arrow button to move it below Roman.
Building the Index
You’ve reached the finish line—and it’s finally time to place your index on a document page so you can see it in all its glory. This is the fun part, because you can just sit back, choose Generate Index from the Index menu’s panel, and let InDesign do the work of collecting the index entries and page numbers for you. There is still one more dialog box you need to pay attention to: the Generate Index dialog box (see Figure 8-18).
The Generate Index dialog box presents a (somewhat bewildering) array of choices you need to make in order to get the index of your dreams. InDesign shows you a few controls by default; you can see the others by clicking More Options. Fortunately, once you make your choices in this dialog box, InDesign will remember them the next time you build an index for this document.
Fill in a name for your index in the Title field. InDesign places this title at the beginning of the list, so you might want to type “Index” or “My Indexio Grandioso” or something like that. We leave this field blank and make our own titles. If you do include a title, choose a paragraph style for it from the Style pop-up menu to the right of the Title field. (InDesign automatically adds a paragraph style called “Index Title” to your document when you open this dialog box, but you don’t have to use that style if you don’t want to.)
Replace Existing Index
InDesign knows when you’ve already built an index in a document, and it automatically replaces that index with a new one unless you turn off the Replace Existing Index option. Probably the only time you’d turn this off would be if you wanted to compare two indexes to find differences between them.
By the way, note that when InDesign replaces one index with another, it doesn’t just replace the text. It actually deletes all the index pages and then rebuilds them from scratch. If you’ve spent two hours adding extra formatting to the index, or adding boxes or lines to the pages, those additions are removed when you build the new index.
Include Book Documents
If your document is part of a book (see “Books,” earlier in this chapter), you can choose to build an index for the book by turning on the Include Book Documents option. Note that InDesign can generate the index from all the documents even if they’re not currently open, as long as they’re available in the Book panel (not missing or opened by someone else on the network).
Include Entries on Hidden Layers
If you have multiple layers in your document, you can choose whether to include the text on those layers even when the layers are hidden. While it’s rare that you’d turn this on, you might do so if you have made a layer that contains keywords or explanatory text that you want in the index but don’t want in print (see “Using Dummy Text for Lists,” earlier).
Nested versus Run-In
There are two primary types of index formats: nested and run-in (see Figure 8-19). In a nested index, each entry occupies its own paragraph; in a run-in index, the second-level entries merge with their first-level entry to form one big paragraph. Which you choose is entirely up to you, though it should depend in part on the content of the index. Run-in indexes make no sense when you have third- or fourth-level entries. On the other hand, run-in indexes typically conserve space, especially when they’re set in wide columns (because more than one entry fits on a single line).
Include Index Section Headings
In this context, “section” doesn’t have anything to do with page numbering sections (which we discuss in Chapter 2, “Page Layout”). Rather, the section heads refer to index sections: “A”, “B”, “C”, and so on. Even when you turn on Include Index Section Headings, InDesign only includes the headings for which you have made index entries. If you have no entries that begin with “b”, the index won’t include a “B” section heading. If you really want the empty sections, you can turn on the Include Empty Index Sections check box. We’re not sure why you’d want to do that, but it’s nice to know you can.
The Level Styles section of the Generate Index dialog box lets you apply a paragraph style to each entry in the index. In a run-in index, there’s only one kind of paragraph: the first-level entry (all the second-level entries are merged into the same paragraph). In a nested index, however, each entry level is tagged with its own paragraph style. If you want all your second-level index entries to be slightly indented from the first-level entries (you probably do), make a new style that includes indentation, and choose it from the Second Level pop-up menu (see Figure 8-20).
Once again, designing a readable index is as much an art as a science. Take some time to peruse other people’s indexes, checking for details such as indentation (what does a first-level entry do when it’s longer than one line, for example?) and punctuation.
Note that InDesign builds styles for you called “Index Level 1”, “Index Level 2”, and so on. If you haven’t already created your own styles, then use these and adjust their definitions in the Paragraph Styles panel later.
One of our favorite things about making indexes in InDesign is that we can apply paragraph or character styles to every index element, down to the page numbers and the cross-reference words (such as “See” or “See also”). By assigning styles, you can later make global changes to the look and feel of the index by changing the style definitions. While we often apply styles in the Section Heading and Cross-reference pop-up menus, we usually leave the Page Number and Cross-referenced Topic settings alone. It all depends on the index.
Index formatting is as varied as art directors’ whims—or the whims of the indexers, which tend to be even more obscure. One of the main differences revolves around the incredibly picayune art of choosing punctuation. Do you want an en dash between numbers in a page range or a hyphen? An en dash is more appropriate, but the ends of the dash bump up against some numbers. Fortunately, you can type thin spaces on each side of the en dash in the Page Range field in the Generate Index dialog box. (Actually, we never type these characters themselves; we just select them from the menu to the right of the field.)
You can change the punctuation for Following Topic, Between Entries (which only applies in run-in indexes or where there are multiple cross-references per line), Page Range, Between Page Numbers, Before Cross-reference, and Entry End (see Figure 8-21).