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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Closed Thread
 
Thread Tools Search this Thread
Old 01-15-2013, 05:13 AM   #1
A. Bender
Junior Member
A. Bender began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2013
Device: Kindle Touch
MOBI to EPUB Loses metadata TOC

When I view a MOBI book in Kindle Previewer and Kindle devices, I see the book's NCX view and content TOC.

When I view the same book in Calibre, pressing Table of Contents displays what appears to be the content TOC, contradicting the Calibre's FAQ statement that the viewer displays the metadata TOC.

Furthermore, when Calibre converts the MOBI book to EPUB, Calibre seems to ignore the input file's metadata TOC and instead builds an NCX based on the input file's content TOC. This is confirmed when examine the EPUB's NCX in Sigil.

Is there a way to do the MOBI to EPUB conversion without losing the input file's metadata TOC (NCX view) exposed in both Kindle Previewer and Kindle devices?
A. Bender is offline  
Old 01-15-2013, 06:09 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No there isn't and there never will be. In MOBI, the metadata toc is the content toc. Clicking the go to table of contents button in a kindle takes you to the content toc, not the metadata toc. That may well have changed with newer kindle firmware, I haven't kept track, but it nonetheless means that the vast majority of MOBI6 files have complete content TOCs and incomplete metadata TOCs. For instance, many MOBI files have flattened versions of the toc in their NCX Tocs.
kovidgoyal is offline  
Old 01-15-2013, 01:33 PM   #3
A. Bender
Junior Member
A. Bender began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2013
Device: Kindle Touch
Quote:
Originally Posted by kovidgoyal View Post
No there isn't and there never will be.
But there could be, and I wish you would reconsider. Please see below.

Quote:
Originally Posted by kovidgoyal View Post
In MOBI, the metadata toc is the content toc.
Not necessarily. The Kindle Previewer app (which reads only MOBI, EPUB, HTML and OPF formats and emulates the oldest and newest Kindle devices), displays the metadata TOC ("NCX View") for MOBI files that have it. I was buying Kindle books in AZW format before the AZW3 came out, and after extracting the MOBI from the AZW, the resulting MOBIs all had metadata TOCs.

Quote:
Originally Posted by kovidgoyal View Post
Clicking the go to table of contents button in a kindle takes you to the content toc, not the metadata toc. That may well have changed with newer kindle firmware, I haven't kept track, but it nonetheless means that the vast majority of MOBI6 files have complete content TOCs and incomplete metadata TOCs. For instance, many MOBI files have flattened versions of the toc in their NCX Tocs.
I've been using Kindle Touch since 2011. Selecting GO TO takes you to the metadata TOC.

Only a few of the Kindle books that I've purchased lacked a metadata TOC, and I returned them because the absence of a metadata TOC disables the Kindle Touch's chapter skip functionality.
A. Bender is offline  
Old 01-15-2013, 10:12 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Again, the vast majority of MOBI6 files have complete content TOCs and incomplete metadata TOCs. For instance, many MOBI files have flattened versions of the toc in their NCX Tocs.
kovidgoyal is offline  
Old 01-15-2013, 10:14 PM   #5
A. Bender
Junior Member
A. Bender began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2013
Device: Kindle Touch
I might add the following words about the NCX from the current Amazon Kindle Publishing Guidelines:

Quote:
3.3.1 TOC Guideline #1: Logical TOC (NCX) Is Recommended
Amazon strongly recommends that all Kindle books include both logical and HTML TOCs. The logical TOC is very important for a good reading experience, because it allows a reader to navigate between chapters easily. Users expect to see an HTML TOC when paging through a book from the beginning, while the logical TOC is an additional way for users to navigate books. The inclusion of a logical TOC is especially important for books that are longer than 20 pages.

Logical TOCs are generated using a navigational control file for XML application (NCX). Creating an NCX exposes the hierarchical structure of a Kindle book and allows the user to navigate through it.

In NCX-enabled books, users can see where they are in the book because the part, chapter, or section is exposed. This progress indicator also shows relative progress through the book.

Logical TOCs are part of the IDPF 2.0 specification
A. Bender is offline  
Old 01-15-2013, 10:35 PM   #6
A. Bender
Junior Member
A. Bender began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2013
Device: Kindle Touch
But when I posted my question, I was not contemplating legacy MOBI6 files with missing, incomplete or crippled metadata TOCs. I do not work with such books.

I own several Kindle books and not one of them lacks a complete, fully functioning NCX.
In fact, Amazon requires it in order to provide the next/previous chapter skip capability on Kindles.

Most Kindle books being sold today DO have an NCX. Otherwise, there would be no reason for Amazon to sell Kindle reading devices that GO TO directly to the NCX View instead of the HTML TOC, and there would be no reason for Amazon to issue a Kindle Previewer with a button to display the NCX View and another button to display the HTML TOC.
A. Bender is offline  
Old 01-15-2013, 10:41 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre has to support MOBI files that were created over a decade ago before Amazon even knew the word ebook existed, and before the MOBI format (which was not developed by amazon) even had the concept of an ncx toc.

For new MOBI files (i.e. KF8 files), calibre does indeed use the NCX toc. For older MOBI6 files, calibre will continue to use the content toc.
kovidgoyal is offline  
Old 01-18-2013, 04:44 AM   #8
A. Bender
Junior Member
A. Bender began at the beginning.
 
Posts: 5
Karma: 10
Join Date: Jan 2013
Device: Kindle Touch
I do not see any inconsistency or incompatibility between supporting legacy MOBI formats and supporting newer MOBI formats developed by Amazon. Indeed, Calibre already supports Amazon's K8 format (AZW3). Therefore, I do not understand why you mention the need to support legacy MOBI files as it does not seem to have any bearing on my inquiry.

As I have verified, and documented above, Calibre ignores the existing MOBI NCX when converting to EPUB. I've tried converting a MOBI with an NCX to AZW3 and then the AZW3 to EPUB, but the resulting EPUB still did not have an NCX. Calibre includes an NCX in the EPUB only if I try to tell Calibre how to construct it.

I hope you will reconsider. As it stands now, if I want to convert a MOBI (or AZW3) with an NCX to EPUB for subsequent editing in Sigil, Calibre either creates and EPUB without an NCX, or I have to try to tell Calibre how to build an NCX. It seems silly that Calibre can't simply parse the NCX from the input file and reconstruct it in the output file.

Thanks for your attention and for your Calibre program.
A. Bender is offline  
Old 01-18-2013, 05:10 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Jesus H. Christ. How many ways do I need to spell it out.

The vast majority of old MOBI files have better content tocs, therefore calibre will use the content toc and that toc becomes the ncx toc when converting to epub.

For new mobi (kf8) files calibre uses the ncx toc.

This is the last time I am going to post on this subject.
kovidgoyal is offline  
Closed Thread

Tags
metadata toc, mobi to epub

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.epub to .mobi loses pages, images, italics CursedRider Conversion 9 07-05-2012 03:04 AM
epub to mobi loses page breaks stevent10993 Conversion 5 07-20-2011 12:43 AM
ePub TOC to mobi TOC edmnddntes Conversion 5 01-24-2011 02:56 AM
Epub to Epub loses TOC edbro Calibre 6 10-12-2010 04:24 PM
Opening ePub in Sigil breaks TOC and loses italics PatNY Sigil 15 08-25-2010 07:05 PM


All times are GMT -4. The time now is 07:57 AM.


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