Skip to content

Column float overflows the page when it does not fit below a parent float #9089

Open

Description

@krissen

Description

On a two-column page, a column-scoped float that does not fit below a parent-scoped float is placed in the other column of the same page, where it does not fit either, and it runs past the bottom margin. I expected it to move to the next page.

#set page(height: 200pt, width: 200pt, margin: 10pt, columns: 2)
#set columns(gutter: 10pt)
#set text(size: 6pt)
#lorem(150)
#place(auto, scope: "parent", float: true, rect(width: 100%, height: 100pt, fill: aqua)[parent])
#lorem(30)
#place(auto, scope: "column", float: true, [#rect(width: 100%, height: 110pt, fill: orange)[column]<col>])
#lorem(40)

The parent float moves to the top of page 2. The column float is placed in the right column of page 2, at y = 119pt (from query(<col>)). It is 110pt tall, so it ends at 229pt, while the page is 200pt tall with a 10pt margin. A new page would have 180pt of room for it.

This looks related to #6948, which mixes column and parent floats in the same way. That issue was closed as a duplicate, but I could not find the issue it duplicates, and its example still overlaps on main (c56dfa6). The comment there about remaining in compose.rs ignoring column float sizes may describe the same cause.

Reproduction URL

No response

Operating system

macOS

Typst version

  • I am using the latest version of Typst

Tested with 0.15.1 and with main at c56dfa6.

Activity

  1. laurmaedje commented on Nov 18, 2026

    @laurmaedje
    Member

    #6948 was closed as a duplicate of #6297.

  2. krissen commented on Nov 18, 2026

    @krissen
    Author

    A correction to the description: #6948 was closed as a duplicate of #6297, which is still open. #6297 shows a parent-scoped figure overlapping a column-scoped figure on the same page. This issue mixes the two scopes in the same way, but here the column float runs past the bottom margin instead of overlapping, so the cause may well be the same.

  3. added
    bug
    layout
    on Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglayout

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions