Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils.fit-to-height no longer working on typst 0.12 #109

Open
PhotonQuantum opened this issue Nov 1, 2024 · 0 comments
Open

utils.fit-to-height no longer working on typst 0.12 #109

PhotonQuantum opened this issue Nov 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@PhotonQuantum
Copy link

PhotonQuantum commented Nov 1, 2024

utils.fit-to-height produces a blank area with no content on typst 0.12. The layout is calculated correctly, though.

I bisected Typst, and it seems that it's this PR typst/typst#4212 that introduced the bug.

In the PR description it says,

The exact semantics of how tags will stick to elements are also still somewhat in-flux and will likely a change a bit in later refactor phases. These rules affect the results of .page() and .position() calls on locations. With this PR, things should mostly be the same as on main, though there will be edge cases where things changed a bit. They might change again with further refactoring.

There are other libraries affected by this change (typst/typst#4302).

POC

#import "@preview/touying:0.5.3": *
#import themes.simple: *

#show: simple-theme.with(aspect-ratio: "16-9")

= Title

== First Slide

#utils.fit-to-height(0.5fr)[
  #lorem(50)
]

#lorem(50)

Expected

Screenshot 2024-11-01 at 4 06 07 PM

Got

Screenshot 2024-11-01 at 4 08 29 PM
@OrangeX4 OrangeX4 added the bug Something isn't working label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants