View Full Version : Figuring out the TOC


frode frank
02-14-2011, 05:32 PM
Hi guys. Ive searched the net for some time now trying to figure out the TOC, but I cant find the information I need. I have both a toc.ncx file and a toc in the metadata.opf file. My questions are as follows:

Which of theme are actually used by the e-reader(s), and how?
Do all platforms use them the same way?
Do they have to be identical?
Can I have a page in the book that is not listed in the TOC?

And on a side note:

Can I force a chapter to always start on the right page in landscape mode (with a blank page on the left)?

Hopefully someone can help me out.

Toxaris
02-15-2011, 04:04 AM
What do you mean by theme? It is usually a list with links in it. All platforms should honor the toc specified in the ncx and opf. They need to be identical if I recall correctly.

Of course it is possible to have a page that is not listed. Just don't specify the link and it will not be visible in the toc. In Sigil you don't really have to worry about the TOC. Just make sure your chapters are specified as headers and the TOC is automatically build. If you don't want a certain chapter to be visible in the TOC, you can deselect it in the TOC editor.
If you want to do this by hand, take a look at Jedisaber (http://www.jedisaber.com/eBooks/tutorial.asp) site. That explains the format rather good and helps you create an epub by hand.

The last part I don't get. What do you mean with left and right page? What reader are you talking about? I am afraid that you refer to the awful iBooks... In any case I don't think it is possible. For more iBook quirks, see the book by Liz Castro. She mentions most things Apple did not get right and how to work around it.

frode frank
02-15-2011, 04:27 AM
I’m doing it by hand, of course. Would I then ommit the page in both TOC’s? Will it still be in the book?

frode frank
02-15-2011, 04:28 AM
And is the TOC in the metadata.opf file necessary?

DMSmillie
02-15-2011, 05:31 AM
Hi guys. Ive searched the net for some time now trying to figure out the TOC, but I cant find the information I need. I have both a toc.ncx file and a toc in the metadata.opf file. My questions are as follows:

Which of theme are actually used by the e-reader(s), and how?
Do all platforms use them the same way?
Do they have to be identical?
Can I have a page in the book that is not listed in the TOC?

And on a side note:

Can I force a chapter to always start on the right page in landscape mode (with a blank page on the left)?

Hopefully someone can help me out.

Most, if not all, EPUB readers use the NCX file to display a TOC to the user. You can also include an inline HTML table of contents as part of the book content if you wish - it isn't necessary for these two tables of contents to be the same. So while it generally isn't necessary to provide an inline TOC for EPUB books, depending on the nature of the book and your own preferences as an author you might choose to use the NCX file to provide a detailed TOC, and include a "summary" inline TOC that only lists the chapter headings, for example, and doesn't include second level entries (sub-sections within chapters, for example).

The NCX file is used to define the navigation points within the book. These are most usually section and chapter headings, but could easily also include sub-headings, key illustrations - whatever the author feels is worth including in the table of contents. Most EPUB readers will use the content of the NCX file to do two things:

a. Create and present a table of contents to the user, so that they can get an overview of the content of the book, and so that they can jump straight to a particular section or chapter in the book.

b. Enable "skip to previous/next navigation point" functionality when that is available in the ereader device or application.

I'm not sure what you're referring to when you say "a toc in the metadata.opf file". There are various sections in the OPF file, but none of them is a TOC, as such.

MANIFEST : This section should be a list of all of the files contained in the EPUB. They don't need to be listed in any particular order - they simply identify each file, and specify the mimetype for that file.

SPINE : This section lists the files that contain the book content, in the order in which they should be presented by the EPUB reader. This simply ensures that the EPUB reader presents the content files in the correct reading sequence.

GUIDE : This section identifies the presence and location of key predefined elements in the book (such as cover image, "start reading" point, inline (HTML) table of contents) so that the EPUB reader device or application can provide the user with access to these elements via its own "Go To..." menu.

Can I have a page in the book that is not listed in the TOC?

I'm not sure what you're asking here, since the nature of a table of contents is such that only key locations/pages are listed in the TOC (start of section, start of chapter, etc) - most of the pages in a book aren't specifically listed in a TOC.

Can I force a chapter to always start on the right page in landscape mode (with a blank page on the left)?

I don't know of any way to do this, no. You can ensure that a chapter always starts on a new "page" (i.e. starts at the top of the screen rather than simply following straight on from the end of the previous chapter), but I don't know of any way of forcing it to display on the right when the ereader is set to display two pages side by side.

Hope that's helped to clarify some of these issues for you. I'd also second Toxaris' recommendation of the EPUB tutorial on Jedisaber.com (http://www.jedisaber.com/eBooks/tutorial.asp) - it provides a good overview of how the different bits of an EPUB fit together.

Jellby
02-15-2011, 05:33 AM
What do you mean the TOC in the metadata.opf file?

The OPF has several things, things, none of them is a proper TOC:

- There's the spine, where all the elements are listed in reading order. This is not a TOC, it's an ordered list of files, no titles or links are implied here.

- There's the guide, where some links can be given to parts of the book (preface, cover, copyright...). This is not a real TOC either, just a collection of pre-defined bookmarks, which may be used or not by the reading system.

The real TOC is the NCX file. This file has all the links and titles you'd expect to find in a TOC, and most reading systems have a way to show these and select them. A reference to this NCX file must be included in the OPF manifest, and in the "toc" attribute of the spine.

[EDIT: DMSmillie explained it more thoroughly, that's what I get when I make a pause in the middle of writing a post :D]

frode frank
02-15-2011, 05:38 AM
I mean the spine.

DMSmillie
02-15-2011, 05:40 AM
[EDIT: DMSmillie explained it more thoroughly, that's what I get when I make a pause in the middle of writing a post :D]

LOL! I usually have the opposite happen - while I'm spending ages explaining something in depth, someone else sneaks in and provides a much more compact and succinct explanation! :D

Toxaris
02-15-2011, 11:15 AM
And of course, what do don't put in the TOC, won't be in the TOC...