go-org-orgwiki/org/testdata/tables.html
Niklas Fasching f28f400d7e Add table pretty printing & alignment
Also dismissed implementing colgroups for now - had it but didn't like the
added complexity for a very questionable benefit - i've actually never used
that feature of org tables...
2018-12-14 15:49:40 +01:00

117 lines
2 KiB
HTML

<figure>
<table>
<thead>
<tr>
<th class="align-right">a</th>
<th class="align-right">b</th>
<th class="align-right">c</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-right">1</td>
<td class="align-right">2</td>
<td class="align-right">3</td>
</tr>
</tbody>
</table>
<figcaption>
table with separator before and after header
</figcaption>
</figure>
<figure>
<table>
<thead>
<tr>
<th class="align-right">a</th>
<th class="align-right">b</th>
<th class="align-right">c</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-right">1</td>
<td class="align-right">2</td>
<td class="align-right">3</td>
</tr>
</tbody>
</table>
<figcaption>
table with separator after header
</figcaption>
</figure>
<figure>
<table>
<tbody>
<tr>
<td class="align-right">1</td>
<td class="align-right">2</td>
<td class="align-right">3</td>
</tr>
</tbody>
</table>
<figcaption>
table without header (but separator before)
</figcaption>
</figure>
<figure>
<table>
<tbody>
<tr>
<td class="align-right">1</td>
<td class="align-right">2</td>
<td class="align-right">3</td>
</tr>
</tbody>
</table>
<figcaption>
table without header
</figcaption>
</figure>
<figure>
<table>
<thead>
<tr>
<th class="align-left">left aligned</th>
<th class="align-right">right aligned</th>
<th class="align-center">center aligned</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-left">42</td>
<td class="align-right">42</td>
<td class="align-center">42</td>
</tr>
<tr>
<td class="align-left">foobar</td>
<td class="align-right">foobar</td>
<td class="align-center">foobar</td>
</tr>
</tbody>
</table>
<figcaption>
table with aligned columns
</figcaption>
</figure>
<figure>
<table>
<thead>
<tr>
<th class="align-right">long column a</th>
<th class="align-right">long column b</th>
<th class="align-right">long column c</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-right">1</td>
<td class="align-right">2</td>
<td class="align-right">3</td>
</tr>
</tbody>
</table>
<figcaption>
table with right aligned columns (because numbers)
</figcaption>
</figure>