Skip to content

Basic Floating #137

Closed
Closed

Description

@Andonome

Right now, an image at the end of a grid column enters the next column. Would it be possible to acheive basic floating with a #float command which moves the target image (or anything else) to the top of the next grid, but continue placing the text in the first column?

It would also be good to have a command which lays the object outside of any current grids, so that a wide image could 'float' to the top or bottom of the next page.

Example of issue:

image

Activity

  1. astrale-sharp commented on Apr 4, 2023

    @astrale-sharp
    Contributor

    Is this related to text being able to float around an image as well (wrapping) ?

  2. changed the title [-][Feature Request] Basic Floating[/-] [+]Basic Floating[/+] on Apr 5, 2023
  3. added
    feature request
    layout
    visualize
    on Apr 5, 2023
  4. giannissc commented on Apr 5, 2023

    @giannissc
    Contributor

    I have a more complete proposal for floating on #553

  5. Enivex commented on Jul 25, 2023

    @Enivex
    Collaborator

    This has recently been implemented, so I'll close this issue.

  6. awillenbuecher-xq-tec commented on Jul 26, 2023

    @awillenbuecher-xq-tec

    This has recently been implemented, so I'll close this issue.

    Could you please give us a link, or a hint how to get floating figures now?

  7. Enivex commented on Jul 26, 2023

    @Enivex
    Collaborator

    This has recently been implemented, so I'll close this issue.

    Could you please give us a link, or a hint how to get floating figures now?

    To be clear, it's on main, so it should be in 0.7. You can try it right now if you compile the cli

  8. awillenbuecher-xq-tec commented on Jul 26, 2023

    @awillenbuecher-xq-tec

    To be clear, it's on main, so it should be in 0.7. You can try it right now if you compile the cli

    I did (typst 0.6.0 (f197a447)), but I still don't know how to use this feature, or even the name of the function. All I can find is the #float function, but that's for converting values to floating-point.

  9. Enivex commented on Jul 26, 2023

    @Enivex
    Collaborator

    See this commit 78f96f8

    You can look at the tests to see how it's used.

    Obviously there'll be actual documentation once 0.7 is released

  10. awillenbuecher-xq-tec commented on Jul 26, 2023

    @awillenbuecher-xq-tec

    Thank you!
    As an example for anyone else looking for this feature:

    #figure(
      placement: top,  // must be `auto`, `top`, or `bottom`
      caption: [A Floating Figure],
      image("figure.svg", width: 80%),
    )
    
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

    feature requestlayoutvisualize

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions