View Single Post
Old 03-31-2022, 08:41 PM   #10
lomkiri
Groupie
lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.lomkiri ought to be getting tired of karma fortunes by now.
 
lomkiri's Avatar
 
Posts: 167
Karma: 1497966
Join Date: Jul 2021
Device: N/A
Quote:
Originally Posted by theducks View Post
After the Xpath box, use the Wizard icon. (it opens another layer)
fill in the boxes:
Tag type (* is any, but I prefer to narrow it down to p)
[...]
I've explained exactly this in the screenshot of my first message. But it doesn't work since the title of every entry will always be "*", so calibre criate only one entry in the ToC (it doesn't duplicate the entry if the title is the same) [note 1]

That's why I've suggested to add a hidden text inside the <p></p> tags, so it will create one entry for every PAGE-BREAK, CN and CO. That's exactly what is doing the regex-function I wrote for him.
___________

[note 1] I realize just now that there is an option "Do not add duplicate entry [...]", and that unchecking this box solves the problem :-/. Anyway, it's nicer to have some numbers in the ToC than only stars at all levels.
lomkiri is offline   Reply With Quote