From b5b5ef92cbb48a709e8de861d64db29516daf815 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 22 Nov 2020 10:54:42 -0800 Subject: 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. --- src/Text/Pandoc/Writers/LaTeX.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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} -- cgit v1.2.3