01-25-2022, 06:10 PM | #1 |
Connoisseur
Posts: 69
Karma: 10
Join Date: Apr 2013
Device: Kobo Clara, Onyx Boox Monte Cristo
|
Alternative to "class=chapter" to force a page break
I produce epubs from a single (deprecated) html source file with calibre. The only way I know to produce a forced page break in my kobo and onyx ereaders is by adding the phrase " class=chapter" to specific html tags, for example:
Code:
<html><body> <p class=chapter><img width=100% src=i/1000.jpg></p> <p class=chapter><img width=100% src=i/1001.jpg></p> <a name="c/1004.tiff"></a> <h3 class=chapter>Foreword</h3> |
01-25-2022, 06:32 PM | #2 |
Wizard
Posts: 1,363
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Split your single html source into separate html pages. Each html page forces a new page/chapter.
|
Advert | |
|
01-25-2022, 10:06 PM | #3 |
Well trained by Cats
Posts: 30,452
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Class=chapter is a crude way to do it. Actually the word Chapter is a keyword
What that was included in conversion for was for older text files that had no HTML. Just break the files 'per chapter' or use the CSS page-break-before: always; attached to the first block where you want a split |
01-25-2022, 10:45 PM | #4 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Or use the option in the structure detection section of the conversion dialog (which is also where class="chapter" comes from btw)
|
01-27-2022, 06:15 PM | #5 | |
Connoisseur
Posts: 69
Karma: 10
Join Date: Apr 2013
Device: Kobo Clara, Onyx Boox Monte Cristo
|
Quote:
Thank you for the suggestion, but I would prefer to avoid generating multiple sources if possible. I produce epubs by the use of a series of bash and vim scripts from original screenshot images. Writing code is much simplified if I only ever have to consider one input file with a constant name, which is how I have it arranged. |
|
Advert | |
|
01-27-2022, 06:41 PM | #6 | ||
Connoisseur
Posts: 69
Karma: 10
Join Date: Apr 2013
Device: Kobo Clara, Onyx Boox Monte Cristo
|
Quote:
Quote:
But thank you for your help. |
||
01-27-2022, 07:10 PM | #7 | ||
Connoisseur
Posts: 69
Karma: 10
Join Date: Apr 2013
Device: Kobo Clara, Onyx Boox Monte Cristo
|
Quote:
Quote:
Code:
<h2><img width=100% src=i/1000.jpg></h2> <h2><img width=100% src=i/1001.jpg></h2> |
||
Tags |
calibre, html, page breaks |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Class action: "sale" royalties on "licensed" ebooks | drjenkins | News | 2 | 06-02-2016 09:44 AM |
1st page replaced by blank "Chapter 1" page | tone-alone | Calibre | 1 | 07-12-2014 03:58 PM |
iPad "page-break-after: avoid" not supports in Ipad. | Sushil | Apple Devices | 0 | 01-12-2012 06:14 AM |
inserting a "ruled Line" /chapter and page breaks | tscamera | Calibre | 3 | 01-05-2011 05:47 PM |