View Single Post
Old 12-12-2008, 08:20 AM   #13
mrmikel
Color me gone
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
indents

Broad generalizations about how html is supposed to be handled don't necessarily apply to something which we are NOT going to display on the web, but print. Took me a while to figure that out. You can put the style statement up in the head. It is just convenient if you are managing a whole web site and want a consistent style throughout the whole thing to refer elsewhere. But there is nothing wrong with it either in e books. It is like Windows - you can do many things in 5 or 6 different ways...just do what makes sense to you and is easiest for you.

This is one I use a lot showing where it is by including the surrounding commands:

<html lang="en-us"><head><title>THE
MODERN HISTORY OF JAPAN</title>
<style type="text/css">
.blockquot{margin-left: 5%; margin-right: 5%;}
.toc {font-family:'Century Schoolbook'; font-size:12pt; line-height:150%; text-indent: 0in;}
h4 {font-family:'Century Schoolbook'; font-variant: small-caps; text-align: center}
h3{
page-break-before: always; clear:both; font-family:'Century Schoolbook'; font-variant: small-caps; text-align: center}
p { text-align: justify; font-family:'Century Schoolbook'; font-size:12pt;text-indent: 0in;}
.title {font-family:'Century Schoolbook'; font-size:14pt;font weight: bold; text-align: left}
body {font-family:'Century Schoolbook'; font-size:12pt;text-align: left}</style></head><body>

You would enclose what you want to have for your table of contents thus:

<span class="toc">Table of Contents, etc.</span>

or you can do <p class="toc"> all of your table of contents goes here</p> and use breaks to get carriage returns.

or this:

<p class="toc" style="text-indent: 0in;" align="left">Table of Contents goes here!</p>

Note that my .toc has 150% line height to space them out.

There is an order of precedence of these commands which I will frankly admit I have not mastered yet...so maybe someone else can help out or you can play around with a sample document you create with a simple table of contents and a little sample text so you can see the effect of changing things.

As Kovid has pointed out, calibre guesses what you mean and quite often guesses right but not always. So do your changes, and run them through calibre and view them in the e book library program or calibre to see what the actual effect is. Generally the more information the better in terms of formatting.

I hope this is some help. You can define different styles so your paragraphs in the table of contents look different than in your text or so that poetry does not get mangled by being justified when you want it left, or so it has bold or italics...whatever you want it to look like.
mrmikel is offline   Reply With Quote