diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-03-30 20:30:15 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-03-30 20:30:15 -0700 |
commit | 2b2f7fe15e2632fe123934ec105c8cc72cd593fd (patch) | |
tree | 0b67631fa4db3e43fc75c6c5c550b453a1a2cc2d /src/Text | |
parent | c2cb64379ec24eadc43d8f4a48bf3b19b4e33624 (diff) | |
parent | 0d4d26294491b3f16e11231e90dc79ccd16b0b48 (diff) | |
download | pandoc-2b2f7fe15e2632fe123934ec105c8cc72cd593fd.tar.gz |
Merge pull request #2035 from lierdakil/issue2031
Docx Writer/Reference: Add keepNext to objects w/ captions
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 8bb1d0ced..4e81def60 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -741,7 +741,12 @@ blockToOpenXML opts (Plain lst) = withParaProp (pCustomStyle "Compact") -- title beginning with fig: indicates that the image is a figure blockToOpenXML opts (Para [Image alt (src,'f':'i':'g':':':tit)]) = do setFirstPara + pushParaProp $ pCustomStyle $ + if null alt + then "Figure" + else "FigureWithCaption" paraProps <- getParaProps False + popParaProp contents <- inlinesToOpenXML opts [Image alt (src,tit)] captionNode <- withParaProp (pCustomStyle "ImageCaption") $ blockToOpenXML opts (Para alt) |