美文网首页
markdown 生成 包含中文的pdf 文件

markdown 生成 包含中文的pdf 文件

作者: Devest | 来源:发表于2018-01-10 09:26 被阅读0次

虽然 markdown 最初是用来作为生成 html 文件的前端的,但是用熟悉了之后,也想用在其它地方。例如用来生成 pdf 文件。

pandoc

mac下用brew install pandoc来安装。
还需要xelatex
使用如下命令

pandoc --pdf-engine=xelatex -V mainfont="Heiti SC Light" hello.md -o hello.pdf

其中 --pdf-engine 是说明使用 xelatex 引擎。而 -V 是给 xelatex 传递参数。

相关文章

网友评论

      本文标题:markdown 生成 包含中文的pdf 文件

      本文链接:https://www.haomeiwen.com/subject/febnnxtx.html