diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-28 10:21:18 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-01-28 10:21:18 -0800 |
commit | 229c22582f46986953bdeb70af8f4baa8272de29 (patch) | |
tree | 1b8acb8d08cf39d92ee37c8b912e3d30c767a741 /src | |
parent | c50af7341e2421ad0626386c9660e45853f713d8 (diff) | |
download | pandoc-229c22582f46986953bdeb70af8f4baa8272de29.tar.gz |
LaTeX writer: Avoid extra space at start/end of table cell.
Thanks to Nick Bart for the suggestion of using @{}.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 3d3e6ae5d..af4efd13b 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -422,7 +422,9 @@ blockToLaTeX (Table caption aligns widths heads rows) = do let notes = vcat $ map toNote tableNotes let colDescriptors = text $ concat $ map toColDescriptor aligns modify $ \s -> s{ stTable = True, stInTable = False, stTableNotes = [] } - return $ "\\begin{longtable}[c]" <> braces colDescriptors + return $ "\\begin{longtable}[c]" <> + braces ("@{}" <> colDescriptors <> "@{}") + -- the @{} removes extra space at beginning and end $$ "\\hline\\noalign{\\medskip}" $$ headers $$ vcat rows' |