泰晓科技 -- 聚焦嵌入式 Linux - 追本溯源,见微知著!
网站地址:http://tinylab.org
微信公众号关注我们新浪微博


扫一扫

关注 @泰晓科技
原创服务 | 实验云台 | 共享书籍 | 开放源码
请稍侯

Use tables in Pandoc's Markdown

Wu Zhangjin 创作于 2014/01/11

by Falcon of TinyLab.org 2014/01/11

Issue

The standard Markdown allows to add tables in HTML format, for exampe:

<table>
 <tr>
   <th>
     Head row1
   </th>
   <th>
     Head row2
   </th>
 </tr>
   
 <tr>
   <td>
     Content row1
   </td>
   <td>
     Content row2
   </td>
   
 </tr>
</table>

And it looks like:

Head row1Head row2
Content row1Content row2

But Pandoc doesn’t support it, Pandoc need pure text table, see the Tables section in Pandoc’s User Guide.

Solution

So, to make a table work with pandoc, we must use something like:

Head row1         Head row2
----------------  ----------------
  Content row1      Content row2