Show the distribution of index markers

One of the criteria for a good index is that its references should be distributed evenly across a book. If most of the references are to the first two of six chapters, then the index is not well balanced. Whether an index is well balanced, however, is not so easy to determine: just looking through an index usually doesn't give you many clues about its spread. But a graphical representation of an index shows the (im)balance straight away.

Note: The script reads information from InDesign's Index panel, not from a generated index. It's therefore not necessary to generate the index before collecting the statistics.

The script creates a bar graph of the document's or the book's index. Each bar represents a page, the length of the bar is based on the number of page references for each page. The screenshot shows the distribution of the index markers in a 400-page book. As you can see, the index markers are nicely distributed. The first part of the book – the frontmatter – contains no markers at all, which is correct; the twelve chapters can be identified by the gaps between them: if the first and last pages of chapters are introductions and summaries and/or references, respectively, they typically don't contain index markers; the last part of the book – the endmatter – often consists of a bibliography, appendixes, indexes, all of which usually do not contain any index markers.

To use the script for a book, open a book file and run the script. No need to open the documents, the script does that. To run the script against a single document, close any books and documents and open just the document you want to create the graph for.

index graphical display

Some details

You can get some details about each graph. The bars are InDesign graphic rules and are visible on the Layers panel. Each graph represents a page, and the script names each graph by its page number and the number of page references. In the screenshot, the selected bar represents page 41 of the book, and that page contains 26 index markers.

index graphical display


Version history

13 Aug. 2017: The script can now be used in books and single documents.

31 Jan. 2015: Posted.


Useful script?

Consider making a donation. To make a donation, please press the button below. This is Paypal's payment system; you don't need a Paypal account to use it: you can use several types/brands of credit and debit card.

Peter Kahrel's paypal account

Show script (right-click, then Save Target/Link As to download)

Back to the main page on indexing

Installing and running scripts

Questions, comments? Get in touch