6. pandoc

6.2. pdf

参考:https://github.com/jgm/pandoc/wiki/Pandoc-with-Chinese

6.3. 生成docx模版

pandoc -o custom-reference.docx --print-default-data-file reference.docx

6.4. DIAGRAM支持

需要下列软件:

# 字符集
chcp 65001

pandoc -v
User data directory: C:\Users\kylec\AppData\Roaming\pandoc

# 将pandoc-ext/diagram克隆下来后,将diagram.lua和依赖目录拷贝到C:\Users\kylec\AppData\Roaming\pandoc\filters目录下。

# mermaid需要配置,dot好像不需要。
# 必须设置mmdc的环境变量,不设置会提示mmdc找不到,虽然能在cmd中where出来。
set MERMAID_BIN=D:\Program Files\nodejs\mmdc.cmd
"C:\Program Files\Pandoc\pandoc.exe" --verbose -s  -f markdown -t docx --reference-doc=custom-reference.docx --lua-filter diagram.lua -o 铁塔服务对接重构方案.docx 铁塔服务对接重构方案.md

参考: - https://github.com/mermaid-js/mermaid-cli - https://mermaid.js.org/syntax/timeline.html - https://www.graphviz.org/doc/info/command.html - https://plantuml.com/zh/starting - https://github.com/pandoc-ext/diagram/tree/main