Copy link to clipboard
Copied
Copy link to clipboard
Copied
Yes, I have the same question. Miriam, did you ever figure this out?
Copy link to clipboard
Copied
The short answer is a qualified 'no.' In reflowable EPUB, nearly everything depends on how the reader chooses to interpret and present the content. One reader might honor no-break settings, another might ignore them, and yet another might automatically try to keep headings with following text. There's usually little control over these details, and of course, less control over what EPUB reader a user might choose.
There are some methods that can help keep headings with text. One is to force a break before the heading, so that it will start a new page in most readers and thus inherently stay with following text.
Another is to use CSS styles to hard-set break statements. ID is pretty good about following Keep options and setting these without help, but adding them as explicit statements can help... again, if the reader honors them. A simple version would be to add —
h1.HEADING-1 {
page-break-before:auto;
page-break-after:avoid;
}
— to all headings and subheadings, backed with —
p.BODY-lede {
page-break-before:avoid;
page-break-after:auto;
}
— in a specific lede paragraph style intended to follow headings. But that's about the limit unless you put the heading and paragraph in an anchored text frame, and even that could be split over virtual pages.
Copy link to clipboard
Copied
Ok, that's what I thought. I just wanted to be sure. I wish it were as simple as adding a nonbreaking space after the subheading. I don't want a page break before every subheading. I just want Heading 3 to stay with the first line of the paragraph if it falls at the end of an ebook page.
Copy link to clipboard
Copied
It's just one of those things EPUB (mostly the readers) are weak on, and variable. The problem is, at heart, that EPUB=HTML web pages, and web pages don't have pagination. So it's up to the reader to "paginate" the doc, and the rules it uses are not really standardized. Some readers, as noted, have better rules, or follow no-break code, but others don't.
Copy link to clipboard
Copied
Use the keep options. in paragraph style. keepwith next for the headline paragraph styles.
Copy link to clipboard
Copied
Here's a screenshot of my Keep Options. Unless I am missing something, they aren't exporting to the epub file. When I view the ebook on Kindle Previewer, I still see a subheading or two at the end of a page. I'll attach a screenshot of that, too. Thank you both for responding!
Copy link to clipboard
Copied
Keep in mind that Kindle is not EPUB. While EPUB is the correct export format, Kindle converts it to a wholly different format and has many of its own rules that differ from EPUB readers. (The good part is that Kindle is highly standardized, so a good preview on KP means nearly all Kindle users will have an equally good presentation.) But you can't use KP as a general EPUB preview, not if you plan to release the book in EPUB for the other platforms.
Keep options usually do export the correct break/no-break code, but it can help to reinforce/ensure it with those CSS statements. You can also add explicit no-break statements to individual styles (something ID does not export correctly), but those won't necessarily keep paragraphs together.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now