Fix sizing of nested equations (#3664)

This commit is contained in:
Laurenz 2024-03-14 09:44:03 +01:00 committed by GitHub
parent 7c61ccac71
commit c2ca3615d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 0 deletions

View File

@ -176,6 +176,8 @@ impl ShowSet for Packed<EquationElem> {
if self.block(styles) {
out.set(AlignElem::set_alignment(Alignment::CENTER));
out.set(EquationElem::set_size(MathSize::Display));
} else {
out.set(EquationElem::set_size(MathSize::Text));
}
out.set(TextElem::set_weight(FontWeight::from_number(450)));
out.set(TextElem::set_font(FontList(vec![FontFamily::new(

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

View File

@ -0,0 +1,5 @@
// https://github.com/typst/typst/issues/3658
---
$ #rect[$1/2$] $
$#rect[$1/2$]$