I'm trying to create a document generation workflow (professional documents). The goal is to write as much as possible in Markdown. The resulting document should be PDF, while still being able to export to .docx if necessary.
I've settled on Pandoc, for which I'll create a Latex template and use a YAML document to hold the document metadata. So far so good. However, from time to time I need to use tables, ranging from very simple ones to more complex layouts with e.g. column spanning.
Markdown is hardly usable for anything but the most simple tables. I tried HTML to define a more complex table layout, but it seems that Pandoc doesn't know how to handle column or row spanning.
Short of defining the table completely in Latex, if there any other alternative that allows an easy to maintain approach to defining tables while still being able to convert them with Pandoc to Latex/PDF?
An example of a more complex table (taken from here):
<body>
<table border="1">
<!-- First row -->
<tr>
<td>1</td>
<td colspan="2">2 and 3</td>
<td>4</td>
</tr>
<!-- Second row -->
<tr>
<td rowspan="3">5, 9 and 13</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
<!-- Third row -->
<tr>
<td>10</td>
<td>11</td>
<td>12</td>
</tr>
<!-- Fourth row -->
<tr>
<td colspan="3">14, 15 and 16</td>
</tr>
</table>
</body>
This is the result in PDF: