Copy link to clipboard
When a document is set up with a TOC built on paragraph styles, bookmarks are created in addtion to what seem to be hyperlink destinations as there is the invisible colon character at that position in the text. However when creating a new hyperlink to a destination within the document, bookmarks are not an option to choose from and the bookmark names don't appear in the Text Anchor drop downs. Instead there are text anchors or hyperlink destinations listed (for what seems like each bookmark in the document) but without the names so they each read "_idTOCAnchor-#". The number at the end does not correspond to anything useful like the page number or anything else i can determine. Is this intentional or a bug? When you set a hyperlink to one of these anchors they do link to a bookmark position but theres no easy way to determine what they are so it seems like they are just the bookmark anchors bugging out. Is there a way to see where the hyperlink destinations are corresponding to?
My next work around was just to make a new Text Anchor at the location i want to link to, but manually created Text Anchors don't show up in the Hyperlink dialog when the Link To: drop down is set to Text Anchor. again is this a bug?
The last work around is just to make a new Hyperlink Destination, which works and shows up in the Hyperlink Dialog, but thats the only place to view and manage them other than the Hyperlink Destination Options dialog, which lets you rename them but won't point you to where they are.
Copy link to clipboard
I think you're conflating what hyperlinks, bookmarks and tables of contents do with how they're created within InDesign.
Like many programs, InDesign may offer multiple options for creating something — sometimes, with different results. As you've discovered, there are options for creating by-products when you create your Table of Contents. You can create global PDF bookmarks within a single InDesign document when you create your ToC. This gives you ToC entries you can click on and move around with inside a related PDF file. Creating hyperlinks can be used to move to tagged text, like it would with a PDF bookmark, but InDesign does not give you that capability to create both from the Hyperlink panel. The hyperlink/tagged text is an absolute reference (exact position inside a given text thread inside the document), and not a relative one (like the page it's sitting on).
In your use case, they all seem to refer to the same place, but in different ways and using different functions to get different results. For print and fixed ePubs, the difference between the three are not that pronounced — all three would refer to, say, the heading for Chapter 11 on page 153. But they get there in different ways.
With the ToC entries, they're generated as a snapshot in time by InDesign. It takes into account where a paragraph style resides in your document at that moment, accounts for the page it sits on, and creates a text entry with the page number 153. Selecting the Create PDF Bookmarks check box in the Table of Contents dialog box overlays an interactive field that lets you click on the ToC entry and takes you to the top of page 153 in the PDF document. That's a locating feature in the digital file, and useful when working with the PDF directly or using it as a fixed ePub. But you wouldn't be surprised to find that doesn't work very well when you tap it on a printed page.
The ToC entry is a relative link. When you generate the ToC it refers to the heading for Chapter 11 on page 153. Add 5 pages to Chapter 4, and the ToC won't automatically change the entry to its new location on page 157. You'll have to rerun the Table of Contents functions within InDesign to make the correct update.
The PDF bookmark is an interactive link, but not an absolute link to the position of that text. When you click on it in the PDF file it'll still go to the heading for Chapter 11 (or not, depending on how you may combine multiple PDF files into an overarching document), but with those four pages added to Chapter 4 in your PDF it'll still say the page is 153 unless you change it. Or update the original InDesign document and create a replacement PDF file. Yet if you plugged in those four pages with Acrobat instead of InDesign, you'd notice that while Chapter 11 still said page 153, in the toolbar it'd say page 157. The page number is the relative reference; the page count in the toolbar is the absolute page reference.
Hyperlinks/tagged text is an absolute reference made for specific text at an exact spot within the text thread itself. It doesn't care what page it's on. That's a handy feature when you're wanting to locate content in reflowable ePubs and/or accessible content conforming to Americans with Disabilities Act standards. It's but a mere coincidence that your hyperlinked/tagged text for the header for Chapter 11 resides on page 153.
So while they all seem to be in the same place in your InDesign layout, they refer to different things and are designed for different desired outputs. So I wouldn't call it so much a bug, but functions designed to generate different outputs that all converged at the same point. It's the way the tools have been designed. That doesn't mean that it couldn't be designed better for your needs, though. Using this link lets you submit bugs and/or feature requests to Adobe Systems.
Hope this helps,
Copy link to clipboard
Partially helps, thanks for the response. I suppose my issue is why dont the Hyperlink Destinations created by the TOC have names corresponding to the TOC bookmarks that are generated? And why dont my manually created text anchors show up in the hyperlinks Text anchor links drop down? the bookmarks and text anchors show up in the buttons panel but not in the hyperlinks.
For additional context, and i apologize for not mentioning this earlier, but i am exporting for HTML, and while I know InDesigns HTML support is limited i know that the _idTOCAnchors do work as intended to bring you to the corresponding page, but there is no way built into indesign to know what or where those anchors are. I'm currently using this script from Peter Kahrel to identify the anchors but it seems silly i would need a script to figure out something built into the software, especially since the Hyperlinks Destination Options lets you rename them, but not identify them.