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.
This commit is contained in:
John MacFarlane 2014-08-12 10:56:57 -07:00
parent 712ae610e0
commit ab75e1d3bd

View file

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