@@ -38,8 +38,8 @@ import Text.Pandoc.Shared
39-- | Converts a string of raw TeX math to a list of 'Pandoc' inlines.
39-- | Converts a string of raw TeX math to a list of 'Pandoc' inlines.
40readTeXMath :: String -> [Inline]
40readTeXMath :: String -> [Inline]
41−readTeXMath inp = case parse teXMath "input" inp of
41+readTeXMath inp = case parse teXMath ("formula: " ++ inp) inp of
42− Left err -> error $ "\nError:\n" ++ show err
42+ Left err -> [Str inp] -- if unparseable, just include original
43 Right res -> res
43 Right res -> res
45teXMath = manyTill mathPart eof >>= return . concat
45teXMath = manyTill mathPart eof >>= return . concat
@@ -73,7 +73,7 @@ letters = do
73 return [Emph [Str res]]
73 return [Emph [Str res]]
76− res <- noneOf "{}\\"
76+ res <- noneOf "}"
77 return [Str [res]]
77 return [Str [res]]
79scriptArg = try $ do
79scriptArg = try $ do