Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save caraya/9825632 to your computer and use it in GitHub Desktop.
Save caraya/9825632 to your computer and use it in GitHub Desktop.

The only requirements for popup footnotes in iBooks are:

  • Ebook has to be an EPUB3
  • epub:type "noteref" and "footnote"

So you can link to a totally separate document, as you normally would for endnotes, but include the attributes so the link behaves differently in iBooks, instead triggering the popup.

Original reference link would look something like this (in a file called ch001.html):

1

The footnote.html document would have a footnote marked as below:

1 Schindler’s List (Steven Spielberg, 1993)

The result you get with this markup is a normal link that works as you would expect it to in other ereaders, but a popup footnote in iBooks. The with the epub:type attribute is there because I didn't want the number to appear in the popup in iBooks. Everything within the element with the epub:type="footnote" will appear in the footnote. So you may not need it and could apply the epub:type="footnote" to the

or a

  • element instead, thought with
  • you wouldn't have a number to be able to link back to the original place where the footnote occurs, which is an issue in readers that don't feature a 'back' button.

  • Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment