1. What is Markdown format

Markdown format is a markup language that can be written with a plain text editor. Users can simply format the text they write using a simple markup syntax. If you spend a lot of time on Github, you’ll notice that most projects have a readme.md project description file under them, which is written using Markdown. Nowadays, most blogging platforms such as CSDN, Blogpark, Nuggets, etc., basically support Markdown. If you need to publish articles on multiple platforms, it is a good idea to learn how to write content in Markdown.

And even if the wechat public account, we can also use third-party tools to typesetting, compared with the way before using Word to typesetting saves a lot of trouble, the implementation of the article more easily, no longer to adjust the format to adapt to different platforms.

2. The advantages

  • The grammar is simple and easy to learn, and more powerful than plain text;

  • Format conversion is convenient, compatibility is strong, readability is excellent;

  • Focus on content rather than typography;

  • Export PDF, HTML and other formats;

  • Migration and repeated editing will not cause formatting confusion;

3. Format

The title

For each additional level, add a # sign. Note: The space between the symbol and the content of the title should not be omitted. The specific format is as follows:

# Level 1 title
## Secondary title
### Level 3 title
#### Level 4 Title
##### Five-level title
######
Copy the code

The list of

Lists are divided into ordered lists and unordered lists;

  • Ordered list:Arabic numerals +. + Space + content, the specific format is as follows:
  1.Tim Duncan  2.Manu Binobili  3.Tony ParkerCopy the code

  • Unordered list:English bar + space + content, the specific format is as follows:
  - Apple
  - Orange
  - Banana
Copy the code

bold

Enclose the content with two *’s respectively, that is, ** + content + **. The specific format is as follows:

** Official account: Village Yuyao **
Copy the code

italics

It is similar to bold, but you only need to enclose * before and after the content, namely * + content + *. The format is as follows:

* Public account: Cun Yuyao *
Copy the code

Delete the line

To add a deletion line to the content, just surround it with two ~ before and after the content, namely ~~ + content + ~~, the specific format is as follows:

~~ Public account: Village Yuyao ~~Copy the code

The underline

To achieve the underline effect, use the HTML syntax + content + .

<u>Public account: Village Yuyao</u>
Copy the code

The divider

If you want to insert a dividing line between different pieces of content, you can use a separate line as follows:

Public number: village rain away - personal blog: https://cunyu1943.github.io - zhihu: https://www.zhihu.com/people/cunyu1943 -- -- --Copy the code

reference

To quote someone else, use the > + content format:

"> < p style =" max-width: 100%; clear: both;
Copy the code

The subscript

What do we do when we need to write chemical formulas or when we need to mark up or down indices?

  • Superscript:Content of ^ ^
  • The subscript:Content of ~ ~
1.superscript    H^2^O

2.The subscript    H~2~O
Copy the code

The highlighted

Highlighting may not be supported in some Markdown standards, but it is used here as == + content + == in the following format:

== Official account: Village Yuyao ==Copy the code

The task list

Task lists are things we often touch, such as our memos, completed events, and unfinished events. To achieve the same effect in Markdown, use the following format:

  • Has been completed:[x] + content
  • Not completed:[] + content
1.Unfinished task    -[] Public account: Cun Yuyao    -[a] personal blog: https://cunyu1943.github.io2.Completed Tasks    -[x] zhihu: https://www.zhihu.com/people/cunyu1943    - [x] CSDN:https://blog.csdn.net/github_39655029
Copy the code

Directory to generate

When we’re done writing an article and want to automatically generate the table of contents as in Word, we can use a separate line of [TOC] to do so, but be aware that some platforms may not support this. The format is as follows:

[TOC]
Copy the code

form

Tables in Markdown are also handy. We can use: to adjust the alignment of tables in the following format:

1.Left-aligned links platform | | | | : -- -- -- -- -- - | : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - | | | village public, rain remote | | | personal blog https://cunyu1943.github.io | | | zhihu | https://www.zhihu.com/people/cunyu19432.Center alignment links platform | | | | : -- -- -- -- -- - : | : -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - : Remote | | | | village public, rain | | personal blog https://cunyu1943.github.io | | zhihu | | https://www.zhihu.com/people/cunyu19433.Right-aligned links platform | | | | -- -- -- -- -- -- -- : | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- : Remote | | | | village public, rain | | personal blog https://cunyu1943.github.io | | zhihu | | https://www.zhihu.com/people/cunyu1943Copy the code

The formula

Markdown supports LaTeX syntax, which allows for interline formulas and individual formula blocks. The formulas are written in the same format as LaTeX syntax

  • Interline formula:$+ formula + $
  • Independent formula block:$$+ formula + $$
1.Leading formula    $x_1+x_2=0$

2.Independent formula block    $$x^2+y^2=0$$
Copy the code

The code block

Like formulas, code blocks can be divided into interline code blocks and independent code blocks. The difference is that they are enclosed by one or more ‘s in the following format:

Links and Images

The only difference between a link and an image is that the image needs to be first! , the two specific formats are as follows:

  • Links:[Url]
  • Image:! [Photo caption](URL)
1.Link [Village Yuyao's grocery store] (https://cunyu1943.site)

2.The picture! [Village Yuyao's grocery store] (https://cdn.jsdelivr.net/gh/cunyu1943/image-hosting-for-blog/blog/image-blogzhuye.png)
Copy the code

4. Editor recommendations

Well, after learning the above, do you want to try it immediately. In this case, let’s recommend a few editors to make you more efficient, PS: learn more shortcut keys to use, the effect is better!

  1. Typora: A multi-platform Markdown editor that supports exporting PDF, HTML, and other formats.

  1. MarkText: A cross-platform open source Markdown editor that supports bucket diagrams.

  1. Visual Studio Code: Visual Studio Code: Visual Studio Code: Visual Studio Code

5. Precautions

  1. MarkdownCompatible withHTMLRelated grammar;
  2. Special characters can be escaped\Display it;