Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Conversion

Notices

Reply
 
Thread Tools Search this Thread
Old 09-17-2019, 11:03 AM   #1
Draft Works
Junior Member
Draft Works began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Sep 2019
Device: none
Chapter/Page Break Conversion in Calibre

I am converting an .odt file to Mobi format using Calibre. Everything is great except for the chapter detection and page break splits.

The title and each major section (four in total) are marked with the Heading 1 style. Each chapter (Chapter 1, Chapter 2...Chapter 8) are marked with the Heading 2 style.

In Calibre, I have used the Xpath expression to detect sections and chapters:

//*[((name()='h1' or name()='h2') and re:test(., '\s*((chapter|book|section|part)\s+)|((prolog|prol ogue|epilogue)(\s+|$))', 'i')) or @class = 'chapter']

Then the Chapter Mark is set to pagebreak. The separate box for Insert Page Break is disabled with a “/”. I had thought that setting the Chapter Mark to pagebreak was the correct way to go, but is there another Xpath expression I need to use in Insert Page Break? I just want a break before every Heading 1 or Heading 2.

When the book is converted and then opened in a Kindle device, the chapter text appears on a separate screen *following* the chapter title.

Also, the chapters have enumeration now out to the left side. For example:

2.
Chapter 1
1.
Introduction

The sections (H1) are enumerated 1 – 4, and the chapters (H2) are enumerated in their own sequence (1 – 11)

What setting is generating the numbers and how do I turn that off? How would I make sure the chapter/section page breaks are inserted before the chapter itself? Is there something in the Xpath expression I can change?

Thank you for your time.
Draft Works is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Page Break vs Chapter Split Trane Sigil 35 12-16-2016 02:14 PM
How to add a page break before each chapter barryem Editor 13 10-03-2016 10:11 PM
Epub conversion adds page break after chapter headings Siavahda Calibre 9 06-30-2015 12:10 AM
Manual page break as chapter ardeegee ePub 4 04-08-2011 11:35 PM
How to avoid page break after heading/chapter tkirke ePub 6 01-22-2010 02:12 PM


All times are GMT -4. The time now is 04:39 AM.


MobileRead.com is a privately owned, operated and funded community.