12-16-2010, 01:47 PM | #1 |
Zealot
Posts: 127
Karma: 12096
Join Date: May 2010
Device: Loads!
|
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> </p> Anyone else seen this? Cheers, Andy |
12-16-2010, 05:47 PM | #2 |
Booklegger
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... |
Advert | |
|
12-16-2010, 07:08 PM | #3 |
Zealot
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. |
12-17-2010, 06:01 AM | #4 | |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
Quote:
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. |
|
12-17-2010, 09:38 AM | #5 |
Booklegger
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.
|
Advert | |
|
12-17-2010, 09:49 AM | #6 |
eBook Enthusiast
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 |
12-17-2010, 06:03 PM | #7 |
Wizard
Posts: 3,388
Karma: 14190103
Join Date: Jun 2009
Location: Berlin
Device: Cybook, iRex, PB, Onyx
|
|
12-17-2010, 06:37 PM | #8 |
Enquiring Mind
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.
|
12-18-2010, 02:04 AM | #9 |
eBook Enthusiast
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
|
12-18-2010, 02:55 AM | #10 |
Wizard
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. |
12-18-2010, 03:13 AM | #11 |
eBook Enthusiast
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. |
12-18-2010, 03:23 AM | #12 |
Wizard
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.
|
12-18-2010, 07:29 AM | #13 | |
Enquiring Mind
Posts: 562
Karma: 42350
Join Date: Aug 2010
Location: London, UK
Device: Kindle 3 (WiFi)
|
Quote:
|
|
12-18-2010, 07:34 AM | #14 |
eBook Enthusiast
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="?
|
12-18-2010, 08:05 AM | #15 |
Enquiring Mind
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> 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> 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. |
|
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 |