Calibre having trouble converting docx to epub

Bug #1282388 reported by Alexander Forbes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Invalid
Undecided
Unassigned

Bug Description

When I try to convert a document from either .docx or .odt (or .mobi) to .epub, Calibre is not removing breaks between paragraphs. It does it just fine when converting to .mobi --looks beautiful, in fact-- but not to .epub.

I'm trying to convert my own writing from the .doc I work in to ebook files, for my own editing and for my beta-readers (which has worked beautifully in the past): .doc -> .docx -> .epub. Alternately, .doc -> .odt -> .epub.

This used to not be a problem: I have earlier versions of the same works, converted through an earlier version of Calibre (can't remember which), and they render just fine on the Nook.

Trying to run the same document through Sigil (buggy as a flophouse, I know) and uscramble the markup manually doesn't make any difference. That produces its own set of issues, actually. I can get rid of the break between paragraphs, but Sigil buggers up other elements of formatting: font sizes, justification, and it adds in blank "pages".

Details:
Calibre 1.24
Mac 10.7.5
MSWord 14.3.9
OpenOffice 3.4.0
Nook BNRV300 1.2.1
Kindle 4.1.1
Sigil 0.7.2 (can't upgrade to latest: crashes on startup for Mac 10.7.5)

Revision history for this message
Kovid Goyal (kovid) wrote : Re: calibre bug 1282388

If you want to remove paragraph spacing, use the option to do so in the
look & feel section of the conversion dialog. calibre's docx conversion
will preserve whatever paragraph styles are present in the original
docx. For an example of a docx without paragraph spacing, see the demo
here:
http://manual.calibre-ebook.com/conversion.html#convert-microsoft-word-documents

And note that you dont need to use Sigil, calibre has its own ebook
editor: http://manual.calibre-ebook.com/edit.html that is capable of
editing both epub and azw3 files.

 status invalid

Changed in calibre:
status: New → Invalid
Revision history for this message
Alexander Forbes (pitsligo) wrote :

I *did* use the "remove para spacing" option in Calibre. It used to work, in the older version. This time, it failed to do as advertised. That was the problem I was reporting.

And since posting, I found the problem on my own. For anyone who might be interested...:

The newer version of the ebook I had created --that did *not* remove para breaks-- used CSS text like this:

.P-P1 {
  border-bottom: 0;
  border-top: 0;
  display: block;
  font-family: Times, sans-serif;
  font-size: 1em;
  line-height: 1.2;
  text-align: center;
  margin: 0;
  padding: 0;
}

Note the last two lines, relating to margin and padding.

The older version, where Calibre *DID* remove the para breaks, just as it was supposed to, used a CSS like this:

.P-P1 {
  border-bottom: 0;
  border-top: 0;
  display: block;
  font-family: Times, sans-serif;
  font-size: 1em;
  line-height: 1.2;
  margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
  text-align: center;
}

Note the difference: the new version uses a very abbreviated version of the CSS, in defining margin and padding, where the older version is much more specific. I'm sure there's a technical way of describing it, but I'm a fiction writer, not a coder.

Anyway, it seems the Nook prefers the older, more verbose version of the CSS.

Now if I can only get the Nook to recognize Small-caps, I'll be happy.

Revision history for this message
Kovid Goyal (kovid) wrote :

Ah, the Nook, that wonderful compendium of bugs. If you want calibre to
generate expanded CSS, use the "Expand CSS" checkbox in the Look & Feel
section of the conversion dialog.

Revision history for this message
Alexander Forbes (pitsligo) wrote :

LOL! So don't hold back; tell me, what do you *really* think about the Nook?

I rather figured it might be more of a Nook issue than a Calibre issue.

Expanded CSS --is that what that is? Cool. Thank you. Maybe ticking "Expand CSS" will get the frabbashnabber Nook to display small-caps, too.

And to return to your first reply: exploring Calibre's ebook editor, it's worlds better than Sigil. I don't actually know HTML/CSS, I'm figuring it out as I go, so the learning curve is steep, but it's already apparent that Calibre is a better editor --at least for someone like me, who'd rather write books than code.

Thank you for your assistance and advice.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.