diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-03 12:10:10 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-01-19 12:10:49 -0800 |
commit | ba81cda7f18604379717f5052c0eaaa94c7d2067 (patch) | |
tree | 6fdf9019e8473b07a1f917f0c5a37be4d4a81af9 /src/Text/Pandoc/Readers/TeXMath.hs | |
parent | 9ce3e2bf85a535510fd9f708745803582fc1e6bd (diff) |
Added Docx writer.
* New module `Text.Pandoc.Docx`.
* New output format `docx`.
* Added reference.docx.
* New option `--reference-docx`.
The writer includes support for highlighted code blocks
and math (which is converted from TeX to OMML using
texmath's new OMML module).
Diffstat (limited to 'src/Text/Pandoc/Readers/TeXMath.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/TeXMath.hs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/TeXMath.hs b/src/Text/Pandoc/Readers/TeXMath.hs index c24f29585..67dfe6753 100644 --- a/src/Text/Pandoc/Readers/TeXMath.hs +++ b/src/Text/Pandoc/Readers/TeXMath.hs @@ -69,6 +69,9 @@ expToInlines (ESymbol t s) = Just $ addSpace t (Str s) medspace = Str "\x2005" widespace = Str "\x2004" expToInlines (EStretchy x) = expToInlines x +expToInlines (EDelimited start end xs) = do + xs' <- mapM expToInlines xs + return $ [Str start] ++ concat xs' ++ [Str end] expToInlines (EGrouped xs) = expsToInlines xs expToInlines (ESpace "0.167em") = Just [Str "\x2009"] expToInlines (ESpace "0.222em") = Just [Str "\x2005"] @@ -94,10 +97,10 @@ expToInlines (ESubsup x y z) = do expToInlines (EDown x y) = expToInlines (ESub x y) expToInlines (EUp x y) = expToInlines (ESuper x y) expToInlines (EDownup x y z) = expToInlines (ESubsup x y z) -expToInlines (EText "normal" x) = Just [Str x] -expToInlines (EText "bold" x) = Just [Strong [Str x]] -expToInlines (EText "monospace" x) = Just [Code nullAttr x] -expToInlines (EText "italic" x) = Just [Emph [Str x]] +expToInlines (EText TextNormal x) = Just [Str x] +expToInlines (EText TextBold x) = Just [Strong [Str x]] +expToInlines (EText TextMonospace x) = Just [Code nullAttr x] +expToInlines (EText TextItalic x) = Just [Emph [Str x]] expToInlines (EText _ x) = Just [Str x] expToInlines (EOver (EGrouped [EIdentifier [c]]) (ESymbol Accent [accent])) = case accent of |