04-02-2012, 07:47 PM | #1 |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Questions about paragraph spacing and indents
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 Almost forgot. Here's the indents.css file: Code:
p {margin-top: 0em; margin-bottom: 0.0em; text-indent:1.5em} 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 } Thanks, Denver Last edited by denverh; 04-03-2012 at 09:55 AM. Reason: update |
04-03-2012, 03:32 PM | #2 |
Wizard
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
Happens to me too. Usually painful to fix for me.
I will try margin:0 Thanks Helen |
Advert | |
|
04-03-2012, 03:38 PM | #3 |
Resident Curmudgeon
Posts: 74,033
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Your doing an ePub > ePub conversion. That's where you've gone wrong. Take the most original ePub you can and run it through Sigil to do your changes. It will work a lot better.
|
04-03-2012, 09:39 PM | #4 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Quote:
I did spend some more time trying to figure out what was going on with extra-css, though. My understanding of how extra-css works, from reading the manual, is that whatever you specify gets added to the end of the epub stylesheet. What I've seen, however, is that it seems to modify existing elements, rather than create new ones at the end of the stylesheet. I also noticed that whatever I specified for paragraph margin values in extra-css was affecting values in classes that weren't used for paragraphs. Is that why you say converting epub to epub is a bad idea? Because it doesn't keep track very well of which stylesheet classes are for what? What about things that operate only on the html, and not the css, like stray hyphen removal? Thanks, Denver |
|
04-03-2012, 11:33 PM | #5 | |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Quote:
Somewhere in all the reading about this that I've done recently I remember reading that "Remove spacing between paragraphs" affects css only, and that the related, but different, "Delete blank lines between paragraphs" affects the html. I've also read that if you wish to use "Remove spacing between paragraphs", but don't want it to affect all paragraphs, then you should use extra-css instead. That makes sense, except that I haven't been able to affect margins at all with extra-css. So even though I think I have a way to get my paragraphs formatted in a uniform fashion, there's still that extra-css puzzle. Thanks everyone, Denver |
|
Advert | |
|
04-04-2012, 12:06 AM | #6 |
Wizard
Posts: 4,812
Karma: 26912940
Join Date: Apr 2010
Device: sony PRS-T1 and T3, Kobo Mini and Aura HD, Tablet
|
Well I regularly try all clickable option in look and feel and heuristics. Mostly they are good enough. Then I inspect in the viewer (select text and right click) and use tweak epub.
But there are still enough that have me stymied. I prefer my books blank line between and no indent but some books not cooperative I have used sigil, but it is a bit complex for just one book IMO. Maybe someday. Of course I am still lost in space at CSS and regexes for the most part but eventually I get it done. I am pretty good at search and replace though Helen |
04-04-2012, 01:31 PM | #7 |
Enthusiast
Posts: 25
Karma: 10
Join Date: May 2011
Device: prs-650
|
Up until now, most of the converting I've done has been for books that weren't in ePub format, and I haven't gotten too adventurous with options. I mostly wanted to just change file format without changing the content. The results have been fairly satisfactory. But the more ebooks I read the more all those little defects become annoying. Calibre has plenty of tools to automatically fix many of those, but up until recently I hadn't really investigated them. I suspect that many of my difficulties right now originate with the keyboard actuator. Like selecting "Remove spacing between paragraphs" in "Look & Feel", and then checking Margins under "Filter Style Information". The first will set all margin values in the stylesheet to zero, but the second deletes them. At least that's what I see when I examine before & after stylesheets.
Thanks for all the replies, Denver |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Preference: Paragraph indent or a little paragraph spacing? | 1611mac | General Discussions | 48 | 11-11-2011 12:43 AM |
Losing Indents and Paragraph spacing | videopope | ePub | 11 | 06-03-2011 07:47 PM |
LRF - losing indents and paragraph spacing | jjansen | Conversion | 12 | 02-04-2011 07:45 AM |
Questions about <p> and <div> and paragraph spacing | droople | Sigil | 7 | 08-14-2010 12:03 PM |
Sony PRS-505, text indents, paragraph spacing | pdurrant | Sigil | 7 | 08-03-2009 06:03 AM |