总述
一般公式分为两种形式,行内公式和行间公式。
行内公式:放在一对$
之间,如:$\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$
效果:
∑
i
=
0
N
∫
a
b
g
(
t
,
i
)
d
t
\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t
∑i=0N∫abg(t,i)dt
行间公式:放在一对$$
之间,如:$$\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.$$
,效果如下:
Γ
(
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.
希腊字母
常用符号
名称 | 符号 | 举例 | 举例效果 | 备注 |
---|---|---|---|---|
上标 | ^ | $x^{2y}$ | x 2 y x^{2y} x2y | 【1】 |
下标 | _ | $x_{10}$ | x 10 x_{10} x10 | 【1】 |
左上(下)标 | \sideset{}{}{} | $\sideset{^m_n}{^p_q}H$ | . n m H q p .^m_nH^p_q .nmHqp | 【2】 |
无穷 | \infty | $+ \infty$ | + ∞ + \infty +∞ | |
哈密顿算符 | \nabla | $\nabla \phi$ | ∇ ϕ \nabla \phi ∇ϕ | |
开方 | \sqrt{} | $\sqrt{3}$ | 3 \sqrt{3} 3 | |
分数 | \frac{}{} | $\frac{x+y}{3}$ | x + y 3 \frac{x+y}{3} 3x+y | |
极限 | \lim{} | $\lim_{n \rightarrow 0}\frac{1}{n}$ | lim n → 0 1 n \lim_{n \rightarrow 0}\frac{1}{n} limn→0n1 | |
积分 | \int_{}^{} | $\int_0^1 x^2 {\rm d} x$ | ∫ 0 1 x 2 d x \int_0^1 x^2 {\rm d} x ∫01x2dx | 【3】【4】 |
累加 | \sum_{}^{} | $\sum_1^n x$ | ∑ 1 n x \sum_1^n x ∑1nx | |
累乘 | \prod_{}^{} | $\prod_1^n x$ | ∏ 1 n x \prod_1^n x ∏1nx | |
矢量 | \vec{} | $\vec{a} \cdot \vec{b}=0$ | a ⃗ ⋅ b ⃗ = 0 \vec{a} \cdot \vec{b}=0 a⋅b=0 | 【5】 |
底线省略号 | \ldots | $f(x_1, x_2, \ldots, x_n)$ | f ( x 1 , x 2 , … , x n ) f(x_1, x_2, \ldots, x_n) f(x1,x2,…,xn) | |
中线省略号 | \cdots | $x_1^2 + x_2^2+ \cdots + x_n^2$ | x 1 2 + x 2 2 + ⋯ + x n 2 x_1^2 + x_2^2+ \cdots + x_n^2 x12+x22+⋯+xn2 | |
加减 | \pm | $3 \pm 2$ | 3 ± 2 3 \pm 2 3±2 | |
乘 | \times | $3 \times 2$ | 3 × 2 3 \times 2 3×2 | |
除 | \div | $3 \div 2$ | 3 ÷ 2 3 \div 2 3÷2 | |
取余 | \mid | $3 \mid 2$ | 3 ∣ 2 3 \mid 2 3∣2 | |
大于等于 | \geq | $3 \geq 2$ | 3 ≥ 2 3 \geq 2 3≥2 | |
小于等于 | \leq | $1 \leq 2$ | 1 ≤ 2 1 \leq 2 1≤2 | |
不等于 | \neq | $1 \neq 2$ | 1 ≠ 2 1 \neq 2 1=2 | |
约等于 | \approx | $1.01 \approx 1$ | 1.01 ≈ 1 1.01 \approx 1 1.01≈1 | |
恒等于 | \equiv | $f(x) \equiv 1$ | f ( x ) ≡ 1 f(x) \equiv 1 f(x)≡1 |
备注:
【1】 如果内容多于一个字符,需使用{}
【2】 CSDN中的markdown编辑器无此用法,Typora中可正常使用。
【3】\rm
改变公式中的字体,如:公式中正常字体
s
i
n
x
sin x
sinx ($sin x$
),改变后
s
i
n
x
{\rm sin} x
sinx (${\rm sin} x$
)。
【4】\iint
:
∬
\iint
∬,\iiint
:
∭
\iiint
∭ ,\oint
:
∮
\oint
∮ ,\oiint
:
∯
\oiint
∬ 。
【5】点乘:
⋅
\cdot
⋅ $\cdot$
;叉乘:
×
\times
× $\times$
括号
类型 | 代码 |
---|---|
小括号 ( ) () () | ( ) |
中括号 [ ] [] [] | [ ] |
大括号 { } \{ \} {} | \{ \} 或\lbrace \rbrace |
尖括号 ⟨ ⟩ \langle \rangle ⟨⟩ | \langle \rangle |
上取整 ⌈ ⌉ \lceil \rceil ⌈⌉ | \lceil \rceil |
下取整 ⌊ ⌋ \lfloor \rfloor ⌊⌋ | \floor \rfloor |
备注:
有时候括号需要大号的,普通括号不好看,此时需要使用
\left
和\right
加大括号的大小,如:
( x y ) \left(\frac{x}{y}\right) (yx) :
$\left(\frac{x}{y}\right)$
对于不显示的一边可以使用
.
代替,如:
d u d x ∣ x = 0 \left. \frac{{\rm d}u}{{\rm d}x} \right| _{x=0} dxdu∣∣x=0:
$\left. \frac{{\rm d}u}{{\rm d}x} \right| _{x=0}$
该语句适用于所有括号类型
集合运算符
名称 | 符号 | 代码 |
---|---|---|
空集 | ∅ \emptyset ∅ | $\emptyset$ |
属于 | ∈ \in ∈ | $\in$ |
不属于 | ∉ \notin ∈/ | $\notin$ |
含于 | ⊂ \subset ⊂ | $\subset$ |
包含 | ⊃ \supset ⊃ | $\supset$ |
含于 | ⊆ \subseteq ⊆ | $\subseteq$ |
包含 | ⊇ \supseteq ⊇ | $\supseteq$ |
不含于 | ⊄ \not\subset ⊂ | $\not\subset$ |
交 | ⋂ \bigcap ⋂ | $\bigcap$ |
并 | ⋃ \bigcup ⋃ | $\bigcup$ |
⋁ \bigvee ⋁ | $\bigvee$ | |
⋀ \bigwedge ⋀ | $\bigwedge$ | |
⨄ \biguplus ⨄ | $\biguplus$ | |
⨆ \bigsqcup ⨆ | $\bigsqcup$ |
逻辑运算符
符号 | 代码 |
---|---|
∵ \because ∵ | $\because$ |
∴ \therefore ∴ | $\therefore$ |
∀ \forall ∀ | $\forall$ |
∃ \exists ∃ | $\exists$ |
≠ \not= = | $\not=$ |
≯ \not> > | $\not>$ |
⊄ \not\subset ⊂ | $\not\subset$ |
箭头符号
符号 | 代码 |
---|---|
↑ \uparrow ↑ | $\uparrow$ |
↓ \downarrow ↓ | $\downarrow$ |
⇑ \Uparrow ⇑ | $\Uparrow$ |
⇓ \Downarrow ⇓ | $\Downarrow$ |
→ \rightarrow → | $\rightarrow$ |
← \leftarrow ← | $\leftarrow$ |
⇒ \Rightarrow ⇒ | $\Rightarrow$ |
⇐ \Leftarrow ⇐ | $\Leftarrow$ |
⟶ \longrightarrow ⟶ | $\longrightarrow$ |
⟵ \longleftarrow ⟵ | $\longleftarrow$ |
⟹ \Longrightarrow ⟹ | $\Longrightarrow$ |
⟸ \Longleftarrow ⟸ | $\Longleftarrow$ |
三角运算符与对数运算符
符号 | 代码 |
---|---|
⊥ \bot ⊥ | $\bot$ |
∠ \angle ∠ | $\angle$ |
3 0 ∘ 30^\circ 30∘ | $30^\circ$ |
sin cos tan cot sec csc \sin \cos \tan \cot \sec \csc sincostancotseccsc | $\sin \cos \tan \cot \sec \csc$ |
log lg ln \log \lg \ln loglgln | $\log \lg \ln$ |
戴帽符号
符号 | 举例 | 举例效果 |
---|---|---|
\overline | $\overline{y}$ | y ‾ \overline{y} y |
\hat | $\hat{y}$ | y ^ \hat{y} y^ |
\check | $\check{y}$ | y ˇ \check{y} yˇ |
\breve | $\breve{y}$ | y ˘ \breve{y} y˘ |
连线符号
举例 | 代码 |
---|---|
a + b + c + d ‾ \overline{a+b+c+d} a+b+c+d | $\overline{a+b+c+d}$ |
a + b + c + d ‾ \underline{a+b+c+d} a+b+c+d | $\underline{a+b+c+d}$ |
a + b + c ⏟ 1.0 + d ⏞ 2.0 \overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0} a+1.0 b+c+d 2.0 | $\overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0}$ |
特殊符号
符号 | 代码 |
---|---|
⋅ \cdot ⋅ | $\cdot$ |
∘ \circ ∘ | $\circ$ |
∗ \ast ∗ | $\ast$ |
⨀ \bigodot ⨀ | $\bigodot$ |
⨂ \bigotimes ⨂ | $\bigotimes$ |
⨁ \bigoplus ⨁ | $\bigoplus$ |
∐ \coprod ∐ | $\coprod$ |
′ \prime ′ | $\prime$ |
大型符号
大括号
f
(
x
)
=
{
x
2
+
3
0
≤
x
<
4
4
4
≤
x
<
6
6
−
x
3
6
≤
x
<
9
3
x
≥
9
f(x)= \begin{cases} \frac{\sqrt x}{2}+3 & 0 \leq x < 4 \\ 4 & 4 \leq x < 6 \\ 6-\frac{x}{3} & 6 \leq x < 9\\ 3 & x \geq 9 \end{cases}
f(x)=⎩⎪⎪⎪⎨⎪⎪⎪⎧2x+346−3x30≤x<44≤x<66≤x<9x≥9
如上面分段函数的表示方法为:
$$
f(x)=
\begin{cases}
\frac{\sqrt x}{2}+3 & 0 \leq x < 4 \\
4 & 4 \leq x < 6 \\
6-\frac{x}{3} & 6 \leq x < 9\\
3 & x \geq 9
\end{cases}
$$
改变字体
方法:{\** text}
常见字体有:
罗马体 | 意大利体 | 黑体 | 等线体 | 打字机字体 | 数学斜体 | 花体 |
---|---|---|---|---|---|---|
\rm | \it | \bf | \sf | \tt | \mit | \cal |
t e x t {\rm text} text | t e x t {\it text} text | t e x t {\bf text} text | t e x t {\sf text} text | t e x t {\tt text} text | CSDN不支持 | CSDN不支持 |