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 12-17-2014, 01:23 PM   #76
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 npr View Post
I suspect this method can fix my pet issue of marks on the bottom of the page if only the patch can be made to add padding to a page in place of just to a paragraph.
Unfortunately there is no way to add padding to a page. There is a @page rule that can be used to set the page margin, but it can't be used to add padding. The other problem is that the kepub reader totally ignores the @page rule anyway!

But here is a patch if you want to test it for yourself:
Spoiler:
Code:
<Patch>
patch_name = `Add kepub @page margin (doesn't work, kepub reader ignores @page)`
patch_enable = `yes`
#
# This patch adds the following line to the built-in kepub stylesheet:
#
#   @page{margin: 25px 25px 25px 25px!important}
#
replace_string = DB4470, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00`
#
replace_string = DB44E6, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00 \x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00 \x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00 \x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x00 \x001\x000\x000\x00%\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00 \x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00,\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00H\x00i\x00g\x00h\x00l\x00i\x00g\x00h\x00t\x00i\x00n\x00g\x00,\x00 \x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00{\x00f\x00o\x00n\x00t\x00-\x00s\x00i\x00z\x00e\x00:\x001\x000\x000\x00%\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00-\x00w\x00e\x00b\x00k\x00i\x00t\x00-\x00t\x00e\x00x\x00t\x00-\x00c\x00o\x00m\x00b\x00i\x00n\x00e\x00:\x00i\x00n\x00h\x00e\x00r\x00i\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00{\x00b\x00a\x00c\x00k\x00`
#
replace_string = DB4626, `.\x00K\x00B\x00S\x00e\x00a\x00r\x00c\x00h\x00R\x00e\x00s\x00u\x00l\x00t\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00#\x00C\x006\x00C\x006\x00C\x006\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00#\x00C\x006\x00C\x006\x00C\x006\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00{\x00c\x00o\x00l\x00o\x00r\x00:\x00b\x00l\x00a\x00`
#
replace_string = DB469C, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00 \x00a\x00 \x00{\x00 \x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00`
#
replace_string = DB46FC, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00 \x00{\x00 \x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00 \x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00 \x00n\x00o\x00n\x00e\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00{\x00b\x00a\x00c\x00k\x00g\x00r\x00o\x00u\x00n\x00d\x00-\x00c\x00o\x00l\x00o\x00r\x00:\x00t\x00r\x00a\x00n\x00s\x00p\x00a\x00r\x00e\x00n\x00t\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00t\x00e\x00x\x00t\x00-\x00d\x00e\x00c\x00o\x00r\x00a\x00t\x00i\x00o\x00n\x00:\x00n\x00o\x00n\x00e\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00`
#
replace_string = DB4802, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00`
#
replace_string = DB48C0, `.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `B\x00A\x00u\x00t\x00h\x00o\x00r\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00d\x00o\x00t\x00t\x00e\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00}\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00`
#
replace_string = DB49FA, `.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00,\x00 \x00.\x00K\x00B\x00A\x00n\x00n\x00o\x00t\x00a\x00t\x00i\x00o\x00n\x00C\x00o\x00n\x00t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00 \x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `t\x00i\x00n\x00u\x00e\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00h\x00o\x00r\x00i\x00z\x00o\x00n\x00t\x00a\x00l\x00-\x00t\x00b\x00"\x00]\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x002\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00{\x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00`
#
replace_string = DB4B1A, `.\x00K\x00B\x00S\x00t\x00a\x00c\x00k\x00K\x00e\x00y\x00w\x00o\x00r\x00d\x00[\x00w\x00r\x00i\x00t\x00i\x00n\x00g\x00M\x00o\x00d\x00e\x00=\x00"\x00v\x00e\x00r\x00t\x00i\x00c\x00a\x00l\x00-\x00r\x00l\x00"\x00]\x00 \x00a\x00 \x00{\x00 \x00b\x00o\x00r\x00d\x00e\x00r\x00-\x00r\x00i\x00g\x00h\x00t\x00:\x00 \x001\x00p\x00x\x00 \x00s\x00o\x00l\x00i\x00d\x00 \x00b\x00l\x00a\x00c\x00k\x00 \x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00;\x00 \x00}\x00 \x00\t\x00`, `b\x00l\x00a\x00c\x00k\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00 \x00@\x00p\x00a\x00g\x00e\x00{\x00m\x00a\x00r\x00g\x00i\x00n\x00:\x00 \x002\x005\x00p\x00x\x00 \x002\x005\x00p\x00x\x00 \x002\x005\x00p\x00x\x00 \x002\x005\x00p\x00x\x00!\x00i\x00m\x00p\x00o\x00r\x00t\x00a\x00n\x00t\x00}\x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00 \x00`
#
# Fix typo in annotations styles: KBAuthorAnnotation --> .KBAuthorAnnotation
replace_string = DB4554, `\x20`, `.`
#
</Patch>


I think the only solution to your problem is to add padding between the lines, i.e. increase the line spacing. (other than using the epub reader instead, which works with much smaller line spacing settings than the kepub reader).
GeoffR is offline   Reply With Quote
Old 12-17-2014, 01:53 PM   #77
npr
Zealot
npr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five wordsnpr can name that ebook in five words
 
Posts: 119
Karma: 37418
Join Date: Jan 2013
Device: H2OE2, Libra 2
Yes I have tried this patch and yes you're right it doesn't work, but thank for trying.

My present solution is to modify the line spacing in your patch to remove the smaller spacings which cause the worst of this issue. At least it makes it easier for me to find a suitable font size / line size setting.
eg:
# 15 values for replacement
replace_float = 6C3BC0, 1.0, 0.82
replace_float = 6C3C88, 1.05, 0.83
replace_float = 6C3C90, 1.07, 0.84
replace_float = 6C3C98, 1.1, 0.85
replace_float = 6C3BC8, 1.2, 0.86
replace_float = 6C3CA0, 1.35, 0.87
replace_float = 6C3BD0, 1.5, 0.88
replace_float = 6C3CA8, 1.7, 0.89
replace_float = 6C3CB0, 1.8, 0.9
replace_float = 6C3BD8, 2.0, 0.92
replace_float = 6C3CB8, 2.2, 0.94
replace_float = 6C3CC0, 2.4, 0.97
replace_float = 6C3CC8, 2.6, 1.0
replace_float = 6C3CD0, 2.8, 1.05
replace_float = 6C3BE0, 3.0, 1.1
npr is offline   Reply With Quote
Old 12-17-2014, 03:40 PM   #78
ewphoenix123
Addict
ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'ewphoenix123 understands when you whisper 'The dog barks at midnight.'
 
Posts: 201
Karma: 42238
Join Date: Oct 2012
Device: Kobo: Glo, Aura , Aura H2O, Aura ONE, Forma, Elipsa
Quote:
Originally Posted by GeoffR View Post
Unfortunately there is no way to add padding to a page. There is a @page rule that can be used to set the page margin, but it can't be used to add padding. The other problem is that the kepub reader totally ignores the @page rule anyway!

I think the only solution to your problem is to add padding between the lines, i.e. increase the line spacing. (other than using the epub reader instead, which works with much smaller line spacing settings than the kepub reader).
That's to bad. Other then that it's working great. But I need my small linespacing to be happy.

Might something like this work?

* {
box-sizing: border-box;
width: 100%;
border: 0.2px solid white;
}

Last edited by ewphoenix123; 12-17-2014 at 03:48 PM.
ewphoenix123 is offline   Reply With Quote
Old 12-17-2014, 09:01 PM   #79
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
Thanks! I've updated the `all kepubs` patches in post #57 with this change.


BTW, I have been distinguishing between synced and sideloaded kepubs, but really the difference is between Kobo-created kepubs and other kepubs. If you were to sideload a Kobo-created kepub (say by syncing it to the desktop, removing DRM, and sideloading it to the ereader), then it would work just the same as a synced kepub.
it seems that this kind of setting like body>p can't cover all sideloads kepub. I tested, some books work well and some not.
Attached Thumbnails
Click image for larger version

Name:	screen141218-095436.png
Views:	624
Size:	195.7 KB
ID:	132642  
scoky is offline   Reply With Quote
Old 12-18-2014, 06:37 AM   #80
makara
Connoisseur
makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'
 
makara's Avatar
 
Posts: 79
Karma: 10000
Join Date: Jul 2012
Location: Israel
Device: KA1, KLH2O, Oasis 3
I can not make a patch for Aura HD using Mac. I think a little experience. Can anybody help me?
makara is offline   Reply With Quote
Old 12-18-2014, 09:35 AM   #81
frostschutz
Linux User
frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.frostschutz ought to be getting tired of karma fortunes by now.
 
frostschutz's Avatar
 
Posts: 2,282
Karma: 6123806
Join Date: Sep 2010
Location: Heidelberg, Germany
Device: none
Have you ever tried/considered porting this to the Kobo so the device would patch itself after placing patch files in the USB storage?
frostschutz is offline   Reply With Quote
Old 12-18-2014, 05:37 PM   #82
erikssenmar867
Connoisseur
erikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of lighterikssenmar867 is a glorious beacon of light
 
Posts: 58
Karma: 12028
Join Date: Nov 2013
Device: Kobo Aura H2O
geoffr thank you very much for your patch and your disponibility
erikssenmar867 is offline   Reply With Quote
Old 12-18-2014, 07:01 PM   #83
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 scoky View Post
it seems that this kind of setting like body>p can't cover all sideloads kepub. I tested, some books work well and some not.
Is increasing the padding from 0.1em to 0.2em enough to fix it? Sone fonts will need more padding than others.


Quote:
Originally Posted by frostschutz View Post
Have you ever tried/considered porting this to the Kobo so the device would patch itself after placing patch files in the USB storage?
That's an interesting idea, it would have the advantage of avoiding any possibility of using the wrong firmware version to make the patch. I haven't thought about what would be needed to make it work though.
GeoffR is offline   Reply With Quote
Old 12-18-2014, 07:06 PM   #84
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 makara View Post
I can not make a patch for Aura HD using Mac. I think a little experience. Can anybody help me?
On the Mac it is important to run the script from the command line, so you need to open a terminal, change to the patch_kobo_3120 directory, and run ./3.12.0.sh

If you post the output from running the script, we can see where the error is occuring.

(On my Linux system (Debian with Gnome desktop), double-clicking on 3.12.0.sh works, but it might not work on all Linux systems.)
GeoffR is offline   Reply With Quote
Old 12-18-2014, 08:05 PM   #85
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
Is increasing the padding from 0.1em to 0.2em enough to fix it? Sone fonts will need more padding than others.




That's an interesting idea, it would have the advantage of avoiding any possibility of using the wrong firmware version to make the patch. I haven't thought about what would be needed to make it work though.
I'm afraid not. Because "body>p" and "body>div"only have effect on the first class p and div under body. However, in some books, the main text is in the second or more deeper class and it will not be modified with the patch.

Code:
<body>
            <div>
              <p>text</p>
            </div>
          </body>
scoky is offline   Reply With Quote
Old 12-18-2014, 08:20 PM   #86
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 scoky View Post
I'm afraid not. Because "body>p" and "body>div"only have effect on the first class p and div under body. However, in some books, the main text is in the second or more deeper class and it will not be modified with the patch.
That is the purpose of the body>div selector: the padding gets added to the outer <div>, so it doesn't need to be added again to the inner elements.

With synced kepubs the padding only ever gets added to an outer <div>, never to <p> or any other inner elements. With the sideloaded kepubs there is not always an outer <div>, so the body>p selector ensures it gets added to the <p> in that case.

With the earlier versions of the patch, the padding got applied both to the outer <div> and to the inner <p>, so there would be twice as much padding (or more, depending on how many outer <div> layers), which is why I think increasing the amount of padding in the latest version of the patch might be needed to get as much padding as was in the earlier versions.
GeoffR is offline   Reply With Quote
Old 12-18-2014, 09:26 PM   #87
scoky
Connoisseur
scoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy bluescoky can differentiate black from dark navy blue
 
Posts: 62
Karma: 13112
Join Date: Feb 2013
Device: Kindle Paperwhite; KOBO AURA HD
Quote:
Originally Posted by GeoffR View Post
That is the purpose of the body>div selector: the padding gets added to the outer <div>, so it doesn't need to be added again to the inner elements.

With synced kepubs the padding only ever gets added to an outer <div>, never to <p> or any other inner elements. With the sideloaded kepubs there is not always an outer <div>, so the body>p selector ensures it gets added to the <p> in that case.

With the earlier versions of the patch, the padding got applied both to the outer <div> and to the inner <p>, so there would be twice as much padding (or more, depending on how many outer <div> layers), which is why I think increasing the amount of padding in the latest version of the patch might be needed to get as much padding as was in the earlier versions.
You are right. I increase paddings to 0.2em and it works very well. Thanks!
scoky is offline   Reply With Quote
Old 12-19-2014, 02:04 AM   #88
makara
Connoisseur
makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'makara knows the difference between 'who' and 'whom'
 
makara's Avatar
 
Posts: 79
Karma: 10000
Join Date: Jul 2012
Location: Israel
Device: KA1, KLH2O, Oasis 3
Here is a message in the terminal:
Vladimirs-iMac:~ vlad$ /Users/vlad/Desktop/patch_kobo_3120
-bash: /Users/vlad/Desktop/patch_kobo_3120: is a directory
Vladimirs-iMac:~ vlad$ /Users/vlad/Desktop/patch_kobo_3120/3.12.0.sh
Extracting files to patch from 3.12.0_source/kobo-update-3.12.0.zip ...
tar: ./usr/local/Kobo/librmsdk.so.1.0.0: Not found in archive
tar: ./usr/local/Kobo/libadobe.so: Not found in archive
tar: ./usr/local/Kobo/libnickel.so.1.0.0: Not found in archive
tar: Error exit delayed from previous errors.
Cleaning up /var/folders/my/lb6mkqpj5sz6xqccmwrt7m380000gn/T/patch32lsb_XXXXXXXX.iHMoK4JY
Vladimirs-iMac:~ vlad$
makara is offline   Reply With Quote
Old 12-19-2014, 03:15 AM   #89
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,546
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by GeoffR View Post
With the sideloaded kepubs there is not always an outer <div>, so the body>p selector ensures it gets added to the <p> in that case.
I wonder if "body>*" would work. "body>div, body>p" misses h1...h6 and blockquote at least.

I don't use kepub, sideloaded or not, so my interest is purely academical
Jellby is offline   Reply With Quote
Old 12-19-2014, 03:34 AM   #90
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 makara View Post
Here is a message in the terminal:
Vladimirs-iMac:~ vlad$ /Users/vlad/Desktop/patch_kobo_3120
-bash: /Users/vlad/Desktop/patch_kobo_3120: is a directory
Vladimirs-iMac:~ vlad$ /Users/vlad/Desktop/patch_kobo_3120/3.12.0.sh
Extracting files to patch from 3.12.0_source/kobo-update-3.12.0.zip ...
tar: ./usr/local/Kobo/librmsdk.so.1.0.0: Not found in archive
tar: ./usr/local/Kobo/libadobe.so: Not found in archive
tar: ./usr/local/Kobo/libnickel.so.1.0.0: Not found in archive
tar: Error exit delayed from previous errors.
Cleaning up /var/folders/my/lb6mkqpj5sz6xqccmwrt7m380000gn/T/patch32lsb_XXXXXXXX.iHMoK4JY
Vladimirs-iMac:~ vlad$
Can you try changing to the patch_kobo_3120 directory and run the script from there, i.e.

cd /Users/vlad/Desktop/patch_kobo_3120
./3.12.0.sh
GeoffR is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Instructions for patching firmware 3.11.0 GeoffR Kobo Developer's Corner 226 06-01-2015 05:32 AM
Instructions for patching firmware 3.2.0 DNSB Kobo Developer's Corner 66 12-05-2014 07:28 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
Instructions for patching firmware 3.1.1 GeoffR Kobo Developer's Corner 64 04-18-2014 01:23 PM


All times are GMT -4. The time now is 03:00 PM.


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