View Single Post
Old 10-29-2016, 08:53 PM   #1
roger64
Wizard
roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.roger64 ought to be getting tired of karma fortunes by now.
 
Posts: 2,625
Karma: 3120635
Join Date: Jan 2009
Device: Kindle PW3 (wifi)
a custom toc for EPUB3?

Hi

Could there be an automatic solution for this?

Here are the usual tocs we can see:

toc1. Sigil, and other software, can produce a standard toc.xhtml and add it to the list of files. For EPUB3, this "item" is signalled in the opf manifest with a properties="nav" attribute. It includes lots of -ugly- blue hyperlinks and ids (one for each chapter and item) and has its own "standard" style which markedly differs from the rest of the book. Further, it's placed right at the beginning even if the original (paper) toc was set elsewhere - often close to the end.

toc2. Many times, we also add for compatibility reasons a toc.ncx, placed in its "miscellaneous" place, close to the opf file. Useful. Don't touch.

toc3. Many books may include a converted "classical" table of contents, with -useless- page numbers, sometimes with links, sometimes - the real classical - without. Sometimes the ocr software mangles many links and leaves its own mess and it entails a considerable loss of time if we intend to put them straight.

For aesthetic and common sense reasons, I usually replace in the EPUB3 the old fashioned toc3 above with a customized toc1 but this requires some manual work.

What I am doing is
- keep a blank file with a title named "Table of contents" (with a link to my stylesheet)
- blend this file with the content of the toc.xhtml file (several ways to do it)
- suppress the "old" toc.xhtml and give the properties="nav" to the new one.

I suppose I am not alone doing this. However this is not a user-friendly task, specially for beginners. I wish we could find an automatic way to do it for EPUB3.

Last edited by roger64; 10-29-2016 at 09:14 PM.
roger64 is offline   Reply With Quote