Skip to content

Footnote in auto placed figure causing figure to placed on top of text #4780

Closed

Description

@winstonewert

Description

The following code:

#set text(font:"Roboto",size:12pt,weight:"regular",style:"normal",);

#lorem(50);

#lorem(60);

#lorem(60);

#lorem(60)

#lorem(40)

#lorem(50)

#lorem(30)

#figure(placement: auto,
[#lorem(40)#footnote(lorem(50))],
)
#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

#lorem(50)

Place the figure on top of the text on the next page.

shot

My hypothesis would be that it doesn't properly take the footnote into account during the placement process and and then it give shifted up and into the text.

Reproduction URL

No response

Operating system

Web app

Typst version

  • I am using the latest version of Typst

Activity

  1. added
    bug
    on Aug 18, 2024
  2. added
    layout
    on Aug 21, 2024
  3. rriemann commented on Sep 20, 2024

    @rriemann

    Works for me with version 0.11.1.

    Screenshot

    image

  4. winstonewert commented on Sep 23, 2024

    @winstonewert
    Author

    It still fails for me on the webapp. It looks to me like your document didn't pick up the Roboto font I was using and thus didn't get laid out the same way. In particular, I think your text is a bit smaller and thus the figure doesn't get forced on the second page which causes the problem.

    Here's a typst source that doesn't rely on a special font:

    #set text(size:12.5pt,weight:"regular",style:"normal",);
    
    #lorem(50);
    
    #lorem(60);
    
    #lorem(60);
    
    #lorem(60)
    
    #lorem(40)
    
    #lorem(50)
    
    #lorem(30)
    
    #figure(placement: auto,
    [#lorem(40)#footnote(lorem(50))],
    )
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
    #lorem(50)
    
  5. rriemann commented on Sep 23, 2024

    @rriemann

    @winstonewert , you are right. I used the wrong font. Your example above reproduces the bug.

    Proof:

    image

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