CSDN_md语法总结
@[TOC](这里写目录标题)
一、标题
一级标题
二级标题
三级标题
四级标题
五级标题
六级标题
# 一级标题
## 二级标题
### 三级标题
#### 四级标题
##### 五级标题
###### 六级标题
二、文本样式
强调文本 强调文本
加粗文本 加粗文本
标记文本
标记文本,同上
删除文本
下划线
小号字体
大号字体
引用文本
H2O is是液体。
210 运算结果是 1024。
*强调文本* _强调文本_
**加粗文本** __加粗文本__
==标记文本==
<mark>标记文本,同上</mark>
~~删除文本~~
<u>下划线</u>
<small>小号字体<small>
<big>大号字体</big>
> 引用文本
H~2~O is是液体。
2^10^ 运算结果是 1024。
三、列表
- 项目
- 项目
- 项目
- 项目
- 项目1
- 项目2
- 项目3
- 计划任务
- 完成任务
- 项目
* 项目
+ 项目
1. 项目1
2. 项目2
3. 项目3
- [ ] 计划任务
- [x] 完成任务
四、图片
图片:
带尺寸的图片:
宽度确定高度等比例的图片:
高度确定宽度等比例的图片:
居中的图片:
居中并且带尺寸的图片:
居右的图片:
图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png)
带尺寸的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png =60x60)
宽度确定高度等比例的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png =60x)
高度确定宽度等比例的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png =x60)
居中的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png#pic_center)
居中并且带尺寸的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png#pic_center =60x60)
居右的图片: ![Alt](https://img-home.csdnimg.cn/images/20220524100510.png#pic_right)
多图片并排
! [描述] (图片链接) ! [描述] (图片链接) ! [描述] (图片链接)
要一张图片接着一张图片的语法写,中间不能有换行。如果换行的话,图片也换行。
如果图片过大可能无法实现。
<img src="https://img-blog.csdnimg.cn/img_convert/0a5105902d0514dd7846305d5768ae2c.jpeg" alt="艾斯" style="zoom:25%;" /><img src="https://img-blog.csdnimg.cn/direct/7e424f9ec2254c74b9fcb770152b22d6.png" alt="路飞" style="zoom: 50%;" /><img src="https://tse1-mm.cn.bing.net/th/id/OIP-C.vpt4yR5fwL9T3ZesMBgLBQHaHa?w=146&h=180&c=7&r=0&o=5&dpr=1.3&pid=1.7" alt="萨博" style="zoom: 60%;" />
- 以表格的形式
路飞 | 艾斯 | 萨博 |
---|---|---|
![]() | ![]() | ![]() |
- 使用HTML中的语法
![](https://img-blog.csdnimg.cn/img_convert/3f4b0ed08f96684660eb9b39db4fb94b.jpeg)
<!--居中并排显示-->
<center class="half">
<img src="https://img-blog.csdnimg.cn/2019012511060017.png" width=00/>
<img src="https://img-blog.csdnimg.cn/2019012511060017.png" width=200/>
</center>
![](https://img-blog.csdnimg.cn/img_convert/55bbcf19f63b64a514747d6641adf4a2.jpeg)
![](https://img-blog.csdnimg.cn/img_convert/7f6ff39dd5656f9f989fea1ee24d631a.jpeg)
![](https://img-blog.csdnimg.cn/img_convert/f807167745bdc04ab57aff2a978eee27.jpeg)
<!--左对齐并排显示-->
<figure>
<img src="https://img-blog.csdnimg.cn/2019012511060017.png" width=200/>
<img src="https://img-blog.csdnimg.cn/2019012511060017.png" width=200/>
<img src="https://img-blog.csdnimg.cn/2019012511060017.png" width=200/>
</figure>
![]() |
![]() |
![]() |
![]() |
<!--并排显示在表格里,可以调节大小-->
<table>
<tr>
<td ><center><img src="https://img-blog.csdnimg.cn/img_convert/f6feac0857ed9afa5747cb91a5de2a4e.jpeg" >图1 </center></td>
<td ><center><img src="https://img-blog.csdnimg.cn/img_convert/edc2bff2d89f6423189dbc1124f7e417.jpeg" >图2 </center></td>
</tr>
<tr>
<td><center><img src="https://img-blog.csdnimg.cn/img_convert/fce685248e007fd702655bd64e1fb668.jpeg" >图3 </center></td>
<td ><center><img src="https://img-blog.csdnimg.cn/img_convert/68362624a18f6f7d9c7bb1e6f50329a6.jpeg" >图4 </center> </td>
</tr>
</table>
五、链接
链接: link
链接: [link](https://www.csdn.net/)
六、代码片
下面展示一些 内联代码片
。
// A code block
var foo = 'bar';
```
// A code block
var foo = 'bar';
```
// An highlighted block
var foo = 'bar';
```javascript
// An highlighted block
var foo = 'bar';
```
七、表格
项目 | Value |
---|---|
电脑 | $1600 |
手机 | $12 |
导管 | $1 |
Column 1 | Column 2 |
---|---|
centered 文本居中 | right-aligned 文本居右 |
项目 | Value
-------- | -----
电脑 | $1600
手机 | $12
导管 | $1
| Column 1 | Column 2 |
|:--------:| -------------:|
| centered 文本居中 | right-aligned 文本居右 |
八、注脚
一个具有注脚的文本。1
一个具有注脚的文本。[^1]
[^1]: 注脚的解释
九、注释
Markdown将文本转换为 HTML。
Markdown将文本转换为 HTML。
*[HTML]: 超文本标记语言
十、自定义列表
-
Markdown
- Text-to- HTML conversion tool Authors
- John
- Luke
Markdown
: Text-to-HTML conversion tool
Authors
: John
: Luke
十一、数学公式
行内公式:$公式
行间公式:$$公式
参考文档
Gamma公式展示
Γ
(
n
)
=
(
n
−
1
)
!
∀
n
∈
N
\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N
Γ(n)=(n−1)!∀n∈N 是通过 Euler integral
Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=∫0∞tz−1e−tdt.
[参考文档](https://khan.github.io/KaTeX/)
Gamma公式展示 $\Gamma(n) = (n-1)!\quad\forall
n\in\mathbb N$ 是通过 Euler integral
$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$
1.分数、平方、下标、省略号、开根号
算式 | markdown |
---|---|
7 x + 5 1 + y 2 \frac{7x+5}{1+y^2} 1+y27x+5 | $\frac{7x+5}{1+y^2}$ |
x y x^y xy | $x^y$ |
. . . ... ... | $...$ |
2 \sqrt{2} 2; 3 n \sqrt[n]{3} n3 | $\sqrt{2}$;$\sqrt[n]{3}$ |
2、行间公式、矢量、积分、极限、累加累乘
算式 | markdown |
---|---|
d d x e a x = a e a x \frac{d}{dx}e^{ax}=ae^{ax} dxdeax=aeax \quad ∑ i = 1 n ( X i − X ‾ ) 2 \sum_{i=1}^{n}{(X_i - \overline{X})}^2 ∑i=1n(Xi−X)2} | $\frac{d}{dx}e^{ax}=ae^{ax}$ $\quad$ $\sum_{i=1}^{n}{(X_i - \overline{X})^2}$ } |
a ⃗ ⋅ b ⃗ = 0 \vec{a} \cdot \vec{b}=0 a⋅b=0 | $\vec{a} \cdot \vec{b}=0$ |
∫ 3 2 x 2 d x \int ^2_3 x^2 {\rm d}x ∫32x2dx | $\int ^2_3 x^2 {\rm d}x$ |
lim n → + ∞ n \lim_{n\rightarrow+\infty} n limn→+∞n | $\lim_{n\rightarrow+\infty} n$ |
∑ 1 i 2 \sum \frac{1}{i^2} ∑i21 | $\sum \frac{1}{i^2}$ |
∏ 1 i 2 \prod \frac{1}{i^2} ∏i21 | $\prod \frac{1}{i^2}$ |
3、希腊字母
小写 | 语法使用 | 大写 | 语法 |
---|---|---|---|
α \alpha α | \alpha | A \Alpha A | \Alpha |
β \beta β | \beta | B \Beta B | \Beta |
γ \gamma γ | \gamma | Γ \Gamma Γ | \Gamma |
δ \delta δ | \Delta | Δ \Delta Δ | \Delta |
ϵ \epsilon ϵ | \epsilon | E \Epsilon E | \Epsilon |
ε \varepsilon ε | \varepsilon | ||
ζ \zeta ζ | \zeta | Z \Zeta Z | \Zeta |
η \eta η | \eta | H \Eta H | \Eta |
θ \theta θ | \theta | Θ \Theta Θ | \Theta |
ι \iota ι | \iota | I \Iota I | \Iota |
κ \kappa κ | \kappa | K \Kappa K | \Kappa |
λ \lambda λ | \lambda | Λ \Lambda Λ | \Lambda |
μ \mu μ | \mu | M \Mu M | \Mu |
ν \nu ν | \nu | N \Nu N | \Nu |
ξ \xi ξ | \xi | Ξ \Xi Ξ | \Xi |
ο \omicron ο | \omicron | O \Omicron O | \Omicron |
π \pi π | \pi | Π \Pi Π | \Pi |
ρ \rho ρ | \rho | P \Rho P | \Rho |
σ \sigma σ | \sigma | Σ \Sigma Σ | \Sigma |
τ \tau τ | \tau | T \Tau T | \Tau |
υ \upsilon υ | \upsilon | Υ \Upsilon Υ | \Upsilon |
ϕ \phi ϕ | \phi | Φ \Phi Φ | \Phi |
φ \varphi φ | \varphi | ||
χ \chi χ | \chi | X \Chi X | \Chi |
ψ \psi ψ | \psi | Ψ \Psi Ψ | \Psi |
ω \omega ω | \omega | Ω \Omega Ω | \Omega |
4.关系代数
-
选择
σ s n o = 1 ( S t u d e n t ) \sigma_{sno = 1}(Student) σsno=1(Student)
$\sigma_{sno = 1}(Student)$
σ s n o = 1 ∧ s a g e > 18 ∨ s s e x = " F " ( S t u d e n t ) \sigma_{sno = 1 \wedge sage >18 \vee ssex="F"}(Student) σsno=1∧sage>18∨ssex="F"(Student)
$\sigma_{sno = 1 \wedge sage >18 \vee ssex="F"}(Student)$
-
投影
Π s n o , c n o ( S t u d e n t ) \Pi_{sno,cno}(Student) Πsno,cno(Student)
$\Pi_{sno,cno}(Student)$
-
连接
S t u d e n t ⋈ S C Student \Join SC Student⋈SC
$Student \Join SC$
S t u d e n t ⋈ S C Student \bowtie SC Student⋈SC
$Student \bowtie SC$
S t u d e n t ⋈ S t u d e n t . S n o = S C . S n o S C Student \underset{Student.Sno=SC.Sno}\Join SC StudentStudent.Sno=SC.Sno⋈SC
$Student \underset{Student.Sno=SC.Sno}\Join SC$
-
外连接
-
笛卡尔积
S t u d e n t × S C Student \times SC Student×SC
$Student \times SC$
-
除
S C ÷ K SC \div K SC÷K
$SC \div K$
-
并
R ∪ S R \cup S R∪S
$R \cup S$
-
交
R ∩ S R \cap S R∩S
$R \cap S$
-
差
R − S R - S R−S
$R - S$
Π
S
n
a
m
e
(
Π
s
n
o
(
σ
C
p
n
o
=
′
5
′
(
C
o
u
r
s
e
)
⋈
S
C
)
⋈
Π
S
n
o
,
S
n
a
m
e
(
S
t
u
d
e
n
t
)
)
\Pi_{Sname}(\Pi_{sno}(\sigma_{Cpno='5'}(Course)\Join SC)\Join \Pi_{Sno,Sname}(Student))
ΠSname(Πsno(σCpno=′5′(Course)⋈SC)⋈ΠSno,Sname(Student))
$\Pi_{Sname}(\Pi_{sno}(\sigma_{Cpno='5'}(Course)\Join SC)\Join \Pi_{Sno,Sname}(Student))$
πSname (πsno (σCpno=′5′(Course) ⋈ SC) ⋈ π Sno,Sname (Student))
π~Sname~ (π~sno~ (σ~Cpno=′5′~(Course) ⋈ SC) ⋈ π ~Sno,Sname~ (Student))
- 集合
符号 | 语法 |
---|---|
∀ \forall ∀ | $\forall$ |
∈ \in ∈ | $\in$ |
∋ \ni ∋ | $\ni$ |
∉ \notin ∈/ | $\notin$ |
∉ \not\in ∈ | $\not\in$ |
⊂ \subset ⊂ | $\subset$ |
⊃ \supset ⊃ | $\supset$ |
⊆ \subseteq ⊆ | $\subseteq$ |
⊊ \subsetneq ⊊ | $\subsetneq% |
⊋ \supsetneq ⊋ | $\supsetneq$ |
⊇ \supseteq ⊇ | $\supseteq$ |
⊅ \not\supset ⊃ | $\not\supset$ |
⊄ \not\subset ⊂ | $\not\subset$ |
∪ \cup ∪ | $\cup$ |
⋃ \bigcup ⋃ | $\bigcup$ |
∩ \cap ∩ | $\cap$ |
⋂ \bigcap ⋂ | $bigcap$ |
∖ \setminus ∖ | $\setminus$ |
⨀ \bigodot ⨀ | $\bigodot$ |
R \mathbb{R} R | $\mathbb{R}$ |
Z \mathbb{Z} Z | $\mathbb{Z}$ |
∅ \emptyset ∅ | $\emptyset$ |
-逻辑
符号 | 语法 |
---|---|
∵ \because ∵ | $\because$ |
∴ \therefore ∴ | $\therefore$ |
p p p | $\p$ |
q ˉ → p \bar{q} \to p qˉ→p | $\bar{q} \to p$ |
¬ \lnot ¬ | $\lnot$ |
∧ \land ∧ | $\land$ |
∨ \lor ∨ | $\lor$ |
¬ q \lnot q ¬q | $\lont q$ |
∧ \wedge ∧ | $\wedge$ |
∨ \vee ∨ | $\vee$ |
∖ \setminus ∖ | $\setminus$ |
⋀ \bigwedge ⋀ | $\bigwedge$ |
⋁ \bigvee ⋁ | $\bigvee$ |
∖ \smallsetminus ∖ | $\smallsetminus$ |
5. 在字符中添加空格、添加注释文字、字体变换、更改文字颜色
- 字体变换
若要对公式的某一部分字符进行字体转换,可以用 =={\字体 {需转换的部分字符}} ==命令,其中 \字体 部分可以参照下表选择合适的字体。
语法 | 说明 | 显示 |
---|---|---|
${\rm{Sample}}$ | 罗马体 | S a m p l e {\rm{Sample}} Sample |
${\it{Sample}}$ | 意大利体 | S a m p l e {\it{Sample}} Sample |
${\bf{Sample}}$ | 粗体 | S a m p l e {\bf{Sample}} Sample |
${\sf{Sample}}$ | 等线体 | S a m p l e {\sf{Sample}} Sample |
${\tt{Sample}}$ | 打字体机 | S a m p l e {\tt{Sample}} Sample |
${\frak{Sample}}$ | 旧德式字体 | S a m p l e {\frak{Sample}} Sample |
${\cal{Sample}}$ | 花体 | S a m p l e {\cal{Sample}} Sample |
${\Bbb{Sample}}$ | 黑板粗体 | S a m p l e {\Bbb{Sample}} Sample |
${\mit{Sample}}$ | 数学斜体 | KaTeX parse error: Undefined control sequence: \mit at position 2: {\̲m̲i̲t̲{Sample}} |
${\scr{Sample}}$ | 手写体 | KaTeX parse error: Undefined control sequence: \scr at position 2: {\̲s̲c̲r̲{Sample}} |
部分字体显示不出是因为不同markdown编辑器规则不同,大部分编辑器支持使用。
- 字符中添加空格
语法 | 显示 |
---|---|
a$\,$b | a \, b |
a$\;$b | a \; b |
a$\quad$b | a \quad b |
a$\qquad$b | a \qquad b |
- 添加注释文字
在 \text {文字} 中仍可以使用 公式 公式 公式 插入其它公式
$$
f(n)= \begin{cases}
n/2, & \text {if $n$ is even} \\
3n+1, & \text{if $n$ is odd}
\end{cases}
$$
f ( n ) = { n / 2 , if n is even 3 n + 1 , if n is odd f(n)= \begin{cases} n/2, & \text {if $n$ is even} \\ 3n+1, & \text{if $n$ is odd} \end{cases} f(n)={n/2,3n+1,if n is evenif n is odd
- 更改文字颜色
使用 ==\color{颜色}{文字} ==来更改特定的文字颜色。更改文字颜色 需要浏览器支持 ,如果浏览器不知道你所需的颜色,那么文字将被渲染为黑色。
对于较旧的浏览器(HTML4与CSS2),以下颜色是被支持的:
输入 | 显示 | 输入 | 显示 |
---|---|---|---|
black | t e x t \color{black}{text} text | grey | t e x t \color{grey}{text} text |
silver | t e x t \color{silver}{text} text | white | t e x t \color{white}{text} text |
maroon | t e x t \color{maroon}{text} text | red | t e x t \color{red}{text} text |
yellow | t e x t \color{yellow}{text} text | lime | t e x t \color{lime}{text} text |
olive | t e x t \color{olive}{text} text | green | t e x t \color{green}{text} text |
teal | c o l o r t e a l t e x t color{teal}{text} colortealtext | auqa | t e x t \color{auqa}{text} text |
blue | c o l o r b l u e t e x t color{blue}{text} colorbluetext | navy | t e x t \color{navy}{text} text |
purple | c o l o r p u r p l e t e x t color{purple}{text} colorpurpletext | fuchsia | t e x t \color{fuchsia}{text} text |
对于较新的浏览器(HTML5与CSS3),额外的124种颜色将被支持:
输入 \color {#rgb} {text} 来自定义更多的颜色,其中 #rgb 的 r g b 可输入 0-9 和 a-f 来表示红色、绿色和蓝色的纯度(饱和度)。
$$
\begin{array}{|rrrrrrrr|}\hline
\verb+#000+ & \color{#000}{text} & & &
\verb+#00F+ & \color{#00F}{text} & & \\
& & \verb+#0F0+ & \color{#0F0}{text} &
& & \verb+#0FF+ & \color{#0FF}{text}\\
\verb+#F00+ & \color{#F00}{text} & & &
\verb+#F0F+ & \color{#F0F}{text} & & \\
& & \verb+#FF0+ & \color{#FF0}{text} &
& & \verb+#FFF+ & \color{#FFF}{text}\\
\hline
\end{array}
$$
#000
t
e
x
t
#00F
t
e
x
t
#0F0
t
e
x
t
#0FF
t
e
x
t
#F00
t
e
x
t
#F0F
t
e
x
t
#FF0
t
e
x
t
#FFF
t
e
x
t
\begin{array}{|rrrrrrrr|}\hline \verb+#000+ & \color{#000}{text} & & & \verb+#00F+ & \color{#00F}{text} & & \\ & & \verb+#0F0+ & \color{#0F0}{text} & & & \verb+#0FF+ & \color{#0FF}{text}\\ \verb+#F00+ & \color{#F00}{text} & & & \verb+#F0F+ & \color{#F0F}{text} & & \\ & & \verb+#FF0+ & \color{#FF0}{text} & & & \verb+#FFF+ & \color{#FFF}{text}\\ \hline \end{array}
#000#F00texttext#0F0#FF0texttext#00F#F0Ftexttext#0FF#FFFtexttext
5. 添加删除线
在公式内使用 ==\require{cancel} ==来允许 片段删除线 的显示。声明片段删除线后,使用 ==\cancel{字符}、\bcancel{字符}、\xcancel{字符} 和 \cancelto{字符} ==来实现各种片段删除线效果
$$
\require{cancel}\begin{array}{rl}
\verb|y+\cancel{x}| & y+\cancel{x}\\
\verb|\cancel{y+x}| & \cancel{y+x}\\
\verb|y+\bcancel{x}| & y+\bcancel{x}\\
\verb|y+\xcancel{x}| & y+\xcancel{x}\\
\verb|y+\cancelto{0}{x}| & y+\cancelto{0}{x}\\
\verb+\frac{1\cancel9}{\cancel95} = \frac15+& \frac{1\cancel9}{\cancel95} = \frac15 \\
\end{array}
$$
6.等式、矩阵、方程式
- 等式
% 使用 \& 使 = 左对齐
$$
\begin{aligned}
(f,K^{'}_{x}y+K^{''}_{x}y)_{F}
&=(f^{'}+f^{''},K^{'}_{x}y+K^{''}_{x}y)_{F}\\
&=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}+(f^{'},K^{''}_{x}y)_{F}+(f^{''},K^{'}_{x}y)_{F}\\
&=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}\\
&=(f^{'}(x),y)_{Y}+(f^{''}(x),y)_{Y}\\
&=(f^{'}(x)+f^{''}(x),y)_{Y}\\
&=(f(x),y)_{Y}\\
&=(f,K_{x}y)_{F}
\end{aligned}
$$
(
f
,
K
x
′
y
+
K
x
′
′
y
)
F
=
(
f
′
+
f
′
′
,
K
x
′
y
+
K
x
′
′
y
)
F
=
(
f
′
,
K
x
′
y
)
F
+
(
f
′
′
,
K
x
′
′
y
)
F
+
(
f
′
,
K
x
′
′
y
)
F
+
(
f
′
′
,
K
x
′
y
)
F
=
(
f
′
,
K
x
′
y
)
F
+
(
f
′
′
,
K
x
′
′
y
)
F
=
(
f
′
(
x
)
,
y
)
Y
+
(
f
′
′
(
x
)
,
y
)
Y
=
(
f
′
(
x
)
+
f
′
′
(
x
)
,
y
)
Y
=
(
f
(
x
)
,
y
)
Y
=
(
f
,
K
x
y
)
F
\begin{aligned} (f,K^{'}_{x}y+K^{''}_{x}y)_{F} &=(f^{'}+f^{''},K^{'}_{x}y+K^{''}_{x}y)_{F}\\ &=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}+(f^{'},K^{''}_{x}y)_{F}+(f^{''},K^{'}_{x}y)_{F}\\ &=(f^{'},K^{'}_{x}y)_{F}+(f^{''},K^{''}_{x}y)_{F}\\ &=(f^{'}(x),y)_{Y}+(f^{''}(x),y)_{Y}\\ &=(f^{'}(x)+f^{''}(x),y)_{Y}\\ &=(f(x),y)_{Y}\\ &=(f,K_{x}y)_{F} \end{aligned}
(f,Kx′y+Kx′′y)F=(f′+f′′,Kx′y+Kx′′y)F=(f′,Kx′y)F+(f′′,Kx′′y)F+(f′,Kx′′y)F+(f′′,Kx′y)F=(f′,Kx′y)F+(f′′,Kx′′y)F=(f′(x),y)Y+(f′′(x),y)Y=(f′(x)+f′′(x),y)Y=(f(x),y)Y=(f,Kxy)F
2. 方程式
$$
\begin{cases}
a_{0}+a_{1}x_{0}+...+a_{n}x_{0}^{n}=y_{0} \\
a_{0}+a_{1}x_{1}+...+a_{n}x_{1}^{n}=y_{1} \\
\cdots\\
a_{0}+a_{1}x_{n}+...+a_{n}x_{n}^{n}=y_{n}
\end{cases}
$$
{ a 0 + a 1 x 0 + . . . + a n x 0 n = y 0 a 0 + a 1 x 1 + . . . + a n x 1 n = y 1 ⋯ a 0 + a 1 x n + . . . + a n x n n = y n \begin{cases} a_{0}+a_{1}x_{0}+...+a_{n}x_{0}^{n}=y_{0} \\ a_{0}+a_{1}x_{1}+...+a_{n}x_{1}^{n}=y_{1} \\ \cdots\\ a_{0}+a_{1}x_{n}+...+a_{n}x_{n}^{n}=y_{n} \end{cases} ⎩ ⎨ ⎧a0+a1x0+...+anx0n=y0a0+a1x1+...+anx1n=y1⋯a0+a1xn+...+anxnn=yn
- 矩阵
% 可将 [] 换成 () 或 ||...
$$
\left[
\begin{array}{ccc|c}
\psi(x) & g(x) & \cdots & a_{1n} \\
\hline
a_{21} & a_{22} & \dots & a_{2n} \\
\vdots & \vdots & \ddots & \vdots \\
a_{n1} & a_{n2} & ... & a_{nn}
\end{array}
\right]
$$
[ ψ ( x ) g ( x ) ⋯ a 1 n a 21 a 22 … a 2 n ⋮ ⋮ ⋱ ⋮ a n 1 a n 2 . . . a n n ] \left[ \begin{array}{ccc|c} \psi(x) & g(x) & \cdots & a_{1n} \\ \hline a_{21} & a_{22} & \dots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & ... & a_{nn} \end{array} \right] ψ(x)a21⋮an1g(x)a22⋮an2⋯…⋱...a1na2n⋮ann
7. 上下标、分式、省略号、开根号、复杂数学符号、关系运算符、三角函数、对数函数
- 上下标
语法 | 显示 |
---|---|
$\vec{a}$ | a ⃗ \vec{a} a |
$\overline{a}$ | a ‾ \overline{a} a |
$\widehat{a}$ | a ^ \widehat{a} a |
$\widetilde{a}$ | a ~ \widetilde{a} a |
$\dot{a}$ | a ˙ \dot{a} a˙ |
$\ddot{a}$ | a ¨ \ddot{a} a¨ |
$\check{a}$ | a ˇ \check{a} aˇ |
$\breve{a}$ | a ˘ \breve{a} a˘ |
$\grave{a}$ | a ˋ \grave{a} aˋ |
$\acute{a}$ | a ˊ \acute{a} aˊ |
$\stackrel{x}{y}$ | y x \stackrel{x}{y} yx |
$overset{z}{y}$ | y z \overset{z}{y} yz |
$underset{x}{y}$ | y x \underset{x}{y} xy |
$x^y$ | x y x^y xy |
$x_y$ | x y x_y xy |
- 分式、省略号、开根号、三角函数、对数函数
语法 | 显示 |
---|---|
$1/2$ | 1 / 2 1/2 1/2 |
$frac{1}{2}$ | 1 2 \frac{1}{2} 21 |
$cdots$ | ⋯ \cdots ⋯ |
$\sqrt{2}$ | 2 \sqrt{2} 2 |
$\sin 30^\circ$ | sin 3 0 ∘ \sin 30^\circ sin30∘ |
$\cos 30^\circ$ | cos 3 0 ∘ \cos 30^\circ cos30∘ |
$\tan 30^\circ$ | tan 3 0 ∘ \tan 30^\circ tan30∘ |
$\ln 2$ | ln 2 \ln 2 ln2 |
$\log_28$ | log 2 8 \log_2 8 log28 |
$\lg 10% | lg 10 \lg 10 lg10 |
- 复杂数学符号
语法 | 显示 |
---|---|
$y = \sum_{i=1}^{n}{x_i}$ | y = ∑ i = 1 n x i y = \sum_{i=1}^{n}{x_i} y=∑i=1nxi |
$y=\sum^{x \to \infty}_{y \to 0}{\frac{x}{y}}$ | y = ∑ y → 0 x → ∞ x y y=\sum^{x \to \infty}_{y \to 0}{\frac{x}{y}} y=∑y→0x→∞yx |
$\lim^{x \to \infty}_{y \to 0}{\frac{x}{y}}$ | lim y → 0 x → ∞ x y \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} limy→0x→∞yx |
$\displaystyle \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}}$ | lim y → 0 x → ∞ x y \displaystyle \lim^{x \to \infty}_{y \to 0}{\frac{x}{y}} y→0limx→∞yx |
$\sqrt[3]{x+y}$ | x + y 3 \sqrt[3]{x+y} 3x+y |
$\int^{\infty}_{0}{xdx}$ | ∫ 0 ∞ x d x \int^{\infty}_{0}{xdx} ∫0∞xdx |
$\iint$ | ∬ \iint ∬ |
$\iiint$ | ∭ \iiint ∭ |
$\oint$ | ∮ \oint ∮ |
$\dfrac{\partial f}{\partial x}$ | ∂ f ∂ x \dfrac{\partial f}{\partial x} ∂x∂f |
$\frac{\partial x^2}{\partial y^2}$ | ∂ x 2 ∂ y 2 \frac{\partial x^2}{\partial y^2} ∂y2∂x2 |
$\frac{\partial f(x,y)}{\partial x} \vert _{x=0}$ | ∂ f ( x , y ) ∂ x ∣ x = 0 \frac{\partial f(x,y)}{\partial x} \vert _{x=0} ∂x∂f(x,y)∣x=0 |
$y{\prime}x$ | y ′ x y{\prime}x y′x |
$\nabla$ | ∇ \nabla ∇ |
$\infty$ | ∞ \infty ∞ |
$\overrightarrow{xy}$ | x y → \overrightarrow{xy} xy |
$vec x$ | x ⃗ \vec x x |
$overline{xyz}$ | x y z ‾ \overline{xyz} xyz |
$\overline{x\overline{yz}}$ | x y z ‾ ‾ \overline{x\overline{yz}} xyz |
$\underline{xyz}$ | x y z ‾ \underline{xyz} xyz |
$\prod_{n=1}^{99}{x_n}$ | ∏ n = 1 99 x n \prod_{n=1}^{99}{x_n} ∏n=199xn |
$\displaystyle \prod_{n=1}^{99}{x_n}$ | ∏ n = 1 99 x n \displaystyle \prod_{n=1}^{99}{x_n} n=1∏99xn |
$a \leftarrow b \rightarrow c \leftrightarrow d \Leftrightarrow e \rightleftharpoons f$ | a ← b → c ↔ d ⇔ e ⇌ f a \leftarrow b \rightarrow c \leftrightarrow d \Leftrightarrow e \rightleftharpoons f a←b→c↔d⇔e⇌f |
$a \longleftarrow b \longrightarrow c \Longleftrightarrow d$ | a ⟵ b ⟶ c ⟺ d a \longleftarrow b \longrightarrow c \Longleftrightarrow d a⟵b⟶c⟺d |
$a \nearrow b \searrow c \nwarrow d \searrow e$ | a ↗ b ↘ c ↖ d ↘ e a \nearrow b \searrow c \nwarrow d \searrow e a↗b↘c↖d↘e |
$a \uparrow b \downarrow c \Uparrow d \Downarrow e$ | a ↑ b ↓ c ⇑ d ⇓ e a \uparrow b \downarrow c \Uparrow d \Downarrow e a↑b↓c⇑d⇓e |
$a \rightharpoonup b \rightharpoondown c \leftharpoonup d \leftharpoondown e$ | a ⇀ b ⇁ c ↼ d ↽ e a \rightharpoonup b \rightharpoondown c \leftharpoonup d \leftharpoondown e a⇀b⇁c↼d↽e |
$\forall a \exists b$ | ∀ a ∃ b \forall a \exists b ∀a∃b |
$\lnot a \bigvee b \bigwedge$ | ¬ a ⋁ b ⋀ \lnot a \bigvee b \bigwedge ¬a⋁b⋀ |
$\because a \therefore b$ | ∵ a ∴ b \because a \therefore b ∵a∴b |
$X\cup Y \bigcup Z\cap W$ | X ∪ Y ⋃ Z ∩ W X\cup Y \bigcup Z\cap W X∪Y⋃Z∩W |
$X \subset Y \not\subset Z \subseteq W \not\subseteq U$ | X ⊂ Y ⊄ Z ⊆ W ⊈ U X \subset Y \not\subset Z \subseteq W \not\subseteq U X⊂Y⊂Z⊆W⊆U |
$c \in d \notin e$ | c ∈ d ∉ e c \in d \notin e c∈d∈/e |
$\emptyset$ | ∅ \emptyset ∅ |
$\varnothing$ | ∅ \varnothing ∅ |
$\lceil \frac{x}{2} \rceil$ | ⌈ x 2 ⌉ \lceil \frac{x}{2} \rceil ⌈2x⌉ |
$\lfloor x \rfloor$ | ⌊ x ⌋ \lfloor x \rfloor ⌊x⌋ |
$\tbinom{n}{k}$ | ( n k ) \tbinom{n}{k} (kn) |
$\binom{n}{k}$ | ( n k ) \binom{n}{k} (kn) |
$\dbinom{n}{k}$ | ( n k ) \dbinom{n}{k} (kn) |
${n\brace k}$ | { n k } {n\brace k} {kn} |
${n\choose k}$ | ( n k ) {n\choose k} (kn) |
` [ n k ] {n\brack k} [kn] | [ n k ] {n\brack k} [kn] |
$\overbrace{1+2+\cdots+100}$ | 1 + 2 + ⋯ + 100 ⏞ \overbrace{1+2+\cdots+100} 1+2+⋯+100 |
$\underbrace{1+2+\cdots+100}$ | 1 + 2 + ⋯ + 100 ⏟ \underbrace{1+2+\cdots+100} 1+2+⋯+100 |
$5050 \overbrace {1+2+⋯+100}$ | 5050 1 + 2 + ⋯ + 100 ⏞ 5050 \overbrace {1+2+⋯+100} 50501+2+⋯+100 |
$\begin{matrix} 0 & 1 \\ 3 & 4 \\ \end{matrix}$ | 0 1 3 4 \begin{matrix} 0 & 1 \\ 3 & 4 \\ \end{matrix} 0314 |
$\begin{pmatrix} 0 & 1 \\ 3 & 4 \\ \end{pmatrix}$ | ( 0 1 3 4 ) \begin{pmatrix} 0 & 1 \\ 3 & 4 \\ \end{pmatrix} (0314) |
$\begin{vmatrix} 0 & 1 \\ 3 & 4 \\ \end{vmatrix}$ | ∣ 0 1 3 4 ∣ \begin{vmatrix} 0 & 1 \\ 3 & 4 \\ \end{vmatrix} 0314 |
$\begin{Vmatrix} 0 & 1 \\ 3 & 4 \\ \end{Vmatrix}$ | ∥ 0 1 3 4 ∥ \begin{Vmatrix} 0 & 1 \\ 3 & 4 \\ \end{Vmatrix} 0314 |
$\begin{bmatrix} 0 & 1 \\ 3 & 4 \\ \end{bmatrix}$ | [ 0 1 3 4 ] \begin{bmatrix} 0 & 1 \\ 3 & 4 \\ \end{bmatrix} [0314] |
$\begin{Bmatrix} 0 & 1 \\ 3 & 4 \\ \end{Bmatrix}$ | { 0 1 3 4 } \begin{Bmatrix} 0 & 1 \\ 3 & 4 \\ \end{Bmatrix} {0314} |
- 关系运算符
语法 | 显示效果 |
---|---|
$\neq$ | ≠ \neq = |
$=$ | = = = |
$>$ | > > > |
$<$ | < < < |
$\equiv$ | ≡ \equiv ≡ |
$\ngeq$ | ≱ \ngeq ≱ |
$not\geq$ | ≱ \not\geq ≥ |
$\nleq$ | ≰ \nleq ≰ |
$\not\leq$ | ≰ \not\leq ≤ |
$\leq$ | ≤ \leq ≤ |
$\geq$ | ≥ \geq ≥ |
$\aaprox$ | ≈ \approx ≈ |
$\not\lt$ | ≮ \not\lt < |
$\gt$ | > \gt > |
$\gg$ | ≫ \gg ≫ |
$\lll$ | ⋘ \lll ⋘ |
$\pm$ | ± \pm ± |
$\times$ | × \times × |
$div$ | ÷ \div ÷ |
$\mid$ | ∣ \mid ∣ |
$\ast$ | ∗ \ast ∗ |
$\angle$ | ∠ \angle ∠ |
$\bot$ | ⊥ \bot ⊥ |
$\odot and\bigodot$ | ⊙ a n d ⨀ \odot and\bigodot ⊙and⨀ |
$\otimes and \bigotimes$ | ⊗ a n d ⨂ \otimes and \bigotimes ⊗and⨂ |
十二、插入甘特图
[参考文档](https://mermaid-js.github.io/mermaid/#/gantt)
```mermaid
gantt
dateFormat YYYY-MM-DD
title Adding GANTT diagram functionality to mermaid
section 现有任务
已完成 :done, des1, 2014-01-06,2014-01-08
进行中 :active, des2, 2014-01-09, 3d
计划中 : des3, after des2, 5d
```
十三、插入UML图
[参考文档](https://mermaid-js.github.io/mermaid/#/sequenceDiagram)
```mermaid
sequenceDiagram
张三 ->> 李四: 你好!李四, 最近怎么样?
李四-->>王五: 你最近怎么样,王五?
李四--x 张三: 我很好,谢谢!
李四-x 王五: 我很好,谢谢!
Note right of 王五: 李四想了很长时间, 文字太长了<br/>不适合放在一行.
李四-->>张三: 打量着王五...
张三->>王五: 很好... 王五, 你怎么样?
```
十四、插入Mermaid流程图
[参考文档](https://mermaid-js.github.io/mermaid/#/flowchart?id=graph)
```mermaid
graph LR
A[长方形] -- 链接 --> B((圆))
A --> C(圆角长方形)
B --> D{菱形}
C --> D
```
十五、插入Flowchart流程图
[参考文档](http://flowchart.js.org/)
```mermaid
flowchat
st=>start: 开始
e=>end: 结束
op=>operation: 我的操作
cond=>condition: 确认?
st->op->cond
cond(yes)->e
cond(no)->op
```
十六、插入classDiagram类图
[参考文档](https://mermaid-js.github.io/mermaid/#/classDiagram)
```mermaid
classDiagram
Class01 <|-- AveryLongClass : Cool
<<interface>> Class01
Class09 --> C2 : Where am i?
Class09 --* C3
Class09 --|> Class07
Class07 : equals()
Class07 : Object[] elementData
Class01 : size()
Class01 : int chimp
Class01 : int gorilla
class Class10 {
>>service>>
int id
size()
}
```
十七、快捷键
Markdown | 图标 | 快捷键 |
---|---|---|
撤销 | Ctrl /⌘+Z | |
重做 | Ctrl /⌘+Y | |
加粗 | Ctrl /⌘+B | |
斜体 | Ctrl /⌘+I | |
标题 | Ctrl /⌘+Shift +H | |
有序列表 | Ctrl /⌘+Shift +O | |
无序列表 | Ctrl /⌘+Shift +U | |
待办列表 | Ctrl /⌘+Shift +C | |
插入代码 | Ctrl /⌘+Shift +K | |
插入链接 | Ctrl /⌘+Shift +L | |
插入图片 | Ctrl /⌘+Shift +G | |
查找 | Ctrl /⌘+F | |
替换 | Ctrl /⌘+G |
最后的目录
注脚的解释 ↩︎