diff options
author | John MacFarlane <jgm@berkeley.edu> | 2020-11-22 10:54:42 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2020-11-22 10:54:42 -0800 |
commit | b5b5ef92cbb48a709e8de861d64db29516daf815 (patch) | |
tree | 6d22c469b71d8e033c2638c8f7d788e815b0b3c2 /src | |
parent | 5344dab8ebf29ff96dd9e0d1411e11b44e2ccccf (diff) | |
download | pandoc-b5b5ef92cbb48a709e8de861d64db29516daf815.tar.gz |
LaTeX writer: Improve table spacing.
+ Remove the `\strut` that was added at the end of minipage
environments in cells.
+ Replace `\tabularnewline` with `\\ \addlinespace`.
Closes #6842, closes #6860.
Diffstat (limited to 'src')
-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 f7775318a..345ebe387 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -862,7 +862,7 @@ tableRowToLaTeX header aligns widths cols = do else widths let numcols = length widths' cells <- mapM (tableCellToLaTeX header numcols) $ zip3 widths' aligns cols - return $ hsep (intersperse "&" cells) <> "\\tabularnewline" + return $ hsep (intersperse "&" cells) <> " \\\\ \\addlinespace" -- For simple latex tables (without minipages or parboxes), -- we need to go to some lengths to get line breaks working: @@ -914,7 +914,7 @@ tableCellToLaTeX header numcols (width, align, blocks) = do braces (text (printf "(\\columnwidth - %d\\tabcolsep) * \\real{%.2f}" (numcols - 1) width)) <> - halign <> cr <> cellContents <> "\\strut" <> cr <> + halign <> cr <> cellContents <> cr <> "\\end{minipage}" -- (\columnwidth - 8\tabcolsep) * \real{0.15} |