|  04-11-2013, 07:10 AM | #1 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
				
				epub not properly referencing stylesheet?
			 
			
			Hi. I have ran into several epubs that don't reflect the stylesheet.css when converted to azw3 using calibre. I am a total noob at this so I couldn't figure out what is going on. I have, however, noticed that all these epubs have a page-template.xpgt file apart from the stylesheet.css. In the current file I am working on, this is the information at the top of each page. I couldn't figure out what is wrong: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-gb"> <head> <title>The Misleading Mind</title> <link href="../Styles/stylesheet.css" rel="stylesheet" type="xhtml/css" /> <link href="../Misc/page-template.xpgt" rel="stylesheet" type="application/page-template+xml" /> <meta content="urn:uuid:68e57379-d4ba-4560-a6f9-fbca461346a5" name="Adept.expected.resource" /> </head> What should I change? I have tried deleting the page-template.xpgt and all references to it on each page, but the problem persists. When viewed with Kindle Previewer, the resulting AZW3 file has zero formatting. Help please. | 
|   |   | 
|  04-11-2013, 09:38 AM | #2 | 
| creator of calibre            Posts: 45,598 Karma: 28548962 Join Date: Oct 2006 Location: Mumbai, India Device: Various | |
|   |   | 
|  04-11-2013, 06:19 PM | #3 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			Thanks, Kovid. I have reported the problem as a Calibre bug even though I am not sure if it is that.
		 | 
|   |   | 
|  04-12-2013, 04:27 AM | #4 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			You gave me the following advice: That EPUB file is using an incorrect type="xhtml/css" in its <link> tags. It has to either not have the type attribute or set type="text/css" However, after replacing all instances of "xhtml/css" with "text/css", the formatting is still not showing. Is there no hope of fixing this type of epub? | 
|   |   | 
|  04-12-2013, 05:15 AM | #5 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			When I open up the epub using tweak book, I find that only a few of the css codes are listed in the stylesheet. If I copy and paste the stylesheet from sigil, some of the codes get implemented, but the rest stay the same. I really don't get what I need to do.
		 | 
|   |   | 
|  04-12-2013, 05:15 AM | #6 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			Oops sorry. I meant when I open up the resulting AZW3.
		 | 
|   |   | 
|  04-12-2013, 05:17 AM | #7 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			When I explode the original epub, it has an xhtml folder instead of a "text" folder. What do I do with this xhtml folder? Why was this epub formatted in this way? How can it be converted? Is there any way to properly convert it? Sorry for being a pest. Thanks in advance. | 
|   |   | 
|  04-13-2013, 04:46 AM | #8 | 
| Connoisseur  Posts: 58 Karma: 10 Join Date: Oct 2011 Device: K3, PW2 | 
			
			Just FYI, for others who may be having the same problem, the only solution that works that I've found is the one mentioned in this thread: http://https://www.mobileread.com/forums/showthread.php?t=100625 That is: Thanks, I forgot to do that. So, in the end, I deleted the stylesheet, the page-template.pgxt, removed the reference in the opf file, and then converted in calibre with my css override. Annoying, not the cleanest file/workflow, but it worked. Thanks to Slantybard. If anyone could come up with something better and less "messy," please do tell us about it. Thanks. | 
|   |   | 
|  | 
| Thread Tools | Search this Thread | 
| 
 | 
|  Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post | 
| 602 EPUB: referencing central CSS | Hans-Jörg | PocketBook | 2 | 09-20-2012 01:17 PM | 
| EPUB Expert Needed: Cant properly export epub from InDesign | crottmann | ePub | 17 | 08-27-2010 10:23 AM | 
| ePub margins : @page vs stylesheet.css | Agama | Calibre | 1 | 08-16-2010 04:37 PM | 
| EPub conversion stylesheet.css problem | nycaleksey | Calibre | 1 | 03-25-2010 11:42 PM | 
| quick question referencing fixing a typo on an epub | happy_terd | ePub | 2 | 01-30-2010 01:30 PM |