aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-04-05 11:02:24 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-04-05 11:02:24 -0700
commit085a89310975aae405a8484822340006fed8a518 (patch)
treec04448004cc0b47b14d56aa603b0d03460d5e41d /src/Text
parent4f572ddf6941b8fb0ad7a5835216c708998444f0 (diff)
downloadpandoc-085a89310975aae405a8484822340006fed8a518.tar.gz
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.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 6 insertions, 0 deletions
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"