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

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-25-2010, 08:03 PM   #1
AbominableDavid
Enthusiast
AbominableDavid began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: Kobo Aura HD
CSS odd behavior with ADE/Sony Reader

I've used Sigil in the past to modify other ebooks with great success. I decided it was time to create my own ebook and have spent the last few days scanning a book I own and using Sigil to create the ebook.

It looks great in Sigil and it looks great in calibre. In ADE and on my PRS-505, however, the css doesn't seem to be applied to the text.

I've got the link to the css file in the <head></head> section of each chapter
Code:
  <link rel="stylesheet" href="../styles/style0001.css" type="text/css" />
The css file is part of the archive, and I can't figure out why it works in Sigil and Calibre but not in ADE and my reader.

Any suggestions?
AbominableDavid is offline   Reply With Quote
Old 03-25-2010, 08:11 PM   #2
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
If it looks great in both Sigil and Calibre, then it's an ADE issue. That's not very surprising, ADE has its fair share of faults.

If you could provide the epub file, then others could help you find the root cause.
Valloric is offline   Reply With Quote
Advert
Old 03-25-2010, 08:37 PM   #3
AbominableDavid
Enthusiast
AbominableDavid began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: Kobo Aura HD
Quote:
Originally Posted by Valloric View Post
If it looks great in both Sigil and Calibre, then it's an ADE issue. That's not very surprising, ADE has its fair share of faults.

If you could provide the epub file, then others could help you find the root cause.
I don't feel comfortable providing the epub - it's a commercial work that I've digitized for my own use.

I'll see if I can recreate the problem with some public domain work and post that.
AbominableDavid is offline   Reply With Quote
Old 03-25-2010, 09:43 PM   #4
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
ADE is VERY fussy about errors in the CSS. My bet is that there's a spelling mistake or missing ; that you've overlooked. This will cause ADE to throw out the CSS file.
charleski is offline   Reply With Quote
Old 03-26-2010, 02:54 PM   #5
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Quote:
Originally Posted by charleski View Post
ADE is VERY fussy about errors in the CSS.
Yes, the latest problem I had was this: instead of
Code:
font-size: 80%;
I had written
Code:
font-size: 80 %;
And this one little space was enough for ADE to reject the whole CSS!
paulpeer is offline   Reply With Quote
Advert
Old 03-26-2010, 02:55 PM   #6
paulpeer
Zealot
paulpeer is on a distinguished road
 
paulpeer's Avatar
 
Posts: 147
Karma: 56
Join Date: Dec 2009
Location: Antwerpen
Device: iPhone, Sony PRS-505, EPUBreader
Quote:
Originally Posted by AbominableDavid View Post
I don't feel comfortable providing the epub - it's a commercial work that I've digitized for my own use.

I'll see if I can recreate the problem with some public domain work and post that.
Just post the CSS. Very likely the problem is there, and not in the book.
paulpeer is offline   Reply With Quote
Old 03-26-2010, 08:00 PM   #7
AbominableDavid
Enthusiast
AbominableDavid began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: Kobo Aura HD
Quote:
Originally Posted by paulpeer View Post
Just post the CSS. Very likely the problem is there, and not in the book.
Very good idea.

I just used the CSS generated by my OCR program, with a few modifications.

Code:
  
h1 {text-align: center; font-size: 150%; font-weight: bold;}  

  span.sgc-6 {font-style: italic;}
  p.sgc-4 {margin-left: 2%; margin-right: 2%; margin-top: 0; margin-bottom: 0; text-indent: 3%}
  p.opener {margin-left: 2%; margin-right: 2%; margin-top: 0; margin-bottom: 0; text-indent: 0}
  p.sgc-2 {font-weight: bold}
  hr.spacing {margin: 2em 25%;}
Actually, just as an experiment, I pasted my css code above directly into one of the chapter headers, between <style></style> headers, and that chapter appeared the way I expected - so I must have not done something correctly linking the style sheet.

Last edited by AbominableDavid; 03-26-2010 at 08:07 PM. Reason: added information
AbominableDavid is offline   Reply With Quote
Old 03-26-2010, 08:12 PM   #8
AbominableDavid
Enthusiast
AbominableDavid began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: Kobo Aura HD
I think I've got it fixed - I didn't know capitalization was important.

I had this link in each of my chapters:
Code:
  <link rel="stylesheet" href="../styles/style0001.css" type="text/css" />
The Folder/File structure in the zip file, though, was Styles/Styles0001.css.

Once I changed the case of the two S's in my link, everything worked in ADE. I'm assuming it will look right on by 505, too - I'm off to test that now.

Thanks for the help!
AbominableDavid is offline   Reply With Quote
Old 03-26-2010, 08:21 PM   #9
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by AbominableDavid View Post
I think I've got it fixed - I didn't know capitalization was important.

I had this link in each of my chapters:
Code:
  <link rel="stylesheet" href="../styles/style0001.css" type="text/css" />
The Folder/File structure in the zip file, though, was Styles/Styles0001.css.

Once I changed the case of the two S's in my link, everything worked in ADE. I'm assuming it will look right on by 505, too - I'm off to test that now.

Thanks for the help!
That actually sounds like a possible bug in Sigil. It should have updated the link.

Create an issue on the tracker with the file attached. Don't forget to add the "Private" label so only you and I can see it, since you've said your not comfortable with making it publicly available.
Valloric is offline   Reply With Quote
Old 03-26-2010, 08:27 PM   #10
AbominableDavid
Enthusiast
AbominableDavid began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Sep 2009
Location: Tennessee
Device: Kobo Aura HD
I manually added the original link to the stylesheet - I didn't notice if Sigil did it or not. I don't really think it's a bug with Sigil, but I'll still create the issue if you still want me to.
AbominableDavid is offline   Reply With Quote
Old 03-26-2010, 09:16 PM   #11
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by AbominableDavid View Post
I manually added the original link to the stylesheet - I didn't notice if Sigil did it or not. I don't really think it's a bug with Sigil, but I'll still create the issue if you still want me to.
Then there's probably no need, but do it anyway. You never know.
Valloric 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
Styling Elements in CSS - ADE and Sony toskpro Sony Reader 0 07-19-2010 01:55 PM
PRS-900 Odd behavior (battery?) Penforhire Sony Reader 1 06-22-2010 03:03 PM
ADE mit userstyle css mtravellerh PocketBook 0 05-21-2010 03:40 PM
Classic Odd behavior with random speed increases. Not_A_Crook Barnes & Noble NOOK 0 12-25-2009 11:38 PM
epub, ADE and CSS puzzle pdurrant ePub 3 09-03-2009 01:07 PM


All times are GMT -4. The time now is 10:36 PM.


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