git.iko.soy/typeable/pandoc
on master help sign in
Use integral values for w:tblW in docx.

Cloess #7141.

commiteed18d231cc706e27a1495d46e8c05dd18a0938f authorJohn MacFarlane <jgm@berkeley.edu> dateSat 13 Mar 2021, 12:05 (6 years ago) parent9bd36b0
4 files changed+1−1
src/Text/Pandoc/Writers/Docx.hs+1−1 test/docx/golden/table_one_row.docx test/docx/golden/table_with_list_cell.docx test/docx/golden/tables.docx
src/Text/Pandoc/Writers/Docx.hs+1−1
@@ -1031,7 +1031,7 @@ blockToOpenXML' opts (Table _ blkCapt specs thead tbody tfoot) = do
10311031 map mkcell cells
10321032 let textwidth = 7920 -- 5.5 in in twips, 1/20 pt
10331033 let fullrow = 5000 -- 100% specified in pct
1034− let rowwidth = fullrow * sum widths
1034+ let (rowwidth :: Int) = round $ fullrow * sum widths
10351035 let mkgridcol w = mknode "w:gridCol"
10361036 [("w:w", tshow (floor (textwidth * w) :: Integer))] ()
10371037 let hasHeader = not $ all null headers
test/docx/golden/table_one_row.docx

Binary file not shown.

test/docx/golden/table_with_list_cell.docx

Binary file not shown.

test/docx/golden/tables.docx

Binary file not shown.