pandoc =========== .. toctree:: :maxdepth: 2 :caption: 目录: widdershins <../widdershins/index> pdf ----------- 参考:https://github.com/jgm/pandoc/wiki/Pandoc-with-Chinese 生成docx模版 ----------------------------- .. code-block:: bash pandoc -o custom-reference.docx --print-default-data-file reference.docx DIAGRAM支持 ------------------------------ 需要下列软件: - pandoc - https://github.com/pandoc-ext/diagram/tree/main - GraphViz,需要安装二进制文件 - Mermaid,需要安装npm install -g @mermaid-js/mermaid-cli - PlantUML,需要安装二进制文件 .. code-block:: text # 字符集 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