Fix Page References After Tables
Tables inflict mayhem on scripts that insert index markers. This script fixes it.
This script is part of the Scripting Tools collection. See the full collection here.ย
Return to Index Fixes page.
When a script inserts an index marker and the text contains one or more tables between the insertion point and the beginning of the story, the marker is inserted too far ahead in the text. The more tables there are and the bigger those tables, the bigger the offset. (This doesnโt happen when you add a page reference by hand.)
Any script that places page references must be aware if this.
This fix is fairly simple. See the function in this script.
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
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.
This article was last modified on September 5, 2026
This article was first published on February 5, 2026
Commenting is easier and faster when you're logged in!
Recommended for you
The Peter Kahrel Script Repository Gets a CreativePro Makeover
Peter Kahrel is one of the most prolific and influential InDesign scripters of a...
How to Install Scripts in InDesign
We all love the power of using scripts, but before you can use them, you have to...
Get Hyphens
The script collects the hyphenated words in a document and lists them in a new d...
