Mobileread
Editing mobi file for toc
#1  mharring 07-02-2010, 07:36 PM
How does one edit a mobi file created in Calibre? I am saving a Word doc, with links, as a htm file and then converting that (zipped) in Calibre to mobi and ePub for Kindle and iPad.

The mobi file looks great on my Kindle but it doesn't link to the Table of Contents in the Kindle menu - the selection is grayed out. I know how to get Kindle to recognize this as I have edited the prc file in Mobipocket Creator by inserting a <toc> anchor into the code.

But my Creator conversion is screwing up all the punctuation symbols while my Calibre conversion looks great. So my question is how do I edit the mobi file in Calibre or some other editing program to insert the two simple lines of code? Creator will not import a file with a mobi extension, which is bizarre since it is their file format. Needs a .obf file?

Also wondering how to create a .prc file from my mobi file.

Thanks....
Reply 

#2  mharring 07-02-2010, 10:12 PM
Searching the forum I found discussions about Mobi2oeb that is supposed to be a tool in Calibre. But I can't seem to find it. Is this one of those add-on tools in Perl that require the Windows OS? I'm working in OS X on the Mac.

My mobi file from Calibre is really clean, but the Kindle menu doesn't recognize the Table of Contents. I need to get this in there. To me navigation is the essence of eBooks and the navigational tools to date are pretty primitive. Will I live long enough for convergence in formatting?
Reply 

#3  wallcraft 07-02-2010, 10:33 PM
The easiest way is to let Calibre auto-detect the chapters. See Structure Detection and Table of Contents. By default, calibre will assume chapters start at either <h1> or <h2> tags that have any of the words (chapter, book, section or part) in them or that have the class=”chapter” attribute. I assume MS Word Headings get mapped to heading tags as part of the DOC to HTML export. Since you have control over the document, changing the chapter detection to all <h1> or <h2> tags (e.g. if your chapters don't all start with Chapter) or using a multi-level setup should be relatively easy to make work.

Usually, .mobi and .prc are interchangeable filename extensions (i.e. just rename the file from .mobi to .prc). The only exception might be if you are targeting very old handheld devices, which might have some image size restrictions.
Reply 

#4  mharring 07-03-2010, 10:27 PM
@wallcraft,
Thanks. Unfortunately that won't work for me. The book I'm formatting is historical fiction so there are no chapters in the TOC - just things like maps and other reference materials like character bios, Afterword, illustrations, images, etc. The TOC is programmed perfectly now and I don't want to try to force an automated TOC as I'm sure that will raise all kinds of problems. But the TOC works real well in the Kindle mobi file - it just doesn't recognize the TOC from the menu pad. This requires a simple fix of adding a couple of lines of code that Kindle reads and recognizes as a toc identity. I can do this really easy in Mobi Creator but Creator is now not recognizing all my punctuation symbols. No " ' ... or any accents. Fixing the mobi created by Calibre looks a whole lot cleaner than trying to fix Creator's conversions at this point. Not sure why the symbols problem except that I have switched from XP to Leopard for my MS Word.

What is mobi2oeb and where do I find it? People write here that one can convert mobi to html in Calibre and then edit and rebuild, but my conversions menus in Calibre don't show this option.

Glad to hear the mobi and prc files may be interchangeable. Hope so.
Thanks again.
Reply 

#5  wallcraft 07-03-2010, 11:13 PM
Quote mharring
What is mobi2oeb and where do I find it? People write here that one can convert mobi to html in Calibre and then edit and rebuild, but my conversions menus in Calibre don't show this option.
The Calibre documentation still lists OEB as an output type, but I agree that the GUI does not show it. I suggest converting the HTML to ePub using Calibre, then rename the .epub to .zip and unzip it. An ePub is just a zip container with HTML/XML plus an .opf file which you can import into MobiPocket Creator, it is essentially OEB 2.0 vs the 1.1 typically used as input by MobiPocket.
Reply 

#6  mharring 07-04-2010, 04:12 PM
Quote
An ePub is just a zip container with HTML/XML plus an .opf file which you can import into MobiPocket Creator, it is essentially OEB 2.0 vs the 1.1 typically used as input by MobiPocket.
Thanks. I didn't know that. I'll give it another try. Just learning about these file formats.
Reply 

#7  TWiTCommander 07-11-2010, 03:01 PM
since you are working with html files, try using sigil instead of word. sigil is an html editor and outputs epub. use calibre or kindlegen to convert to mobi.

sigil does all the work of creating the toc, etc that a kindle will need. the only thing you need to do is to select an image as the cover image in sigil.
Reply 

#8  karenbryant 09-16-2012, 06:50 AM
Hi,
I too have this problem. Did you find a solution? I don;t want to mess about converting to ePub and then back again to mobi just to make the mobi recognise the toc location. I also have a toc in the eBook I'm perfectly happy with and I don't want Calibre to make its own generated toc due to how well formatted etc I have made the one in the book.
Any help appreciated!
Thanks,
Karen
Reply 

#9  mncowboy 09-16-2012, 09:13 AM
TWitCommander stated the workflow I use. Word to Sigil to create the EPUB, use Kindle Previewer to create the mobi file.
This workflow gives you much more control over the formatting and conversion process.
Bob
Reply 

#10  mzmm 09-16-2012, 10:21 AM
Quote TWiTCommander
since you are working with html files, try using sigil instead of word. sigil is an html editor and outputs epub. use calibre or kindlegen to convert to mobi.
i agree - although using this method still produces the greyed-out toc mentioned earlier in the post.

to take care of that, you can open the epub and insert a <refence type="toc" title="toc" href="my_toc.html"/> in the guide element of the opf before using calibre or kindlegen to convert to mobi.
Reply 

Today's Posts | Search this Thread | Login | Register