New InDesign Script to Set Keep Options in Indexes
InDesign’s Keep Options are very useful for, well, keeping lines of text together on a page in long documents. You can use them to prevent widows and orphans, or to ensure that section titles always stay with the following paragraph (or a specific number of lines from that paragraph). They’re most useful when applied as part of a paragraph style.
Applying Keep Options in an Index
While Keep Options are very useful in body text, they don’t offer the kind of flexibility that would make them useful in an index. For example, the Keep With Next option only works on lines within a paragraph. You can’t set a single keep option to control multiple paragraphs, like you’d encounter in a list of index topics or subtopics.
But thanks to Peter Kahrel, there’s a free script that you can use to set keep options in an index. Specifically, you can set two keep options in the script:
- The number of topics to be kept with section headings
- The number of subtopics to be kept with their parent topic.
You can read all about how the script works, how to edit it, and download it here.
A Script for Showing Keeps
Whenever you use keep options, there’s the potential for confusion, especially if you’re collaborating with others. It can be hard to tell why certain lines are jumping to the next text frame, or staying put. So, as an added bonus, Peter has also released a companion script to reveal keeps by highlighting them with InDesign’s conditional text features. You can download the Show Keep script here.
Thanks, Peter! And keep up the good work!