There are many ways to do this but it is basically a two-step process for each book:
- Edit your HTML file in a plain text editor and mark all your chapter headings in a specific way.
- Import the edited HTML file into Calibre and, as part of the zip to epub conversion process, tell Calibre what you did in step 1.
A simple example:
Step 1: In the HTML file mark all your chapter headings with <h2>...</h2> tags, like this.
Code:
<h2>Chapter 1</h2>
<p>This is the text... blah blah...</p>
<h2>Chapter 2</h2>
<p>...more text... blah blah...</p>
Step 2: In
Convert - Structure Detection - Detect chapters at tell Calibre that you used <h2> tags by entering
//h:h2 in the box.