PowerPoint writer: Register notes to state.

When we encounter a note, we write it to the state directory of notes,
and input a superscript.
This commit is contained in:
Jesse Rosenthal 2017-12-21 11:45:08 -05:00
parent d6c9e4f243
commit f76b4fc497

View file

@ -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 []