Skip to content

Commit

Permalink
Docx writer: Change FigureWithCaption to CaptionedFigure (#3658)
Browse files Browse the repository at this point in the history
Edit styles.xml as part of the fix for #3656
  • Loading branch information
iandol authored and jgm committed May 18, 2017
1 parent 0f6458c commit b9185b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions data/docx/word/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@
<w:name w:val="Figure" />
<w:basedOn w:val="Normal" />
</w:style>
<w:style w:type="paragraph" w:customStyle="1" w:styleId="FigureWithCaption">
<w:name w:val="Figure with Caption" />
<w:style w:type="paragraph" w:customStyle="1" w:styleId="CaptionedFigure">
<w:name w:val="Captioned Figure" />
<w:basedOn w:val="Figure" />
<w:pPr>
<w:keepNext />
Expand Down
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Writers/Docx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit b9185b0

Please sign in to comment.