CSDN-markdown使用实践(测试)

零、LaTex数学公式

通过在线LaTeX公式编辑器可以直接生成LeTaX公式,然后复制到博客中并在两端加上“$”符号即可,例:

$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $
$$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$

效果:
x=b±b24ac2a

x=b±b24ac2a

一、标题格式

n级标题的语法为#n级标题,例:

# 一级标题
## 
$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}$二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题

二、列表

1.无序列表

无序列表语法为:“-”+“空格”+“内容”,例:

- 无序列表1
- 无序列表2

效果为:(此行的下一行必须为空行)

  • 无序列表1
  • 无序列表2
  • 无序列表3

2.有序列表

有序列表的语法为:“数字”+“.”+“内容”例:

1. 有序列表1
2. 有序列表2
3. 有序列表3

效果为:(此行的下一行必须为空行)

  1. 有序列表1
  2. 有序列表2
  3. 有序列表3

三、引用

引用的语法为:“>”+“内容”,例

>这个是引用
> 是不是和电子邮件中的
> 引用格式很像

这个是引用
是不是和电子邮件中的
引用格式很像

四、粗体斜体

如下,一个“*”为斜体,两个“*”为粗体

**这个是粗体**
*这个是斜体*
***这个是粗体加斜体***

效果为:
这个是粗体
这个是斜体
这个是粗体加斜体

五、链接与图片

1.链接

写法为“[”+“内容”+“]”+“(”+“网址”+“\)”

[link text](http://example.com/ "optional title")

[link text][id1]
[id1]: http://example.com/ "optional title here"

效果为:
link text

2.图片

插入互联网上图片,格式如下:

![这是百度](https://www.baidu.com/img/baidu_jgylogo3.gif)

![这是百度][picture_of_baidu]
[picture_of_baidu]: https://www.baidu.com/img/baidu_jgylogo3.gif

效果如下:
这是百度

这是百度

六、表格

可以使用冒号来定义表格的对齐方式,如下:

| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |

效果:

Tables Are Cool
col 3 is right-aligned $1600
col 2 is centered $12
zebra stripes are neat $1

参考:

1.CSDN官方的Markdown语法帮助

2.Rachel-Zhang的在博客中用latex写公式

你可能感兴趣的:(CSDN入门,latex,博客,编辑器)