当前位置:网站首页>One click generation and conversion of markdown directory to word format
One click generation and conversion of markdown directory to word format
2022-07-02 04:18: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 .
边栏推荐
- Pytoch --- use pytoch for image positioning
- Pandora IOT development board learning (RT thread) - Experiment 1 LED flashing experiment (learning notes)
- QT designer plug-in implementation of QT plug-in
- Play with concurrency: draw a thread state transition diagram
- Pytoch --- use pytoch to realize u-net semantic segmentation
- Feature Engineering: summary of common feature transformation methods
- 微信小程序 - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
- Wpviewpdf Delphi and Net PDF viewing component
- go 变量与常量
- What is 5g industrial wireless gateway? What functions can 5g industrial wireless gateway achieve?
猜你喜欢

Actual combat | use composite material 3 in application

WiFi 5GHz frequency

Play with concurrency: draw a thread state transition diagram

C language practice - binary search (half search)

Raspberry pie GPIO pin controls traffic light and buzzer

go 包的使用
![[C language] Dynamic Planning --- from entry to standing up](/img/7e/29482c8f3970bb1a40240e975ef97f.png)
[C language] Dynamic Planning --- from entry to standing up

Use of go package

整理了一份ECS夏日省钱秘籍,这次@老用户快来领走

Common sense of cloud server security settings
随机推荐
WiFi 5GHz frequency
Dare to go out for an interview without learning some distributed technology?
Homework of the 16th week
Pytorch---使用Pytorch进行图像定位
Lei Jun wrote a blog when he was a programmer. It's awesome
Pytoch --- use pytoch to realize u-net semantic segmentation
JVM知识点
Shutdown procedure after 60
Demonstration description of integrated base scheme
Actual combat | use composite material 3 in application
Finally got byte offer. The 25-year-old inexperienced perception of software testing is written to you who are still confused
PIP installation of third-party libraries
如何解决在editor模式下 无法删除物体的问题
uni-app - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
What is 5g industrial wireless gateway? What functions can 5g industrial wireless gateway achieve?
Websites that it people often visit
Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
go 变量与常量
Major domestic quantitative trading platforms
Which product of anti-cancer insurance is better?