Skip to content

Keep side-by-side floats on the same page#2838

Closed
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/side-by-side-float-page-break
Closed

Keep side-by-side floats on the same page#2838
Sanjays2402 wants to merge 1 commit into
Kozea:mainfrom
Sanjays2402:fix/side-by-side-float-page-break

Conversation

@Sanjays2402

Copy link
Copy Markdown

Fixes #2790.

An overflowing float was deferred whenever an earlier sibling float existed, even when both remained side by side at the top of an otherwise empty page. Keep that top-aligned float on the current page while preserving page breaks for floats pushed down by earlier content.

The regression test fails by creating two pages before the fix and passes with both floats on one page. The float layout tests pass (36 passed, 1 xfailed); the broader layout suite passes with the pre-existing Ghostscript/font-dependent cases excluded (900 passed, 12 xfailed).

An overflowing float was deferred whenever an earlier sibling float had already
been laid out, even when both floats remained side by side at the top of an
otherwise empty page. Keep such floats on the current page while preserving
page breaks for floats pushed down by earlier content.

Add regression coverage for two side-by-side floats taller than the page.

Fixes Kozea#2790
@liZe

liZe commented Jul 20, 2026

Copy link
Copy Markdown
Member

We don’t want to force all floats at the top of their parents to be displayed.

@liZe liZe closed this Jul 20, 2026
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

Successfully merging this pull request may close these issues.

Content "widowed" onto next page using CSS columns

2 participants