View Single Post
Old 10-27-2024, 06:00 AM   #457
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,796
Karma: 146391129
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by AlanHK View Post
If I'm working on an epub3, and the nav has (or can be made to have) all the links I want to display as a TOC, I delete the HTML TOC if there is one and paste the below CSS into the header of the NAV, and set its semantics to be also "Table of Contents". Less hassle then if I add, delete, move things about.

If on the other hand the visible TOC needs things that can't be put in the NAV, I delete it from the spine and make a HTML toc. This omits it from the Kindle conversion so I don't need to worry about how it looks. (If that's going to alarm ePubCheck, I'll have to rethink, as many publishers insist on no EpubCheck errors.)


Code:
<style type="text/css">
body {font-family: serif; }
h1 {font-style: italic;  text-align: center;  font-weight: normal;  font-size: 1.8em;}
ol { list-style-type: none;}
li {font-weight: normal; text-align: left;  margin-left: 0;  font-size: 1rem; text-indent: -2em;  margin-top:.5em;}
li li {margin-top:0;}
a {  text-decoration: none;}
    </style>

I don't know why headings need a link back to the toc. I remove such links if there are any. Simplifies the code. Every ebook reader has direct buttons to the toc.
It's a leftover from when there was no easy access to the ToC. I guess it just stick. I find it rather annoying and I also clear these useless links.
JSWolf is offline   Reply With Quote