04-01-2011, 12:52 PM | #1 |
Enthusiast
Posts: 30
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Paperwhite
|
Converting EPUB to MOBI - missing chapter markers
I've converted a few EPUB books from my local library to MOBI since I got my Kindle, and it's worked just fine in the past. The latest book I've converted doesn't have chapter markers, however. I also can't jump chapters by pressing left and right on the d-pad, although it did generate a table of contents. Is there any way I can get the chapter markers to show up, using Calibre or anything? Thanks.
|
04-01-2011, 01:16 PM | #2 |
Grand Sorcerer
Posts: 27,882
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
That particular library epub must not have a toc.ncx file.
You could open the original epub in Sigil and make sure it has (or create if it doesn't) an official table of contents--using the TOC Tool. Just having the html representation of a toc is not enough to create chapter markers when converting to mobi. Then convert to mobi with Calibre. |
Advert | |
|
04-01-2011, 02:06 PM | #3 |
Treasure Seeker
Posts: 18,708
Karma: 26026435
Join Date: Mar 2010
Device: Kobo HD Glo, Kindles, Kindle Fires, Andriod Devices
|
What I do is check the forced TOC box in Calibre then add the correct regex to catch the chapter headings in the Level TOC 1 box. This will override any TOC that came with the original copy and have Calibre remake it correctly so you can have chapter navigation on the Kindle.
|
04-01-2011, 02:19 PM | #4 |
Grand Sorcerer
Posts: 27,882
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Even better!
|
04-01-2011, 02:38 PM | #5 |
Enthusiast
Posts: 30
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Paperwhite
|
Thanks for the replies. That sounds easy enough, except I'm not sure what regex is. What exactly should I put in that Level 1 TOC box?
|
Advert | |
|
04-01-2011, 03:06 PM | #6 |
Grand Sorcerer
Posts: 27,882
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
You'd need to look in the html source of the epub and see what tags and attributes are being used that will uniquely identify the chapter headers (usually <h1>, h2, h3, h4 or <div class="chapter"> and the like). Armed with that info, you can use the 'wizard' button to build the regex for you. You can use the Tweak epub feature (right click on the ebook in Calibre) to explode and explore the epub source. You won't need to rebuild the epub if you're just looking.
Last edited by DiapDealer; 04-01-2011 at 03:12 PM. |
04-01-2011, 03:29 PM | #7 |
Treasure Seeker
Posts: 18,708
Karma: 26026435
Join Date: Mar 2010
Device: Kobo HD Glo, Kindles, Kindle Fires, Andriod Devices
|
You can also use the Search and Replace wizard in Calibre to view the coding of the book.
It's alot quicker then opening a bunch of html files looking for a chapter header. |
04-01-2011, 05:26 PM | #8 |
Enthusiast
Posts: 30
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Paperwhite
|
Sorry, I'm still not totally getting it. I looked at the html source, and the chapter headings have both <div class="chapter"> and <h3>. The <h3> tags are inside the <div> tags, so does that mean <div class="chapter"> is the one I need? I tried entering both of those in the level 1 TOC box but I get a popup saying "Xpath expression is invalid."
|
04-01-2011, 05:36 PM | #9 | |
Grand Sorcerer
Posts: 27,882
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
Code:
//h:h3 Code:
//h:div[re:test(@class, "chapter", "i")] |
|
04-01-2011, 06:00 PM | #10 |
Enthusiast
Posts: 30
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Paperwhite
|
Ah, success. It's pretty simple once you actually know what to do. Thanks!
|
04-01-2011, 06:02 PM | #11 |
Grand Sorcerer
Posts: 27,882
Karma: 198099188
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Not a problem.
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Chapter markers: why oh why do so many books not have them? | foghat | Amazon Kindle | 36 | 02-28-2011 05:52 PM |
Chapter markers for chapters with the same name | JohnFreeman | Conversion | 3 | 02-25-2011 04:14 PM |
Missing text while converting PDF to mobi | jhkaplan | Calibre | 1 | 12-12-2010 08:54 PM |
Chapter Markers? | djulian | Calibre | 3 | 11-20-2010 11:15 PM |
Kindle Chapter Markers | penguintri | Amazon Kindle | 7 | 09-13-2010 01:47 PM |