Pandoc是使用Haskell语言编写的一款跨平台自由开源命令行界面标记语言转换工具,可实现不同标记语言间的格式转换,堪称该领域中的“瑞士军刀[3]

Quick Facts 原作者, 首次发布 ...
Pandoc
原作者John MacFarlane英语John MacFarlane (philosopher)
首次发布0.1 / 2006年8月14日,​18年前​(2006-08-14[1]
当前版本2.11.2(2020年11月20日,​3年前​(2020-11-20[2]
原始码库 编辑维基数据链接
编程语言Haskell
操作系统FreeBSD, NetBSD, Linux, Windows, Mac OS X
类型标记语言转换工具
许可协议GNU GPL[3]
网站pandoc.org
Close

Pandoc支持的标记语言格式

More information Pandoc可读取的源格式, Pandoc可生成的目标格式 ...
Pandoc可读取的源格式 Pandoc可生成的目标格式
Close

Pandoc的使用

Pandoc的基本指令格式是[4]

pandoc [options] [input-file] ...

简单的格式转换指令:

pandoc -o output.html input.md

其中-o ouput.html表示输出文件为output.html,input.md是输入文件。

Pandoc会根据文件的后缀名自动判断格式,用户也可以显式地指定输入文件和输出文件格式:

pandoc -f markdown -t html -o output.html input.md

其中-f markdown表示输入文件格式为Markdown,-t html表示输出文件格式为HTML。

详细的指令参数请参见Pandoc用户手册页面存档备份,存于互联网档案馆)。

参考资料

外部链接

Wikiwand in your browser!

Seamless Wikipedia browsing. On steroids.

Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.

Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.