5/26/2016

Pandoc 在 Ubuntu 中的安装与使用

参考文档

安装

  • 参考上述文档

文件转换

markdowndocx

$ pandoc 01-chapter2.markdown -o chapter2.docx -c Github.css

markdownpdf

  • 首先,需要配置好latex环境
  • 查看中文字体
$ fc-list -f "%{family}\n"  :lang=zh
  • pandoc中的pdf模板
$ pandoc -D latex > template.latex
  • 转换
$ pandoc -f markdown -t latex -s -M mainfont:SimSun -M sansfont:SimSun -M monofont:SimHei --latex-engine=xelatex -o aa.pdf -M geometry:"top=1in,inner=1in,outer=1in,bottom=1in,headheight=3ex,headsep=2ex" --template=./template.tex ubuntu_latex.md

没有评论:

发表评论

Cloudflare R2 + WebP Cloud + uPic 免费图床方案

搭建免费全球可访问的图床方案:Cloudflare R2 + WebP Cloud + uPic