LaTeX tables: Use minipage rather than parbox for block containers.

This allows verbatim code to be included in grid tables.
Closes #663.
This commit is contained in:
John MacFarlane
2013-01-05 19:12:41 -08:00
parent 4343f0dbcd
commit dd6dab45fb
+2 -2
View File
@@ -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}"