diff --git a/Text/TeXMath.hs b/Text/TeXMath.hs
--- a/Text/TeXMath.hs
+++ b/Text/TeXMath.hs
@@ -41,4 +41,5 @@
 texMathToPandoc :: DisplayType -> String -> Either String [Inline]
 texMathToPandoc dt inp = inp `seq`
   either Left (Right . maybe fallback id . toPandoc dt) $ parseFormula inp
-  where fallback = [Str $ "$" ++ inp ++ "$"]
+  where fallback = [Str $ delim ++ inp ++ delim]
+        delim    = case dt of { DisplayInline -> "$"; DisplayBlock -> "$$" }
diff --git a/texmath.cabal b/texmath.cabal
--- a/texmath.cabal
+++ b/texmath.cabal
@@ -1,5 +1,5 @@
 Name:                texmath
-Version:             0.6.4
+Version:             0.6.5
 Cabal-Version:       >= 1.6
 Build-type:          Custom
 Synopsis:            Conversion of LaTeX math formulas to MathML or OMML.
