aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-05-25 12:11:46 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2017-05-25 12:11:46 +0200
commit650e1ac1fdbbb172c58c1898607a7f82806cf55e (patch)
tree42d19ae1172130ac6a7bff92f952a9c38a57e790
parente34131502af7ac16bac60a0a8081ffc45d6b1b1e (diff)
downloadpandoc-650e1ac1fdbbb172c58c1898607a7f82806cf55e.tar.gz
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.
-rw-r--r--MANUAL.txt2
-rw-r--r--data/docx/word/styles.xml5
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs2
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 @@
<w:semiHidden />
<w:unhideWhenUsed />
</w:style>
- <w:style w:type="table" w:default="1" w:styleId="TableNormal">
- <w:name w:val="Normal Table" />
+ <w:style w:type="table" w:default="1" w:styleId="Table">
+ <w:name w:val="Table" />
+ <w:basedOn w:val="TableNormal" />
<w:semiHidden />
<w:unhideWhenUsed />
<w:qFormat />
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)] ()