diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-05 19:11:06 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-05 19:12:41 -0800 |
commit | dd6dab45fb4d55ff6aaeda2707526bc1e2e3b0bb (patch) | |
tree | 3650a2deec44d1ce0db2126ddf466270b9d2cb7d | |
parent | 4343f0dbcd941394e1e5bb3eeff1c14dbfbbe3ec (diff) | |
download | pandoc-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.
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 4 |
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}" |