Thanks for this great forum.
I'm having trouble getting a table of contents when outputting a .mobi from an html file in Calibre. I've set a chapter style like this:
}
p.chapter
{
text-indent: 1em;
font-weight: bold;
font-size: 1.2em;
margin-top: 2em;
margin-bottom: 1em;
page-break-before: always;
and wrapped the chapter headings like this:
<p class="chapter">Body of Evidence</p>
The Structure Detection has this in its 'Detect chapters at (XPath expression):
//*[((name()='h1' or name()='h2') and re:test(., 'chapter|book|section|part|prologue|epilogue\s+', 'i')) or @class = 'chapter']
In the Table of Contents icon's dialogue, I've left 'Force use of auto-generated Table of Contents' unchecked, and in its 'Level 1 TOC (XPath expression)' field I've added:
//h

[re:test(@class, "chapter", "i")]
What am I doing wrong?
Thanks in advance for your help.