EPUB: Difference between revisions

No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 17: Line 17:
Ensure you've referenced <tt>xmlns:epub="http://www.idpf.org/2007/ops</tt> in your <tt>html</tt> tag.
Ensure you've referenced <tt>xmlns:epub="http://www.idpf.org/2007/ops</tt> in your <tt>html</tt> tag.


When using reflowable EPUB, there's no real concept of a page, and thus no real concept of footnotes. One can move them to the end of a chapter, but an arguably better solution is a popup. Move the footnote text to the end of the file, and enclose it in an <tt>aside</tt> tag ala:
When using reflowable EPUB, there's no real concept of a page, and thus no real concept of footnotes. One can move them to the end of a chapter, but an arguably better solution is a popup. Enclose the footnote text in an <tt>aside</tt> tag ala:
<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
<aside epub:type="footnote" id="SOMEID">
<aside hidden="hidden" epub:type="footnote" id="SOMEID">
  <div class="footnote"><a href="#CALLSITE">*</a> Footnote text.</div>
  <div class="footnote"><a href="#CALLSITE">*</a>Footnote text.</div>
</aside>
</aside>
</syntaxhighlight>
</syntaxhighlight>
Use of <tt>epub:type="footnote"</tt> ought result in the text being hidden.
Use of <tt>epub:type="footnote"</tt> ought result in the text being hidden, but you might need <tt>hidden="hidden"</tt> in your <tt>aside</tt> tag. Unfortunately, this latter causes problems with the popup text in Calibre (at least version 7.4).
Wrap the callsite with an <tt>a</tt> tag:
Wrap the callsite with an <tt>a</tt> tag:
<syntaxhighlight lang="html">
<syntaxhighlight lang="html">
<a epub_type="noteref" href="#SOMEID" id>Callsite text.</a>
<a role="doc-noteref" epub:type="noteref" href="#SOMEID" id>Callsite text.</a>
</syntaxhighlight>
</syntaxhighlight>
Without <tt>role="doc-noteref"</tt>, you will not get a popup in Calibre.
===Entities===
EPUB3 eliminates all but a few HTML entitites.
* &amp;nbsp; ↦ &amp;#160;
==See also==
* [https://kindlegen.s3.amazonaws.com/AmazonKindlePublishingGuidelines.pdf Kindle Publishing Guidelines] from Amazon