当前位置:网站首页>One click generation and conversion of markdown directory to word format
One click generation and conversion of markdown directory to word format
2022-07-05 01:35:00 【Mingmingruyue senior】
One 、 background
Usually as a technician , I prefer to write technical articles or columns typora To write markdown Format , Because you don't need to pay much attention to format , Let me pay more attention to the content .
But if the article has many chapters , Hope to automatically generate directories . also , In some scenarios, you need to markdown The file to word perhaps pdf Format .
A simple way is to markdown Paste the bear In the notes , Click again to generate the directory , And then export to PDF, however bear Derived from PDF Is the charge , What about swelling ?
Here is a free conversion method .
Two 、 operation
2.1 install pandoc
According to your system , Select the corresponding installation package : https://github.com/jgm/pandoc/releases
2.2 Carry out orders
2.2.1 Generate Directory
On the command line cd To the destination folder
pandoc -s --toc --toc-depth=3 “xxxx.md” -o “xxxx2.md”
–toc-depth=3 Indicates how many levels of directories to generate
If markdown The file name has some special characters , You need to put double quotes
Open the target markdown file , Discovery directory has been generated , Click to jump to the target location
2.2.2 Turn into Word
The order is as follows
pandoc -f markdown -t docx “xxxx2.md” -o “xxxx2.docx”
Conversion success , One of the pictures cannot be parsed ( This can be handled manually later ).
2.2.3 Turn into PDF
The order is as follows :
pandoc xxx.md --pdf-engine=xelatex -o xxxx.pdf
2.2.4 turn epub Format
pandoc xxx.md -o xxxx.epub
Other instructions refer to https://pandoc.org/demos.html
3、 ... and 、 summary
quite a lot markdown The bottom layer of tool conversion format is used pandoc , If the conversion part of the tool is charged , Everyone can make plenty of food and clothing by themselves .
边栏推荐
- [Chongqing Guangdong education] National Open University spring 2019 1042 international economic law reference questions
- Interesting practice of robot programming 16 synchronous positioning and map building (SLAM)
- Application and Optimization Practice of redis in vivo push platform
- [OpenGL learning notes 8] texture
- ROS command line tool
- 整理混乱的头文件,我用include what you use
- Kibana installation and configuration
- [development of large e-commerce projects] performance pressure test - Performance Monitoring - heap memory and garbage collection -39
- 【纯音听力测试】基于MATLAB的纯音听力测试系统
- I was beaten by the interviewer because I didn't understand the sorting
猜你喜欢

Expansion operator: the family is so separated

Main window in QT application

Chia Tai International Futures: what is the master account and how to open it?

phpstrom设置函数注释说明

MySQL backup and recovery + experiment

Take you ten days to easily complete the go micro service series (IX. link tracking)

微信小程序:微群人脉微信小程序源码下载全新社群系统优化版支持代理会员系统功能超高收益

Do you know the eight signs of a team becoming agile?

MySQL REGEXP:正则表达式查询

微信小程序:独立后台带分销功能月老办事处交友盲盒
随机推荐
Lsblk command - check the disk of the system. I don't often use this command, but it's still very easy to use. Onion duck, like, collect, pay attention, wait for your arrival!
Robley's global and Chinese markets 2022-2028: technology, participants, trends, market size and share Research Report
Introduction to the gtid mode of MySQL master-slave replication
Heartless sword English translation of Xi Murong's youth without complaint
无心剑英译席慕容《无怨的青春》
Postman automatically fills headers
视频网站手绘
Wechat applet: exclusive applet version of the whole network, independent wechat community contacts
220213c language learning diary
Package What is the function of JSON file? What do the inside ^ angle brackets and ~ tilde mean?
Database postragesql client authentication
Analysis and comparison of leetcode weekly race + acwing weekly race (t4/t3)
MySQL regexp: Regular Expression Query
Take you ten days to easily complete the go micro service series (IX. link tracking)
【大型电商项目开发】性能压测-性能监控-堆内存与垃圾回收-39
Introduction to the gtid mode of MySQL master-slave replication
142. Circular linked list II
Game 280 of leetcode week
What is the current situation and Prospect of the software testing industry in 2022?
Yyds dry goods inventory [Gan Di's one week summary: the most complete and detailed in the whole network]; detailed explanation of MySQL index data structure and index optimization; remember collectio