Why use Markdown? This is a problem. There are many kinds of answers. For example, not limited to the format, such as the .xls
document should be opened with Excel, the .doc
document must be opened with Word, you .xxx
have to use XXX open it. If you do not have this software on the machine, it is not flying blind, can you study happily?! So you need a format or tag that can be written with a simple text editor, a browser that can be displayed normally, and markdown well. What, this reason is not good? Then the right when it is loaded B, you say you write documents with Markdown, is not forced to go up. (Alas, it is only the novice of me to show off, Daniel is disdain.) )
Body
28 law says:
20% of the knowledge to solve 80% of the problem.
In fact, you just have to master the basic grammatical markers to play happily. After months of writing documents using Markdown, you can find the following markup syntax to complete your daily document writing. What the? Want to draw a flowchart? These requirements for most of the time, you do not have to use, you just need to build a knowledge reserve just fine. Do you have a problem? Open it and look at it. Want to remember? I'm sorry, this kind of work, or less to do, after all, time is sulfuric acid, tube you are what can be corrupted, just how fast or slow it is.
So the question comes, why do these few commonly used to remember? Because these are often used, although practice makes perfect, the day will be remembered, but on the road of practice practice can not be turned every day to look at the knowledge reserve it. affect efficiency too much. Why not spend a little time forcibly remembering, then in the long-remembered road, is not bon voyage? Gossip doesn't say much, just look at the grammar tags you need to master. If you want to learn and use markdown, I recommend:
- commonly used markers to spend some time to memorize, often used after the words will form a habit, but the normal writing of the brain, with the same as typing;
- The common Mark should have the basic impression, can remember also can;
- infrequently used markers and special tags just look just fine, wait until the use of Baidu a bit, you know .
[TOC]
1. Common Mark 1.1 title
1.1.1 Description
- Using the
#
representation heading, the first level header uses one #
, level two headings use two ##
, and so on, there are six levels of headings.
- Use
=====
to represent the higher-order headings, using the representation of the ---------
secondary headings.
1.1.2 Example
# 这是一级标题## 这是二级标题### 这是三级标题###### 这是六级标题这是一级标题========这是二级标题--------------
This is a headline, this is level two heading, this is level three heading, this is level six heading, this is level heading, this is grade two heading.
1.1.3 Note
#
It's best to add a space between the headings. Don't ask me why, seemingly sometimes not be identified as the title? Have forgotten why they have to add a space, perhaps wayward.
====
And ----
represents a title, greater than or equal to 2 can be represented.
- I usually use the title tag in the title rating, which is very useful.
1.2 Catalog
1.2.1 Description
Use the [TOC]
build directory. As shown in the starting directory.
1.2.2 Example
[TOC]
[TOC]
1.2.3 Note
- If your title is written in markdown syntax, you can automatically generate a hierarchical directory.
- I used to Note notes for notes, but unfortunately for the notes do not support [TOC] Mark, a sad story.
[TOC]
Tags may be placed in front of a first-level heading, depending on the compiler.
1.3 References
1.3.1 Description
Use >
a representation reference, which >>
means that a reference is nested inside a layer of references, and so on.
1.3.2 Example
Example 1:
> 这是一级引用>>这是二级引用>>> 这是三级引用>这是一级引用
This is a one-tier reference
This is a level two reference.
This is a level three reference.
This is a one-tier reference
Example 2:
> 这是一级引用>>这是二级引用>>> 这是三级引用>这是一级引用
This is a one-tier reference
This is a level two reference.
This is a level three reference.
1.3.3 Note
- If
>
>>
used with nesting, you >>
>
must add a space or a transition between them when you fall back, >
otherwise the default is the same level of reference as the next line and the previous line. As shown in the example.
- Other tags can be used in reference tags, such as sequential or unordered list tags, code tags, and so on.
- I usually use a reference mark when quoting someone else's words or when I do it at some point , but I'm not sure if it's the right thing to use a reference tag. If you know, I just want to say: Please be sure to tell me.
1.4 Code Blocks
1.4.1 Description
Use "' to denote a block of code.
1.4.2 Example
"' JavaScript
var canvas = document.getElementById ("Canvas");
var context = Canvas.getcontext ("2d");
```
var canvas = document.getElementById("canvas");var context = canvas.getContext("2d");
1.4.3 Note
- ' This symbol is under the
Esc
key and can be switched to English.
- The code that follows is the
javascript
JavaScript code, and markdown uses the JavaScript code color rendering itself. You can also not write here. PS: Who can provide a complete list of languages that markdown can render, such as: What does the Linux command write here?
- This document uses code blocks to mark all examples of markdown syntax markup.
1.5 In-line code
1.5.1 Description
Use ' ' to represent inline code.
1.5.2 Example
这是`javascript`代码
This is the javascript
code
1.5.3 Note
- The English letters in the middle of the text on this page are tagged with inline code tags.
- I'm also a little vague about the use of this scene. I often use it when I have English in the text, but sometimes I don't know whether to use it or not. If you know, please tell me.
1.6 Importing pictures
1.6.1 Description
Use the ![Alt text](/path/to/img.jpg "Optional title")
import picture. which
Alt text
The text to display if the picture cannot be displayed;
/path/to/img.jpg
As the path of the picture;
Optional title
To display the caption. The display effect is that when you put the mouse on the picture, a small box prompt appears, the content of the hint is Optional title
inside.
1.6.2 Example
![Markdown](http://images.cnitblog.com/blog/404392/201501/122257231047591.jpg)
1.6.3 Note
- The imported picture paths can use absolute paths or relative paths, and we recommend using relative paths.
- My usual practice is to create a Pictures folder in the same directory as the markdown document, with all the required images in it, and if you have more pictures, you can also create sub-folders in the Pictures folder.
1.7 List
1.7.1 description
Use 1. 2. 3.
*
or -
or represent an unordered list using a table that represents a sequence +
.
1.7.2 Example
Example 1: Ordered list
1. 第一点2. 第二点4. 第三点
- 1th
- 2nd
- 3rd
Example 2: Unordered list
+ 呵呵 * 嘉嘉 - 嘻嘻 - 吼吼 - 嘎嘎 + 桀桀* 哈哈
1.7.3 Note
- There is a space between the unordered list or the ordered table tag and the text that follows it.
- The sequence table markers are not displayed according to the numbers you write, but are displayed based on where the current sequence table marks are located, as shown in Example 1.
- Unordered list bullets are progressive in the hierarchical relationship of solid circles, hollow circles, solid squares, as shown in Example 2. Typically, the same level is represented by the same tag, making it easy to view and manage.
- The use of unordered lists and ordered list markers is also very clear, so don't say much.
1.8 Bold and italic
1.8.1 description
Use **
or __
represent a bold body.
Use *
or _
represent italics.
1.8.2 Example
**粗体1** __粗体2__ *斜体1* _斜体2_
Bold 1 Bold 2
Italic 1 Italic 2
1.8.3 Note
*
_
There can be no spaces between the front and back or the font to be bold or italic .
- I usually use the bold mark when emphasizing, the bold distinction in and one row, and also the emphasis when using the tilt mark, where the use of the tilt mark is not clear. If you know: Be sure to tell me.
1.9 Table
1.9.1 description
See examples for how to use them.
------:
to right-align.
:------
To align to the left.
:------:
To align to the center.
-------
To use the default center alignment.
1.9.2 Example
| Serial number | Trade name | Trading Instructions | Notes | | ------: | :-------: | :---------| ------ || 1 | prfcfg | menu Configuration | The correspondence between all transaction codes and menus can be queried through this transaction | | 2 | gentmo | compiling all Trades | | | 100000 | sysdba | database table Model Summary | |
Serial Number |
Trade name |
Trading Instructions |
Notes |
1 |
Prfcfg |
Menu configuration |
The correspondence between all transaction codes and menus can be queried through this transaction. |
2 |
Gentmo |
Compiling all Trades |
|
100000 |
Sysdba |
database table Model Rollup |
|
1.9.3 Note
- Each markdown parser is different and may not be represented in the same way as the center alignment.
1.10 Dividing line
1.10.1 description
Use ---
or ***
or * * *
represent a horizontal split line.
1.10.2 Example
---**** * *
1.10.3 Note
*
-
A parallel line can be formed as long as or greater than or equal to three.
---
when used as a horizontal split line, empty a line around it to prevent it from ---
being represented as a caption marker.
1.11 Links
1.11.1 description
Use [](link "Optional title")
represents inline links. which
[]
The content inside is the text you want to add the link to.
link
As the link address.
Optional title
To display the caption. The display effect is that after you put the mouse on the link, a small box prompt appears, the content of the hint is Optional title
inside.
The reference link is shown in the example.
1.11.2 Example
Example 1: Inline links
这就是我们常用的地址:[Baidu](www.baidu.com "百度一下,你就知道" )
This is our usual address: Baidu
Example 2: Reference link
这就是我们常用的地址:[Baidu][1][1]:www.baidu.com "百度一下,你就知道"
This is our usual address: Baidu
1.11.3 Note
- The effects of reference links and inline links are the same, with pros and cons. The inline connection is clear and understandable, and the address of the link can be clearly known, but it is not easy to use multiple times. A reference link can be reused, but not immediately aware of the link's address.
- The use of the scene is very clear, not much to say.
1.11 Back Slash
1.11.1 description
Uses a backslash to represent a backslash \
. You can use backslashes when you do not want to display the markdown tag.
1.11.2 Example
\*这里不会显示斜体\*
* Italics are not shown here *
1.11.3 Note
No.
1.12 Spaces
1.12.1 description
Markdown syntax ignores whitespace at the beginning of the first line, and if you want to reflect the effect of an empty two at the beginning of the first line, you can use the space under the full-width symbol to switch under Windows shift+空格
.
1.12.2 Example
No.
1.12.3 Note
No.
2. Secondary common markers
# # # 2.1 Label Categories
2.1.1 Description
Use 标签:
or Tags:
indicate a label tag.
2.1.2 Example
标签: 数学 英语Tags: 数学 英语
2.1.3 Note
标签:
or Tags:
a colon to use a half-width colon.
- This tag is basically not used, but the scenario should be a collation. Easy to quickly understand article classification. Is it possible to traverse a tag tag in some way? Not very well understood. If you know: please tell me.
2.2 Delete a line
2.2.1 Description
Use ~~
represents a strikethrough.
2.2.2 Example
~~这是一条删除线~~
This is a strikethrough
2.2.3 Note
- Note
~~
There can be no spaces between the text you want to add strikethrough to.
- I often use the display to tell myself that this line of text is to be deleted.
2.3 Footnotes
2.3.1 Description
Use [^footer] to denote footnotes.
2.3.2 Example
这是一个注脚测试[^footer1]。[^footer1]: 这是一个测试,用来阐释注脚。
This is a footnote test [^footer1].
2.3.3 Note
- I often use footnote marks when I need to explain a noun, or a book, or a person.
3. Not commonly used Mark 3.1 implement in-page jump
3.1.1 Description
Use HTML code to implement in-page jumps. Define an anchor at the location you want to jump to <span id = "jump">hehe</span>
, and then use the [你好](#jump)
effect that will be 你好
set to a click to jump to the hehe
location.
3.1.2 Example
[你好](#jump)<span id = "jump">hehe</span>
How are you doing
Hehe
3.1.3 Note
No.
4. Special Use Mark
4.1 Flowchart
After summing it up, now I completely did not use, no need to summarize the first.
4.2 Latex Formula
After summing it up, now I completely did not use, no need to summarize the first.
Write it in the back.
- [TOC] does not support AH does not support, see no effect.
- Who has a better way to show markdown in the blog park, like the homework tribe.
The above is what I learned, and then after a few months of use summed up, for my common use of the classification. If there is a wrong description of the place, welcome criticism, common progress.
Markdown, you just have to master these.