@@ -42,6 +42,7 @@ import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF
4242import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
4343import Text.Pandoc.Shared (compactify', compactify'DL)
4444import Text.TeXMath (readTeX, writePandoc, DisplayType(..))
45+import qualified Text.TeXMath.Readers.MathML.EntityMap as MathMLEntityMap
4546
4647import Control.Applicative ( Applicative, pure
4748 , (<$>), (<$), (<*>), (<*), (*>) )
@@ -1431,7 +1432,8 @@ simpleSubOrSuperString = try $
14311432inlineLaTeX :: OrgParser (F Inlines)
14321433inlineLaTeX = try $ do
14331434 cmd <- inlineLaTeXCommand
1434− maybe mzero returnF $ parseAsMath cmd `mplus` parseAsInlineLaTeX cmd
1435+ maybe mzero returnF $
1436+ parseAsMath cmd `mplus` parseAsMathMLSym cmd `mplus` parseAsInlineLaTeX cmd
14351437 where
14361438 parseAsMath :: String -> Maybe Inlines
14371439 parseAsMath cs = B.fromList <$> texMathToPandoc cs
@@ -1439,6 +1441,11 @@ inlineLaTeX = try $ do
14391441 parseAsInlineLaTeX :: String -> Maybe Inlines
14401442 parseAsInlineLaTeX cs = maybeRight $ runParser inlineCommand state "" cs
14411443
1444+ parseAsMathMLSym :: String -> Maybe Inlines
1445+ parseAsMathMLSym cs = B.str <$> MathMLEntityMap.getUnicode (clean cs)
1446+ -- dropWhileEnd would be nice here, but it's not available before base 4.5
1447+ where clean = reverse . dropWhile (`elem` "{}") . reverse . drop 1
1448+
14421449 state :: ParserState
14431450 state = def{ stateOptions = def{ readerParseRaw = True }}
14441451