02-20-2014, 01:42 PM | #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 |
02-20-2014, 10:09 PM | #2 |
creator of calibre
Posts: 43,859
Karma: 22666666
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.
|
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-19-2013 11:53 PM |
New Calibre isn't generating TOC | ccraig13 | Conversion | 2 | 10-07-2011 09:58 AM |
Ebook conversion (EPUB to MOBI) via command line | ebooklab | Conversion | 4 | 09-16-2011 09:34 PM |
Command line conversion of a URL to ePub | bmwr1200c | Recipes | 3 | 08-11-2011 02:42 PM |