markdown中的ketex公式用法

总述

一般公式分为两种形式,行内公式和行间公式。

行内公式:放在一对$之间,如:$\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t$
     效果: ∑ i = 0 N ∫ a b g ( t , i ) d t \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t i=0Nabg(t,i)dt

行间公式:放在一对$$之间,如:$$\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.$$,效果如下:
Γ ( z ) = ∫ 0 ∞ t z − 1 e − t d t   . \Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,. Γ(z)=0tz1etdt.

希腊字母

希腊字母

常用符号

名称符号举例举例效果备注
上标^$x^{2y}$ x 2 y x^{2y} x2y【1】
下标_$x_{10}$ x 10 x_{10} x10【1】
左上(下)标\sideset{}{}{}$\sideset{^m_n}{^p_q}H$ . n m H q p .^m_nH^p_q .nmHqp【2】
无穷\infty$+ \infty$ + ∞ + \infty +
哈密顿算符\nabla$\nabla \phi$ ∇ ϕ \nabla \phi ϕ
开方\sqrt{}$\sqrt{3}$ 3 \sqrt{3} 3
分数\frac{}{}$\frac{x+y}{3}$ x + y 3 \frac{x+y}{3} 3x+y
极限\lim{}$\lim_{n \rightarrow 0}\frac{1}{n}$ lim ⁡ n → 0 1 n \lim_{n \rightarrow 0}\frac{1}{n} limn0n1
积分\int_{}^{}$\int_0^1 x^2 {\rm d} x$ ∫ 0 1 x 2 d x \int_0^1 x^2 {\rm d} x 01x2dx【3】【4】
累加\sum_{}^{}$\sum_1^n x$ ∑ 1 n x \sum_1^n x 1nx
累乘\prod_{}^{}$\prod_1^n x$ ∏ 1 n x \prod_1^n x 1nx
矢量\vec{}$\vec{a} \cdot \vec{b}=0$ a ⃗ ⋅ b ⃗ = 0 \vec{a} \cdot \vec{b}=0 a b =0【5】
底线省略号\ldots$f(x_1, x_2, \ldots, x_n)$ f ( x 1 , x 2 , … , x n ) f(x_1, x_2, \ldots, x_n) f(x1,x2,,xn)
中线省略号\cdots$x_1^2 + x_2^2+ \cdots + x_n^2$ x 1 2 + x 2 2 + ⋯ + x n 2 x_1^2 + x_2^2+ \cdots + x_n^2 x12+x22++xn2
加减\pm$3 \pm 2$ 3 ± 2 3 \pm 2 3±2
\times$3 \times 2$ 3 × 2 3 \times 2 3×2
\div$3 \div 2$ 3 ÷ 2 3 \div 2 3÷2
取余\mid$3 \mid 2$ 3 ∣ 2 3 \mid 2 32
大于等于\geq$3 \geq 2$ 3 ≥ 2 3 \geq 2 32
小于等于\leq$1 \leq 2$ 1 ≤ 2 1 \leq 2 12
不等于\neq$1 \neq 2$ 1 ≠ 2 1 \neq 2 1=2
约等于\approx$1.01 \approx 1$ 1.01 ≈ 1 1.01 \approx 1 1.011
恒等于\equiv$f(x) \equiv 1$ f ( x ) ≡ 1 f(x) \equiv 1 f(x)1

备注:
【1】 如果内容多于一个字符,需使用{}
【2】 CSDN中的markdown编辑器无此用法,Typora中可正常使用。
【3】\rm 改变公式中的字体,如:公式中正常字体 s i n x sin x sinx ($sin x$),改变后 s i n x {\rm sin} x sinx (${\rm sin} x$)。
【4】\iint ∬ \iint \iiint ∭ \iiint \oint ∮ \oint \oiint ∯ \oiint
【5】点乘: ⋅ \cdot $\cdot$;叉乘: × \times × $\times$

括号

类型代码
小括号 ( ) () ()( )
中括号 [ ] [] [][ ]
大括号 { } \{ \} {}\{ \}\lbrace \rbrace
尖括号 ⟨ ⟩ \langle \rangle \langle \rangle
上取整 ⌈ ⌉ \lceil \rceil \lceil \rceil
下取整 ⌊ ⌋ \lfloor \rfloor \floor \rfloor

备注:

有时候括号需要大号的,普通括号不好看,此时需要使用\left\right加大括号的大小,如:

( x y ) \left(\frac{x}{y}\right) (yx)$\left(\frac{x}{y}\right)$

对于不显示的一边可以使用 . 代替,如:

d u d x ∣ x = 0 \left. \frac{{\rm d}u}{{\rm d}x} \right| _{x=0} dxdux=0$\left. \frac{{\rm d}u}{{\rm d}x} \right| _{x=0}$

该语句适用于所有括号类型

集合运算符

名称符号代码
空集 ∅ \emptyset $\emptyset$
属于 ∈ \in $\in$
不属于 ∉ \notin /$\notin$
含于 ⊂ \subset $\subset$
包含 ⊃ \supset $\supset$
含于 ⊆ \subseteq $\subseteq$
包含 ⊇ \supseteq $\supseteq$
不含于 ⊄ \not\subset $\not\subset$
⋂ \bigcap $\bigcap$
⋃ \bigcup $\bigcup$
⋁ \bigvee $\bigvee$
⋀ \bigwedge $\bigwedge$
⨄ \biguplus $\biguplus$
⨆ \bigsqcup $\bigsqcup$

逻辑运算符

符号代码
∵ \because $\because$
∴ \therefore $\therefore$
∀ \forall $\forall$
∃ \exists $\exists$
≠ \not= =$\not=$
≯ \not> >$\not>$
⊄ \not\subset $\not\subset$

箭头符号

符号代码
↑ \uparrow $\uparrow$
↓ \downarrow $\downarrow$
⇑ \Uparrow $\Uparrow$
⇓ \Downarrow $\Downarrow$
→ \rightarrow $\rightarrow$
← \leftarrow $\leftarrow$
⇒ \Rightarrow $\Rightarrow$
⇐ \Leftarrow $\Leftarrow$
⟶ \longrightarrow $\longrightarrow$
⟵ \longleftarrow $\longleftarrow$
⟹ \Longrightarrow $\Longrightarrow$
⟸ \Longleftarrow $\Longleftarrow$

三角运算符与对数运算符

符号代码
⊥ \bot $\bot$
∠ \angle $\angle$
3 0 ∘ 30^\circ 30$30^\circ$
sin ⁡ cos ⁡ tan ⁡ cot ⁡ sec ⁡ csc ⁡ \sin \cos \tan \cot \sec \csc sincostancotseccsc$\sin \cos \tan \cot \sec \csc$
log ⁡ lg ⁡ ln ⁡ \log \lg \ln loglgln$\log \lg \ln$

戴帽符号

符号举例举例效果
\overline$\overline{y}$ y ‾ \overline{y} y
\hat$\hat{y}$ y ^ \hat{y} y^
\check$\check{y}$ y ˇ \check{y} yˇ
\breve$\breve{y}$ y ˘ \breve{y} y˘

连线符号

举例代码
a + b + c + d ‾ \overline{a+b+c+d} a+b+c+d$\overline{a+b+c+d}$
a + b + c + d ‾ \underline{a+b+c+d} a+b+c+d$\underline{a+b+c+d}$
a + b + c ⏟ 1.0 + d ⏞ 2.0 \overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0} a+1.0 b+c+d 2.0$\overbrace{a+\underbrace{b+c}_{1.0}+d}^{2.0}$

特殊符号

符号代码
⋅ \cdot $\cdot$
∘ \circ $\circ$
∗ \ast $\ast$
⨀ \bigodot $\bigodot$
⨂ \bigotimes $\bigotimes$
⨁ \bigoplus $\bigoplus$
∐ \coprod $\coprod$
′ \prime $\prime$

大型符号

大括号

f ( x ) = { x 2 + 3 0 ≤ x < 4 4 4 ≤ x < 6 6 − x 3 6 ≤ x < 9 3 x ≥ 9 f(x)= \begin{cases} \frac{\sqrt x}{2}+3 & 0 \leq x < 4 \\ 4 & 4 \leq x < 6 \\ 6-\frac{x}{3} & 6 \leq x < 9\\ 3 & x \geq 9 \end{cases} f(x)=2x +3463x30x<44x<66x<9x9
如上面分段函数的表示方法为:

$$
f(x)= 
\begin{cases}
\frac{\sqrt x}{2}+3     &   0 \leq x < 4 \\
4                       &   4 \leq x < 6 \\
6-\frac{x}{3}           &   6 \leq x < 9\\
3                       &   x \geq 9
\end{cases}
$$

改变字体

方法:{\** text}

常见字体有:

罗马体意大利体黑体等线体打字机字体数学斜体花体
\rm\it\bf\sf\tt\mit\cal
t e x t {\rm text} text t e x t {\it text} text t e x t {\bf text} text t e x t {\sf text} text t e x t {\tt text} textCSDN不支持CSDN不支持
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_43964993

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值