Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 07-01-2023, 05:41 PM   #31
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,548
Karma: 230505502
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by JSWolf View Post
Widows & orphans maybe?
Shouldn't be an issue in kepubs.
Sirtel is offline   Reply With Quote
Old 07-01-2023, 06:19 PM   #32
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,438
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
Here's an example of three consecutive pages. Pages 1 and 3 have 20 lines of text, but page 2 has only 19 lines. Perhaps the problem is that if there is more than one new paragraph on the same page, it takes up enough extra space that line 20 won't fit. The last line on page 1 is 12 pixels closer to the edge than on page 3, which is all one paragraph.
Attached Thumbnails
Click image for larger version

Name:	koboscreen006_20lines.png
Views:	384
Size:	199.9 KB
ID:	202389   Click image for larger version

Name:	koboscreen007_19lines.png
Views:	334
Size:	187.7 KB
ID:	202390   Click image for larger version

Name:	koboscreen008_20lines.png
Views:	342
Size:	210.1 KB
ID:	202391  
Aleron Ives is offline   Reply With Quote
Old 07-01-2023, 06:24 PM   #33
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,548
Karma: 230505502
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by Aleron Ives View Post
Here's an example of three consecutive pages. Pages 1 and 3 have 20 lines of text, but page 2 has only 19 lines. Perhaps the problem is that if there is more than one new paragraph on the same page, it takes up enough extra space that line 20 won't fit. The last line on page 1 is 12 pixels closer to the edge than on page 3, which is all one paragraph.
Ah yes, the spaces between paragraphs are the reason here. I remove those from my books.
Sirtel is offline   Reply With Quote
Old 07-01-2023, 06:46 PM   #34
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,438
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
What CSS nonsense is the cause of this particular behaviour?
Aleron Ives is offline   Reply With Quote
Old 07-01-2023, 06:49 PM   #35
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,224
Karma: 16536676
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by Aleron Ives View Post
What CSS nonsense is the cause of this particular behaviour?
Usually a non-zero margin-top (and/or margin-bottom) on this particular book's main body paragraph style.
jackie_w is offline   Reply With Quote
Old 07-01-2023, 06:59 PM   #36
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: 76,495
Karma: 136564766
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 Aleron Ives View Post
Here's an example of three consecutive pages. Pages 1 and 3 have 20 lines of text, but page 2 has only 19 lines. Perhaps the problem is that if there is more than one new paragraph on the same page, it takes up enough extra space that line 20 won't fit. The last line on page 1 is 12 pixels closer to the edge than on page 3, which is all one paragraph.
I know exactly what the reason for page 2 having one less line. It's because you have paragraph spaces. page 1 has 1 paragraph space. Page 3 has no paragraph space. Page 2 has 2 paragraph spaces so there's not enough space for another line. The solution is to remove the paragraph spaces and all three pages will have the same number of lines.

I get rid of paragraph spaces. Here is the code I use for <p>. I also get rid of <p class="someclassIdonotneed"> for the majority of paragraph styles. But if you do have something such as <p class="tx"> here is c.tx that doesn't have paragraph space.

Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
.tx {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}

Last edited by JSWolf; 07-01-2023 at 07:10 PM.
JSWolf is offline   Reply With Quote
Old 07-02-2023, 09:13 AM   #37
Tommalka
Enthusiast
Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.Tommalka ought to be getting tired of karma fortunes by now.
 
Posts: 45
Karma: 1088351
Join Date: Dec 2021
Device: Kobo Libra 2
Quote:
Originally Posted by JSWolf View Post
I
Code:
p {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
.tx {
  margin-top: 0;
  margin-bottom: 0;
  text-indent: 1.2em;
}
Yeah, in my experience, 8 out of 10 sideloaded books have these ugly spaces. For years now I have been using this code when converting to kepub with Kepubify! An absolute must.
Tommalka is offline   Reply With Quote
Old 07-02-2023, 10:54 AM   #38
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: 76,495
Karma: 136564766
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 Tommalka View Post
Yeah, in my experience, 8 out of 10 sideloaded books have these ugly spaces. For years now I have been using this code when converting to kepub with Kepubify! An absolute must.
Dumping paragraph spaces is important to comfortable reading.
JSWolf is offline   Reply With Quote
Old 07-02-2023, 06:20 PM   #39
Aleron Ives
Wizard
Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.Aleron Ives ought to be getting tired of karma fortunes by now.
 
Posts: 1,438
Karma: 16297052
Join Date: Sep 2022
Device: Kobo Libra 2
Is this something that you can override in KOReader? If I could configure such settings to automatically apply to all of my books, instead of having to manually edit them one by one, it might be enough for me to switch over from Nickel.
Aleron Ives is offline   Reply With Quote
Old 07-03-2023, 07:59 AM   #40
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: 76,495
Karma: 136564766
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 Aleron Ives View Post
Is this something that you can override in KOReader? If I could configure such settings to automatically apply to all of my books, instead of having to manually edit them one by one, it might be enough for me to switch over from Nickel.
No idea. I edit the CSS. It's very easy to dump paragraph spaces.
JSWolf is offline   Reply With Quote
Reply

Tags
kobopatch, patch, patch32lsb, patches, patching


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.18.0 GeoffR Kobo Developer's Corner 151 10-21-2016 07:15 AM
Instructions for patching firmware 3.13.1 GeoffR Kobo Developer's Corner 56 07-01-2016 10:59 AM
Instructions for patching firmware 3.15.0 GeoffR Kobo Developer's Corner 146 05-24-2016 07:10 AM
Instructions for patching firmware 3.12.1 GeoffR Kobo Developer's Corner 56 03-20-2015 06:14 AM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 08:28 AM


All times are GMT -4. The time now is 08:34 PM.


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