04-16-2019, 06:43 AM | #1 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2019
Device: Kindle Paperwhite 2018
|
Unwanted page breaks during OTD to MOBI conversion
When I convert my OTD file to a MOBI file, Calibre automatically inserts a page break on every new header 1 and 2. My problem is that my book is structured somewhat like this
The title of x is always on a its own page with the title of x.1 and its content being on the next page. I want there to be a page break at the start of a new chapter and a new subchapter, except x.1, without removing x.1 from the index. How do I accomplish that? |
04-16-2019, 08:25 AM | #2 |
creator of calibre
Posts: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Look in the structure detection section of the conversion dialog.
|
04-16-2019, 11:59 AM | #3 | |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2019
Device: Kindle Paperwhite 2018
|
Quote:
To be more precise, I don't see a way to specify that I don't want it to create a page break on x.1 but do create one on x, x.2, x.3, ... Last edited by plznot; 04-16-2019 at 12:04 PM. |
|
04-16-2019, 12:47 PM | #4 | |
Well trained by Cats
Posts: 29,795
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Quote:
You just want to reduce the trigger conditions Since 'Chapter' is in Both, something else must change: That could be making sub chapters H2 and removing that break condition (remember you style using the CSS, not the heading level numbers ( way ) Code:
Structure detection (on the conversion dialog, NOT preferences, which is FUTURE defaults) Insert Page breaks |
|
04-16-2019, 01:46 PM | #5 |
Junior Member
Posts: 3
Karma: 10
Join Date: Apr 2019
Device: Kindle Paperwhite 2018
|
So I would have to manually change 1.1, 2.1, 3.1, ... to h2? I don't object, but I am not sure whether or not it's possible for an ODT document in LibreOffice. (at least I couldn't find how)
Is there a way to to a exclude something from an XPath match? In Regex I would match Code:
Chapter \d*(?!.)|Chapter \d*\.(?!1)\d* From what I can see XPath is too limited in features to do that though. |
04-16-2019, 05:38 PM | #6 |
null operator (he/him)
Posts: 20,565
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@plznot IMO it's best to do as much as possible in LO. If you learn how to use its template and style features you will have less fiddling and editing to do after any conversions, see ==>> Libre Office: Using Styles and Templates.
Using Styles rather than inline styling will also result in much neater code in the conversion output. And, I recommend saving as DOCX and converting that. The DOCX input module does a better job than its ODT equivalent, and its actively maintained by Kovid Goyal (calibre creator/owner). BR |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre unwanted page breaks | ebookscovers | Conversion | 20 | 05-03-2017 02:10 PM |
MOBI to EPUB conversion in calibre adds page breaks | waynn | Conversion | 15 | 04-05-2017 03:05 PM |
Unwanted page breaks being inserted | Phssthpok | Conversion | 3 | 01-10-2017 09:14 AM |
unnecessary/unwanted page breaks | bgoldnyxnet | ePub | 5 | 02-06-2014 05:56 PM |
HTML to MOBI conversion ignores page breaks | LeftHanded Matt | Conversion | 2 | 12-21-2011 12:25 PM |