View Single Post
Old 01-15-2011, 08:38 AM   #13
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
right - lets diagonse thie before I get lynched by the mods :-)

I have the same zip as you. I tick "restore defaults" on all the conversion screens & convert to epub, then view that in calibre viewer - the only TOC entry is "start"

repeat - but tick auto generate toc on toc screen... same result

open epub with sigil and I can see that structure detection has done its thing and has added the h2 tags ,& has created 1 file per chapter -&, I am not seeing the benefit in the form of a viewable TOC -

so we are both apparently right - your structure detection code IS working but I am not getting a TOC to view ...

AHA

I think you explained that actually, 2 posts up.... I need to open & close with sigil to compete the TOC generation, & that works & is fine for me. others may want a calibre-only solution and that would be to modify the xpath ?

I was maybe close to the answer but still in the dark !

so model answer.
step 1:enable structure detect - no need to enable auto generate toc. convert to epub.
at this stage the fchapters have been tagged & the fepub has been split with 1 file per chapter
step 2 open & close epub in sigil.

one final query on xpah - I come unstuck if I try to modify the end bit ( or class = chapter bit) in order to add an AND - is that because it is no possible.

say I wanted to replace the @class = 'chapter' test with a test for bold roman numerals so I'd want somewthing like ( @class = 'bold' AND re:test( [XIV]+ ). I'm not too clear on the retest syntax but have tried lots of invalid permutations!

is that doable and could you give a model answer for that please.

Last edited by cybmole; 01-15-2011 at 08:55 AM.
cybmole is offline   Reply With Quote