当前位置:网站首页>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 .
边栏推荐
- 【提高课】ST表解决区间最值问题【2】
- Sword finger offer II 006 Sort the sum of two numbers in the array
- Shenzhen will speed up the cultivation of ecology to build a global "Hongmeng Oula city", with a maximum subsidy of 10million yuan for excellent projects
- okcc为什么云呼叫中心比传统呼叫中心更好?
- Realizing deep learning framework from zero -- Introduction to neural network
- Wechat applet - realize the countdown of 60 seconds to obtain the mobile verification code (mobile number + verification code login function)
- powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
- [live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
- Typescript practice for SAP ui5
- How to model noise data? Hong Kong Baptist University's latest review paper on "label noise representation learning" comprehensively expounds the data, objective function and optimization strategy of
猜你喜欢

How much can a job hopping increase? Today, I saw the ceiling of job hopping.

MySQL advanced SQL statement 2

pip 安装第三方库

Dare to go out for an interview without learning some distributed technology?

A thorough understanding of the development of scorecards - the determination of Y (Vintage analysis, rolling rate analysis, etc.)

C language practice - number guessing game

CorelDRAW Graphics Suite2022免费图形设计软件

Spring recruitment of Internet enterprises: Kwai meituan has expanded the most, and the annual salary of technical posts is up to nearly 400000

Delete the code you wrote? Sentenced to 10 months!

Three years of experience in Android development interview (I regret that I didn't get n+1, Android bottom development tutorial
随机推荐
Wpviewpdf Delphi and Net PDF viewing component
Pytorch yolov5 exécute la résolution de bogues à partir de 0:
MySQL advanced SQL statement 2
Okcc why is cloud call center better than traditional call center?
Go variables and constants
SQL: common SQL commands
Realizing deep learning framework from zero -- Introduction to neural network
Introduction to vmware workstation and vSphere
Use a mask to restrict the input of the qlineedit control
Recyclerview add header
Is the product of cancer prevention medical insurance safe?
Pytorch---使用Pytorch进行图像定位
Yolov5 network modification tutorial (modify the backbone to efficientnet, mobilenet3, regnet, etc.)
C language: examples of logical operation and judgment selection structure
Deeply understand the concepts of synchronization and asynchrony, blocking and non blocking, parallel and serial
Major domestic quantitative trading platforms
Pytorch-Yolov5從0運行Bug解决:
初识P4语言
Fluent icon demo
go 语言命名规范