diff options
author | Peter Fabinski <github@peterfab.com> | 2021-08-03 17:34:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 15:34:39 -0600 |
commit | 8667ba2bcc8a7da6ba50369161c0bcb9020780e8 (patch) | |
tree | 61b348636913d420e975ac8fbfc0be9f40cfcb91 /src/Text/Pandoc/Writers | |
parent | f938378d001cb892ccccbf6808010dd69becc26f (diff) | |
download | pandoc-8667ba2bcc8a7da6ba50369161c0bcb9020780e8.tar.gz |
LaTeX table writer: Increase column width precision (#7466)
In some cases, the rounding performed by the LaTeX table
writer would introduce visible overrun outside the text
area.
This adds two more decimal places to the width values.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX/Table.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Table.hs b/src/Text/Pandoc/Writers/LaTeX/Table.hs index 27a8a0257..9471c171c 100644 --- a/src/Text/Pandoc/Writers/LaTeX/Table.hs +++ b/src/Text/Pandoc/Writers/LaTeX/Table.hs @@ -102,7 +102,7 @@ colDescriptors (Ann.Table _attr _caption specs thead tbodies tfoot) = toColDescriptor :: Int -> Alignment -> Double -> Text toColDescriptor numcols align width = T.pack $ printf - ">{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.2f}}" + ">{%s\\arraybackslash}p{(\\columnwidth - %d\\tabcolsep) * \\real{%0.4f}}" (T.unpack (alignCommand align)) ((numcols - 1) * 2) width |