View Single Post
Old 11-02-2010, 10:56 AM   #9
janvanmaar
Addict
janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.janvanmaar has a complete set of Star Wars action figures.
 
Posts: 219
Karma: 404
Join Date: Nov 2010
Device: Kindle 3G, Samsung SIII
I think my suspicion was correct, the XHTML looks like this:
Code:
<p class="P-kapit">2.</p>                                                                                                       
<p class="P-P32">Name of chapter</p>
So it seems that I cannot grep over multiple lines directly as they are not passed together to the TOC creation engine.

Based on this, I think it should be simple to create the TOC with either names of the chapters or with their numbers (for this specific file), however it is not clear to me how to construct an XPath to create something like "number: name" structure. Is that possible at all with current Calibre interface?
janvanmaar is offline   Reply With Quote