git.iko.soy/typeable/pandoc
on master help sign in
LaTeX tables: Use minipage rather than parbox for block containers.

This allows verbatim code to be included in grid tables. Closes #663.

commitdd6dab45fb4d55ff6aaeda2707526bc1e2e3b0bb authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 5 Jan 2013, 19:11 (14 years ago) parent4343f0d
1 file changed+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
src/Text/Pandoc/Writers/LaTeX.hs+2−2
@@ -446,9 +446,9 @@ tableRowToLaTeX header aligns widths cols = do
446446 AlignCenter -> "\\centering"
447447 AlignDefault -> "\\raggedright"
448448 let toCell 0 _ c = c
449− toCell w a c = "\\parbox" <> valign <>
449+ toCell w a c = "\\begin{minipage}" <> valign <>
450450 braces (text (printf "%.2f\\columnwidth" w)) <>
451− braces (halign a <> cr <> c <> cr)
451+ (halign a <> cr <> c <> cr) <> "\\end{minipage}"
452452 let cells = zipWith3 toCell widths aligns renderedCells
453453 return $ hsep (intersperse "&" cells) $$ "\\\\\\noalign{\\medskip}"
454454