diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,3 +1,7 @@
+texmath (0.13.2.2)
+
+  * Typst writer: fix spacing commands (#295).
+
 texmath (0.13.2.1)
 
   * Speed up test suite by running tests in parallel.
diff --git a/src/Text/TeXMath/Writers/Typst.hs b/src/Text/TeXMath/Writers/Typst.hs
--- a/src/Text/TeXMath/Writers/Typst.hs
+++ b/src/Text/TeXMath/Writers/Typst.hs
@@ -30,6 +30,7 @@
 import Data.Text (Text)
 import Data.Char (isDigit, isAlpha, isAscii)
 import Data.Maybe (fromMaybe)
+import Numeric (showFFloat)
 
 -- import Debug.Trace
 -- tr' x = trace (show x) x
@@ -198,9 +199,10 @@
     0 -> "zws"
     3 -> "thin"
     4 -> "med"
-    6 -> "thick"
+    5 -> "thick"
     18 -> "quad"
-    n -> "#h(" <> tshow (n `div` 18) <> "em)"
+    _ -> "#h(" <> T.pack (removePointZero $ showFFloat (Just 3)
+                          (fromRational width :: Double) $ "") <> "em)"
 writeExp (EText ttype s) =
   case ttype of
        TextNormal -> "upright" <> inParens (inQuotes s)
@@ -363,3 +365,10 @@
 isGrouped :: Exp -> Bool
 isGrouped (EGrouped _) = True
 isGrouped _ = False
+
+removePointZero :: String -> String
+removePointZero s =
+  let (as,bs) = break (=='.') s
+  in case bs of
+       '.':xs | all (=='0') xs -> as
+       _ -> s
diff --git a/test/writer/typst/05.test b/test/writer/typst/05.test
--- a/test/writer/typst/05.test
+++ b/test/writer/typst/05.test
@@ -28,4 +28,4 @@
 , EIdentifier "y"
 ]
 >>> typst
-integral_a^x #h(-1em) #h(-1em) #h(-1em) integral_a^s f (y) thin d y thin d s = integral_a^x f (y) (x - y) thin d y
+integral_a^x #h(-0.167em) #h(-0.167em) #h(-0.167em) integral_a^s f (y) thin d y thin d s = integral_a^x f (y) (x - y) thin d y
diff --git a/test/writer/typst/chain2.test b/test/writer/typst/chain2.test
--- a/test/writer/typst/chain2.test
+++ b/test/writer/typst/chain2.test
@@ -49,4 +49,4 @@
 , EIdentifier "x"
 ]
 >>> typst
-integral_0^1 f (x) #h(0em) ⅆ x = sum_(i = 0)^oo x_i = product_(i = 0)^oo x_i = product.co_(i = 0)^oo x_i = integral.cont_0^1 f (x) #h(0em) ⅆ x = integral.double_0^1 f (x) #h(0em) ⅆ x = integral.triple_0^1 f (x) #h(0em) ⅆ x
+integral_0^1 f (x) #h(0.111em) ⅆ x = sum_(i = 0)^oo x_i = product_(i = 0)^oo x_i = product.co_(i = 0)^oo x_i = integral.cont_0^1 f (x) #h(0.111em) ⅆ x = integral.double_0^1 f (x) #h(0.111em) ⅆ x = integral.triple_0^1 f (x) #h(0.111em) ⅆ x
diff --git a/test/writer/typst/doubleint1.test b/test/writer/typst/doubleint1.test
--- a/test/writer/typst/doubleint1.test
+++ b/test/writer/typst/doubleint1.test
@@ -7,4 +7,4 @@
 , EIdentifier "x"
 ]
 >>> typst
-integral.double_0^1 f (x) #h(0em) ⅆ x
+integral.double_0^1 f (x) #h(0.111em) ⅆ x
diff --git a/test/writer/typst/oint1.test b/test/writer/typst/oint1.test
--- a/test/writer/typst/oint1.test
+++ b/test/writer/typst/oint1.test
@@ -7,4 +7,4 @@
 , EIdentifier "x"
 ]
 >>> typst
-integral.cont_0^1 f (x) #h(0em) ⅆ x
+integral.cont_0^1 f (x) #h(0.111em) ⅆ x
diff --git a/test/writer/typst/sphere_volume.test b/test/writer/typst/sphere_volume.test
--- a/test/writer/typst/sphere_volume.test
+++ b/test/writer/typst/sphere_volume.test
@@ -126,8 +126,8 @@
     ]
 ]
 >>> typst
-S = { 0 lt.eq phi.alt lt.eq 2 pi\,med 0 lt.eq theta lt.eq pi\,med 0 lt.eq rho lt.eq R } upright(V o l u m e) & = integral.triple_S #h(-1em) rho^2 sin theta thin upright(d) rho thin upright(d) theta thin upright(d) phi.alt\
- & = integral_0^(2 pi) #h(-1em) upright(d) phi.alt thin integral_0^pi #h(-1em) sin theta thin upright(d) theta thin integral_0^R #h(-1em) rho^2 upright(d) rho\
+S = { 0 lt.eq phi.alt lt.eq 2 pi\,med 0 lt.eq theta lt.eq pi\,med 0 lt.eq rho lt.eq R } upright(V o l u m e) & = integral.triple_S #h(-0.167em) rho^2 sin theta thin upright(d) rho thin upright(d) theta thin upright(d) phi.alt\
+ & = integral_0^(2 pi) #h(-0.167em) upright(d) phi.alt thin integral_0^pi #h(-0.167em) sin theta thin upright(d) theta thin integral_0^R #h(-0.167em) rho^2 upright(d) rho\
  & = phi.alt #scale(x: 180%, y: 180%)[\|]_0^(2 pi) med (- cos theta) #scale(x: 180%, y: 180%)[\|]_0^pi med 1 / 3 rho^3 #scale(x: 180%, y: 180%)[\|]_0^R\
  & = 2 pi times 2 times 1 / 3 R^3\
  & = 4 / 3 pi R^3
diff --git a/test/writer/typst/tripleint2.test b/test/writer/typst/tripleint2.test
--- a/test/writer/typst/tripleint2.test
+++ b/test/writer/typst/tripleint2.test
@@ -7,4 +7,4 @@
 , EIdentifier "x"
 ]
 >>> typst
-integral.triple_0^1 f (x) #h(0em) ⅆ x
+integral.triple_0^1 f (x) #h(0.111em) ⅆ x
diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.13.2.1
+Version:             0.13.2.2
 Cabal-Version:       >= 1.10
 Build-type:          Simple
 Synopsis:            Conversion between math formats.
