@@ -66,7 +66,8 @@ import Text.Pandoc.Readers.Docx.StyleMap
66import Text.Pandoc.Shared hiding (Element)
66import Text.Pandoc.Shared hiding (Element)
67import Text.Pandoc.Walk
67import Text.Pandoc.Walk
68import Text.Pandoc.Writers.Math
68import Text.Pandoc.Writers.Math
69−import Text.Pandoc.Writers.Shared (fixDisplayMath, metaValueToInlines)
69+import Text.Pandoc.Writers.Shared (isDisplayMath, fixDisplayMath,
70import Text.Printf (printf)
71import Text.Printf (printf)
71import Text.TeXMath
72import Text.TeXMath
72import Text.XML.Light as XML
73import Text.XML.Light as XML
@@ -915,9 +916,10 @@ blockToOpenXML' opts (Para lst)
915 | null lst && not (isEnabled Ext_empty_paragraphs opts) = return []
916 | null lst && not (isEnabled Ext_empty_paragraphs opts) = return []
916 | otherwise = do
917 | otherwise = do
917 isFirstPara <- gets stFirstPara
918 isFirstPara <- gets stFirstPara
918− paraProps <- getParaProps $ case lst of
919+ let displayMathPara = case lst of
919− [Math DisplayMath _] -> True
920+ [x] -> isDisplayMath x
920− _ -> False
921+ _ -> False
922+ paraProps <- getParaProps displayMathPara
921 bodyTextStyle <- pStyleM "Body Text"
923 bodyTextStyle <- pStyleM "Body Text"
922 let paraProps' = case paraProps of
924 let paraProps' = case paraProps of
923 [] | isFirstPara -> [mknode "w:pPr" []
925 [] | isFirstPara -> [mknode "w:pPr" []