MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   CSS Styling not showing up in digital editions (https://www.mobileread.com/forums/showthread.php?t=70598)

sjkramer 01-20-2010 06:07 PM

CSS Styling not showing up in digital editions
 
I have a few files that have been exported to epub using Indesign CS4. I finally got the font embedding working (hurray!). I then opened the file in digital editions and could see the formatting and embedded fonts. However, once I saved the file using Sigil (even if I did no editing on it at all, just opened and saved it), much of the formatting was lost, including the embedded fonts.

However, when I view the file in Firefox using either Bookworm or the Firefox epubreader extension, I can see my imported formatting and fonts. Has this happened to anyone else?

Valloric 01-20-2010 07:07 PM

Quote:

Originally Posted by sjkramer (Post 749562)
I have a few files that have been exported to epub using Indesign CS4. I finally got the font embedding working (hurray!). I then opened the file in digital editions and could see the formatting and embedded fonts. However, once I saved the file using Sigil (even if I did no editing on it at all, just opened and saved it), much of the formatting was lost, including the embedded fonts.

If the XHTML flows in the epub have any flow-specific CSS (that is, included in a <style> element at the top), then those rules are currently discarded. Just move the CSS into a separate file.

This will be fixed in 0.2.0., and is one of the major reasons for the redesign.

Quote:

Originally Posted by sjkramer (Post 749562)
However, when I view the file in Firefox using either Bookworm or the Firefox epubreader extension, I can see my imported formatting and fonts. Has this happened to anyone else?

The original file or the one saved from Sigil?

sjkramer 01-20-2010 07:56 PM

Quote:

Originally Posted by Valloric (Post 749584)
If the XHTML flows in the epub have any flow-specific CSS (that is, included in a <style> element at the top), then those rules are currently discarded. Just move the CSS into a separate file.

Sorry to sound like a dolt, I've looked around, and I can't figure out exactly how to do this.



Quote:

Originally Posted by Valloric (Post 749584)
The original file or the one saved from Sigil?

The ones saved from Sigil work swimmingly in these other readers.

Valloric 01-20-2010 08:11 PM

Quote:

Originally Posted by sjkramer (Post 749661)
Sorry to sound like a dolt, I've looked around, and I can't figure out exactly how to do this.

Never mind that now, if the book works in the other Reading Systems it's not the flow-specific CSS issue since that would affect everything.

Quote:

Originally Posted by sjkramer (Post 749661)
The ones saved from Sigil work swimmingly in these other readers.

Create an issue on the tracker and attach both the original epub and the one Sigil created after saving.

sjkramer 01-21-2010 06:11 PM

I've submitted the issue. Though now I think the problem is primarily embedded-font related. And since then I've read up on some of the issues having to do with embedded fonts. This may simply be part of that larger problem.

Otherwise, this issue made me realize just how persnickety ADE is about CSS errors. A single extra bracket seems to be able to cause ADE to ignore all CSS in a document, which is what I was experiencing. And since I'm doing a fair amount of CSS style-writing by hand, it seems likely that it wasn't perfectly clean to begin with.

KevinH 01-22-2010 11:22 AM

ADE css parsing aborts at first hint of trouble
 
Quote:

Originally Posted by sjkramer (Post 751173)
Otherwise, this issue made me realize just how persnickety ADE is about CSS errors. A single extra bracket seems to be able to cause ADE to ignore all CSS in a document, which is what I was experiencing. And since I'm doing a fair amount of CSS style-writing by hand, it seems likely that it wasn't perfectly clean to begin with.

Hi,

I just wanted to confirm what you are said above. I have tested my Sony PRS-600 (ADE) and found that the ADE software is in no way robust to even the smallest error in css.

As you said, even an extra { or typo will cause the whole thing to abort and it basically then ignores the css.

Does anyone know of a standalone css validator that can detect errors / typos in a css file?

Thanks,

KevinH

Valloric 01-22-2010 12:21 PM

Quote:

Originally Posted by KevinH (Post 752033)
Does anyone know of a standalone css validator that can detect errors / typos in a css file?

How about this?

KevinH 01-22-2010 01:30 PM

css validator
 
Hi Valloric,


Thanks! That is the ticket. I nosed around that site and found a standalone jar archive (css-validator.jar) so that I can do these things locally (when I do not have access to the web).

Wonderful. Thank you.

KevinH

brewt 01-27-2010 02:04 AM

Unfortunately(?), ADE is as close to a "standard" target as can be hoped for. Most of the viewers have issues, so one-size-fits-all output doesn't quite universally work yet.

Personally, I've pretty much abandoned Indesign for building epubs. The one thing (ok, maybe 2) that it can do "easily-er" than other workflows are a) embed fonts via a check box, and b) allow one to work in Word first.

But: you'd still have to have all your styles declared in Word first. And, you'd have to re-impose word quickstyles on a per-file basis (which, when you change your mind about something, is so close to starting over that you just might as well). Indesign typography tricks don't transfer, and opening the epub in other softwares tends to break the epub (because of the font encryption), and re-hacking the output file afterwards almost always breaks something in ways that I don't enjoy.

I'm finding a more satisfactory workflow to be like:
Word->Dreamweaver->Calibre->Epub/Mobi/Lit/Whatever.

I know, I know, it looks like more steps (as opposed to Word->Indesign->epub? yes, it is). And for sure, it doesn't give you the one-stop-shop approach of Indesign. If you're having to re-hack the file after indesign, you're already working harder than you need to.

css tidy, is useful for fixing up css, if you need it. But even that won't help you change post-indesign css very well.

-bjc

sjkramer 01-30-2010 11:46 AM

thanks brewt. I guess it's just personal preference, I'm most comfortable using InDesign. And, as you point out, I'd have to spend a lot of time using styles in Word, where the Style features aren't as robust (or familiar to me). I'm really finding InDesign quite handy for setting up epubs. I like that I don't have to mess around with manifests, etc.


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

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