Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 04-20-2012, 01:36 PM   #1
ebookn00b
Member
ebookn00b began at the beginning.
 
ebookn00b's Avatar
 
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.
ebookn00b is offline   Reply With Quote
Old 04-20-2012, 08:09 PM   #2
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,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.
DiapDealer is offline   Reply With Quote
Advert
Old 06-08-2012, 02:28 AM   #3
benclayborne
Junior Member
benclayborne began at the beginning.
 
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?
benclayborne is offline   Reply With Quote
Old 06-08-2012, 01:30 PM   #4
Jeff L
Zealot
Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.Jeff L ought to be getting tired of karma fortunes by now.
 
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>
Jeff L is offline   Reply With Quote
Old 06-08-2012, 11:10 PM   #5
benclayborne
Junior Member
benclayborne began at the beginning.
 
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.
benclayborne is offline   Reply With Quote
Advert
Old 06-09-2012, 05:33 AM   #6
Iznogood
Guru
Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.Iznogood ought to be getting tired of karma fortunes by now.
 
Iznogood's Avatar
 
Posts: 932
Karma: 15752887
Join Date: Mar 2011
Location: Norway
Device: Ipad, kindle paperwhite
Quote:
Originally Posted by benclayborne View Post
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>
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?
Iznogood is offline   Reply With Quote
Old 06-09-2012, 10:37 AM   #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: 73,968
Karma: 128903250
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.
JSWolf is offline   Reply With Quote
Old 06-09-2012, 12:35 PM   #8
benclayborne
Junior Member
benclayborne began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
Quote:
Originally Posted by norway1456 View Post
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?
Essentially that's what I'm doing, except I didn't want to go to the trouble of figuring out how to make an OPF file. html2mobi doesn't require one; it allows you to use command-line options to specify much of the metadata that would be in the OPF file.

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:
It is bad form to have two ToCs in an ePub.
I'm not making an ePub, I'm making a MOBI file. And there aren't two TOCs. There's just the one HTML TOC, and a bit of metadata pointing at it so that Kindle apps know how to find it explicitly.
benclayborne is offline   Reply With Quote
Old 06-09-2012, 01:53 PM   #9
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: 73,968
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by benclayborne View Post
I'm not making an ePub, I'm making a MOBI file. And there aren't two TOCs. There's just the one HTML TOC, and a bit of metadata pointing at it so that Kindle apps know how to find it explicitly.
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.
JSWolf is offline   Reply With Quote
Old 06-10-2012, 01:01 AM   #10
benclayborne
Junior Member
benclayborne began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jun 2012
Device: Kindle
Quote:
Originally Posted by JSWolf View Post
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.
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.
benclayborne is offline   Reply With Quote
Reply


Forum Jump

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


All times are GMT -4. The time now is 02:53 PM.


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