Hello,
I've been trying to understand the variety of options for setting paragraph spacings and indents, and I'm a little confused. There seem to be multiple approaches, and I'm having trouble deciding which to use. I've done some experimenting, and I can sometimes, but not always, get the results I want. I've searched around the forum here for ideas and just got more confused. I've also been reading the manual.
What I'm looking for are paragraphs with no space between, with the first line indented, and I don't want to loose any scene breaks. In looking at my books, I can see all the possible variations between spaces, no spaces, indents, no indents. Plus, some books use "p" to delimit paragraphs, and some use "div". There may be more variations, but those two are the ones I've seen so far.
I have a Sony PRS-650 with PRS+, and I usually convert everything, except PDF's, to epub. So right now I'm mostly converting epub to epub. While I'm experimenting with this I'm using ebook-convert in a shell script:
Code:
#!/bin/sh
OPTS="
--input-profile=default
--output-profile=sony
--filter-css=font-family,margin-left,margin-right,margin-top,margin-bottom
--extra-css=indents.css
--linearize-tables
--smarten-punctuation
--enable-heuristics
--disable-unwrap-lines
"
A=`basename "$1" .epub`
ebook-convert "$1" "$A"-c.epub $OPTS
As you can see, I'm also trying to fix a few other things at the same time. But it's the paragraph formatting that I'm having the most trouble with right now. The results I'm getting range from perfect to awful. I would really like some advice from anyone with more experience with this.
Almost forgot. Here's the indents.css file:
Code:
p {margin-top: 0em; margin-bottom: 0.0em; text-indent:1.5em}
Update:
I think I've figured out part of the problem. At first I thought the extra-css wasn't working at all, but I can change the amount of indent specified, and that works. If I examine the original book and the converted book, I can see that paragraphs look like this:
<p class="calibre2"> paragraph text </p>
The definition for calibre2 is
Code:
original:
.calibre2 {
display: block;
font-size: 1.41667em;
font-weight: bold;
margin-bottom: 0.83em;
margin-left: 0;
margin-right: 0;
margin-top: 0.83em;
page-break-before: always;
text-align: center
}
converted:
.calibre2 {
border: 0;
display: block;
text-indent: 1.5em
}
So it looks like the margins have been removed, but the paragraphs still have spaces between them. If I manually add my extra-css to the end of the book's stylesheet they disappear. They also disappear if I simply add "margin: 0;" to the calibre2 definition. At this point I have no idea what is making the inter-paragraph spaces so persistent. This isn't the only book I have that behaves this way either. Does anyone have any ideas about what's happening here?
Thanks,
Denver