diff options
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs index 990d90433..5a1d089a9 100644 --- a/src/Text/Pandoc/Writers/Powerpoint.hs +++ b/src/Text/Pandoc/Writers/Powerpoint.hs @@ -679,18 +679,20 @@ getMetaSlide = do blocksToPresentation :: PandocMonad m => [Block] -> P m Presentation blocksToPresentation blks = do + metadataslide <- getMetaSlide + let bodyStartNum = case metadataslide of + Just _ -> 2 + Nothing -> 1 blksLst <- splitBlocks blks slides <- mapM (\(bs, n) -> local (\st -> st{envCurSlideId = n}) (blocksToSlide bs)) - (zip blksLst [1..]) + (zip blksLst [bodyStartNum..]) let noteSlidesNum = length blksLst + 1 noteSlides <- local (\st -> st {envCurSlideId = noteSlidesNum}) makeNotesSlides - let slides' = slides ++ noteSlides - metadataslide <- getMetaSlide presSize <- asks envPresentationSize - return $ case metadataslide of - Just metadataslide' -> Presentation presSize $ metadataslide' : slides' - Nothing -> Presentation presSize slides' + return $ + Presentation presSize $ + (maybeToList metadataslide) ++ slides ++ noteSlides -------------------------------------------------------------------- |