Quote:
Originally Posted by roger64
Here is an attached EPUB2 which displays in the Viewer only one footnote at a time because the id attribute has been moved from the a tag to the p tag. Also included is the regex (in .json format) I used to move the ids for the seven endnotes.
|
Yes, that's the way to do it. And as footnotes tend to be a single paragraph, it will work well.
Quote:
So no EPUB3 attribute is used.
This is OK in the Viewer, it remains to be seen how it displays on other software.
Of course, when producing an EPUB3, there will be a need for a new regex.
|
The calibre viewer does take hints from epub3 attributes if they exist. If the link has "epub:type=noteref", it will be treated as a link to a footnote. And "epub:type=link" will be treated as a link. If the footnote has "epub:type=footnote", it will also be treated as a footnote. Types 'note' and 'rearnote' will also be treated as footnotes.
There are other things about the link that can help. If the verticAlign is 'sub', 'super', 'top' or 'bottom', it will be treated as a link to a footnote.
As to other applications and readers, I've checked on my Kobo. The RMSDK based epub reader doesn't do popups for footnotes at all. They are always treated as a link and open the page. But, it doesn't like the epup:type attribute. When it finds one, it doesn't render the rest of the page.
The kepub renderer shows a popup for all the samples. The only problem I see is that in my sample where I had the anchor part way through the note, it didn't show the beginning of the sentence. The note started with the text inside the anchor.
The kepub renderer also handled the epub:type attributes. But, it is an epub 3 renderer and my guess is that they aren't checking the epub version when handling these type of attributes. Or maybe it is just ignoring the attributes.