View Full Version : Display of ePub in different software


medwatt
05-02-2013, 02:58 PM
Hello,
I have taught myself html and css so as to know how to have my ePubs display the way I like them. I have made the formatting as simple as possible. All paragraphs are in simple <p> tags (see attached images). The ePub looks well in sigil just the way I like it however they styles are not displayed properly or not at all. I have two ePub viewers coolreader and adobe digital editions. I really don't know what I'm doing wrong. Look at the images attached and see all what I have done.
Thanks.

Agama
05-02-2013, 05:53 PM
It looks as though the ePub viewers mentioned do not support the pseudo-class that you are using, (:first-letter). I don't know how much support there is generally in ePub readers for these types of pseudo-classes.

You could avoid this by using normal classes and some <span> tags although it will require more work for you to achieve the formatting that you want.

Toxaris
05-03-2013, 01:38 AM
Those pseudo classes are indeed not supported. You need to do those caps the hard way with some spans. There are examples floating around here, but this one is actually not that difficult. Dropcaps however...

medwatt
05-03-2013, 02:44 AM
Those pseudo classes are indeed not supported. You need to do those caps the hard way with some spans. There are examples floating around here, but this one is actually not that difficult. Dropcaps however...

Yeah, but what about the indented paragraphs, first paragraph not indented ?? And how should I know what's not supported ?

Agama
05-03-2013, 02:56 AM
The paragraph indents should work - can you post a small ePub which shows this problem and I'll test it with my PRS-300, (ADE based)? I have never had problems with margins/indents with ADE. It's only the pseduo-classes, ( those starting with a colon), that are not well supported.

elibrarian
05-03-2013, 03:07 AM
Shouldn't - times new roman - in the body style be quoted? This error is not found by the W3C css checker, but will probably break ADE.

Se note at http://www.w3schools.com/cssref/pr_font_font-family.asp

Regards,

Kim

Toxaris
05-03-2013, 04:21 AM
Ensure that the stylesheet is validated. A missing semi-colon in your stylesheet will cause ADE to completely ignore it.

medwatt
05-03-2013, 12:17 PM
Here is it. Please verify it for me. I'm not using anything fancy apart from the psedu-classes.
Is it possible that the coolreader does not support css completely ?

Arios
05-03-2013, 01:46 PM
Did you try to validate it with Flight Crew?
Normally, what do you do to center a paragraph or title?
I mean, what class of paragraph are you using to do that?

With these questions in mind, I'm sure you'll find the problem ;).

Turtle91
05-03-2013, 01:49 PM
Here is it. Please verify it for me. I'm not using anything fancy apart from the psedu-classes.
Is it possible that the coolreader does not support css completely ?

It is very possible, a lot of readers don't support everything that is required in the spec. Pseudo elements (at least the :first-letter and :first-line) are required and SHOULD be supported. The newer readers/apps are doing much better.

Are you making this for the public (commercial) or for your own private use??
If its for private use, then I would keep using the pseudo elements and just use a reader that supports it. If you are using an iPad I would recommend the Marvin app.
If it's for public use then you will definitely want to use the span technique mentioned above.

Cheers,

elibrarian
05-03-2013, 03:16 PM
It is very possible, a lot of readers don't support everything that is required in the spec. Pseudo elements (at least the :first-letter and :first-line) are required and SHOULD be supported. The newer readers/apps are doing much better.

ADE doesn't support pseudo elements, and in version 1.0 it didn't support "justify" either. Coolreader only supports a subset of the CSS spec. and AFAIK pseudo elements is not among the supported tags. So there is no way you'll get away with making first-letter formatting this way - you'll have to use span's, as others have pointed out.

There are a couple of obvious errors in the CSS, namely the missing quotes around "Times New Roman" and line 13 ends in a : instead of a ; - which wil make ADE skip the whole section.

When these are corrected, the rest should work, at least in ADE.

Besides that, Sigil's rendering is not a true picture of how the book will look, as it is based on a 3rdpart rendering module - you'll ALWAYS have to try the epub in various readers - ADE first and foremost, as this is the engine used in most readers.

Regards,

Kim

Turtle91
05-03-2013, 03:30 PM
ADE doesn't support pseudo elements, and in version 1.0 it didn't support "justify" either. Coolreader only supports a subset of the CSS spec. and AFAIK pseudo elements is not among the supported tags.

Just to clarify:
The ePub spec requires support of a subset of CSS. Among those elements that are required are the pseudo elements: :first-letter and :first-line
ADE does not fully support the ePub spec because it does not support those pseudo elements - and any reader/app based on ADE does not support them.

Other, newer, readers/apps - which are not based on ADE - will probably support them. Also, any reader/app that supports ePub3 will probably definitely maybe support them!


So there is no way you'll get away with making first-letter formatting this way - you'll have to use span's, as others have pointed out.


Again, ask yourself if this is for commercial or private use.
- If private, then you can definitely use the pseudo elements - just use a reader/app that supports them. I do it all the time and it works fine, but I read using the Marvin app on iPad and ePubReader Firefox plugin for PC.
- If it's for commercial use then +1 to using the spans.

medwatt
05-03-2013, 06:17 PM
No they are for private purposes or sharing among friends !! Seems that microsoft word is after all not that dirty !!

Turtle91
05-03-2013, 06:35 PM
Seems that microsoft word is after all not that dirty !!

Lol...it depends on your definition of "clean". I would not call a word generated HTML anything close to being clean.

Toxaris
05-04-2013, 02:29 AM
The standard HTML export is not clean and contains a lot of redudant and ugly code.

elibrarian
05-04-2013, 04:13 AM
No they are for private purposes or sharing among friends !! Seems that microsoft word is after all not that dirty !!

You are aware of copyright issues? Creasey died in 1973, so there's no country in the world, where his books will be public domain for at least 10 years. You say in the book's preamble, that you're trying to create a free online collection - in the publishers' eyes, that will classify as piracy.

That aside, do you know this page: www.johncreasey.co.uk (or is it perhaps your own :D

Regards,

Kim

Agama
05-04-2013, 10:06 AM
There are a couple of obvious errors in the CSS, namely the missing quotes around "Times New Roman" and line 13 ends in a : instead of a ; - which wil make ADE skip the whole section.

When these are corrected, the rest should work, at least in ADE.


@medwatt: this does indeed fix the indent problem in ADE.

Well spotted elibrarian!

Jellby
05-04-2013, 01:51 PM
You are aware of copyright issues? Creasey died in 1973, so there's no country in the world, where his books will be public domain for at least 10 years.

Maybe countries that have not signed the Berne convention (Angola, Iran, Laos...)?

elibrarian
05-04-2013, 02:31 PM
Maybe countries that have not signed the Berne convention (Angola, Iran, Laos...)?

:rofl:

Nope, all three got 50 years. But granted, there are some areas, that have 25 years or no known legislation:

http://en.wikipedia.org/wiki/List_of_countries%27_copyright_lengths (http://en.wikipedia.org/wiki/List_of_countries%27_copyright_lengths).
OTOH, I don't want to move to Somalia ...

Man, would it be easier, if all had the same - I find it rather idiotic in these internet'ional times, that I can finde works by danish authors at archive.org or mobileread, that ar legally put on the net there, but which I'm not supposed to take a look at, because we have copyrightrules here saying "life+70 years" :smack:

Regards,

Kim

Jellby
05-04-2013, 03:02 PM
http://en.wikipedia.org/wiki/List_of_countries%27_copyright_lengths (http://en.wikipedia.org/wiki/List_of_countries%27_copyright_lengths).
OTOH, I don't want to move to Somalia ...

Does Seychelles sound better? ;)