View Single Post
Old 07-15-2009, 07:11 PM   #1
AlexBell
Wizard
AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.AlexBell ought to be getting tired of karma fortunes by now.
 
AlexBell's Avatar
 
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
Problems generating ePub from HTML/CSS

Please pardon the long post, and the attachment.

For some time I have been trying to design an HTML/CSS Ebook Template with the hope that I could prepare ebooks in one basic HTML/CSS document and then generate ebooks in different ebook formats from the same HTML/CSS document.

As I mentioned in a post yesterday I've done some comparisons between the ebooks generated by Mobipocket Creator and Calibre, and prefer Calibre.

Last night I generated an ePub file (the first I'd ever done) from the exact same HTML/CSS combination, and the result was a disaster.

The title page has a jpg where a photo of the author will go. In the Creator/prc ebook and in the Calibre/mobi ebook it is centered. In the Calibre/ePub ebook the jpg is flush with the left margin.

The Table of Contents has a structure which allows a shrink to fit centered TOC when viewed with a Firefox, Safari, and Chrome. It is not centered with either of the Mobipocket versions, and is not centered in the ePub version either though it is valid HTML and CSS.

In chapter 1 one of the tests is of small caps and another is dark background.
The Creator/prc version does not show small caps but does show the dark background. The Calibre/mobi does show small caps but does show the dark background. The Calibre/ePub version does not show small caps but does not show the dark background.

Indented (blockquote) text in chapter 2 works reasonably well in all three versions.

Chapter 3 tests lists. The work reasonably well in the Creator/prc and Calibre/mobi versions, though the second level numbering does not match the CSS. But in the Calibre/ePub version the list format is just awful. There may be bullets half hidden at the left margin, but there are certainly no numbers and no indentation of the second level.

I won't bother with chapter 4 for the moment.

Now, since this is was my first attempt in converting HTML/CSS to ePub I may simply have done something wrong. Could someone please run the attached HTML and CSS through Calibre please to see if it generates a better ePub than I have been able to do? Otherwise I won't know whether it's me or my HTML/CSS or Calibre.

The attached file contains EBookTemplate03.html, ebook.css, pachelbel.jpg and covers for the Calibre/mobi and Calibre/ePub versions

Regards, Alex
Attached Files
File Type: zip EbookTemplate.zip (75.9 KB, 405 views)

Last edited by AlexBell; 07-15-2009 at 08:14 PM.
AlexBell is offline   Reply With Quote