View Single Post
Old 03-23-2021, 06:26 PM   #12
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JollyRoger View Post
I've got an epub file which seems to have every paragraph on a new page. I converted it to mobi in Calibre but it retained the same formatting.
It looks like this is the culprit:

Code:
<div class="mbppagebreak" id="calibre_pb_5"></div>
The original file/conversion might've been busted, and added those page breaks after every single paragraph/page.

What you'll want to do is merge all HTML files together, then manually split them where you want (before every chapter).

1. In Calibre's Editor:

Highlight multiple files, then Right-Click + "Merge Selected Text Files".

2. Press Ctrl+F and make sure Mode is set to "Regex".

3.

Search: <div class="mbppagebreak" id="calibre_pb_\d+"></div>
Replace: ***LEAVE COMPLETELY BLANK***

This will remove all the mbppagebreaks from your code.

4. Follow:

https://manual.calibre-ebook.com/edi...ing-html-files

to split each chapter into its own file.

5 (Optional). Rename all your files to human-readable names such as:

- Foreword.xhtml
- Introduction.xhtml
- Chapter01.xhtml
- Chapter99.xhtml

Last edited by Tex2002ans; 03-23-2021 at 06:33 PM.
Tex2002ans is offline   Reply With Quote