diff options
| -rw-r--r-- | crates/typst/src/math/equation.rs | 2 | ||||
| -rw-r--r-- | tests/ref/bugs/3658-math-size.png | bin | 0 -> 531 bytes | |||
| -rw-r--r-- | tests/typ/bugs/3658-math-size.typ | 5 |
3 files changed, 7 insertions, 0 deletions
diff --git a/crates/typst/src/math/equation.rs b/crates/typst/src/math/equation.rs index eb8f8f66..c5cb9132 100644 --- a/crates/typst/src/math/equation.rs +++ b/crates/typst/src/math/equation.rs @@ -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( diff --git a/tests/ref/bugs/3658-math-size.png b/tests/ref/bugs/3658-math-size.png Binary files differnew file mode 100644 index 00000000..94c8d388 --- /dev/null +++ b/tests/ref/bugs/3658-math-size.png diff --git a/tests/typ/bugs/3658-math-size.typ b/tests/typ/bugs/3658-math-size.typ new file mode 100644 index 00000000..63c020b2 --- /dev/null +++ b/tests/typ/bugs/3658-math-size.typ @@ -0,0 +1,5 @@ +// https://github.com/typst/typst/issues/3658 + +--- +$ #rect[$1/2$] $ +$#rect[$1/2$]$ |
