Monday, September 10, 2012

pop-up footnotes in iBooks with Sigil

Liz Castro describes the basics of getting pop-up footnotes to work in iBooks but lacking an epub3 editor this feature is hard to explore. As a workaround, the current (epub2) versions of Sigil can produce epubs with pop-up footnotes that work in iBooks if the appropriate (epub) namespace is declared. e.g. here is the complete xhtml.

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops">
<head>
<title>Book</title>
</head>

<body>
<p>worthy of a footnote <a epub:type="noteref" href="#ref">[ref]</a></p>

<p epub:type="footnote" id="ref">the footnote</p>
</body>
</html>

Sigil doesn't honor the <aside> tag, but styling <p> or <div> with "display:none" gives the same effect.

The resulting epub doesn't pass epubcheck but does work ok in iBooks.