Hi,
I try to convert a rtf to epub and would like calibre to detect the chapters by regex.
The chapters are easily identified by starting with the chapter number, then a dot, followed by the chapter name in captitals (apart from A-Z the only character appearing in chapter names is an apostrophe.
So I use this:
And this works - all chapters are detected but the problem I am having is that each chapter is added to the TOC twice.
Why is that?
Can anybody suggest a solution so that each chapter only appears in the TOC once?
Many thanks!
I try to convert a rtf to epub and would like calibre to detect the chapters by regex.
The chapters are easily identified by starting with the chapter number, then a dot, followed by the chapter name in captitals (apart from A-Z the only character appearing in chapter names is an apostrophe.
So I use this:
Code:
//*[re:test(., "^\d+\. [ 'A-Z]+$")]
Why is that?
Can anybody suggest a solution so that each chapter only appears in the TOC once?
Many thanks!