![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Indents and lines between paragraphs
Has anyone else experienced strange handling of indents of the first line of a paragraph and/or insertion of a line between paragraphs on different ereaders?
I have an epub file which, as far as I can read from the css file, should display paragraphs with a 1.5em indentation, and no empty line between paragraphs. This is what I intend. It is formatted thus in OpenOffice. Both Calibre and Sigil display it this way. So does Stanza, which is probably the crappiest program for displaying an epub file, and makes a mess of everything else. Adobe DME displays it instead with an empty line between paragraphs and no indentation. For some reason B&N ereader program refuses to open it. Of ereaders that I have had it tested on - not a large range yet - the Iriver displays it with a blank line and no indent. So does the Sony 950. The Aluratek Libre Pro displays it with indents and no blank line. Does anyone know whether some ereaders are hard-coded to present paragraphs in this way, irrespective of the coding in the file? |
![]() |
![]() |
![]() |
#2 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 351
Karma: 70000
Join Date: Jul 2010
Location: Australia
Device: ADE, iPad
|
I had this happen a while ago...and the advise I got from this site was it was a problem in the CSS file. It turned out to be the font declaration was missing "". Check your CSS here for any errors...
http://jigsaw.w3.org/css-validator/#...t+with_options |
![]() |
![]() |
![]() |
#3 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Quote:
No change. ![]() |
|
![]() |
![]() |
![]() |
#4 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Could you post an example of your code? I use indents all the time, but no problems on my reader (PRS-300). The CSS code and (part) of the xhtml code would be nice to see if we can find the issue.
|
![]() |
![]() |
![]() |
#5 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
any mis-spelled key words and ADE ignores the style completely. Like font-wait: bold; will kill it, dead Calibre and Sigil render all the other style attributes... Not ADE |
|
![]() |
![]() |
![]() |
#6 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,549
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Really? The CSS spec says that any unknown/unsupported keyword should be ignored, but not the whole stylesheet. I know ADE ignores the whole lot if there is some syntax error like a missing semicolon, or a comma instead of decimal point... but a misspelt keyword should be different.
|
![]() |
![]() |
![]() |
#7 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,054
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
The Spec is not reality ![]() |
|
![]() |
![]() |
![]() |
#8 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Quote:
I'll dig out the css file and post relevant bits (the font declaration is missing from this example, btw). Code:
@namespace h "http://www.w3.org/1999/xhtml"; .G-fr { background-color: white; border-bottom: 0; border-top: 0; display: block; font-size: 1em; left: 0; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; position: relative; text-indent: 1.5em } .G-fr1 { background-color: white; border-bottom: 0; border-top: 0; display: block; font-size: 1em; margin-bottom: 0; margin-left: auto; margin-right: auto; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; text-indent: 1.5em } .P-Chapter-header { background-color: white; border-bottom: 0; border-top: 0; display: block; font-family: "Times New Roman", serif; font-size: 1.29167em; line-height: 100%; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 3.0cm; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; page-break-after: auto; page-break-before: auto; text-align: center; text-indent: 1.5em } .P-P { background-color: white; border-bottom: 0; border-top: 0; display: block; font-family: "Times New Roman", serif; font-size: 1em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; text-indent: 1.5em } .P-P1 { background-color: white; border-bottom: 0; border-top: 0; display: block; font-family: "Times New Roman", serif; font-size: 2em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; text-indent: 1.5em } .P-P10 { background-color: white; border-bottom: 0; border-top: 0; display: block; font-family: "Times New Roman", serif; font-size: 1em; line-height: 100%; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; text-indent: 1.5em } more of the same... .S-T { background-color: white; color: #000; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0 } .S-T1 { background-color: white; font-family: "Times New Roman", serif; font-size: 1.54839em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0 } .S-T10 { background-color: white; color: #000; font-size: 1em; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0 } .S-T11 { background-color: white; color: #000; font-size: 1em; font-weight: normal; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0 } more of the same... .calibre { background-color: white; display: block; font-size: 1em; margin-bottom: 0; margin-left: 5pt; margin-right: 5pt; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; page-break-before: always } .calibre1 { background-color: white; display: table-row; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; vertical-align: middle width: 10.0cm } .calibre2 { background-color: white; display: table-cell; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 1px; padding-left: 1px; padding-right: 1px; padding-top: 1px; text-align: inherit; vertical-align: inherit } .calibre3 { background-color: white; display: block; height: auto; margin-bottom: 0; margin-left: 0; margin-right: 0; margin-top: 0; padding-bottom: 0; padding-left: 0; padding-right: 0; padding-top: 0; width: auto } And a bit of a chapter file so you can see how they are used: Code:
<body class="calibre"> <p class="P-Chapter-header" id="calibre_pb_4">Chapter 1</p> <p class="P-P10"> Lennart Persson was not a typical Swede. He was not 185 centimetres tall, or six foot one, as the English still call it, in spite of forty years of war with the metric system. He was not blond haired although he was blue eyed. Nor was he much interested in athletic activities. For him walking was something you did to get somewhere you couldn't drive, and jogging was something you did to catch a bus. And his interests were for the most part intellectual, which did nothing for his figure.</p> <p class="P-P10"> Not that he was fat. But he was perhaps a little more stockily built than was compatible with his 172 centimetres, or five foot eight and a bit, as his English colleagues would say. His body was very nearly cylindrical, with only his belt to give him a waistline. Notwithstanding his general disdain for athletic activities, he did work out occasionally with his workmates, and he played squash on the company squash ladder, where he occupied a satisfactory place in the lower half, known as 'wimps and women', but with no hope, and not even a serious dream of making the top half, called 'mucho macho'.</p> <p class="P-P10"> In one sense, he was quite typically Swedish. He ate well. Not “well” in the sense of being a good trencherman, who groaned when he stood up from the table, but “well” in the sense of avoiding white bread and sugar, and almost never eating at McDonald's. He was a great fan of sushi, as, surprisingly, were most of his colleagues.</p> Another thing, all statements in the css file ask for indents which are 1.5 em, but I was getting 1.5 cm. I think that's all, but I've probably forgotten something... ![]() |
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Get rid of the stuff. Further more there is a lot of redundant stuff in your css. Make it more simple. Put the following in the css:
Code:
p.indent { text-indent: 15pt; line-height: normal; margin: 0; } Code:
<p class="indent">Text to see if there is an indent</p> If you need more in the CSS, add it part by part. |
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Thanks, Toxaris:
Don't blame me for the complicated css. Blame calibre. There are more P definitions than a dog's got fleas. Although actually, thinking about the gratuitous that Open Office added, maybe it's at that stage that things look ugly, and calibre just try's to make sense of the nonsense. I have to take up the gratuitous entries with OOo later. |
![]() |
![]() |
![]() |
#11 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
I'm curious what happens if you just remove the entire CSS file from the ePub. How does it look then? I'm not suggesting that as a long term solution -- more as a diagnostic to help you figure out where the problem is. |
|
![]() |
![]() |
![]() |
#12 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I agree, that same problem arises when you export via Word. You end up with a lot of CSS-stuff which is totally obsolete. Long live regexp to remove the stuff.
|
![]() |
![]() |
![]() |
#13 | |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 4727110
Join Date: Aug 2010
Location: Sweden
Device: Iriver Story
|
Quote:
The idea of using styles more consistently sounds good. Too many of my problems have their source in bits I cut and pasted, and got the wrong style as a result. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Lines became paragraphs after .lit to .mobi conversion | Piper_ | Calibre | 11 | 09-19-2010 05:11 PM |
Blank lines between paragraphs? | ascherjim | OpenInkpot | 30 | 12-03-2009 12:19 AM |
Removing blank lines between paragraphs? | corroonb | Workshop | 3 | 08-13-2009 04:23 PM |
Insert Blank Lines Between Paragraphs | Timoleon | Calibre | 14 | 03-22-2009 02:43 PM |
How to eliminate blank lines between paragraphs with Calibre | Mr. Goodbar | Calibre | 8 | 06-02-2008 07:39 AM |