From c2f7ba3b69b4e6d39808496baffaf1a500132985 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 8 Nov 2011 18:22:28 -0800 Subject: TeXMath writer: Use unicode thin spaces for thin spaces. Partially resolves issue #333. --- src/Text/Pandoc/Readers/TeXMath.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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 -- cgit v1.2.3