pandoc
pandoc copied to clipboard
Centering cell content in a grid table
In both latex/pdf and docx output, pandoc is not centering properly. Issue raised/described at pandoc-discuss here. (Not including the table here because I can't get the font to cooperate.)
Here's a more minimized version:
+:------------:+:--------------:+
| Heading 1 | Heading 2 |
+---+----+-----+----+------+----+
| A | B | C | D | E | F |
+---+----+-----+----+------+----+
HTML5 output:
<table style="width:40%;">
<colgroup>
<col style="width: 5%" />
<col style="width: 6%" />
<col style="width: 7%" />
<col style="width: 6%" />
<col style="width: 8%" />
<col style="width: 6%" />
</colgroup>
<tbody>
<tr class="odd">
<td colspan="3" style="text-align: center;">Heading 1</td>
<td colspan="3">Heading 2</td>
</tr>
<tr class="even">
<td style="text-align: center;">A</td>
<td style="text-align: center;">B</td>
<td>C</td>
<td>D</td>
<td>E</td>
<td>F</td>
</tr>
</tbody>
</table>
Note that Heading 1 is centered but Heading 2 is not. Also strange is the centering of the cells on the next line: A and B are centered, but C and D, E, F are not.
Reference for the addition of row/colspans to grid tables: #8202 @tarleb - any thoughts?
I'll have a look.