diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2017-12-21 11:45:08 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2017-12-21 11:45:08 -0500 |
commit | f76b4fc497706c4939c51138384ac1414b6f8b08 (patch) | |
tree | 85e13efc1dcf19dfd2d239ce5f9a405f5c32673f | |
parent | d6c9e4f243438de767a2e3e2a08c5a0eb546023c (diff) |
PowerPoint writer: Register notes to state.
When we encounter a note, we write it to the state directory of notes,
and input a superscript.
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint.hs b/src/Text/Pandoc/Writers/Powerpoint.hs index 6f83b5976..4a6f6a341 100644 --- a/src/Text/Pandoc/Writers/Powerpoint.hs +++ b/src/Text/Pandoc/Writers/Powerpoint.hs @@ -353,6 +353,14 @@ inlineToParElems (Code _ str) = do inlineToParElems $ Str str inlineToParElems (Math mathtype str) = return [MathElem mathtype (TeXString str)] +inlineToParElems (Note blks) = do + notes <- gets stNoteIds + let maxNoteId = case M.keys notes of + [] -> 0 + lst -> maximum lst + curNoteId = maxNoteId + 1 + modify $ \st -> st { stNoteIds = M.insert curNoteId blks notes } + inlineToParElems $ Superscript [Str $ show curNoteId] inlineToParElems (Span _ ils) = concatMapM inlineToParElems ils inlineToParElems (RawInline _ _) = return [] inlineToParElems _ = return [] |