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

use fraction units for typst column layouts #11658

Merged
merged 2 commits into from
Dec 11, 2024
Merged

use fraction units for typst column layouts #11658

merged 2 commits into from
Dec 11, 2024

Conversation

gordonwoodhull
Copy link
Contributor

@gordonwoodhull gordonwoodhull commented Dec 11, 2024

fixes #11578
replaces #11579

Use fraction units for any defaulted or unitless column layout widths, because percent unit seems to use the percentage of the page.

I know we usually try to keep format-specific stuff out of the early filters, but the truth is that width units are not format-independent: we just assume that any widths specified are valid.

And we need to use fr and not % units for defaulted or unitless column widths for Typst.

::: {layout="[1, 2, 2, 1, 3, 1, 1]"}
image
::: {layout-ncol=5}
image
::: {layout-ncol=5}

and third image has {width=100pt}
image

cc @mcanouil

@cscheid
Copy link
Collaborator

cscheid commented Dec 11, 2024

I know we usually try to keep format-specific stuff out of the early filters

That's true and your reasoning would be good enough to justify the change. But layout filters are called in post-quarto exactly because of what you're saying: layouts cannot really be format-agnostic.

@cscheid
Copy link
Collaborator

cscheid commented Dec 11, 2024

Looks great! I think all we're missing here is a changelog entry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Charts in Callout Boxes Overflow Their Boundaries in Typst Format
2 participants