View Single Post
Old 09-06-2011, 03:20 PM   #20
Ron.
Evangelist
Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.Ron. ought to be getting tired of karma fortunes by now.
 
Ron.'s Avatar
 
Posts: 448
Karma: 864744
Join Date: Mar 2011
Device: Kindle 3, LookBook, Nook Simple Touch
Quote:
Originally Posted by DiapDealer View Post
Actually, I have yet to unpack a mobi file (purchased from Amazon, or built by calibre or kindlegen) whose paragraph indents weren't specified in whole increments of em's. Keep in mind that there is no css inside a mobi file. Whatever converter you use has to translate the "text-indent" css style attribute to the html 3.2 "width" attribute of the <p> tag.

Now it's possible that someone might manually add &nbsp; entities to adjust the text indent to their liking, but that's not what I'm referring to.

I just built a mobi with calibre starting with an epub that had 1.5em paragraph indents. I told it to convert to mobi, to remove spacing between lines, and set the indent-size to 1.3em. Unpacking the resulting mobi with mobiunpack.py, the 1.3em request as been changed to a 1em indent.

Code:
<p height="0pt" width="1em" align="left">The helicopter was idling. Two men were carrying the stretcher.</p>
All of which corresponds to what I see when reading books on my Kindle... 1em or 2em indents. One's a hair too small , the other... way too big.
1.3 em = 1em and 1.5 em = 2em, I'm not sure if it's a kindle limitation or a mobipocket one.

I made a test file and this is how it winds up displaying (the html file displays correctly
Attached Thumbnails
Click image for larger version

Name:	Untitled-1.jpg
Views:	124
Size:	33.6 KB
ID:	76189  

Last edited by Ron.; 09-06-2011 at 03:23 PM.
Ron. is offline   Reply With Quote