Indexing Case Sensitive Words

Indexing is a painful word, close to root canal in my opinion. I have been lucky enough in my life to never have had to personally create an entire index. While I have worked on long publications, someone else did the dirty work and supplied the index for me. Despite my hesitations with indexing, it is still an important part of InDesign. Earlier this week a client (who is a technical writer) was upgrading to CS4 presented an interesting problem.

She wanted to know if InDesign was able to index references automatically regardless of case. This was a problem for her because when she would create a reference for a word (“humans” for example) and click “add all” it would only add the case specific version of the word . If her word was at the beginning of a sentence (“Humans are great”), the index marker would not be inserted. If you select the word that is capitalized and add it to the index, it will create another entry that is capitalized. Now you have duplicate words in your index (humans & Humans).

Looking for an answer I searched the help system, opened up my trusty copy of Real Work InDesign CS3 (maybe someday the CS4 version will come out:), but I couldn’t find any help. That is when the sky opened up and the celestial choirs began to sing “GREP, GREP, GREP!”. When you create an index, the index markers are individual zero width characters placed in front of your word. Since these are selectable, you can perform a find/change operation to put them in front of capitalized versions of your word.

1. Create the reference for word as you want it to appear in your index.

2. Select the index marker and copy it to the clipboard. This can difficult if you try to freehand select the marker. To select the marker, either use the story editor (cmd/ctrl+Y) or put your cursor at the beginning of the word and hold shift and press the left arrow to select it.

3. Open Find/Change and choose the GREP tab.
In the “Find what” field, type the capitalized version of your word.
In the “Change to” field, go to the menu and choose other > contents of clipboard, formatted (unformatted works too) and then type in the capitalized word.

4. Make sure you are searching the entire document and click change all.

Now your index marker has been inserted in front of your specific capitalized words in your document. After you preform your search, your index panel will not be listing the page numbers for the entires used in the find/change operation.

After you generate the index, the page numbers will appear on the page and in the index panel. It is probably a refresh bug.


If your word is input multiple ways, HUMANS, humans, Humans, HUMANs, etc. you would need to preform the operation manually for each instance. I image that there is a way to consolidate all of these into one GREP expression, and I welcome suggestions in the comments to improve the search.

Bookmark
Please login to bookmark Close

This article was last modified on July 11, 2023

Comments (11)

Leave a Reply

Your email address will not be published. Required fields are marked *

Loading comments...