Man writer: Use integral n measures instead of fractional i

measures.  Calculate on basis of a 70 character line, since
the default is 78 but the table will appear indented 8 spaces
in standard man output.


git-svn-id: https://pandoc.googlecode.com/svn/trunk@637 788f1e2b-df1e-0410-8736-df70ead52e1b
This commit is contained in:
fiddlosopher 2007-07-07 22:18:46 +00:00
parent f82b1f8eec
commit 3e6184763e

View file

@ -161,7 +161,8 @@ blockToMan opts (Table caption alignments widths headers rows) =
in do
caption' <- inlineListToMan opts caption
modify (\(notes, preprocessors) -> (notes, "t":preprocessors))
let iwidths = map (printf "w(%.2fi)" . (6.5 *)) widths -- 6.5i default width
let iwidths = map (printf "w(%0.2fn)" . (70 *)) widths
-- 78n default width - 8n indent = 70n
let coldescriptions = text $ joinWithSep " "
(zipWith (\align width -> aligncode align ++ width)
alignments iwidths) ++ "."