From b9185b02162ea56ee685594e1c5cfb816e796754 Mon Sep 17 00:00:00 2001 From: Ian Date: Fri, 19 May 2017 04:34:13 +0800 Subject: [PATCH] Docx writer: Change FigureWithCaption to CaptionedFigure (#3658) Edit styles.xml as part of the fix for #3656 --- data/docx/word/styles.xml | 4 ++-- src/Text/Pandoc/Writers/Docx.hs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/docx/word/styles.xml b/data/docx/word/styles.xml index 5d09a67b01c9..67d336db19f4 100644 --- a/data/docx/word/styles.xml +++ b/data/docx/word/styles.xml @@ -400,8 +400,8 @@ - - + + diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index b58c983a1eff..2282a5c588c8 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -875,7 +875,7 @@ blockToOpenXML' opts (Para [Image attr alt (src,'f':'i':'g':':':tit)]) = do let prop = pCustomStyle $ if null alt then "Figure" - else "FigureWithCaption" + else "CaptionedFigure" paraProps <- local (\env -> env { envParaProperties = prop : envParaProperties env }) (getParaProps False) contents <- inlinesToOpenXML opts [Image attr alt (src,tit)] captionNode <- withParaProp (pCustomStyle "ImageCaption")