|
|
View Full Version : ePUBs multilevel TOC gets flattened in conversion to MOBI
damnated 08-30-2011, 12:12 PM Hello, first I just want to say, that even though I am a new user, I've been browsing this forum the last couple of weeks, and usually I have found an answer. Even now, I searched before registering/posting this. Without luck, this time.
Until now, I used to convert books from ODT to HTML, format the HTML with chapters and whatnot, then convert it MOBI for my Kindle. I managed to create multi level TOCs this way, and even though it took a lot of time, in the end I was pleased with the result.
I have a couple of ePUBs as well though, and most of them have TOCs themselves. I started converting them, and most of their multi level TOCs remained multilevel in MOBI. Some did not.
And this is what bugs me. I opened the ePUB in Sigil, took a look at the toc.ncx but the XML was ok. I even tried tweaking the ePUB from calibre, but again, the TOC file looked right, and more importantly, it looks just fine in calibre's ebook viewer. I get a nice multilevel TOC, but after I convert it to MOBI, it gets flattened.
During conversion the 'Force use of auto generated TOC' is not checked, and I don't have anything in the TOC filter.
As a final option took a look at the HTML and tried to force calibre to detect the levels in the TOC using the individual classes etc. This time the force use of TOC was checked, but strangely this did not work either.
Could this be because some weird ePUB I have? Any ideas how to get around this?
JSWolf 08-30-2011, 12:36 PM Mobipocket does not support a multilevel ToC. So yes, a multilevel ToC in ePub would get flattened. Now if you mean multilevel as in different indent levels, then that's really not multilevel.
damnated 08-30-2011, 12:40 PM It looks like this in the E-book viewer (MOBI and ePUB)
- Part 1
| - Chapter 1
| - Chapter 2
| - Chapter 3
- Part2
| - Chapter 4
| - Chapter 5
| - Chapter 6
| - Subchapter 1
| - Chapter 7
+Part3
On the Kindle it has only indents, that's true. Is this not multilevel then?
JSWolf 08-30-2011, 12:44 PM What reader are you using to view your Mobi and can you please post a sample that has this multilevel ToC?
damnated 08-30-2011, 12:50 PM <navPoint class="part" id="part-1" playOrder="7">
<navLabel>
<text>Part I</text>
</navLabel>
<content src="Text/Book_part-1.html"/>
<navPoint class="chapter" id="chap-1" playOrder="8">
<navLabel>
<text>Chapter 1</text>
</navLabel>
<content src="Text/Book_chap-1.html"/>
</navPoint>
<navPoint class="chapter" id="chap-2" playOrder="9">
<navLabel>
<text>Chapter 2</text>
</navLabel>
<content src="Text/Book_chap-2.html"/>
</navPoint>
<navPoint class="chapter" id="chap-3" playOrder="10">
<navLabel>
<text>Chapter 3.</text>
</navLabel>
<content src="Text/Book_chap-3.html"/>
</navPoint>
<navPoint class="chapter" id="chap-4" playOrder="11">
<navLabel>
<text>Chapter 4.</text>
</navLabel>
<content src="Text/Book_chap-4.html"/>
</navPoint>
</navPoint>
For instance, this is a multilevel TOC, right?
For some books, this looks good in MOBI and ePUB, but for other books after the conversion to MOBI, I don't have multi levels.
The sketch in my previous post above is how I see the TOC in the E-book Viewer of calibre. On the device, Kindle, I see indents after each sublevel.
If I see a one level TOC in the E-book Viewer (PC) I see a flat TOC in Kindle as well, no indents or anything.
I hope I am being clear :)
JSWolf 08-30-2011, 12:54 PM The E-book Viewer is on the PC. It came with calibre.
It's the Calibre eBook viewer doing it. You won't get a multilevel ToC on the Kindle. Try taking a look using Kindle Previewer. You'll see just what sort of ToC you will get with the Kindle.
damnated 08-30-2011, 12:59 PM I was editing the post, took me a while with the indents.
JSWolf 08-31-2011, 02:00 PM That would work for ePub, but Mobipocket does not support the NCX file other then to convert it. So even if you make the NCX multilevel, it won't be multilevel on your Kindle. The only way to have a multilevel ToC is to get a different device that supports ePub.
damnated 08-31-2011, 02:09 PM Yes, yes, I understand that, that wasn't the issue at all.
What I am saying is, that some ePUBs with multilevel TOCs get converted one way, and others in another. Their TOC looks the same, but in MOBI some look different.
Most of them have indents (what I want) some don't. Why is this.
JSWolf 08-31-2011, 02:20 PM No idea why some ToC entries get indents in the mobi file and some don't. I've not really converted a lot to Mobipocket. When I first started reading eBooks, I used MS Reader mostly and then ePub.
DoctorOhh 08-31-2011, 11:51 PM It looks like this in the E-book viewer (MOBI and ePUB)
The ebook viewer in calibre is a ePub viewer. Your mobi file is essentially converted to epub for viewing and should not be used as a judge for what a converted mobi does or doesn't do.
damnated 09-01-2011, 12:52 PM Okay, I understand everything. Thanks for the responses guys.
The answer to my question is, I guess, bad formatting. I will format my books in ePUB from now on, then convert for Kindle.
I think I have been having the same problem, I think.
Here's the path my document takes. (Working with calibre on a Mac.)
Word > html on desktop
>add to calibre
>convert to Mobi
I managed to set up a multi-level TOC that displays correctly within the Mobi ebook when viewed on the Kindle desktop app for Mac, but the TOC that the app itself displays outside the ebook (when you click the app's TOC icon) does not display the multiple levels.
The TOC has 2 levels. For level one, I used the XPath expression //h:h1. For level 2, I used the XPath expression//h:h2.
Below is a jpg of a dummy version. Note that in the Kindle TOC (left side) it seems as though the chapters in "Story Two" are part of "Story One".
My question: Can calibre be configured so that Kindle displays the indented chapters, or should I just scrap the levels?
http://imageshack.us/photo/my-images/705/tocd.jpg/
damnated 09-02-2011, 02:21 PM I think this answers your question http://manual.calibre-ebook.com/faq.html#what-s-the-deal-with-table-of-contents-in-mobi-files
in short: it's a limitation of the mobi format.
Image didn't post. Here's the link:
http://imageshack.us/photo/my-images/705/tocd.jpg/
|