aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-08-12 10:56:57 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-08-12 10:56:57 -0700
commitab75e1d3bdf830875b02602055cbff29ba63e1fb (patch)
treed44da44685b90dbd1e2919a5e767b41300c1e9a8 /src/Text
parent712ae610e0f0e34f0dc1e78f0ed671ce7f2cabc9 (diff)
downloadpandoc-ab75e1d3bdf830875b02602055cbff29ba63e1fb.tar.gz
Beamer: Use \footnote<.->{..} for notes.
This ensures that the footnotes will not appear before the overlays in which their corresponding note markers appear. Closes #1525.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 3ed20ae87..5e4966abb 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -793,12 +793,17 @@ inlineToLaTeX (Note contents) = do
(CodeBlock _ _ : _) -> cr
_ -> empty
let noteContents = nest 2 contents' <> optnl
+ opts <- gets stOptions
+ -- in beamer slides, display footnote from current overlay forward
+ let beamerMark = if writerBeamer opts
+ then text "<.->"
+ else empty
modify $ \st -> st{ stNotes = noteContents : stNotes st }
return $
if inMinipage
then "\\footnotemark{}"
-- note: a \n before } needed when note ends with a Verbatim environment
- else "\\footnote" <> braces noteContents
+ else "\\footnote" <> beamerMark <> braces noteContents
protectCode :: [Inline] -> [Inline]
protectCode [] = []