当前位置:   article > 正文

Latex语法公式大全_latex公式

latex公式

Latex常用公式大全

  • 行内公式

    $xxxxx$
    
    • 1
  • 行间公式

    $$
    xxxxxxx
    $$
    
    • 1
    • 2
    • 3

常用功能

功能公式效果
空格(1em)a\quad b a b a\quad b ab
空格(2em)a\qquad b a b a\qquad b ab
空格(0.5em)a\enspace b a b a\enspace b ab
下标n_1 n 1 n_1 n1
上标x^2 x 2 x^2 x2
文本字体加粗机器\textbf{学习} 机器 学习 机器\textbf{学习} 机器学习
数学环境字体加粗\mathbf{x} x \mathbf{x} x
分数\frac{1}{2} 1 n \frac{1}{n} n1
求和符号\sum_{i=1}^{n} ∑ i = 1 n \sum_{i=1}^{n} i=1n
向下取整\left \lfloor a \right \rfloor ⌊ a ⌋ \left \lfloor a \right \rfloor a
向上取整\left \lceil a \right \rceil ⌈ a ⌉ \left \lceil a \right \rceil a
绝对值\vert a \vert ∣ a ∣ \vert a \vert a
范数\Vert W \Vert ∥ W ∥ \Vert W \Vert W
n范数\Vert W \Vert_n ∥ W ∥ n \Vert W \Vert_n Wn
根号\sqrt{x} x \sqrt{x} x
n次根号\sqrt[n]{x} x n \sqrt[n]{x} nx
无穷大\infty ∞ \infty
极限lim_{x \to \infty} l i m x → ∞ lim_{x \to \infty} limx
积分\int_{1}^{5} ∫ 1 5 \int_{1}^{5} 15
连乘积\prod_{j=1}^{3} ∏ j = 1 3 \prod_{j=1}^{3} j=13
乘法符号\times × \times ×
按元素相乘\odot ⊙ \odot
约等于\approx ≈ \approx
不等号\neq ≠ \neq =
恒等于\equiv ≡ \equiv
小于等于\le ≤ \le
大于等于\ge ≥ \ge
远小于\ll ≪ \ll
远大于\gg ≫ \gg
属于\in ∈ \in
不属于\noin ∉ \notin /
并集\cup ∪ \cup
交集\cap ∩ \cap
超集\subset ⊂ \subset
子集\supset ⊃ \supset
偏导\partial ∂ \partial
矩阵转置x^\top x ⊤ x^\top x
点乘x\cdot y x ⋅ y x\cdot y xy
向量\vec{a} a ⃗ \vec{a} a
三圆点(基线)a\ldots b a … b a\ldots b ab
三圆点(居中)a\cdots b a ⋯ b a\cdots b ab
三圆点(垂直)a\vdots b a ⋮ b a\vdots b ab
三圆点(对角线)a\ddots b a ⋱ b a\ddots b ab
箭头(向上)\uparrow ↑ \uparrow
双箭头(向上)\Uparrow ⇑ \Uparrow
箭头(向下)\downarrow ↓ \downarrow
双箭头(向下)\Downarrow ⇓ \Downarrow
箭头(向左)\leftarrow ← \leftarrow
双箭头(向左)\Leftarrow ⇐ \Leftarrow
箭头(向右)\rightarrow → \rightarrow
双箭头(向右)\Rightarrow ⇒ \Rightarrow
波浪号\sim ∼ \sim
在公式下方输入字符\underset{\beta}{\arg\min} arg ⁡ min ⁡ β \underset{\beta}{\arg\min} βargmin

行间公式

公式编号

$$
xxxx\tag{1.1}
$$
  • 1
  • 2
  • 3

x x x x (1.1) xxxx\tag{1.1} xxxx(1.1)
例如:

$$
f(\textbf{w}, b)=\frac{1}{n}\sum_{i=1}^{n}\frac{1}{2}(\textbf{w}^\top\textbf{x}^{(i)}+b-y^{(i)})^2\tag{1.1}
$$
  • 1
  • 2
  • 3

f ( w , b ) = 1 n ∑ i = 1 n 1 2 ( w ⊤ x ( i ) + b − y ( i ) ) 2 (1.1) f(\textbf{w}, b)=\frac{1}{n}\sum_{i=1}^{n}\frac{1}{2}(\textbf{w}^\top\textbf{x}^{(i)}+b-y^{(i)})^2\tag{1.1} f(w,b)=n1i=1n21(wx(i)+by(i))2(1.1)

矩阵的表示

$$
\begin{bmatrix}21 & 2 & \cdots & 20 \\
367 & 95 & \cdots & 3 \\
4\vdots & \vdots &  \ddots & \vdots \\
511 & 22& \cdots & 30 \\6\end{bmatrix}
$$
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

&用于分隔符,\\用于分隔行
[ 1 2 ⋯ 20 67 95 ⋯ 3 ⋮ ⋮ ⋱ ⋮ 11 22 ⋯ 30 ]

[122067953112230]
167112952220330

公式组合

分段函数

D(x) = 
\begin{cases} 
    \lim\limits_{x \to 0} \frac{a^x}{b+c}, & x<3 \\ 
    \pi, & x=3 \\ 
    \int_a^{3b}x_{ij}+e^2 \mathrm{d}x,& x>3 \\ 
\end{cases}\tag{2.5}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

通过cases环境实现公式的组合
D ( x ) = { lim ⁡ x → 0 a x b + c , x < 3 π , x = 3 ∫ a 3 b x i j + e 2 d x , x > 3 (2.5) D(x) =

{limx0axb+c,x<3π,x=3a3bxij+e2dx,x>3
\tag{2.5} D(x)= x0limb+cax,π,a3bxij+e2dx,x<3x=3x>3(2.5)

公式拆分

\begin{split}
    \cos 2x &= \cos^2x - \sin^2x \\
            &= 2\cos^2x-1
\end{split}
  • 1
  • 2
  • 3
  • 4

通过split环境实现公式拆分
cos ⁡ 2 x = cos ⁡ 2 x − sin ⁡ 2 x = 2 cos ⁡ 2 x − 1

cos2x=cos2xsin2x=2cos2x1
cos2x=cos2xsin2x=2cos2x1

其他

公式效果
x' x ′ x' x
x'' x ′ ′ x'' x′′
\hat{x} x ^ \hat{x} x^
\bar{x} x ˉ \bar{x} xˉ
\tilde{x} x ~ \tilde{x} x~

希腊字母

小写希腊字母

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

大写希腊字母

公式效果
\Gamma Γ \Gamma Γ
\Delta Δ \Delta Δ
\Theta Θ \Theta Θ
\Lambda Λ \Lambda Λ
\Xi Ξ \Xi Ξ
\Pi Π \Pi Π
\Sigma Σ \Sigma Σ
\Upsilon Υ \Upsilon Υ
\Phi Φ \Phi Φ
\Psi Ψ \Psi Ψ
\Omega Ω \Omega Ω

花体

公式效果
\mathbb{N} N \mathbb{N} N
\mathcal{N} N \mathcal{N} N
\mathscr{N} N \mathscr{N} N
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/238356
推荐阅读
相关标签
  

闽ICP备14008679号