Endnotes and Cross-References Broken in EPUB

Learn / Forums / General InDesign Topics / Endnotes and Cross-References Broken in EPUB

Viewing 4 reply threads
  • Author
    • #125710

      Hi everyone. I am having a problem with Endnotes and Cross-References in my EPUBs. Exporting to fixed layout seems to disable all links. I am not sure if that is expected or not. Exporting to reflowable layout causes strange behavior. This question is primarily concerned with exporting a functional reflowable EPUB.
      I have my Endnotes second-to-last chapter of my book. The endnotes are configured to use per-story numbering. When I export to reflowable format the endnote behavior is erratic. Sometimes the references link to the title page, and other times they link to the page just after the referenced page. They sometimes work as expected as well. I have found that once the file exports a broken EPUB the damage is irreversible. I can go in and undo the changes and, but from them on the EPUB generation will fail.
      I originally thought the problem might be because I was using the “Split Document” feature in order to get page breaks between chapters. However, upon disabling that feature I discovered something unusual. I began inserting the line breaks manually. I would enter a single line break and then generate the EPUB to test. Sometimes the generated file would work correctly and sometimes not. It appeared to be entirely random. I can also duplicate this behavior simply by changing a paragraph style and then attempting the EPUB export. The generated file seemed to fail 50% of the time.
      Every Cross-Reference in my book is linking to the page after the appropriate page. So if the cross reference is on page 20 and links to page 152, clicking the cross-reference on page 20 will take me to page 153.
      I have been teaching myself InDesign over the past three months and I am feeling more and more confident each day, but this is a little deflating. I have no idea how to fix the problem. My last ditch effort is going to be to remove every Endnote and Cross-Reference from the document and then try recreating them all (perhaps after starting over from a new document), but that process will take me weeks. I am hoping someone here can offer some insight and save me that headache.

      • This topic was modified 1 week, 4 days ago by Jorge Diaz.
    • #14331290

      After creating an entirely new file and getting the same results mentioned in the op, I finally had the idea of verifying the generated EPUB with EPUB-Checker. I couldn’t find anything wrong with the .idd file so I looked at the generated html. What I ended up finding was a mess.
      The endnotes section of the html looks something like this:
      <p class=”Notes_Notes-List-1″><span id=”endnote-037″>1 “My Endnote Text.</span></p>
      But the section <span id=”endnote-037″> is often exported like this <span id=”endnote-000”>. Sometimes I would export to EPUB and all the endnote ids would be set to 000, sometimes just a a subset would be set to 000, and sometimes they would all be correct. This explains the random behavior I was seeing. However, even after going in and fixing these errors when viewing the EPUB in iBooks, the endnotes still randomly link to either the correct endnote page, or the page just after the correct page.
      Unordered Lists.
      I am not yet sure if this is related, but it seems that sometimes Indesign exports the EPUB with incorrect html tags; at least regarding unordered lists. I found at least one unordered list for which the close tag appeared long after the end of the list. This means that everything until the close tag was logically included in the unordered list. Like I said, I have no idea what impact this may or may not have on the issue I am having with the endnotes.

    • #125777
      Aaron Troia

      Hey tim,
      So with the Cross-References going to the wrong page, I can tell you that the reason they are taking you to the next page is that I’m guessing your page marker/anchor is at the bottom of the page, it is being very literal and taking you to the bottom of the page (where your anchor is), which, if you think about it, is the top of the next page. To correct this you will need to place your page anchors at the top of the page so that when you click on a reference it takes you to the top of the correct page.
      As far as Endnotes go, I can’t say that I have been a big fan of InDesign’s Endnote feature (which I am assuming you are using?) for epub export. I personally import static endnotes (which you can specify when you import your doc) and do the cross referencing via GREP in the HTML post export. I know it’s not everyone’s cup of tea and it probably doesn’t help with what you are asking, I wish I had a work around for the issue you are having.

    • #14331291

      Thank you Aaron! I will look into my page markers/anchors. Hopefully that will also address the similar behavior I am having with the endnotes.
      I have thought about switching to a method of manually linking the endnotes as you suggest. I can’t do that for the first run of the book (not enough time), but I will probably switch asap. I do wish I didn’t need to though.
      Thanks again,

    • #14331292
      Aaron Troia

      No problem Tim. It can be quite the learning curve, especially while trying to learn InDesign on top of it all.

Viewing 4 reply threads
  • You must be logged in to reply to this topic.