View Single Post
Old 12-17-2018, 06:59 PM   #59
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
Now that there is plenty of space at the top and bottom of the page, I think the default settings for the ePub fixed top/bottom margins patch should be reduced to zero.

ePub fixed top/bottom margins: (libnickel.so.1.0.0.yaml)
Spoiler:
Code:
ePub fixed top/bottom margins:
  - Enabled: no
  - PatchGroup: ePub padding-bottom alternatives
  - Description:
      This patch sets the @page margin sizes in epubs to fixed custom values,
      overriding any @page margin set in the book's CSS stylesheet. (But beware
      that some books also set page margins in an XPGT stylesheet which are added
      to any CSS @page margins, and those will not be affected by this patch.
      See the "Ignore ePub book Adobe XPGT stylesheet (page-template.xpgt)" patch
      in librmsdk.so.1.0.0.yaml for a way to remove the XPGT stylesheet margins.)
  - FindReplaceString:
      Find: "\x20padding-bottom: %1em !important;\n"
      Replace: "}@page{margin:00px 00px 00px}body{"
    # *** Replacement values start here, don't change anything above ***
  - ReplaceString: {Offset: 0x0E, Find: "00px", Replace: "00px"} # TOP MARGIN
  - ReplaceString: {Offset: 0x18, Find: "00px", Replace: "00px"} # BOTTOM MARGIN
    #
    # Minimum LEFT/RIGHT MARGIN: (This margin will overlap the left/right margin
    # set with the adjustment slider, not add to it.)
  - ReplaceString: {Offset: 0x13, Find: "00px", Replace: "00px"}


Edit: Just a couple of notes for those unfamilliar with this patch:

1. It can't reduce the size of the built-in header/footer, negative values don't work, but setting the @page margins to zero with the patch at least overrides any larger @page margins that might have been set in the book's CSS stylesheet by the publisher.

2. You can change the units from px to others such as mm or pt, but % sizes don't work for @page margins, and em sizes are scaled relative to the base font size, not necessarily to the font size used for paragraphs.

Last edited by GeoffR; 12-17-2018 at 07:52 PM. Reason: Added some notes
GeoffR is offline   Reply With Quote