From dd6dab45fb4d55ff6aaeda2707526bc1e2e3b0bb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 5 Jan 2013 19:11:06 -0800 Subject: LaTeX tables: Use minipage rather than parbox for block containers. This allows verbatim code to be included in grid tables. Closes #663. --- src/Text/Pandoc/Writers/LaTeX.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 0d4e37589..ec8ffe1bb 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -446,9 +446,9 @@ tableRowToLaTeX header aligns widths cols = do AlignCenter -> "\\centering" AlignDefault -> "\\raggedright" let toCell 0 _ c = c - toCell w a c = "\\parbox" <> valign <> + toCell w a c = "\\begin{minipage}" <> valign <> braces (text (printf "%.2f\\columnwidth" w)) <> - braces (halign a <> cr <> c <> cr) + (halign a <> cr <> c <> cr) <> "\\end{minipage}" let cells = zipWith3 toCell widths aligns renderedCells return $ hsep (intersperse "&" cells) $$ "\\\\\\noalign{\\medskip}" -- cgit v1.2.3