04-20-2012, 01:36 PM | #1 |
Member
Posts: 19
Karma: 10
Join Date: Apr 2012
Device: Kindle Fire, iPad 2
|
TOC showing up at the end of MOBI
I have my TOC at the beginning of my epub. Once I convert the epub to MOBI in Calibre the TOC that I customized shows up at the end of the book and there is now a different TOC at the begginng of the book with a title of "Contents" where as the TOC I created the title was "Table of Contents" and is now at the end? Is there anyway around this? I really do not need two TOC's and would like the one I customized at the beginning.
|
04-20-2012, 08:09 PM | #2 |
Grand Sorcerer
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If you have your own custom HTML ToC at the beginning of your epub, simply tell calibre not to create a ToC when converting to mobi. A checkbox in the "MOBI Output" section of the conversion dialog will control this behavior.
|
Advert | |
|
06-08-2012, 02:28 AM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
I've got the same situation; I've got an HTML ToC, and I don't want a duplicate one at the end. So I tell Calibre not to create a ToC, and it works fine. (This is for creating a MOBI file.)
The problem now is that the various Kindle reader apps (Android, a Kindle 3rd gen) no longer allow the "Go to Table of Contents" option, which is something I *do* want. Is there any way to tell Calibre to use my HTML ToC as the "real" ToC so that my Kindle knows how to find it? I mean, this *must* be possible in some way; all the "professional" books I've downloaded on Kindle have this (a ToC that's near but not at the very beginning of the book, and the ability to jump to the ToC from the "Go to" menu). How do THEY do it? |
06-08-2012, 01:30 PM | #4 |
Zealot
Posts: 117
Karma: 584308
Join Date: Oct 2010
Location: San Francisco
Device: Kindle
|
Edit the OPF file in your source epub as follows:
In the <guide> section, add a reference to your html TOC page. <guide> <reference href="filename_of_toc.html" title="Table of Contents" type="toc"/> . . . </guide> |
06-08-2012, 11:10 PM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
Okay, here's what I figured out. This page solved my issue for me.
Essentially, I have a single HTML document that contains my entire ebook that I want to construct. It has an HTML ToC that I coded by hand (well, I used a script to generate it, but shh). I use the perl tool html2mobi (mobiperl) to turn my HTML files into PRC files (which as I understand it are essentially MOBI files). html2mobi lets me attach metadata (author, title, etc.) using command-line options, but I didn't know how to make it recognize a ToC entry. So I added more or less the same thing Jeff L posted (the guide/reference tags) into the HEAD tag of my HTML doc: <guide> <reference type="toc" title="Table of Contents" href="#toc"> </reference> </guide> ...and then added an A tag like so: <a name="toc">Contents</a> ...around the word "Contents" at the top of my ToC. That was all I had todo; html2mobi recognized it and now the "Table of Contents" menu option works in both my Kindle 3 and Kindle for Android. Here's hoping the next person to want to do this doesn't have the same problem. I wish Amazon's Kindle formatting documentation was less awful. |
Advert | |
|
06-09-2012, 05:33 AM | #6 |
Guru
Posts: 932
Karma: 15752887
Join Date: Mar 2011
Location: Norway
Device: Ipad, kindle paperwhite
|
Shouldn't the guide be a part of the opf-file? I'm no expert in mobis, but I thought that mobi files had an opf file just like epubs?
|
06-09-2012, 10:37 AM | #7 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It is bad form to have two ToCs in an ePub.
|
06-09-2012, 12:35 PM | #8 | ||
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
Quote:
I probably will at some point make an actual OPF file for my ebook, I'm just not a big fan of separate metadata files. Gives me heartburn. Quote:
|
||
06-09-2012, 01:53 PM | #9 |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
You do have two ToCs. There is the ncx file and the internal list of links. There is an option in Calibre to tell it not to make a ToC from the ncx.
|
06-10-2012, 01:01 AM | #10 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
|
I didn't use an ncx file or Calibre for what I described above. I used a single HTML file and the html2mobi perl script.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Endnotes suddenly showing up in TOC | griffitts | Conversion | 0 | 03-27-2012 02:02 PM |
TOC not showing in news created by calibre | PoP | Sony Reader | 2 | 06-07-2011 07:06 PM |
Calibre TOC at end | Dante | Calibre | 17 | 12-19-2010 09:36 AM |
iPad TOC not showing up on iPad | crottmann | Apple Devices | 0 | 09-10-2010 05:17 PM |
TOC not showing in eBook created by InDesign | gabrieleale | Sony Reader | 0 | 07-30-2010 04:02 PM |