Hello, I want to place figures automatically with #set figure(placement: auto). This works alright, however I want to avoid placing figures above chapter titles of heading level 1.
I tried with:
#show heading.where(level: 1): it => {
pagebreak(weak: true)
it
}
However, it still inserts figures between the page break and the chapter title.
How can I place chapter titles of level 1 always at the top of pages without interference from floating figures?
While setting figure(placement: bottom) for all problematic figures is an option, it is really not desirable.
Hello. I don’t think it’s possible, since the figures float to the top or the bottom. You can try to contain them in a certain area of content with place.flush, but it doesn’t always work: `place.flush` doesn't work for some use cases · Issue #6821 · typst/typst · GitHub. In my case, for figures that don’t look great or still spill to the next section, the only reliable option is to just remove floating and position wherever is best manually.
Ok, thanks for the info about place.flush. For now I will manually adapt the placement of the problematic figures. In the future, we might get a more satisfying solution.