KaTex语法学习
Examples
行内的公式 Inline
E = m c 2 E=mc^2 E=mc2
Inline 行内的公式 E = m c 2 E=mc^2 E=mc2 行内的公式,行内的 E = m c 2 E=mc^2 E=mc2公式。
c = p m s q r t a 2 + b 2 c = \\pm\\sqrt{a^2 + b^2} c=pmsqrta2+b2
x > y x > y x>y
f ( x ) = x 2 f(x) = x^2 f(x)=x2
α = 1 − e 2 \alpha = \sqrt{1-e^2} α=1−e2
KaTeX parse error: Can't use function '\(' in math mode at position 1: \̲(̲\sqrt{3x-1}+(1+…
sin ( α ) θ = ∑ i = 0 n ( x i + cos ( f ) ) \sin(\alpha)^{\theta}=\sum_{i=0}^{n}(x^i + \cos(f)) sin(α)θ=i=0∑n(xi+cos(f))
d f r a c − b p m s q r t b 2 − 4 a c 2 a \\dfrac{-b \\pm \\sqrt{b^2 - 4ac}}{2a} dfrac−bpmsqrtb2−4ac2a
f ( x ) = ∫ − ∞ ∞ f ^ ( ξ ) e 2 π i ξ x d ξ f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi f(x)=∫−∞∞f^(ξ)e2πiξxdξ
1 ( ϕ 5 − ϕ ) e 2 5 π = 1 + e − 2 π 1 + e − 4 π 1 + e − 6 π 1 + e − 8 π 1 + ⋯ \displaystyle \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } } (ϕ5−ϕ)e52π1=1+1+1+1+1+⋯e−8πe−6πe−4πe−2π
( ∑ _ k = 1 n a _ k b _ k ) 2 ≤ ( ∑ _ k = 1 n a _ k 2 ) ( ∑ _ k = 1 n b _ k 2 ) \displaystyle \left( \sum\_{k=1}^n a\_k b\_k \right)^2 \leq \left( \sum\_{k=1}^n a\_k^2 \right) \left( \sum\_{k=1}^n b\_k^2 \right) (∑_k=1na_kb_k)2≤(∑_k=1na_k2)(∑_k=1nb_k2)
a 2 a^2 a2
a 2 + 2 a^{2+2} a2+2
a 2 a_2 a2
x 2 3 {x_2}^3 x23
x 2 3 x_2^3 x23
1 0 1 0 8 10^{10^{8}} 10108
a i , j a_{i,j} ai,j
n P k _nP_k nPk
c = ± a 2 + b 2 c = \pm\sqrt{a^2 + b^2} c=±a2+b2
1 2 = 0.5 \frac{1}{2}=0.5 21=0.5
k k − 1 = 0.5 \dfrac{k}{k-1} = 0.5 k−1k=0.5
( n k ) ( n k ) \dbinom{n}{k} \binom{n}{k} (kn)(kn)
∮ C x 3 d x + 4 y 2 d y \oint_C x^3\, dx + 4y^2\, dy ∮Cx3dx+4y2dy
⋂ 1 n p ⋃ 1 k p \bigcap_1^n p \bigcup_1^k p 1⋂np1⋃kp
e i π + 1 = 0 e^{i \pi} + 1 = 0 eiπ+1=0
( 1 2 ) \left ( \frac{1}{2} \right ) (21)
x 1 , 2 = − b ± b 2 − 4 a c 2 a x_{1,2}=\frac{-b\pm\sqrt{\color{Red}b^2-4ac}}{2a} x1,2=2a−b±b2−4ac
x 2 + 2 x − 1 {\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1} x2+2x−1
∑ k = 1 N k 2 \textstyle \sum_{k=1}^N k^2 ∑k=1Nk2
1 2 [ 1 − ( 1 2 ) n ] 1 − 1 2 = s n \dfrac{ \tfrac{1}{2}[1-(\tfrac{1}{2})^n] }{ 1-\tfrac{1}{2} } = s_n 1−2121[1−(21)n]=sn
( n k ) \binom{n}{k} (kn)
0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + ⋯ 0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+\cdots 0+1+2+3+4+5+6+7+8+9+10+11+12+13+14+15+16+17+18+19+20+⋯
∑ k = 1 N k 2 \sum_{k=1}^N k^2 k=1∑Nk2
∑ k = 1 N k 2 \textstyle \sum_{k=1}^N k^2 ∑k=1Nk2
∏ i = 1 N x i \prod_{i=1}^N x_i i=1∏Nxi
∏ i = 1 N x i \textstyle \prod_{i=1}^N x_i ∏i=1Nxi
∐ i = 1 N x i \coprod_{i=1}^N x_i i=1∐Nxi
∐ i = 1 N x i \textstyle \coprod_{i=1}^N x_i ∐i=1Nxi
∫ 1 3 e 3 / x x 2 d x \int_{1}^{3}\frac{e^3/x}{x^2}\, dx ∫13x2e3/xdx
∫ C x 3 d x + 4 y 2 d y \int_C x^3\, dx + 4y^2\, dy ∫Cx3dx+4y2dy
1 2 Ω 3 4 {}_1^2\!\Omega_3^4 12Ω34
多行公式 Multi line
```math or ```latex or ```katex
f(x) = \int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi
\displaystyle
\left( \sum\_{k=1}^n a\_k b\_k \right)^2
\leq
\left( \sum\_{k=1}^n a\_k^2 \right)
\left( \sum\_{k=1}^n b\_k^2 \right)
\dfrac{
\tfrac{1}{2}[1-(\tfrac{1}{2})^n] }
{ 1-\tfrac{1}{2} } = s_n
\displaystyle
\frac{1}{
\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{
\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {
1+\frac{e^{-6\pi}}
{1+\frac{e^{-8\pi}}
{1+\cdots} }
}
}
f(x) = \int_{-\infty}^\infty
\hat f(\xi)\,e^{2 \pi i \xi x}
\,d\xi