I'm trying to generate an epub from an HTML document. For this, I'm using ebook-convert with the following:
Code:
ebook-convert tmp/livros/kindle/index.html tmp/livros/book.epub \
--authors="Name" \
--level1-toc="//*[name()='h1' or name()='h2']" \
--level2-toc="//h:h3" \
--level3-toc="//*[@class='subsection']" \
--page-breaks-before="//*[(name()='h1' or name()='h2') or @class='owner-name']" \
--use-auto-toc --toc-threshold=0 \
--toc-title="My TOC" \
--embed-all-fonts \
--title="A book"
My HTML file is using h1, h2, h3 and the subsection css class properly. This is a snippet of my index.html file:
Code:
<h2 class='referenceableTitle'>
<span class="chapter-number">
<span class="number">Chapter 1</span>:
</span>
Chapter name
</h2>
<p>Lorem ipsum...</p>
<div class='referenceable'>
<h3 class='referenceableTitle'>
<span class="number">
1.1
</span>
Section name
</h3>
<p>lorem ipsum...</p>
</div>
The ebook-convert command we are trying to run is the same one we use to convert to .mobi files from the same html and it works perfectly.
Any ideas of what I am doing wrong?
Cheers