mirror of
https://github.com/typst/typst
synced 2025-05-14 17:15:28 +08:00
Fix sizing of nested equations (#3664)
This commit is contained in:
parent
7c61ccac71
commit
c2ca3615d7
@ -176,6 +176,8 @@ impl ShowSet for Packed<EquationElem> {
|
|||||||
if self.block(styles) {
|
if self.block(styles) {
|
||||||
out.set(AlignElem::set_alignment(Alignment::CENTER));
|
out.set(AlignElem::set_alignment(Alignment::CENTER));
|
||||||
out.set(EquationElem::set_size(MathSize::Display));
|
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_weight(FontWeight::from_number(450)));
|
||||||
out.set(TextElem::set_font(FontList(vec![FontFamily::new(
|
out.set(TextElem::set_font(FontList(vec![FontFamily::new(
|
||||||
|
BIN
tests/ref/bugs/3658-math-size.png
Normal file
BIN
tests/ref/bugs/3658-math-size.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 531 B |
5
tests/typ/bugs/3658-math-size.typ
Normal file
5
tests/typ/bugs/3658-math-size.typ
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
// https://github.com/typst/typst/issues/3658
|
||||||
|
|
||||||
|
---
|
||||||
|
$ #rect[$1/2$] $
|
||||||
|
$#rect[$1/2$]$
|
Loading…
x
Reference in New Issue
Block a user