View Single Post
Old 07-02-2012, 09:23 AM   #184
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,970
Karma: 147448039
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
I'm not sure where you got the idea that the purpose of this feature is to remove margins - the feature is called 'Rewrite Margins', not 'delete all @page margins'. That said I'm pretty sure you get what you're asking for when you set all of Calibre's margins to zero.

The plugin does know if there is already an @page or not and rewrites it appropriately, aside from moving left/right from body to @page as discussed previously - I understand why Kovid uses body now, but modifying the code to match Calibre would be non-trivial at this point, and what I've done works fine on ADE renderers. This is the first time it's been discussed in over a year, so it doesn't sound particularly critical to me.

If you're actually describing a specific use case where the plugin is failing you (but falls within the scope of the feature), PM me a link to a book and steps to reproduce what's bugging you.

Edit - to be quite clear - the feature as it's designed is meant to work with the matching check in quality check, and the point is to make sure that all ePub books have margins matching your Calibre preferences. If the book doesn't have margins to start with but you have them specified in your Calibre preferences then the plugin will insert them in order to match Calibre. Top & bottom margins are only supported in @page. Like I said before, if you don't want any margins at all then set your Calibre preferences to zero - if setting them to zero isn't working let me know (Will test Jackie's scenario as mentioned above).
The name of the option is rewrite, not add in if missing. So if there is no @page, then the plugin should not add one as there's nothing to rewrite. You've got it wrong by adding in an @page wen one doesn't exist. That's not rewriting. That's adding. Not the same at all.

As for the bug, margins are set to no margins and yet the we still get
Code:
@page {
    
}
There was no @page in the first place so there should not be an @page at all. And I do think with margins set to none, if there is an @page, it should be removed when no margins are specified.

Last edited by JSWolf; 07-02-2012 at 09:30 AM.
JSWolf is offline   Reply With Quote