![]() |
#1 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
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 |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,156
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Change --level1-toc to //h:h2 and --level2-toc to //h:h3
Put --chapter-mark none --page-break-before //h:h2 In 0.6 you have to prefix html tags with the h: namespace |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Thanks.
I assume the h: prefix applies to my --chapter, too. Correct? |
![]() |
![]() |
![]() |
#4 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Unfortunately, it didn't help. I still keep getting links to footnotes in my TOC. And, I have just noticed, even H2 without chapter/part are included :-(
|
![]() |
![]() |
![]() |
#5 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 610
Karma: 4150
Join Date: Mar 2008
Device: Sony Reader PRS-T3, Kobo Libra H2O
|
Apparently I needed to add:
Code:
--max-toc-links=0 --toc-threshold=0 |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Joining chapters | afv011 | Sigil | 2 | 06-25-2010 07:11 PM |
how to make chapters? | rysiu | Calibre | 9 | 05-31-2010 10:28 AM |
ePub Chapters vs. Stanza Chapters | kjk | Sigil | 4 | 09-14-2009 10:50 AM |
Chapters from images | bremler | LRF | 0 | 09-02-2009 06:35 PM |
Detecting chapters | Tibor | Calibre | 4 | 01-17-2009 01:25 PM |