diff options
author | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-02-18 15:58:06 -0500 |
---|---|---|
committer | Jesse Rosenthal <jrosenthal@jhu.edu> | 2018-02-18 16:31:32 -0500 |
commit | 07f3aa178be1dda44cd5477089d26c26b9460751 (patch) | |
tree | 1db5d9a496cfe1b9ad5525ceb25d0933ded57f2c /src/Text/Pandoc/Writers/Powerpoint/Output.hs | |
parent | 112602232cd501f0e9befa5d773dbf04bd88fba9 (diff) | |
download | pandoc-07f3aa178be1dda44cd5477089d26c26b9460751.tar.gz |
Powerpoint writer: Ignore links and (end)notes in speaker notes.
MS PowerPoint does not offer a way to insert links into speaker notes
text, so we match that behavior, and make our lives easier.
As for (end)notes, there is no clear solution to the question of wat
that would *mean*. The default behavior would be to add it to the
endnote slide, but that would put speaker note content into the public
presentation. The best solution would be to put the content at the
bottom of the notes page, but that would take some doing, and can be
added to the speaker notes feature later.
Diffstat (limited to 'src/Text/Pandoc/Writers/Powerpoint/Output.hs')
-rw-r--r-- | src/Text/Pandoc/Writers/Powerpoint/Output.hs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Powerpoint/Output.hs b/src/Text/Pandoc/Writers/Powerpoint/Output.hs index 801e0485e..93d511dce 100644 --- a/src/Text/Pandoc/Writers/Powerpoint/Output.hs +++ b/src/Text/Pandoc/Writers/Powerpoint/Output.hs @@ -1202,9 +1202,17 @@ speakerNotesSlideImage = , mknode "p:spPr" [] () ] +-- we want to wipe links from the speaker notes in the +-- paragraphs. Powerpoint doesn't allow you to input them, and it +-- would provide extra complications. +removeLinks :: Paragraph -> Paragraph +removeLinks paragraph = paragraph{paraElems = map f (paraElems paragraph)} + where f (Run rProps s) = Run rProps{rLink=Nothing} s + f pe = pe + speakerNotesBody :: PandocMonad m => [Paragraph] -> P m Element speakerNotesBody paras = do - elements <- mapM paragraphToElement paras + elements <- mapM paragraphToElement $ map removeLinks paras let txBody = mknode "p:txBody" [] $ [mknode "a:bodyPr" [] (), mknode "a:lstStyle" [] ()] ++ elements return $ |