📄参阅
本文参考的 LaTeX 命令汇总博客
https://blog.csdn.net/yen_csdn/article/details/79966985
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 |
在 xelatex 或 Luatex 引擎的 unicode-math 环境中,这些可能会报错,推荐使用后文的“字体 - 数字模式”或“字体 - 文本模式”
| 含义 | 预览效果 | LaTeX \LaTeX LATEX 命令 |
|---|---|---|
| 正体、罗马体(roman) | A B C \rm{ABC} ABC | \rm{} |
| 粗体(boldface) | A B C \bf{ABC} ABC | \bf{} |
| 斜体(italic) | A B C \it{ABC} ABC | \it{} |
| 花体、书法体(calligraphic) | A B C \cal{ABC} ABC | \cal{} |
| 黑体、无衬线体(sans-serif) | A B C \sf{ABC} ABC | \sf{} |
| 等宽体、打印机体(typewriter) | A B C \tt{ABC} ABC | \tt{} |
| 草体(script) | KaTeX parse error: Undefined control sequence: \scr at position 1: \̲s̲c̲r̲{ABC} | \scr{} |
| 德文尖角体(fraktur) | A B C \frak{ABC} ABC | \frak{} |
数学模式(math mode)
| 含义 | 预览效果 | LaTeX \LaTeX LATEX 命令 |
|---|---|---|
| 正体、罗马体(roman) | A B C \mathrm{ABC} ABC | \mathrm{} |
| 粗体(boldface) | A B C \mathbf{ABC} ABC | \mathbf{} |
| 斜体(italic) | A B C \mathit{ABC} ABC | \mathit{} |
| 花体、书法体(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{} |
| 等宽体、打印机体(typewriter) | A B C \mathtt{ABC} ABC | \mathtt{} |
| 草体(script) | A B C \mathscr{ABC} ABC | \mathscr{} |
| 德文尖角体(fraktur) | A B C \mathfrak{ABC} ABC | \mathfrak{} |
文本模式(text mode),{ }里的所有字符都被识别成文本,而不作为 LaTeX 命令
| 含义 | 预览效果 | LaTeX \LaTeX LATEX 命令 |
|---|---|---|
| 正体、罗马体(roman) | ABC \textrm{ABC} ABC | \textrm{} |
| 粗体(boldface) | ABC \textbf{ABC} ABC | \textbf{} |
| 斜体(italic) | ABC \textit{ABC} ABC | \textit{} |
| 黑体、无衬线体(sans-serif) | ABC \textsf{ABC} ABC | \textsf{} |
| 等宽体、打印机体(typewriter) | ABC \texttt{ABC} ABC | \texttt{} |
| 含义 | 预览效果 | LaTeX \LaTeX LATEX 命令 |
|---|---|---|
| 加粗斜体 | A B C \boldsymbol{ABC} ABC | \boldsymbol{} |
| 正体和左右缩进 | 2 sh x 2\operatorname{sh}x 2shx | \operatorname{} |
| 上下并排 |
max
a
<
x
<
b
\mathop{\max}\limits_{a | \mathop{}\limits_{} |
| 含义 | 预览效果 | L a T e X LaTeX LaTeX 命令 |
|---|---|---|
| 上划线 | x ‾ \overline{x} x | \overline{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} |
| 含义 | 预览效果 | L a T e X LaTeX LaTeX 命令 |
|---|---|---|
| 下划线 | x ‾ \underline{x} x | \underline{x} |
| 含义 | 预览效果 | 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 命令 |
|---|---|---|
| 等于 | = , ≠ =,\neq =,= | =, \neq |
| 恒等于 | ≡ \equiv ≡ | \equiv |
| 约等于 | ≈ \approx ≈ | \approx |
| 大于 | > > > | > |
| 小于 | < < < | < |
| 远大于 | ≫ \gg ≫ | \gg |
| 远小于 | ≪ \ll ≪ | \ll |
| 大于等于 | ≥ , ≱ , ≧ , ≱ \geq,\ngeq,\geqq,\ngeq ≥,≱,≧,≱ | \geq,\ngeq,\geqq,\ngeq |
| 小于等于 | ≤ , ≦ , ≰ , ≰ \leq,\leqq,\nleq,\nleqq ≤,≦,≰, | \leq,\leqq,\nleq,\nleqq |
| 正比例于 | ∝ \propto ∝ | \propto |
| 相似于 | $\sim,\nsim $ | \sim, \nsim |
| 合同于 | ≃ \simeq ≃ | \simeq |
| 全等/等价于 | ≅ , ≆ \cong,\ncong ≅,≆ | \cong, \ncong |
| 垂直于 | ⊥ \bot ⊥ | \bot |
| 含义/预览效果 | 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 |
| 含义 | 预览效果 | 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\infty}x_n=a n→∞limxn=a | \lim\limits_{n\to\infty}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=0∑nCnku(k)v(n−k) | (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} ∂x∂z=∂u∂f∂x∂u+∂v∂f∂x∂v | \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 D∬f(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 ∫abdx∫cdf(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 |
| 最值 |
max
a
<
x
<
b
\mathop{\max}\limits_{a | \mathop{max}\limits_{a |
KaTeX parse error: Undefined control sequence: \mbox at position 23: …egin{matrix}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 \{ a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3\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 ] [a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮am1am2⋯amn] a11a21⋮am1a12a22⋮am2⋯⋯⋱⋯a1na2n⋮amn
\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 ∣ |a11a12⋯a1na21a22⋯a2n⋮⋮⋱⋮am1am2⋯amn| a11a21⋮am1a12a22⋮am2⋯⋯⋱⋯a1na2n⋮amn
\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 |