|
|
#1 |
|
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Feb 2014
Device: Kindle
|
HTML to Epub conversion isn't generating TOC through command line
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" 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>
Any ideas of what I am doing wrong? Cheers |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,636
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you want an inline ToC generated for epub you have to use the --epub-inline-toc option. For mobi the inline toc is inserted by default since the MOBI format requires inline ToCs.
|
|
|
|
| Advert | |
|
|
![]() |
| Tags |
| conversion, ebook-convert, html2epub |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML to MOBI command line convert not generating default cover? | DarkAbsynthe | Conversion | 3 | 10-20-2013 12:53 AM |
| New Calibre isn't generating TOC | ccraig13 | Conversion | 2 | 10-07-2011 10:58 AM |
| Ebook conversion (EPUB to MOBI) via command line | ebooklab | Conversion | 4 | 09-16-2011 10:34 PM |
| Command line conversion of a URL to ePub | bmwr1200c | Recipes | 3 | 08-11-2011 03:42 PM |