Docx writer: set paragraph to FirstPara after display math
We treat display math like block quotes, and apply FirstParagraph style
to paragraphs that follow them. These can be styled as the user
wishes. (But, when the user is using indentation, this allows for
paragraphs to continue after display math without indentation.)
commitb103f829f0d14055744998a6a6f624797fbd0d40
authorJesse Rosenthal <jrosenthal@jhu.edu>
dateFri 1 Jul 2016, 01:14 (10 years ago)
parent2c62f0e
src/Text/Pandoc/Writers/Docx.hs+1
@@ -1045,6 +1045,7 @@ inlineToOpenXML opts (Math mathType str) = do
10451045 let displayType = if mathType == DisplayMath
10461046 then DisplayBlock
10471047 else DisplayInline
1048+ when (displayType == DisplayBlock) setFirstPara
10481049 case writeOMML displayType <$> readTeX str of
10491050 Right r -> return [r]
10501051 Left _ -> inlinesToOpenXML opts (texMathToInlines mathType str)