I love Calibre and it's made great ePub files for me.
However I'm having trouble when converting .ePub or .odt files into Mobi, because I lose all paragraph spacing. I've seen many threads trying to get rid of paragraph spacing; I can't seem to keep it!
I've run debug and I can see that everything is fine in the Processed folder. All my paragraphs have just the right spacing. (My paragraphs have a variety of spacings.)
But somehow, by the time it gets to Kindle or Kindle previewer, all paragraphs have lost their line spacing.
In the Convert options, I have selected the Output Module as Kindle, and I have NOT selected any of the options mentioned throughout these forums for removing paragraph spacing in the conversion process. The Table of Contents and Chapter detection seem to be working fine.

If you haven't checked options to remove spacings then calibre isn't removing the spacing. It may be that mobi or the Kindle do not respect the method used to create the spacing, does this happen with all epubs and odt files? How do you create the space in the odt files?

I just converted a epub, that uses css top and bottom paragraph margins to create the space between paragraphs, to mobi and the paragraph spacing still exists in the mobi book.

Thanks for your replies.
I made the files in Word with styles controlling each paragraph and their spacing. I then opened this in Open Office and saved the file as an .odt. I then used Calibre to convert this into an ePub using the iPad output module. It works brilliantly! All my paragraph styles are faithfully re-presented in the Calibre ebook viewer and in iBooks.
However, if I convert either the ePub or the .odt format into Mobi with the Kindle output profile, then my paragraph styles are preserved (more or less) except all paragraph spacing is removed. I'm surprised at this, since everyone else in these forums seems to have problems with paragraph spacing added!
As I said, if I look at the debug files, in the Processed folder, all the paragraph styles seem to have been faithfully rendered in the xhtml. They just aren't there any longer when I view the mobi file in the Calibre ebook reader, in Kindle Previewer (for Mac), Kindle for Mac, or on my iPhone Kindle app.
Sooo... what to do now?
Thanks again for your help.

Hi all, there's been no responses to this for a week and my timeline is shortening... so I hope you don't mind me raising the flag again. I'd be really grateful for some help!

To summarise:

The Kindle output module in Calibre is not creating space between paragraphs when I start with a .odt or a .ePub file. Every paragraph in my file has a paragraph style, giving a top and/or a bottom margin of varying amounts. These top or bottom margins are not appearing in the Kindle file as I mentioned above.

The Debug Processed folder shows that the css and xhtml files are all correct. So, how can I get the .mobi file to retain these top and bottom margins?

Hmmm, thanks so much for this Kovid. Maybe here is the problem:
I'm using a mac and when I convert your html code above into a mobi format I get the following result:

Mac OS X 2yTATTReOBTcom.apple.TextEncodingutf-8;134217984

That's the only text in the book! Same as if I convert to ePub.

I took your text, put it in a text file, compressed it using Mac's Finder thus to get a .zip file. Then converted it from ZIP to MOBI with default input profile and output Kindle. Using Debug, the html in the input folder looks as expected, but the above text Encoding statement appears in the Processed folder.

This is the same whether or not I choose 'Transliterate unicode characters into Ascii' in the Look and Feel tab of the conversion process.

As far as I know, I do not have any unusual character encoding settings on this mac.

Oooops, sorry for being a newbie to this... I forgot to add the proper <head> tags with character encoding at the top of my doc. When I do the .mobi output is as you mentioned above Kovid.
I'll explore the css further to see what might be happening; I'm posting this now to avoid you having to think through my earlier mistake.
Thanks!

Further, in my setup I started with an .odt file, with paragraph spacing measured in pts. Calibre has converted this spacing into cms. Is there a way to persuade it to make the conversion into Ems so the MOBI format will read it?

I hope this discovery might help others mystified by the vagaries of Kindle and paragraph spacing!

You really can't convert "pt" spacing into "em" units. Pts are an absolute unit of spacing (72pt = 1 inch); em spacing is dependent on the font size. You use pt (or inch or cm) spacing when you want an absolute value, and em units when you want something that scales along with the text.

You'd normally, for example, have margins specified in pts, and indents in ems.

This raises a point about Calibre conversion process into MOBI which would be very helpful to understand.

I am now starting with an .odt document that specifies the font size in points (eg 10 pt) and the spacing before paragraphs in points too (eg 10pt, 15pt).

When Calibre converts this to ePub and I look at the ePub's css, the font size has been converted to ems (eg 0.8889em), and the paragraph spacing into cms (eg 0.527cm). The html files based on this css all display fine.

Yet it seems that the Kindle conversion process won't accept the css margin-top command unless it is in ems. Cms don't do it. There is just no space before the paragraph. If I change the css margin-top to ems then the space appears. I haven't tried other units yet.

So, is there a way to control the units that Calibre converts text and margins to in the ePub's css? So that, in this case, the css margin-top command can be in ems or whatever else works for Kindle?

I'd be grateful to understand this in some detail! Thanks for your assistance.

I made one assumption when writing the above... actually my .odt file paragraph spacing was formatted in cms, not pts. As soon as I set Open Office Writer global measurement to pts, Calibre then formatted the ePub's css in pts.

And it appears that Kindle accepts pts in the margin-top css command. So I now have as much control over the paragraph spacing in Kindle as I can get, and it looks great on Kindle previewer and Kindle for Mac.

Btw - a tip I discovered...

Amazon say it's not possible to get your own documents into Kindle for Mac, I think. However, if you open them in KindlePreviewer, there is an option to 'Open in Kindle for Mac'. As far as I've seen so far, if you do this, your book becomes part of your library and is synched to Amazon and available then as part of your downloads, complete with bookmarks and other data.
Useful, eh!