View Single Post
Old 01-06-2015, 10:10 AM   #105
alin72
Junior Member
alin72 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jan 2015
Device: kobo aura h2o
Quote:
Originally Posted by GeoffR View Post
Set the margin size by changing the very last line of the patch. The example changes it from 10px to 25px:
Code:
# Replacement value: a 2-digit number (margin size in pixels) seperated by \x00
# E.g. 25 = 2\x005, 30 = 3\x000, etc.
replace_string = C99BAC, `1\x000`, `2\x005`
If you wanted it bigger, say 40px, then change the last line to:
Code:
replace_string = C99BAC, `1\x000`, `4\x000`

Do I have to comment out the alternative 1 since it sets the margin to 10px? Does this look right now if I want to change it to 25px? Sorry I'm terrible at codes and this is my very first Kobo device..
<Patch>
patch_name = `ePub fixed top/bottom margin`
patch_enable = `yes`
#
# If enabled, this patch sets the top/bottom page margins for ePubs to a fixed
# value by adding a line @page {margin:10px 0 0 0} or @page {margin:10px 0}
# to the built-in stylesheet.
# Note that it has the side-effect of overriding any existing @page margins
# set in the book's stylesheet and removing the pre-existing padding-bottom
# from the built-in stylesheet's body rule.
#
# Alternative 1: Custom top, zero bottom margin: @page {margin:10px 0 0 0}
#replace_string = C99B8C, `\x20\x00p\x00a\x00d\x00d\x00i\x00n\x00g\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00\x20\x00%\x 001\x00e\x00m\x00\x20\x00!\x00i\x00m\x00p\x00o\x00 r\x00t\x00a\x00n\x00t\x00;\x00\n\x00`, `}\x00\n\x00@\x00p\x00a\x00g\x00e\x00\x20\x00{\x00 m\x00a\x00r\x00g\x00i\x00n\x00:\x001\x000\x00p\x00 x\x00\x20\x000\x00\x20\x000\x00\x20\x000\x00}\x00\ n\x00b\x00o\x00d\x00y\x00\x20\x00{\x00`
#
# Alternative 2: Custom top and equal bottom margin: @page {margin:10px 0}
#replace_string = C99B8C, `\x20\x00p\x00a\x00d\x00d\x00i\x00n\x00g\x00-\x00b\x00o\x00t\x00t\x00o\x00m\x00:\x00\x20\x00%\x 001\x00e\x00m\x00\x20\x00!\x00i\x00m\x00p\x00o\x00 r\x00t\x00a\x00n\x00t\x00;\x00\n\x00`, `}\x00\n\x00@\x00p\x00a\x00g\x00e\x00\x20\x00{\x00 m\x00a\x00r\x00g\x00i\x00n\x00:\x001\x000\x00p\x00 x\x00\x20\x000\x00\x20\x00\x20\x00\x20\x00\x20\x00 }\x00\n\x00b\x00o\x00d\x00y\x00\x20\x00{\x00`
#
# Replacement value: a 2-digit number (margin size in pixels) seperated by \x00
# E.g. 25 = 2\x005, 30 = 3\x000, etc.
replace_string = C99BAC, `1\x000`, `2\x005`
</Patch>

Last edited by alin72; 01-06-2015 at 10:13 AM.
alin72 is offline   Reply With Quote