MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Where is the stylesheet.css? (https://www.mobileread.com/forums/showthread.php?t=78034)

roger64 03-22-2010 05:53 AM

Where is the stylesheet.css?
 
I follow on my slow trials with Sigil using xhtml files exported from OpenOffice.

I took several steps to try to improve the quality of my html file (xhtml in fact) and I have been rewarded with better and better results with Sigil. I hope to provide you with a test file and some comments soon, including images.;)

One thing surprises me though: when Sigil creates an EPUB, it seems it does not provide a stylesheet.css file. If I hand this epub to calibre, and let him do a conversion from epub to epub, it provides me with a stylesheet.css file.:chinscratch:

Due to my cleaning work, I can see that this file is now quite short and handy to work on.

Question
So where could I find the stylesheet.css in the first epub from Sigil?

Valloric 03-22-2010 01:31 PM

If your original file had a CSS stylesheet, it will have one when you open it in Sigil. If it doesn't, it won't.

Creating a new CSS file is easy. Right-click the "Styles" folder in the Book Browser, and choose "Add new item...". Don't forget to link to that CSS file in the <head> section of the XHTML files, like so:

Code:

<link rel="stylesheet" href="../Styles/Style0001.css" type="text/css" />
Admittedly, that last part is a pain. In a future version, Sigil will ask you from which XHTML files do you want the new stylesheet to be automatically linked.

roger64 03-23-2010 01:26 AM

Quote:

Originally Posted by Valloric (Post 840298)
In a future version, Sigil will ask you from which XHTML files do you want the new stylesheet to be automatically linked.

This will be very handy. Thanks for your explanations. :thanks:

I just completed my low-level report here :bookworm:
https://www.mobileread.com/forums/sho...77&postcount=7

A happy user

paulpeer 03-23-2010 02:54 PM

Quote:

Originally Posted by Valloric (Post 840298)
Code:

<link rel="stylesheet" href="../Styles/Style0001.css" type="test/css" />
.

But instead of test/css you'd better use text/css, Valloric!

For one of my books I copied your link, and spent two hours to find out where the error was. At last, Mikel, the developer of EPUBReader, found it for me! :) :)

Valloric 03-23-2010 03:12 PM

Quote:

Originally Posted by paulpeer (Post 841655)
But instead of test/css you'd better use text/css, Valloric!

It's a typo, I've fixed it now. Sorry :)


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

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.