github 引入了 markdown 并对之进行拓展,这种由 github 衍生出来的 markdown 称为 GFM(Github Flavored Markdown)。
Markdown 不是想要取代 HTML,甚至也没有要和它相近,它的语法种类很少,只对应 HTML 标记的一小部分。Markdown 的构想不是要使得 HTML 文档更容易书写。在我看来, HTML 已经很容易写了。Markdown 的理念是,能让文档更容易读、写和随意改。HTML 是一种发布的格式,Markdown 是一种书写的格式。就这样,Markdown 的格式语法只涵盖纯文本可以涵盖的范围。
—— John Gruber
[TOC]
####### f
即一行文字,markdown 中换行必须进行手动操作(两个空格加换行符),自动换行将会变成一个空格
aaaaa 后无空格
aaaaa bbbbb
aaaaa 后两个空格
aaaaa
bbbbb
由数行文字成一段,markdown 中由空行划分段落
aaaaa、bbbbb 后面都接两个空格,因此会换行,但它们都是同一段落,或使用反斜杠
aaaaa
bbbbb
ccccc
aaaaa、bbbbb、ccccc 之间都间隔空行,因此划分为三段
aaaaa
bbbbb
ccccc
列表项目可以包含多个段落,每个项目下的段落都必须缩进 4 个空格或是 1 个制表符,通过在文本行之间留一个空白行,可创建新段落。
大多数的编辑器会忽略单行,为了让其它的Markdown编辑器识别你的换行符,可以在行尾留下两个空格或者插入<br/>标签。
- This is a list item with two paragraphs.
The second paragraph. - Suspendisse id sem consectetuer libero luctus adipiscing.
常规
强调1 强调2
斜体1 斜体2
删除线
下划线
下标 θ1 上标 θ^1^ 上^下^标
<!--注释-->
方框
this text is red
这是红色黑体5号字
++Inserted text++
==Marked text==
<mark>
- 无序列表
- item
- item
- 任务列表
- 列表缩进 Tab
-
有序列表
-
context
- item2
-
item3
hello段落嵌套
world引用嵌套
- item4
- item5
文本引用
- Quoted text1
> 1. Quoted text2
>多层级
行内代码System out println("Hello World");
如果要在代码区段内插入反引号,你可以用多个反引号来开启和结束代码区段
使用转义反引号
There is a literal backtick (`) here.
代码块1
System out println("Hello World");代码块2
System out println("Hello World");Indented code
// Some comments
line 1 of code
line 2 of code
line 3 of code
GFM 中还可以显示 diff 效果,即展示一个文件内容的增加与删除。绿色表示新增,红色表示删除。在三个反引号后面加上 diff 标识符,并且其代码块行头以 + 开头表示新增,- 开头表示删除。
+ 新增的内容
- 删除的内容内联公式
分割线三种表示
三种符号都可实现-_*
If
公式块 csM
锚点:每一个标题都是一个锚点,也可以用HTML方式定义锚点,需要注意以下问题:
- 标题中的英文字母都要被转化为小写字母
- 空格换成
- - 去除括号等
HTML字符 - 标题名相同时,第2个锚点引用时加后缀,如
标题-2 - GFM锚点也支持中文
超链接
foo
百度跳转链接 baidu.com - 加粗斜体的高亮效果
提示:链接文本不必一定是文本。图片或其他HTML元素都可以成为链接。
[跳转到样式](# 样式)
链接引用【也适用于图片】在任意位置定义URL
This is an example reference-style link.
支持自动从标准URL创建链接
https://www.bilibili.com
Email样式i@typora.io
| Column1 | Column2 | Column3 | Column4 | |的表示方法 |
|---|---|---|---|---|
| centered | right-aligned | left-aligned | |竖线内容| | | |
@octocat 👍 This PR looks great
🤡
🔥🔥🔥
You can 1 footnotes like this 2.
Footnote 1 link3.
Footnote 2 link4.
Inline footnote^[Text of inline footnote] definition.
Duplicated footnote reference4.
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->>Alice: Checking with John...
Alice->>John: Yes... John, how are you?
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
graph TD;
A-->B;
A-->C;
B-->D;
C-->D;
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"id": 1,
"properties": {
"ID": 0
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[-90,35],
[-90,30],
[-85,30],
[-85,35],
[-90,35]
]
]
}
}
]
}
{
"type": "Topology",
"transform": {
"scale": [0.0005000500050005, 0.00010001000100010001],
"translate": [100, 0]
},
"objects": {
"example": {
"type": "GeometryCollection",
"geometries": [
{
"type": "Point",
"properties": {"prop0": "value0"},
"coordinates": [4000, 5000]
},
{
"type": "LineString",
"properties": {"prop0": "value0", "prop1": 0},
"arcs": [0]
},
{
"type": "Polygon",
"properties": {"prop0": "value0",
"prop1": {"this": "that"}
},
"arcs": [[1]]
}
]
}
},
"arcs": [[[4000, 0], [1999, 9999], [2000, -9999], [2000, 9999]],[[0, 0], [0, 9999], [2000, 0], [0, -9999], [-2000, 0]]]
}
solid cube_corner
facet normal 0.0 -1.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 1.0 0.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
facet normal 0.0 0.0 -1.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 1.0 0.0 0.0
endloop
endfacet
facet normal -1.0 0.0 0.0
outer loop
vertex 0.0 0.0 0.0
vertex 0.0 0.0 1.0
vertex 0.0 1.0 0.0
endloop
endfacet
facet normal 0.577 0.577 0.577
outer loop
vertex 1.0 0.0 0.0
vertex 0.0 1.0 0.0
vertex 0.0 0.0 1.0
endloop
endfacet
endsolid
- Without the backslash, this would be a bullet in an unordered list.
* Without the backslash, this would be a bullet in an unordered list.
转义字符文档链接列出的字符都可以通过使用反斜杠字符从而达到转义目的。
content
[class] : default | primary | success | info | warning | danger.
[no-icon] : Disable icon in note.
| Background Color |
居中
左对齐
右对齐
I have a bikeI have a car
| header 1 | header 2 |
|---|---|
| row1,col1 | row1,col2 |
| row2,col1 | row2,col2 |
| Name | Telephone | |
|---|---|---|
| Bill Gates | 911 | 110 |
| First Name: | Bill Gates |
|---|---|
| Telephone: | 911 |
| 110 |
home
折叠摘要
折叠的内容This is HTML abbreviation example.
It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.
*[HTML]: Hyper Text Markup Language
::: warning here be dragons :::
{:toc}
