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

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2012, 12:27 PM   #1
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
Table of Contents: opf, mobi, prc

I created a book in Word and converted it to html. I used Mobipocket Creator to turn the html to an opf and created guides for start and toc. I separately created a toc.ncx file and made the necessary alterations in the manifest and spine of the opf so it would recognize it. I then used Mobipocket to create a prc file.

That all worked great and when I open the prc in Kindle Previewer it looks fine. However, the prc file does not recognize the many special characters I have in the document. My cursory research seems to imply that a prc file will never recognize these characters. (Most importantly, a check mark (U+2713) and a script small L (U+2113), but there are others, too).

However, when I open the book's html file directly with Kindle Previewer, these characters appear just fine. I tried opening the OPF file, which Mobipocket created, using Kindle Previewer, the characters display fine and the Table of Contents works fine. But when I open that file with my actual device, it does not recognize the location of the Table of Contents (I tried on a regular kindle and kindle for iPad. Neither worked).

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.
rkh5 is offline   Reply With Quote
Old 09-02-2012, 01:46 PM   #2
jswinden
Astrophotographer
jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.jswinden ought to be getting tired of karma fortunes by now.
 
jswinden's Avatar
 
Posts: 5,217
Karma: 5642618
Join Date: Sep 2006
Location: USA
Device: iPad Mini 2, iPhone 5, Nexus 7.2
How did you enter the special characters in the HTML? Are they entered as & #2713; (✓) and & #2113; (ℓ)? I've never used these two characters so I don't know if they are even supported in the Kindle device's font.

As far as TOC problems, it seems to me as though the method you are using to create a book is very convoluted, and it involves at least one inferior product for developing HTML. MS Word is terrible at developing HTML. You might want to learn about Sigil, a freeware app for developing ePubs. It has a WYSIWYG editor to create HTML, allows you to easily create and organize a book. Once Sigil creates the ePub it is very easy to unpack/unzip the ePub and modify the OPF and NCX files. Then you can easily use Kindle Previewer to open the OPF and build a MOBI. This is much easier and much cleaner than using MS Word and MobiCreator.
jswinden is offline   Reply With Quote
 
Enthusiast
Old 09-02-2012, 02:13 PM   #3
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
The book had already been written in MS Word and I'm trying to convert it to kindle format. I'm aware of Sigil and tried opening the html using it, but there were some other issues involved. But since the document is already essentially finished, I don't think it's necessary.

The characters were inserted in Word as part of the normal character set there. I know little about how characters work. Looking at the html file, the check, for example, is showing:

<span style='font-family:"MS Mincho"'>✓</span>

EDIT: That's "& #10003;" between the span tags.
Is there another way to put the characters here?

To reiterate the problem, when I move this html file directly into the previewer it displays fine, but the ToC is not recognized. Jumping through the aforementioned hoops to create a prc was intended to be a solution for the missing ToC. And it was, the ToC is recognized, but then the characters don't display.
rkh5 is offline   Reply With Quote
Old 09-02-2012, 03:08 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,137
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Take the Word document, save it as a text file, load the text file into Sigil, create your CSS as you go about formatting/splitting the file into it's sections/chapter.

This way, you don't have to deal with the mess Word puts in and also fixing what Word put in. It's just going to be easier to create fresh styles and fresh formatting.

But before you do this, put a <p> at the beginning of every line/paragraph and a </p> at the end. Then Sigil will know where each bit is. Word can search/replace to do this.
JSWolf is offline   Reply With Quote
Old 09-04-2012, 02:09 AM   #5
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
Take the Word document, save it as a text file, load the text file into Sigil, create your CSS as you go about formatting/splitting the file into it's sections/chapter.

This way, you don't have to deal with the mess Word puts in and also fixing what Word put in. It's just going to be easier to create fresh styles and fresh formatting.

But before you do this, put a <p> at the beginning of every line/paragraph and a </p> at the end. Then Sigil will know where each bit is. Word can search/replace to do this.
The file is almost 2000 pages long and filled with objects. This is not a simple text-based book. I imagine that reformatting the entire document will not be easier, especially if I'm not sure that Sigil can actually solve the problem and I'm not terribly familiar with that program. I don't really see how Word is the source of the problem.

What I'd like is to find a way to either a different way of making Kindle recognize the table of contents or a way for the prc file to recognize the characters.

Last edited by rkh5; 09-04-2012 at 02:12 AM.
rkh5 is offline   Reply With Quote
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,858
Karma: 4630359
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
Old 09-04-2012, 07:36 PM   #7
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,137
Karma: 17161828
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
What sort of objects does this eBook contain?
JSWolf is offline   Reply With Quote
Old 09-05-2012, 08:42 PM   #8
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,230
Karma: 11710165
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by rkh5 View Post
The file is almost 2000 pages long and filled with objects. This is not a simple text-based book. I imagine that reformatting the entire document will not be easier, especially if I'm not sure that Sigil can actually solve the problem and I'm not terribly familiar with that program. I don't really see how Word is the source of the problem.

What I'd like is to find a way to either a different way of making Kindle recognize the table of contents or a way for the prc file to recognize the characters.
There are conflated issues here. The TOC issue is unrelated to the UTF-8 and/or Win-1252 issues.

Firstly: the TOC that "gets recognized" on Previewer: is this the html.toc or the ncx that's being recognized on Previewer? When you click "go to" on the previewer, which do you see? Because if you created a Guide, your TOC should be visible regardless of where you've uploaded or viewed the book. Only when the Guide is not created properly should your HTML toc be unviewable.

Secondly: your encoding issue has other aspects. If you use UTF-8 characters anywhere in your NCX, you'll have issues when it displays. Thus, simply deciding to encode an ePUB (or in your case, an HTML + OPF file) in UTF-8 mightn't get you where you want to go. I mean, the hard fact is, not every character that's available to a user of Word is available to a Kindle device, particularly "geegaws" or wingdings like checkmarks, etc. I've had more than one book where we had to replace stupid things (my personal least-fave: emoticons like smiley-faces) with images. They have perfectly workable keyboard-shortcuts in Word--but that's not the same thing as supported entities in MOBI/PRC. So, beware arbitrarily making everything UTF-8 in an attempt to "fix" the problem. Not saying it can't work for you, but we have often had to use the glyphs (for the ncx).

Lastly, you may have a problem if the entity exists in a given FONT (I note your font span tags), when the font can't be supported in PRC and K7 MOBI. Really, the advice you got about launching the file into Sigil and working from there would give you far greater options than working strictly in MBPC, FWIW.

HTH,
Hitch
Hitch is offline   Reply With Quote
Old 09-06-2012, 10:17 AM   #9
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
Hitch: Yes, these are two separate issues. One is that the .mobi isn't recognizing the table of contents. In response I create the .prc, which solved the Table problem but then wouldn't display the characters. If I can solve one of these problems, I can ignore the other.

I almost solved the ToC problem, but not entirely. In Previewer, I can see both the html Table (which is not in a separate file but is contained in the same html file as the full text) and the ncx table from the relevant buttons at the top of previewer. The problem is that it doesn't appear on my actual device. I should say that on my device I can actually flip to the table manually, it just isn't linked from the menu. The chapter divisions via the ncx work fine, I can use the 5-way to flip between chapters on the device.

As far as I can tell I think the table is properly marked. I've got a bookmark in the html file and a reference to it in the opf. And indeed it is working in previewer, just not on the device. And I've tried on two separate devices, a regular Kindle 3.3 and an iPad Kindle app, both with the same results.

I know little to nothing about character encoding, so I'll have to look up to see how these characters are being treated. But I was careful to only use characters that actually appeared on my device. But I was only checking by converting html to mobi via previewer, not via mobipocket and a prc file. My limited research makes it seem like the prc simply doesn't support the characters I want, but mobi clearly does, so ideally I'd like to try to fix the table in mobi without a prc, rather than addressing the characters.

Last edited by rkh5; 09-06-2012 at 10:20 AM.
rkh5 is offline   Reply With Quote
Old 09-06-2012, 10:21 AM   #10
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
JSWolf: the book contains a lot of gifs
rkh5 is offline   Reply With Quote
Old 09-06-2012, 11:20 AM   #11
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,858
Karma: 4630359
Join Date: Dec 2010
Device: Kindle PW2
IMHO, you're focusing on the wrong tool. Mobipocket Creator hasn't been updated in years and is hopelessly outdated. For example, it cannot create .ncx files, which are needed for Kindle chapter navigation.
Also if you select the wrong display font, Mobipocket Creator might not display characters that the Kindle actually supports.

I just did a quick test and had no problems generating both .prc and .mobi files with the Unicode characters U+2713 and U+2113 in them that were correctly displayed both by Mobipocket Reader and the Kindle app.
(I created the .prc file by double-clicking the .opf file and the .mobi file by opening the .opf file with Kindle Previewer.)

Therefore the Unicode checkmark problems that you're having are almost certainly caused by codepage issues.
If you want to use Mobipocket Creator, you'll need to use utf-8 source files with a byte-order-mark (BOM). (Kindle Previewer can handle utf-8 source files with or without BOMs correctly.)
Attached Files
File Type: zip OEBPS.zip (47.0 KB, 48 views)

Last edited by Doitsu; 09-06-2012 at 11:28 AM.
Doitsu is offline   Reply With Quote
Old 09-06-2012, 12:54 PM   #12
rkh5
Junior Member
rkh5 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Sep 2012
Device: Kindle
Doitsu: Thanks. I'm certainly not tied to Mobipocket; this is just the method someone recommended for getting the ToC to work (and yes I had to create the ncx by hand). Do you have another recommendation for generating files with a working ToC? Calibre perhaps?
rkh5 is offline   Reply With Quote
Old 09-06-2012, 02:00 PM   #13
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,858
Karma: 4630359
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by rkh5 View Post
Do you have another recommendation for generating files with a working ToC? Calibre perhaps?
If you have at least a basic knowledge of HTML tags and styles, I'd recommend Sigil, which, for example, will automatically generate an .ncx file from headings marked with h1..h6 tags
(The last Sigil beta, which is unfortunately no longer available for download, also had a feature to generate an inline TOC from the .ncx file.)
Calibre will automatically generate an inline TOC from an .epub file if it contains an .ncx file. Otherwise, you'll have to manually specify the elements to be included in the TOC, which can be a bit tricky.
The bad news is that Amazon occasionally rejects perfectly fine .mobi files generated by Calibre. I.e., if you plan to sell your book, your may want to use Kindle Previewer/KindleGen.
If you find the whole conversion process a bit daunting, there are also a couple of WYSWIG tools available that generate ebooks from Word documents. For example, Jutoh and AWP. Why don't you check out their demo versions?
There are also two free conversion options that you could explore. If you know someone with a Mac, you could try to convert your Word doc with the free ePub plugin for Apple's Pages word processor.
Alternatively, you could install OpenOffice/LibreOffice Writer and check out Writer2ePub, which allows you to export an ePub from an OpenOffice document.
IIRC, Smashwords also has Word based authoring tool, but, AFAIK, you'll have to follow their very restrictive styleguide to the letter to get positive results.
Good luck!
Doitsu is offline   Reply With Quote
Old 09-06-2012, 06:25 PM   #14
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 2,230
Karma: 11710165
Join Date: Apr 2010
Location: Phoenix, AZ
Device: Kindle2, iPad, KindleFire and NookColor
Quote:
Originally Posted by rkh5 View Post
Hitch: Yes, these are two separate issues. One is that the .mobi isn't recognizing the table of contents. In response I create the .prc, which solved the Table problem but then wouldn't display the characters. If I can solve one of these problems, I can ignore the other.

I almost solved the ToC problem, but not entirely. In Previewer, I can see both the html Table (which is not in a separate file but is contained in the same html file as the full text) and the ncx table from the relevant buttons at the top of previewer. The problem is that it doesn't appear on my actual device. I should say that on my device I can actually flip to the table manually, it just isn't linked from the menu. The chapter divisions via the ncx work fine, I can use the 5-way to flip between chapters on the device.

As far as I can tell I think the table is properly marked. I've got a bookmark in the html file and a reference to it in the opf. And indeed it is working in previewer, just not on the device. And I've tried on two separate devices, a regular Kindle 3.3 and an iPad Kindle app, both with the same results.

I know little to nothing about character encoding, so I'll have to look up to see how these characters are being treated. But I was careful to only use characters that actually appeared on my device. But I was only checking by converting html to mobi via previewer, not via mobipocket and a prc file. My limited research makes it seem like the prc simply doesn't support the characters I want, but mobi clearly does, so ideally I'd like to try to fix the table in mobi without a prc, rather than addressing the characters.
May I please see your Guide entry for the TOC? Let's try one issue at a time.

Vis-a-vis the Sigil/inline-TOC thing, you can always cheat and use epubfixer (I think that's what it's called) and make a quick-n-dirty html toc from that, assuming you've used identifiable styles for the chapters/etc. that are going to be on the TOC. OR...if you created your TOC by hand, then put the whole file in Sigil, and split it after; I think that the links will move relatively.

But--back to the Guide, please? Can I see your TOC entry, please? There's no viable reason that a correctly-linked guide item will work on Previewer but not on the device. Something is wonky somewhere. How are you transferring the file to the device(s)?

Hitch
Hitch is offline   Reply With Quote
Old 09-18-2012, 10:45 AM   #15
Tugger
Connoisseur
Tugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongueTugger can tie a knot in a cherry stem with his or her tongue
 
Posts: 91
Karma: 22222
Join Date: Jul 2012
Device: Kindle
It may no longer be relevant but I happen to know the answer about getting unicode symbols out of Word and through to MobiPocket Creator. This is because I used to do this. Here is the answer - basically you needed to configure Word correctly.

Run Word to configure it to use Unicode, which is needed for symbols, when saving an HTML file. It will remember this setting. This also applies when it is called from within MobiPocket Creator.
- Start a new document then Save As.
- Save as type: Web page, filtered
- Tools/Web Options/Encoding: Change from Western European (Windows) to Unicode (UTF-8)

(That last crucial bit, Tools/Web Options/Encoding, is in the Save window.)
Tugger is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
converting epub to mobi - editing Contents.opf aschofield Conversion 1 06-30-2012 05:27 PM
Converting Table of Contents to .MOBI samiam3 Conversion 0 04-16-2012 03:57 PM
Extract table of contents from mobi file oecherprinte Kindle Formats 7 04-16-2012 12:10 PM
Problem with the Table of Contents of the mobi file kindleren Conversion 7 03-04-2012 12:42 PM
Table of Contents RTF > MOBI daxmon87 Calibre 12 10-09-2010 12:46 AM


All times are GMT -4. The time now is 04:13 PM.


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