Two-Way Hyperlinks/Footnotes

To improve a document's accessibility, the script creates two-way hyperlinks between footnotes and/or endnotes and their references.

This script is part of the Notes collection. See the full collection here. For more information about using the scripts in this collection, see  Adding and Deleting Notes: Managing Cross-References.

This script is part of the Book and Long Document Composition/Production collection. See the full collection here

Footnotes and their references (or callouts) aren’t linked. To make a document more accessible, the script described here adds two-way hyperlinks between footnotes and their references. The note references and the note numbers are clickable. The destinations are text destinations.

For endnotes InDesign does create links. But these are mysterious for they don’t appear in the InDesign document, so I guess that InDesign creates them when you export the document to PDF.

However, unfortunately the links that are created use page destinations, which cause screen readers to continue reading from the top of the page rather than from the note or from its reference (after returning to the text).

The script therefore creates two-way links for endnotes, too. However, in the exported PDF, when you click a reference, it turns out that the target is a page destination so that the full page of notes is displayed. On the other hand, when you click a note number in the note to return to the reference in the text, that destination is a text destination, as expected.

As far as I’m aware the only way to fix this is to open the PDF in Acrobat and make the change there.

Use

The script has no interface. The result is shown in the Hyperlinks panel:

Hyperlinks panel

The name of a link indicates its direction: e.g. Endnote 20 text to note gets you from note 20 back to its reference in the text.

The text anchors are named explicitly as well:

Script window showing text anchors

The anchor Endnote 20 note is the anchor in note 20. (The script to display a document’s text anchors can be found here.)


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