Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 05-19-2009, 11:33 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Test for custom entities in ePUB

Hi,

In this thread it was suggested the use of custom entities (like ’ or — ) as a possible typographic tool. I would like to test it and see if (and how) different ePUB readers support it. Basically, the trick is adding entity definitions to the DOCTYPE line.

In this file I've used &loquo; and &roquo; for outer quotes and &liquo; and &riquo; for inner quotes, as well as ≈ for apostrophes. Chapter 1 has the definitions in-line, while Chapter 2 uses an external file (this would be preferable, since it allows changing all chapters in a single place).

I've tried with Calibre, and Chapter 1 (internal) works, but Chapter 2 (external) doesn't. Besides, both chapters show some garbage at the top. Could you try with other readers and maybe test other possible solutions?
Attached Files
File Type: epub DorianGray.epub (90.0 KB, 714 views)

Last edited by Jellby; 07-15-2009 at 03:31 AM.
Jellby is offline   Reply With Quote
Old 05-19-2009, 11:35 AM   #2
zelda_pinwheel
zeldinha zippy zeldissima
zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.zelda_pinwheel ought to be getting tired of karma fortunes by now.
 
zelda_pinwheel's Avatar
 
Posts: 27,827
Karma: 921169
Join Date: Dec 2007
Location: Paris, France
Device: eb1150 & is that a nook in her pocket, or she just happy to see you?
excellent timing, i was trying to play with this myself after seeing the custom entities used in adobe's alice in wonderland sample book, but i couldn't get it to work ; i got a bit of garbage showing at the beginning of the page, and the entities weren't translated correctly. i'm very interested to learn more about it. i starting looking for some info but haven't had time to get very far, but we could start by trying to reverse-engineer that adobe file.
zelda_pinwheel is offline   Reply With Quote
Advert
Old 05-19-2009, 11:48 AM   #3
Nate the great
Sir Penguin of Edinburgh
Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.Nate the great ought to be getting tired of karma fortunes by now.
 
Nate the great's Avatar
 
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
I ran it through epubcheck, and here are the error messages:
Quote:
ERROR: DorianGray.epub/OEBPS/content.opf(8): unfinished element
ERROR: DorianGray.epub/OEBPS/content.opf: unique-identifier attribute in package element must reference an existing identifier element id
ERROR: DorianGray.epub/OEBPS/Chapter-02.xhtml: Could not resolve local XML entity 'OEBPS/css/entities.dcd'
ERROR: DorianGray.epub: resource OEBPS/css/entities.dcd is missing
ERROR: DorianGray.epub/OEBPS/Contents.xhtml(28): 'OEBPS/Chapter-03.xhtml': referenced resource missing in the package
You're also missing the other chapters, but that's not important.

I also tried it in BookWorm, and neither chapter displayed correctly.
Nate the great is offline   Reply With Quote
Old 05-19-2009, 11:57 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Nate the great View Post
I ran it through epubcheck, and here are the error messages:

You're also missing the other chapters, but that's not important.
Oh, I deleted too much, and removed the identifier Should be fixed now.

The rest of the chapter were intentionally deleted, but not all references, it seems. The "css/entities.dcd" file should be there, though. Maybe the "text/plain" type is not correct?
Jellby is offline   Reply With Quote
Old 05-21-2009, 11:13 PM   #5
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: 73,652
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
In ADE, the drop caps overwrite the line above and the chapter numbers are way off in left field. Plus, the ePub logo looks silly. Other then that, it looks fine.
JSWolf is online now   Reply With Quote
Advert
Old 05-22-2009, 06:42 AM   #6
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
In ADE, the drop caps overwrite the line above and the chapter numbers are way off in left field. Plus, the ePub logo looks silly. Other then that, it looks fine.
The "line above" the drop caps should not be there. It's intended to be a page header and ADE is doing the wrong thing displaying it in the text flow (at the very least it should just ignore it).

The chapter numbers are intentionally displaced to the left.

I tried here with ADE and Chapter 2 is a mess and not displayed correctly at all.
Jellby is offline   Reply With Quote
Old 05-22-2009, 07:21 AM   #7
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: 73,652
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
And the ePub logo does not look good where it is at all.
JSWolf is online now   Reply With Quote
Old 05-22-2009, 07:36 AM   #8
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: 73,652
Karma: 127838196
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
The reason the headers failed is because you did not define a page template.

http://blogs.adobe.com/digitaleditions/template.html
JSWolf is online now   Reply With Quote
Old 05-22-2009, 08:48 AM   #9
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JSWolf View Post
And the ePub logo does not look good where it is at all.
It's meant to be at the bottom of the title page. Of course, the page size can be altered, so whether it will fit in the page or not is not predictable. (I could use "position: absolute", but that is discouraged in the ePUB specification).

Quote:
Originally Posted by JSWolf View Post
The reason the headers failed is because you did not define a page template.
I don't try to create an ePUB customized for ADE, but a general compliant ePUB. I used "display: oeb-page-head", and, according to the spec:

The content of an element assigned display: oeb-page-head should be presented only as a header, and the content of an element assigned display: oeb-page-foot should be presented only as a footer. Neither should be simply presented as if it were inline or block.

(Where "should" means: "This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.")

And the page you linked says:

oeb-page-head and oeb-page-head values for display properties can be used to move the content to the page header or footer area. They are very similar to adobe-other-region display value, but need dynamic allocation of the header and footer space - something that Digital Editions 1.0 still cannot do. In future they are expected to work just like adobe-other-region value with adobe-region set to either xsl-region-before or xsl-region-after - at least in paginated mode. The good thing about these properties is that they are convey more semantic than adobe-other-region and thus can be used by Digital Editions even if epub is displayed in scroll mode (something that we do not have currently). Thus, I think these values are critical to implement right.

So I think I'm doing it right.

Last edited by Jellby; 07-15-2009 at 03:32 AM.
Jellby is offline   Reply With Quote
Old 05-27-2009, 06:45 AM   #10
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,514
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Jellby View Post
The "css/entities.dcd" file should be there, though. Maybe the "text/plain" type is not correct?
Silly me, it seem's I can't tell the difference between dcd and dtd

Well, this version now validates in http://www.threepress.org/document/epub-validate/ The problems are still there, it seems external dtd files are not quite supported anywhere.

As for the chapter number in the titles, I see ADE is not behaving the way I expected, it's moving the float down, and normal browsers don't do that. I wonder if this is a bug or some ambiguity in the specification...
Attached Files
File Type: epub DorianGray.epub (90.0 KB, 652 views)
Jellby is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ePub files do not center a custom <hr /> tag! Haidon ePub 2 08-21-2010 04:29 AM
ePub with custom .css on a 505 dicknskip Sony Reader Dev Corner 3 06-09-2010 11:34 PM
Epub acid test? tovare ePub 2 10-14-2009 04:50 PM
Custom Icons for Your ePub Files Zero9 ePub 1 06-09-2009 07:45 PM
Please Test: Final (?) Art of War custom PDF eBooks ahi Workshop 17 05-26-2009 11:00 PM


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


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