aboutsummaryrefslogtreecommitdiff
path: root/data/docx
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-01-12 09:49:10 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-01-12 09:49:10 -0800
commitc451207b08edc36fa5c2f1af5556a8d211e023ed (patch)
tree16ee2ea917660479dcbb8059ca70c846064e4127 /data/docx
parent4a223e68f42d23b34d0d13c20e8ecf5e4b16f8fe (diff)
downloadpandoc-c451207b08edc36fa5c2f1af5556a8d211e023ed.tar.gz
Docx writer: handle table header using styles.
Instead of hard-coding the border and header cell vertical alignment, we now let this be determined by the Table style, making use of Word's "conditional formatting" for the table's first row. For headerless tables, we use the tblLook element to tell Word not to apply conditional first-row formatting. Closes #7008.
Diffstat (limited to 'data/docx')
-rw-r--r--data/docx/word/styles.xml15
1 files changed, 15 insertions, 0 deletions
diff --git a/data/docx/word/styles.xml b/data/docx/word/styles.xml
index 6bb5a3f52..832b1b25b 100644
--- a/data/docx/word/styles.xml
+++ b/data/docx/word/styles.xml
@@ -350,6 +350,21 @@
<w:right w:w="108" w:type="dxa" />
</w:tblCellMar>
</w:tblPr>
+ <w:tblStylePr w:type="firstRow">
+ <w:tblPr>
+ <w:jc w:val="left"/>
+ <w:tblInd w:w="0" w:type="dxa"/>
+ </w:tblPr>
+ <w:trPr>
+ <w:jc w:val="left"/>
+ </w:trPr>
+ <w:tcPr>
+ <w:vAlign w:val="bottom"/>
+ <w:tcBorders>
+ <w:bottom w:val="single"/>
+ </w:tcBorders>
+ </w:tcPr>
+ </w:tblStylePr>
</w:style>
<w:style w:type="paragraph" w:customStyle="1" w:styleId="DefinitionTerm">
<w:name w:val="Definition Term" />