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 04-15-2011, 02:25 PM   #1
odzio
Junior Member
odzio began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: none
ePUB to mobi - problems with ToC

Hello,


I'm currently trying to make mobi file from Indesign Book and here's the thing:
1) I've created Table of Contents in Indesign (manually, using hyperlinks) and then exported to ePUB.
2) it looks fine in Adobe Digital Editions and in Calibre.
3) I added the publication date in Sigil and successfully validated at www.threepress.org. Then I added the cover in Sigil.
4) I opened the file in Kindle Previewer - the compilation process went fine.
BUT: the trouble is that Kindle Previewer does not see the ToC I've made.

I've converted the file from ePUB to mobi in Calibre and then opened it up in Kindle Previewer - and it's OK (I mean the ToC is available).

Do you have any suggestions why this happens? Or did you come across similar problem?

I also tried to convert directly from Indesign using Kindle plugin but it failed and the following error messages appeared:
"Could not find file 1302889739002.epub"
"Java Script Error
Error Number: 45
Error String: Object is invalid"


Thanks
odzio is offline   Reply With Quote
Old 04-15-2011, 03:52 PM   #2
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
If you mean that it doesn't show up when you click the TOC access button in KPreviewer, but is otherwise visible in the actual book, then that's because in order for a Mobi file to be able to redirect the reader to the HTML TOC via the menus, you have to put a line in the OPF telling the conversion software about it.

Details are in the Amazon Kindle Publishing Guidelines pdf on pg 12 of version 1.9.

Basically, you just add a <reference type="toc" title="Table of Contents" href="#yourtoclinkhere.html" /> line to the <guide> section.

Hope this helps, and welcome to MobileRead!
ATDrake is offline   Reply With Quote
Advert
Old 04-16-2011, 12:23 PM   #3
odzio
Junior Member
odzio began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Apr 2011
Device: none
Thanks ATDrake, I did precisely that and it works
odzio is offline   Reply With Quote
Old 04-25-2011, 12:28 PM   #4
jackson25
Junior Member
jackson25 began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Apr 2011
Device: kindle
Quote:
Originally Posted by ATDrake View Post
Basically, you just add a <reference type="toc" title="Table of Contents" href="#yourtoclinkhere.html" /> line to the <guide> section.

Hope this helps, and welcome to MobileRead!
I'm glad I found this post! However, I'm not sure where I need to add the information you offer in your suggestion. Could you expand further?

I see my TOC in the KindlePreview but in the NCX View the links don't work.
jackson25 is offline   Reply With Quote
Old 04-25-2011, 02:41 PM   #5
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
The HTML TOC which you see when reading through your e-book (and that's accessible by clicking the TOC button in the menu), and the NCX TOC which provides the little chapter markers at the bottom of the location bar on the Kindle are two different things.

Mobi-creation tools know to add them to the finished Mobi from information in the .opf file, which is like an inventory of all the files that go into making your e-book (cover image, text, etc.), which you can create to accompany your HTML text. Wikipedia's ePub article has a nice short section with example .opf and .ncx files, in case you need help making them.

The Amazon Kindle Publishing Guidelines PDF linked above has a bit more on some Kindle-specific things you need tweak for a proper Mobi book when starting from an unzipped ePub source, since KindleGen expects them to be named/arranged differently.

Basically, the code that tells KindleGen (or Mobipocket Creator, or the Mobi2Mobi tools, etc.) where your HTML TOC is located is the <reference> tag above, which goes in a <guide> section near the bottom of your .opf.

For the NCX TOC, it's referenced in the <spine toc=""> tag, and you have to have an <item> entry in your <manifest> in the .opf which links to your NCX and gives it the exact same id="" name as the toc="" in the <spine> tag has.

If you've got everything filled out properly, then both types of TOC should be accessible via the menu/5-way controller and show up properly in the finished Mobi.

Hope this helps, and welcome to MobileRead!
ATDrake is offline   Reply With Quote
Advert
Old 12-01-2011, 08:08 AM   #6
Chammou
Junior Member
Chammou began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2011
Device: kindle
Hi ATDrake
Your information is very helpful, but I am not sure what software should be used to edit the .mobi files to ensure the TOC is included. I created an epub with sigil and then converted to .mobi with kindlegen, but the TOC does not show up in my kindle. What software do i use to edit the .mobi file?
Chammou is offline   Reply With Quote
Old 12-01-2011, 09:24 AM   #7
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
What software do i use to edit the .mobi file?
You can't directly edit a mobi file. You have to have the source (epub, (x)html , whatever) properly formatted before you build the mobi from that source. A mobi is a binary file, so once it's built... all editing (except for metadata) stops. "Editing" a mobi file involves re-building it... either by maintaining the original source somewhere, or by unpacking the mobi - editing - and then rebuilding.

For the TOC to show up in your Kindle, you need to do two things with your Sigil-built ePub (before converting it to mobi with kindlegen):

1) you need to create an inline (html) representation of your TOC in Sigil—this is what you will SEE on your Kindle when you click "Go To->table of contents." Be sure to right click on the file (in Sigil) that represents your TOC and mark it (Semantics) as "Table of Contents." Note: this is a manual process. Nothing in Sigil will automatically generate a TOC that will just "appear" on the Kindle when you convert the epub to mobi. You have to make the HTML Table of Contents yourself.

2) you need create an ncx TOC (external) in Sigil. You can auto-generate the toc.ncx from the Headers (h1, h2, h3) in your book. This will produce the navigation "dots" on the progress bar on the Kindle.

Item 1 may be enough, but unless kindlegen KNOWS where your TOC is in your epub, it can't know where to jump to when clicking "Go to->table of contents."

I've described how you can do this with only the gui tools in Sigil. But with the newest version of Sigil, you can manually do the same things ATDrake described above by directly editing the opf file and the toc.ncx file. Brushing up on the nitty-gritty of hand-building opf files and ncx files will go a long way toward understanding how you can then do it more easily with gui programs.

Last edited by DiapDealer; 12-01-2011 at 09:31 AM.
DiapDealer is online now   Reply With Quote
Old 12-01-2011, 09:29 AM   #8
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Quote:
Originally Posted by Chammou View Post
I created an epub with sigil and then converted to .mobi with kindlegen, but the TOC does not show up in my kindle. What software do i use to edit the .mobi file?
You don't edit the .mobi file directly. When creating your epub, edit the .opf file to include the necessary <reference> info, and then convert to .mobi.

I think you should be able to do this in Sigil, but if not you can always go to the folder where your unzipped ePub working files are kept and modify the .opf file manually in any plain text editor.

Also check to make sure that KindleGen isn't giving you any error messages about your .opf or .ncx being somehow invalid or being unable to find the file you want to use as your TOC. Sometimes it's really picky about what goes into the .opf, NCX, and even the filename (don't put the TOC into a set of folders with # anywhere in their names, because KindleGen will refuse to see it).

Hope this helps, and welcome to MobileRead!
ATDrake is offline   Reply With Quote
Old 12-03-2011, 11:06 AM   #9
Chammou
Junior Member
Chammou began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2011
Device: kindle
Dear DiapDealer and ATDrake.

Thank you very much for the comprehensive replies. .mobi gives a real headache. I am surprised there is not an easy way to edit .mobi. I'll give these suggestions a try.

I also have a problem with footnotes. They are not 'clickable.' I've tried converting from epub made with siegel to .mobi using kindlegen. I've also imported filtered html and word in mobipocket creator. In all cases I have lots of problems, and the footnotes with numbers appear but nothing is 'clickable' in mobireader or kindle. What do you think i'm doing wrong that the footnotes don't work?
Chammou is offline   Reply With Quote
Old 12-03-2011, 11:33 AM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,465
Karma: 192992430
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I have no clue about your footnotes. I just create all my footnote links manually (html) in Sigil or Notepad++. I don't use Word, so I have no idea what it does to clickable foot- end-notes when saved as filtered html. I'm a "from-scratch" kind of guy.
DiapDealer is online now   Reply With Quote
Old 12-03-2011, 12:04 PM   #11
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Quote:
Originally Posted by Chammou View Post
I've tried converting from epub made with siegel to .mobi using kindlegen. I've also imported filtered html and word in mobipocket creator. In all cases I have lots of problems, and the footnotes with numbers appear but nothing is 'clickable' in mobireader or kindle.
I think you might have a version of the problem that this guy had earlier.

Possibly something is slightly technically incorrect about the links/anchors associated with the footnotes (conflicting id= when split, or disallowed characters in the anchor names which the conversion software might be rejecting, etc.), or if you're working from a Word html document for both Sigil and MBPC, the export from Word is altering or even omitting the internal links.

You might want to check the source html (I think Sigil has some sort of source view) to check that the footnotes and associated text really do have the proper underlying markup to make them linked.
ATDrake is offline   Reply With Quote
Old 12-05-2011, 09:44 AM   #12
Chammou
Junior Member
Chammou began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Dec 2011
Device: kindle
Thanks again, ATdrake and Diapdealer for you help.
I've had some success using mobipocket creator. I've produced a book with both a clickable toc and footnotes.
I had been getting this error message when trying to add 'guide' and t.o.c:
file:///C:/Program%20Files%20(x86)/Mobipocket.com/Mobipocket%20Creator/rsrc/html/guide.html

I saw elsewhere on this forum that this was a problem caused by ie9. I had ie9 installed but wasn't using it so didn't think it could possibly affect me. At first I didn't uninstall as suggested. I wasted a lot of time. Now that i've uninstalled ie9 and only have ie8 mobipocket creator seems to work fine.

One problem now is my table of contents shows up twice in my ebook; i've noticed this in another ebook i have seen.

Another problem is that if i see anything that i want to change in a book i've made using mobipocket reader, I have to to back to word and make the change, then convert to filtered html, and then redo the book with mobipocket creator. This means doing the cover image, toc, book settings and metadata and guide all over again.

If you are selling a book you want to be available in every conceivable format, such as epub, mobi, etc, which format should you use first? My books are mostly in word. Once i've created a .mobi with mobipocket, do i have to start all over again with the same word file to create for example an epub with sigil?

thanks again for most useful help.
Chammou is offline   Reply With Quote
Old 12-05-2011, 11:32 AM   #13
ATDrake
Wizzard
ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.ATDrake ought to be getting tired of karma fortunes by now.
 
Posts: 11,517
Karma: 33048258
Join Date: Mar 2010
Location: Roundworld
Device: Kindle 2 International, Sony PRS-T1, BlackBerry PlayBook, Acer Iconia
Your double TOC problem may be solved by the same method this guy is using, though that seems unnecessarily complex.

I find that the best method for me is to take or make an ePub and then convert to mobi. And I only edit my purchased/downloaded books to fix the formatting and correct any really noticeable typos so they aren't too horrible to read on my Kindle.

ePub is really just a set of zipped up mostly html files that you can easily change as needed. If you need to change just one thing, then you usually have to just change one file. Whereas mobi is a specially compiled binary file that you'd have to uncompile and redo and reassemble every time you wanted to change anything besides the metadata, and as your words about MBPC (which I have never used) suggest, you have to redo even the metadata from scratch whenever you re-create your book.

In the future, I would advise going from your filtered Word document to creating an ePub in Sigil, and then using KindleGen to convert the ePub to mobi. You may have to make two versions of the ePub; one that keeps the formatting to Mobi's more limited display capabilities, and the other that can take full advantage of greater supported features of ePub.

But ePub is significantly easier to work with and alter directly, even if there is a bit of a steeper learning curve to get the workflow set up and understand how it works, I think it definitely pays in time and frustration saved in the end.

In any case, for your existing book you can use Calibre to convert your mobi to ePub and then edit that in Sigil, but sometimes that produces extra formatting markup in the source which you may not need or want, such as this guy found he had.
ATDrake is offline   Reply With Quote
Old 12-05-2011, 12:38 PM   #14
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by Chammou View Post
Another problem is that if i see anything that i want to change in a book i've made using mobipocket reader, I have to to back to word and make the change, then convert to filtered html, and then redo the book with mobipocket creator. This means doing the cover image, toc, book settings and metadata and guide all over again.
Why do you have to do the cover image, toc, settings, etc, over again? Once you have the OPF file that Mobi Creator writes, you can simply re-open that to rebuild your book in Mobi Creator. It's the OPF file that stores all your settings.
HarryT is offline   Reply With Quote
Old 12-05-2011, 06:13 PM   #15
Billi
Wizard
Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.
 
Billi's Avatar
 
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
Quote:
Originally Posted by Chammou View Post
Another problem is that if i see anything that i want to change in a book i've made using mobipocket reader, I have to to back to word and make the change, then convert to filtered html, and then redo the book with mobipocket creator. This means doing the cover image, toc, book settings and metadata and guide all over again.
You don't have to go back to Word. Look into the folder that Mobipocket Creator creates for your book. There you will find a html-file. Correct your mistakes/make your changes there and afterwards reopen your book in Mobipocket Creator and click "build".
Billi 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
epub to mobi toc missing wannabee Conversion 7 02-04-2011 10:44 PM
ePub TOC to mobi TOC edmnddntes Conversion 5 01-24-2011 02:56 AM
TOC links inside tables in epub don't translate in mobi wannabee Calibre 1 01-20-2011 01:13 AM
Epub to Mobi & TOC Nate the great Calibre 12 10-01-2009 03:33 PM
Kindle v.2 Problems with MOBI TOC from Gutenberg.org Sonist Amazon Kindle 2 06-15-2009 04:34 PM


All times are GMT -4. The time now is 06:59 PM.


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