View Single Post
Old 07-14-2015, 04:56 AM   #5
Phssthpok
Age improves with wine.
Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.Phssthpok knows how to set a laser printer to stun.
 
Posts: 585
Karma: 95229
Join Date: Nov 2014
Device: Kindle Oasis, Kobo Libra II
I have done some experiments and discovered a fix, which may in turn suggest the cause of the bug.

The HTML files in the book are in a directory called OEBPS/Text. The inline ToC that Calibre generates is placed in the root directory, and the symptoms on conversion are then as I describe. However, renaming the ToC to be OEBPS/Text/toc.xhtml fixes the problem.

This suggests that the conversion is struggling with files in the root directory. Note that the links are to CSS files in "../..". This suggests to me that the initial conversion from EPUB to internal XHTML generated these links, and the output conversion to EPUB ignored them. The stylesheet files in the ePUB are in OEBPS/Styles, by the way, so the correct way of referring to them would be "../Styles/stylesheet.css".

The AZW3 has all the HTML in a directory called "text" and the CSS is in "styles".

It seems that either the inline ToC generatior should put the file in the same directory as the other HTML files, or the conversion from EPUB should handle HTML files in a mix of directories correctly, or (ideally) both.
Phssthpok is offline   Reply With Quote