Quote:
Originally Posted by JJ Johnson
Looks like I have a bit more work to do than I thought. I take it, then, that chapter titles are typically displayed in H2 tags? Is that mostly just an Sigil/Calibre application convention, or part of some standard?
I'm using epub 3. I only have a need to ever view these books on my Kobo, so I'm not too worried about backward compatibility or publishing these books. So this is mostly an exercise in learning a bit about epub structure, and also a means of honing my python skills.
I'm still very fuzzy on the interplay between this navigation file, a TOC page, and the manifest and spine portions of the content.opf files. I'm sure I'll have more questions.
|
There are 6 header tags (h1 ... h6). My personal preference is to use h1 for books in a omnibus volume, h2 for parts in a single book and h3 for chapter headings. h4 get occasional use for sub-chapters. If I find myself wanting to use h5 and h6, it's time to step back and look at the way I'm structuring a book. Most renderers will display the ToC with indentation to indicate precedence.
Code:
h1
h2
h3
h3
h3
h4
h2
etc...
If for example, if I have <h3>Chapter x<h3> at the start of each chapter file, Sigil and calibre will generate the ToC document from those tags. I prefer using Sigil where it will generate the epub3 nav.xhtml document with the option to automatically generate the epub2 compatible toc.ncx file. OTOH, there are things that the calibre editor will do easier than Sigil so I keep and use both.