Fix Page References After Tables
Tables inflict mayhem on scripts that insert index markers. This script fixes it.
Oops, youโre not logged in!
Log in or sign up for a free account.
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 30, 2026
This article was first published on February 5, 2026
Commenting is easier and faster when you're logged in!
Recommended for you
InDesign Tips and Tricks: Working Efficiently with Values
Anyone who uses InDesign for more than two minutes a day knows that there are a...
Number Style Overrides in Books
Number style override settings are ignored for indexes that are generated from B...
Fun with the MakeGrid script
Keith wastes way too much time playing with the handy MakeGrid script that's inc...
