View Single Post
Old 01-10-2012, 01:09 PM   #6
markpearl
Enthusiast
markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.markpearl ought to be getting tired of karma fortunes by now.
 
Posts: 43
Karma: 576732
Join Date: Jun 2011
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
If the first paragraph of a chapter/section always follows something consistent; hr, h3, or p class="something"... then you can combine css classes to account for those first paragraphs.

I use something like:

Code:
.calibre9 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 15px
}

h3 + p.calibre9 {
border-bottom: 0;
border-top: 0;
display: block;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 0;
}
That way, all paragraphs will be indented except those that immediately follow an h3 tag (or whatever tag.class consistently precedes the first paragraph in your document). That way you don't have to walk through the document and change the css class of each first paragraph manually. You'll still have to manually remove any  's that are being used for indentation purposes, but that's not that difficult.

Just be warned that if you want to subsequently use the same epub to create a mobi file, only calibre (that I know of for sure) will "recognize" (and honor) that css combining method when converting to mobi. I know for a fact that kindlegen will ignore it.

But it works great if you're just fixing up epubs for your own use.

Yes! After posting my query, I experimented with just what you suggested and it works!! I didn't have to reach as far back as the paragraph tags, just a unique preceding line such as:
<p class="calibre8">&nbsp;</p> -- combined with -- <div class="calibre9"> in regex.

Calibre converts to perfect mobis with this method...no problem there.

I've just subtracted hours & hours of tedium from my editing -- currently tweaking Anthony Trollope's novels...many of which I obtained here at Mobileread. I only wish future creators would follow the "no-indent" rule for first chapters and paragraph breaks, where needed.
markpearl is offline   Reply With Quote