View Single Post
Old 09-04-2012, 09:14 AM   #6
Doitsu
Wizard
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 1,944
Karma: 4633612
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by rkh5 View Post
So, does anyone have any idea why that mobi-created-from-opf would recognize the ToC on Previewer but not on my device? Alternatively, I could try to replace the special characters in the file with prc-friendly characters, but I've already put in a lot of work selecting characters that worked on mobi, so I'd rather not go through that again.
If Mobipocket Creator has autogenerated a working mbp_toc.html TOC file, you could try the following:

1. Create a copy of the folder with the files that Mobipocket Creator has generated and implement the following changes :

2. Resave all .html files as utf-8 files (without a byte-order-mark). (If you don't have a good text editor use Notepad.)

3. Change the encoding declaration in each of the .html files to:
Code:
<?xml version="1.0" encoding="utf-8" ?>
(This should be the first line in each .html file.)

Verify in an Internet browser that the checkbox characters in the .html files are displayed correctly.

Open your .opf file in Notepad and change the output encoding line to:
Code:
<x-metadata><output encoding="utf-8">
Open the .opf file with Kindle Previewer to compile it to a .mobi file.

If that doesn't work, simply create a new Sigil project, add all .html files in the desired order. (Sigil will automatically add all referenced images to the project on-the-fly and convert all files to utf-8.)
Right-click mbp_toc.html and select Add Semantics - Table Of Contents from the menu. Then use Add Semantics menu to add Guide items for the cover page and the first page of the book, add Metadata and compile the file with either Kindlegen or Calibre.
IMHO, the Sigil approach would be better, because Mobipocket Creator cannot generate an .ncx file.

Last edited by Doitsu; 09-04-2012 at 09:16 AM.
Doitsu is offline   Reply With Quote