View Single Post
Old 08-27-2010, 08:53 AM   #1
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
An auto-toc problem

Hello all,
I am relatively new to Calibre.
I have a html file I wish to convert to epub format. It has an inline toc, but I also would like to create an auto-generated one.
The book has chapters and parts which encapsulate the chapters, thus I have set parts to be heading level 1, while chapters as level 2.
I also have a batch file, which uses ebook-convert to add the detection of heading 1 and 2, thus Calibre can generate the multi-level toc.
However, the problem is that if I specify --level1-toc and the --level2-toc options as //h:h1 and //h:h2 respectively, Calibre auto-generates a toc which is based on the 2nd level headings only, i.e. the heading 1 parts are missing.
Here's how my command looks like:
Code:
ebook-convert %1 %2 --level1-toc //h:h1 --level2-toc //h:h2 --use-auto-toc
Later on I'd also like to insert metadata automatically after the conversion is done, based on online sources, but that is not important for now

Could anyone explain what I'm missing here please?

Erion
erion is offline   Reply With Quote