Quantcast
Channel: MobileRead Forums - Conversion
Viewing all articles
Browse latest Browse all 3900

Create TOC from non linear structure

$
0
0
Hi,

I really envoy the latest Calibre version...

I have a source LibreOffice odt document with this structure (I cannot change it, it's an European law):

Code:

Chapter 1
  Section 1
    Article 1
    Article 2
  Section 2
    Article 3
    Article 4
Chapter 2
  Article 5
  Article 6

Chapter uses Title 1 (h1), Section uses Title 2 (h2), Article uses Title 3 (h3)

As you see, sometimes there is no Section (h2) between Chapter (h1) and Article (h3).

Using the TOC from LibreOffice generate an ugly TOC, and using standard "//*[name()='h2']" for Level 2 misses Articles; using "//*[name()='h2' or name()='h3']" puts all Articles in Level 2...

Please, how can I create automatically a nice TOC with this structure?

Viewing all articles
Browse latest Browse all 3900

Trending Articles