Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 09-02-2022, 01:55 AM   #1
dw28
Junior Member
dw28 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2022
Device: Kobo Clara HD
Read converted kepub files *without* overriding orphans/widows?

I've converted some .epub files to .kepub using kepubify, and learned enough add a little .css to the command line argument to adjust the font size to match the usual size that my Clara HD displays regular .epub files.

I'm doing the conversion for the better footnote handling, for books that have a lot of them...
...but one aspect that's niggling me is that using .kepub appears to hard-wire an orphans/widows value of 1 now, so I end up with a bunch of disjointed first/last lines, where I'd much rather it retained the regular default setting (which I understand is 2).
All the info about it I've managed to find in searches is apparently celebrating the override - apparently most people prefer chopped up paragraphs to "wasted space". I'm definitely the opposite :-)

I've tried adding "body {orphans: 2; widows: 2;}" to the css additions, even tried "body {orphans: 2 !important; widows: 2 !important;}" to attempt to force the issue, but both seem to be ignored.

Is there any way to achieve this with .kepub files?
dw28 is offline   Reply With Quote
Old 09-02-2022, 09:41 AM   #2
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,249
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
Quote:
Originally Posted by dw28 View Post
Is there any way to achieve this with .kepub files?
I believe the widows/orphans CSS properties are ignored by kepub. Similarly the @page style rule. On the flip side there are CSS properties which work in kepubs but not epubs. You win some, you lose some.
jackie_w is offline   Reply With Quote
Advert
Old 09-02-2022, 09:52 AM   #3
Quoth
Still reading
Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.Quoth ought to be getting tired of karma fortunes by now.
 
Quoth's Avatar
 
Posts: 13,716
Karma: 103837201
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper
Must be a mistake in kepub renderer design, because most renderers use 2 if the value isn't specified.

Note 1, not 0 is the regular epub css to do no widow/orphan processing. Think about what it does to the paragraphs vs page breaks. A value of 0 is meaningless.
Quoth is offline   Reply With Quote
Old 09-04-2022, 09:09 AM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,160
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by Quoth View Post
Must be a mistake in kepub renderer design, because most renderers use 2 if the value isn't specified.

Note 1, not 0 is the regular epub css to do no widow/orphan processing. Think about what it does to the paragraphs vs page breaks. A value of 0 is meaningless.
I do know that a value of 0 (while not technically correct), does work with RMSDK.
JSWolf is offline   Reply With Quote
Old 09-04-2022, 09:35 AM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,909
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:
Originally Posted by JSWolf View Post
I do know that a value of 0 (while not technically correct), does work with RMSDK.
Why would you allude to using 0 being acceptable AT ALL?
It is incorrect. Wrong. BAD JuJu PERIOD.
The correct answer is: 'Don't do that.'

1 says allow a single line. (I believe this is the default if not specified), so 0 may just being ignored, thus the default.
theducks is offline   Reply With Quote
Advert
Old 09-04-2022, 10:54 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,160
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Why would you allude to using 0 being acceptable AT ALL?
It is incorrect. Wrong. BAD JuJu PERIOD.
The correct answer is: 'Don't do that.'

1 says allow a single line. (I believe this is the default if not specified), so 0 may just being ignored, thus the default.
The default is 2 for both. So if 0 was being ignored, it would be at 2. That's how I know 0 does work. Maybe 0 means no widows and orphans.
JSWolf is offline   Reply With Quote
Old 09-04-2022, 12:21 PM   #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: 44,878
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
The default is 2 for both. So if 0 was being ignored, it would be at 2. That's how I know 0 does work. Maybe 0 means no widows and orphans.
Jon, didn't we go through this a few years back? The definition for widows and orphans states the value must be an integer and must be positive which disqualifies zero as a value.

And yes, I have seen some renderers where setting widows and orphans to 0 resulted in using the default though treating it as being the same as setting widows and orphans to 1 is the most common.

Quote:
Widows: The minimum number of lines that can stay by themselves at the top of a new fragment after a fragmentation break. The value must be positive.

Orphans: The minimum number of lines that can stay by themselves at the bottom of a fragment before a fragmentation break. The value must be positive.
DNSB is offline   Reply With Quote
Old 09-04-2022, 01:42 PM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 79,160
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Jon, didn't we go through this a few years back? The definition for widows and orphans states the value must be an integer and must be positive which disqualifies zero as a value.

And yes, I have seen some renderers where setting widows and orphans to 0 resulted in using the default though treating it as being the same as setting widows and orphans to 1 is the most common.
Yes we did. But I'm just saying that values of 0 do work with RMSDK. I don't know about any other ePub software as I've not tried it. But I do use values of 1 in the body style.
JSWolf is offline   Reply With Quote
Old 09-04-2022, 01:46 PM   #9
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: 44,878
Karma: 168802811
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
Yes we did. But I'm just saying that values of 0 do work with RMSDK. I don't know about any other ePub software as I've not tried it. But I do use values of 1 in the body style.
I test epubs using quite a few renderers and the problem is that while RMSDK is happy enough with treating 0 as 1, there are other renderers where 0 results in using the default of 2 or 3.

I, personally, find it best to avoid those issues by not using or suggesting the use of 0 as a value for widows and orphans since 1 works on all the renderers I've tested that support widows and orphans.
DNSB is offline   Reply With Quote
Old 09-04-2022, 02:38 PM   #10
dw28
Junior Member
dw28 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Sep 2022
Device: Kobo Clara HD
Heh, yep, what this thread needed was definitely to be turned into the same endless argument as every other orphans/widows thread :-P

Might as well pile on I guess :-)
Setting it to 0 is clearly unjustifiable in any context - all you're doing is setting an invalid number, and counting on each individual reader implementation to do its error-checking correctly. At best, you get an unpredictable result, at worst, you'd maybe cause a bad reader to crash.

On further exploration of my original question - it appears that the kepub reader doesn't so much "ignore" the setting, as it appears to simply not have any orphan/widow processing implemented in the first place, so implicitly, it works as if the value was always set to 1.
dw28 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Widows and Orphans jhowell Kindle Formats 89 08-26-2021 10:38 PM
Widows and Orphans jonathanc Amazon Kindle 13 05-23-2020 02:32 AM
Widows and Orphans Waylander Kobo Reader 31 05-18-2020 06:54 AM
Widows and Orphans Calenorn Kobo Reader 3 10-21-2019 10:52 AM
Widows and Orphans danrodney ePub 10 12-08-2010 02:08 PM


All times are GMT -4. The time now is 11:32 AM.


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