Internal Link Behaviour for ePub in iBooks

I have a problem with internal links in epub books: it seems that if a named anchor is placed in the middle or at the bottom of a paragraph that spans > 1 page, when you click on a hyperlink to take you to that anchor, you're taken instead to the page showing the beginning of that paragraph, not the page that actually contains the anchor. This isn't a problem with Adobe Digital Editions.


Can anyone confirm this is true, and should be considered a bug?


Cheers,


Alex

iBooks-OTHER, iOS 5.0.1

Posted on Jan 10, 2012 4:35 AM

Reply
2 replies

Jan 11, 2012 5:55 AM in response to ukzembla

Well, not sure if anyone cares or not but I've discovered that this only applies to empty named anchors (the sort that InDesign generates, for example). If you put any content in the tag, even a space, then it will work. But if you use either the <a id="blah" /> or <a id="blah></a> methods, it'll go to the top of the paragraph as described above. Filling it with an empty span / space using style="display:none" also yields the same (negative) results. So still unsure as to the best method - obviously if you're manually editing the ePub file you can tag the relevant bit of text, but I'm trying to do everything in one sweep using some post-processing...

Jan 11, 2012 6:34 AM in response to ukzembla

OK, so (at least for now) the best bet is to use a valid bit of XHTML to include a zero-width non-joiner (or indeed any zero-width character) inside the anchor. You'll need to use the hex code rather than the HTML entity (e.g. &zwnj;) because the latter won't validate.


I did the following: <a href="blah">&#x200c;</a>. It's not pretty but neither is Apple's implementation of hyperlink anchors. Let me know if you find this helpful!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Internal Link Behaviour for ePub in iBooks

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.