Skip to content

Overlapping float figures with multi-columns pages #6948

Closed as duplicate

Description

@beatussum

Description

Float figures seem to have a strange behavior when the scope "column" and "parent" are mixed together: the two figures are overlapping whereas the first one should appear on the next page.

#set page(columns: 2)

#figure(
  rect(width: 100%, height: 19.55cm),
  caption: [column],
  placement: auto,
)

#figure(
  rect(width: 100%, height: 18cm),
  caption: [parent],
  placement: auto,
  scope: "parent",
)

Compiled demo

Reproduction URL

https://typst.app/project/r2mrxuB95s217oqruQUcLr

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Sep 22, 2025
  2. Andrew15-5 commented on Sep 22, 2025

    @Andrew15-5
    Contributor

    Float figures seem to have a strange behavior when the scope "column" and "parent" are mixed together

    Not always. As mentioned in https://forum.typst.app/t/float-figure-behavior-with-two-columns/6101/2?u=andrew, adding some text (just enough to overlap with parent figure) can help:

    #set page(columns: 2)
    #set figure(placement: auto)
    #lorem(70)
    #figure(rect(width: 100%, height: 18cm), caption: [column])
    #figure(rect(width: 100%, height: 18cm), caption: [parent], scope: "parent")
    Image
  3. beatussum commented on Sep 22, 2025

    @beatussum
    Author

    I suppose the value of remaining is wrong and ignores column figure sizes.

    let remaining: Abs = regions
    .iter()
    .map(|size| size.y)
    .take(self.config.columns.count - self.column)
    .sum();
    remaining / self.config.columns.count as f64

  4. added a commit that references this issue on Sep 23, 2025
  5. added
    layout
    on Oct 16, 2025
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