Skip to content

Margin notes can appear early if page is stretched #14

@shicks

Description

@shicks

If a margin note appears in a paragraph but the page builder decides to instead stretch the glue and ultimately breaks before the paragraph, the margin builder can get confused and try to set the note on the previous page. This can be addressed by (a) clearing the margin once we see a note whose callout position is bigger than the total height of the page, and then (b) re-adding it to the margin list with a non-zero position (as opposed to overflowed margins that get re-added at zero).

A secondary improvement would be to detect the presence of stretch and then scale all the callout positions accordingly.

It's possible we already handle this and I just forgot about it, but it doesn't look like it from a quick glance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions