-
Notifications
You must be signed in to change notification settings - Fork 38
Keep rule #8
Comments
Yeah, I could certainly see the use for this. Before I figure out how to implement this, would any of these achieve the effect better or worse?
|
I'm not sure those would really work for this. I'm interested in parity with InDesign's keep options, though that seems like it would be pretty complicated to implement. Just being able to set rules for keeping sibling elements together would go a long way, I think. It can be awkward for a heading to start at the end of a page, and I'm looking for a way to prevent that without inserting a full page break before each of the titles. |
Being able to select sibling wildcard (*) elements would be useful, too. |
Hmm, fair. I guess I'm trying to figure out why it has to depend on both elements. Are there situations where you have a heading style, and do want there to be a page break after it? Like [h2 + p] should stay together, but [h2 + figure] should not? (that seems unlikely but i am open to being convinced). I'm considering whether it's worthwhile to mirror CSS proposal docs, ie https://developer.mozilla.org/en-US/docs/Web/CSS/break-after |
I think as long as PageBreak rules override the Keep rules, there is no need to be able to specify specific elements. For example, if there is a Keep rule created for |
Closing to track in regionize repo |
It would be really awesome to have a keep rule that takes an array of selectors and tries to keep them together. For example: given
[h1, p]
if a break would normally occur afterh1
, bindery should try to avoid that break if the following element isp
, and instead put the break before theh1
element.The text was updated successfully, but these errors were encountered: