MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Epub mostly black - faulty epub! (https://www.mobileread.com/forums/showthread.php?t=56626)

mrmikel 09-15-2009 05:01 PM

Epub mostly black - faulty epub!
 
I was reading Last Secrets, a John Buchan book, which lead me on to Mount Everest, a reconnaissance, which is available at Google books as an epub.

Knowing the book is going to have several errors, I bring it up in Sigil and all that shows are the early table of contents pages and the rest is all black.

I switch to code view and Google had set the background to BLACK!!!! Black text on a black background is not readable.

Editing background to white while in code view and it is just fine now.

Posting to help others who get a similar epub from Google.

Valloric 09-15-2009 06:21 PM

Quote:

Originally Posted by mrmikel (Post 593394)
I switch to code view and Google had set the background to BLACK!!!! Black text on a black background is not readable.

This is unfortunately not a problem with the book from Google, but a problem with Sigil. As a recent poster encountered as well, CSS styles applied to particular flows of a book (e.g. the black background for covers on many Google epubs) will be applied to the entire flow being edited in Sigil.

While this problem will go away in 0.2.0, I'm thinking of implementing a stop-gap measure for the next (0.1.4) release. That is, to not copy flow-specific CSS into Sigil.

I'd like to hear other people's thoughts on this.

mrmikel 09-16-2009 09:42 AM

In favor of the stopgap
 
It seems there is almost no situation in which a black background is required in using a book. In fact, I think it is just an artifact of the scanning process. That part which is not book cover or paper is black.

So I can't see any reason why, for a black and white Sony Reader at least, that you couldn't just delete background colors altogether or set them to white and set text to black.

I see your problem...it is like merging a whole series of web pages and whatever is at the top is going to govern as far as CSS goes.

Maybe the solution is to comment it out and allow anyone editing to put it back at their leisure.

Valloric 09-16-2009 10:25 AM

Quote:

Originally Posted by mrmikel (Post 594114)
It seems there is almost no situation in which a black background is required in using a book. In fact, I think it is just an artifact of the scanning process. That part which is not book cover or paper is black.

So I can't see any reason why, for a black and white Sony Reader at least, that you couldn't just delete background colors altogether or set them to white and set text to black.

Oh I completely agree with this, but it still stands that the background is black only on the cover, and not on the rest of the book.

mrmikel 09-16-2009 01:37 PM

Didn't see your new comment
 
How about just commenting it out, then they could put it back bit by bit?

Valloric 09-16-2009 02:18 PM

Quote:

Originally Posted by mrmikel (Post 594401)
How about just commenting it out, then they could put it back bit by bit?

Commenting it out would require recognizing the style. That would require writing a CSS parser, and if I do that, I may as well implement a CSS rewriter. And there's no point in doing that now that I've decided to switch Sigil to multi-flow editing.

So I'm probably going to implement the stop-gap. It would stay in place until 0.2.0, and so flow-specific CSS would not be copied.

khalleron 09-16-2009 02:53 PM

Quote:

Originally Posted by Valloric (Post 594473)
Commenting it out would require recognizing the style. That would require writing a CSS parser, and if I do that, I may as well implement a CSS rewriter. And there's no point in doing that now that I've decided to switch Sigil to multi-flow editing.

So I'm probably going to implement the stop-gap. It would stay in place until 0.2.0, and so flow-specific CSS would not be copied.

I'm for that, although HTML newbie me figured out what was wrong and how to fix it, so I doubt it's that big a problem for those (pretty much everyone) more knowledgeable than I.

But one less step, sure.

Would this take care of the every paragraph having it's own unique class identifier problem? Such as this file.

I gave up on that one.

Kate

mrmikel 09-16-2009 03:28 PM

Don't go with the flow!
 
I see what you mean now by your stopgap.

EPUB is not yet at a stage where eliminating the flow formatting is going to make much difference especially when the hardware can't even do justified text or follow backward links.

The stop gap sounds great.

When I knocked out all the flow statements the text became centered so I had to fix the css to text align: left.

I had to center the title after that but that was it.

If I use your software in the first place I will be doing far more than that anyway fixing misspellings, hard spaces and formatting around pictures.

Thank you for work on this great software. Before I was using XML mind which did the job, but took forever and made you jump back and forth to correct the simplest error.

Valloric 09-16-2009 04:48 PM

Quote:

Originally Posted by khalleron (Post 594512)
Would this take care of the every paragraph having it's own unique class identifier problem? Such as this file.

I can't download the book you linked, so I'm not sure what you are getting at.

khalleron 09-19-2009 11:57 PM

OK, I re-downloaded a new copy, and it doesn't have the problem. The copy I had tried to work on had been run through Calibre - not formatted, merely added to the library, but it apparently added a lot of junk to the code.

I'll continue to work on the 'good' copy.

Valloric 09-20-2009 08:22 AM

Quote:

Originally Posted by khalleron (Post 598776)
The copy I had tried to work on had been run through Calibre - not formatted, merely added to the library, but it apparently added a lot of junk to the code.

Wait, so calibre will mess with an epub file even if it's just imported into the library for transfering onto the Reader? I did not know this. Thanks for pointing it out.

HarryT 09-20-2009 01:26 PM

Quote:

Originally Posted by Valloric (Post 598957)
Wait, so calibre will mess with an epub file even if it's just imported into the library for transfering onto the Reader? I did not know this. Thanks for pointing it out.

AFAIK it only does so if you do something to the book, such as edit the metadata. If you simply import it, I don't believe it will touch the file; it just stores it.

Valloric 09-20-2009 01:42 PM

Quote:

Originally Posted by HarryT (Post 599152)
AFAIK it only does so if you do something to the book, such as edit the metadata. If you simply import it, I don't believe it will touch the file; it just stores it.

That's what I thought it did. But for a moment there...


All times are GMT -4. The time now is 06:30 PM.

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