Conversation
|
There's still (at least) one problem this does not fix: a #set page(paper: "a8", numbering: "1")
#pagebreak(to: "even", weak: true)
SecondRenders (also since #2182): And it should render (as it does in 0.8.0): I have been trying to understand the layout/resolution code and I think it's because weak pagebreaks are removed before the empty pages are added to match parity. That removes the page with the However, this PR still solves the original issue. I now don't know if the correct path is to continue working in solving this new thing in this PR or open a new issue. |
PgBiel
left a comment
There was a problem hiding this comment.
I think it's fair to merge this PR first and then make a separate issue/PR pair for the other problem.
|
In principle (from a brief analysis including the surrounding code), LGTM. cc @laurmaedje for further opinions |
|
I will take a closer look later, but this does make sense. |
|
Thanks! |


After #2182 the parity check was inverted because the empty frame was added to the end of the old styles (I think). This introduced the problem where the page counter was being checked with the current number of pages and not taking into account the pages that were about to be appended. This problem was not noticeable when between pagebreaks the content didn't introduce more than one page. This PR fixes the parity check and adds a new entry to the existing test. Also, fixes #2473.
This is my first time fiddling with typst source code and although it's a small PR, please be careful when reviewing it. Sorry in advance if I broke anything 😓.