Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
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
Old 10-01-2016, 05:41 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
the indented TOC will create just fine with a missing level (ncx, html FROM ncx)
It may look a little ragged since H3 without H2 just moves into that position
H1
H2
H3
H1
H3
theducks is offline   Reply With Quote
Advert
Old 10-01-2016, 06:18 PM   #3
Cilex
Junior Member
Cilex began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Mar 2015
Device: iphone
I'm not sure I understand your answer... If I do leave Auto Generation "On" from the original file, it just creates garbage TOC.

And if I do define TOC levels 1, 2, 3, Level 3 is not generated - because Level 2 was not, I guess - so Chapter 2 has no sub-titles.
Cilex is offline   Reply With Quote
Old 10-01-2016, 08:16 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Try using the TOC tool (standalone or p/o the editor) instead of relying on the basics of Conversion - Detection.

It also offers more choices (ways) than included in the Conversion
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Create tags while importing from source folder structure eamonned Library Management 5 01-28-2019 09:37 AM
Ho do I create a TOC for ePub which does convert to an active TOC in Kindle Previewer K-Thom Calibre 1 09-24-2013 06:32 PM
[Old Thread] Create just one TOC medwatt Conversion 27 12-18-2012 05:55 PM
Create Newspaper TOC plantoschka Kindle Formats 2 09-09-2010 02:03 PM
How to create a TOC from scratch? greenapple Sigil 5 06-01-2010 02:20 AM


All times are GMT -4. The time now is 12:41 AM.


MobileRead.com is a privately owned, operated and funded community.