常用LaTeX命令

发布于:2022-11-09 ⋅ 阅读:(16) ⋅ 点赞:(0) ⋅ 评论:(0)

本文参考的 LaTeX 命令汇总博客

https://haolaoshi.blog.csdn.net/article/details/89531570

https://blog.csdn.net/cg129054036/article/details/118862823

https://blog.csdn.net/cclethe/article/details/79022216

模式

内联模式

内联模式(inline mode),也就是行内公式块

分隔符一般是 $,如

$ax+by=c$

外显模式

外显模式(display mode),也就是独立公式/行间公式块

分隔符一般是 $$,如:

$$
ax+by=c
$$

展示样式

含义 预览效果 LaTeX \LaTeX LATEX 命令
外显模式样式 A B C \displaystyle{ABC} ABC \displaystyle{}
内联模式样式1 A B C \textstyle{ABC} ABC \textstyle{}
内联模式样式2 A B C \scriptstyle{ABC} ABC \scriptstyle{}
内联模式样式3 A B C \scriptscriptstyle{ABC} ABC \scriptscriptstyle{}

字母/文字/字体

希腊字母

含义/预览效果 LaTeX \LaTeX LATEX 命令
α A \alpha A αA \alpha A
β B \beta B βB \beta B
γ Γ \gamma \Gamma γΓ \gamma \Gamma
δ Δ \delta \Delta δΔ \delta \ Delta
ϵ ε E \epsilon \varepsilon E ϵεE \epsilon \varepsilon E
ζ Z \zeta Z ζZ \zeta Z
η H \eta H ηH \eta H
θ ϑ Θ \theta \vartheta \Theta θϑΘ \theta \vartheta \Theta
ι I \iota I ιI \iota I
κ K \kappa K κK \kappa K
λ Λ \lambda \Lambda λΛ \lambda \Lambda
μ M \mu M μM \mu M
ξ Ξ \xi \Xi ξΞ \xi \Xi
o O o O oO o O
π Π \pi \Pi πΠ \pi \Pi
ρ ϱ P \rho \varrho P ρϱP \rho \varrho P
σ Σ \sigma \Sigma σΣ \sigma \Sigma
τ T \tau T τT \tau T$
υ Υ \upsilon \Upsilon υΥ \upsilon \Upsilon
ϕ φ Φ \phi \varphi \Phi ϕφΦ \phi \varphi \Phi
χ X \chi X χX \chi X
ψ Ψ \psi \Psi ψΨ \psi \Psi
ω Ω \omega \Omega ωΩ \omega \Omega

字体

含义 预览效果 LaTeX \LaTeX LATEX 命令
正体、罗马体(roman) A B C \mathrm{ABC} ABC \mathrm{}
粗体(boldface) A B C \mathbf{ABC} ABC \mathbf{}
花体、书法体(calligraphic) A B C \mathcal{ABC} ABC \mathcal{}
黑体、无衬线体(sans-serif) A B C \mathsf{ABC} ABC \mathsf{}
空心体(blackboard) A B C \mathbb{ABC} ABC \mathbb{}
打印机体 A B C \mathtt{ABC} ABC \mathtt{}
草体(script) A B C \mathscr{ABC} ABC \mathscr{}

符号

运算符号

含义 预览效果 LaTeX \LaTeXLATEX符号
加号和减号 + , − +,- +, +,-
乘法 × , ⋅ ×,\cdot ×, \times , \cdot
除法 ÷ , / , a b \div,/,\frac{a}{b} ÷,/,ba \div , / , \frac{a}{b}
正负号 ± , ∓ \pm,\mp ±, \pm, \mp
括号 ( ) ( ) ( ) , [ ] [ ] [ ] , { } ( ) ()(), [ ] [][], { } \{ \}{} ()()(),[][][],{} ( ), [ ], { }​
连续运行符 ∑ , ∏ , ∐ \sum,\prod,\coprod ,, \sum, \prod, \coprod​, \int​
不定/定积分 ∫ , ∮ \int,\oint , \int, \oint
各类带圈操作 ⊕ , ⊗ , ⊙ , ⊎ \oplus, \otimes, \odot, \uplus ,,, \oplus, \otimes, \odot, \uplus
加大的带圈操作 ⨁ , ⨂ , ⨀ , ⨄ \bigoplus, \bigotimes,\bigodot, \biguplus ,,, \bigoplus, \bigotimes, \bigodot, \biguplus
含义/预览效果 LaTeX \LaTeX LATEX 命令 含义/预览效果 LaTeX \LaTeX LATEX 命令 含义/预览效果 LaTeX \LaTeX LATEX 命令
sin ⁡ \sin sin \sin sinh ⁡ \sinh sinh \sinh $\arcsin $ \arcsin
cos ⁡ \cos cos \cos cosh ⁡ \cosh cosh \cosh arccos ⁡ \arccos arccos \arccos
tan ⁡ \tan tan \tan tanh ⁡ \tanh tanh \tanh arctan ⁡ \arctan arctan \arctan
sec ⁡ \sec sec \sec coth ⁡ \coth coth \coth min ⁡ \min min \min
csc ⁡ \csc csc \csc det ⁡ \det det \det max ⁡ \max max \max
cot ⁡ \cot cot \cot dim ⁡ \dim dim \dim inf ⁡ \inf inf \inf
exp ⁡ \exp exp \exp ker ⁡ \ker ker \ker sup ⁡ \sup sup \sup
log ⁡ \log log \log deg ⁡ \deg deg \deg lim inf ⁡ \liminf liminf \liminf
ln ⁡ \ln ln \ln arg ⁡ \arg arg \arg lim sup ⁡ \limsup limsup \limsup
lg ⁡ \lg lg \lg gcd ⁡ \gcd gcd \gcd lim ⁡ \lim lim \lim

集合符号

含义 预览效果 LaTeX \LaTeX LATEX 命令
子集 ⊆ \subseteq \subset
真子集 ⊂ , ⊊ \subset, \subsetneq , \subset, \subsetneq
超集 ⊇ \supseteq \supseteq
真超集 ⊃ , ⊋ \supset, \supsetneq , \supset, \supsetneq
属于 ∈ , ∋ \in, \ni , \in, \ni
不属于 ∉ , ∌ \notin, \not\ni /, \notin, \not\ni

逻辑符号

含义/预览效果 LaTeX \LaTeX LATEX 命令
∧ \land \land
∧ \wedge \wedge
$\bigwedge $ \bigwedge
$\to $ \to
∨ \lor \lor
∨ \vee \vee
⋁ \bigvee \bigvee
¬ \lnot ¬ \lnot
¬ \neg ¬ \neg$
∖ \setminus \setminus
∖ \smallsetminus \smallsetminus p

箭头符号

预览效果 LaTeX \LaTeX LATEX 命令
↑ \uparrow \uparrow
↓ \downarrow \downarrow
⇑ \Uparrow \Uparrow
⇓ \Downarrow \Downarrow
↕ \updownarrow \updownarrow
⇕ \Updownarrow \Updownarrow
→ \rightarrow \rightarrow
← \leftarrow \leftarrow
⇒ \Rightarrow \Rightarrow
⇐ \Leftarrow \Leftarrow
↔ \leftrightarrow \leftrightarrow
⇔ \Leftrightarrow \Leftrightarrow
⟶ \longrightarrow \longrightarrow
⟵ \longleftarrow \longleftarrow
⟷ \longleftrightarrow \longleftrightarrow
⟹ \Longrightarrow \Longrightarrow
⟸ \Longleftarrow \Longleftarrow
⟺ \Longleftrightarrow \Longleftrightarrow
↦ \mapsto \mapsto
⟼ \longmapsto \longmapsto
↩ \hookleftarrow \hookleftarrow
↪ \hookrightarrow \hookrightarrow
↼ \leftharpoonup \leftharpoonup
⇀ \rightharpoonup \rightharpoonup
↽ \leftharpoondown \leftharpoondown
⇁ \rightharpoondown \rightharpoondown
⇌ \rightleftharpoons \rightleftharpoons
⇝ \leadsto \leadsto
↗ \nearrow \nearrow
↘ \searrow \searrow
↙ \swarrow \swarrow
↖ \nwarrow \nwarrow
↚ \nleftarrow \nleftarrow
↛ \nrightarrow \nrightarrow
⇍ \nLeftarrow \nLeftarrow
⇏ \nRightarrow \nRightarrow
↮ \nleftrightarrow \nleftrightarrow
⇎ \nLeftrightarrow \nLeftrightarrow
⇢ \dashrightarrow \dashrightarrow
⇠ \dashleftarrow \dashleftarrow
⇇ \leftleftarrows \leftleftarrows
⇆ \leftrightarrows \leftrightarrows
⇚ \Lleftarrow \Lleftarrow
↞ \twoheadleftarrow \twoheadleftarrow
↢ \leftarrowtail \leftarrowtail
↫ \looparrowleft \looparrowleft
⇋ \leftrightharpoons \leftrightharpoons
↶ \curvearrowleft \curvearrowleft
↺ \circlearrowleft \circlearrowleft
↰ \Lsh \Lsh
↿ \upharpoonleft \upharpoonleft
⇃ \downharpoonleft \downharpoonleft
⇈ \upuparrows \upuparrows
⊸ \multimap \multimap
↭ \leftrightsquigarrow \leftrightsquigarrow
⇉ \rightrightarrows \rightrightarrows
⇄ \rightleftarrows \rightleftarrows
↠ \twoheadrightarrow \twoheadrightarrow
↣ \rightarrowtail \rightarrowtail
↬ \looparrowright \looparrowright
⇌ \rightleftharpoons \rightleftharpoons
↷ \curvearrowright \curvearrowright
↻ \circlearrowright \circlearrowright
↱ \Rsh \Rsh
⇊ \downdownarrows \downdownarrows
↾ \upharpoonright \upharpoonright
⇂ \downharpoonright \downharpoonright
⇝ \rightsquigarrow \rightsquigarrow

上符号

含义 预览效果 L a T e X LaTeX LaTeX 命令
上划线 x ‾ \overline{x} x \overline{x}
下划线 x ‾ \underline{x} x \underline{x}
上波浪线 x y z ~ \tilde{xyz} xyz~ \tilde{xyz}
上宽波浪线 x y z ~ \widetilde{xyz} xyz \widetilde{xyz}
上空心点 x ˚ \mathring{x} x˚ \mathring{x}
上点 x ˙ \dot{x} x˙ \dot{x}
上双点 x ¨ \ddot{x} x¨ \ddot{x}
上三点 KaTeX parse error: Undefined control sequence: \dddot at position 1: \̲d̲d̲d̲o̲t̲{x} \dddot{x}
上^ x y z ^ \hat{xyz} xyz^ \hat{xyz}
上宽^ x y z ^ \widehat{xyz} xyz \widehat{xyz}
上ˇ x ˇ \check{x} xˇ \check{x}
上ˊ x ˊ \acute{x} xˊ \acute{x}
上ˋ x ˋ \grave{x} xˋ \grave{x}

算式

常见运算

含义 预览效果 LaTeX \LaTeX LATEX 命令
累加 ∑ i = 1 n X i \sum_{i=1}^nX_i i=1nXi \sum_{i=1}^nX_i
累乘 ∏ i = 1 n X i \prod_{i=1}^nX_i i=1nXi \prod_{i=1}^nX_i
极限 lim ⁡ n → ∞ x n = a \lim\limits_{n\to\infin}x_n=a nlimxn=a \lim\limits_{n\to\infin}x_n=a
导数 y ′ , f ′ , f ′ ( x ) , d y d x , d f d x , d d x f ( x ) y',f',f'(x),\frac{\mathrm{d}y}{\mathrm{d}x},\frac{\mathrm{d}f}{\mathrm{d}x},\frac{\mathrm{d}}{\mathrm{d}x}f(x) y,f,f(x),dxdy,dxdf,dxdf(x) y’,f’,f’(x),\frac{\mathrm{d}y}{\mathrm{d}x},\frac{\mathrm{d}f}{\mathrm{d}x},\frac{\mathrm{d}}{\mathrm{d}x}f(x)
高阶导数 ( u v ) ( n ) = ∑ k = 0 n C n k u ( k ) v ( n − k ) (uv)^{(n)}=\sum \limits_{k=0}^n C_n^ku^{(k)}v^{(n-k)} (uv)(n)=k=0nCnku(k)v(nk) (uv)^{(n)}=\sum \limits_{k=0}^n C_nku{(k)}v^{(n-k)}
全微分 d u ( x , y ) = P ( x , y ) d x + Q ( x , y ) d y \mathrm{d}u(x,y)=P(x,y)\mathrm{d}x+Q(x,y)\mathrm{d}y du(x,y)=P(x,y)dx+Q(x,y)dy \mathrm{d}u(x,y)=P(x,y)\mathrm{d}x+Q(x,y)\mathrm{d}y
偏导数 ∂ z ∂ x = ∂ f ∂ u ∂ u ∂ x + ∂ f ∂ v ∂ v ∂ x \frac{\partial z}{\partial x}=\frac{\partial f}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial x} xz=ufxu+vfxv \frac{\partial z}{\partial x}=\frac{\partial f}{\partial u}\frac{\partial u}{\partial x}+\frac{\partial f}{\partial v}\frac{\partial v}{\partial x}
积分 ∫ − ∞ ∞ x   d x \int_{-\infty}^{\infty}x\,dx xdx \int_{-\infty}^{\infty}x,dx
二重积分 ∬ D f ( x , y ) d σ \underset{D}{\iint }f(x,y)\mathrm{d}\sigma Df(x,y)dσ \underset{D}{\iint }f(x,y)\mathrm{d}\sigma
二次积分 ∫ a b d x ∫ c d f ( x , y ) d y \int_{a}^{b} \mathrm{d}x\int_{c}^{d} f(x,y)\mathrm{d}y abdxcdf(x,y)dy \int_{a}^{b} \mathrm{d}x\int_{c}^{d} f(x,y)\mathrm{d}y
曲线积分 ∮ f   d s \oint f\,ds fds \oint f,ds
最值 m a x a < x < b \mathop{max}\limits_{a<x<b} a<x<bmax \mathop{max}\limits_{a<x<b}

分段函数

KaTeX parse error: Undefined control sequence: \mbox at position 22: …begin{cases}1,&\̲m̲b̲o̲x̲{x为有理数}\\\\0,&\…

\begin{equation}
x=
\begin{cases}
1,&\mbox{x为有理数}\\
0,&\mbox{x为无理数}
\end{cases}
\end{equation}

方程

{ a 1 x + b 1 y + c 1 z = d 1 a 2 x + b 2 y + c 2 z = d 2 a 3 x + b 3 y + c 3 z = d 3 \left \{ \begin{array}{c}a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3\end{array}\right. a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3

\left \{ 
\begin{array}{c}
a_1x+b_1y+c_1z=d_1 \\ 
a_2x+b_2y+c_2z=d_2 \\ 
a_3x+b_3y+c_3z=d_3
\end{array}
\right.

矩阵

[ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ] \begin{bmatrix}{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}} \\{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}} \\{\vdots}&{\vdots}&{\ddots}&{\vdots} \\{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}} \\\end{bmatrix} a11a21am1a12a22am2a1na2namn

\begin{bmatrix}
{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}} \\
{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}} \\
{\vdots}&{\vdots}&{\ddots}&{\vdots} \\
{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}} \\
\end{bmatrix}

行列式

∣ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ∣ \begin{vmatrix}{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}} \\{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}} \\{\vdots}&{\vdots}&{\ddots}&{\vdots} \\{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}} \\\end{vmatrix} a11a21am1a12a22am2a1na2namn

\begin{vmatrix}
{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}} \\
{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}} \\
{\vdots}&{\vdots}&{\ddots}&{\vdots} \\
{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}} \\
\end{vmatrix}

缩进

此处em单位(emphasize)意为相对长度单位,相对于当前对象内文本的字体尺寸

含义 预览效果 LaTeX命令
-1/6em a  ⁣ b a\!b ab a!b
0em a b ab ab ab
1/6em a   b a\,b ab a,b
2/7em a    b a\;b ab a;b
1/3em a   b a\ b a b a\ b
1em a b a\quad b ab a\quad b
2em a b a\qquad b ab a\qquad b
任意em(此处以3em为例) a b a\hspace{3em}b ab a\hspace{3em}b