View Single Post
Old 04-10-2014, 03:12 AM   #5
EbokJunkie
Addict
EbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blueEbokJunkie can differentiate black from dark navy blue
 
Posts: 230
Karma: 13495
Join Date: Feb 2009
Location: SoCal
Device: Kindle 3, Kindle PW, Pocketbook 301+, Pocketbook Touch, Sony 950, 350
@theducks
This works for Kindle Keyboard but not for Paperwhite.
I have a solution for this and do negative margins for all my epub->azw3 conversions but this is not that simple.
Each epub is unique, developers give arbitrary names to classes that control paragraphs of book text. The only way to provide decreased margins is to insert line, say, margin: 0pt -8pt 0pt, into css class that controls bulk of text.
I wrote a small Python script that does that. This script runs from batch file (Windows) that provides prior call to Sigil. Sigil opens ePub, I browse the html code, pinpoint the name of target class, copy it and shut down Sigil. My batch prompts for enetring the class name, I paste it by mouse right click and batch passes this name to my script that embeds line with negative margins exactly into the named class section in css.
The secret is not to use Calibre for further conversion because Calibre messes with class names and our negative margins line will land into the wrong class that doesn't control all book test.
For conversion, batch runs kindlegen, generates mobi and uses kindleunpack to extract and rename azw3.
Actually, I do use Calibre at the start of aforementioned batch file, but this is for conversion epub->epub that provides font embedding, setting font size and other cosmetic changes.
If this is of interest I can post working version of batch file and Python script.

Last edited by EbokJunkie; 01-19-2015 at 01:32 PM. Reason: typo
EbokJunkie is offline   Reply With Quote