
: Re: Formatting Table of Contents in epub using HTML TOC or Logical TOC and how to include TOCs in I am trying to create an epub file (in epub 3), and will be using KindleGen to convert it
The epub 3 toc.xhtml was created specifically to do away with the need to have separate logical and visual ToCs. Unfortunately, it's not quite there. As long as you're only interested in adding some styles to the text, though, you should be fine. Where you start to run into problems is if you want to have lots of other stuff going on in your ToC, like a number of images. Here's a quote from the relevant section of the epub 3 spec:
The optional heading must be followed by a single ol ordered list; no
other elements are permitted as direct children of the nav element.
This ordered list represents the primary level of content navigation.
Each list item ( li ) of the ordered list represents a primary
heading, structure or other point of interest within the EPUB
Publication and must contain either a child a element or a child span
element. The a element describes the target within the Content
Document that the link points to. The span element serves as a heading
for breaking down lists into distinct groups (for example, a large
list of illustrations can be segmented into several lists, one for
each chapter).
So as long as all you're doing is enclosing parts of the list items in <span>s you'll be fine and won't need to create a separate visual ToC. If for some reason you do need to create a separate visual ToC, I would advise only including the visual one in the <spine>. The reading system will use as the logical ToC whichever file has properties="nav" declared in the <manifest>.
As far as using list=style-type: none; goes: technically, you shouldn't need it, but it doesn't hurt at all to include it, and some reading systems will include numbers if you don't use it. So yes, by all means include that statement. It will cause no problems with KindleGen.
Finally, the frustrating note: be sure that you also include an epub 2.0-style toc.ncx file. It's perfectly valid to do so in epub 3.0, and it's the only way that epub 2.0 reading systems will be able to make use of your table of contents. Yes, this means that if you have a visual ToC separate from the logical toc.xhtml, you're now up to three tables of contents in your file.
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Sandra

: When it is better to use plain HTML instead of CSS? I published a book which contains some (simple) math formulas, like axn+bxn−1+ … + hx + k = 0. Such formulas may be displayed just