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 03-18-2017, 01:16 PM   #16
the_Pan
Connoisseur
the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.
 
Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
@GeoffR -

I only use kepub's so don't know what would happen with epub's.
And because I don't want to "force" my reader to something, I don't use any of those "forcing" patches.
as wrote above, I meant the "my 10/24 line spacing value" patches at the beginning of the libnickel.so.
I will test it tomorrow with another kepub-book first and report here. (also will have a look then wich patches are enabled, but now i'm away from my pc)
the_Pan is offline   Reply With Quote
Old 03-18-2017, 01:24 PM   #17
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
Quote:
Originally Posted by the_Pan View Post
I only use kepub's so don't know what would happen with epub's.
And because I don't want to "force" my reader to something, I don't use any of those "forcing" patches.
as wrote above, I meant the "my 10/24 line spacing value" patches at the beginning of the libnickel.so.
I will test it tomorrow with another kepub-book first and report here. (also will have a look then wich patches are enabled, but now i'm away from my pc)
OK, the problem could be with the book. There are some things the publisher can do to prevent the line spacing being changed, the main problem in KePubs is where the publisher uses <div> instead of <p> for paragraphs. For those books if you don't use the `Force user line spacing in KePubs` patch then you will need to edit the book to fix it.
GeoffR is offline   Reply With Quote
Old 03-19-2017, 08:32 AM   #18
the_Pan
Connoisseur
the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.
 
Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
Quote:
Originally Posted by GeoffR View Post
OK, the problem could be with the book. There are some things the publisher can do to prevent the line spacing being changed, the main problem in KePubs is where the publisher uses <div> instead of <p> for paragraphs. For those books if you don't use the `Force user line spacing in KePubs` patch then you will need to edit the book to fix it.
You're right, it's actually the book which prevent changing the line spacing, but also with the `Force user line spacing in KePubs' patch enabled.
I tested the same book as epub and looked in some other kepub-books, everything works -as usual- very well with your patches.
So thanks for your efforts and your patches.
the_Pan is offline   Reply With Quote
Old 03-19-2017, 01:35 PM   #19
GeoffR
Wizard
GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.GeoffR ought to be getting tired of karma fortunes by now.
 
GeoffR's Avatar
 
Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
`Force user line spacing in KePubs (more forceful version)`

Quote:
Originally Posted by the_Pan View Post
You're right, it's actually the book which prevent changing the line spacing, but also with the `Force user line spacing in KePubs' patch enabled.
Yes, there are still a number of things the publisher can do to prevent the line spacing being changed in KePubs even with the `Force user line spacing in KePubs` patch is enabled. One is to wrap each paragraph in a <span> and set the line spacing on the span. Another is to use the <font> shorthand style.

This is a more forceful version of the `Force user line spacing in KePubs` patch that should work in more cases (but still not all cases), but it could also have more severe side effects than the original patch. I'll include this as an option in the future if anyone finds it useful.
Spoiler:
Code:
<Patch>
patch_name = `Force user line spacing in KePubs (more forceful version)`
patch_enable = `yes`
#
## This patch will allow the line spacing set by the slider to take effect
## in some problem KePub books with fixed linespacing (including ones where the
## publisher has used <div> instead of <p> for paragraphs, or wrapped each
## paragraph in a <span> and set the line-height on the span.) However it might
## also override some line spacing that would better be left fixed, e.g. it can
## cause problems with the spacing of paragraphs beginning with a raise-cap.
#
# body, p { line-height: %1 ... }  -->  body *  { line-height: %1 ... }
#
#strings -tx -el libnickel.so.1.0.0 | grep "body, p { line-height: %1"
base_address = 9A0174
#base_address = 9A6220
replace_string = 0000, `b\0o\0d\0y\0,\0 \0p\0 \0{\0`, `b\0o\0d\0y\0 \0*\0 \0 \0{\0`
</Patch>


As usual, for perfect results without any side effects you would need to edit the book instead.
GeoffR is offline   Reply With Quote
Old 03-20-2017, 02:35 AM   #20
the_Pan
Connoisseur
the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.the_Pan is as sexy as a twisted cruller doughtnut.
 
Posts: 95
Karma: 15430
Join Date: Mar 2015
Device: Kobo Forma, Pocketbook Era
Quote:
Originally Posted by GeoffR View Post
This is a more forceful version of the `Force user line spacing in KePubs` patch that should work in more cases (but still not all cases), but it could also have more severe side effects than the original patch. I'll include this as an option in the future if anyone finds it useful.
Yes, this one do it!
I'll test it over the week and report here if something unexpected happens.
Thank you again GeoffR

edit: When I try to edit the book with calibre, I have to look for a stylesheet file, right?
the_Pan is offline   Reply With Quote
Old 03-20-2017, 08:00 AM   #21
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
Quote:
Originally Posted by the_Pan View Post
edit: When I try to edit the book with calibre, I have to look for a stylesheet file, right?
Yes, but keep in mind that some books have more than one stylesheet file. I don't know if the Calibre editor merges them all as I mainly use Sigil for this.
dmapr is offline   Reply With Quote
Old 03-20-2017, 08:10 AM   #22
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by dmapr View Post
Yes, but keep in mind that some books have more than one stylesheet file. I don't know if the Calibre editor merges them all as I mainly use Sigil for this.
You have to merge them manually.
Terisa de morgan is offline   Reply With Quote
Old 03-20-2017, 09:40 AM   #23
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I merge stylesheets when there is multiple. I see no need for that. It just makes things more difficult.
JSWolf is offline   Reply With Quote
Old 03-20-2017, 11:31 AM   #24
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: 35,393
Karma: 145435140
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Forma, Clara HD, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by JSWolf View Post
I merge stylesheets when there is multiple. I see no need for that. It just makes things more difficult.
That works until you run into stylesheets with multiple styles using the same name which I've run into this a couple of times. One example was an ebook where the copyright.css, main.css, title.css and endpaper.css used the same names for their basic paragraph styles but the styles were rather different. So depending on how you merged them, you ended up with some rather strange results.

Personally, I agree there is little need in ebooks for multiple stylesheets but we have to remember than css stands for cascading style sheets.
DNSB is offline   Reply With Quote
Old 03-20-2017, 12:05 PM   #25
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by DNSB View Post
That works until you run into stylesheets with multiple styles using the same name which I've run into this a couple of times. One example was an ebook where the copyright.css, main.css, title.css and endpaper.css used the same names for their basic paragraph styles but the styles were rather different. So depending on how you merged them, you ended up with some rather strange results.
This is why it's so difficult to write CSS fixer-upper plugins that cater to everyone. Risk vs. reward. Personally, I take the risk and auto-merge all stylesheets then deal with the fall-out on the rare occasions when it's necessary.

The only 100%-safe way I know to merge all stylesheets into one is to do a calibre conversion.

I just wish publishers of fiction put as much thought into styling the main story sensibly as they do the front- & backmatter.
jackie_w is offline   Reply With Quote
Old 03-20-2017, 03:31 PM   #26
dmapr
Evangelist
dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.dmapr ought to be getting tired of karma fortunes by now.
 
Posts: 469
Karma: 600816
Join Date: Sep 2009
Device: Kobo Aura HD, Kobo Aura One
I never merge multiple stylesheets. It's easier for me to clean up the few styles in 2-3 places than to deal with the fallout.

I do occasionally merge multiple styles for the same selector within a single stylesheet.
dmapr is offline   Reply With Quote
Old 03-20-2017, 04:11 PM   #27
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,233
Karma: 11768331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
I always merge stylesheets (no preach about the bad of my actions, waste of your time and mine), because I like cleaner structure, in the same way I order the stylesheet, remove non used styles, try to unify when I can, remove all in-line styling, change div to p... my way of working.
Terisa de morgan is offline   Reply With Quote
Old 03-21-2017, 01:57 AM   #28
anacreon
Guru
anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.anacreon ought to be getting tired of karma fortunes by now.
 
anacreon's Avatar
 
Posts: 960
Karma: 3475832
Join Date: May 2012
Location: France
Device: Elipsa, Sage
chapter name display

I read only kepubs, and usually choose the page number display by chapter, but recently I tried display by entire book. I missed the current chapter name, so redid the patches with

patch_name = `Always display chapter name on navigation menu`
patch_enable = `yes`


but it doesn't work (on my Aura One). I tried twice since I thought I might have made a mistake, but the result is the same: just the page number, on several books I tried.

Did anybody have a similar problem?
anacreon is offline   Reply With Quote
Old 03-21-2017, 10:08 AM   #29
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,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by anacreon View Post
I read only kepubs, and usually choose the page number display by chapter, but recently I tried display by entire book. I missed the current chapter name, so redid the patches with

patch_name = `Always display chapter name on navigation menu`
patch_enable = `yes`


but it doesn't work (on my Aura One). I tried twice since I thought I might have made a mistake, but the result is the same: just the page number, on several books I tried.

Did anybody have a similar problem?
I think maybe you've just misunderstood what the patch does. When it's enabled and you have set 'Display progress for entire book', you can see the chapter name (for both epub and kepub) but only via the bottom menu <-> icon. The normal book pages just show Page x of y in the footer.
jackie_w is offline   Reply With Quote
Old 03-22-2017, 03:47 AM   #30
ntson
Member
ntson began at the beginning.
 
Posts: 15
Karma: 10
Join Date: Mar 2017
Device: Kobo Glo HD
i can't run it on Mac OS 10.12. Pls help

Quote:
MacBook-Air: patch_kobo_4038966 nts $ ./4.3.8966.sh
Extracting files to patch from 4.3.8966_source/kobo-update-4.3.8966.zip ...
caution: filename not matched: KoboRoot.tgz
tar: ./usr/local/Kobo/nickel: Not found in archive
tar: ./usr/local/Kobo/librmsdk.so.1.0.0: Not found in archive
tar: ./usr/local/Kobo/libnickel.so.1.0.0: Not found in archive
tar: ./usr/local/Kobo/libadobe.so: Not found in archive
tar: Error exit delayed from previous errors.
Cleaning up /var/folders/8_/g2t56sds7qd4pncngkrs_tcr0000gn/T/patch32lsb_XXXXXXXX.WHBcIOvx

Last edited by ntson; 03-22-2017 at 04:33 AM.
ntson is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.17.3 GeoffR Kobo Developer's Corner 60 09-17-2015 05:35 PM
Instructions for patching firmware 3.17.0 GeoffR Kobo Developer's Corner 49 08-16-2015 05:20 AM
Instructions for patching firmware 3.11.0 GeoffR Kobo Developer's Corner 226 06-01-2015 05:32 AM
Instructions for patching firmware 3.8.0 GeoffR Kobo Developer's Corner 92 10-22-2014 07:22 AM
Instructions for patching firmware 3.3.x, 3.4.x, 3.5.x GeoffR Kobo Developer's Corner 285 08-27-2014 10:06 AM


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


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