View Full Version : Gaps at the bottom of pages on prs 300


penguintri
04-29-2010, 03:42 PM
Not sure if this is the right place but, I'm new to formatting ebooks but I've been playing around on sigil to try and make my ebooks look best on my prs 300. These were all converted in calibre.

Random sized gaps appear at the bottom of pages. I have tried changing things in the css, such as setting all "margin-bottom: 0;" but nothing seems to work. I am trying to get the text to flow all the way to the bottom, as it does in the 4th picture.

I have attached some images of consecutive pages to show the problem. Any help would be great.

http://gallery.me.com/colindm/100068/s1/web.jpg?ver=12725704900001http://gallery.me.com/colindm/100068/s2/web.jpg?ver=12725704920001http://gallery.me.com/colindm/100068/s3/web.jpg?ver=12725704940001
http://gallery.me.com/colindm/100068/s4/web.jpg?ver=12725704960001http://gallery.me.com/colindm/100068/s5/web.jpg?ver=12725704980001

dmapr
04-29-2010, 07:48 PM
All I can say is that I see a lot of those on my PRS-900 as well. I read everything at the M size settings and that's where they show. If I go to S then they disappear. I have a feeling it may be an ADE issue with re-flowing the text at these larger font size settings. I see it with "official" (purchased/borrowed) EPUB files as well.

charleski
04-29-2010, 08:20 PM
1) Go into the css and insert

body {
widows: 1;
orphans: 1;
}

2) Make sure that the top and bottom margins for normal paragraphs are set to 0, and that scene breaks (a pause in the text to indicate a break in the narrative) are indicated by setting the margin-top value to the line-height (which defaults to 1.2em) on the paragraph that follows a break. The yawning gulfs you have between paragraphs in the pictures are just a waste of space and their margins aren't synced with the baseline grid, meaning the text wanders around.

It's not an ADE issue. ADE may have a few problems, but I don't know why people blame it for epubs that have been poorly typeset.

penguintri
04-30-2010, 08:02 AM
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?

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?

Cheers again for your help.

charleski
04-30-2010, 08:53 AM
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

.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 - I didn't close the bbcode tag in my reply :).

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:

.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 (http://dev.opera.com/articles/view/setting-web-type-to-a-baseline-grid/). It doesn't tell the whole story, but it's a good start.

dmapr
04-30-2010, 09:21 AM
1) Go into the css and insert

body {
widows: 1;
orphans: 1;
}

2) Make sure that the top and bottom margins for normal paragraphs are set to 0, and that scene breaks (a pause in the text to indicate a break in the narrative) are indicated by setting the margin-top value to the line-height (which defaults to 1.2em) on the paragraph that follows a break. The yawning gulfs you have between paragraphs in the pictures are just a waste of space and their margins aren't synced with the baseline grid, meaning the text wanders around.

It's not an ADE issue. ADE may have a few problems, but I don't know why people blame it for epubs that have been poorly typeset.

Well, I personally blamed it on ADE because I saw the gap in the middle of a paragraph and it was a pretty impressive gap (see screenshots). The first shows the gap at the medium font size, the second is the same text at small font size.

charleski
04-30-2010, 02:28 PM
Well, I personally blamed it on ADE because I saw the gap in the middle of a paragraph and it was a pretty impressive gap (see screenshots). The first shows the gap at the medium font size, the second is the same text at small font size.

That gap is happening because the css is left at the default widows and orphans settings, so the renderer has to move the last 2 lines of the paragraph onto the next page (if it left them on the same page then there'd be a one line orphan). Basically, the gap is there because it's being told to leave it.

DaleDe
04-30-2010, 05:17 PM
That gap is happening because the css is left at the default widows and orphans settings, so the renderer has to move the last 2 lines of the paragraph onto the next page (if it left them on the same page then there'd be a one line orphan). Basically, the gap is there because it's being told to leave it.

It also happens in paper books. The only difference is that the publisher adjusts the line spacing to take up the gap. Hopefully someday the eBook readers will be smart enough to adjust the line spacing. It is not difficult to solve.

Dale

charleski
04-30-2010, 06:56 PM
It also happens in paper books. The only difference is that the publisher adjusts the line spacing to take up the gap. Hopefully someday the eBook readers will be smart enough to adjust the line spacing. It is not difficult to solve.

Dale

From what I've learned, a proper typographer will solve the problem by balancing out the gap over several pages. So instead of having a 3-line gap on one page, there will be 1-line gaps at the bottom of the surrounding 3 pages. To quote Bringhurst, "Balance facing pages not by adding extra lead or puffing up the word space, but by exporting or importing single lines to and from the preceding or following spreads."

This method retains the vertical rhythm of the type and reduces both the frequency and amplitude of any changes in page length. Implementing it in a relowable system involves a degree of recursion, as the line-shifts obviously have the ability to introduce new orphan/widow problems, but it provides a far better solution than simply blowing up the line-height.

DaleDe
04-30-2010, 08:24 PM
From what I've learned, a proper typographer will solve the problem by balancing out the gap over several pages. So instead of having a 3-line gap on one page, there will be 1-line gaps at the bottom of the surrounding 3 pages. To quote Bringhurst, "Balance facing pages not by adding extra lead or puffing up the word space, but by exporting or importing single lines to and from the preceding or following spreads."

This method retains the vertical rhythm of the type and reduces both the frequency and amplitude of any changes in page length. Implementing it in a relowable system involves a degree of recursion, as the line-shifts obviously have the ability to introduce new orphan/widow problems, but it provides a far better solution than simply blowing up the line-height.

I agree when you can see two facing pages it needs that kind of attention but we have nothing and only one page to look at. Adjusting the line height would be 10 times better than what we have now.

Dale

dmapr
04-30-2010, 09:24 PM
That gap is happening because the css is left at the default widows and orphans settings, so the renderer has to move the last 2 lines of the paragraph onto the next page (if it left them on the same page then there'd be a one line orphan). Basically, the gap is there because it's being told to leave it.

That's exactly why I insist that ADE has an issue. I'm attaching a screen shot that shows both "pages" to illustrate the problem better.


The book has no widow/orphan settings in the CSS
The W3C says that the default values are 2 & 2
The gap is three lines tall on the left page
The remainder of the paragraph is four lines tall on the right page.

Under the circumstances shouldn't there be two more lines of text on the left page?

Jellby
05-01-2010, 03:43 AM
ADE (at least in the Cybook) has an issue with very long paragraphs, they are cut mid-page to continue in the following page.

HarryT
05-01-2010, 04:07 AM
ADE (at least in the Cybook) has an issue with very long paragraphs, they are cut mid-page to continue in the following page.

I noticed that happen on my Sony PRS-600, but the Neo, which uses a later version of ADE, doesn't do it, so I guess they've fixed it.

penguintri
05-04-2010, 05:11 AM
Cheers charleski adding
body {
widows: 1;
orphans: 1;
really helped it made the gap at the bottom of the page just one line everytime. This worked on almost all of my ebooks except one that looked like it had some horrible formatting.

I couldn't do anything with the scene breaks as my converted books had no <br/> tags and the whole body of the text was just in the one constant calibre style, it never changed after a paragraph.