From 085a89310975aae405a8484822340006fed8a518 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 5 Apr 2019 11:02:24 -0700 Subject: Make footnotes work properly in beamer tables. This fixes a regression in beamer due to the fix to #5367. We put table footnotes outside the table in beamer, because footnote/footnotehyper don't work with beamer. --- src/Text/Pandoc/Writers/LaTeX.hs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index d0c08815c..ff7e785e8 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -903,7 +903,13 @@ tableCellToLaTeX :: PandocMonad m => Bool -> (Double, Alignment, [Block]) tableCellToLaTeX _ (0, _, blocks) = blockListToLaTeX $ walk fixLineBreaks $ walk displayMathToInline blocks tableCellToLaTeX header (width, align, blocks) = do + beamer <- gets stBeamer + oldInMinipage <- gets stInMinipage + -- See #5367 -- footnotehyper/footnote don't work in beamer, + -- so we need to produce the notes outside the table... + modify $ \st -> st{ stInMinipage = beamer } cellContents <- blockListToLaTeX blocks + modify $ \st -> st{ stInMinipage = oldInMinipage } let valign = text $ if header then "[b]" else "[t]" let halign = case align of AlignLeft -> "\\raggedright" -- cgit v1.2.3