Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Situation is that I am working in Sigil, creating epub's from filtered HTML files generated from MS Word. After the generation, I clean out all the junk I can recognize in the HTML file, and move the simplified style definitions to a stylesheet. Then I link the stylesheet to all the files in the epub (actually I link it to the original large file before splitting it into separate chapter files).

Things display fine in Sigil, but when I go to test the epub in Adobe Digital Editions and on Nook, the entire stylesheet is ignored. It feels like Word embedded some stylesheet that cannot be seen/opened. The only way I have worked out to override this is to copy my preferred stylesheet code (in its entirety) into the header of each file of the epub. Not very efficient, especially if anything changes during final editing.

Does anyone have experience with this and a better solution? I appreciate the help. Thank you!

share|improve this question

1 Answer 1

Make sure that you are correctly linking the css file in your HTML:

<head><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" /><meta http-equiv="Content-Style-Type" content="text/css" /><title>My Title</title><link href="styles.css" type="text/css" rel="stylesheet" /></head>

and that you also include a reference to both your html and the css file in the .opf file like so:

<manifest><item id="untitled.html" href="untitled.html" media-type="application/xhtml+xml" /><item id="styles.css" href="styles.css" media-type="text/css" /></manifest>

Also you might have an easier time converting your word documents to EPUB by using a free tool called Aspose.Words Express. This will convert your word files to EPUB without the use of Microsoft Word and it generates clean HTML compared with the bloated HTML output of Word. You can also split section breaks into separate html files inside the EPUB. Note you will need to create a login before downloading (but that and the program is 100% free).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.