文章目录
- 0.常用公式
- 1.希腊字母
- 2.数学相关
- 3.分割符号
- 4.可变公式
- 5.数学函数
- 6.运算符号
- 7.其它符号
- 8.箭头合集
- 9.帽子标记
- 10.数学样式
- 11.大小颜色
- 13.多行公式
- 14.间距微调
显示latex格式的公式需要加美元号
$
,例如
$\beta$
显示的结果为
β \beta β,如果单独一行的公式可用双美元符号,例如
$$a+b=c$$
会单独成行
a + b = c a+b=c a+b=c
0.常用公式
x = − b ∓ b 2 − 4 a c 2 a x=\frac{-b\mp\sqrt{b^2-4ac}}{2a} x=2a−b∓b2−4ac | x=\frac{-b\mp\sqrt{b^2-4ac}}{2a} |
x = − b ± b 2 − 4 a c 2 a x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a} x=2a−b±b2−4ac | x=\dfrac{-b\pm\sqrt{b^2-4ac}}{2a} |
n ! = 1 × 2 × 3 ⋯ × n n! = 1\times2\times3\cdots\times n n!=1×2×3⋯×n | n! = 1\times2\times3\cdots\times n |
∮ f ( s ) d s \oint f(s)\mathrm{d}s ∮f(s)ds | \oint f(s)\mathrm{d}r |
∮ f ( s ) d s \displaystyle\oint f(s)\mathrm{d}s ∮f(s)ds | \displaystyle\oint f(s)\mathrm{d}s |
∫ − 1 + ∞ f ( x ) d x \displaystyle\int_{-1}^{+\infty} f(x)\mathrm{d}x ∫−1+∞f(x)dx | \displaystyle\int_{-1}^{+\infty} f(x)\mathrm{d}x |
∬ f ( x ) d x \displaystyle\iint f(\bm x)\mathrm{d}\bm x ∬f(x)dx | \displaystyle\iint f(\bm x)\mathrm{d}\bm x |
∥ ∑ i = 1 p + 1 ∥ \left\|\sum_{i=1}^{p+1} \right\| ∥∥∥∑i=1p+1∥∥∥ | \left\|\sum_{i=1}^{p+1}\right\| |
∥ ∑ i = 1 p + 1 ∥ \left\|\displaystyle\sum_{i=1}^{p+1} \right\| ∥∥∥∥∥i=1∑p+1∥∥∥∥∥ | \left\|\displaystyle\sum_{i=1}^{p+1} \right\| |
∥ ∑ i = 1 p + 1 ∥ \Big\Vert\displaystyle\sum_{i=1}^{p+1}\bigg\Vert ∥∥∥i=1∑p+1∥∥∥∥ | \Big\Vert\displaystyle\sum_{i=1}^{p+1}\bigg\Vert |
∇ ⋅ ∇ u = Δ u \nabla\cdot\nabla u = \Delta u ∇⋅∇u=Δu | \nabla\cdot\nabla u = \Delta u |
( a + b a + b + c ) {a+b \choose a+b+c} (a+b+ca+b) | {a+b \choose a+b+c} |
( a + b + c a + b ) \left({}_{a+b+c}^{a+b}\right) (a+b+ca+b) | \left({}_{a+b+c}^{a+b}\right) |
a + b a + b + c {a+b \atop a+b+c} a+b+ca+b | {a+b \atop a+b+c} |
C a + b + c a + b C_{a+b+c}^{a+b} Ca+b+ca+b | C_{a+b+c}^{a+b} |
min x ∈ R f ( x ) \min\limits^{x\in\mathcal{R}}f(x) minx∈Rf(x) | \min\limits^{x\in\mathcal{R}}f(x) |
max x ∈ R f ( x ) \max\limits_{x\in\mathcal{R}}f(x) x∈Rmaxf(x) | \max\limits_{x\in\mathcal{R}}f(x) |
d u d t = ∂ u ∂ x ∂ x ∂ t + ∂ u ∂ y ∂ y ∂ t \dfrac{\mathrm{d}u}{\mathrm{d}t}=\dfrac{\partial u}{\partial x}\dfrac{\partial x}{\partial t} + \dfrac{\partial u}{\partial y}\dfrac{\partial y}{\partial t} dtdu=∂x∂u∂t∂x+∂y∂u∂t∂y
\dfrac{\mathrm{d}u}{\mathrm{d}t}
=
\dfrac{\partial u}{\partial x}\dfrac{\partial x}{\partial t}
+
\dfrac{\partial u}{\partial y}\dfrac{\partial y}{\partial t}
1.希腊字母
α \alpha α | \alpha | θ \theta θ | \theta | o o o | o | τ \tau τ | \tau | |||
β \beta β | \beta | ϑ \vartheta ϑ | \vartheta | π \pi π | \pi | υ \upsilon υ | \upsilon | |||
γ \gamma γ | \gamma | ι \iota ι | \iota | ϖ \varpi ϖ | \varpi | ϕ \phi ϕ | \phi | |||
δ \delta δ | \delta | κ \kappa κ | \kappa | ρ \rho ρ | \rho | φ \varphi φ | \varphi | |||
ϵ \epsilon ϵ | \epsilon | λ \lambda λ | \lambda | ϱ \varrho ϱ | \varrho | χ \chi χ | \chi | |||
ε \varepsilon ε | \varepsilon | μ \mu μ | \mu | σ \sigma σ | \sigma | ψ \psi ψ | \psi | |||
ζ \zeta ζ | \zeta | ν \nu ν | \nu | ς \varsigma ς | \varsigma | ω \omega ω | \omega | |||
η \eta η | \eta | ζ \zeta ζ | \zeta | |||||||
Γ \Gamma Γ | \Gamma | Λ \Lambda Λ | \Lambda | Σ \Sigma Σ | \Sigma | Ψ \Psi Ψ | \Psi | |||
Δ \Delta Δ | \Delta | Ξ \Xi Ξ | \Xi | Υ \Upsilon Υ | \Upsilon | Ω \Omega Ω | \Omega | |||
Θ \Theta Θ | \Theta | Π \Pi Π | \Pi | Φ \Phi Φ | \Phi | |||||
ℵ \aleph ℵ | \aleph | ℶ \beth ℶ | \beth | ℸ \daleth ℸ | \daleth | ℷ \gimel ℷ | \gimel |
2.数学相关
a b c x y z \dfrac{abc}{xyz} xyzabc | \dfrac{abc}{xyz} | a b c x y z \frac{abc}{xyz} xyzabc | \frac{abc}{xyz} | a b c ‾ \overline{abc} abc | \overline{abc} | ||
a b c \sqrt{abc} abc | \sqrt{abc} | a b c n \sqrt[n]{abc} nabc | \sqrt[n]{abc} | a b c ‾ \underline{abc} abc | \underline{abc} | ||
a b c ^ \widehat{abc} abc | \widehat{abc} | a b c ~ \widetilde{abc} abc | \widetilde{abc} | a b c → \overrightarrow{abc} abc | \overrightarrow{abc} | ||
a b c ← \overleftarrow{abc} abc | \overleftarrow{abc} | a b c ⏞ \overbrace{abc} abc | \overbrace{abc} | a b c ⏟ \underbrace{abc} abc | \underbrace{abc} | ||
a b ⌢ \overset{\frown} {ab} ab⌢ | \overset{\frown}{ab} | A B ⏠ \overgroup{AB} AB | \overparen{ab} |
注:头顶的弧盖\overparen{ab}
用于 LaTeX \LaTeX LATEX, A B ⏠ \overgroup{AB} AB 用于 KaTeX \KaTeX KATEX
3.分割符号
∣ \vert ∣ | \vert | ⟨ \langle ⟨ | \langle | ⌊ \lfloor ⌊ | \lfoolr | ⌈ \lceil ⌈ | \lceil | |||
∥ \Vert ∥ | \Vert | ⟩ \rangle ⟩ | \rangle | ⌋ \rfloor ⌋ | \rfloor | ⌉ \rceil ⌉ | \rceil | |||
⇑ \Uparrow ⇑ | \Uparrow | ↑ \uparrow ↑ | \uparrow | ⇓ \Downarrow ⇓ | \Downarrow | ↓ \downarrow ↓ | \downarrow | |||
└ \llcorner └ | \llcorner | ┘ \lrcorner ┘ | \lrcorner | ┌ \ulcorner ┌ | \ulcorner | ┐ \urcorner ┐ | \urcorner | |||
/ / / | / | \ \backslash \ | \backslash |
4.可变公式
∑ \sum ∑ | \sum | ∏ \prod ∏ | \prod | ∐ \coprod ∐ | \coprod | ||
∫ \int ∫ | \int | ∮ \oint ∮ | \ont | ∬ \iint ∬ | \iint | ||
⨄ \biguplus ⨄ | \biguplus | ⋂ \bigcap ⋂ | \bigcap | ⋃ \bigcup ⋃ | \bigcup | ||
⨁ \bigoplus ⨁ | \bigoplus | ⨂ \bigotimes ⨂ | \bigotimes | ⨀ \bigodot ⨀ | \bigodot | ||
⋁ \bigvee ⋁ | \bigvee | ⋀ \bigwedge ⋀ | \bigwedge | ⨆ \bigsqcup ⨆ | \bigsqcup |
5.数学函数
只需要在常用数学函数前加上斜杠\
即可
$\sin, \cos, \tan, \exp, \min, \max, \log, \ln, \lim, \cdots$
sin , cos , tan , exp , min , max , log , ln , lim , ⋯ \sin, \cos, \tan, \exp, \min, \max, \log, \ln, \lim, \cdots sin,cos,tan,exp,min,max,log,ln,lim,⋯
6.运算符号
+ + + | + | − - − | - | × \times × | \times | ÷ \div ÷ | \div | |||
∗ \ast ∗ | \ast | ⋆ \star ⋆ | \star | ⋅ \cdot ⋅ | \cdot | ∘ \circ ∘ | \circ | |||
± \pm ± | \pm | ∓ \mp ∓ | \mp | ⊕ \oplus ⊕ | \oplus | ⊗ \otimes ⊗ | \otimes | |||
⋇ \divideontimes ⋇ | \divideontimes | ⋅ \centerdot ⋅ | \centerdot | ⊙ \odot ⊙ | \odot | ⊚ \circledcirc ⊚ | \circledcirc | |||
∩ \cap ∩ | \cap | ∪ \cup ∪ | \cup | ∨ \vee ∨ | \vee | ∧ \wedge ∧ | \wedge | |||
⊥ \bot ⊥ | \bot | ⊥ \perp ⊥ | \perp | ∖ \setminus ∖ | \setminus | \ \backslash \ | \backslash | |||
□ \Box □ | \Box | □ \square □ | \square | ≀ \wr ≀ | \wr | ⊞ \boxplus ⊞ | \boxplus | |||
△ \triangle △ | \triangle | ▽ \bigtriangledown ▽ | \bigtriangledown | Δ \Delta Δ | \Delta | ∇ \nabla ∇ | \nabla | |||
≡ \equiv ≡ | \equiv | ≠ \neq = | \neq | ∼ \sim ∼ | \sim | ≈ \approx ≈ | \approx | |||
≜ \triangleq ≜ | \triangleq | ∝ \varpropto ∝ | \varpropto | ≪ \ll ≪ | \ll | ⋘ \lll ⋘ | \lll | |||
≤ \leq ≤ | \leq | ≥ \geq ≥ | \geq | ⩽ \leqslant ⩽ | \leqslant | ⩾ \geqslant ⩾ | \geqslant | |||
∈ \in ∈ | \in | ∉ \notin ∈/ | \notin | ≺ \prec ≺ | \prec | ≻ \succ ≻ | \succ | |||
⊂ \subset ⊂ | \subset | ⊆ \subseteq ⊆ | \subseteq | ⊃ \supset ⊃ | \supset | ⊇ \supseteq ⊇ | \supseteq | |||
⫆ \supseteqq ⫆ | \nsubseteq | ⫅ \subseteqq ⫅ | \nsubseteqq | ⊈ \nsubseteq ⊈ | \nsubseteq | ⊈ \nsubseteqq | \nsubseteqq | |||
⊊ \subsetneq ⊊ | \nsubseteq | ⫋ \subsetneqq ⫋ | \nsubsetneqq | ⊋ \supsetneq ⊋ | \nsupseteq | ⫌ \supsetneqq ⫌ | \nsupsetneqq | |||
∁ \complement ∁ | \complement |
7.其它符号
∵ \because ∵ | \because | ∴ \therefore ∴ | \therefore | / / // // | // | ⊥ \perp ⊥ | \perp | |||
△ \triangle △ | \triangle | □ \square □ | \square | ▱ \text{▱} ▱ | \text{▱} | = / / {}_{=}^{//} =// | {}_{=}^{//} | |||
∞ \infty ∞ | \infty | ∠ \angle ∠ | \angle | ∡ \measuredangle ∡ | \measuredangle | ∢ \sphericalangle ∢ | \sphericalangle | |||
∀ \forall ∀ | \foall | ∃ \exist ∃ | \exist | ∅ \varnothing ∅ | \varnothing | ∅ \emptyset ∅ | \emptyset | |||
∂ \partial ∂ | \partial | ′ \prime ′ | \prime | ℏ \hbar ℏ | \hbar | √ \surd √ | \surd | |||
⋯ \cdots ⋯ | \cdots | ⋮ \vdots ⋮ | \vdots | … \ldots … | \ldots | ⋱ \ddots ⋱ | \ddots | |||
ℑ \Im ℑ | \Im | ℜ \Re ℜ | \Re | ◊ \lozenge ◊ | \lozenge | ℧ \mho ℧ | \mho | |||
♠ \spadesuit ♠ | \spadesuit | ♡ \heartsuit ♡ | \heartsuit | ♣ \clubsuit ♣ | \clubsuit | ♢ \diamondsuit ♢ | \diamondsuit | |||
© \copyright c◯ | \copyright | Ⓢ \circledS Ⓢ | \circledS | ® \circledR ® | \circledR | £ \pounds £ | \pounds | |||
$ | \$ | % \% % | \% | # \# # | \# | ~ | \~{} | |||
ı \imath ı | \imath | ȷ \jmath ȷ | \jmath | ℓ \ell ℓ | \ell |
注1:平行四边形符号
▱
并不是内置的latex符号而是特殊字符
注2: / / // //与 = / / {}_{=}^{//} =//是组合生成,并非内置
8.箭头合集
→ \rightarrow → | \rightarrow | ⟶ \longrightarrow ⟶ | \longrightarrow | ⇒ \Rightarrow ⇒ | \Rightarrow |
⟹ \Longrightarrow ⟹ | \Longrightarrow | ← \leftarrow ← | \leftarrow | ⟵ \longleftarrow ⟵ | \longleftarrow |
⇐ \Leftarrow ⇐ | \Leftarrow | ⟸ \Longleftarrow ⟸ | \Longleftarrow | ↗ \nearrow ↗ | \nearrow |
↘ \searrow ↘ | \searrow | ↙ \swarrow ↙ | \swarrow | ↖ \nwarrow ↖ | \nwarrow |
↦ \mapsto ↦ | \mapsto | ⟼ \longmapsto ⟼ | \longmapsto | ⇝ \rightsquigarrow ⇝ | \rightsquigarrow |
⇉ \rightrightarrows ⇉ | \rightrightarrows | ↔ \leftrightarrow ↔ | \leftrightarrow | ⟷ \longleftrightarrow ⟷ | \longleftrightarrow |
⇔ \Leftrightarrow ⇔ | \Leftrightarrow | ⟺ \Longleftrightarrow ⟺ | \Longleftrightarrow | ⇌ \rightleftharpoons ⇌ | \rightleftharpoons |
⇆ \leftrightarrows ⇆ | \leftrightarrows | ⇋ \leftrightharpoons ⇋ | \leftrightharpoons | ⇄ \rightleftarrows ⇄ | \rightleftarrows |
↺ \circlearrowleft ↺ | \circlearrowleft | ↻ \circlearrowright ↻ | \circlearrowright | ⇍ \nLeftarrow ⇍ | \nLeftarrow |
⇏ \nRightarrow ⇏ | \nRightarrow | ⇎ \nLeftrightarrow ⇎ | \nLeftrightarrow | ↭ \leftrightsquigarrow ↭ | \leftrightsquigarrow |
⇢ \dashrightarrow ⇢ | \dashrightarrow | ⇠ \dashleftarrow ⇠ | \dashleftarrow |
9.帽子标记
a ˉ \bar{a} aˉ | \bar{a} | a ˊ \acute{a} aˊ | \acute{a} | a ˇ \check{a} aˇ | \check{a} | a ˋ \grave{a} aˋ | \grave{a} | |||
a ˙ \dot{a} a˙ | \dot{a} | a ^ \hat{a} a^ | \hat{a} | a ˘ \breve{a} a˘ | \breve{a} | a ⃗ \vec{a} a | \vec{a} | |||
a ¨ \ddot{a} a¨ | \ddot{a} | a ~ \tilde{a} a~ | \tilde{a} |
10.数学样式
\mathcal{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathcal{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathbb{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathfrak{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathfrak{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathsf{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathsf{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathscr{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathscr{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathrm{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathrm{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathit{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathit{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathnormal{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathnormal{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\mathbf{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\textbf{A}
文本样式粗体
ABCDEFGHIJKLMNOPQRSTUVWXYZ \textbf{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\text{A}
文本样式
ABCDEFGHIJKLMNOPQRSTUVWXYZ \text{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\bm{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \bm{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
\boldsymbol{A}
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z \boldsymbol{ABCDEFGHIJKLMNOPQRSTUVWXYZ} ABCDEFGHIJKLMNOPQRSTUVWXYZ
11.大小颜色
123 456 789 {\color{red}123} {\color{blue}456} {\color{green}789} 123456789 | {\color{red}123} {\color{blue}456} {\color{green}789} |
a b c \tiny{abc} abc | \tiny{abc} |
a b c \scriptsize{abc} abc | \scriptsize{abc} |
a b c \footnotesize{abc} abc | \footnotesize{abc} |
a b c \small{abc} abc | \small{abc} |
a b c \normalsize{abc} abc | \normalsize{abc} |
a b c \large{abc} abc | \large{abc} |
a b c \Large{abc} abc | \Large{abc} |
a b c \LARGE{abc} abc | \LARGE{abc} |
a b c \huge{abc} abc | \huge{abc} |
a b c \Huge{abc} abc | \Huge{abc} |
[ ( ( [ ( \left[ \Bigg( \bigg( \Big[ \big( \right. [(([( | \left[ \Bigg( \bigg( \Big[ \big( \right. |
[ { } } ] \left[ \bigg\{ \Big\}\big\} \right] [{}}] | \left[ \bigg\{ \Big\}\big\} \right] |
注:
\left
与\right
成对出现,缺省可用.
补充,它会自动设置大小
13.多行公式
多行公式常用的两环境有cases
与aligned
{ x + y = 1 x − y = 1 , ∫ − ∞ + ∞ f ( x ) d x ∑ k = 0 n k \begin{cases} x+y=1\\ x-y=1 \end{cases}, \qquad % %后面是接注释,\qquaa表示空格 \begin{aligned} &\int_{-\infty}^{+\infty}f(x)\mathrm{d}x\\[.8em] &\sum_{k=0}^n k \end{aligned} {x+y=1x−y=1,∫−∞+∞f(x)dxk=0∑nk
\begin{cases}
x+y=1\\
x-y=1
\end{cases},
\qquad % %后面是接注释,\qquaa表示空格
\begin{aligned}
&\int_{-\infty}^{+\infty}f(x)\mathrm{d}x\\[.5em]
&\sum_{k=0}^n k
\end{aligned}
% &字符号表示对齐,\\另起一行, \\[.5em]里面的.5表示行高
矩阵格式
( 1 2 3 4 5 6 7 8 9 ) , ∣ a b c d ∣ , a b c d e f \left(\begin{matrix} 1&2&3\\ 4&5&6\\ 7&8&9 \end{matrix}\right) ,\qquad \left| \begin{matrix} a&b\\ c&d \end{matrix}\right| ,\qquad \begin{matrix} a&b\\ c&d \\ e&f \end{matrix} ⎝⎛147258369⎠⎞,∣∣∣∣acbd∣∣∣∣,acebdf
\left(\begin{matrix}
1&2&3\\
4&5&6\\
7&8&9
\end{matrix}\right)
,\qquad
\left|
\begin{matrix}
a&b\\
c&d
\end{matrix}\right|
,\qquad
\begin{matrix}
a&b\\
c&d \\
e&f
\end{matrix}
14.间距微调
间距紧凑:\!
x + y x+y x+y | x+y |
x + y x\!+y x+y | x\!+y |
x + y x\!\!+y x+y | x\!\!+y |
间距拉开:\,
\;
\quad
\qquad
x + y x+y x+y | x+y |
x + y x+\,y x+y | x+\,y |
x + y x+\;y x+y | x+\;y |
x + y x+\quad y x+y | x+\quad y |
x + y x+\qquad y x+y | x+\qquad y |
本文参考https://katex.org/docs/supported.html