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 12-16-2010, 01:47 PM   #1
Oxford-eBooks
Zealot
Oxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of light
 
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
Unhappy Blank lines vanishing in Kindle Previewer - iPhone mode

I've come across an odd problem with the Kindle previewer when switched to Kindle for iPhone.

Blank lines are vanishing, which messes up my lovely formatting.
(Please leave discussions about personal preferences for blank lines between sections to another thread)

I've always been using:
Code:
<p>&nbsp;</p>
for my blank lines successfully across pretty much every device under the sun - so I'm not sure why it's going wrong here.

Anyone else seen this?

Cheers,

Andy
Oxford-eBooks is offline   Reply With Quote
Old 12-16-2010, 05:47 PM   #2
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Don't know... it looks like a weird optimization applied for a small screen: Eliminate all lines with no printable characters....

On the other hand, as mentioned elsewhere, you can get the same effect with CSS by defining a first-paragraph-in-section which has a top margin of appropriate size, or a last-paragraph-in-section with a bottom margin. I haven't tried either, so I don't know if will do exactly what you want, but generally layout should be done with css rather than relying on specific things in the text itself.

Oops! This is the mobi forum! That only works if Kindlegen lets it work and you happen to be starting with epub.

Last edited by pholy; 12-16-2010 at 05:50 PM. Reason: Forgot I was in the mobi forum...
pholy is offline   Reply With Quote
Advert
Old 12-16-2010, 07:08 PM   #3
Oxford-eBooks
Zealot
Oxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of lightOxford-eBooks is a glorious beacon of light
 
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
Yep, this is mobi for Kindle, so can't rely on CSS working.

Still, gonna need to include blank lines here and there anyhow.

The new Kindle 3 is brilliant.... but it's CSS STILL SUCKS!!!!! Aiee.
Oxford-eBooks is offline   Reply With Quote
Old 12-17-2010, 06:01 AM   #4
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 Oxford-eBooks View Post
Yep, this is mobi for Kindle, so can't rely on CSS working.

Still, gonna need to include blank lines here and there anyhow.

The new Kindle 3 is brilliant.... but it's CSS STILL SUCKS!!!!! Aiee.
Mobi does not support CSS at all.

You should use the documented method of increasing the space between paragraphs - using the "height" attribute of the <p> tag.

Eg:

<p height="2em">

will leave a 2em gap before the start of the paragraph.
HarryT is offline   Reply With Quote
Old 12-17-2010, 09:38 AM   #5
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
Thank you, Harry! It's good that somebody reads the available mobi documentation.
pholy is offline   Reply With Quote
Advert
Old 12-17-2010, 09:49 AM   #6
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
Indeed . In case anyone isn't aware of it, the Mobi developer documentation is at:

http://www.mobipocket.com/dev/articl...eFolder=prcgen
HarryT is offline   Reply With Quote
Old 12-17-2010, 06:03 PM   #7
Billi
Wizard
Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.
 
Billi's Avatar
 
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
Quote:
Originally Posted by HarryT View Post
Mobi does not support CSS at all.
Is this really true? Do you refer to mobi for Kindle Previewer/iPhone mode - as Oxford-eBooks - or to mobi in general?
Billi is offline   Reply With Quote
Old 12-17-2010, 06:37 PM   #8
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
MOBI in general I'm afraid. All of the applications which convert HTML to MOBI simply have to translate HTML+CSS into ancient HTML plus a few proprietary HTML tags - no CSS at all inside a MOBI file. That's one of the reasons some CSS seems to work and some doesn't - if it can't be translated into fairly simple HTML (think 3.2, and not even all of that) then it most likely won't be retained when the file is converted into MOBI format.
DMSmillie is offline   Reply With Quote
Old 12-18-2010, 02:04 AM   #9
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 Billi View Post
Is this really true? Do you refer to mobi for Kindle Previewer/iPhone mode - as Oxford-eBooks - or to mobi in general?
Billi - I posted a link to the Mobi developer documentation. You can read it for yourself!
HarryT is offline   Reply With Quote
Old 12-18-2010, 02:55 AM   #10
Billi
Wizard
Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.
 
Billi's Avatar
 
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
Yes, I can read (and I knew this site before, but thank you for providing the link anyway), but I can do, too. And I've made the experience that using a css-file works fine with most of the purposes of creating a mobi-book.
And I thought that creating and integrating a css-file as short as
p { margin-top: 2em; }
could have helped Oxford-eBooks solving his problem.
Billi is offline   Reply With Quote
Old 12-18-2010, 03:13 AM   #11
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
We have to make a clear distinction between HTML features that are supported by Mobipocket creation tools, and HTML features that are supported in Mobipocket books themselves.

As has been said, Mobipocket books themselves support absolutely no form of CSS whatsoever. Mobipocket conversion tools (such as Mobipocket Creator or Calibre) have the ability to convert some types of CSS into the HTML tags that Mobipocket itself requires, but that's very much a feature of the tool, not of the Mobi file format. You are absolutely right in saying that a conversion tool certainly could convert CSS of the form that you give an example of into the Mobi-specific "height=" attribute of the <p> tag, but I'm not aware of any which currently do so.
HarryT is offline   Reply With Quote
Old 12-18-2010, 03:23 AM   #12
Billi
Wizard
Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.Billi ought to be getting tired of karma fortunes by now.
 
Billi's Avatar
 
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
Thank you, DMSmillie and Harry, for your clarifying this. Now I understand, how Harry's remark war meant.
Billi is offline   Reply With Quote
Old 12-18-2010, 07:29 AM   #13
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Quote:
Originally Posted by HarryT View Post
You are absolutely right in saying that a conversion tool certainly could convert CSS of the form that you give an example of into the Mobi-specific "height=" attribute of the <p> tag, but I'm not aware of any which currently do so.
Just for info, Kindlegen certainly does, and I'm fairly sure Mobipocket Creator and Calibre do too. I use CSS for most of the styling in the ebooks I format (less work involved when formatting for both MOBI and EPUB), and as long as you understand what works and what doesn't, these tools handle CSS OK.
DMSmillie is offline   Reply With Quote
Old 12-18-2010, 07:34 AM   #14
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
Donna - these tools certainly convert "left margin" CSS into Mobi's "width=" attribute, but do they really convert vertical spacing into "height="?
HarryT is offline   Reply With Quote
Old 12-18-2010, 08:05 AM   #15
DMSmillie
Enquiring Mind
DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'DMSmillie understands when you whisper 'The dog barks at midnight.'
 
DMSmillie's Avatar
 
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
Kindlegen definitely does, Harry.

Kindlegen takes:

Code:
p.author {
margin-top:0in;
margin-bottom:12pt;
text-indent:0in;
text-align:center;
font-style:italic;
font-weight:bold;
}
h1 {
margin-top:24pt;
margin-bottom:24pt;
text-indent:0in;
text-align:center;
font-size:16pt;
font-weight:bold;
}

...

<p class="author">Donna Smillie</p>

...

<h1 id="toc">Table of Contents</h1>
and turns it into:

Code:
<p height="0" width="0" align="center"><b><i>Donna Smillie</i></b></p>
<div height="16"></div>

...

<h1 height="32" width="0" align="center"><font size="5"><b>Table of Contents</b></font></h1>
<div height="32"></div>
(I used Kindlegen to create a MOBI file from an HTML file, then used mobiunpack.py to extract the HTML from the resulting MOBI file.)

Edit to add: I'm less sure now of the other two tools I mentioned (I haven't checked their output in the same way) - will have to do a similar exercise with them to see what they produce. (And I really must stop having "afterthoughts" like this when posting! Heh!) End of edit.

Last edited by DMSmillie; 12-18-2010 at 08:09 AM.
DMSmillie is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Blank lines between paragraphs? ascherjim OpenInkpot 30 12-03-2009 12:19 AM
Removing blank lines between paragraphs? corroonb Workshop 3 08-13-2009 04:23 PM
Insert Blank Lines Between Paragraphs Timoleon Calibre 14 03-22-2009 02:43 PM
Blank Lines vivaldirules Upload Help 55 03-02-2009 03:17 PM
Blank Lines in rtf files - Libprs500 Crimmers Calibre 0 01-30-2008 09:07 PM


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


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