泰晓科技 -- 聚焦 Linux - 追本溯源,见微知著!
网站地址:http://tinylab.org

微信公众号关注我们知识星球
关注 @泰晓科技

与数百位一线 Linux 工程师做朋友,您准备好了吗?
分享 Linux 产品实战经验。与业界 Linux 专家交流。

请稍侯

Use tables in Pandoc's Markdown

Wu Zhangjin 创作于 2014/01/11


微信公众号知识星球
关注 @泰晓科技

与数百位一线 Linux 工程师做朋友,您准备好了吗?
分享 Linux 产品实战经验。与业界 Linux 专家交流。

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

Read Album:

Read Latest: