diff options
-rw-r--r-- | src/Text/Pandoc/Writers/HTML.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/HTML.hs b/src/Text/Pandoc/Writers/HTML.hs index 427edcde3..d8da74d3a 100644 --- a/src/Text/Pandoc/Writers/HTML.hs +++ b/src/Text/Pandoc/Writers/HTML.hs @@ -274,7 +274,10 @@ elementToHtml :: Int -> WriterOptions -> Element -> State WriterState Html elementToHtml _slideLevel opts (Blk block) = blockToHtml opts block elementToHtml slideLevel opts (Sec level num (id',classes,keyvals) title' elements) = do let slide = writerSlideVariant opts /= NoSlides && level <= slideLevel - modify $ \st -> st{stSecNum = num} -- update section number + let num' = case num of + (n:ns) -> n + writerNumberFrom opts - 1 : ns + [] -> [] + modify $ \st -> st{stSecNum = num'} -- update section number -- always use level 1 for slide titles let level' = if slide then 1 else level let titleSlide = slide && level < slideLevel |