![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
Calibre removes negative margins as fake
Created epub with negative side margins and converted to azw3.
During conversion Calibre reported removing of "fake margins" - that were all my added negative margins. Here Kovid wrote that "...Negative margins can have perfectly legitimate uses.". Has this point of view changed in the latest versions? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It has nothing to do with negativeness of the margins. A margin is detected as fake if the same margin is present on most paragraphs. If you want to prevent detection of fake margins, there is an option to do that in the conversion dialog.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
If you don't want fake margins removed then uncheck the box, see attached. Image one is the per book setting that is saved if the book has been previously converted and image two is the Common Options, set for all future book conversions.
|
![]() |
![]() |
![]() |
#4 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
Thanks, but how to preserve fake margins via command line interface? I work only by command line and mobi ouput option "--mobi-ignore-margins" doesn't work.
Documentation wording is very unclear on this option: "Ignore margins in the input document. If False, then the MOBI output plugin will try to convert margins specified in the input document, otherwise it will ignore them" What False means? This option doesn't seem to accept any parameter values? Just using this option still results in removing my margins. Update: Followed Doctor Ohh advice, unchecked option Remove fake margins in GUI and tried conversion to mobi (both). Result: no negative margins applied. Interesting that kindlegen respects my addition of negative margins (I do this under tag *{}) but Calibre still kills them. Last edited by EbokJunkie; 11-30-2013 at 02:20 AM. |
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
--disable-remove-fake-margins
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,889
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Good Luck. |
|
![]() |
![]() |
![]() |
#7 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
Unfortunately, option --disable-remove-fake-margins doesn't seem to work.
Yes, message about removing fake margins goes away but resulting azw3 (converted epub->azw3) still shows wide margins. Fed the same ePub to kindlegen - and received mobi with decreased margins. Using Sigil, set side margins in ePub to +20pt. Kindlegen produced mobi with very wide margins. Calibre again did nothing to azw3, no change to original margins. I'm adding this code (plus or minus for sign of value) to css in my ePub: Code:
* { margin-left: 20pt; margin-right: 20pt; } Maybe Calibre doesn't accept tag *? |
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,164
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I have no idea what you are trying to do. If you want to somehow force the kindle to reduce its normal page margins, then there is no way to do that reliably. Setting negative page margins is a hack that will break in many situations.
As far as calibre is concerned, you can only do the following: 1) Set the various page margin options to less than zero, in which case calibre will not set any page margins at all 2) Disable removal of fake margins so that whatever fake margins you are using are left alone And incidentally, using * to set margins is extremely poor practice. If you have any nested tags at all every nested tag will get an additional margin. |
![]() |
![]() |
![]() |
#9 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
|
You're right, I'm trying to cut down a bit side margins on Paperwhite, this hack is still better than jailbreaking. I already see the negative ramifications.. but for simple texts it works if applied sparingly. Thank you for your help.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre removes pages breaks from mobi | djprescott | Conversion | 2 | 02-12-2013 05:24 PM |
Using negative margins | Agama | Conversion | 0 | 03-03-2012 07:29 AM |
Calibre removes final 'x' from ISBNs when importing books | jackbrown | Library Management | 1 | 06-08-2011 12:32 PM |
Calibre removes first letter of each line on mobi=>rtf | lunixer | Calibre | 1 | 11-07-2010 10:53 AM |