^v^

知行合一 止于至善

使用pandoc转换markdown文件

22 Dec 2017 » 工具


缘起

macdown pandoc

安装

brew install pandoc

格式转换

markdown格式转换为html格式

pandoc  report.md -f markdown+smart -t html -o test3.html -c test.css --toc -s

下载styles

markdown格式转换为pdf格式

pandoc deploy.md --from='markdown+grid_tables+pipe_tables+raw_html+implicit_figures+footnotes+intraword_underscores+auto_identifiers-inline_code_attributes+smart' --standalone --self-contained --highlight-style=tango --top-level-division=chapter --table-of-contents --variable papersize='a4paper' --template=pm-template.latex --pdf-engine=xelatex --output=deploy.pdf --toc-depth=6

--toc-depth指定toc的级数,默认为3级。

安装pdf-engine

查看字体

command + space 输入fontbook,打开字体册,查看已经安装的字体。

参考资料

  1. 在Mac中使用LATEX的方法
  2. https://mirrors.tuna.tsinghua.edu.cn/CTAN/systems/mac/mactex/mactex-20170524.pkg
  3. pandoc中文pdf转换攻略

Related Posts