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