Skip to content

Unbreakable block becomes invalid when moved into differently sized region #3866

Closed

Description

@jkunimune

Description

I have a document with two columns of text and a figure that is over half the height of the page. When I compile my document, the figure is where I expect it, but the following text isn't pushed down far enough, and overlaps both the figure and its caption. I would expect it to position the text below the caption; there's even enough space to fit a full paragraph down there if it does.

This doesn't happen every time I have a figure this tall. It seems the paragraphs need to line up just right for it, but I haven't able to find a way to predict when it will or won't happen.

Minimum working example:

Details

#text(weight: 700, 1.75em, lorem(17))
#pad(x: 2em, {
  v(1.1em)
  heading(outlined: false, numbering: none, text(0.85em)[Abstract])
  lorem(150)
  v(1.1em)
})

#show: columns.with(2, gutter: 0.5in)

= Introduction

#lorem(50)

#figure(
  rect(width: 2.3in, height: 1.9in),
  caption: lorem(10),
)

#lorem(50)

#figure(
  rect(width: 2.5in, height: 7in),
  caption: lorem(10),
)

#lorem(30)

#lorem(30)

#lorem(30)

#lorem(30)

The problem is on page 2:
imagen

Reproduction URL

https://typst.app/project/rr9vwQjcgU17NGm79GAU5O

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Apr 4, 2024
  2. added
    layout
    on Apr 13, 2024
  3. laurmaedje commented on Jul 5, 2024

    @laurmaedje
    Member

    Minimized:

    #v(10cm)
    #show: columns.with(2)
    #lorem(250)
    #block(rect(width: 100%, height: 20cm), breakable: false)
    #lorem(30)

    The problem is that the unbreakable block overflows when layouted with the base size of the first region (less height), is then migrated into the second region, but there we do have more base space, so we need to relayout.

  4. changed the title [-]Tall figures in columns overlap with text[/-] [+]Unbreakable block becomes invalid when moved into differently sized region[/+] on Jul 5, 2024
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