目录
注1:Markdown实际上是不支持排版的,因此其中一些语法如文字居中等,借助的是HTML语法(MD支持)。
注2:插入目录
[TOC]
一、代码段
1、简单代码
code上下两行为:'''。
test code1
test code2
2、大段代码
空行+4blanks or Tab+ code
code1
code2
二、块注释 Blockquote
> test1
> test2
test1
test2
还可以嵌套:
> test main
>
>> test att
>
> test return
test main
test att
test return
三、标题设置
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
四、字体
1、斜体
*test*
_test2_
test
test2
2、粗体
**test**
__test2__
test
test2
3、下划线
方案1:行内 HTML
<u>test</u>
test
方案2:html的span标签、设置行内CSS的border-bottom属性
<span style="border-bottom:2px dashed blue;">所添加的需要加下划线的行内文字</span>
所添加的需要加下划线的行内文字
4、中划线
~~test~~
test
5、居中
<center>
test
</center>
6、红色字体
<font color=#FF0000 face="黑体">test</font>
test
其他颜色参见网络。
7、分割线
___(3个"_"或减号"-")
五、列表
1、有序列表
要加空格。
1. test
2. test2
3. test3
- test
- test2
- test3
2、无序列表
要加空格。
建议一个文档只用一种方法。
* test*
+ test+
- test-
- test*
- test+
- test-
3、勾选
- [ ] 不勾选
- [x] 勾选
- [ ] 不勾选
- [x] 勾选
六、链接Links
1、内联
类似于超链接。
This is an [example link](http://example.com/)
This is an example link
2、引用
I get 10 times more traffic from [Google][1] than from [Yahoo][2] or [MSN][3].
[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.
七、图片
1、本地图片
请改成你的本地路径。这里肯定显示不出来。
内联

引用
![alt text][id]
[id]: /E:/XING/壁纸/victoria-bilsborough-232767.jpg "Beatiful Painting"
2、网络图片

3、图片格式
参见:https://blog.csdn.net/YhL_Leo/article/details/50099843
最常用的:图片居中和按比例缩放:
<center>
<img src="http://cupcake.nilssonlee.se/wp-content/uploads/2014/08/IMG_8263.jpg" width="50%" />
</center>

八、脚注
hello[^ref1]
test test
[^ref1]: also 'hi'
hello[^ref1]
test test
[^ref1]: also 'hi'
脚注在本文最后,有链接返回。
九、表格
1、一般语法
Name | Gender | Age
--|--|-
Ryan | Male | 21
Cathy | Female | 21
Name | Gender | Age |
---|---|---|
Ryan | Male | 21 |
Cathy | Female | 21 |
2、内容居中、靠左或靠右
- 默认左对齐
:- 左对齐
-: 右对齐
:-: 居中
- 代表宽度权重(单位比例),但有些编辑器不解析该语法,即所有列都一样宽。
Name | Gender | Age
:--|:--:|-:
Ryan | Male | 21
Cathy | Female | 21
Name | Gender | Age |
---|---|---|
Ryan | Male | 21 |
Cathy | Female | 21 |
十、公式
几个好链接:
行内公式:
两个 $ 之间输入公式,即,$ mathjax公式 $
独占一行公式:
两两 $$ 间输入公式,即,$$ mathjax公式 $$
$$x^{y^z}=(1+{\rm e}^x)^{-2xy^w}$$
\[x^{y^z}=(1+{\rm e}^x)^{-2xy^w}\]
粗体:
$$\mathbf {test}$$
\[\mathbf {test}\]
黑板字:
$$\mathbb {test}$$
\[\mathbb {test}\]
粗斜体:
$$\boldsymbol {test}$$
\[\boldsymbol {test}\]
十一、流图
需要mermaid编辑器。参见https://mermaidjs.github.io/
十二、HTML语法补充
1、空行
test
<br/>
test
test
test