![]() |
#1 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2022
Device: Kobo Aura One
|
Inserting page breaks before headings
Hello!
I'm reading a book which is mostly short-form poetry and I'd like each poem to start on a new page. (I'm on a Kobo Aura One with Calibre 3.48 as my Mac is running on High Sierra.) I've tried adding the following piece of code: Code:
page-break-before: always; Code:
h1, h2, h3, h4, h5, h6 { page-break-before: always; font-weight: normal; font-style: normal; text-align: left; page-break-after: avoid; } Thank you! ![]() |
![]() |
![]() |
![]() |
#2 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
|
20 lashes with a wet noodle for making a duplicate post.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Running with scissors
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,586
Karma: 14328510
Join Date: Nov 2019
Device: none
|
Looks like a moderator deleted your other duplicate post with my answer in it.
Put each poem in its own file, that's sure to work. Maybe not the answer you wanted. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,251
Karma: 16539642
Join Date: Sep 2009
Location: UK
Device: ClaraHD, Forma, Libra2, Clara2E, LibraCol, PBTouchHD3
|
Quote:
Code:
page-break-before: always; @hobnail's solution will work for both epub and kepub. |
|
![]() |
![]() |
![]() |
#5 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 165
Karma: 196896
Join Date: Oct 2021
Location: Germany
Device: Tolino Vision 5, Tolino Tab 8", Pocketbook Era (16GB)
|
Just a side note: For some odd reason, page-break-after is often much better supported than page-break-before.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2022
Device: Kobo Aura One
|
Thanks folks!
This seems to be a problem with the kepub format, as in epub it displays the page breaks correctly after my initial code injection. Is there any way to make sure this formatting stays active when converting to kepub? (I currently use the web version of Kepubify and I can't use the KoboTouchExtended plugin on my old OS.) Last edited by fabianmoreno01; 01-20-2022 at 03:46 AM. |
![]() |
![]() |
![]() |
#7 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
But, Kobo actually state they don't support them on the devices. See https://github.com/kobolabs/epub-spec and search for page break. They recommend starting a new HTML file if you need a page break. |
|
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Another solution is to read ePub which does support page breaks.
|
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2022
Device: Kobo Aura One
|
Thanks y'all, with a special shoutout to @davidfor for letting me know what kepub won't support. This just saved me a lot of frustration!
|
![]() |
![]() |
![]() |
#10 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,745
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 15
Karma: 10
Join Date: Jan 2022
Device: Kobo Aura One
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inserting page breaks before headings | fabianmoreno01 | Kobo Developer's Corner | 3 | 01-23-2022 03:13 PM |
Inserting Page Breaks At Chapters | Reader Bill | Editor | 9 | 09-20-2019 08:29 AM |
ebook-convert (docx->html) inserting too many page breaks | xanguera | Conversion | 3 | 07-31-2015 08:05 PM |
Level 2 headings without page breaks? | RobertDDL | Conversion | 2 | 06-04-2015 06:40 AM |
Kindle inserting page breaks? | december | Calibre | 8 | 07-15-2010 09:47 AM |