Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2013, 05:46 PM   #1
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Question Do widows and orphans work in ACCESS?

A simple question because either I'm doing something wrong or they don't work in FW 3.0.0. (I hadn't tested before).

I've made two tries:
  • Adding * { widows: 2; orphans: 2; } inside \.kobo\kepub\kepub-book.css. (That file usage is explained in this thread).
  • Editing the source epub and adding body {widows: 2; orphans: 2;} to its css.

And I continue seeing lonely single lines at the end / beginning of the pages.
arspr is offline   Reply With Quote
Old 11-18-2013, 07:55 PM   #2
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Widows and orphans do work in kepubs, but as the default value for both is 2, you won't see a change with what you are doing. Set them to 1 or 0. Strictly, 1 is the minimum value, but 0 seems to work as well.

You might also need to add "!important" in the kebup-book.css. This will force it to override the setting if it has been done in the book.
davidfor is offline   Reply With Quote
Advert
Old 11-19-2013, 11:10 AM   #3
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by davidfor View Post
Widows and orphans do work in kepubs, but as the default value for both is 2, you won't see a change with what you are doing. Set them to 1 or 0. Strictly, 1 is the minimum value, but 0 seems to work as well.

You might also need to add "!important" in the kebup-book.css. This will force it to override the setting if it has been done in the book.
Well, in that case then there's a clear bug here.

Unless I'm completely wrong, the number in widows and orphans specifies the minimum amount on lines that should be rendered in a paragraph at the end or at the beginning of a page. (CSS reference for widows and orphans).

In this way, lonely lines are not permitted if a value of 2 is used (which is also the default one).

I upload four examples of these settings being violated, (but I can actually swear that I've seen this issue in all the books I've opened so far):
  • Two in a sideloaded kepubized epub, where, you can trust me, there's no orphans or widows setting inside the book. (I've checked it with Sigil).
  • Two in an "official" kepub from my Kobo account. (I cannot check it as it is DRM protected, but I doubt that it has any kind of setting about orphans or widows, because nearly no book has them).
Attached Thumbnails
Click image for larger version

Name:	Orphan - Official kepub.jpg
Views:	525
Size:	561.2 KB
ID:	115430   Click image for larger version

Name:	Orphan - Sideloaded kepubized epub.jpg
Views:	499
Size:	694.0 KB
ID:	115431   Click image for larger version

Name:	Widow - Sideloaded kepubized epub.jpg
Views:	506
Size:	674.4 KB
ID:	115432   Click image for larger version

Name:	Widow - Official kepub.jpg
Views:	519
Size:	614.4 KB
ID:	115433  
arspr is offline   Reply With Quote
Old 11-19-2013, 02:47 PM   #4
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 38,000
Karma: 150500000
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
This is probably not your issue but how have you been editing kepub-book.css? I found that I needed to use a text editor (Notepad++) that left the end of line as a simple LF character.

Regards,
David
DNSB is offline   Reply With Quote
Old 11-19-2013, 04:39 PM   #5
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by DNSB View Post
This is probably not your issue but how have you been editing kepub-book.css? I found that I needed to use a text editor (Notepad++) that left the end of line as a simple LF character.
Nope, it doesn't matter.

As a test I've redone my kepub-book.css with this setting:
Code:
* { 
    widows: 2;
    orphans: 2;
    text-decoration: line-through;
}
And it perfectly works... on the crossing out part of the style. Every book I open is completely decorated...

Hey, in Terry Pratchet's "The Carpet People", I have even found a page starting with a widow line and ending with an orphan one.

Now seriously, have any of you made widows and orphans work as expected?

Last edited by arspr; 11-19-2013 at 04:41 PM.
arspr is offline   Reply With Quote
Advert
Old 11-19-2013, 07:50 PM   #6
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 24,905
Karma: 47303822
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
Looks like Kobo have changed something with 3.0.0. For some time I have had the following in my kepub-book.css:

Code:
body {
	orphans: 0 !important;
	widows: 0 !important;
	}
And it worked perfectly. I just changed the numbers to 4, and it made no change. That suggests the ACCESS renderer is ignoring the widows and orphans CSS settings.

This is just a quick test on one book. I'll have more of a play later and see if I am right.
davidfor is offline   Reply With Quote
Old 11-20-2013, 12:15 AM   #7
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 38,000
Karma: 150500000
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by arspr View Post
Nope, it doesn't matter.

As a test I've redone my kepub-book.css with this setting:
Code:
* { 
    widows: 2;
    orphans: 2;
    text-decoration: line-through;
}
And it perfectly works... on the crossing out part of the style. Every book I open is completely decorated...

Hey, in Terry Pratchet's "The Carpet People", I have even found a page starting with a widow line and ending with an orphan one.

Now seriously, have any of you made widows and orphans work as expected?
Those may not have been orphans or widows -- I've found a quite a few ebooks that have lines such as <p>&nbsp;</p> to supply a nice wide space between paragraphs. Since the paragraph is only a single line, the widows/orphans setting has no effect on them. Not to mention the dimbulbs who put a mass of blanks lines at the end of a chapter just to ensure we will get a blank page between chapters. The commercially produced epubs seem to be some of the worst offenders when it comes to questionable code.

I was checking with 3.0.0 and several of the changes I put into the kepub-book.css are no longer showing up. I'm currently browsing for some non-DRMed kepub.epub books so I can a look at the internal CSS to see if any changes have been made.

Regards,
David
DNSB is offline   Reply With Quote
Old 11-20-2013, 02:09 AM   #8
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
Quote:
Originally Posted by DNSB View Post
Those may not have been orphans or widows -- I've found a quite a few ebooks that have lines such as <p>&nbsp;</p> to supply a nice wide space between paragraphs. Since the paragraph is only a single line, the widows/orphans setting has no effect on them.
I can assure they are orphans and widows, not single line paragraphs... Look at how the text is justified and how they don't have the ending period in orphans (which wouldn't happen in a single line paragraph), and how indentation is different and they start in lower-case in the widows (which wouldn't either happen in a single line paragraph).

Quote:
Originally Posted by davidfor View Post
Looks like Kobo have changed something with 3.0.0. For some time I have had the following in my kepub-book.css:

Code:
body {
	orphans: 0 !important;
	widows: 0 !important;
	}
And it worked perfectly. I just changed the numbers to 4, and it made no change. That suggests the ACCESS renderer is ignoring the widows and orphans CSS settings.
If you set 0 (or 1), it is like not working. So you wouldn't have probably noticed even if this feature was broken/un-implemented since long ago.

Nevertheless, and as you also say 2 should be the default value which should have filtered out lonely lines (but in the rare, very rare books which have this property set). My memory is not perfect and I was not looking for this effect, (probably because I was pretty used to it not working fine in my old Sony PRS-650, possible related to the weird rendering Adobe built-in renderer does in long paragraphs, when the weekday is Monday or when it's raining outside), but I'm nearly sure this feature has not worked since at least FW 2.8.1. I mean, I'm nearly sure I've never seen this feature working since I bought my Aura HD one month ago more or less.


EDITED ------

Because of some edits I've made to the book I'm currently reading (Las Legiones Malditas, which is the sideloaded kepubized epub in the previous screenshots), I can also say that neither page-break-inside: avoid;, nor page-break-after: avoid;, nor page-break-before: avoid; seem to work...

Last edited by arspr; 11-20-2013 at 03:04 PM.
arspr is offline   Reply With Quote
Old 12-04-2013, 11:03 AM   #9
arspr
Dead account. Bye
arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.arspr ought to be getting tired of karma fortunes by now.
 
Posts: 587
Karma: 668244
Join Date: Mar 2011
Device: none
As sadly expected, this issue is also present in FW 3.1.0 in either widows, orphans and page-breaks.
arspr is offline   Reply With Quote
Old 12-04-2013, 11:06 AM   #10
joctoral
Junior Member
joctoral began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Aug 2013
Device: kobo aura
Quote:
Originally Posted by arspr View Post
As sadly expected, this issue is also present in FW 3.1.0 in either widows, orphans and page-breaks.
Confirmed.
And @page does not seem to work.
joctoral is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Touch Widows and Orphans and firmware, oh my! MacEachaidh Kobo Reader 5 05-02-2013 11:14 AM
using widows & orphans cybmole Sigil 11 05-16-2011 01:07 AM
Widows and Orphans danrodney ePub 10 12-08-2010 02:08 PM
Widows and Orphans - Taking Control Themus Calibre 2 05-24-2010 09:40 AM
A question about CSS: widows and orphans Jellby ePub 5 08-31-2009 03:54 PM


All times are GMT -4. The time now is 11:30 PM.


MobileRead.com is a privately owned, operated and funded community.