![]() |
#1 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2020
Device: Kindle, iPhone, iPad
|
EPUB-Checker error: undefined property
Hi,
I get the following errors from EPUB-Checker: Undefined property: 'endnotes' Undefined property: 'endnote' What does this mean?I'm using the following HTML (as an example) for EPUB 3 based on suggestions from others: <aside epub:type="endnotes"> <h2>Notes</h2> <ul class="endnotes"> <li id="footnote-041" epub:type="endnote" class="fn-txt"><a class="_idFootnoteAnchor" href="page-14.xhtml#footnote-041-backlink">37</a>footnote text here. </li> <li id="footnote-040" epub:type="endnote" class="fn-txt"><a class="_idFootnoteAnchor" href="page-14.xhtml#footnote-040-backlink">38</a> footnote text here.</li> </ul> </aside> How do I define this so it works? Thanks. |
![]() |
![]() |
![]() |
#2 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Is this an ePub 3 or ePub 2 eBook?
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
What version of epubcheck are you using?
(Or are you using a plugin? Or a specific site?) Says EPUB3 in his post, but could be Dabcar's accidentally using this markup in an EPUB2 book. Do you use Sigil? If you open the book in Sigil, the titlebar has a little line that says if your book is 3 or 2: or if you run epubcheck, one of the first lines should tell you whether it's checking in epub2 or epub3 mode. epub:type="endnote" and "endnotes" are both perfectly valid according to the EPUB3 specs: https://idpf.github.io/epub-vocabs/structure/#notes along with "footnote" and "footnotes". ... so something else here may be causing the trouble. Quote:
From what you're showing, the code does seem to look "okay". I probably wouldn't use a giant <ul> though. To be safe, I would wrap each note in an <aside> and use <p>, so something along these lines may work better: Code:
<aside epub:type="endnotes"> <h2>Notes</h2> <aside id="fn1" epub:type="endnote"> <p class="note"><a href="#ftn1">[1]</a> This is text for endnote 1.</p> </aside> </aside> That would more gracefully fallback, and work a bit better across a variety of readers. Last edited by Tex2002ans; 02-07-2020 at 04:01 PM. |
|
![]() |
![]() |
![]() |
#4 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
But before doing any of the code suggestion that Tex2002ans suggested, make sure your eBook is ePub3. Otherwise, none of it will work.
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2020
Device: Kindle, iPhone, iPad
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2020
Device: Kindle, iPhone, iPad
|
Thanks both JSWolf and Tex2002ans.
Tex2002ans, your question about what version of EPUB-Checker made me check out updates. I have now updated it, and EPUB-Checker has changed it's Validation to "EPUB version 3.2 rules, and now there are "no errors or warnings detected. EPUB is valid!" However, your comment, Tex2002ans, about the need to gracefully fallback and work better across a variety of readers does concern me. I also used the FlightDeck service to check it, and it says Apple doesn't like the endnotes and endnote declarations (even though in tests they work fine in Apple's Books app on my Mac. I changed the endnote/s to footnotes and footnote respectively and it no longer rejects the page in Flightdeck. Go figure. Concerning using the<ul> list, they are not mammoth (the largest is around 20), as, according to everything I've read here and elsewhere including books, it's best to use HTML properly. These are a list of footnotes at the end of each chapter (endnotes), hence my choice. Another reason for going for the list (or even p or div tags)instead of wrapping each footnote in an aside tag was that I read in these forums that this stops iBooks from using its pop-up feature. I tested this out with Apple's Books app, and it's true. The list tags semantically are correct as well as they work in Books (iBooks). The list works fine in ADE, but haven't tried a Kindle yet. As for where I got the code suggestion from, what I meant was the epub:type declarations appear to be correct. I haven't seen footnotes used in a list before, but, to me, it is logical. However, if it's a problem, I'll take them out and put them in div or p tags (as others on this forum have suggested). Thanks for the responses. Any advice is welcome. It's a long time since I put together an ebook and things have moved on quite a bit. |
![]() |
![]() |
![]() |
#7 | |||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
https://github.com/w3c/epubcheck/releases the commandline tool? (PS. And yuck, when the heck did they change the capitalization to "EPUBCheck"?) And be aware, while EPUB3.2 is supposed to be backwards compatible with EPUB3.0.1, the reality is that the vast majority of the readers out there that aren't following the latest/greatest specs. Quote:
Two examples: InDesign's "Export > EPUB3" likes to focus on creating iBooks-focused code, but there are plenty of non-iBooks EPUB3 readers, (and even within the Apple ecosystem, lots of older/buggier iBooks versions [iPad 1s floating around]). ADE 4.5 is the latest, and may display your book okay, but many older devices have an embedded RMDSK that's ~ADE 2.0. Quote:
But to my knowledge, the most well-supported type is epub:type="footnote". But someone with more Apple-centric knowledge might be able to jump in and correct me. Quote:
While EPUB3 (and 3.2) is trying to merge much closer to the overall HTML5 ecosystem, there are still a lot of backwards compatibility, older devices, non-updated and not perfectly spec-compliant readers out there. I still think it's best to design an EPUB3 that has EPUB2 (and older reader) fallbacks. For example, <ul> leads to a lot of potential formatting issues in older versions of ADE/RMSDK, and trying to use complicated CSS to override the defaults may fail miserably. To read more on the topic, see the 2016 topic "Epub3 Foot- End-notes", especially my Post #39+ where I disuses the disadvantages of <ol> (and similar). Also, there are other readers (such as Kindle and Calibre) which may rely on heuristics to "detect footnotes". Using funky code may break that functionality. (I'm unsure of how Kindle deals with epub:type endnote/footnote ... I personally don't use much EPUB3 as input... and quality technical research is hard to come by.) Quote:
And which version of iBooks are you using? (And is it Mac or iOS?) Quote:
Better to design a book that works across a broad spectrum, than one that has to be tweaked/updated/adjusted for each platform. For more info, see one of my favorite talks from last year's Ebookcraft 2019, "Building Ebooks that Last". One of the key points she explains is it's best to KISS, and to aim towards markup that works and remains readable even without CSS (who knows WHAT device/app end-users are going to be reading on... and many override your CSS). Quote:
![]() Last edited by Tex2002ans; 02-10-2020 at 02:34 PM. |
|||||||
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
It is my opinion that ol and ul elements are best left to non-ebook usage. They offer little benefit (and plenty of disadvantages) to static content to be rendered by multiple ebook readers/apps. Numbers and bullets are not that difficult to code/style manually when you only have to do it once. It'd be different if one was building dynamic content from database records.
|
![]() |
![]() |
![]() |
#9 | |||||
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2020
Device: Kindle, iPhone, iPad
|
Thanks for the input and advice.
Tex2009ans: Quote:
Quote:
Quote:
Where do I go to get all the fallbacks required! I've been trying to follow the line of Jiminy Panoz and the Blitz framework. Quote:
DiapDealer: Quote:
I would very much appreciate being pointed in the right direction for finding a list of all the pitfalls and fallback needs. I know that's not going to come in one place, but if anyone can point me to any resources that would help me get up to speed in a reasonable time without having to crawl through mountains of posts and websites (which has been my experience so far), I'd be grateful! |
|||||
![]() |
![]() |
![]() |
#10 | |||||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Worst cases:
Medium cases:
Lesser cases:
If you hardcoded in the numbers/styling, it would work across all readers... and it's not very likely the book you're digitizing is going to change. Quote:
The thing that sucks is hardcoded lists aren't as Accessible (not as easy to navigate), and it won't look as pretty (proper indentation/alignment). ... but in this rare case, I would say maximum compatibility trumps all the list bugs. All fixed now (I accidentally added space in the URL). It was just that same thread, just linked to the very 1st post. Experience, testing, reading up on MobileRead, etc. But best advice is to KISS, and don't go overboard with relying on complicated CSS + overrides, etc. Quote:
lumpynose posted a few threads in 2019 bringing up "Standard Ebooks" + Blitz (and similar), and I wrote quite a few in-depth PMs discussing many of the problems. I'll have to see if I can dig those out. The biggest issue is these things may work on latest iBooks, etc., but break on many real-life devices and override many user-chosen preferences. And then you throw the 900 pound gorilla in the room, Amazon with MOBI (KFX/KF8/KF7)... and that overly-complicated CSS is going to explode. If you're designing an EPUB3-for-iBooks-only, okay, maybe you can get away with using a bit more advanced code... But if you're designing an EPUB-for-everyone or EPUB-to-convert-to-Kindle, then you have to be much, much more conservative with your code. Quote:
And as I said previously, a lot of those tricks may look fine on the latest versions, but will break when tested across a variety of devices/apps. Quote:
But keeping in mind "no CSS" as a possibility is always a good idea... so you want to use proper semantic markup. For example: Do use:
Whatever you do, don't use:
Quote:
Use your <p>s, use your <h1-h6>, only use very basic CSS where needed: Simple HTML: Code:
<h2>Chapter 1</h2> <p class="first">This is an article about X.</p> <p>In <i>Example Book</i>, he stated:</p> <blockquote> <p>Really long quotation.</p> <p>And continuing.</p> </blockquote> [...] Spoiler:
Leave the rest up to the device/user preferences. No need to clog up the book with cruft like this: Spoiler:
(Took this CSS out of latest InDesign book I worked on.) InDesign/Hideous CSS Note: For example, see this 2014 post of mine showing some InDesign spaghetti... compared to minimal HTML. The ebook may "look okay" on the surface, but: Whoops, I turn on Night Mode (color is forced black). Whoops, I make the font sizes bigger (things start breaking). Whoops, I decide to try to change from the embedded font (some devices won't override). Quote:
Code:
any topic + Tex2002ans site:mobileread.com Hitch is also a fantastic source (runs one of the largest ebook conversion companies, Booknook): Code:
any topic + Hitch site:mobileread.com The unfortunate reality is: If you're putting a book up for sale, you still have to design ebooks with older/buggier devices in mind. And for Amazon, you still have to workaround the old MOBI format (KF7). You can't just ignore the old stuff and hope for the best. You'll get bad reviews, get books returned, your books taken down, etc. |
|||||||
![]() |
![]() |
![]() |
#11 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,123
Karma: 144284184
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Do you need ePub3? Are you actually using any features that are not available in ePub2? If you aren't, you can go with ePub2 and not have to worry about fallback. Personally, I find most ePub3 to not need to be ePub3. They can be ePub2 without any loss of functionality.
|
![]() |
![]() |
![]() |
#12 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 21,628
Karma: 29710338
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
![]() |
![]() |
![]() |
#13 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,357
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
We know you do. And you should really stop saying it every time "EPUB3" is mentioned anywhere. It's tiring and its unhelpful. EPUB3 is here, and it's here to stay, Jon. Give it a rest.
|
![]() |
![]() |
![]() |
#14 |
Member
![]() Posts: 17
Karma: 10
Join Date: Jan 2020
Device: Kindle, iPhone, iPad
|
Thanks again everyone for the advice. I quickly realised how much bloated code is produced by InDesign, so I have stripped almost everything out and used the approach you have indicated. The only real styling is in some of the headings, which need differentiating. I do have a few simple lists. However, one of the indexes uses three levels, so I'm a bit concerned about that (it took forever to recode from InDesign's bloat, and includes two html pages because it is two large).
As for Blitz, I only looked into it because Laura Brady of EPUB Secrets recommended it. Looks like I've still got quite a bit to learn! |
![]() |
![]() |
![]() |
#15 | ||||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
![]() And over the past few years, RbnJrg been getting quite a bit better at marking when things work in EPUB (which ADE he's tested on) + where they won't work in KF8/MOBI. Quote:
![]() KISS, and you'll be fine. ![]() Quote:
(And if you thought that InDesign code in that topic above looked bad... woowee, you should look at InDesign's Fixed Layout code! Every, single, word, is wrapped in a span about a mile long and absolutely positioned.) Quote:
And if you're the one in charge of designing the book in InDesign, definitely learn how to use Styles. It'll make your life (plus code cleanup) SO much easier. Last edited by Tex2002ans; 02-13-2020 at 12:16 PM. |
||||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Debian 9.8 VM: Calibre install, import error: undefined symbol: crypt_r | Sinac | Calibre | 3 | 03-26-2019 07:42 AM |
TOC error from epub checker | ebookscovers | Editor | 1 | 05-06-2017 10:19 PM |
Error when checking with ePub-Checker | gers1978 | ePub | 12 | 06-13-2013 04:24 PM |
Validation Error from ePub Checker | sgirsberger | ePub | 6 | 01-17-2012 05:20 PM |
PRS-600 Sony library - Error undefined | omk3 | Sony Reader | 13 | 01-22-2010 10:52 AM |