View Single Post
Old 03-10-2011, 12:26 PM   #1
haven
Member
haven began at the beginning.
 
Posts: 10
Karma: 34
Join Date: Nov 2008
Device: Kindle 3, iPad, Iliad Irex
HTML to epub displays munged source code

I'm having trouble getting Calibre to do a basic single-file HTML to epub conversion. I think this may be a CSS-related bug in Calibre 0.7.48 (Win7-64), but since everything I know about HTML and CSS was learned in the last few hours trying to sort this out myself, the problem could well be the nut behind the wheel -- I don't know enough to file an actual bug report :-)

Calibre seems to get confused when combining in-line HTML boldface formatting with the "white-space" CSS construct:
code { white-space: nowrap; }

That is, when style.css includes the above, Calibre's formatting is thrown off by HTML like
<CODE><B>Pragma</B></CODE>

The epub book that Calibre generates will display the code somewhere on the page other than inline. I'm attaching screenshot .png files to show the source HTML displayed in Firefox 3.6.15 and the epub as displayed by Calibre's built-in viewer.

Those screen shots come from a very stripped down HTML file and the actual style.css file for the book I was trying to convert. I'm attaching those files as well (camouflaged as .txt to make the Forum software happy.) Please let me know anything else that would be helpful.
Attached Thumbnails
Click image for larger version

Name:	from-HTML.png
Views:	471
Size:	37.9 KB
ID:	68068   Click image for larger version

Name:	from-Calibre-epub-viewer.png
Views:	435
Size:	97.0 KB
ID:	68069  
Attached Files
File Type: txt testdoc1.html.txt (1.2 KB, 364 views)
File Type: txt style.css.txt (1.9 KB, 298 views)
haven is offline   Reply With Quote