LaTeX公式符号总结(Markdown适用)

本文从 Typora 移植过来, 部分不兼容情况已经修复, 如果需要原md文档可联系我
参考: LaTeX公式编辑

1. 希腊字母

小写字母

字母表示latex语法字母表示latex语法字母表示latex语法
α \alphaα\alphaβ \betaβ\betaγ \gammaγ\gamma
δ \deltaδ\deltaϵ \epsilonϵ,ε \varepsilonε\epsilon,\varepsilonζ \zetaζ\zeta
η \etaη\etaθ \thetaθ,ϑ \varthetaϑ\theta,\varthetaι \iotaι\iota
κ \kappaκ\kappaλ \lambdaλ\lambdaμ \muμ\mu
ν \nuν\nuξ \xiξ\xioo
π \piπ,ϖ \varpiϖ\pi,\varpiρ \rhoρ,ϱ \varrhoϱ\rho,\varrhoσ \sigmaσ,ς \varsigmaς\sigma,\varsigma
τ \tauτ\tauυ \upsilonυ\upsilonϕ \phiϕ,φ \varphiφ\phi,\varphi
χ \chiχ\chiψ \psiψ\psiω \omegaω\omega

大写字母

将首字母大写即可

字母表示latex语法字母表示latex语法字母表示latex语法
A \AlphaA\AlphaB \BetaB\BetaΓ \GammaΓ\Gamma
Δ \DeltaΔ\DeltaE \EpsilonE\EpsilonZ \ZetaZ\Zeta
H \EtaH\EtaΘ \ThetaΘ\ThetaI \IotaI\Iota
K \KappaK\KappaΛ \LambdaΛ\LambdaM \MuM\Mu
N \NuN\NuΞ \XiΞ\XiOO
Π \PiΠ\PiP \RhoP\RhoΣ \SigmaΣ\Sigma
T \TauT\TauΥ \UpsilonΥ\UpsilonΦ \PhiΦ\Phi
X \ChiX\ChiΨ \PsiΨ\PsiΩ \OmegaΩ\Omega

2. 符号

箭头符号

含义符号表示latex语法符号表示latex语法备注
左箭头← \leftarrow\leftarrow(或\gets)⇐ \Leftarrow\Leftarrow可用long加长
右箭头→ \rightarrow\rightarrow(或\to)⇒ \Rightarrow\Rightarrow同上
上下箭头↑ \uparrow,↓ \downarrow\up(down)arrow⇑ \Uparrow,⇓ \Downarrow\Up(Down)arrow同上
双箭头↔ \leftrightarrow\leftrightarrow⇔ \Leftrightarrow\Leftrightarrow
斜箭头↘ \searrow,↙ \swarrow
↗ \nearrow,↖ \nwarrow
\s(n)e(w)arrows下,n上
e右,w左
半箭头↼ \leftharpoonup,↽ \leftharpoondown,⇀ \rightharpoonup,⇁ \rightharpoondown
↿ \upharpoonleft,↾ \upharpoonright,⇃ \downharpoonleft,⇂ \downharpoonright
\left(right)harpoonup(down)或
\up(down)harpoonleft(right)
harpoon两旁加
上下左右表指向

二元运算符

含义符号语法备注
加减乘除+,-,× \times×,÷ \div÷
± \pm±,∓ \mp
⋅ \cdot,∖ \setminus
+,-,\times​,\div​
\pm,\mp
\cdot,\setminus
星号⋆ \star,∗ \ast\star,\ast
∘ \circ,∙ \bullet,⊕ \oplus,⊖ \ominus
⊙ \odot,⊘ \oslash,⊗ \otimes
\circ,\bullet,\oplus,\ominus
\odot,\oslash,\otimes
二元关系符=,≠ \ne=,≈ \approx,≤ \le=,\ne​,\approx,\le详情链接

逻辑符号

符号语法
∀ \forall\forall
∃ \exists,∄ \nexists\exists,\nexists
∴ \therefore,∵ \because\therefore,\because
& \And&\And
⋎ \curlyvee,⋏ \curlywedge,⋁ \bigvee,⋀ \bigwedge\curlyvee,\curlywedge,\bigvee,\bigwedge
¬ \lnot¬\lnot, ,,\neg

集合符号

符号语法
{}{}
∅ \emptyset,∅ \varnothing\emptyset,\varnothing
∈ , ∉ , ∋ \in,\notin,\ni,/,\in,\notin,\ni
∪ \cup,∩ \cap,⊔ \sqcup,⊓ \sqcap,∨ \vee,∧ \wedge
⋃ , ⋂ \bigcup,\bigcap,
\cup,\cap, ,,\sqcup,\sqcap, ,,\vee, ,,\wedge
\bigcup,\bigcap
⊂ , ⊃ \subset,\supset,
⊆ , ⊇ \subseteq,\supseteq,
\subset,\supset
\subseteq,\supseteq$

特殊符号

只列举比较常用的符号

含义符号语法备注
百分号% \%%%千分号:\textperthousand(但在typora打不出来)
摄氏度∘ C ^{\circ}\text{C}C^{\circ}​\text{C}直接"C"不用"“\text{C}”"也可以,只是在typora美观点
无穷∞ \infty\infty
⋮ , ⋯ , ⋱ \vdots,\cdots,\ddots,,\vdots,\cdots,\ddots
⅁ \Game\Game

3. 运算和函数

含义符号语法备注
极限lim ⁡ n → ∞ x n \lim_{n \to \infty}x_nlimnxn\lim_{n \to \infty}x_n
lim ⁡ n → ∞ x n \lim\limits_{n \to \infty } x_nnlimxn\lim\limits_{n \to \infty}x_n
lim ⁡ x → x 0 y → y 0 f ( x , y ) = A \lim\limits_{x \to x_0 \atop y \to y_0}f(x,y) = Ayy0xx0limf(x,y)=A\lim\limits_{x \to x_0 \atop y \to y_0}f(x,y) = A
分数2 4 x = 0.5 x \frac{2}{4}x=0.5x42x=0.5x\frac{2}{4}x=0.5x 或者 {2 \over 4}x=0.5x还可dfrac,cfrac,tfrac
普通操作符max ⁡ ( x , y ) , sin ⁡ x \max(x,y),\sin xmax(x,y),sinx
exp ⁡ a b = a b , exp ⁡ a = e a \exp_a b=a^b,\exp a=e^aexpab=ab,expa=ea
\max(x,y),\sin x
\exp_a b=a^b,\exp a=e^a
特殊操作符mydefine ⁡ x \operatorname{mydefine} xmydefinex\operatorname{mydefine} x
根式√ ( π ) , π , π n \surd(\pi),\sqrt{\pi},\sqrt[n]{\pi}(π),π,nπ\surd(\pi),\sqrt{\pi},\sqrt[n]{\pi}
微分和导数d t , d t , ∂ t , ∇ ψ dt,\mathrm{d}t,\partial t, \nabla\psidt,dt,t,ψ
f ′ , f ′ , f ′ ′ , f ( 3 ) , y ˙ , y ¨ f^\prime, f', f'', f^{(3)}, \dot y, \ddot yf,f,f′′,f(3),y˙,y¨
dt,\mathrm{d}t,\partial t,\nabla\psi
f^\prime, f’, f’', f^{(3)}, \dot y, \ddot y
积分∫ 1 3 1 x 2 d x \int_{1}^{3}\frac{1}{x^2}\, dx13x21dx\int_{1}^{3}\frac{1}{x^2}, dx
∬ D d x d y \iint\limits_D dx\,dyDdxdy\iint\limits_D dx,dy几重积分就是几个i
∮ \oint\oint,\unicode{8751},\unicode{8752}对应16进制为x222F,x2230
求和∑ a b , ∑ a b \sum_a^b,\textstyle \sum_a^bab,ab\sum_a^b,\textstyle \sum_a^b
连乘积∏ a b , ∏ a b \prod_a^b,\textstyle \prod_a^bab,ab\prod_a^b,\textstyle \prod_a^b
余积∐ a b , ∐ a b \coprod_a^b,\textstyle \coprod_a^bab,ab\coprod_a^b,\textstyle \coprod_a^b
大括号a + b + ⋯ + z ⏟ 26 \underbrace{ a+b+\cdots+z }_{26}26a+b++z
a + b + ⋯ + z ⏞ 26 \overbrace{ a+b+\cdots+z }^{26}a+b++z26
\underbrace{ a+b+\cdots+z }_{26}
\overbrace{ a+b+\cdots+z }^{26}

4. 矩阵和多行列式

含义符号语法备注
二项式系数( n k ) \binom{n}{k}(kn)\binom{n}{k}可用\tbinom,\dbinom
矩阵x y z v \begin{matrix}x & y \\z & v\end{matrix}xzyv\begin{matrix}
x & y \\
z & v
\end{matrix}
∣ x y z v ∣ \begin{vmatrix}x & y \\z & v\end{vmatrix}xzyv\begin{vmatrix}
x & y\\
z & v
\end{vmatrix}
将vmatrix的v大写,为双竖线
[ 0 ⋯ 0 ⋮ ⋱ ⋮ 0 ⋯ 0 ] \begin{bmatrix}0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0 \end{bmatrix}0000\begin{bmatrix}
0 & \cdots & 0 \\
\vdots & \ddots & \vdots \\
0 & \cdots & 0
\end{bmatrix}
将bmatrix的b大写,为大括号
( x y z v ) \begin{pmatrix}x & y \\z & v\end{pmatrix}(xzyv)\begin{pmatrix}
x & y \\
z & v
\end{pmatrix}
条件定义f ( n ) f(n)f(n) ={ n / 2 , if  n  is even 3 n + 1 , if  n  is odd \begin{cases}n/2, & \text{if }n\text{ is even} \\3n+1, & \text{if }n\text{ is odd} \end{cases}{n/2,3n+1,if n is evenif n is oddf(n) =
\begin{cases}
n/2, & \text{if}n\text{is even} \\
3n+1, & \text{if}n\text{ is odd}
\end{cases}
多行等式KaTeX parse error: {align} can be used only in display mode.\begin{align}
f(x) & = (a+b)^2\\
& = a^2+2ab+b^2
\end{align}
align有编号
align*无编号
z = a f ( x , y , z ) = x + y + z \begin{array}{lcl}z & = & a \\f(x,y,z) & = & x + y + z\end{array}zf(x,y,z)==ax+y+z\begin{array}{lcl}
z & = & a \\
f(x,y,z) & = & x + y + z
\end{array}
array可通过修改{lcl}的值调整对齐方式
l左对齐,r右对齐
{ 3 x + 5 y + z = 1 7 x − 2 y + 4 z = 2 − 6 x + 3 y + 2 z = 3 \begin{cases} 3x + 5y + z&=1 \\7x - 2y + 4z&=2 \\-6x + 3y + 2z&=3\end{cases}3x+5y+z7x2y+4z6x+3y+2z=1=2=3\begin{cases}
3x+5y+z & =1 \\
7x-2y+4z & =2 \\
-6x+3y+2z &=3
\end{cases}
a b S 0 0 1 0 1 1 1 0 1 1 1 0 \begin{array}{|c|c|c|} a & b & S \\ \hline 0 & 0 & 1 \\ 0 & 1 & 1 \\ 1 & 0 & 1 \\ 1 & 1 & 0 \end{array}a0011b0101S1110\begin{array}{|c|c|c|}
a & b & S \\
\hline
0 & 0 & 1 \\
0 & 1 & 1 \\
1 & 0 & 1 \\
1 & 1 & 0
\end{array}

5. 括号与空格

常用的括号符号例如( )[ ]{ }可直接使用,但在较大的表达式显得不合适如:( π 1 + 2 x ) n ( \frac{\pi}{1+\tfrac{2}{x}} )^n(1+x2π)n

所以一般用\left(,\right)表示( π 1 + 2 x ) n \left( \frac{\pi}{1+\frac{2}{x}} \right)^n(1+x2π)n

含义符号语法备注
可直接符号( a b ) , [ a b ] , { a b } ∣ a b ∣ \left( \frac{a}{b} \right),\left[ \frac{a}{b} \right],\left\{ \frac{a}{b} \right\}\left| \frac{a}{b} \right|(ba),[ba],{ba}ba\left( \frac{a}{b} \right)
\left[ \frac{a}{b} \right]
\left{ \frac{a}{b} \right}
\left| \frac{a}{b} \right|
角括号⟨ a b ⟩ \left\langle \frac{a}{b} \right\rangleba\left\langle \frac{a}{b} \right\rangle
取消一侧括号显示A B } → X \left. \frac{A}{B} \right\} \to XBA}X\left. \frac{A}{B} \right} \to X在取消显示的一侧加上"."
括号大小( ( ( ( ( ( \bigl( \Bigl( \biggl( \Biggl((((((
] ] ] ] ] \Biggr] \biggr] \Bigr] \bigr] ]]]]]]
(\bigl( \Bigl( \biggl( \Biggl(
\Biggr] \biggr] \Bigr] \bigr] ]
普通<big<Big<bigg<Bigg
空格a b a \qquad baba \qquad b双空格
a b a \quad baba \quad b单空格
a   b a\ ba ba\ b或a \text{ } b字符空格
a b \mathit{ab}ab\mathit{ab}没有空格(用于多字母变量)
a ⁣ b a\!baba!b负空格
强制换行y = 1729 x   y = 1729 − x y=1729x \\\ y=1729-xy=1729x y=1729x\ \两个紧邻的"\"

6. 颜色

字体颜色

格式:\color{options}{math}
第一个参数为颜色,第二个参数为公式或文本内容

符号语法
x 1 , 2 = − b ± b 2 − 4 a c 2 a {\color{Brown}x_{1,2}}=\frac{{\color{Bluegreen}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a }x1,2=2ab±b24ac{\color{Brown}x_{1,2}}=\frac{{\color{Bluegreen}-b}\pm\sqrt{\color{Red}b^2-4ac}}{\color{Green}2a }

背景颜色

格式1:\colorbox{options}{text}
第一个参数为颜色,第二个参数为文本内容

格式2:\colorbox{options}{$\displaystyle + 公式$}

第一个参数为颜色,第二个参数为公式内容

RGB颜色和自定义

格式:\color[RGB]{R,G,B} 或者\colo{R,G,B}

R,G,B取值范围为[0,255]10或者[00,ff]16

符号语法
x 1 , 2 {\color{#44a920}x_{1,2}}x1,2{\color[RGB]{68,169,32}x_{1,2}}或{\color{#44a920}x_{1,2}}

格式:\definecolor{mycolor}{RGB}{R,G,B}

{\color{mycolor}x_{1,2}}

符号语法
KaTeX parse error: Undefined control sequence: \definecolor at position 1: \̲d̲e̲f̲i̲n̲e̲c̲o̲l̲o̲r̲{mycolor}{RGB}{…\definecolor{mycolor}{RGB}{68,169,32}
{\color{mycolor}mycolor}

默认支持颜色

A p r i c o t \color{Apricot}{Apricot}ApricotE m e r a l d \color{Emerald}{Emerald}EmeraldO l i v e G r e e n \color{OliveGreen}{OliveGreen}OliveGreenKaTeX parse error: Invalid color: 'Rubine Red' at position 7: \color{̲R̲u̲b̲i̲n̲e̲ ̲R̲e̲d̲}̲{Rubine Red}
A q u a m a r i n e \color{Aquamarine}{Aquamarine}AquamarineF o r e s t G r e e n \color{ForestGreen}{ForestGreen}ForestGreenO r a n g e \color{Orange}{Orange}OrangeS a l m o n \color{Salmon}{Salmon}Salmon
B i t t e r s w e e t \color{Bittersweet}{Bittersweet}BittersweetF u c h s i a \color{Fuchsia}{Fuchsia}FuchsiaO r a n g e R e d \color{OrangeRed}{OrangeRed}OrangeRedS e a G r e e n \color{SeaGreen}{SeaGreen}SeaGreen
B l a c k \color{Black}{Black}BlackG o l d e n r o d \color{Goldenrod}{Goldenrod}GoldenrodO r c h i d \color{Orchid}{Orchid}OrchidS e p i a \color{Sepia}{Sepia}Sepia
B l u e \color{Blue}{Blue}BlueG r a y \color{Gray}{Gray}GrayP e a c h \color{Peach}{Peach}PeachS k y B l u e \color{SkyBlue}{SkyBlue}SkyBlue
B l u e G r e e n \color{BlueGreen}{BlueGreen}BlueGreenG r e e n \color{Green}{Green}GreenP e r i w i n k l e \color{Periwinkle}{Periwinkle}PeriwinkleS p r i n g G r e e n \color{SpringGreen}{SpringGreen}SpringGreen
B l u e v i o l e t \color{Blueviolet}{Blueviolet}BluevioletG r e e n Y e l l o w \color{GreenYellow}{GreenYellow}GreenYellowP i n e G r e e n \color{PineGreen}{PineGreen}PineGreenT a n \color{Tan}{Tan}Tan
B r i c k R e d \color{BrickRed}{BrickRed}BrickRedJ u n g l e G r e e n \color{JungleGreen}{JungleGreen}JungleGreenP l u m \color{Plum}{Plum}PlumT e a l B l u e \color{TealBlue}{TealBlue}TealBlue
B r o w n \color{Brown}{Brown}BrownL a v e n d e r \color{Lavender}{Lavender}LavenderP r o c e s s B l u e \color{ProcessBlue}{ProcessBlue}ProcessBlueT h i s t l e \color{Thistle}{Thistle}Thistle
B u r n t O r a n g e \color{BurntOrange}{BurntOrange}BurntOrangeL i m e G r e e n \color{LimeGreen}{LimeGreen}LimeGreenP u r p l e \color{Purple}{Purple}PurpleT u r q u o i s e \color{Turquoise}{Turquoise}Turquoise
C a d e t B l u e \color{CadetBlue}{CadetBlue}CadetBlueM a g e n t a \color{Magenta}{Magenta}MagentaR a w S i e n n a \color{RawSienna}{RawSienna}RawSiennaV i o l e t \color{Violet}{Violet}Violet
C a r n a t i o n P i n k \color{CarnationPink}{CarnationPink}CarnationPinkM a h o g a n y \color{Mahogany}{Mahogany}MahoganyR e d \color{Red}{Red}RedV i o l e t R e d \color{VioletRed}{VioletRed}VioletRed
C e r u l e a n \color{Cerulean}{Cerulean}CeruleanM a r o o n \color{Maroon}{Maroon}MaroonR e d O r a n g e \color{RedOrange}{RedOrange}RedOrangeW h i t e \color{White}{White}White
C o r n f l o w e r B l u e \color{CornflowerBlue}{CornflowerBlue}CornflowerBlueM e l o n \color{Melon}{Melon}MelonR e d v i o l e t \color{Redviolet}{Redviolet}RedvioletW i l d S t r a w b e r r y \color{WildStrawberry}{WildStrawberry}WildStrawberry
C y a n \color{Cyan}{Cyan}CyanM i d n i g h t B l u e \color{MidnightBlue}{MidnightBlue}MidnightBlueR h o d a m i n e \color{Rhodamine}{Rhodamine}RhodamineY e l l o w \color{Yellow}{Yellow}Yellow
D a n d e l i o n \color{Dandelion}{Dandelion}DandelionM u l b e r r y \color{Mulberry}{Mulberry}MulberryR o y a l B l u e \color{RoyalBlue}{RoyalBlue}RoyalBlueY e l l o w G r e e n \color{YellowGreen}{YellowGreen}YellowGreen
D a r k O r c h i d \color{DarkOrchid}{DarkOrchid}DarkOrchidN a v y B l u e \color{NavyBlue}{NavyBlue}NavyBlueR o y a l P u r p l e \color{RoyalPurple}{RoyalPurple}RoyalPurpleY e l l o w O r a n g e \color{YellowOrange}{YellowOrange}YellowOrange

版权声明:本文为cheng773608490原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。