aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 19:11:06 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-05 19:12:41 -0800
commitdd6dab45fb4d55ff6aaeda2707526bc1e2e3b0bb (patch)
tree3650a2deec44d1ce0db2126ddf466270b9d2cb7d /src/Text
parent4343f0dbcd941394e1e5bb3eeff1c14dbfbbe3ec (diff)
downloadpandoc-dd6dab45fb4d55ff6aaeda2707526bc1e2e3b0bb.tar.gz
LaTeX tables: Use minipage rather than parbox for block containers.
This allows verbatim code to be included in grid tables. Closes #663.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs4
1 files changed, 2 insertions, 2 deletions
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}"