-
-
Notifications
You must be signed in to change notification settings - Fork 793
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
typst
does not pass the correct figure dimensions to set page()
#4176
Comments
This is because there are two competing mechanisms here: So, you have the page dimensions wanting to scale based on content, but the content (the grid) wants to scale based on the page dimensions (to occupy all of the remaining available space). There is a conflict here, so what happens is that You need to use |
This is not a reasonable behavior.
If the content (the grid) fails in getting the available space from the page dimensions, it should infer that from the content dimensions instead of simply assuming that the content size is 0pt. |
It is reasonable insofar as that's how
We could consider this a feature request, but in principle this feels a bit hacky to me, as in I think you can do this today already by checking the page dimensions through |
Yeah, it might be a time-consuming task, which may decrease the compilation time. The main problem is that, for a NxN grid, the the algorithm that tries to arrange the content in a dimensionless page scales with time cost of If it is in fact time consuming, whenever |
I'll close this issue as not really actionable (unless I'm missing something), but feel free to post a more concrete one. |
Prompting a warning about this issue is really actionable, actually. Moreover, one can consider falling back to |
Description
Consider the following MWE:
This produces
It is clear that
#set page()
is not getting the correct ratio (height x width) of the figure.Reproduction URL
No response
Operating system
Linux
Typst version
The text was updated successfully, but these errors were encountered: