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

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 04-11-2013, 08:10 AM   #1
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
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.
topquark is offline   Reply With Quote
Old 04-11-2013, 10:38 AM   #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: 26,436
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
http://www.mobileread.com/forums/sho...d.php?t=186697
kovidgoyal is offline   Reply With Quote
 
Advertisement
Old 04-11-2013, 07:19 PM   #3
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Thanks, Kovid. I have reported the problem as a Calibre bug even though I am not sure if it is that.
topquark is offline   Reply With Quote
Old 04-12-2013, 05:27 AM   #4
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
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?
topquark is offline   Reply With Quote
Old 04-12-2013, 06:15 AM   #5
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
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.
topquark is offline   Reply With Quote
Old 04-12-2013, 06:15 AM   #6
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
Oops sorry. I meant when I open up the resulting AZW3.
topquark is offline   Reply With Quote
Old 04-12-2013, 06:17 AM   #7
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
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.
topquark is offline   Reply With Quote
Old 04-13-2013, 05:46 AM   #8
topquark
Enthusiast
topquark began at the beginning.
 
Posts: 35
Karma: 10
Join Date: Oct 2011
Device: Kindle 3
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://http://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.
topquark 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
602 EPUB: referencing central CSS Hans-Jörg PocketBook 2 09-20-2012 02:17 PM
EPUB Expert Needed: Cant properly export epub from InDesign crottmann ePub 17 08-27-2010 11:23 AM
ePub margins : @page vs stylesheet.css Agama Calibre 1 08-16-2010 05:37 PM
EPub conversion stylesheet.css problem nycaleksey Calibre 1 03-26-2010 12:42 AM
quick question referencing fixing a typo on an epub happy_terd ePub 2 01-30-2010 02:30 PM


All times are GMT -4. The time now is 07:33 PM.


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