aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcholonam <25772102+cholonam@users.noreply.github.com>2020-11-24 20:25:03 +0900
committerJohn MacFarlane <jgm@berkeley.edu>2020-11-26 12:11:26 -0800
commit5f4deb5455d631c9fd1dd5d3ea1c96b74c06a9f7 (patch)
treeab9a83e7d0cbae0d4d6ddbeb5e8d5ba090aca4a2
parent630b1bff2bba436cfba8dcb19845af394aa0dee2 (diff)
downloadpandoc-5f4deb5455d631c9fd1dd5d3ea1c96b74c06a9f7.tar.gz
Docx writer: Fix bullets/lists indentation
Fix appearance of bullets/numbered lists (the first level is slightly indented to the right instead of right on the margin). New golden files have been tested using Word 2010 on Windows 10.
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs6
-rw-r--r--test/docx/golden/block_quotes.docxbin10052 -> 10001 bytes
-rw-r--r--test/docx/golden/codeblock.docxbin9904 -> 9853 bytes
-rw-r--r--test/docx/golden/comments.docxbin10239 -> 10188 bytes
-rw-r--r--test/docx/golden/custom_style_no_reference.docxbin10003 -> 9952 bytes
-rw-r--r--test/docx/golden/custom_style_preserve.docxbin10624 -> 10573 bytes
-rw-r--r--test/docx/golden/custom_style_reference.docxbin12486 -> 12434 bytes
-rw-r--r--test/docx/golden/definition_list.docxbin9895 -> 9844 bytes
-rw-r--r--test/docx/golden/document-properties-short-desc.docxbin9906 -> 9856 bytes
-rw-r--r--test/docx/golden/document-properties.docxbin10384 -> 10332 bytes
-rw-r--r--test/docx/golden/headers.docxbin10040 -> 9989 bytes
-rw-r--r--test/docx/golden/image.docxbin26718 -> 26667 bytes
-rw-r--r--test/docx/golden/inline_code.docxbin9840 -> 9789 bytes
-rw-r--r--test/docx/golden/inline_formatting.docxbin10010 -> 9959 bytes
-rw-r--r--test/docx/golden/inline_images.docxbin26776 -> 26725 bytes
-rw-r--r--test/docx/golden/link_in_notes.docxbin10061 -> 10010 bytes
-rw-r--r--test/docx/golden/links.docxbin10236 -> 10185 bytes
-rw-r--r--test/docx/golden/lists.docxbin10325 -> 10261 bytes
-rw-r--r--test/docx/golden/lists_continuing.docxbin10113 -> 10052 bytes
-rw-r--r--test/docx/golden/lists_multiple_initial.docxbin10208 -> 10141 bytes
-rw-r--r--test/docx/golden/lists_restarting.docxbin10113 -> 10053 bytes
-rw-r--r--test/docx/golden/nested_anchors_in_header.docxbin10199 -> 10148 bytes
-rw-r--r--test/docx/golden/notes.docxbin10006 -> 9955 bytes
-rw-r--r--test/docx/golden/table_one_row.docxbin9885 -> 9834 bytes
-rw-r--r--test/docx/golden/table_with_list_cell.docxbin10260 -> 10199 bytes
-rw-r--r--test/docx/golden/tables.docxbin10276 -> 10225 bytes
-rw-r--r--test/docx/golden/track_changes_deletion.docxbin9884 -> 9833 bytes
-rw-r--r--test/docx/golden/track_changes_insertion.docxbin9867 -> 9816 bytes
-rw-r--r--test/docx/golden/track_changes_move.docxbin9901 -> 9850 bytes
-rw-r--r--test/docx/golden/track_changes_scrubbed_metadata.docxbin10013 -> 9962 bytes
-rw-r--r--test/docx/golden/unicode.docxbin9825 -> 9774 bytes
-rw-r--r--test/docx/golden/verbatim_subsuper.docxbin9873 -> 9822 bytes
32 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 93f7dd799..a380fd4fa 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -732,9 +732,9 @@ mkLvl marker lvl =
, mknode "w:lvlText" [("w:val",lvltxt)] ()
, mknode "w:lvlJc" [("w:val","left")] ()
, mknode "w:pPr" []
- [ mknode "w:tabs" []
- $ mknode "w:tab" [("w:val","num"),("w:pos",show $ lvl * step)] ()
- , mknode "w:ind" [("w:left",show $ lvl * step + hang),("w:hanging",show hang)] ()
+ [ mknode "w:ind" [ ("w:left",show $ lvl * step + step)
+ , ("w:hanging",show (hang :: Int))
+ ] ()
]
]
where (fmt, lvltxt, start) =
diff --git a/test/docx/golden/block_quotes.docx b/test/docx/golden/block_quotes.docx
index 94eb8e811..bbc8d8de9 100644
--- a/test/docx/golden/block_quotes.docx
+++ b/test/docx/golden/block_quotes.docx
Binary files differ
diff --git a/test/docx/golden/codeblock.docx b/test/docx/golden/codeblock.docx
index ee796a1fb..e20efcab4 100644
--- a/test/docx/golden/codeblock.docx
+++ b/test/docx/golden/codeblock.docx
Binary files differ
diff --git a/test/docx/golden/comments.docx b/test/docx/golden/comments.docx
index a19f77278..f1185da98 100644
--- a/test/docx/golden/comments.docx
+++ b/test/docx/golden/comments.docx
Binary files differ
diff --git a/test/docx/golden/custom_style_no_reference.docx b/test/docx/golden/custom_style_no_reference.docx
index c6195737f..83243ab8c 100644
--- a/test/docx/golden/custom_style_no_reference.docx
+++ b/test/docx/golden/custom_style_no_reference.docx
Binary files differ
diff --git a/test/docx/golden/custom_style_preserve.docx b/test/docx/golden/custom_style_preserve.docx
index 9997672ba..ac595cdd4 100644
--- a/test/docx/golden/custom_style_preserve.docx
+++ b/test/docx/golden/custom_style_preserve.docx
Binary files differ
diff --git a/test/docx/golden/custom_style_reference.docx b/test/docx/golden/custom_style_reference.docx
index 44900181e..5f96cc911 100644
--- a/test/docx/golden/custom_style_reference.docx
+++ b/test/docx/golden/custom_style_reference.docx
Binary files differ
diff --git a/test/docx/golden/definition_list.docx b/test/docx/golden/definition_list.docx
index a4abcd463..005f5dbe3 100644
--- a/test/docx/golden/definition_list.docx
+++ b/test/docx/golden/definition_list.docx
Binary files differ
diff --git a/test/docx/golden/document-properties-short-desc.docx b/test/docx/golden/document-properties-short-desc.docx
index d18c110b6..5cf8db0b0 100644
--- a/test/docx/golden/document-properties-short-desc.docx
+++ b/test/docx/golden/document-properties-short-desc.docx
Binary files differ
diff --git a/test/docx/golden/document-properties.docx b/test/docx/golden/document-properties.docx
index 39d87a31a..14bfab6d4 100644
--- a/test/docx/golden/document-properties.docx
+++ b/test/docx/golden/document-properties.docx
Binary files differ
diff --git a/test/docx/golden/headers.docx b/test/docx/golden/headers.docx
index 6458ce105..416743aa1 100644
--- a/test/docx/golden/headers.docx
+++ b/test/docx/golden/headers.docx
Binary files differ
diff --git a/test/docx/golden/image.docx b/test/docx/golden/image.docx
index 90362a709..ef2940f89 100644
--- a/test/docx/golden/image.docx
+++ b/test/docx/golden/image.docx
Binary files differ
diff --git a/test/docx/golden/inline_code.docx b/test/docx/golden/inline_code.docx
index 3002a2b7d..479ea65ec 100644
--- a/test/docx/golden/inline_code.docx
+++ b/test/docx/golden/inline_code.docx
Binary files differ
diff --git a/test/docx/golden/inline_formatting.docx b/test/docx/golden/inline_formatting.docx
index c5f6ce186..ce1d16daa 100644
--- a/test/docx/golden/inline_formatting.docx
+++ b/test/docx/golden/inline_formatting.docx
Binary files differ
diff --git a/test/docx/golden/inline_images.docx b/test/docx/golden/inline_images.docx
index 99e1e5e79..8bd57bb8c 100644
--- a/test/docx/golden/inline_images.docx
+++ b/test/docx/golden/inline_images.docx
Binary files differ
diff --git a/test/docx/golden/link_in_notes.docx b/test/docx/golden/link_in_notes.docx
index a1003b47e..2c6a638fc 100644
--- a/test/docx/golden/link_in_notes.docx
+++ b/test/docx/golden/link_in_notes.docx
Binary files differ
diff --git a/test/docx/golden/links.docx b/test/docx/golden/links.docx
index 86f0230ca..11e52c4b1 100644
--- a/test/docx/golden/links.docx
+++ b/test/docx/golden/links.docx
Binary files differ
diff --git a/test/docx/golden/lists.docx b/test/docx/golden/lists.docx
index c64cbf46b..7667990c4 100644
--- a/test/docx/golden/lists.docx
+++ b/test/docx/golden/lists.docx
Binary files differ
diff --git a/test/docx/golden/lists_continuing.docx b/test/docx/golden/lists_continuing.docx
index 8fbd3190c..3e8c6d2b2 100644
--- a/test/docx/golden/lists_continuing.docx
+++ b/test/docx/golden/lists_continuing.docx
Binary files differ
diff --git a/test/docx/golden/lists_multiple_initial.docx b/test/docx/golden/lists_multiple_initial.docx
index 3e632517f..05a7cf060 100644
--- a/test/docx/golden/lists_multiple_initial.docx
+++ b/test/docx/golden/lists_multiple_initial.docx
Binary files differ
diff --git a/test/docx/golden/lists_restarting.docx b/test/docx/golden/lists_restarting.docx
index e4d75764d..f5ae4a384 100644
--- a/test/docx/golden/lists_restarting.docx
+++ b/test/docx/golden/lists_restarting.docx
Binary files differ
diff --git a/test/docx/golden/nested_anchors_in_header.docx b/test/docx/golden/nested_anchors_in_header.docx
index 3a1286e31..d02c77271 100644
--- a/test/docx/golden/nested_anchors_in_header.docx
+++ b/test/docx/golden/nested_anchors_in_header.docx
Binary files differ
diff --git a/test/docx/golden/notes.docx b/test/docx/golden/notes.docx
index de39a4305..f7fdcbe11 100644
--- a/test/docx/golden/notes.docx
+++ b/test/docx/golden/notes.docx
Binary files differ
diff --git a/test/docx/golden/table_one_row.docx b/test/docx/golden/table_one_row.docx
index b3cf7b27d..d404878c6 100644
--- a/test/docx/golden/table_one_row.docx
+++ b/test/docx/golden/table_one_row.docx
Binary files differ
diff --git a/test/docx/golden/table_with_list_cell.docx b/test/docx/golden/table_with_list_cell.docx
index 64b5f1d59..79c395262 100644
--- a/test/docx/golden/table_with_list_cell.docx
+++ b/test/docx/golden/table_with_list_cell.docx
Binary files differ
diff --git a/test/docx/golden/tables.docx b/test/docx/golden/tables.docx
index af30e1fe6..df9680773 100644
--- a/test/docx/golden/tables.docx
+++ b/test/docx/golden/tables.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_deletion.docx b/test/docx/golden/track_changes_deletion.docx
index 97c060915..bb73b82f6 100644
--- a/test/docx/golden/track_changes_deletion.docx
+++ b/test/docx/golden/track_changes_deletion.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_insertion.docx b/test/docx/golden/track_changes_insertion.docx
index a1f141043..7df484aaa 100644
--- a/test/docx/golden/track_changes_insertion.docx
+++ b/test/docx/golden/track_changes_insertion.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_move.docx b/test/docx/golden/track_changes_move.docx
index fbfd8ec59..d717b93ab 100644
--- a/test/docx/golden/track_changes_move.docx
+++ b/test/docx/golden/track_changes_move.docx
Binary files differ
diff --git a/test/docx/golden/track_changes_scrubbed_metadata.docx b/test/docx/golden/track_changes_scrubbed_metadata.docx
index 50951f0d2..791182db2 100644
--- a/test/docx/golden/track_changes_scrubbed_metadata.docx
+++ b/test/docx/golden/track_changes_scrubbed_metadata.docx
Binary files differ
diff --git a/test/docx/golden/unicode.docx b/test/docx/golden/unicode.docx
index 4daf635e9..b64a7b58e 100644
--- a/test/docx/golden/unicode.docx
+++ b/test/docx/golden/unicode.docx
Binary files differ
diff --git a/test/docx/golden/verbatim_subsuper.docx b/test/docx/golden/verbatim_subsuper.docx
index 984f16abd..b5116d1a8 100644
--- a/test/docx/golden/verbatim_subsuper.docx
+++ b/test/docx/golden/verbatim_subsuper.docx
Binary files differ