mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-25 08:55:55 +00:00
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:
@@ -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}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user