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

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2009, 06:04 PM   #1
starrigger
Jeffrey A. Carver
starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.
 
starrigger's Avatar
 
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
General question on tables of contents

When preparing an html source file for conversion into various formats, is it better to have the ToC included in the html, or as a separate file? (I have a feeling the answer is going to be, "It depends.")

Ultimate object is for the user to be able to click the Contents tab from within the book and get to the contents page without having to scroll back to the beginning of the book. Is the answer the same for Mobi, LRF, EPUB, LIT, etc.? Is it different for different reading devices?

Thanx.
starrigger is offline   Reply With Quote
Old 02-22-2009, 06:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
When you say a separate file you mean a separate HTML file or a separate OPF file?
kovidgoyal is online now   Reply With Quote
Advert
Old 02-22-2009, 06:26 PM   #3
starrigger
Jeffrey A. Carver
starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.
 
starrigger's Avatar
 
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
Separate html file.
starrigger is offline   Reply With Quote
Old 02-22-2009, 06:37 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,779
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Putting the TOC into a separate HTML file as opposed to in the main HTML file shouldn't make any difference.

A little explanantion of TOCs seems to be in order:

There are two kind of TOCs: Inline and external

An inline TOC is part of the contents of the book, typically at the beginning of the book. When you have a TOC in either the main html file or a separate html file this is what is created.

An external TOC is a TOC that is present in the metadata of the books and is accessed via special controls on the reader, for example to TOC button in the calibre ebook viewer.

I suspect it is an external TOC that you want to create for your readers.

The problem with external TOCs is that different formats have differing levels of support for them. EPUB has the best support, MOBI the worst. LRF only supports external TOCs with one level (i.e. no nested TOCS).

In calibre the interface for generating external TOCS is the same for EPUB and MOBI (though in the case of MOBI it wont really be an external TOC but an inline toc at the end of the book). The interface for LRF is different (for legacy reasons).

For EPUB and MOBI you typically use the Levelx TOC option, where x is 1 through 3, or if you have a simple book where you just want the chapter titles to be in the TOC, calibre should create it automatically provided it is detecting your chapters correctly (you may have to tweak this by changing the chapter detection XPath expression. The User Manual has a nice explanantion on how to do this).

For LRF I would suggest first creating EPUB and then using that as input to the LRF, inwhic case the previously created external TOC will be automatically used.
kovidgoyal is online now   Reply With Quote
Old 02-23-2009, 02:05 AM   #5
starrigger
Jeffrey A. Carver
starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.starrigger ought to be getting tired of karma fortunes by now.
 
starrigger's Avatar
 
Posts: 1,355
Karma: 1107383
Join Date: Aug 2008
Location: Massachusetts, USA
Device: Lenovo Yoga Tab Plus, Droid phone, Nook HD+
Thanks. That's a very helpful summary. (And I'll pass it on to someone who's doing a markup of one of my books for me.)
starrigger is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Of Contents Question Humble Calibre 2 07-26-2010 09:10 PM
iLiad General firmware question jgray iRex Developer's Corner 2 05-28-2009 10:21 AM
General Metadata Question lwpack Calibre 0 03-25-2009 11:11 PM
General Question About Ebooks from Baen MerLock Introduce Yourself 2 04-14-2008 02:30 AM
Sitemap Creator and Tables of Contents brewt Workshop 0 12-18-2007 01:22 AM


All times are GMT -4. The time now is 11:45 PM.


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