Im' not at all sure what Kovid means by 'source code', but when preparing books in ePub format I've started to use a numbered list for the chapter headings, and the CSS is
div#TOC {
margin: 0;
padding: 2em 0 2em 0;
page-break-after: always;
text-align: left;
} /* Sets a top and bottom margin for TOC, and page break */
div#TOC p { text-indent: 3%; font-size: larger; padding-bottom: 0.2em;}
div#TOC li { font-size: larger; padding-bottom: 0.2em; margin-left: 3%; }
The HTML looks something like
<div id="TOC">
<h2>Table of Contents</h2><hr />
<p><a href="#coverpage">Cover page</a></p>
<p><a href="#titlepage">Title and Copyright page</a></p>
<p><a href="#authorpreface">Preface by the Author</a></p>
<p><a href="#intro">Introduction by the Editor</a></p>
<p><a href="#preface">Preface to this edition</a></p>
<ol>
<li><a href="Ch01.html">Childhood</a></li>
<li><a href="Ch02.html">The New Master and Mistress</a></li>
<li><a href="Ch03.html">The Slaves' New Year's Day</a></li>
<-- Deleted to save space -->
<li><a href="Ch38.html">Renewed Invitations to Go South</a></li>
<li><a href="Ch39.html">The Confession</a></li>
</ol>
<p><a href="Endmatter.html#afterword">Afterword</a></p>
<p><a href="Endmatter.html#endnotes">End notes</a></p>
<p><a href="Endmatter.html#colophon">Colophon</a></p>
</div><!-- End of TOC div; page break is in the CSS -->
Does this make sense?
I really have no idea what it would look like when converted from ePub to mobi.
Regards, Alex
PS. Do you use the CoffeeCup HTML editor?
Last edited by AlexBell; 03-04-2011 at 04:39 AM.
Reason: To add PS
|