View Single Post
Old 06-21-2011, 05:44 PM   #143
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: 79,792
Karma: 146391129
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 ldolse View Post
Been scouring my epubs programmatically to see just how margins were used on @body and @page, the results were interesting to say the least.
  • Nearly 50% of my epubs have some sort of margins specified on body or @page
  • 60% of these specify margins in em (generally the most egregious offender, why em margins on devices that allow font size to be increased?!)
  • 27% have margins specified in px
  • 13% specify margins using pt, typically 5pt

Note many have some combination of px/pt/em, didn't count those variations.

The margins in pt were generally the most reasonable. I also saw a lot of right hand margins being specified in px to get around Adobe's page number rendering.

I've been thinking more about how to programmatically replace/insert margins. This is probably a very reasonable thing to do, at least when considering users of older Adobe renderers that may want to create a slightly larger right margin. Aside from the matter of successfully injecting them, which is solvable, this brings up other questions for Quality Check, as one would want to be able to exclude whatever margin Modify Epub was configured to insert from a search...
There is no @body. And @page should be removed (IMHO). The xpgt file should also be removed and the OPF updated to have the entry removed. Oh and the XML files need the page template reference removed as well

I put the margins in body and I fix them where they are also written differently. There a bug in Calibre you'll need to code for.. in each XML Calibre writes, it adds a style to the XML that has a 5pt top and bottom margin. Those have to go.
JSWolf is offline   Reply With Quote