@@ -1007,9 +1007,14 @@ inlineToHtml opts inline = do
10071007 ishtml <- isRawHtml f
10081008 if ishtml
10091009 then return $ preEscapedString str
1010− else do
1011− report $ InlineNotRendered inline
1012− return mempty
1010+ else if (f == Format "latex" || f == Format "tex") &&
1011+ "\\begin" `isPrefixOf` str &&
1012+ allowsMathEnvironments (writerHTMLMathMethod opts) &&
1013+ isMathEnvironment str
1014+ then inlineToHtml opts $ Math DisplayMath str
1015+ else do
1016+ report $ InlineNotRendered inline
1017+ return mempty
10131018 (Link attr txt (s,_)) | "mailto:" `isPrefixOf` s -> do
10141019 linkText <- inlineListToHtml opts txt
10151020 obfuscateLink opts attr linkText s