View Single Post
Old 04-25-2012, 06:38 AM   #1
jhsrennie
Member
jhsrennie began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jun 2011
Device: Android
Can't get --level2-toc to work

I'm trying to convert an HTML file to epub and while the level 1 contents is working I can't make the level 2 contents work. A typical exerpt from my document is:

Code:
<h1 class="chapter">ALTERNATE TECHNOLOGY</h1>
<h1></h1><h3 class="subheading">Split Infinities</h3>
<p>Welcome to your new ARNS Home Universe GeneratorTM 3.6.4! Those ...p>
The command I'm using is:

Code:
ebook-convert "Ira Nayman - Luna for the Lunies.html" .epub --authors "Ira Nayman" --title "Luna for the Lunies" --cover "Ira Nayman - Luna for the Lunies.jpg" --level1-toc //h:h1[@class="chapter"] --level2-toc //h:h3 --input-encoding cp1252
I originally used --level2-toc //h:h3[@class="subheading"] and when that didn't work I tried --level2-toc //h:h3, but I would like to restrict it to the subheading class if I can.

Calibre correctly detects and builds all the level 1 contents, but I get no level 2 contents. If anyone can spot my deliberate mistake I'll be eternally grateful!
jhsrennie is offline   Reply With Quote