[Pandoc]文档转换工具
Pandoc是一个通用的文档转换器
安装
下载pandoc并安装
sudo dpkg -i pandoc*.deb
sudo apt-get install -f
测试
$ pandoc -v
pandoc 1.19.2.1
Compiled with pandoc-types 1.17.0.4, texmath 0.9, skylighting 0.1.1.4
Default user data directory: /home/zj/.pandoc
Copyright (C) 2006-2016 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
格式转换
pandoc支持许多标记语言之间的转换,比如markdown、json、html、lua、reStructuredText等等

目前比较关心的是markdown和rst之间的转换,使用如下命令
pandoc test.md -f markdown -t rst -s -o test1.rst
test.md是源文件-f表示源文件格式-t表示结果文件格式-s表示生成独立文件-o表示结果文件名
经过测试发现确实有用,能够部分解决sphinx中markdown数学公式和表格的渲染问题