Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-27-2014, 03:44 PM   #1
medwatt
Zealot
medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 147
Karma: 87723
Join Date: Jan 2011
Location: Kuiper Belt
Device: Kindle 3 (dead); Nook ST (dead); Sony PRS-T1; Onyx i86+
Why android epub apps almost always disregard provided CSS

Hello,
I have been creating several ebooks with SIGIL. I leave the html code as clean as possible and control the appearance directly from a stylesheet. So instead of using inline styles for each paragraph I just use one selector for all paragraphs in the stylesheet. In Sigil the book looks exactly the way I want but when viewed in other software:
1. ADE - Headings and div tags are no longer centered, everything is indented (First paragraph should not be indented)
2. MoonReader - Line height is increased, headings are left aligned, no indentation whatsoever, open double quotes (&ldquo are converted to ".
3. Coolreader - Better than the rest in terms of CSS suport but doesn't load embedded font properly even though there's a tick box for that in the option menu.
4. Nook Simple touch - On the device the book looked best
5. Nook Simple touch android apk - not as in the device

I am not using any complicated css codes, just simple selectors and decedent selectors. I am really baffled why these readers seem to throw away my settings. I really hate reading a book that is not properly formatted.
In fact moonreader comes with 3 free wbooks and in all of them the text is left-justifed (no indentation). Really, who is making these software !! Surely, there's a reason why indentations were introduced in the first place.
Might it be possible that I should use inline styles instead?

Your inputs are welcomed and please recommend any android apk that supports even basic CSS (some pretend to).

Thanks

Last edited by medwatt; 06-27-2014 at 03:47 PM.
medwatt is offline   Reply With Quote
Old 06-27-2014, 04:45 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Moon reader Pro allows you to disable CSS styles ( OFF by default)
It also allows embedded fonts and other rules (3 pages of options to mess with )
theducks is offline   Reply With Quote
Advert
Old 06-27-2014, 05:37 PM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Bluefire Reader

Check out Bluefire Reader, it's based on the same engine that ADE uses. It definitely supports embedded fonts and CSS files.
I haven't tested the Android version, but the iOS version is pretty good.
Doitsu is offline   Reply With Quote
Old 06-27-2014, 05:38 PM   #4
medwatt
Zealot
medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 147
Karma: 87723
Join Date: Jan 2011
Location: Kuiper Belt
Device: Kindle 3 (dead); Nook ST (dead); Sony PRS-T1; Onyx i86+
Quote:
Originally Posted by theducks View Post
Moon reader Pro allows you to disable CSS styles ( OFF by default)
It also allows embedded fonts and other rules (3 pages of options to mess with )
Does MoonReader support external dictionaries like fora dictionary and goldendict. I read some foreign language books making the use of external dictionaries very important.
medwatt is offline   Reply With Quote
Old 06-27-2014, 06:06 PM   #5
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by Doitsu View Post
Check out Bluefire Reader, it's based on the same engine that ADE uses. It definitely supports embedded fonts and CSS files.
I haven't tested the Android version, but the iOS version is pretty good.
Mantano Reader is also based on RMSDK:

https://play.google.com/store/apps/d...oid.lite&hl=en

I prefer it over Bluefire.
Tex2002ans is offline   Reply With Quote
Advert
Old 06-27-2014, 06:38 PM   #6
medwatt
Zealot
medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 147
Karma: 87723
Join Date: Jan 2011
Location: Kuiper Belt
Device: Kindle 3 (dead); Nook ST (dead); Sony PRS-T1; Onyx i86+
I have noticed that when the styles are inline then the epub readers display them properly. For example: <p class="myStyle"> will cause the style to be used where as if I define p{} then it is ignored by the epub readers. Why is that so ?
I noticed this because I converted the book from epub to epub using Calibre software. Calibre adds a class to all html elements when when that is redundant. What's going on ?
medwatt is offline   Reply With Quote
Old 06-27-2014, 06:41 PM   #7
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,551
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Tex2002ans View Post
Mantano Reader is also based on RMSDK:

https://play.google.com/store/apps/d...oid.lite&hl=en

I prefer it over Bluefire.
For my own experience, I can tell you that are very few the reader apps that observe the css stylesheet of an epub. I practically tested all of them and so far I found that the following apps as the better to read epubs:
  1. PocketBook Reader
  2. Aldiko
  3. Kobo

PocketBook doesn't support rounded box and pseudo-classes and pseudo-elements (no epub3 features), but has hyphenation and you can do "pinch" to adjust font-size, etc. On the other hand, Kobo supports rounded box and pseudo-classes but it hasn't hyphenation and is a bit slow (and no "pinch" at all, you need to do anything by menus). Finally, to read .mobi (or .azw3 files) the better is Kindle for Android; practically offers the same features as Kindle Fire.
RbnJrg is offline   Reply With Quote
Old 06-27-2014, 06:55 PM   #8
medwatt
Zealot
medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 147
Karma: 87723
Join Date: Jan 2011
Location: Kuiper Belt
Device: Kindle 3 (dead); Nook ST (dead); Sony PRS-T1; Onyx i86+
Is it a requirement that all styles be inline for epub readers ?
medwatt is offline   Reply With Quote
Old 06-27-2014, 07:35 PM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by medwatt View Post
Does MoonReader support external dictionaries like fora dictionary and goldendict. I read some foreign language books making the use of external dictionaries very important.
I have no idea, I use a really old Websters that I keep under the desk in rare cases.
I only read English so I am the last one to ask on multiple language issues.
theducks is offline   Reply With Quote
Old 06-27-2014, 07:40 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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by medwatt View Post
1. ADE - Headings and div tags are no longer centered, everything is indented (First paragraph should not be indented)
Where did you find ADE for Android?

I've found ADE to be perfectly capable of centering headings and indenting all paragraphs but the first using nothing but simple CSS.

I format all my books the way I like them using CSS that's as simple as possible, and they all display as I intended them to. I'm mostly using Mantano these days (which is based on Adobe's RMSDK). All devices/renderers have quirks, but simple they don't really have too much trouble with.

Remember ... a single forgotten semi-colon, or other overlooked syntax error will cause ADE to ignore all CSS that comes after (Sigil's Webkit renderer is more forgiving). You should get used to validating your CSS (Sigil will connect to W3C's online validator for you) to eliminate the possibility of simple syntax errors. It's easy enough, and will save you hours of grief looking for what your eyes refuse to see sometimes.

Moon Reader (great app that it is) is all about allowing readers to defeat--or get around--the CSS imposed by an ebook's creator without having to actually edit the epub itself. As such, ebook creators who are trying to achieve a particular look for their project--using CSS--should probably steer clear of using it (Moon) to preview with (even with all its CSS overrides turned off). It's meant for readers who want to display things any which way EXCEPT the way you (its creator) intended it to be displayed. Nothing wrong with that, as long as you know it going in.

Last edited by DiapDealer; 06-27-2014 at 08:05 PM.
DiapDealer is offline   Reply With Quote
Old 06-27-2014, 07:58 PM   #11
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,551
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by medwatt View Post
Is it a requirement that all styles be inline for epub readers ?
AFAIK, no it isn't.
RbnJrg is offline   Reply With Quote
Old 06-27-2014, 08:41 PM   #12
medwatt
Zealot
medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.medwatt knows better than to ask about the Gravitic Imploder Lance.
 
Posts: 147
Karma: 87723
Join Date: Jan 2011
Location: Kuiper Belt
Device: Kindle 3 (dead); Nook ST (dead); Sony PRS-T1; Onyx i86+
Quote:
Originally Posted by DiapDealer View Post
Where did you find ADE for Android?

I've found ADE to be perfectly capable of centering headings and indenting all paragraphs but the first using nothing but simple CSS.

I format all my books the way I like them using CSS that's as simple as possible, and they all display as I intended them to. I'm mostly using Mantano these days (which is based on Adobe's RMSDK). All devices/renderers have quirks, but simple they don't really have too much trouble with.

Remember ... a single forgotten semi-colon, or other overlooked syntax error will cause ADE to ignore all CSS that comes after (Sigil's Webkit renderer is more forgiving). You should get used to validating your CSS (Sigil will connect to W3C's online validator for you) to eliminate the possibility of simple syntax errors. It's easy enough, and will save you hours of grief looking for what your eyes refuse to see sometimes.

Moon Reader (great app that it is) is all about allowing readers to defeat--or get around--the CSS imposed by an ebook's creator without having to actually edit the epub itself. As such, ebook creators who are trying to achieve a particular look for their project--using CSS--should probably steer clear of using it (Moon) to preview with (even with all its CSS overrides turned off). It's meant for readers who want to display things any which way EXCEPT the way you (its creator) intended it to be displayed. Nothing wrong with that, as long as you know it going in.
Can you provide me with a sample of an epub you created which makes use of an external stylesheet and not inline styles ?
medwatt is offline   Reply With Quote
Old 06-27-2014, 10:05 PM   #13
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: 27,553
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by medwatt View Post
Can you provide me with a sample of an epub you created which makes use of an external stylesheet and not inline styles ?
Sure.

Looks the way I expect it to in Sigil, ADE, Mantano, etc...

Hope something there helps.
Attached Files
File Type: epub simple_sample.epub (2.8 KB, 211 views)
DiapDealer is offline   Reply With Quote
Old 06-27-2014, 11:41 PM   #14
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by medwatt View Post
Can you provide me with a sample of an epub you created which makes use of an external stylesheet and not inline styles ?
Every EPUB I touch has 1 or more CSS when I get done.

My primary reader is MRSDK (ADE) based. They render as designed. (As noted: 1 tiny CSS error and all bets are off. My PEz does not even like EPUB3 valid CSS entries. Pure EPUB 2 required)

Calibre conversions of those to AZW3 render fine on my K4NT

The few EPUB I have read with Moon + pro appear good
any time I have had problems was because there WAS A PROBLEM with MY coding
theducks is offline   Reply With Quote
Old 06-28-2014, 02:11 AM   #15
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by medwatt View Post
I have noticed that when the styles are inline then the epub readers display them properly. For example: <p class="myStyle"> will cause the style to be used where as if I define p{} then it is ignored by the epub readers. Why is that so ?
I noticed this because I converted the book from epub to epub using Calibre software. Calibre adds a class to all html elements when when that is redundant. What's going on ?
I've defined p as I want and in the XML, when I want to use what I have defined, I make sure it's just <p>. Works on all ADE based readers I've used.

my p style is...
Code:
p {
margin-top: 0;
margin-bottom: 0;
text-indent: 1.2em
}
but when you use something like <p class="center"> to center something, you do have to have a text-indent: 0 in the class or it will be off center by 1.2em. Any class used with p that centers needs an indent of 0.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
android pro quick guide apps: html5, CSS, regex... cybmole Sigil 10 05-13-2014 02:11 AM
Android epub apps nyy27wc Android Devices 0 11-21-2013 10:22 PM
CSS classes on Android epub readers MarleneW ePub 7 05-13-2012 04:57 PM
Override ePub CSS with userStyle.css? barium Sony Reader Dev Corner 11 07-16-2011 03:25 PM


All times are GMT -4. The time now is 05:19 AM.


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