@@ -286,8 +286,9 @@ inlineToRST (Str str) = return $ text $ escapeString str
286inlineToRST (Math t str) = do
286inlineToRST (Math t str) = do
287 modify $ \st -> st{ stHasMath = True }
287 modify $ \st -> st{ stHasMath = True }
288 return $ if t == InlineMath
288 return $ if t == InlineMath
289− then ":math:`$" <> text str <> "$`"
289+ then ":math:`" <> text str <> "`\\ "
290− else ":math:`$$" <> text str <> "$$`"
290+ else blankline $$ ".. math::" $$ blankline $$
291+ nest 3 (text str) $$ blankline
291inlineToRST (RawInline _ _) = return empty
292inlineToRST (RawInline _ _) = return empty
292inlineToRST (LineBreak) = return cr -- there's no line break in RST
293inlineToRST (LineBreak) = return cr -- there's no line break in RST
293inlineToRST Space = return space
294inlineToRST Space = return space