0

The Table of Contents of this .ePub file seems to incorrectly link to one page previous to the desired page. For instance if 'Part 2' is clicked, it directs to the last page of 'Part 1'. I have looked over the source files, but it is unclear to me how I can rectify this issue.

Any help in fixing this file will be greatly appreciated

2 Answers 2

0

It looks like the anchor tags were put in the wrong place. If you unzip the .epub, you'll see that the link for Part 1

<p><a id="link2H_PART1"><!--  H2 anchor --></a></p>

is at the end of the first (navigational TOC) file, 1250-h-0.htm.html rather than the file for Part 1, 1250-h-1.htm.html.

If you move each of those links to the beginning of the correct file (right after the <body> tag and before the <h2> would be a good place) then that should fix your problem.

1
  • I appreciate the suggestion, but it seems as if the solution was something else Jan 30, 2020 at 0:03
0

It turns out the chapter file names were incorrectly listed in the OEBPS TOC.

I resolved the issue by:

  1. Opening the first file (navigational TOC) in the OEBPS folder of the unpacked .ePub (.zip)

  2. Correcting the 'h-#' portion of the href in each tag by incrementing by 1. For instance, the first href which was "@public@vhost@g@gutenberg@html@files@1250@[email protected]#link2H_PART1", becomes "@public@vhost@g@gutenberg@html@files@1250@[email protected]#link2H_PART1".

  3. Saving and repackaging the .ePub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.