Open St0wy opened 2 months ago
This is actually expected behavior at the moment, hydra
has no knowledge of the actual first element, as Typst doesn't expose a mechanism to inspect pages like that yet. Currently, hydra
does some elaborate measuring to detect pages that start with headings.
It's very similar to #8, where the underlying issue is the same.
I wonder, though, in this particular case, is the floating behavior desired? With typst#4141 one could prevent both the incorrect heading in hydra and the image floating past its encompassing section heading. If not, hydra
would need to do the same kind of detection it would need to do in #8 for placed elements too.
Yeah I thought it might be a problem with what hydra can know about the document.
As for the figure with placement auto, I don't think the placement is really wrong, having it under the title would look wierd maybe ? Usually figures are considered "outside" of the text when floating like that, but I do agree that it would be nice to have a way to flush figures before the end of the section, but not sure about the begining.
Feel free to close this issue if you think that it's too redundant with #16 :)
I'll keep this open, because hydra doesn't consider any floating elements yet, while it arguably should.
I'll just have to see how much of that can be done reasonably.
Without placement auto, hydra correctly does not display Heading 1 in the header :![image](https://github.com/tingerrr/hydra/assets/35960548/dd6039fb-2e45-47b2-b21b-0343a2c4a9ed)
But when using placement auto, the image is placed at the top and hydra interprets this as being part of section 1 :![image](https://github.com/tingerrr/hydra/assets/35960548/deaad390-a5a7-442f-b320-1c406491c53c)
Maybe it's related to #16.