pandoc.table
単純な数値または (相対) 数値/パーセンテージのベクトルを取ることができる引数による列の幅の指定をサポートします。クイック デモ:split.cells
> pandoc.table(mytab, split.cells = c(1,1,58))
----------------------------------------------------------------------
col1 col2 col3
------ ------ --------------------------------------------------------
1 2001 This is a lengthy test that should wrap, and wrap again,
and again and again and again
2 2002 This is a lengthy test that should wrap, and wrap again,
and again and again and again
----------------------------------------------------------------------
上記のマークダウンを で HTML に変換すると、次の HTML になりますpandoc
。
<table>
<col width="9%" />
<col width="9%" />
<col width="77%" />
<thead>
<tr class="header">
<th align="center">col1</th>
<th align="center">col2</th>
<th align="center">col3</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td align="center">1</td>
<td align="center">2001</td>
<td align="center">This is a lengthy test that should wrap, and wrap again, and again and again and again</td>
</tr>
<tr class="even">
<td align="center">2</td>
<td align="center">2002</td>
<td align="center">This is a lengthy test that should wrap, and wrap again, and again and again and again</td>
</tr>
</tbody>
</table>