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
show math.equation: set align(...)
breaks alignment points
#3973
Comments
I'm not sure this is a bug.. 🤔 maybe WAI? Because the code below (added by #936) seems intentional to only use typst/crates/typst/src/math/row.rs Lines 226 to 240 in 0bb45b3
@laurmaedje and @SUPERCILEX (the PR author), thoughts? |
Yeah, that's how it's supposed to work. If OP's goal to align the whole equation in its outer context, does putting it in a box and aligning that work instead? |
This show-set rule is the intended way of setting the "main" alignment of block equations (see #2156, #2157 and on Discord), so I would argue that it's not intended. |
That will break the moment the equation has numbering. This is almost certainly not intended behavior, and if it is I would question why it is. |
I guess does anybody use the feature? We could get rid of it, but I vaguely recall some discussion that led to wanting to be able to change how internal equation alignment worked. For OP's purposes, using left/right instead should get the job done now that I'm rereading this. |
I agree that the current behaviour is unexpected. We should probably just get rid of it.
Do you happen to be able to still find that? |
Nope, so feel free to get rid of it. :) |
I think the main problem here is that alignment in math equations and text alignment are currently treated as two very separate things, so this behavior comes off as surprising. It seems perhaps ideal to remove this for the time being and maybe add some other option to |
Description
The alignment set with
show math.equation: set align(...)
overrides the left-right alternating behavior of alignment points:start
end
Reproduction URL
No response
Operating system
Web app
Typst version
The text was updated successfully, but these errors were encountered: