Index Graph: Show the Distribution of Index Markers

To show how the index markers (page references) are distributed across the document, the script creates a bar graph where each bar represents a page and the length of each...

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

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.


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...