diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-03-13 12:05:52 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-03-13 12:05:52 -0800 |
commit | eed18d231cc706e27a1495d46e8c05dd18a0938f (patch) | |
tree | 88d358939c850d1a48d11bfd9d7c4b65b24b5f84 | |
parent | 9bd36b03e97840b2d8ebd8b69d44f898c11d0812 (diff) | |
download | pandoc-eed18d231cc706e27a1495d46e8c05dd18a0938f.tar.gz |
Use integral values for w:tblW in docx.
Cloess #7141.
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 2 | ||||
-rw-r--r-- | test/docx/golden/table_one_row.docx | bin | 9908 -> 9906 bytes | |||
-rw-r--r-- | test/docx/golden/table_with_list_cell.docx | bin | 10227 -> 10225 bytes | |||
-rw-r--r-- | test/docx/golden/tables.docx | bin | 10244 -> 10241 bytes |
4 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 89c71d773..c47bfb2ea 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -1031,7 +1031,7 @@ blockToOpenXML' opts (Table _ blkCapt specs thead tbody tfoot) = do map mkcell cells let textwidth = 7920 -- 5.5 in in twips, 1/20 pt let fullrow = 5000 -- 100% specified in pct - let rowwidth = fullrow * sum widths + let (rowwidth :: Int) = round $ fullrow * sum widths let mkgridcol w = mknode "w:gridCol" [("w:w", tshow (floor (textwidth * w) :: Integer))] () let hasHeader = not $ all null headers diff --git a/test/docx/golden/table_one_row.docx b/test/docx/golden/table_one_row.docx Binary files differindex a1d2323c2..1178f7c6e 100644 --- a/test/docx/golden/table_one_row.docx +++ b/test/docx/golden/table_one_row.docx diff --git a/test/docx/golden/table_with_list_cell.docx b/test/docx/golden/table_with_list_cell.docx Binary files differindex 2f3a831a7..84be2720f 100644 --- a/test/docx/golden/table_with_list_cell.docx +++ b/test/docx/golden/table_with_list_cell.docx diff --git a/test/docx/golden/tables.docx b/test/docx/golden/tables.docx Binary files differindex af066107c..140366d8b 100644 --- a/test/docx/golden/tables.docx +++ b/test/docx/golden/tables.docx |