I have a multiline equation that I want to embrace with a curly brace on the left (similar to cases, but as far as I understand using cases here would be an abuse and would not properly align the equations). On Typst 0.14 I did this with lr(\{#block($...$)), which worked fine and looked good (I took this from here). However, with Typst 0.15 there is an additional spurious newline.
I have an MWE at Typst.
How can I receive the same (or at least similar) output in Typst 0.15? I also tried using box instead of block or removing the block without success.
This is how it looked like with Typst 0.14, i.e., how I want it to look like:

1 Like
Block/Box baseline handling has changed and improved. It’s maybe related to that. With box we can still configure the baseline, and by experiment, this works:
$
("IBVP") thick lr(\{
#box(baseline: -0.8em, $
u_t + f(u)_x &= 0, quad x in (a, b)\
u(x, 0) & = u_0 (x)
$)
)
$
(And using cases still works, too, and cases supports alignment inside the cases.)
Hi! I think this is a bug. I suggest you report on GitHub.
Here’s a workaround for now:
#show math.equation: set box(
baseline: 50%, // see https://typst.app/docs/reference/layout/box/#parameters-baseline
stroke: green, // for debugging
)
$
"(IBVP)"
lr(\{#box($
u_t + f(u)_x &= 0"," quad x in (a, b),\
u(x, 0) &= u_0(x)$))
$
1 Like
Thanks to both of you! Yes, fiddling with baseline indeed works, but as you say @Y.D.X it feels a bit like a workaround and I feel like it should not be needed. I created In Typst 0.15 unexpected default `baseline` of `box` in multiline equation within `lr` · Issue #8516 · typst/typst · GitHub.
1 Like

