diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-12 11:08:46 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-01-12 11:09:17 -0500 |
commit | 624abeec5c3b9f5c27cffe6d157617aa97367e92 (patch) | |
tree | bbdefa2219a67f19dc28e5cf987ce15ad85cf2c0 /src/Text/Pandoc | |
parent | 6d74b357511a3d84eb27d18dff51383cfa869cb5 (diff) | |
download | pandoc-624abeec5c3b9f5c27cffe6d157617aa97367e92.tar.gz |
Powerpoint writer: allow setting toc-title in metadata.
Accompanying change in MANUAL.txt
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs index e56663ae0..90eb0ffc3 100644 --- a/src/Text/Pandoc/Writers/Powerpoint.hs +++ b/src/Text/Pandoc/Writers/Powerpoint.hs @@ -55,7 +55,7 @@ import Text.Pandoc.Logging import qualified Data.ByteString.Lazy as BL import Text.Pandoc.Walk import qualified Text.Pandoc.Shared as Shared -- so we don't overlap "Element" -import Text.Pandoc.Writers.Shared (fixDisplayMath) +import Text.Pandoc.Writers.Shared (fixDisplayMath, metaValueToInlines) import Text.Pandoc.Writers.OOXML import qualified Data.Map as M import Data.Maybe (mapMaybe, listToMaybe, maybeToList, catMaybes) @@ -696,8 +696,11 @@ elementToListItem (Shared.Blk _) = return [] makeTOCSlide :: PandocMonad m => [Block] -> P m Slide makeTOCSlide blks = do contents <- BulletList <$> mapM elementToListItem (Shared.hierarchicalize blks) + meta <- asks envMetadata slideLevel <- asks envSlideLevel - let tocTitle = [Str "Table of Contents"] + let tocTitle = case lookupMeta "toc-title" meta of + Just val -> metaValueToInlines val + Nothing -> [Str "Table of Contents"] hdr = Header slideLevel nullAttr tocTitle sld <- blocksToSlide [hdr, contents] return sld |