1, Introduction to Markdown
Is a lightweight markup language
(it's super easy to write notes anyway)
Strongly recommended by Typore (but it seems to charge)
2, Paragraphs and emphasis
*xax* //Italics _xax_ //Italics **yay** //Bold __yay__ //Bold ~~Delete line~~ //Delete line
effect:
xax
xax
yay
yay
Delete line
3, Title
3.1 Setext form title (I don't like it very much)
Title 1 = Title 2 -
Title 1
Title 2
3.2 Atx format title (highly recommended)
# Title 1 ## Title 2 #### Title 4 ###### Title 6
Title 1
Title 2
Title 4
Title 6
Up to 6 levels of titles are supported. Generally, level 4 is the limit. Try to level 3
4, Link
Form 1: []() []: Put logo text (): Put link [Baidu](www.baidu.com) Form 2 I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3]. //Must wrap [1]: http://google.com/ "Google" [2]: http://search.yahoo.com/ "Yahoo Search" [3]: http://search.msn.com/ "MSN Search"
I get 10 times more traffic from Google than from Yahoo or MSN.
5, Picture
Form 1: ![]() ![Alt text](/path/to/img.jpg "Optional title") ![keyboards](https://img-blog.csdnimg.cn/20210112151738537.jpg "study hard") Form 2: ![Alt text][id] [id]: url/to/image "Optional title attribute" ![Git curriculum][git] //There must be a new line here [git]: https://img-blog.csdnimg.cn/20210112151738537.jpg
Markdown has no way to specify the width and height of the image. If necessary, you can use the tags in HTML
<img src="https://img-blog. csdnimg. cn/20210112151738537. Jpg "width =" 300px "height =" 200px "ALT =" study hard ">
6, List
6.1 unordered list
//+* - same effect, unordered list * Banana * Apple * Peach + Banana + Apple + Peach - Banana - Apple - Peach
- Banana
- Apple
- Peach
- Banana
- Apple
- Peach
- Banana
- Apple
- Peach
6.2 with sequence table
1. Apple 2. Banana 3. Peach 1987\. Meijiaer //avoidable
- Apple
- Banana
- Peach
1987. Meijiaer
6.3 escape of markdown
Markdown supports adding a backslash before the following symbols to transfer, so as to insert ordinary symbols in markdown:
\ Backslash ` backquote * asterisk _ Underline {} Braces / Curly bracket [] Brackets / square brackets () parentheses / brackets # Well number + plus - minus sign . English full stop ! exclamatory mark
Can be nested
1. first day * get up * having dinner * work - Check email - Write code // A code block open CODE CHINA ![computer](https://img-blog.csdnimg.cn/20210113112904841.jpeg) var x =1000; - test - release * sleep 2. the second day 3. on the third day
- first day
- get up
- having dinner
- work
-
Check email
-
Write code
// A code block
Open CODE CHINAvar x =1000;
-
test
-
release
-
- sleep
- the second day
- on the third day
CSDN may not work well
6.4 task list
- [x] get up - [x] having dinner - [ ] work - [ ] sleep
- get up
- having dinner
- work
- sleep
// nesting - [x] get up - [ ] having dinner - [x] Boiled Egg - [ ] to toast bread - [ ] Hot Milk 1. [X] work 1. [x] Check email 2. [x] Write code 3. [ ] release 2. [ ] sleep
- get up
- having dinner
- Boiled Egg
- to toast bread
- Hot Milk
- work
- Check email
- Write code
- release
- sleep
7, Split line and reference
7.1 dividing line
*** --- ____
7.2 references
> Perl Inventor of language Larry Wall A good programmer has three virtues: laziness, impatience and arrogance(Laziness, Impatience and hubris). > > > Programmers have three virtues: laziness, impatience and arrogance—— **Larry Wall** > > Laziness will make you make great efforts to avoid consuming too much energy. It urges you to write energy-saving programs that others can use. For this reason, you will write perfect documents to prevent others from asking you too many questions. Impatient, when you find the computer lazily does not give results. So you write better code and can really solve the problem as soon as possible. At least it seems so. Arrogance, extreme self-confidence, so that you have the confidence to write(Or maintenance)A program that others can't find fault with. > > ## Three virtues of programmers > > 1. lazy > 2. Impatience > 3. arrogant > > Here is an example of the code: > > return shell_exec("echo $input | $markdown_script");
Larry Wall, the inventor of Perl, said that good programmers have three virtues: laziness, impatience and hubris.
Programmers have three virtues: laziness, impatience and arrogance—— Larry Wall
Laziness will make you make great efforts to avoid consuming too much energy. It urges you to write energy-saving programs that others can use. For this reason, you will write perfect documents to prevent others from asking you too many questions.
Impatient, when you find the computer lazily does not give results. So you write better code and can really solve the problem as soon as possible. At least it seems so.
Arrogance and extreme self-confidence give you the confidence to write (or maintain) programs that others can't find fault.
Three virtues of programmers
- lazy
- Impatience
- arrogant
Here is an example of the code:
return shell_exec("echo $input | $markdown_script");
8, Code block
In line code 1.8
Form:`` `asdasd`
asdasd
8.2 indent display code
To create a code block in Markdown is also very simple. You can simply indent 4 blanks or 1 tab. For example, enter the following:
This is an ordinary paragraph:
This is a code block.
Click to view the conversion effect in Markdown
This is an ordinary paragraph:
This is a code block.
The indent (4 blanks or 1 tab) of each line level will be removed, for example:
Here is a sample code:
tell application "Foo"
beep
end tell
Click to view the conversion effect in Markdown
Here is a sample code:
tell application "Foo" beep end tell
A block of code will continue until the line without indentation (or the end of the document).
In the code block, &, <, and > will be automatically converted into HTML entities. This way makes it very easy for you to use Markdown to insert the original sample code of HTML, for example:
<div class="footer"> © 2004 Foo Corporation </div>
8.3 highlight code snippets
Add the language type after ` ` `
8.4 Diff syntax
var foo = 'bar'; + var x = 200; * var x = 100;
9, Forms
- The first row contains the header and is separated by a "vertical bar" (|)
- The title of the second row is separated from the cell and must contain three or more dashes
- The third row and any subsequent rows contain cell values
It should be noted that:
- You cannot separate cells into multiple rows in Markdown. They must remain single row, and HTML can be used if necessary
Mark to force a line break on the content - The length of the second row of cells does not need to be consistent with the title, but must be separated by a vertical line (|)
- There can be blank cells
| header 1 | header 2 | header 3 | | --- | ------ |---------:| | cell 1 | cell 2 | cell 3 | | cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It will eventually wrap the text when the cell is too large for the display size. | | cell 7 | | cell <br> 9 |
header 1 | header 2 | header 3 |
---|---|---|
cell 1 | cell 2 | cell 3 |
cell 4 | cell 5 is longer | cell 6 is much longer than the others, but that's ok. It will eventually wrap the text when the cell is too large for the display size. |
cell 7 | cell 9 |
In addition, you can add a colon(:),Specify the text alignment of each column, such as: | header 1 | header 2 | header 3 | |:-------- | :------: | --------:| | left-aligned Text left | centered Text centered | right-aligned Text right | | `:---` The left colon indicates**Content and title block**Align left | `:--:` Colons at both ends**Content and title block**Center alignment | `---:` The right colon indicates**Content and title block**Align right |
header 1 | header 2 | header 3 |
---|---|---|
Left aligned text left | centered text | Right aligned text to the right |
: --- the colon on the left indicates that the content is aligned to the left of the title bar | : --: colons at both ends indicate that the content is centered and aligned with the title bar | ---: the colon on the right indicates that the content and title bar are aligned to the right |
10, Attach
10.1 article contents
@[TOC](The title of the catalogue can also be left blank)
10.2 highlight
==xixixi==
xixixi
10.3 Latex syntax
The most complete Markdown + Latex writing skills
New skill: using LaTeX in Markdown