|
|
#1 |
|
Member
![]() Posts: 24
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Kindle 3
|
Converting EPUB to MOBI - missing chapter markers
|
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,989
Karma: 24340264
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
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.
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,004
Karma: 4552989
Join Date: Mar 2010
Location: Eastern TN
Device: PW/K4B/K4S/K3+3G KFire/SGP 5.0/LG Vortex
|
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.
__________________
Looking for a Dropbox alternative? Join Copy & get 20GB of Cloud space for FREE! |
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,989
Karma: 24340264
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Even better!
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
|
#5 |
|
Member
![]() Posts: 24
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Kindle 3
|
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?
|
|
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,989
Karma: 24340264
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
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.
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” Last edited by DiapDealer; 04-01-2011 at 03:12 PM. |
|
|
|
|
|
#7 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,004
Karma: 4552989
Join Date: Mar 2010
Location: Eastern TN
Device: PW/K4B/K4S/K3+3G KFire/SGP 5.0/LG Vortex
|
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.
__________________
Looking for a Dropbox alternative? Join Copy & get 20GB of Cloud space for FREE! |
|
|
|
|
|
#8 |
|
Member
![]() Posts: 24
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Kindle 3
|
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."
|
|
|
|
|
|
#9 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,989
Karma: 24340264
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Quote:
Code:
//h:h3 Code:
//h:div[re:test(@class, "chapter", "i")]
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
|
|
|
#10 |
|
Member
![]() Posts: 24
Karma: 38
Join Date: Dec 2010
Location: Seattle WA
Device: Kindle 3
|
Ah, success. It's pretty simple once you actually know what to do. Thanks!
|
|
|
|
|
|
#11 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,989
Karma: 24340264
Join Date: Jan 2010
Device: Kindle Fire HD, Kindle 2
|
Not a problem.
__________________
“Politics: A strife of interests masquerading as a contest of principles. The conduct of public affairs for private advantage.” |
|
|
|
![]() |
| 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 |