@@ -545,10 +545,16 @@ fixLineBreaks' ils = case splitBy (== LineBreak) ils of
545545 where tohbox ys = RawInline "tex" "\\hbox{\\strut " : ys ++
546546 [RawInline "tex" "}"]
547547
548+-- We also change display math to inline math, since display
549+-- math breaks in simple tables.
550+displayMathToInline :: Inline -> Inline
551+displayMathToInline (Math DisplayMath x) = Math InlineMath x
552+displayMathToInline x = x
553+
548554tableCellToLaTeX :: Bool -> (Double, Alignment, [Block])
549555 -> State WriterState Doc
550556tableCellToLaTeX _ (0, _, blocks) =
551− blockListToLaTeX $ walk fixLineBreaks blocks
557+ blockListToLaTeX $ walk fixLineBreaks $ walk displayMathToInline blocks
552558tableCellToLaTeX header (width, align, blocks) = do
553559 modify $ \st -> st{ stInMinipage = True, stNotes = [] }
554560 cellContents <- blockListToLaTeX blocks