Quote:
Originally Posted by RonOnThePond
Here is a dropbox link to my scrambled file.
https://www.dropbox.com/s/6up9vgjbj8...bled.epub?dl=0
Having seen the image provided by Quoth, I realized that "Preferences" in the editor are not the same as in the main Calibre app. I've been living in the editor for so long that I forgot there was anything else. So I was able to get ScrambleEbook at last!
To recap, my problem relates to page-break functionality. I realize that "avoid" is no guarantee, but none of the settings are working reliably. My situation is practically identical to what Scruffs posted a few years ago, but unfortunately the fix did not apply to me. But I am guessing the broader concept of the fix might. I just don't know how to approach it. I can follow instructions well, and I can muck around in html and css to eventually get the job done (usually). I learn on a need-to-know basis, and it works pretty well for me. But right now, with this page-break-inside/after issue, I am stumped.
Any help would be appreciated greatly, and with a solution, my wife will be able to take me off of suicide watch. … Ron
|
The problem why it doesn't work right is your line under headings. If you use border-bottom it appears to ignore the break-after. Either get rid of the border-bottoms, or force a break before, or change the first paragraph as shown below.
E.g. the style for your H2:
Code:
.block_21 {
display: block;
font-size: 1em;
font-weight: bold;
line-height: 1.2;
break-after: avoid;
text-align: left;
text-indent: 0;
text-transform: uppercase;
margin: 15pt 0 6pt;
padding: 0 0 1pt;
border-bottom: #4F81BD solid 1pt;
}
In red is making the break-after: avoid ignore. Two solutions. Either force a break before your H2 heading that has the line underneath (similiar how you do H1):
Code:
.block_21 {
display: block;
font-size: 1em;
font-weight: bold;
line-height: 1.2;
break-before: always;
break-after: avoid;
text-align: left;
text-indent: 0;
text-transform: uppercase;
margin: 15pt 0 6pt;
padding: 0 0 1pt;
border-bottom: #4F81BD solid 1pt;
}
Or, you could add a "break-before: avoid;" to the first paragraph after a heading. This would also give you the option to remove the indent if you wish. I personally like the first paragraph not indented. For example like this:
Code:
.block_19 {
display: block;
text-align: justify;
text-indent: 36pt;
line-height: 1em;
margin: 0;
padding: 0;
}
.block_19_first {
display: block;
text-align: justify;
test-indent: 36pt; //optional change to 0 for no indent
line-height: 1em;
margin: 0;
padding: 0;
break-before: avoid;
}
Should work just fine.