summaryrefslogtreecommitdiff
path: root/Text/Pandoc/Writers/RTF.hs
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-02 00:36:32 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-02 00:36:32 +0000
commitd1832da9e104d61aa6ee0161aefeabf4aef9bbd2 (patch)
tree2971739743b16e10d1333b5a6ad9f7b4bf12f4c3 /Text/Pandoc/Writers/RTF.hs
parent8e872f9f7d89dcc1f16309afd7a50945f2c154ee (diff)
Added Text.Pandoc.Readers.TeXMath and changed default handling of math.
+ Text.Pandoc.Readers.TeXMath exports readTeXMath, which reads raw TeX math and outputs a string of pandoc inlines that tries to render it as far as possible, lapsing into literal TeX when needed. + Added Text.Pandoc.Readers.TeXMath to pandoc.cabal + ghc66 version. + Modified writers so that readTeXMath is used for default HTMl output in HTML, S5, RTF, Docbook. + Updated README with information about how math is rendered in all formats. + Updated test suite. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1129 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text/Pandoc/Writers/RTF.hs')
-rw-r--r--Text/Pandoc/Writers/RTF.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Text/Pandoc/Writers/RTF.hs b/Text/Pandoc/Writers/RTF.hs
index 9c5e6cbd3..64d73a30f 100644
--- a/Text/Pandoc/Writers/RTF.hs
+++ b/Text/Pandoc/Writers/RTF.hs
@@ -30,6 +30,7 @@ Conversion of 'Pandoc' documents to RTF (rich text format).
module Text.Pandoc.Writers.RTF ( writeRTF ) where
import Text.Pandoc.Definition
import Text.Pandoc.Shared
+import Text.Pandoc.Readers.TeXMath
import Text.Regex ( matchRegexAll, mkRegex )
import Data.List ( isSuffixOf )
import Data.Char ( ord )
@@ -272,7 +273,7 @@ inlineToRTF EmDash = "\\u8212-"
inlineToRTF EnDash = "\\u8211-"
inlineToRTF (Code str) = "{\\f1 " ++ (codeStringToRTF str) ++ "} "
inlineToRTF (Str str) = stringToRTF str
-inlineToRTF (Math str) = latexToRTF str
+inlineToRTF (Math str) = inlineListToRTF $ readTeXMath str
inlineToRTF (TeX str) = ""
inlineToRTF (HtmlInline str) = ""
inlineToRTF (LineBreak) = "\\line "