KaTex语法学习

KaTex语法学习

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} α=1e2

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=0n(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} dfracbpmsqrtb24ac2a

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+e8πe6πe4πe2π

( ∑ _ 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 k1k=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 1np1kp

e i π + 1 = 0 e^{i \pi} + 1 = 0 e+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=2ab±b24ac

x 2 + 2 x − 1 {\color{Blue}x^2}+{\color{YellowOrange}2x}-{\color{OliveGreen}1} x2+2x1

∑ 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 12121[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=1Nk2

∑ 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=1Nxi

∏ 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=1Nxi

∐ 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
KaTeX vs MathJax

https://jsperf.com/katex-vs-mathjax

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值