Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Kindle Formats

Notices

Reply
 
Thread Tools Search this Thread
Old 07-25-2013, 04:27 PM   #1
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Line-height in Kindle books

I need some paragraphs of a book having a line-height of 1em; regrettably, the .kf8 format only supports a line-height of 1.2em or greater. However, I have seen that mobi7 books HAVE a line-height of 1em; after unpacking one of those mobi7 books, I could see they use the attribute "height" (applied "in-line" as any other property in mobi7), that is:

Code:
<p height="1em">...some text...</p>
Since I can't style a paragraph with css using "line-height: 1.2em", I wanted to use the mobi7 way; it didn't work How can I do to have paragraph with a line-height of 1em? It must have a way; since in mobi7 books we can have it, should be a way to have it as well in kf8 books.

Last edited by RbnJrg; 07-25-2013 at 05:07 PM.
RbnJrg is offline   Reply With Quote
Old 07-25-2013, 04:58 PM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
I suspect the answer is "you can't".
HarryT is offline   Reply With Quote
Old 07-25-2013, 07:17 PM   #3
susan_cassidy
Wizard
susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.susan_cassidy ought to be getting tired of karma fortunes by now.
 
Posts: 2,251
Karma: 3720310
Join Date: Jan 2009
Location: USA
Device: Kindle, iPad (not used much for reading)
You probably shouldn't be specifying a line-height anyway. What if the user wants a greater line-height? They should be able to adjust it, via the ereader's settings. Personally, I prefer a slightly greater line-height than average.
susan_cassidy is offline   Reply With Quote
Old 07-25-2013, 07:22 PM   #4
Hitch
Bookmaker & Cat Slave
Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.Hitch ought to be getting tired of karma fortunes by now.
 
Hitch's Avatar
 
Posts: 11,460
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
Quote:
Originally Posted by HarryT View Post
I suspect the answer is "you can't".
Easier question: what's the need? If it's simply aesthetic, tell the client that the formatting requirements/restrictions have changed since 2009 or whenever, which they have, and 1.2 is the minimum now. You can try to set a line-height of, say, 98%, but in the long run, you'll regret it (wait until you see the hybrid-kluged K4iOS you'll get from that). A better alternative, if it's something like an epigraph, etc., is to use a size-smaller font. It's imperfect, but it imparts a similar feel.

From Amazon's Formatting Guidelines, 2103-3, 3.1.1, second bullet, page 11:

Quote:
• Body text must use the default font size and line height. Body text should not use the <font size=”…”> tag or the font-size and line-height attributes in CSS.
and 3.1.7, page 13:

Quote:
To ensure pagination, the Kindle Reader does not honor line-height value less than 1.2 em or 120%.
Thus, you are, as they say, stucketh. ;-)

Hitch
Hitch is offline   Reply With Quote
Old 07-26-2013, 03:15 AM   #5
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by RbnJrg View Post
However, I have seen that mobi7 books HAVE a line-height of 1em; after unpacking one of those mobi7 books, I could see they use the attribute "height" (applied "in-line" as any other property in mobi7), that is:

Code:
<p height="1em">...some text...</p>
That's not line height, that's top margin (in mobi's language).
Jellby is offline   Reply With Quote
Old 07-26-2013, 11:19 AM   #6
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Hitch View Post

...

Thus, you are, as they say, stucketh. ;-)
Yes, it seems that I am But what I can't understand is why mobi7 (mobi7 from right now) supports a line-height of 1em and mobi8 doesn't. I will have to use, as you say, a font-size smaller.

Many thanks for your answer.
Rubén
RbnJrg is offline   Reply With Quote
Old 07-26-2013, 11:44 AM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Jellby View Post
That's not line height, that's top margin (in mobi's language).
Yes, you are right; in mobi's language "height" means margin-top and "width" means margin-left. My mistake
RbnJrg is offline   Reply With Quote
Old 07-26-2013, 12:40 PM   #8
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by RbnJrg View Post
Yes, you are right; in mobi's language "height" means margin-top and "width" means margin-left. My mistake
No, "width" is first-line indent, not margin.
HarryT is offline   Reply With Quote
Old 07-26-2013, 03:56 PM   #9
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,539
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by HarryT View Post
No, "width" is first-line indent, not margin.
Yes, it is I knew that but wanted to see if anyone was careful here to discover my new mistake Thank God Kindle now supports css as it should be (but is not perfect, still can improve).
RbnJrg is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindlegen 2.8, plain Kindle & line-height davidnwelton Kindle Formats 4 03-25-2013 01:05 AM
Line height insanity! Kamikuza Conversion 6 10-24-2012 11:56 PM
Minimum Line Height being ignored for MOBI yanathin Conversion 2 10-05-2012 03:24 PM
Advice about line-height Julien Pham Sigil 2 12-22-2011 09:05 AM
Epub line height problem dorotie Calibre 5 08-24-2010 03:23 PM


All times are GMT -4. The time now is 06:48 AM.


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