|
|
#1 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
What can invisibly cause a pagebreak?
I have an epub file and can't figure out what's causing a pagebreak.
Code:
<p class="noindent2">In the dungeons, the Queen sat in near perfect darkness. She had one window, high in the wall of her cell, and it allowed in some light during the day. She had a bed, and wall hangings and clean linen, and excellent food.</p> <p class="indent">And very careful guards. She didn’t know any of them, despite their red surcoats. But they were cautious and courteous.</p> Code:
.noindent2 {
display: block;
font-size: 1em;
line-height: 1;
text-align: justify;
text-indent: 0;
margin: 1em 0 0 0;
}
.indent {
display: block;
font-size: 1em;
line-height: 1;
text-align: justify;
text-indent: 1em;
margin: 0;
}
Aside from the ones I added, there's no page-break rule anywhere in the stylesheet. In the Calibre Editor and in Sigil, there is no other code around that paragraph. In the Calibre Viewer/Sigil preview, there's no pagebreak visible. But in Adobe Digital Editions, and on my Kobo, there's a pagebreak there. I have widows and orphans removed from the stylesheet, so it's not that. So - what can cause a pagebreak in an epub file, without a page-break-after rule or visible bit of code around a given paragraph? What should I be looking for? This is all with EPUB, not KEPUB, if that's relevant. Also, I'm not great with terminology etc, so please explain any theories like I'm 5! |
|
|
|
|
|
#2 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
Also, because it has sometimes helped with issues like this in the past, I converted the file to AZW3, but the Calibre Editor still didn't show me any code that would explain the pagebreak.
|
|
|
|
|
|
#3 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,502
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
One possibility - you might try looking at the widows/orphans setting. Under ePub 2 you can set that and it can have the effect of pushing sentences to the next page - which looks a lot like a page break.
If you are using ePub 3 that wouldn’t be in the css, but it may be a default in your Kobo??? Others here are more knowledgeable about koboisms. Cheers, |
|
|
|
|
|
#4 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,900
Karma: 9600930
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
|
Following on from the comment by Tuttle91, if you change the font size on your kobo, does the page break still occur at the same place or does it move with the changing font size?
If it stays at the same place, we'd need to see the ebook in total. |
|
|
|
|
|
#5 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,905
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
@Siavahda, put the following code in your CSS. One thing to do is for every class that has a center, make sure text-indent: 0; is in those classes. If you already have body and p, replace them. See if this fixes your problem.
Code:
body {
widows: 1;
orphans: 1;
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
text-align: justify;
}
p {
margin-top: 0;
margin-bottom: 0;
widows: 1;
orphans: 1;
text-indent: 1.2em;
}
|
|
|
|
|
|
#6 | |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,502
Karma: 21099999
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
widows: 1 !important; orphans: 1 !important; Of course, try the Font-size change test Karellen mentioned first...that would rule out widows/orphans. |
|
|
|
|
|
|
#7 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
Widows and orphans rules are removed from all my ebooks during conversion, and my Kobo configuration file has widows: 1 and orphans: 1. I don't see how it could be a widows/orphans issue.
@Karellen, yes the break stays in the same place with font size changes. I don't know how to share the file without copyright issues? If I scramble the file I don't know how to direct you to the problem paragraph. @JSWolf I don't know what you mean by 'every class that has a center'. I suspect you don't mean text-align: center... |
|
|
|
|
|
#8 |
|
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,599
Karma: 22000001
Join Date: Jan 2008
Location: Spaniard in Germany
Device: Cybook Orizon, Kobo Aura
|
Too large a "chapter"? Try removing a few paragraphs from the beginning. Does the page break move a few paragraphs forward?
|
|
|
|
|
|
#9 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
Quote:
Except that the pagebreak didn't move forward, OR backward; as far as I can tell it's vanished completely. I split the chapter file into two html files, and that seems to have worked! THANK YOU. I had no idea chapter length could be an issue! |
|
|
|
|
|
|
#10 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,905
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
The default on a Kobo for windows and orphans is 2. Most ePub software has a default of 2. And even if not, it's a good idea to have it in CSS so it gets the value you want. |
|
|
|
|
|
|
#11 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,905
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
And you are wrong. The length of the chapter has nothing to do with pagebreaks. So put the chapter back as one. Have you used to code I posted? Last edited by JSWolf; 09-13-2026 at 09:22 AM. |
|
|
|
|
|
|
#12 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
|
|
|
|
|
|
#13 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,905
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#14 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 84,905
Karma: 153788249
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
And you are wrong. The length of the chapter has nothing to do with pagebreaks. So put the chapter back as one.
Have you used to code I posted? |
|
|
|
|
|
#15 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 282
Karma: 9400
Join Date: Aug 2010
Location: Helsinki
Device: Kobo Clara Colour
|
|
|
|
|
![]() |
| Tags |
| epub, pagebreak |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unwanted pagebreak | travger | Conversion | 3 | 05-04-2014 05:40 AM |
| h1 pagebreak without h2 | bookdragon | Sigil | 5 | 03-03-2014 06:11 AM |
| HELP from Pagebreak !! Smashword | Tara198 | Writers' Corner | 4 | 07-06-2013 06:22 PM |
| 0.6.3 pagebreak before h2 only every second time? | flowoeB | Calibre | 4 | 07-31-2009 01:47 AM |
| XPath Help and Pagebreak | emellaich | Calibre | 3 | 07-28-2009 02:17 PM |