@breakerthb
2018-10-13T05:47:26.000000Z
字数 856
阅读 1512
md
VS Code插件完成
pandoc
下载pandoc
官网下载链接:https://github.com/jgm/pandoc/releases/tag/2.2
根据自己的操作系统位数下载合适的msi安装包,我下载的是:pandoc-2.2-windows-x86_64.msi
把安装的路径C:\Users\Frank\AppData\Local\Pandoc\
加入环境变量:
C:\Users\Administrator.PC-20170728DWIF>pandoc -v
pandoc 2.2
Compiled with pandoc-types 1.17.4.2, texmath 0.10.1.2, skylighting 0.7.0.2
Default user data directory: C:\Users\Administrator.PC-20170728DWIF\AppData\Roaming\pandoc
Copyright (C) 2006-2018 John MacFarlane
Web: http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
配置bat批处理文件:
创建文本文件,写入一行代码pandoc -s test.md -o test.docx
,命名为md2doc.bat;
此批处理文件将调用pandoc将test.md转换为test.docx;
将需要转换的md文件与bat文件放在同一文件夹下;
点击md2doc.bat,闪烁cmd黑窗口,然后出现docx文件,转换成功。
拖动md文件到bat文件上自动转换。
@echo off
echo %1
set str=%1
::echo %str%
pandoc -s %1 -o %1.docx