当前位置:网站首页>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 .
边栏推荐
- Is it safe to open an account with first venture securities? I like to open an account. How can I open it?
- First acquaintance with P4 language
- [source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
- C language guessing numbers game
- 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
- Is the product of cancer prevention medical insurance safe?
- Monkey test
- First acquaintance with string+ simple usage (II)
- Pytoch yolov5 runs bug solution from 0:
- Yolov5 network modification tutorial (modify the backbone to efficientnet, mobilenet3, regnet, etc.)
猜你喜欢

C language practice - number guessing game

Play with concurrency: what's the use of interruptedexception?
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/e1/620443dbc6ea8b326e1242f25d6d74.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)

Sorted out an ECS summer money saving secret, this time @ old users come and take it away

Wpviewpdf Delphi and Net PDF viewing component

"No war on the Western Front" we just began to love life, but we had to shoot at everything

Pytorch---使用Pytorch进行鸟类的预测

C language practice - binary search (half search)

WPViewPDF Delphi 和 .NET 的 PDF 查看组件

Spring moves are coming. Watch the gods fight
随机推荐
FAQ | FAQ for building applications for large screen devices
Li Kou interview question 02.08 Loop detection
[JS event -- event flow]
Www2022 | know your way back: self training method of graph neural network under distribution and migration
Fluent icon demo
Yolov5网络修改教程(将backbone修改为EfficientNet、MobileNet3、RegNet等)
Cloud service selection of enterprises: comparative analysis of SaaS, PAAS and IAAs
Okcc why is cloud call center better than traditional call center?
Pytoch yolov5 runs bug solution from 0:
MySQL error: expression 1 of select list is not in group by claim and contains nonaggre
Where can I buy cancer insurance? Which product is better?
Pandora IOT development board learning (HAL Library) - Experiment 2 buzzer experiment (learning notes)
Hand tear - sort
C语言猜数字游戏
Hands on deep learning (II) -- multi layer perceptron
手撕——排序
How to solve the code error when storing array data into the database
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
Opencv learning example code 3.2.4 LUT
Common locks in MySQL