@@ -537,13 +537,17 @@ inlineToOpenXML opts (Quoted quoteType lst) =
537537 where (open, close) = case quoteType of
538538 SingleQuote -> ("\x2018", "\x2019")
539539 DoubleQuote -> ("\x201C", "\x201D")
540−inlineToOpenXML opts (Math t str) =
541− case texMathToOMML dt str of
540+inlineToOpenXML opts (Math InlineMath str) =
541+ case texMathToOMML DisplayInline str of
542542 Right r -> return [r]
543543 Left _ -> inlinesToOpenXML opts (readTeXMath str)
544− where dt = if t == InlineMath
545− then DisplayInline
546− else DisplayBlock
544+inlineToOpenXML opts (Math DisplayMath str) =
545+ case texMathToOMML DisplayBlock str of
546+ Right r -> return [br, r, br]
547+ Left _ -> do
548+ fallback <- inlinesToOpenXML opts (readTeXMath str)
549+ return $ [br] ++ fallback ++ [br]
550+ where br = mknode "w:br" [] ()
547551inlineToOpenXML opts (Cite _ lst) = inlinesToOpenXML opts lst
548552inlineToOpenXML _ (Code attrs str) =
549553 withTextProp (rStyle "VerbatimChar")