View Single Post
Old 04-30-2010, 08:53 AM   #5
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by penguintri View Post
Cheers for the help. I'll try this when I get home from work. Do i need to include [code] in the css? Also should I insert it at the top of the css or in the normal paragraph calibre style?
Ok, if you're editing a book that's been converted with calibre, you'll find that there's a selector named 'calibre' that is used for general body styles. Change it to
Code:
.calibre {
    widows: 1;
    orphans: 1;
    display: block;
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 5pt;
    margin-right: 5pt;
    margin-top: 0;
    page-break-before: always;
    text-align: justify
    }
(added lines highlighted)
Ignore the [code] - I didn't close the bbcode tag in my reply .

Quote:
To change the scene break margin top value do I just change it for the particular calibre entrty (calibre6 I think) that is for the normal paragraph or is there some special entry for the scene break styles?
The class for normal paragraphs should look something like this:
Code:
.calibre15 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    text-align: left;
    text-indent: 1em
    }
And you want a paragraph coming after a scene break to use a class like this:
Code:
.calibre16 {
    display: block;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 1.2em;
    text-align: left;
    text-indent: 0
    }
The real problem when converting using calibre is to decide whether to tick the 'Remove spacing between paragraphs' box in the 'Look and Feel' tab. Often this can cause calibre to treat all paragraphs the same and remove any scene breaks in the text. Unfortunately, some texts, particularly ones that have been through automatic converters before and not cleaned up properly, have excessive use of the <br/> tag. Often the best solution is to convert to html first, then edit that to remove any garbage and clean up the styling so that normal paragraphs have no margin and an indent whereas those after a scene break have a top margin with no indent, then convert in calibre with the 'Remove spacing...' box unchecked.

For some background on styling with a baseline grid to maintain a vertical rhythm, take a look at this article. It doesn't tell the whole story, but it's a good start.
charleski is offline   Reply With Quote