Clean Up Index Topics
This script cleans up topic names in the Index panel so that you don´t have to clean up text in the generated story every time you regenerate the index. (It renames both entries: in Topic Levels and Sort By fields).
For example, say, I want to replace all N-dashes with M-dashes:
Before
After
This version makes only three types of replacement:
- All en dashes (metacharacter: “^=”) to em dashes (metacharacter: “^_”)
- All hyphens to em dashes UNLESS the word after the hyphen begins with a lower case letter
- All ampersands (&) to “and” (no quotation marks)
But you can adjust it to your needs. Edit, or duplicate and edit one of the following blocks of code:
Add your GREP or text expressions (marked with yellow on the screenshot above). If you don´t know how to build a regular expression (GREP), you can ask this at the Adobe InDesign scripting forum.
When the script is running a progress bar appears and at the end an alert tells how many topic were renamed.
Click here to download it.