Fix Page References After Tables
Tables inflict mayhem on scripts that insert index markers. This script fixes it.
Oops, youโre not logged in!
Login 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 5, 2026
This article was first published on February 5, 2026
Commenting is easier and faster when you're logged in!
Recommended for you
A Script to Flag Certain Words in InDesign
Free script to flag risk words in InDesign, so you can spot them easily and remo...
Sort Parent Pages by Prefix
Sorting parent pages in InDesign's Pages panel is cumbersome. If there are more...
Dump Pasted or Embedded Images
Pasted images (images without a link in the Links panel) and embedded images mak...
