aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-11-08 18:22:28 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2011-11-08 18:22:28 -0800
commitc2f7ba3b69b4e6d39808496baffaf1a500132985 (patch)
tree304191c7c87ec1efabd9188ca6d414dcf5fa97a5 /src/Text
parent821286a6f3986bcb3097032b12adcb451a942664 (diff)
downloadpandoc-c2f7ba3b69b4e6d39808496baffaf1a500132985.tar.gz
TeXMath writer: Use unicode thin spaces for thin spaces.
Partially resolves issue #333.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/TeXMath.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/TeXMath.hs b/src/Text/Pandoc/Readers/TeXMath.hs
index b9a46e8ff..c24f29585 100644
--- a/src/Text/Pandoc/Readers/TeXMath.hs
+++ b/src/Text/Pandoc/Readers/TeXMath.hs
@@ -70,7 +70,13 @@ expToInlines (ESymbol t s) = Just $ addSpace t (Str s)
widespace = Str "\x2004"
expToInlines (EStretchy x) = expToInlines x
expToInlines (EGrouped xs) = expsToInlines xs
-expToInlines (ESpace _) = Just [Str " "] -- variable widths not supported
+expToInlines (ESpace "0.167em") = Just [Str "\x2009"]
+expToInlines (ESpace "0.222em") = Just [Str "\x2005"]
+expToInlines (ESpace "0.278em") = Just [Str "\x2004"]
+expToInlines (ESpace "0.333em") = Just [Str "\x2004"]
+expToInlines (ESpace "1em") = Just [Str "\x2001"]
+expToInlines (ESpace "2em") = Just [Str "\x2001\x2001"]
+expToInlines (ESpace _) = Just [Str " "]
expToInlines (EBinary _ _ _) = Nothing
expToInlines (ESub x y) = do
x' <- expToInlines x