@@ -333,6 +333,11 @@ stringToLaTeX context zs = do
333333 | ctx == TextString
334334 -> cs <> xs
335335 _ -> cs <> "{}" <> xs
336+ emitquote cs = do
337+ case xs of
338+ '`':_ -> cs <> "\\," <> xs -- add thin space
339+ '\'':_ -> cs <> "\\," <> xs -- add thin space
340+ _ -> cs <> xs
336341 in case x of
337342 '?' | ligatures -> -- avoid ?` ligature
338343 case xs of
@@ -367,10 +372,10 @@ stringToLaTeX context zs = do
367372 '\160' -> emits "~"
368373 '\x202F' -> emits "\\,"
369374 '\x2026' -> emitcseq "\\ldots"
370− '\x2018' | ligatures -> emits "`"
371− '\x2019' | ligatures -> emits "'"
372− '\x201C' | ligatures -> emits "``"
373− '\x201D' | ligatures -> emits "''"
375+ '\x2018' | ligatures -> emitquote "`"
376+ '\x2019' | ligatures -> emitquote "'"
377+ '\x201C' | ligatures -> emitquote "``"
378+ '\x201D' | ligatures -> emitquote "''"
374379 '\x2014' | ligatures -> emits "---"
375380 '\x2013' | ligatures -> emits "--"
376381 _ | writerPreferAscii opts