Index: Ignore Insignificant Words

An index should be sorted while ignoring insignificant words, such as (in English) the, a, an, and, in, on, etc. The scripts collects insignificant words from a user-defined text file...

This script is part of the Indexes and Concordances collection. See the full collection here

An index should be sorted while ignoring insignificant words, such as (in English) theaanandinon, etc. It’s straightforward to create sort strings for topic names in which the initial insignificant words have been removed.

Use

The script looks for a plain-text file that lists the insignificant words, one word on each line. This text file must be named insignificant-words.txt and must be placed in the InDesign document’s folder. If you target a book, open all book files, then run the script.

The script has no interface. It reads the word list, then processes the open InDesign documents. It first checks whether a topic name has a sort order string applied. If that’s the case, that string is processed, otherwise the sort-order field is filled with the topic name without the initial insignificant words.

The check on insignificant words is cumulative, by which I mean that if two or more insignificant words appear at the start of a topic name, they’re ignored. Thus, for the tpic name In the Heat of the Night the sort order is set as Heat of the Night.


Peter Kahrel Script Repository
Hosted as a community service, and with deep appreciation, by CreativePro.com


Scripts by Topic | Script Index
Basic Script Installation and Use
How to Modify or Configure These Scripts
Resources for Scripting and Publishing Automation
About This Repository


Repository Home Page


Contact Peter Kahrel


Note to users: You run scripts at your own risk: CreativePro and the author accept no liability for anything that may be caused by any of these scripts. Always take the necessary precautions. We encourage you to save backups and test scripts on copies of your documents.

Bookmark
Please login to bookmark Close

This article was last modified on August 22, 2026

Comments (0)

Leave a Reply

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

Loading comments...