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 08-05-2018, 12:29 PM   #1
ChrisI
Enthusiast
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 39
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O
Preview/Book View and Stylesheet Errors

I was editing my book in Sigil, and everything looked good in the preview. When I put the book on my Kobo, chapter titles were missing.

It finally dawned on me that I might have a bad stylesheet, so I ran the stylesheet checker. Sure enough, I set a font height to 1.5, instead of 1.5em.

I understand that different e-pub readers do different things to work with poorly formatted books. But when I am in Sigil, it would be nice if the preview was more strict, not forgiving.

My bad for not running a stylesheet check every time, like I run an e-pub check. But if the preview looked like my Kobo, I would have caught this sooner.
ChrisI is offline   Reply With Quote
Old 08-05-2018, 12:48 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 1,681
Karma: 11766398
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 6/5/iPad 1,2 & Air/Surface Pro/Kindle PW
As I understand it the standards say that if a CSS style is incorrect or otherwise undecipherable the app/device is supposed to degrade gracefully eg. it should ignore just that particular styling. Unfortunately not all devices/apps are compliant with the standards.

The question that comes to mind is: Was the preview pane compliant by ignoring the incorrect css, or was kobo compliant by not displaying the header at all??
Turtle91 is offline   Reply With Quote
Old 08-05-2018, 01:07 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,223
Karma: 99356142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
There is no switch we can throw to tell WebKit to be "less forgiving" about css syntax errors.
DiapDealer is online now   Reply With Quote
Old 08-06-2018, 01:11 AM   #4
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 1,909
Karma: 18435619
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
I recommend using ADE for PC as the "Canary in the Coal Mine".
I use old version 2 for just this reason -- if there is even one stylesheet error, the formatting ALL displays as default. (I am not sure if newer versions 3 and 4 still behave this way.)

I load my epub in ADE, and if there is any formatting failure, I pop back to Sigil, hunt for and fix error, save changes--- then go back to ADE, return to Library, and hit the Read button again to refresh the load. Rinse, lather, repeat until all errors are repaired.

Some of the most frustrating to find were a missing semi-colon, an extra hyphen, mis-matched capitalization. Missing or extra curly braces can do a number on you.
GrannyGrump is offline   Reply With Quote
Old 08-06-2018, 01:55 AM   #5
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 5,142
Karma: 21886264
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Aura One, Aura H2O, Aura HD, Nexus 7 HD, iPad Air, Tolino epos
Quote:
Originally Posted by GrannyGrump View Post
I recommend using ADE for PC as the "Canary in the Coal Mine".
I use old version 2 for just this reason -- if there is even one stylesheet error, the formatting ALL displays as default. (I am not sure if newer versions 3 and 4 still behave this way.)
I'm reverted to using ADE 2 after a failed attempt to use ADE 3 -- it deregistered every second time I used it and never got to trying 4.5. However, ADE 3 did the same error in stylesheet is no stylesheet as ADE 2.

This is the main reason that using the W3C check became part of my standard workflow.

Quote:
Originally Posted by GrannyGrump View Post
Some of the most frustrating to find were a missing semi-colon, an extra hyphen, mis-matched capitalization. Missing or extra curly braces can do a number on you.
I ran into a couple of lovely ebooks where they had Amazon KF7/KF8 conditional code without the extra closing curly braces. And another couple where the stylesheet had no semi-colon on the last line of a style before the curly brace (which was fine) but then someone added a padding line to every paragraph related style so you now had two lines with no semi-colon in those styles. epubcheck and W3C both whinged about those errors.
DNSB is offline   Reply With Quote
Old 08-06-2018, 02:34 AM   #6
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 1,909
Karma: 18435619
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
Quote:
Originally Posted by DNSB View Post
... And another couple where the stylesheet had no semi-colon on the last line of a style before the curly brace (which was fine) but then ...
That there is exactly why I developed the habit of ALWAYS placing a semi-colon at the end of EVERY line -- then I don't have to worry about being absent-minded and forgetting to do that if I add more lines...


I remember an old thread about "saving space" and someone who was totally hooked on "clean coding" recommended removing un-needed semi-colons --- I guess so you could reduce file size by 10 bytes or something. I just rolled my eyes and moved on.

Last edited by GrannyGrump; 08-06-2018 at 02:39 AM.
GrannyGrump is offline   Reply With Quote
Old 08-06-2018, 01:43 PM   #7
ChrisI
Enthusiast
ChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-booksChrisI has learned how to read e-books
 
Posts: 39
Karma: 847
Join Date: Sep 2007
Device: Kobo H2O
Quote:
Originally Posted by DiapDealer View Post
There is no switch we can throw to tell WebKit to be "less forgiving" about css syntax errors.
And this is the fundamental problem. The "viewer" software used by the consumer that purchases the book needs to be able to deal the best it can with whatever gets thrown at it.

But as a content creator, you want every potential problem revealed. There is really a need for two different types of e-pub renderers.

Are there other alternatives to WebKit? Or are they all targeted at the consumer?
ChrisI is offline   Reply With Quote
Old 08-06-2018, 02:38 PM   #8
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,223
Karma: 99356142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Webkit is merely what Sigil uses to render its content. There are many, many different rendering engines for various different epub reading devices and apps.

As a content provider/creator, Sigil has always stressed that you not trust Preview/Book View as the ultimate resource on how your book should look on target devices. You should look at them on as many target devices and apps as you can reasonably afford to do.

As others have mentioned, ADE 2.0 is a fairly good test. Unfortunately, we can't use their RMSDK engine in our opensource Sigil project. Not even if we wanted to (and could afford to license it).

The short answer is that Sigil can't give you what you want in this regard. We use what we have available to us.
DiapDealer is online now   Reply With Quote
Old 08-07-2018, 09:32 PM   #9
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 435
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by GrannyGrump View Post
That there is exactly why I developed the habit of ALWAYS placing a semi-colon at the end of EVERY line -- then I don't have to worry about being absent-minded and forgetting to do that if I add more lines...
The "Reformat CSS" on the r-click menu will do that for you on any style definitions without a final ;, one reason I run it fairly often.

As for debugging CSS, I installed "CSS lint" plugin, but it has never told me anything useful.

I would like a way to find any undefined styles. That can happen from a simple typo. And sometimes I take text from one book to transplant to another, very tedious to be sure all the styles have been translated.

Last edited by DiapDealer; 08-07-2018 at 10:24 PM. Reason: I edited this instead of quoting. Whoops! Fixed it.
AlanHK is offline   Reply With Quote
Old 08-07-2018, 10:25 PM   #10
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 19,223
Karma: 99356142
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by AlanHK View Post
I would like a way to find any undefined styles. That can happen from a simple typo. And sometimes I take text from one book to transplant to another, very tedious to be sure all the styles have been translated.
The Reports Tool doesn't suffice for this? "Style Classes in HTML Files" should show you style classes in HTML files that have no matching selector in the linked style sheet(s). And "Style Classes in CSS Files" should show you whether or not class-based selectors in CSS files are used in HTML files or not.
DiapDealer is online now   Reply With Quote
Old 08-08-2018, 01:39 AM   #11
AlanHK
Evangelist
AlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheeseAlanHK can extract oil from cheese
 
AlanHK's Avatar
 
Posts: 435
Karma: 1002
Join Date: Apr 2014
Device: PW-3, Android phone
Quote:
Originally Posted by DiapDealer View Post
The Reports Tool doesn't suffice for this?
You're right of course--thanks for pointing that out.
AlanHK 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
View preview pane in Explorer with Calibre Mamaijee Library Management 3 10-22-2017 12:21 AM
Differences in Code view and File preview chaot Editor 3 05-18-2016 03:49 PM
Font size in Book View / Preview Pane Notjohn Sigil 4 10-12-2015 11:17 AM
replace in book view changes view to code view cybmole Sigil 4 10-28-2012 02:20 PM
Sigil highlight Book View No Longer Shows in Code View Themus Sigil 4 10-04-2012 08:54 PM


All times are GMT -4. The time now is 01:41 PM.


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