Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-07-2010, 01:52 PM   #1
XRaySpeX
Member
XRaySpeX began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: Reading, UK
Device: Kindle 3 3G
Question Losing Chapter PageBreaks in .MOBI on Kindle

Hi, I'm new here. I own a Kindle 3 which I am very impressed with, but I know nothing about eBook internals (and hope I don't need to).

I have a .MOBI file which when I view it on my Kindle displays every chapter on a new page (and the previous page part filled). It does not have those marks in the Progress Bar at the bottom, which seem to enable you to skip to Prev/Next Chapter using the L/R 5-way. I don't know what these marks actually are as neither Kindle or Calibre seem to define them.

I just fancied changing the book cover of this .MOBI, which I did eventually manage. However, when I used Convert .MOBI to .MOBI, the chapters in the Output .MOBI just ran on from one another without any page break. The marks in the Progress Bar did appear and I could now skip to Prev/Next Chapter using the L/R 5-way.

In the Structure Detection I used Chapter mark = "pagebreak"; it had no effect. Nor did "ruler" or "both".

Could there be something wrong with my Detect Chapters at Expression, which is at default?
XRaySpeX is offline   Reply With Quote
Old 12-07-2010, 02:08 PM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
The XPath expression, generally speaking, needs to be adapted to each book individually. Try clicking the magic wand from the header/footer deletion to see the XHTML Calibre generates during conversion, then use that to build the expression from.
The chapter mark you tried to change should only, from what I know, influence what Calibre inserts once it thinks it has discovered a chapter.
Manichean is offline   Reply With Quote
Advert
Old 12-07-2010, 07:24 PM   #3
XRaySpeX
Member
XRaySpeX began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: Reading, UK
Device: Kindle 3 3G
Thumbs up

Wow, for a moment I thought you lost me, having to parse loads of Calibre XHTML.

But you were right; it was obvious. My .MOBI's chapters were indicated by <h3>s not the <h1> & <h2>s of the default Detect Chapter expression.

Shows my initial diagnosis was in the right ballpark

Thanks!
XRaySpeX is offline   Reply With Quote
Old 12-08-2010, 09:49 AM   #4
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Just FYI, XRaySpeX, since you mentioned wondering what the tick marks on the progress bar were.

Warning: this post is about ebook internals!

One of the source files which can be included in an ebook is an NCX file (I believe "NCX" stands for "Navigation Control XML"). It defines the navigation points in the book. These are the points which are indicated by tick marks in the progress bar, and are the points which you can jump to using the 5-way control on the Kindle.

It's possible to create a MOBI file that doesn't include an NCX file, and it sounds like your original MOBI file didn't have one, which was why there were no progress bar tick marks, and you couldn't jump from chapter to chapter using the 5-way control. A lot of MOBI files are created without an NCX file, I'm afraid.

During the conversion process, Calibre created an NCX file for the book, based on the heading elements (h1,h2,h3, etc) in the HTML, which resulted in the tick marks showing up on the progress bar, and you then being able to navigate from chapter to chapter using the Kindle's 5-way control button.

I think I'm right in saying that the criteria Calibre uses to determine the navigation points for the NCX file encompass more of the heading levels, by default, than it defaults to using to determine page breaks, which is why it created navigation points for the H3 chapter titles but didn't insert page breaks, until you changed the setting to have it insert a page break before each H3 heading.
DMSmillie is offline   Reply With Quote
Old 12-09-2010, 11:45 AM   #5
XRaySpeX
Member
XRaySpeX began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: Reading, UK
Device: Kindle 3 3G
Navigation Marks on Conversion

Thanks, a very helpful description on navigation marks (not too internal as the user sees them and utilises them, as part of the GUI).

However, I am finding them inconsistent on my conversion of Calibre Quick Start Guide from EPUB to MOBI.

They are nearly all generated except 3:
  • Common Tasks
  • Task 2: Conversion
  • Task 4: Interacting with e-book readers
These seem to correspond to only Headers which contain lower-level Headers. Coincidentally, the unreplaced TOC at beginning of book gains an extra BLANK same-level Header below these 3 anomalies.

Is this a bug?

I am also puzzled why the converted format book loses all the <h?> heading elements . Surely these are still needed?

Also, is there any way to retain the Font sizes and line breaks in chapter headings of the original? The Fonts always seem to get bigger and it seems to add a line break between CHAPTER n and the title below. I tried Disable Font Rescaling in Look & Feel.

Sorry, I'm new to this and just a bit perplexed.
XRaySpeX is offline   Reply With Quote
Advert
Old 12-09-2010, 02:30 PM   #6
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
I had a look at the internal content of the Calibre Quick Start Guide EPUB, and I can't identify any reason for those particular headings to be missed out of the NCX file in the MOBI conversion.

And I'm afraid I'm very much a beginner when it comes to Calibre, so will have to hope that someone else looks in on this thread who is able to answer these questions, XRaySpeX. Sorry!
DMSmillie is offline   Reply With Quote
Old 12-09-2010, 09:17 PM   #7
XRaySpeX
Member
XRaySpeX began at the beginning.
 
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: Reading, UK
Device: Kindle 3 3G
Quote:
Originally Posted by DMSmillie View Post
During the conversion process, Calibre created an NCX file for the book
Do you know where this NCX file is held? It is not in the Calibre Library with the Cover & Metadata.
XRaySpeX is offline   Reply With Quote
Old 12-10-2010, 05:29 AM   #8
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
I don't know if Calibre saves it anywhere after it generates the MOBI file - I suspect the Calibre application only creates it as a temporary file during the process, and deletes it once the MOBI file is created.

However you can capture it by using the Debug feature in Calibre.

First, create a directory to put the debug files in.
Then, in Calibre, set up the "Convert Book" as normal.
Before initiating the conversion, click on the "Debug" item in the menu on the left of the conversion dialog, and select the directory you created as the output directory for the debug info.
Initiate the conversion.

Once the book has been converted, use Windows Explorer (or whatever file browser you prefer to use) to go to the directory you specified, and open the "Processed" sub-directory that you'll find there. That contains the raw files created at the end of the conversion process, immediately before Calibre packs the files into the MOBI format.

In there, you'll see the file "toc.ncx", which you can open with any plain text editor (you'll most likely need to open the editor first and then either use the "File Open" dialog to open the NCX file, or drag and drop the NCX file into the editor window to open it - on my system at least, I can't right click on the NCX file to select an application to open it with).
DMSmillie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PRC with no chapter marks. Best way add them and convert for Kindle mobi? neonbible Calibre 0 10-19-2010 08:01 AM
mobi conversion - kindle chapter marker issues foghat Calibre 10 09-29-2010 07:46 PM
Pagebreaks for RTF to mobi question mputtr Calibre 1 03-17-2010 04:20 AM
Chapter selection in .mobi rezidue Astak EZReader 5 03-16-2010 10:46 AM
Losing chapter information when converting pars_andy Calibre 3 04-25-2009 02:55 PM


All times are GMT -4. The time now is 12:15 PM.


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