sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.67k stars 99 forks source link

fix(math): Avoid page breaks before display math equations #2162

Closed Omikhleia closed 1 week ago

Omikhleia commented 2 weeks ago

See #2160. This is a conservative workaround. Introducing the predisplay/postdisplay penalties is the right thing to do, but a more general solution to the full issue requires a more subtle handling of in-paragraph display math equations, which is not considered here.

alerque commented 2 weeks ago

v0.15.6 is a bit delayed, I'm chasing an unexpected panic in some builds and some build concerns. At first blush this seems to make sense to me but I don't have time to dig into alternatives. If you think this should go out in the current batch of math fixes and features please feel free to target the milestone and I'll review before releasing.

Omikhleia commented 2 weeks ago

If you think this should go out in the current batch of math fixes and features please feel free to target the milestone and I'll review before releasing.

Yes, it's still better than nothing here -- so adding the 0.15.6 milestone if it's still doable. I commented the original issue for the "eventual" right way to fix this properly at some point, but I might never reach that point any time soon, while at least here we can have something fairly decent working with the current implementation, without taking too much risks. More generally, I'm nearly done with what I wanted in the "first" batch of mathematical "fixes & improvements":

So I'm still adding stuff to it, but feel safe to "cut the release" at your convenience :)