05-19-2009, 11:33 AM | #1 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
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? Last edited by Jellby; 07-15-2009 at 03:31 AM. |
05-19-2009, 11:35 AM | #2 |
zeldinha zippy zeldissima
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.
|
Advert | |
|
05-19-2009, 11:48 AM | #3 | |
Sir Penguin of Edinburgh
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:
I also tried it in BookWorm, and neither chapter displayed correctly. |
|
05-19-2009, 11:57 AM | #4 | |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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? |
|
05-21-2009, 11:13 PM | #5 |
Resident Curmudgeon
Posts: 75,917
Karma: 134368292
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.
|
Advert | |
|
05-22-2009, 06:42 AM | #6 | |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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. |
|
05-22-2009, 07:21 AM | #7 |
Resident Curmudgeon
Posts: 75,917
Karma: 134368292
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.
|
05-22-2009, 07:36 AM | #8 |
Resident Curmudgeon
Posts: 75,917
Karma: 134368292
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 |
05-22-2009, 08:48 AM | #9 | |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
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:
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. |
|
05-27-2009, 06:45 AM | #10 | |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
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... |
|
|
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 |