You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiline inline math renders outside its list item #9028
When a multiline math expression is placed inside a numbered list item (or a normal list), all lines except the last line of the expression is rendered above the list item marker instead of being aligned with the list item's content.
1. First Item
2. $a + b \ b + c \ d + e$
3. More items
The first line of the mathematical expression should appear after the 2. marker, and all other lines should appear directly below it, indented as part of the same list item.
Tested with Typst version 0.15.1 in the Typst playground and on linux with VSCode Typst extension.
changed the title [-]Multiline inline math renders outside its numbered list item[/-][+]Multiline inline math renders outside its list item[/+]on Oct 30, 2026
In Typst 0.15.1, when an inline equation has multiple lines, then it has no baseline (so in default, it uses bottom). I think, this can be improved (like block equations). See the following example:
+ $vec(1,1,1) \ vec(1,1,1) a b$
+ $vec(1,1,1) a b$
You can wrap the block equations in box to get the desired behavior:
Given how we already lift horizontal spacing in equations into the paragraph layout (and will do more of that in #6358), I think it might make sense to either forbid linebreaks or also turn them into paragraph level linebreaks. From these two options, I'm leaning towards outright forbidding them (and alignment points too).
Are there any real use cases for multi-line inline equations that are not better served by a (potentially boxed) block equation? The name inline already kind of says that it shouldn't be multiple lines.
Are there any real use cases for multi-line inline equations that are not better served by a (potentially boxed) block equation? The name inline already kind of says that it shouldn't be multiple lines.
I am miss using it for a fast way to have left aligned small math formulas. But as i said, this might be the not intended way and or other ways available.
Activity
[-]Multiline inline math renders outside its numbered list item[/-][+]Multiline inline math renders outside its list item[/+]Enivex commentedon Oct 30, 2026
You really aren't supposed to use multiple lines in inline equations
tianyi-smile commentedon Nov 5, 2026
In Typst 0.15.1, when an inline equation has multiple lines, then it has no baseline (so in default, it uses
bottom). I think, this can be improved (like block equations). See the following example:You can wrap the block equations in
boxto get the desired behavior:laurmaedje commentedon Nov 5, 2026
Given how we already lift horizontal spacing in equations into the paragraph layout (and will do more of that in #6358), I think it might make sense to either forbid linebreaks or also turn them into paragraph level linebreaks. From these two options, I'm leaning towards outright forbidding them (and alignment points too).
Are there any real use cases for multi-line inline equations that are not better served by a (potentially boxed) block equation? The name inline already kind of says that it shouldn't be multiple lines.
IceflowRE commentedon Nov 5, 2026
I am miss using it for a fast way to have left aligned small math formulas. But as i said, this might be the not intended way and or other ways available.
laurmaedje commentedon Nov 6, 2026
I opened #9046