安装
Archlinux下安装很简单
# pacman -S pandoc
使用
$ pandoc -hpandoc [OPTIONS] [FILES]Input formats: ?native, markdown, markdown+lhs, rst, rst+lhs, html, latex, latex+lhsOutput formats: ?native, html, html+lhs, s5, docbook, opendocument, odt, latex, latex+lhs, context, texinfo, man, markdown, markdown+lhs, plain, rst, rst+lhs, mediawiki, rtfOptions: ?-f FORMAT, -r FORMAT ?--from=FORMAT, --read=FORMAT ?????????????????????-t FORMAT, -w FORMAT ?--to=FORMAT, --write=FORMAT ??????????????????????-s ???????????????????--standalone ?????????????????????????????????????-o FILENAME ??????????--output=FILENAME ????????????????????????????????-p ???????????????????--preserve-tabs ????????????????????????????????????????????????????????--tab-stop=TABSTOP ?????????????????????????????????????????????????????--strict ???????????????????????????????????????????????????????????????--reference-links ????????????????????????????????-R ???????????????????--parse-raw ??????????????????????????????????????-S ???????????????????--smart ??????????????????????????????????????????-m[URL] ??????????????--latexmathml[=URL], --asciimathml[=URL] ???????????????????????????????--mathml[=URL] ?????????????????????????????????????????????????????????--mimetex[=URL] ????????????????????????????????????????????????????????--jsmath[=URL] ?????????????????????????????????????????????????????????--gladtex ????????????????????????????????????????-i ???????????????????--incremental ??????????????????????????????????????????????????????????--xetex ??????????????????????????????????????????-N ???????????????????--number-sections ??????????????????????????????????????????????????????--no-wrap ??????????????????????????????????????????????????????????????--sanitize-html ????????????????????????????????????????????????????????--email-obfuscation=none|javascript|references ?????????????????????????--id-prefix=STRING ?????????????????????????????????????????????????????--indented-code-classes=STRING ?????????????????????????????????????????--toc, --table-of-contents ?????????????????????????????????????????????--base-header-level=LEVEL ??????????????????????????????????????????????--template=FILENAME ??????????????????????????????-V FILENAME ??????????--variable=FILENAME ??????????????????????????????-c URL ???????????????--css=URL ????????????????????????????????????????-H FILENAME ??????????--include-in-header=FILENAME ?????????????????????-B FILENAME ??????????--include-before-body=FILENAME ???????????????????-A FILENAME ??????????--include-after-body=FILENAME ????????????????????-C FILENAME ??????????--custom-header=FILENAME ?????????????????????????-T STRING ????????????--title-prefix=STRING ??????????????????????????????????????????????????--reference-odt=FILENAME ?????????????????????????-D FORMAT ????????????--print-default-template=FORMAT ????????????????????????????????????????--data-dir=DIRECTORY ???????????????????????????????????????????????????--dump-args ????????????????????????????????????????????????????????????--ignore-args ????????????????????????????????????-v ???????????????????--version ????????????????????????????????????????-h ???????????????????--help
示例
$ pandoc -f markdown -t html -o demo.html demo.md