An EPUB book is just a ZIP file, so you can unzip it and look at the files inside. A sample EPUB I created with bookdown
contained a file content.opf
with this <guide>
element:
<guide>
<reference type="toc" title="A Minimal Book Example" href="nav.xhtml" />
</guide>
According to https://ebookflightdeck.com/handbook/guide the cover
and text
guides would look something like this, where text
corresponds to the 'start reading location':
<guide>
<reference type="cover" title="Cover Image" href="cover.xhtml"></reference>
<reference type="toc" title="Table of Contents" href="toc.xhtml"></reference>
<reference type="text" title="Startup Page" href="chapter1.xhtml"></reference>
</guide>
Of course, the explicit href
has to be adjusted to what is found in the EPUB.
Alternatively, you could use EPUB3 rules and add landmark
items to nav.xhtml
, c.f. https://ebookflightdeck.com/handbook/landmarks. Here bodymatter
is probably what is needed. This might fit better, since bookdown
uses EPUB3 by default. In my example EPUB generated with pandoc 2.2.1 I again get the toc, but nothing else:
<nav epub:type="landmarks" hidden="hidden">
<ol>
<li>
<a href="#toc" epub:type="toc">Table of contents</a>
</li>
</ol>
</nav>
To get this to work I had to use:
bookdown::epub_book:
toc: yes
pandoc
>= 2.3 supports better support for specifying the different sections of an ebook using the epub:type
attribute.
I am not sure how relevant this is for the kindle production, though, given this quote from the above linked publishing guidelines:
Publishers do not need to define a start reading location because Amazon does this during the upload process.