From a3d745e48560a55d9a9ea9fa43ffdd5a8b84987f Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 29 Jun 2021 09:44:37 -0700 Subject: 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. --- src/Text/Pandoc/Writers/Docx/Types.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text/Pandoc/Writers/Docx') 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 () -- cgit v1.2.3