当前位置:网站首页>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 .
边栏推荐
- Basic operation of database and table ----- phased test II
- 微信小程序:全新独立后台月老办事处一元交友盲盒
- Outlook:总是提示输入用户密码
- Win:将一般用户添加到 Local Admins 组中
- Redis(1)之Redis简介
- 【纯音听力测试】基于MATLAB的纯音听力测试系统
- Hand drawn video website
- Outlook: always prompt for user password
- Redis master-slave replication cluster and recovery ideas for abnormal data loss # yyds dry goods inventory #
- Intel sapphire rapids SP Zhiqiang es processor cache memory split exposure
猜你喜欢
[flutter topic] 64 illustration basic textfield text input box (I) # yyds dry goods inventory #
Five ways to query MySQL field comments!
Game 280 of leetcode week
微信小程序:独立后台带分销功能月老办事处交友盲盒
Main window in QT application
Incremental backup? db full
One plus six brushes into Kali nethunter
To sort out messy header files, I use include what you use
Arbitrum: two-dimensional cost
Async/await you can use it, but do you know how to deal with errors?
随机推荐
Global and Chinese markets of radiation linear accelerators 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets of emergency rescue vessels (errv) 2022-2028: Research Report on technology, participants, trends, market size and share
One plus six brushes into Kali nethunter
微信小程序:独立后台带分销功能月老办事处交友盲盒
Mysql database | build master-slave instances of mysql-8.0 or above based on docker
[development of large e-commerce projects] performance pressure test - Performance Monitoring - heap memory and garbage collection -39
Global and Chinese market of nutrient analyzer 2022-2028: Research Report on technology, participants, trends, market size and share
Discrete mathematics: reasoning rules
线上故障突突突?如何紧急诊断、排查与恢复
Database performance optimization tool
Four pits in reentrantlock!
Win:将一般用户添加到 Local Admins 组中
Blue Bridge Cup Square filling (DFS backtracking)
[OpenGL learning notes 8] texture
Main window in QT application
Package What is the function of JSON file? What do the inside ^ angle brackets and ~ tilde mean?
如果消费互联网比喻成「湖泊」的话,产业互联网则是广阔的「海洋」
Wechat applet: Xingxiu UI v1.5 WordPress system information resources blog download applet wechat QQ dual end source code support WordPress secondary classification loading animation optimization
Basic operations of database and table ----- create index
视频网站手绘