diff --git a/changelog b/changelog
--- a/changelog
+++ b/changelog
@@ -1,3 +1,14 @@
+texmath (0.12.8.10)
+
+  * TeX reader: allow `\lVert .. \vVert` to create an EDelimited (#238).
+
+  * Typst writer: improved handling of primes (#239).
+    Use `'` instead of e.g. `prime`. Don't put a space before primes.
+
+  * Typst writer: improve rendering of EDelimited (#238).
+
+  * Typst writer: use `mid()` for middle delimiters (#238).
+
 texmath (0.12.8.9)
 
   * Parse TeX `\mathbf` as both bold and upright (#236).
diff --git a/src/Text/TeXMath/Readers/TeX.hs b/src/Text/TeXMath/Readers/TeX.hs
--- a/src/Text/TeXMath/Readers/TeX.hs
+++ b/src/Text/TeXMath/Readers/TeX.hs
@@ -407,19 +407,17 @@
 
 delimitedImplicit :: TP Exp
 delimitedImplicit = try $ do
-  openc <- lexeme $ oneOf "()[]|"
-  closec <- case openc of
-                 '(' -> return ')'
-                 '[' -> return ']'
-                 '|' -> return '|'
-                 _   -> mzero
-  let closer = lexeme $ char closec
+  (opent, closer) <-
+           (("(", symbol ")") <$ symbol "(")
+       <|> (("[", symbol "]") <$ symbol "[")
+       <|> (("|", symbol "|") <$ symbol "|")
+       <|> (("\x2016", "\x2016" <$ ctrlseq "rVert") <$ ctrlseq "lVert")
   contents <- concat <$>
               many (try $ ((:[]) . Left  <$> middle)
                       <|> (map Right . unGrouped <$>
                              many1Exp (notFollowedBy closer *> expr)))
-  _ <- closer
-  return $ EDelimited (T.singleton openc) (T.singleton closec) contents
+  closet <- T.pack <$> closer
+  return $ EDelimited opent closet contents
 
 scaled :: Text -> TP Exp
 scaled cmd = do
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
@@ -37,10 +37,19 @@
 -- | Transforms an expression tree to equivalent Typst
 writeTypst :: DisplayType -> [Exp] -> Text
 writeTypst dt exprs =
-  T.unwords $ map writeExp $ everywhere (mkT $ S.handleDownup dt) exprs
+  writeExps $ everywhere (mkT $ S.handleDownup dt) exprs
 
 writeExps :: [Exp] -> Text
-writeExps = T.intercalate " " . map writeExp
+writeExps = go . map writeExp
+ where
+   go (a : b : es)
+    | T.take 1 b == "'" -- avoid space before a prime #239
+     = a <> go (b:es)
+   go (a : as)
+     = a <> if null as
+               then mempty
+               else " " <> go as
+   go [] = mempty
 
 inParens :: Text -> Text
 inParens s = "(" <> s <> ")"
@@ -101,6 +110,10 @@
 writeExp (ESymbol _t s)
   | T.all isAscii s = esc s  -- use '+' not 'plus'
   | s == "\x2212" = "-" -- use '-' not 'minus'
+  | s == "\8242" = "'" -- use ' for prime, see #239
+  | s == "\8243" = "''"
+  | s == "\8244" = "'''"
+  | s == "\8279" = "''''"
   | otherwise = fromMaybe (esc s) $ M.lookup s typstSymbolMap
 writeExp (EIdentifier s) =
   if T.length s == 1
@@ -247,14 +260,24 @@
 writeExp (EDelimited open close es) =
   if isDelim open && isDelim close
      then
-       if matchedPair open close &&  -- see #233
+       (if matchedPair open close &&  -- see #233
             not (any (\x -> x == Left open || x == Left close) es)
-          then open <> body <> close
-          else "lr" <> inParens (open <> body <> close)
+           then id
+           else ("lr" <>) . inParens)
+          (renderOpen open <> body <> renderClose close)
      else esc open <> body <> esc close
-  where fromDelimited (Left e)  = e
+  where fromDelimited (Left e)  = "mid(" <> renderSymbol e <> ")"
         fromDelimited (Right e) = writeExp e
-        isDelim c = c `elem` ["(",")","[","]","{","}","|","||"]
+        isDelim c = c `elem` ["(",")","[","]","{","}","|","||","\x2016"]
+        renderOpen e =
+          if T.all isAscii e
+             then e
+             else renderSymbol e <> " "
+        renderClose e =
+          if T.all isAscii e
+             then e
+             else " " <> renderSymbol e
+        renderSymbol e = fromMaybe (esc e) (M.lookup e typstSymbolMap)
         matchedPair "(" ")" = True
         matchedPair "[" "]" = True
         matchedPair "{" "}" = True
diff --git a/test/regression/238.test b/test/regression/238.test
new file mode 100644
--- /dev/null
+++ b/test/regression/238.test
@@ -0,0 +1,4 @@
+<<< tex
+\left\{ x \in \mathbb{R}^n \middle| \lVert x \rVert_2^2 = \sum_{i=1}^n x_i^2 = 1\right\}
+>>> typst
+{x in bb(R)^n mid(bar.v) lr(bar.v.double x bar.v.double)_2^2 = sum_(i = 1)^n x_i^2 = 1}
diff --git a/test/regression/239.test b/test/regression/239.test
new file mode 100644
--- /dev/null
+++ b/test/regression/239.test
@@ -0,0 +1,4 @@
+<<< tex
+f'_n
+>>> typst
+f'_n
diff --git a/test/writer/typst/07.test b/test/writer/typst/07.test
--- a/test/writer/typst/07.test
+++ b/test/writer/typst/07.test
@@ -20,4 +20,4 @@
 , EIdentifier "a"
 ]
 >>> typst
-u prime.double + p (x) u prime + q (x) u = f (x) , quad x > a
+u'' + p (x) u' + q (x) u = f (x) , quad x > a
diff --git a/test/writer/typst/primes1.test b/test/writer/typst/primes1.test
--- a/test/writer/typst/primes1.test
+++ b/test/writer/typst/primes1.test
@@ -37,4 +37,4 @@
 , ESuper (ESymbol Accent "'") (ESymbol Accent "'")
 ]
 >>> typst
-x^2 + 2^2 + x^prime + x^(') + x^("''") + x prime + x^(')^(') + x^(')^2 + x^(' + ') + x^(')^(') + x^('^(')) + '^(') + '^(')
+x^2 + 2^2 + x^(') + x^(') + x^("''") + x' + x^(')^(') + x^(')^2 + x^(' +') + x^(')^(') + x^('^(')) +'^(') +'^(')
diff --git a/test/writer/typst/primes2.test b/test/writer/typst/primes2.test
--- a/test/writer/typst/primes2.test
+++ b/test/writer/typst/primes2.test
@@ -27,4 +27,4 @@
 , ESuper (EIdentifier "H") (ESymbol Accent "\8279")
 ]
 >>> typst
-H^(\") H^(') H^(\*) H^(`) H^ª H^degree H^(²) H^(³) H^acute H^(¹) H^º H^quote.l.single H^quote.r.single H^quote.low.single H^quote.high.single H^quote.l.double H^quote.r.double H^quote.low.double H^quote.high.double H^prime H^prime.double H^prime.triple H^prime.rev H^prime.double.rev H^prime.triple.rev H^prime.quad
+H^(\") H^(') H^(\*) H^(`) H^ª H^degree H^(²) H^(³) H^acute H^(¹) H^º H^quote.l.single H^quote.r.single H^quote.low.single H^quote.high.single H^quote.l.double H^quote.r.double H^quote.low.double H^quote.high.double H^(') H^('') H^(''') H^prime.rev H^prime.double.rev H^prime.triple.rev H^('''')
diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.12.8.9
+Version:             0.12.8.10
 Cabal-Version:       >= 1.10
 Build-type:          Simple
 Synopsis:            Conversion between math formats.
