Markdown教程

本文是一份Markdown教程,详细介绍了Markdown的基本语法,包括标题、区块引用、列表、代码块、链接、强调、代码、图片等。同时,文章还深入讲解了Markdown中支持的LaTeX数学公式,涵盖公式界定符、上下标、括号、分数等各类数学表达式的写法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Markdown教程


方便查阅

基本

标题

# 这是 H1

## 这是 H2

###### 这是 H6

区块引用

> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
> 
> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
> id sem consectetuer libero luctus adipiscing.

This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.

Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
id sem consectetuer libero luctus adipiscing.

列表

*   Red
*   Green
*   Blue
+   Red
+   Green
+   Blue
-   Red
-   Green
-   Blue
1.  Bird
2.  McHale
3.  Parish
  • Red
  • Green
  • Blue
  • Red
  • Green
  • Blue
  • Red
  • Green
  • Blue
  1. Bird
  2. McHale
  3. Parish

代码块

这是一个普通段落:

    这是一个代码区块。

这是一个普通段落:

这是一个代码区块。

分割线

* * *

***

*****

- - -

---------------------------------------

链接

This is [an example](http://example.com/ "Title") inline link.

[This link](http://example.net/) has no title attribute.

This is an example inline link.

This link has no title attribute.

强调

*single asterisks*

_single underscores_

**double asterisks**

__double underscores__

single asterisks

single underscores

double asterisks

double underscores

代码

Use the `printf()` function.

Use the printf() function.

​```python
print "hello world"
​```
print "hello world"

图片

![Alt text](/path/to/img.jpg)

![Alt text](/path/to/img.jpg "Optional title")

[外链图片转存失败(img-DEih5pA1-1566025177741)(/path/to/img.jpg)]

[外链图片转存失败(img-cwKAvRl8-1566025177741)(/path/to/img.jpg “Optional title”)]

列表

|标题|标题|标题|
|---|---|---|
|内容|内容|内容|
标题 标题 标题
内容 内容 内容

自动链接

<http://example.com/>

http://example.com/

反斜杠

Markdown 支持以下这些符号前面加上反斜杠来帮助插入普通的符号:

\   反斜线
`   反引号
*   星号
_   底线
{}  花括号
[]  方括号
()  括弧
#   井字号
+   加号
-   减号
.   英文句点
!   惊叹号

数学

公式界定符

$$
f(x)=ax^2+bx+c
$$

f ( x ) = a x 2 + b x + c f(x)=ax^2+bx+c f(x)=ax2+bx+c

上下标

$$
a^{xyz}
$$

a x y z a^{xyz} axyz

括号

$$
(x),[1+2],\{1,2,3\},\left(\frac{1}{x}\right)^y
$$

( x ) , [ 1 + 2 ] , { 1 , 2 , 3 } , ( 1 x ) y (x),[1+2],\{1,2,3\},\left(\frac{1}{x}\right)^y (x),[1+2],{ 1,2,3},(x1)y

分数

$$
\frac{x}{y+1}
$$

x y + 1 \frac{x}{y+1} y+1x

开方

$$
\sqrt{x^2+1},\sqrt[n]{20}
$$

x 2 + 1 , 20 n \sqrt{x^2+1},\sqrt[n]{20} x2+1 ,n20

省略号

$$
\ldots,\cdots,\ddots,\vdots
$$

… , ⋯   , ⋱ , ⋮ \ldots,\cdots,\ddots,\vdots ,,,

矢量

$$
\vec y,\vec{AB}
$$

y ⃗ , A B ⃗ \vec y,\vec{AB} y ,AB

极限

$$
\lim_{n \to +\infty} \frac{1}{n(n+1)}
$$

lim ⁡ n → + ∞ 1 n ( n + 1 ) \lim_{n \to +\infty} \frac{1}{n(n+1)} n+limn(n+1)1

累加累乘

$$
\sum_{i=1}^n \frac{1}{i^2},\prod_{i=1}^n \frac{1}{i^2}
$$

∑ i = 1 n 1 i 2 , ∏ i = 1 n 1 i 2 \sum_{i=1}^n \frac{1}{i^2},\prod_{i=1}^n \frac{1}{i^2}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值