mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-26 09:25:48 +00:00
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:
@@ -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 [] = []
|
||||
|
||||
Reference in New Issue
Block a user