View Single Post
Old 08-01-2009, 08:10 AM   #1
pepak
Guru
pepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura aboutpepak has a spectacular aura about
 
Posts: 601
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-505
Too many chapters with 0.6

For some reason I can't figure out the proper sequence of command-line parameters that would achieve my goals:

1) Only H2 and H3 tags are considered for chapters.
2) These tags must have class starting with either "part" or "chapter".
3) Nothing else is a chapter.
4) Page-breaks occur before any H2, but nowhere else.

I thought these parameters would do the trick:
Code:
--no-chapters-in-toc
--chapter="//*[re:test(name(), '^h[23]', 'i') and re:test(@id, '^(chapter|part)', 'i')]"
--chapter-mark=pagebreak
--page-breaks-before=//h2
--level1-toc=//h2
--level2-toc=//h3
It almost works, but goal #3 gives me trouble: If a book contains intra-document links (which I use for footnotes), they ALSO get added to the TOC. I thought that --no-chapters-in-toc would take care of that, but apparently that is not the case. What other option should I use then?
pepak is offline   Reply With Quote