Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle

Notices

Reply
 
Thread Tools Search this Thread
Old 04-01-2011, 12:52 PM   #1
peartree
Enthusiast
peartree began at the beginning.
 
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.
peartree is offline   Reply With Quote
Old 04-01-2011, 01:16 PM   #2
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,541
Karma: 193191846
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.
DiapDealer is offline   Reply With Quote
Advert
Old 04-01-2011, 02:06 PM   #3
Blossom
Treasure Seeker
Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.
 
Blossom's Avatar
 
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.
Blossom is offline   Reply With Quote
Old 04-01-2011, 02:19 PM   #4
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,541
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Even better!
DiapDealer is offline   Reply With Quote
Old 04-01-2011, 02:38 PM   #5
peartree
Enthusiast
peartree began at the beginning.
 
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?
peartree is offline   Reply With Quote
Advert
Old 04-01-2011, 03:06 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,541
Karma: 193191846
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.
DiapDealer is offline   Reply With Quote
Old 04-01-2011, 03:29 PM   #7
Blossom
Treasure Seeker
Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.Blossom ought to be getting tired of karma fortunes by now.
 
Blossom's Avatar
 
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.
Blossom is offline   Reply With Quote
Old 04-01-2011, 05:26 PM   #8
peartree
Enthusiast
peartree began at the beginning.
 
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."
peartree is offline   Reply With Quote
Old 04-01-2011, 05:36 PM   #9
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,541
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
I tried entering both of those in the level 1 TOC box but I get a popup saying "Xpath expression is invalid.
Just use the expression builder button to the right and select h3 from the drop down menu--instead of trying to create the expression yourself. For h3 the expression that the builder produces is:
Code:
//h:h3
The chapter divs would also work. The builder produces the following expression:
Code:
//h:div[re:test(@class, "chapter", "i")]
DiapDealer is offline   Reply With Quote
Old 04-01-2011, 06:00 PM   #10
peartree
Enthusiast
peartree began at the beginning.
 
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!
peartree is offline   Reply With Quote
Old 04-01-2011, 06:02 PM   #11
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,541
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Not a problem.
DiapDealer is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 05:51 PM.


MobileRead.com is a privately owned, operated and funded community.