Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
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: 2,260
Karma: 3868800
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
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, 156 views)

Last edited by AlexBell; 07-15-2009 at 08:14 PM.
AlexBell is offline   Reply With Quote
Old 07-15-2009, 08:12 PM   #2
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: 2,260
Karma: 3868800
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Sorry, I may owe several apologies.

I just opened Calibre to see if I could find out there how to open tickets, and thought of viewing EBookTemplate 0.3.epub through the inbuilt viewer instead of ADE which I used last night.

Almost everything seems to be as I expected and wanted. Is it possible that the problems noted earlier are the fault of the Adobe Digital Editions desktop viewer?

Is ADE the viewer used on ePub readers? If so, I still have problems. If not, I'd still be most grateful if some one would generate an ebup book from the HTML/CSS I uploaded, read it on their viewer, and let me know.

Regards, Alex
AlexBell is offline   Reply With Quote
 
Enthusiast
Old 07-16-2009, 10:59 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 25,952
Karma: 5036099
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
ADE is the viewer used on most readers. ADE also has a lot of rendering quirks when it comes to rendering HTML+CSS. For a partial list of the more egregious ones see http://calibre.kovidgoyal.net/wiki/ADEQuirks

calibre's EPUB viewer uses the WebKit library (the same engine used by Safari) to render EPUB files, so it will tend to support HTML+CSS much better.

If you can make test cases for each rendering bug in ADE and open tickets, I will try to code workarounds where possible in calibre's EPUB output.
kovidgoyal is online now   Reply With Quote
Old 07-17-2009, 05:10 AM   #4
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: 2,260
Karma: 3868800
Join Date: May 2008
Location: Launceston, Tasmania
Device: Kindle3, Kobo Touch, Sony PRS T3, Nexus 7, iPad mini
Quote:
Originally Posted by kovidgoyal View Post
ADE is the viewer used on most readers. ADE also has a lot of rendering quirks when it comes to rendering HTML+CSS. For a partial list of the more egregious ones see http://calibre.kovidgoyal.net/wiki/ADEQuirks

calibre's EPUB viewer uses the WebKit library (the same engine used by Safari) to render EPUB files, so it will tend to support HTML+CSS much better.

If you can make test cases for each rendering bug in ADE and open tickets, I will try to code workarounds where possible in calibre's EPUB output.
Thanks Kovid, I appreciate your response.

I've just worked out another possible reason - my EbookTemplate is HTML 4.01 Strict, and I found out yesterday that ePub is supposed to be XHTML 1.1 Strict. I understand that there are significant differences between them. Will this affect ADE or Calibre?

Anyway, it will be a while yet before I get an ebook reader which can read ePub, so I'll probably leave ePub for a while until I can get something with which I can test ePub books apart from ADE. And of course I need to find out how strict the requirement for XHTML 1.1 is.

Regards, Alex
AlexBell is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub code snippets (html / css) zelda_pinwheel ePub 179 10-05-2012 06:37 PM
HTML/CSS for (German) s p a c e d o u t emphasis frabjous Workshop 21 05-16-2011 04:52 PM
Small html/css bug twaits Calibre 5 01-12-2010 10:26 AM
HTML and CSS for Dummies weedfreak Sigil 17 01-07-2010 09:34 PM
Help! Newbie having problems converting HTML/CSS files jackie_w Calibre 6 09-14-2009 04:53 PM


All times are GMT -4. The time now is 11:30 PM.


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