Skip to content

Breakable block skips region due to placed floating element #3907

Closed

Description

@SUPERCILEX

Description

#set page(columns: 2, width: 40em, height: 40em)

#lorem(50)

#figure(placement: auto, caption: "test", v(10em))
#figure(placement: auto, caption: "test", v(10em))

+ #lorem(30)
+ #lorem(20)
+ #lorem(20)
+ #lorem(10)

Take a look at https://discord.com/channels/1054443721975922748/1056574658771681361/1227424678969348117. The first page is broken because it forgets that there's space leftover and instead spills to the second page.

Reproduction URL

No response

Operating system

No response

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Apr 10, 2024
  2. added
    layout
    on Apr 10, 2024
  3. PgBiel commented on Jun 17, 2024

    @PgBiel
    Contributor

    I've reproduced this with a placement: auto figure before a long list containing a figure or any vertically long content. The placement: auto figure introduces the page and oddly forces the list to go to the next page, as if the list were unbreakable.

  4. laurmaedje commented on Jul 5, 2024

    @laurmaedje
    Member

    Most likely, the list is layouted without knowledge of the second figure and then it's second frame is too big to fit, so it's moved to the next region.

  5. changed the title [-]Broken auto figure placement with lists and multiple figures[/-] [+]Breakable block skips region due to placed floating element[/+] on Jul 5, 2024
  6. laurmaedje commented on Jul 5, 2024

    @laurmaedje
    Member

    Minimized:

    #set page(width: 120pt, height: 120pt, margin: 10pt)
    #set text(10pt)
    
    #v(60pt)
    #place(top, float: true, rect())
    #list(.."ABCDEFGH".clusters())
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