Contents
  1. 1. Inserting Formulas
  2. Inline Formulas
  3. Display Formulas
  4. 2. Math Operators
  5. Multiplication and Division
  6. Fractions
  7. Square Roots
  8. Derivatives and Partial Derivatives
  9. Absolute Value
  10. Summation
  11. Product
  12. Integration
  13. Matrices
  14. 3. Letter Modifiers
  15. Subscripts and Superscripts
  16. Vectors
  17. Ellipsis
  18. Braces
  19. Overline and Underline
  20. 4. Special Letters
  21. Greek Alphabet
  22. Common Relation Symbols
  23. Special Symbols
  24. Special Fonts
  25. 5. Text Styling
  26. Text Color
  27. Text Highlight

1. Inserting Formulas

Inline Formulas

$f(x)=x$

f(x)=xf(x)=x

Display Formulas

$f(x)=x$

f(x)=xf(x)=x

2. Math Operators

Multiplication and Division

$a \times b$
$a \div b$

a×ba \times b a÷ba \div b

Fractions

$\frac{a}{b}$

ab\frac{a}{b}

Square Roots

$\sqrt{}$
$\sqrt[m]{n}$

3\sqrt{3} nm\sqrt[m]{n}

Derivatives and Partial Derivatives

$\frac{\mathrm{d}y}{\mathrm{d}x}$ %求导
$\frac{\partial f}{\partial x}$   %偏导
$f^{'}(x)$     %求导撇
$f^{''}(x)$
$\dot{y}$      %求导点
$\ddot{y}$
$\dddot{y}$
$\nabla{f}$    %全微分

dydx\frac{\mathrm{d}y}{\mathrm{d}x}

fx\frac{\partial f}{\partial x}

f(x)f^{'}(x) f(x)f^{''}(x)

y˙\dot{y} y¨\ddot{y} y...\dddot{y}

f\nabla{f}

Absolute Value

$|x_n|$
$\lvert x_n\rvert$

xn|x_n| xn\lvert x_n\rvert

Summation

$\sum_{i=1}^{n}$

i=1n\sum_{i=1}^{n}

Product

$\prod_{i=1}^{n}$

i=1n\prod_{i=1}^{n}

Integration

$\int_{i=1}^{n}$

i=1n\int_{i=1}^{n}

Matrices

$$
P=\begin{bmatrix}{}
p_{1,1} & p_{1,2} & \cdots & p_{1,|S|}\\
p_{2,1} & p_{2,2} & \cdots & p_{2,|S|}\\
\cdots & \cdots & \cdots & \cdots\\
p_{|S|,1} & p_{|S|,2} & \cdots & p_{|S|,|S|}
\end{bmatrix}
$$
P=[p1,1p1,2p1,Sp2,1p2,2p2,SpS,1pS,2pS,S]P=\begin{bmatrix}{} p_{1,1} & p_{1,2} & \cdots & p_{1,|S|}\\ p_{2,1} & p_{2,2} & \cdots & p_{2,|S|}\\ \cdots & \cdots & \cdots & \cdots\\ p_{|S|,1} & p_{|S|,2} & \cdots & p_{|S|,|S|} \end{bmatrix}

3. Letter Modifiers

Subscripts and Superscripts

^{} %上标$x^{2}$
_{} %下标$x_{1}$

x2x^{2} x1x_{1}

Vectors

$\vec{a}$
$\overrightarrow{AB}$

a\vec{a} AB\overrightarrow{AB}

Ellipsis

$\cdots$   %省略号...$1,2,3,\cdots,n$

1,2,3,,n1,2,3,\cdots,n

Braces

$\underbrace{n}_{m}$ % 大括号 \underbrace{1,2,3,\cdots,n}_{m}

1,2,3,,nm\underbrace{1,2,3,\cdots,n}_{m}

Overline and Underline

$\overline{m+n}$ %m+n公式上面加上横杠 
$\underline{m+n}$%m+n公式下面加上横杠

m+n\overline{m+n}

m+n\underline{m+n}

4. Special Letters

Greek Alphabet

Lowercase GreekCodeUppercase GreekCode
α\alpha\alpha
β\beta\beta
γ\gamma\gammaΓ\Gamma\Gamma
δ\delta\deltaΔ\Delta\Delta
ϵ\epsilon\epsilon
ε\varepsilon\varepsilon
ζ\zeta\zeta
η\eta\eta
θ\theta\thetaΘ\Theta\Theta
ϑ\vartheta\vartheta
ι\iota\iota
κ\kappa\kappa
λ\lambda\lambdaΛ\Lambda\Lambda
μ\mu\mu
ν\nu\nu
ξ\xi\xiΞ\Xi\Xi
π\pi\piΠ\Pi\Pi
ϖ\varpi\varpi
ρ\rho\rho
ϱ\varrho\varrho
σ\sigma\sigmaΣ\Sigma\Sigma
ς\varsigma\varsigma
τ\tau\tau
υ\upsilon\upsilon
ϕ\phi\phiΦ\Phi\Phi
φ\varphi\varphi
χ\chi\chi
ψ\psi\psiΨ\Psi\Psi
ω\omega\omegaΩ\Omega\Omega

Common Relation Symbols

All relation symbols can be prefixed with \not to denote negation.

SymbolCode
\neq\neq or \not=
\leq\leq or \le
\geq\geq or \ge
\ll\ll
\gg\gg
\subset\subset
\supset\supset
\subseteq\subseteq
\supseteq\supseteq
\in\in
\ni\ni
\bigcup\bigcup
\bigcap\bigcap
\propto\propto
\infty\infty

Special Symbols

SymbolCode
\leftarrow\leftarrow
\Leftarrow\Leftarrow
\rightarrow\rightarrow
\Rightarrow\Rightarrow
\leftrightarrow\leftrightarrow
\Leftrightarrow\Leftrightarrow
\leftharpoonup\leftharpoonup
\leftharpoondown\leftharpoondown
\rightharpoondown\rightharpoonup
\rightharpoondown\rightharpoondown
\leftrightharpoons\leftrightharpoons

Special Fonts

Font StyleCode
ABCdef\mathrm{ABCdef}\mathrm{ABCdef}
ABCdef\mathit{ABCdef}\mathit{ABCdef}
ABCdef\mathnormal{ABCdef}\mathnormal{ABCdef}
ABC\mathcal{ABC}\mathcal{ABC}
ABC\mathscr{ABC}\mathscr{ABC}
ABCdef\mathfrak{ABCdef}\mathfrak{ABCdef}
ABC\mathbb{ABC}\mathbb{ABC}

5. Text Styling

Text Color

$\color{blue}{文字}$             %文字颜色
$\color[rgb]{0.9,0.1,0.2}{文字}$%rgb三个参数取值[0,1]

文字\color{blue}{文字} \color[rgb]{0.9,0.1,0.2}{文字}

Text Highlight

$\colorbox{green}{文字}$              %文字颜色
$\colorbox{yellow}{\color{red}{文字}}$%复合用法

文字\colorbox{green}{文字} 文字\colorbox{yellow}{\color{red}{文字}}