pandoc.table
단순한 숫자 또는 벡터를 취할 수 split.cells
인수 통해 specifying the width of columns 지원 (상대) 번호/비율 빠른 데모 :이 변환 후 다음 HTML 결과
> 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에 위의 마크 다운은 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>
감사합니다. 좀 더주의 깊게 읽어야합니다 : split.cells "벡터로도 제공 될 수 있습니다" –