View Single Post
Old 10-01-2016, 05:31 PM   #1
Cilex
Junior Member
Cilex began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2015
Device: iphone
Create TOC from non linear structure

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?

Last edited by Cilex; 10-01-2016 at 06:13 PM. Reason: (cleaned last line)
Cilex is offline   Reply With Quote