View Single Post
Old 01-06-2013, 01:46 PM   #8
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,401
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 jackie_w View Post
There is another thing to consider...

Left/Right page margins in the epub css can be set in @page and/or the body css. If non-zero margins are set in both places then they should be additive e.g.
Code:
@page {margin-left: 2pt; margin-right: 2pt}
body.calibre {margin-left: 5pt; margin-right: 5pt}
should result in 7pt L/R margins.

I'm not sure, how the Kobo is applying its page margin setting. Is it overwriting the @page or the body css. Or is it possibly adding to one or the other?

If you want to add top/bottom page margins then the only effective way is to use the @page -- but it doesn't look like the Kobo lets you use the slider to change these. I think you'd have to hard-code it in the epub, either manually or using calibre. Even then I'm not sure whether the Kobo would overwrite the values with zero.

I can't test at the moment as my PC is too flaky to use for long periods.
As far as I can in some quick testing, the margins are additive. The margin used seems to be the sum of the margins set by the various applicable style elements. That is if the body style is set to 25 points and the paragraph style is set to 5 pts, the paragraph will display with 30 point margins.
Simplified stylesheet for my testing was something like:
.body {margin: 0 25pt;}
.para {margin: 0 15pt;}
.sentence {margin: 0 20pt;}

(the margins set should be top&bottom 0, right and left xxpt)

This gave me a final margin which was visually equivalent to setting the body margin to 60pt and the rest to 0 for that sentence.

The Kobo's margin slider seems to act as just another element. for the left & right margins.

This was using ADE 2.0 to display the epubs -- just a touch faster than connecting a Kobo and waiting through the restart and processing content.

Regards,
David
DNSB is offline   Reply With Quote