Inserting Page Breaks At Chapters
I have several books that are in ePub format, but which lack chapters in the TOC. Also, the chapters in the text of the book do not begin on a new page. I have been able to add the chapters to the TOC by using the TOC editor, generating TOC from XPath and entering "Chapter" in the Value (new chapters all begin with the word Chapter). This gives me a list of the word chapter from which I can delete the spots where "chapter" appears in the text of the book and then mass renumber the rest. That seems to work fine. I can't however figure out how to make each chapter appear at the top of a new page. I'm thinking I should be able to edit the book and do a search and replace on "Chapter" inserting a page break (looking at each instance to make sure it was really the beginning of a chapter), but I can't figure out how to do that. Can anyone help? Also, is there an easier way to accomplish the TOC? A sample of the code at the point of chapter change is below...
<p> I walked stiffly through the house, through the kitchen to the backyard and my parked pickup truck. When I turned the ignition, I looked through the windshield and saw her watching me through the back screen, biting the comer of her lip as though her next option was just now presenting itself.</p>
<div class="newpage" id="page-69"></div>
<p id="toc_7"> CHAPTER</p>
<p> |t rained all that night. At false dawn a white ground fog rolled out of the swamp, and the cypress trees on the far bank of the bayou looked as black and hard as carved stone. Deep inside the fog you could hear bass flopping back in the bays. When the sun broke above the horizon, like a red diamond splintering apart between the tree trunks, Batist and I were still bailing out the rental boats with coffee cans. Then we heard a car on the road, and when we looked up we saw a purple Lincoln Continental, with Sabelle Crown in the passenger's seat, stop and back up by our concrete boat ramp.</p>
|