| 
			
			 | 
		#1 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| 
			
			 | 
		#2 | 
| 
			
			
			
			 creator of calibre 
			
			![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,609 
				Karma: 28549044 
				Join Date: Oct 2006 
				Location: Mumbai, India 
				
				
				Device: Various 
				
				
				 | 
	
	
	
		
		
		
		
		 
			
			As far as I know, calibre doesn't change the contents of <pre> tags.
		 
		
	
		
		
		
		
		
		
		
		
		
		
	
	 | 
| 
		
 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
| Advert | |
| 
         | 
    
| 
			
			 | 
		#3 | 
| 
			
			
			
			 Junior Member 
			
			![]() 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  | 
| 
		 | 
	
	
	
		
		
		
		
			 
		
		
		
		
		
		
		
			
		
		
		
	 | 
![]()  | 
            
        
    
            
  | 
    
			 
			Similar Threads
		 | 
	||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| epub code snippets (html / css) | zelda_pinwheel | ePub | 197 | 05-20-2025 10:57 PM | 
| 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 |