Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 10-05-2015, 08:47 PM   #31
JoOrwick
Connoisseur
JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.JoOrwick has top level security clearance to Area 51.
 
Posts: 59
Karma: 94656
Join Date: Oct 2015
Location: Croatia
Device: Kobo Aura One, Kindle Paperwhite 3 (2015)
Quote:
Originally Posted by EbokJunkie View Post
Yes, at least negative top margin works (see attached).

Code:
html {
  margin: -17pt -11pt -17pt -11pt !important;
}
It doesn't really work, though. Amazon apparently forces top and bottom margins on their devices. There's always a 'white' line on the top and bottom of the screen.
JoOrwick is offline   Reply With Quote
Old 11-13-2018, 11:19 AM   #32
bnpssilva
Connoisseur
bnpssilva began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2014
Location: Brazil
Device: KV, kOA2, KPW1, KPW2, KPW4,KT1, KT3, KT4,kOBOS, Nooks, PRS-T2
Hello.

I know this is an old topic, but it's still nagging me . I can't make the negative margins work properly in the conversion settings of Calibre. Editing the azw3 afterwards it works though. I'm putting in the css: margin-left: -2%;margin-right: -2%;
Does anybody know how to set Calibre to do it in the conversion, so I won't need to edit the e-book after ?

Thanks in advance.
bnpssilva is offline   Reply With Quote
Advert
Old 11-13-2018, 01:09 PM   #33
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
how to set Calibre to do it in the conversion, so I won't need to edit the e-book after ?
I have not found a way using Calibre conversion options (Styling; Transform Styles). Calibre seems to wipe out any attempts to specify margins less than 0 on html, div, body or p tags during conversion. I also have to edit AZW3 files to recover 100 pixels of valuable read space the Paperwhite wastes.
Brett Merkey is offline   Reply With Quote
Old 11-13-2018, 01:31 PM   #34
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Brett Merkey View Post
I have not found a way using Calibre conversion options (Styling; Transform Styles). Calibre seems to wipe out any attempts to specify margins less than 0 on html, div, body or p tags during conversion. I also have to edit AZW3 files to recover 100 pixels of valuable read space the Paperwhite wastes.
-P margins are valid (hanging indent)
BUT you can never go negative of the Body margin

The Kindle Collections plugin can be used to set this (at least on a K4).
There is a file somewhere (I can no longer find it) on the K4 that I set the Horizontal margin down to 10, (5 on each side) the device sets 40 as the smallest) smaller than the device does.
You can't write protect this because other spacing's use the same file (line and font)

The Kindle Collections plugin can be used to set this.
theducks is offline   Reply With Quote
Old 11-13-2018, 01:34 PM   #35
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,689
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Ah. it is hidden
https://wiki.mobileread.com/wiki/Kin..._Change_Margin
theducks is offline   Reply With Quote
Advert
Old 11-13-2018, 02:22 PM   #36
bnpssilva
Connoisseur
bnpssilva began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2014
Location: Brazil
Device: KV, kOA2, KPW1, KPW2, KPW4,KT1, KT3, KT4,kOBOS, Nooks, PRS-T2
Thank you, theducks. But this only works with very old kindle firmware.
bnpssilva is offline   Reply With Quote
Old 11-13-2018, 03:14 PM   #37
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
Ah. it is hidden...
That hack used to work well. However, Amazon "improved" the Kindle versions so that it wouldn't. :-)

I think the wasted margin problem comes down to the fact that the Kindle software developers kept margin settings the same from the low-resolution devices. But that means the 300 ppi devices have too much white space.

Last edited by Brett Merkey; 11-13-2018 at 03:17 PM.
Brett Merkey is offline   Reply With Quote
Old 11-13-2018, 04:03 PM   #38
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
-P margins are valid (hanging indent)
In my experience, Calibre respects any negative margins set in an edit session, including on body or html elements. However, any attempt to create negative margins during conversion for the azw3 version, leaving the epub version clean and intact, seems to fail. The idea is to add the hack to the version going to the Kindle while leaving a clean and hackless epub in the Calibre library.

The original poster probably does the same thing I do: edit the epub, convert, edit to add the hack to the resulting azw3, transfer to Kindle, then delete the azw3 in Calibre.

Last edited by Brett Merkey; 11-13-2018 at 04:06 PM.
Brett Merkey is offline   Reply With Quote
Old 11-14-2018, 05:44 AM   #39
bnpssilva
Connoisseur
bnpssilva began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2014
Location: Brazil
Device: KV, kOA2, KPW1, KPW2, KPW4,KT1, KT3, KT4,kOBOS, Nooks, PRS-T2
Thank you, Brett. That's what I'm doing for years: Editing Mannualy the ebook after conversion. I was hoping somebody would know a better way.
bnpssilva is offline   Reply With Quote
Old 11-14-2018, 05:53 AM   #40
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,774
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
what exactly are you putting in the css?
kovidgoyal is online now   Reply With Quote
Old 11-14-2018, 07:06 AM   #41
bnpssilva
Connoisseur
bnpssilva began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2014
Location: Brazil
Device: KV, kOA2, KPW1, KPW2, KPW4,KT1, KT3, KT4,kOBOS, Nooks, PRS-T2
Example:

.first {
border-bottom: 0;
border-top: 0;
display: block;
hyphens: auto;
margin-bottom: 0;
margin-top: 0;
margin-left: -2%;
margin-right: -2%;
padding-bottom: 0;
padding-top: 0;
text-align: justify;
text-indent: 1.5em;
}

Simply added the negative margins. I wish I could set it in the conversion, so I wouldn't need to edit the books.
bnpssilva is offline   Reply With Quote
Old 11-14-2018, 07:30 AM   #42
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
When converting from ePub to AZW3, this Extra CSS:
Code:
html {
  margin-left: -20px;
  margin-right: -20px;
}
Ends up in the CSS file used by the table of contents of the AZW3:
Code:
li {
    list-style-type: none
    }
a {
    text-decoration: none
    }
a:hover {
    color: red
    }
html {
    margin-left: -20px;
    margin-right: -20px
    }
Only the Table of Contents uses the above extra CSS.
Attached Files
File Type: epub Lorem Ipsum (Test) - Jim Roberts.epub (5.5 KB, 173 views)
File Type: azw3 Lorem Ipsum (Test) - Jim Roberts.azw3 (23.3 KB, 124 views)
JimmyR is offline   Reply With Quote
Old 11-14-2018, 07:52 AM   #43
Brett Merkey
Not Quite Dead
Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.Brett Merkey ought to be getting tired of karma fortunes by now.
 
Posts: 189
Karma: 654170
Join Date: Jul 2015
Device: Paperwhite 4; Galaxy Tab
Quote:
Only the Table of Contents uses the above extra CSS.
Nice detective work. I never use a TOC file so I never noticed. So, if I understand correctly, this means that Calibre does partly handle the Extra CSS, but it goes to a file which does not have any global effect on the book. Switch destinations for the snippet and we have a new feature?
Brett Merkey is offline   Reply With Quote
Old 11-14-2018, 08:05 AM   #44
JimmyR
ɴₐɴ
JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.JimmyR ought to be getting tired of karma fortunes by now.
 
JimmyR's Avatar
 
Posts: 421
Karma: 2507940
Join Date: Jun 2011
Location: 37.2N 93.3W
Device: KV PW4 PW3 PW2
I don't know if Kovid would really want to implement a hack--for lack of a better term. I just thought it was odd that that CSS ended up where it did.
JimmyR is offline   Reply With Quote
Old 11-14-2018, 08:19 AM   #45
bnpssilva
Connoisseur
bnpssilva began at the beginning.
 
Posts: 59
Karma: 10
Join Date: Jan 2014
Location: Brazil
Device: KV, kOA2, KPW1, KPW2, KPW4,KT1, KT3, KT4,kOBOS, Nooks, PRS-T2
Kovidgoyal, couldn't you please implement something in Calibre to set negative margins in the conversion ? The margins in the kindle are a terrible waste. Same problem in the Cybook.
bnpssilva is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best settings for 1:1 ePub to AZW3 conversion? gers1978 Conversion 8 06-03-2013 10:50 PM
azw3 to epub conversion stuck on 1% krysk Conversion 2 04-21-2013 11:53 AM
AZW3 to EPUB Conversion Probs grizedale Conversion 4 04-16-2013 06:47 PM
Conversion from epub to azw3 Joy736 Conversion 12 01-01-2013 11:00 AM
Using negative margins Agama Conversion 0 03-03-2012 07:29 AM


All times are GMT -4. The time now is 10:22 AM.


MobileRead.com is a privately owned, operated and funded community.