-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TOC just wrong in random(?) ways #11
Comments
Sadly I can't find any documentation that might help figure out what is happening. The byte positions inside the text are exact (they point to the "<" at the start of the title entry), and yet it seems to lose more and more alignment as the book goes. Might be due to record splitting? |
As far as I can tell the byte positions are "correct" (as in, the filepos value corresponds to the number of bytes from the start to the position that is linked to). Note that as there is no spec, I can't be sure what the value of filepos should be. Also, others seem to be using the same strategy (e.g. Calibre w/ https://github.com/kovidgoyal/calibre/blob/ac8363713b8d82b33516c3806fc142bc04b5ace6/src/calibre/ebooks/mobi/writer2/serializer.py), even though the generated files have different (non-byte-aligned?) offsets?! The difference between the "true" byte distance and the one written by Calibre is, as far as I can tell, irregular, and yet the Kindle interprets it correctly... Not sure what's happening... |
This page: https://mokunosuke.wordpress.com/2012/03/14/%E7%AA%81%E7%A0%B4%E5%8F%A3%EF%BC%9F/ suggests that even kindlegen suffers from this problem. In any case, don't have the time to look deeper into this. Free for anyone to pick up ;) |
thank you very much.now the file can normal work , although it has the problem .so we can slowly to solve it. |
TOC positions seem to not be interpreted correctly, with an inconsistent error. Using the following code to generate a book:
and using the TOC for e.g. the 12th chapter breaks things.
The text was updated successfully, but these errors were encountered: