First, a little background: I created a series of documents, each one representing a chapter in my book. Then I created a book and imported all the documents into it. It seems to be working OK; when I export it as an epub, I can page through all the chapters.
But I'm having a hard time figuring out how to make internal hyperlinks. Actually, I created a hyperlink on the first page of chapter (document) 1, pointing it to a text anchor on the last page of the document. It works.
But when I move the text anchor to a different document, it doesn't work.
The link on page 1 looks like this:
<a href="#_idTextAnchor001" id="A1" title="Link">LINK</a>
(I inserted an ID, so I can link back to it from my end notes.)
And this is what the text anchor looks like:I am a TEXT ANCHOR.
I created it with InDesign's Hyperlinks Panel, though I'm doing a lot of work with BBEdit, modifying files in a published epub.
Does anyone have any idea what the problem is or how I can troubleshoot it?
I've learned that, when linking between separate HTML files, you have to include the name of the file. So a link in Chapter1.html pointing to Chapter2.html should look something like this:
<a href="Chapter2.html#101" title="Reference">101</a>
However, my links from Chapter2 back to Chapter1 don't work for some reason. It's probably just some little semantic bug I have to figure out.