@@ -545,10 +545,16 @@ fixLineBreaks' ils = case splitBy (== LineBreak) ils of
545 where tohbox ys = RawInline "tex" "\\hbox{\\strut " : ys ++
545 where tohbox ys = RawInline "tex" "\\hbox{\\strut " : ys ++
546 [RawInline "tex" "}"]
546 [RawInline "tex" "}"]
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
548tableCellToLaTeX :: Bool -> (Double, Alignment, [Block])
554tableCellToLaTeX :: Bool -> (Double, Alignment, [Block])
549 -> State WriterState Doc
555 -> State WriterState Doc
550tableCellToLaTeX _ (0, _, blocks) =
556tableCellToLaTeX _ (0, _, blocks) =
551− blockListToLaTeX $ walk fixLineBreaks blocks
557+ blockListToLaTeX $ walk fixLineBreaks $ walk displayMathToInline blocks
552tableCellToLaTeX header (width, align, blocks) = do
558tableCellToLaTeX header (width, align, blocks) = do
553 modify $ \st -> st{ stInMinipage = True, stNotes = [] }
559 modify $ \st -> st{ stInMinipage = True, stNotes = [] }
554 cellContents <- blockListToLaTeX blocks
560 cellContents <- blockListToLaTeX blocks