git.iko.soy/typeable/pandoc
on master help sign in
Docx writer: enable column and row bands for tables.

This change will not have any effect with the default style. However, it enables users to use a style (via a reference.docx) that turns on row and/or column bands. Closes #6371.

commit5a20cc07ddee4115bee48ceabe890f0d490d9a62 authorJohn MacFarlane <jgm@berkeley.edu> dateSat 16 May 2020, 15:50 (6 years ago) parentf11b8ff
29 files changed+6−1
src/Text/Pandoc/Writers/Docx.hs+6−1 test/docx/golden/block_quotes.docx test/docx/golden/codeblock.docx test/docx/golden/comments.docx test/docx/golden/custom_style_no_reference.docx test/docx/golden/custom_style_preserve.docx test/docx/golden/definition_list.docx test/docx/golden/document-properties-short-desc.docx test/docx/golden/document-properties.docx test/docx/golden/headers.docx test/docx/golden/image.docx test/docx/golden/inline_code.docx test/docx/golden/inline_formatting.docx test/docx/golden/inline_images.docx test/docx/golden/link_in_notes.docx test/docx/golden/links.docx test/docx/golden/lists.docx test/docx/golden/lists_continuing.docx test/docx/golden/lists_restarting.docx test/docx/golden/nested_anchors_in_header.docx test/docx/golden/notes.docx test/docx/golden/table_one_row.docx test/docx/golden/table_with_list_cell.docx test/docx/golden/tables.docx test/docx/golden/track_changes_deletion.docx test/docx/golden/track_changes_insertion.docx test/docx/golden/track_changes_move.docx test/docx/golden/unicode.docx test/docx/golden/verbatim_subsuper.docx
src/Text/Pandoc/Writers/Docx.hs+6−1
@@ -1017,7 +1017,12 @@ blockToOpenXML' opts (Table _ blkCapt specs thead tbody tfoot) = do
10171017 ( mknode "w:tblPr" []
10181018 ( mknode "w:tblStyle" [("w:val","Table")] () :
10191019 mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () :
1020− mknode "w:tblLook" [("w:firstRow",if hasHeader then "1" else "0") ] () :
1020+ mknode "w:tblLook" [("w:firstRow",if hasHeader then "1" else "0")
1021+ ,("w:lastRow","0")
1022+ ,("w:firstColumn","0")
1023+ ,("w:lastColumn","0")
1024+ ,("w:noHBand","0")
1025+ ,("w:noVBand","0")] () :
10211026 [ mknode "w:tblCaption" [("w:val", T.unpack captionStr)] ()
10221027 | not (null caption) ] )
10231028 : mknode "w:tblGrid" []
test/docx/golden/block_quotes.docx

Binary file not shown.

test/docx/golden/codeblock.docx

Binary file not shown.

test/docx/golden/comments.docx

Binary file not shown.

test/docx/golden/custom_style_no_reference.docx

Binary file not shown.

test/docx/golden/custom_style_preserve.docx

Binary file not shown.

test/docx/golden/definition_list.docx

Binary file not shown.

test/docx/golden/document-properties-short-desc.docx

Binary file not shown.

test/docx/golden/document-properties.docx

Binary file not shown.

test/docx/golden/headers.docx

Binary file not shown.

test/docx/golden/image.docx

Binary file not shown.

test/docx/golden/inline_code.docx

Binary file not shown.

test/docx/golden/inline_formatting.docx

Binary file not shown.

test/docx/golden/inline_images.docx

Binary file not shown.

test/docx/golden/link_in_notes.docx

Binary file not shown.

test/docx/golden/links.docx

Binary file not shown.

test/docx/golden/lists.docx

Binary file not shown.

test/docx/golden/lists_continuing.docx

Binary file not shown.

test/docx/golden/lists_restarting.docx

Binary file not shown.

test/docx/golden/nested_anchors_in_header.docx

Binary file not shown.

test/docx/golden/notes.docx

Binary file not shown.

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.

test/docx/golden/track_changes_deletion.docx

Binary file not shown.

test/docx/golden/track_changes_insertion.docx

Binary file not shown.

test/docx/golden/track_changes_move.docx

Binary file not shown.

test/docx/golden/unicode.docx

Binary file not shown.

test/docx/golden/verbatim_subsuper.docx

Binary file not shown.