RST (Math t str) = do
  modify $ \st -> st{ stHasMath = True }
  return $ if t == InlineMath
              then ":math:`$" <> text str <> "$`"
              else ":math:`$$" <> text str <> "$$`"
inlineT
inlineToRST (Math t str) = do
  modify $ \st -> st{ stHasMath = True }
  return $ if t == InlineMath
              then ":math:`$" <> text str <> "$`"
              else ":math:`$$" <> text str <> "$$`"
inlineToRST (Math t str) = do
  modify $ \st -> st{ stHasMath = True }
  return $ if t == InlineMath
              then ":math:`$" <> text str <> "$`"
              else ":math:`$$" <> text str <> "$$`"