Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-08-2010, 10:11 AM   #1
mikegr
Junior Member
mikegr began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2010
Device: Aldiko/Android
ebook-convert HTML to EPUB and problem with <pre><code>

Hello,
I have used the ebook-convert from Calibre to convert a HTML file to a Epub ebook.
The HTML file contains a lot of code formatted with the tags pre and code:

<pre><code>source code
text in new line
text in new line
</code><pre>

Calibre doesn't keep the newlines in the generated html file. So the whole source code is in one line in the reader.

Has someone experienced a similar problem? Is there an option for this or a workaround for this kind of formatting?

Regards, mike
mikegr is offline   Reply With Quote
Old 03-08-2010, 12:56 PM   #2
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: 44,564
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I know, calibre doesn't change the contents of <pre> tags.
kovidgoyal is offline   Reply With Quote
Advert
Old 03-09-2010, 03:27 PM   #3
mikegr
Junior Member
mikegr began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2010
Device: Aldiko/Android
I have found the problem. Sorry, it was my fault. My preprocessing script didn't write the newlines.
Thanks for response, which helped me to find the error.

mike
mikegr is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
epub code snippets (html / css) zelda_pinwheel ePub 196 10-09-2016 05:21 AM
Convert epub to HTML MShroff ePub 6 06-19-2011 06:52 PM
direkter Umlaut oder lieber HTML Code in Epub ? NASCARaddicted Erste Hilfe 14 06-16-2011 06:54 AM
html 2 epub will not convert Amalthia Calibre 2 06-04-2010 01:39 PM
Convert html to epub colly Calibre 9 03-10-2010 11:30 AM


All times are GMT -4. The time now is 03:12 AM.


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