How to increase spaces between inline math and spaces between them?


I wish to increase the space around the x and 1 of the inlline math. I’ve tried box but that effects the baseline shift. I’ve tried change the par.leading but that affects the whole paragraph. How do I do?

#lorem(20)
$g(x) = 1/x/x$ #lorem(20)
2 Likes

Try this:

#show math.equation.where(block: false): set text(
  top-edge: "bounds",
  bottom-edge: "bounds",
)

(There are other possible values than “bounds” for top-edge and bottom-edge that might work better for you, see the documentation.)

Pure curiosity only, it seems like baseline and inset match 1-1 so that you would preserve the baseline correctly if you just use the same value?

#let spacing = 0.4em
#lorem(20) #box(inset: (y: spacing), baseline: spacing)[$g(x) = 1/x/x$] #lorem(20)

For markup mode, use typ and not typc.

Both @bluss and @sijo 's solutions work very well. However, @bluss 's solution seems to have more flexibility on controling just the math container, so I mark as solution. Thank you.