From e9ff2d6463bf26cb0bbafb747bf8a77800687e3f Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 2 Feb 2023 16:47:10 +0100 Subject: More robust automatic math spacing --- library/src/math/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'library/src/math/mod.rs') diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 4e60faca..656fc2e0 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -261,7 +261,7 @@ impl LayoutMath for Content { } if self.is::() { - ctx.push(MathFragment::Space); + ctx.push(MathFragment::Space(ctx.space_width.scaled(ctx))); return Ok(()); } @@ -288,8 +288,8 @@ impl LayoutMath for Content { return node.layout_math(ctx); } - let frame = ctx.layout_non_math(self)?; - ctx.push(FrameFragment::new(frame).with_spaced(true)); + let frame = ctx.layout_content(self)?; + ctx.push(FrameFragment::new(ctx, frame).with_spaced(true)); Ok(()) } -- cgit v1.2.3