Pandoc
Pandoc 开始 install pandoc install miktext build 中文要选择合适的字体否则无法成功创建 fc-list mac: brew install fontconfig fc-list :lang-zh > fonts.txt fc-list -f “%{family}\n” :lang=zh 参数解释 -o: 输出文件 –from: 输入文件类型 –template: 模版文件 –listings: 列表 –pdf-engine: pdf生成用的引擎 -V: 参数 CJKmainfont: 中文文字字体 pandoc "README.md" -o "document.pdf" --from markdown --template "./template.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="PingFang SC" && open document.pdf data-dir DATADIR macos: ~/.local/share/pandoc windows: C:\Users\USERNAME\AppData\Roaming\pandoc defaults $DATADIR/defaults/docker.yaml,可以为不同的文档设置自己的defaults,避免后面重复操作,仅需使用pandoc --defaults docker即可打包文档 from: markdown # reader: may be used instead of from: to: pdf # writer: may be used instead of to: # leave blank for output to stdout: output-file: docker.pdf # leave blank for input from stdin, use [] for no input: input-files: - 阿里云仓库.md - 管理工具.md - 加速.md - 扩容.md - 清理.md - 容器导出和导入.md - 私有registry.md - debian-docker-install.md - env.md - logs.md - usage.md # or you may use input-file: with a single value # pdf-engine: wkhtmltopdf pdf-engine: xelatex self-contained: false standalone: true metadata: author: - Peter titlepage: true toc-own-page: true toc: true number-sections: true # code block wrap listings: true variables: CJKmainfont: KaiTi template: eisvogel verbosity: ERROR log-file: log.json filters: - mermaid-filter.cmd from: markdown # reader: may be used instead of from: to: pdf # writer: may be used instead of to: # leave blank for output to stdout: output-file: docker.pdf # leave blank for input from stdin, use [] for no input: input-files: - 阿里云仓库.md - 管理工具.md - 加速.md - 扩容.md - 清理.md - 容器导出和导入.md - 私有registry.md - debian-docker-install.md - env.md - logs.md - usage.md # or you may use input-file: with a single value # pdf-engine: wkhtmltopdf pdf-engine: xelatex self-contained: false standalone: true metadata: author: - Peter titlepage: true toc-own-page: true toc: true number-sections: true # code block wrap listings: true variables: CJKmainfont: KaiTi template: eisvogel verbosity: ERROR log-file: log.json filters: - mermaid-filter.cmd template 设置为系统配置,eisvogel.latex,github ...