Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Margin notes can appear early if page is stretched #14

Open
shicks opened this issue Feb 19, 2017 · 2 comments
Open

Margin notes can appear early if page is stretched #14

shicks opened this issue Feb 19, 2017 · 2 comments

Comments

@shicks
Copy link
Owner

shicks commented Feb 19, 2017

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.

@highplainsscripter
Copy link

👍 for addressing this issue.

@RalfJung
Copy link

RalfJung commented Jun 3, 2020

Could this explain why in my situation, the fix to #15 didn't really fix the problem? The sidenotes are rendered now, but on the wrong page. I also see others sitting several lines above the point in the text where they are referenced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants