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.
This commit is contained in:
John MacFarlane 2019-04-05 11:02:24 -07:00
parent 4f572ddf69
commit 085a893109

View file

@ -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"