aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docx
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-06-29 09:44:37 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-06-29 09:56:21 -0700
commita3d745e48560a55d9a9ea9fa43ffdd5a8b84987f (patch)
tree1901f489518e147d925c372c7b7d4f2cc732d073 /src/Text/Pandoc/Writers/Docx
parentb7572db224123ab6c193ccdf24d2c3dd4fc0b0dc (diff)
downloadpandoc-a3d745e48560a55d9a9ea9fa43ffdd5a8b84987f.tar.gz
Docx writer: support figure numbers.
These are set up in such a way that they will work with Word's automatic table of figures. Closes #7392.
Diffstat (limited to 'src/Text/Pandoc/Writers/Docx')
-rw-r--r--src/Text/Pandoc/Writers/Docx/Types.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Docx/Types.hs b/src/Text/Pandoc/Writers/Docx/Types.hs
index 006584c30..36ac45ad2 100644
--- a/src/Text/Pandoc/Writers/Docx/Types.hs
+++ b/src/Text/Pandoc/Writers/Docx/Types.hs
@@ -117,6 +117,7 @@ data WriterState = WriterState{
, stDynamicParaProps :: Set.Set ParaStyleName
, stDynamicTextProps :: Set.Set CharStyleName
, stCurId :: Int
+ , stNextFigureNum :: Int
}
defaultWriterState :: WriterState
@@ -137,6 +138,7 @@ defaultWriterState = WriterState{
, stDynamicParaProps = Set.empty
, stDynamicTextProps = Set.empty
, stCurId = 20
+ , stNextFigureNum = 1
}
setFirstPara :: PandocMonad m => WS m ()