MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   ePub Books (https://www.mobileread.com/forums/forumdisplay.php?f=130)
-   -   Other Fiction Orwell, George: Animal Farm: A Fairy Story. v5 25 Sep 2009 (https://www.mobileread.com/forums/showthread.php?t=33766)

Jellby 12-12-2008 01:04 PM

Orwell, George: Animal Farm: A Fairy Story. v5 25 Sep 2009
 
3 Attachment(s)
George Orwell (real name Eric Arthur Blair, 1903-1950) was an English writer and journalist. His work is marked by a profound consciousness of social injustice, an intense dislike of totalitarianism, and a passion for clarity in language.

"Animal Farm: A Fairy Story" (1945) is one of the key works (together with "1984") by Orwell. It is a fable, a satire, an allegory about how the high ideals of the Russian Revolution were degraded into totalitaranism. Orwell himself had communist convictions, so this is not a work against communism, on the contrary, it tries to dissociate totalitaranism from communism.

This is another ePUB test. I guess I have the format a bit more under control now. The text comes from Project Gutenberg Australia, and I added two prefaces (the one Orwell proposed for the original edition, plus a preface for the Ukrainian translation). The usual TOC, curly quotes, etc. are there too.

By the way, the (great) cover image is by Eric Seat (www.ericseat.com), used with permission.

The book is hand-coded and formatted with CSS, let's hope the readers can handle it. For those wanting to read this in a web browser, I upload an index.zip file: just unzip this and the .epub file in the same directory, and open index.html (and modify index.css if you like).

Any kind of feedback is welcome.

EDIT (v2): Oops! The date is 1945, not 1495 :D

EDIT (v3): Oops(2)! I just realized there was a problem with the hyperlinks to the notes (I was using the "name" atribute instead of "id").

EDIT (v4): Two required elements were missing from the .ncx file.

EDIT (v5): Updated to support the epub2pdf script.

(previous download count: 269)

JeffElkins 12-12-2008 03:13 PM

Very nice! Will you be doing 1984 as well?

Jellby 12-12-2008 03:49 PM

Quote:

Originally Posted by JeffElkins (Post 306360)
Very nice! Will you be doing 1984 as well?

I don't know... I like to read every book I publish, but I don't feel like reading 1984 again now (I read it in paper not long ago, and watched the movie more recently). But if you know of a reasonably trustworthy and proofread version around (the PG versions are not always that good), I guess I could just do it without reading.

wallcraft 12-12-2008 05:06 PM

1 Attachment(s)
Thanks - I really like the web browser option.

I tried viewing it in Firefox, in Calibre, in Adobe Digital Editions, in Sony Windows Reader and in FBReader.

Firefox, ADE and Sony (which emulates the PRS-700 under Windows) all displayed the cover full screen, but Calibre just displayed an empty box and FBReader did not display anything (if does not support SVG). The "image in SVG" approach does give you a full screen cover and a conforming ePub reader is required to support SVG, but currently only ADE (including the Sony variant) actually does so. I see that you have an image-only version commented out. Is there any way to add an automatic image-only alternative? If not, then sticking with the SVG approach is ok. Eventually, all ePub Readers will support it.

Another anomaly is that the chapter "header" appears twice in ADE (and Sony) but not under Firefox or Calibre. FBReader does not produce the CSS header appearance, but also repeats the chapter header. See the attached ADE screenshot, which has "Chapter I" repeated, partially obscuring the large M of "Mr. Jones".

Jellby 12-13-2008 04:38 AM

Thanks for trying with so many readers! I think this really helps me finding out how to do things "right".

Quote:

Originally Posted by wallcraft (Post 306430)
I see that you have an image-only version commented out. Is there any way to add an automatic image-only alternative? If not, then sticking with the SVG approach is ok. Eventually, all ePub Readers will support it.

I don't know yet of a way to have the JPG show when SVG is not supported, but I'm guessing maybe something could be done with "XML islands" and "switch". However, if an ePUB reader does not properly support the required SVG, should we expect it to support XML islands?

Quote:

Another anomaly is that the chapter "header" appears twice in ADE (and Sony) but not under Firefox or Calibre. FBReader does not produce the CSS header appearance, but also repeats the chapter header. See the attached ADE screenshot, which has "Chapter I" repeated, partially obscuring the large M of "Mr. Jones".
This is probably because I used a <div> with the "display: oeb-page-head" CSS property. This is intended, as per the specification, to be displayed as a header for every page (until the end of the chapter), and must, anyway, be removed from the normal text flow. There is also a "display: none" property, that should be in effect for systems that support CSS, but don't recognize "oeb-page-head" (Firefox, Calibre). It seems ADE and Sony either don't recognize "none", or pick "oeb-page-head" but don't remove it from the text flow, or don't parse the CSS properly. As far as I know, FBReader does not support CSS at all, so you get no styling and "repeated" chapter names.

At the end, I think no reader supports page headers, and some do the wrong thing with them. I hate it when you cannot use a nice feature just because it causes havoc in non-complying systems when you try...

By the way, can you set any of the readers (other than Firefox, which reads the index.css) to justify the paragraphs instead of left-align?

Jellby 12-19-2008 02:41 PM

I corrected the publication date (and added an alternate SVG cover, but it's commented out anyway).

kovidgoyal 12-19-2008 03:08 PM

Just use <img style="height:100%"/> (see an EPUB file produced by a recent version of calibre for an example) for full screen images without svg. Using svg will cause scaling distortions for cover images that have an aspect ratio different from the viewing screen aspect ratio. Frankly, I'm amazed Adobe recommends scaling raster images via SVG

Jellby 12-19-2008 03:35 PM

Quote:

Originally Posted by kovidgoyal (Post 310277)
Just use <img style="height:100%"/> (see an EPUB file produced by a recent version of calibre for an example) for full screen images without svg. Using svg will cause scaling distortions for cover images that have an aspect ratio different from the viewing screen aspect ratio. Frankly, I'm amazed Adobe recommends scaling raster images via SVG

Great, I was using an image but someone suggested wrapping it in SVG :D

According to the SVG specification, there should be no distortion in the images if preserveAspectRatio="xMidYMid meet" (which is the default).

PS. The inline "style" you suggested is said to be deprecated, or discouraged, or whatever...

kovidgoyal 12-19-2008 04:07 PM

Quote:

Originally Posted by Jellby (Post 310287)
Great, I was using an image but someone suggested wrapping it in SVG :D

According to the SVG specification, there should be no distortion in the images if preserveAspectRatio="xMidYMid meet" (which is the default).

PS. The inline "style" you suggested is said to be deprecated, or discouraged, or whatever...

Well if you are preserving aspect ratio, there's no need for SVG at all. As for inline style, use a class instead. I just used the style attribute for brevity.

Jellby 12-20-2008 04:31 AM

Quote:

Originally Posted by kovidgoyal (Post 310307)
Well if you are preserving aspect ratio, there's no need for SVG at all.

I believe with SVG you can make an image fit a screen or view area, no matter whether it is wide or narrow, portrait or landscape... but if you just set "height: 100%" in a normal <img> element, if it happens that the screen is narrower than the image, then it will not fit. This is at least the "advantage" I saw in using an SVG wrapper (the disadvantage is the lack of SVG support in some systems).

kovidgoyal 12-20-2008 02:13 PM

Quote:

Originally Posted by Jellby (Post 310565)
I believe with SVG you can make an image fit a screen or view area, no matter whether it is wide or narrow, portrait or landscape... but if you just set "height: 100%" in a normal <img> element, if it happens that the screen is narrower than the image, then it will not fit. This is at least the "advantage" I saw in using an SVG wrapper (the disadvantage is the lack of SVG support in some systems).

Doing that will change the aspect ratio of the image.

Jellby 12-20-2008 02:57 PM

Quote:

Originally Posted by kovidgoyal (Post 310733)
Doing that will change the aspect ratio of the image.

Doing what?

What I mean is, with SVG I know how to conserve the aspect ratio and still use the highest zoom that fits an image in the screen.

Without SVG (with plain XHTML) I don't know if that's possible. I can use either "width: 100%" or "height: 100%", but if I use both the aspect ratio is not conserved (or is it?), and if I use only one, I have to know which, or else the image will be too large... If you know how to this with XHTML, please tell me.

kovidgoyal 12-20-2008 02:58 PM

Ah, I see what you mean. Yeah you can't do that with HTML w/o javascript and unfortunately Adobe's reader doesn't support javascript.

smoke 12-21-2009 02:50 PM

THANKS, jellby! sheesh, i've been looking for animal farm so long i've lost track. thanks for doing that. BTW, if you're gonna do animal farm, you're really required to do 1984. ya just can't have one without the other. you're kinda honor-bound now, ya know?

cklammer 12-22-2009 01:30 AM

There is a way ....
 
1 Attachment(s)
Quote:

Originally Posted by smoke (Post 705534)
THANKS, jellby! sheesh, i've been looking for animal farm so long i've lost track. thanks for doing that. BTW, if you're gonna do animal farm, you're really required to do 1984. ya just can't have one without the other. you're kinda honor-bound now, ya know?

There is a way .... (there usually is)

I took the latest lrf versions of Orwell's books and essays here on the site and converted them to epub using the "LRFTools" (with default parameters) described elsewhere here on the site. "LRFTools" requires Java installed and only works from the commandline.

I am attaching a thumbnail which shows how the 1984 epub converted from lrf looks in the epubreader firefox extension. The font is a bit small and skinny but that is specific to this epub/lrf source. One can always fiddle with the parameters during the conversion.

PM me if you want my conversion results - I don't want to take the thread more off-topic than it already is. There actually is a thread for begging in the "E-book Uploads" parent forum, you know. ;-)

Forget the copyright notice - that is coming from the forum system.


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

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