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 09-28-2013, 10:41 AM   #1
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 201
Karma: 636268
Join Date: Sep 2012
Device: Sony PRS-950, Apple iPad3, Samsung Galaxy Note 2, Kobo Aura HD
CSS margin instead of margin-top, etc.

I don't usually convert ebooks with Calibre, but every once in a while it solves a problem for me, fast. I did an epub to epub conversion recently, and I noticed that instead of margin-top, margin-bottom, margin-left and margin-right in the CSS, I now see one single margin property or class (or whatever it's called), which I HATE. Is there a setting somewhere that will force Calibre to use margin-top, margin-left, etc. when converting? Apologies if this has been covered previously, but I couldn't find anything about it. A link to another thread would be fine. Thanks.
icallaci is offline   Reply With Quote
Old 09-28-2013, 11:08 AM   #2
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by icallaci View Post
I don't usually convert ebooks with Calibre, but every once in a while it solves a problem for me, fast. I did an epub to epub conversion recently, and I noticed that instead of margin-top, margin-bottom, margin-left and margin-right in the CSS, I now see one single margin property or class (or whatever it's called), which I HATE. Is there a setting somewhere that will force Calibre to use margin-top, margin-left, etc. when converting? Apologies if this has been covered previously, but I couldn't find anything about it. A link to another thread would be fine. Thanks.
margin: 1em 16pt 1em 2pt;

is the short form version
I have never seen Calibre use that in calibre# styles.
I tend to use those to show I have edited a conversion

I also don't believe Calibre ever changed a defined class that DID ise the short form.

The form is easy to remember
margin: 1em =All margins are 1em
margin: 1em 2em = top and bottom 1 em, right and left 2em
margin: 1em 16pt 1em 2pt; =(top, right, bottom, left) Clockwise starting at the top
theducks is online now   Reply With Quote
Old 09-28-2013, 04:12 PM   #3
Purple Lady
Wizard
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 1,807
Karma: 2506282
Join Date: Feb 2010
Location: Pennsylvania
Device: Nexus 7 LTE, Nexus 7 3g, Sony PRS-950, K3 3G, Nexus 5, Onyx Boox T68
Quote:
Originally Posted by theducks View Post
margin: 1em 16pt 1em 2pt;

is the short form version
I have never seen Calibre use that in calibre# styles.
I tend to use those to show I have edited a conversion

I also don't believe Calibre ever changed a defined class that DID ise the short form.

The form is easy to remember
margin: 1em =All margins are 1em
margin: 1em 2em = top and bottom 1 em, right and left 2em
margin: 1em 16pt 1em 2pt; =(top, right, bottom, left) Clockwise starting at the top
Maybe this is because of a 1.4 change. From 1.4 change log:
EPUB/AZW3 Output: Use shorthand forms for margin, padding and border CSS properties, where possible
Purple Lady is offline   Reply With Quote
Old 09-28-2013, 05:08 PM   #4
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
Quote:
Originally Posted by Purple Lady View Post
Maybe this is because of a 1.4 change. From 1.4 change log:
EPUB/AZW3 Output: Use shorthand forms for margin, padding and border CSS properties, where possible
Good catch
I have not yet done/fine tuned a 1.4+ conversion

To me they are the same and produce a shorter MULTI-LINE, but still easy-to-read CSS
theducks is online now   Reply With Quote
Old 09-28-2013, 05:24 PM   #5
Purple Lady
Wizard
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 1,807
Karma: 2506282
Join Date: Feb 2010
Location: Pennsylvania
Device: Nexus 7 LTE, Nexus 7 3g, Sony PRS-950, K3 3G, Nexus 5, Onyx Boox T68
Quote:
Originally Posted by theducks View Post
Good catch
I have not yet done/fine tuned a 1.4+ conversion

To me they are the same and produce a shorter MULTI-LINE, but still easy-to-read CSS
I've never liked the short version because I could never remember what was where. But I think I can remember what you said above - (top, right, bottom, left) Clockwise starting at the top
Purple Lady is offline   Reply With Quote
Old 09-28-2013, 09:03 PM   #6
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 201
Karma: 636268
Join Date: Sep 2012
Device: Sony PRS-950, Apple iPad3, Samsung Galaxy Note 2, Kobo Aura HD
There is also a version with 3. So we have:

•margin:10px 5px 15px 20px - top, right, bottom, left
•margin:10px 5px 15px - top, right & left, bottom
•margin:10px 5px - top & bottom, right & left
•margin:10px - all margins

I can NEVER remember these, and have to look it up every time. Is there any way to get Calibre to use separate top-margin, right-margin, etc.?
icallaci is offline   Reply With Quote
Old 09-30-2013, 02:07 AM   #7
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,770
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by icallaci View Post
Is there any way to get Calibre to use separate top-margin, right-margin, etc.?
Not since the update performed in version 1.4.

I agree that it is easier to edit the epub if the margins are separate. Maybe you can ask Kovid to add a tweak to avoid this outcome.
DoctorOhh is offline   Reply With Quote
Old 09-30-2013, 10:37 AM   #8
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 201
Karma: 636268
Join Date: Sep 2012
Device: Sony PRS-950, Apple iPad3, Samsung Galaxy Note 2, Kobo Aura HD
Quote:
Originally Posted by DoctorOhh View Post
I agree that it is easier to edit the epub if the margins are separate. Maybe you can ask Kovid to add a tweak to avoid this outcome.
Thanks, I will ask Kovid and hope it's an easy thing for him to do.
icallaci is offline   Reply With Quote
Old 10-01-2013, 03:04 PM   #9
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 911
Karma: 46025978
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
I also find the new way margins are specified makes it harder to edit a stylesheet. The convention of having a variable number of values is very confusing and I would not have known what they meant if I hadn't seen this post. I cannot remember them easily either.

If possible, a tweak to use the older style would be appreciated.

--Pat
PatNY is offline   Reply With Quote
Old 10-04-2013, 10:45 AM   #10
icallaci
Addict
icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.icallaci ought to be getting tired of karma fortunes by now.
 
Posts: 201
Karma: 636268
Join Date: Sep 2012
Device: Sony PRS-950, Apple iPad3, Samsung Galaxy Note 2, Kobo Aura HD
Just received a notice that the ability to choose separate margin properties will be in this Friday's Calibre release. Thank you, Kovid!
icallaci is offline   Reply With Quote
Old 10-04-2013, 01:47 PM   #11
Purple Lady
Wizard
Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.Purple Lady ought to be getting tired of karma fortunes by now.
 
Purple Lady's Avatar
 
Posts: 1,807
Karma: 2506282
Join Date: Feb 2010
Location: Pennsylvania
Device: Nexus 7 LTE, Nexus 7 3g, Sony PRS-950, K3 3G, Nexus 5, Onyx Boox T68
Quote:
Originally Posted by icallaci View Post
Just received a notice that the ability to choose separate margin properties will be in this Friday's Calibre release. Thank you, Kovid!
Great! Thanks Kovid.
Purple Lady is offline   Reply With Quote
Old 10-04-2013, 04:21 PM   #12
PatNY
Zennist
PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.PatNY ought to be getting tired of karma fortunes by now.
 
PatNY's Avatar
 
Posts: 911
Karma: 46025978
Join Date: Jul 2010
Device: iPod Touch, Sony PRS-350, Nook HD+ & HD
TYVM, Kovid. Hope you had a wonderful vacation.
PatNY is offline   Reply With Quote
Old 10-05-2013, 11:42 PM   #13
gbm
Guru
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 616
Karma: 1243612
Join Date: Jun 2010
Device: Hisence Sero 7 Pro, Nook STR, jetbook lite
Quote:
Originally Posted by icallaci View Post
Just received a notice that the ability to choose separate margin properties will be in this Friday's Calibre release. Thank you, Kovid!
The Nook dose not like the css shorthand form for margins. Will do more tests later this week.
Maybe the long form should be set as the default.
bernie
gbm is offline   Reply With Quote
Old 10-06-2013, 12:12 AM   #14
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 8,770
Karma: 12516053
Join Date: Feb 2009
Location: North Carolina
Device: Nexus 7
Quote:
Originally Posted by gbm View Post
The Nook dose not like the css shorthand form for margins.
Either version of setting margins is perfectly acceptable standard html. I highly doubt that the Nook has problems with standard html code. Exactly why do you think there is a problem?

Quote:
Originally Posted by gbm View Post
Will do more tests later this week.
It would be interesting to hear what your tests reveal.

Quote:
Originally Posted by gbm View Post
Maybe the long form should be set as the default.
Six of one half a dozen of the other. Both versions are absolutely standard html.
DoctorOhh is offline   Reply With Quote
Old 10-06-2013, 10:26 AM   #15
theducks
Grand Sorcerer
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: 14,223
Karma: 5495470
Join Date: Aug 2009
Location: The (original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
@gbm
using the short form has to be done correctly (precisely on many fussy devices ). lack of whitespace, punctuation marks in the wrong place are a few I have messed up (many of the same type mess ups done anywhere in the CSS) Validate your CSS at W3C
theducks is online now   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
margin-top not applying for paragraphs marqpdx Conversion 1 07-26-2012 12:38 AM
margin top, bottom, additive or not ? cybmole Conversion 5 02-16-2011 12:33 PM
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; } cybmole Conversion 15 02-12-2011 11:57 AM
Top Margin in epub penguintri ePub 8 05-08-2010 08:37 PM
calibre ignore margin-top and margin-bottom bender Calibre 2 12-11-2009 06:58 AM


All times are GMT -4. The time now is 05:53 PM.


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