From 650e1ac1fdbbb172c58c1898607a7f82806cf55e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 25 May 2017 12:11:46 +0200 Subject: Docx writer: Use Table rather than "Table Normal" for table style. "Table Normal" is the default table style and can't be modified. Closes #3275, further testing welcome. --- MANUAL.txt | 2 +- data/docx/word/styles.xml | 5 +++-- src/Text/Pandoc/Writers/Docx.hs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/MANUAL.txt b/MANUAL.txt index ae518054d..170af0d6f 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -880,7 +880,7 @@ Options affecting specific writers Image Caption, Figure, Captioned Figure, TOC Heading; [character] Default Paragraph Font, Body Text Char, Verbatim Char, Footnote Reference, Hyperlink; [table] - Normal Table. + Table. ODT diff --git a/data/docx/word/styles.xml b/data/docx/word/styles.xml index 67d336db1..3596d8bbc 100644 --- a/data/docx/word/styles.xml +++ b/data/docx/word/styles.xml @@ -342,8 +342,9 @@ - - + + + diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index a10840033..5b714ba41 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -953,7 +953,7 @@ blockToOpenXML' opts (Table caption aligns widths headers rows) = do caption' ++ [mknode "w:tbl" [] ( mknode "w:tblPr" [] - ( mknode "w:tblStyle" [("w:val","TableNormal")] () : + ( mknode "w:tblStyle" [("w:val","Table")] () : mknode "w:tblW" [("w:type", "pct"), ("w:w", show rowwidth)] () : mknode "w:tblLook" [("w:firstRow","1") | hasHeader ] () : [ mknode "w:tblCaption" [("w:val", captionStr)] () -- cgit v1.2.3