kindle-epub-fix icon indicating copy to clipboard operation
kindle-epub-fix copied to clipboard

table of contents not working in modified file

Open Anan-Saadi opened this issue 2 years ago • 3 comments

I am not exactly sure what is causing the issue but the modified file is lacking the table of contents (as shown in image below), while the original file does have it, I provided a link to a google drive where you can find both files because github doesn't support uploading .epub files

link: https://drive.google.com/drive/folders/1bvcwH3hTRKdUYNy9AISt6dZhZqai8zur?usp=sharing

20220917_134722

Anan-Saadi avatar Sep 17 '22 11:09 Anan-Saadi

The problem is that the EPUB Table of Content has out-of-order chapter. Amazon does not support out-of-order chapter, so I think the Amazon converter just strip out the entire table of content to allow proper conversion.

I am not sure if this is easily fixable automatically, since the table of content is not necessarily flat. Moving the table of content item to the proper position is hard if it's hierarchical.

The problem with this book is that Chapter 41 is listed in Section 5 in the table of content, but in the actual page order has Chapter 41 come after Section 6 preface.

I will see what I can do, and at least show a warning about this problems.

innocenat avatar Sep 17 '22 14:09 innocenat

Ah sorry I thought this is a proplem in the converter but this is more of an issue in the Kindle and the book itself

Anan-Saadi avatar Sep 17 '22 15:09 Anan-Saadi

I also have an EPUB file whose ToC is not recognized by Kindle: https://cbetaonline.dila.edu.tw/getData.php?type=ebooks_export&export_type=epub&work=X1281

I don't know whether it is the same issue.

Iey4iej3 avatar Mar 05 '23 02:03 Iey4iej3