View Single Post
Old 01-03-2011, 05:07 AM   #3
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
Quote:
Originally Posted by Manichean View Post
As usual, use the HTML interstage to create the chapter descriptions.

...don't understand that, sorry.

It may just be that in the source, the word "chapter" occurs four times at the beginning of each chapter.


...definite not - used sigil FIND option to confirm that the word is only at start of chapter. e.g.
Code:
</head>

<body class="calibre" style="">
  <div class="Section">
    <p class="MsoPlainText"></p>

    <p class="MsoPlainText"><span>CHAPTER 1</span></p>

    <p class="MsoPlainText"><span>"I say we should stake him to an anthill and throw little pickles at him."</span></p>
Also, I believe the chapter detection is done by XPath instead of regexes, so if you do use regexes, results may vary.

...correct. i used the xpath wizards - i tred both using the look & feel screen option and the structure detection screen options, one at a time..


Edit: Oh, and I assume you do know that
Code:
CHAPTER \d
only works for single-digit chapter headings? Use
Code:
CHAPTER \d+
if you have more than 9 chapters.
...i figured that [chapter n] was a subset of [chapter nn] so would be detected ....

.. and .it seemed to work - the exact wizard generated expression is
Code:
 //*[re:test(., "CHAPTER \d", "i")]
and that is finding all 18 chapters but four times each!

could it be there's an additional epub file that is being searched ? the rpub ( in calibre viewer) has nothing except START in its TOC.

Last edited by cybmole; 01-03-2011 at 05:10 AM.
cybmole is offline   Reply With Quote