12-20-2010, 03:48 AM | #1 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
Margins
In the ebook conversion/page setup dialog you can define margins in "points".
Kovid, would it be possible to add the possibility to define these margins in "em"s? Why am I asking this? The Adobe Reader used in the new big Pocketbooks (902, 903) desperately needs margins. It is possible to set them in Calibre to something like 36 points, but than these files can't be read on 6"-devices. By setting the margins to 2em or 3em the books might be readable in both devices. Thank you in advance. |
12-20-2010, 12:01 PM | #2 |
creator of calibre
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can do this yourself, by simply wrapping everything in a div with a margin set in ems.
As for changing the option, I'd rather not do it as it would be a very disruptive change, all of people existing settings would have to be forgotten. |
12-20-2010, 12:22 PM | #3 |
Wizard
Posts: 1,717
Karma: 3790058
Join Date: Oct 2010
Location: NYC
Device: Kindle Paperwhite, Sony 650
|
I have a similar question about margins. I want to set them in the Extra CSS, not Calibre's setting. Like this:
body { margin-top: 1em; margin-left: 1em; margin-right: 1em; } But this is never taking effect because of the Calibre setting. How can I "turn off" the calibre setting and use my own CSS? |
12-20-2010, 12:23 PM | #4 |
creator of calibre
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
set them to zero and use a wrapper div, as I said in my previous post.
|
12-20-2010, 12:50 PM | #5 |
Wizard
Posts: 1,717
Karma: 3790058
Join Date: Oct 2010
Location: NYC
Device: Kindle Paperwhite, Sony 650
|
Use a wrapper div. So there is no way to do this without opening up the epub and editing it?
|
12-20-2010, 12:56 PM | #6 |
creator of calibre
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
no .
|
12-20-2010, 01:26 PM | #7 |
creator of calibre
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I should add that I would recommend against setting margins in ems. They quickly become unusable if the user happens to increase the font size they are reading at.
|
12-20-2010, 02:36 PM | #8 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
Kovid, thank you and karma for thinking about it. I can see your points.
|
01-22-2011, 02:31 AM | #9 |
Member
Posts: 20
Karma: 10
Join Date: Jan 2011
Device: Amazon Kindle 3 3G+WiFi
|
Bumping this because I'm running into problems myself.
I'm using Sigil to edit and format an epub, and there are several passages that I want to increase the margins on, and so I am setting those passages to a style in the CSS within the epub, which seems to be working but not honoring the "margin-left" and "margin-right" arguments. I have unchecked "Ignore margins" in Calibre, and it's still not honoring those settings. Should it in fact honor them if "Ignore margins" is unchecked, or am I doing something wrong? |
01-22-2011, 03:38 AM | #10 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
|
|
01-22-2011, 03:52 AM | #11 | |
Member
Posts: 20
Karma: 10
Join Date: Jan 2011
Device: Amazon Kindle 3 3G+WiFi
|
Quote:
Won't an epub-to-epub overwrite the initial file? I'm guessing I'd want to back that up first? |
|
01-22-2011, 04:01 AM | #12 | |
US Navy, Retired
Posts: 9,864
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Nexus 7
|
Quote:
True it would overwrite and you should back it up. |
|
01-22-2011, 04:15 AM | #13 |
Member
Posts: 20
Karma: 10
Join Date: Jan 2011
Device: Amazon Kindle 3 3G+WiFi
|
Okay, so I backed it up, and ensured that "Ignore Margins" is still unchecked. (It was.)
An epub-to-epub was completely clean, it rendered just how I expected it to. Epub-to-mobi, though: it's now respecting margin-left, but not margin-right or margin-top (the latter of which I've dropped to 0 because I want paragraphs during these passages butting right up against each other.) So I'm still puzzled. |
01-22-2011, 09:46 AM | #14 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
I know the Kindle doesn't support margin-right and margin-top. I'm not sure but I think it's a limitation of the MOBI format.
|
01-22-2011, 10:14 AM | #15 |
creator of calibre
Posts: 43,826
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
MOBI doesn't support margins. calibre fakes left margins in MOBI output by nesting <blockquotes>
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hacks Turning Margins off and on ?? | drone207A | Amazon Kindle | 0 | 10-01-2010 12:42 AM |
Margins and Indents | sloecoach | Calibre | 2 | 09-26-2010 04:41 PM |
Margins in 6.3 | Amalthia | Calibre | 19 | 07-10-2010 08:40 AM |
Help with margins | Switch | Calibre | 3 | 04-30-2010 02:53 AM |
Margins | cklammer | EPUBReader | 0 | 12-07-2009 02:55 AM |