常用数学符号的LaTeX表示方法

本文介绍如何使用Markdown语法编辑数学公式,包括行内公式、单行公式、希腊字母、上下标、括号、求和积分符号等。同时涵盖字体、根号、特殊函数及标记等内容。

行内公式单行公式(inline or displayed formulas)

行内公式用单个$对,例如:

$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$

效果:∑i=0ni2=(n2+n)(2n+1)6\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}i=0ni2=6(n2+n)(2n+1)

单行公式用$$,例如:

$$\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$$

效果:∑i=0ni2=(n2+n)(2n+1)6\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}i=0ni2=6(n2+n)(2n+1)

希腊字母(Greek letters)

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

上下缀(superscripts and subscripts)

说明代码结果
上缀^$x^2$x2x^2x2
下缀_$x_i$xix_ixi
$\log_2 x$log⁡2x\log_2 xlog2x

分组

用花括号{}来分组,避免歧义。

代码结果
$10^10$101010^101010
$10^{10}$101010^{10}1010
${x^y}^z$xyz{x^y}^zxyz
$x^{y^z}$xyzx^{y^z}xyz
$x_i^2$xi2x_i^2xi2
$x_{i^2}$xi2x_{i^2}xi2

括号

代码结果
$(\frac{\sqrt x}{y^3})$(xy3)(\frac{\sqrt x}{y^3})(y3x)
增大括号$\left(\frac{\sqrt x}{y^3}\right)$(xy3)\left(\frac{\sqrt x}{y^3}\right)(y3x)
$\{ x \}${x}\{ x \}{x}
$\vert x \vert$∣x∣\vert x \vertx
$\Vert x \Vert$∥x∥\Vert x \Vertx
$\langle x \rangle$⟨x⟩\langle x \ranglex
$\lceil x \rceil$⌈x⌉\lceil x \rceilx
$\lfloor x \rfloor$⌊x⌋\lfloor x \rfloorx

求和\sum和积分\int

代码结果
$\sum_1^n$∑1n\sum_1^n1n
$\sum_{i=0}^\infty i^2$∑i=0∞i2\sum_{i=0}^\infty i^2i=0i2
$\prod$∏\prod
$\int$∫\int
$\bigcup$⋃\bigcup
$\bigcap$⋂\bigcap
$\iint$∬\iint
$\iiint$∭\iiint

分数

代码结果
$\frac ab$ab\frac abba
$\frac{a+1}{b+1}$a+1b+1\frac{a+1}{b+1}b+1a+1
${a+1\over b+1}$a+1b+1{a+1\over b+1}b+1a+1

字体

说明代码结果
blackboard bold$\mathbb{Cb}$\Bbb{Cb}Cb\mathbb{Cb}Cb
boldface$\mathbf{Ab}$Ab\mathbf{Ab}Ab
typewriter$\mathtt{Ab}$Ab\mathtt{Ab}Ab
roman$\mathrm{A}$A\mathrm{A}A
sans-serif$\mathsf{A}$A\mathsf{A}A
calligraphic$\mathcal{ A}$A\mathcal{ A}A
script letters$\mathscr{A}$A\mathscr{A}A
Fraktur$\mathfrak{A}$A\mathfrak{A}A

根号

代码结果
$\sqrt{x^3}$x3\sqrt{x^3}x3
$\sqrt[3]{\frac xy}$xy3\sqrt[3]{\frac xy}3yx

特殊函数

例如:“lim”, “sin”, “max”, “ln”。

代码结果
$\lim_{x\to 0}$lim⁡x→0\lim_{x\to 0}limx0
$\sin x$sin⁡x\sin xsinx

特殊标记

代码结果
$\lt\, \gt\, \le\, \ge\, \neq,\not\lt$< > ≤ ≥ ≠,≮\lt\, \gt\, \le\, \ge\, \neq,\not\lt<>=,<
$\times\, \div\, \pm\, \mp$× ÷ ± ∓\times\, \div\, \pm\, \mp×÷±
$\cup\, \cap\, \setminus\, \subset\, \subseteq \,\subsetneq \,\supset\, \in\, \notin\, \emptyset\, \varnothing$∪ ∩ ∖ ⊂ ⊆ ⊊ ⊃ ∈ ∉ ∅ ∅\cup\, \cap\, \setminus\, \subset\, \subseteq \,\subsetneq \,\supset\, \in\, \notin\, \emptyset\, \varnothing/
${n+1 \choose 2k}$(n+12k){n+1 \choose 2k}(2kn+1)
$\to\, \rightarrow\, \leftarrow\, \Rightarrow\, \Leftarrow\, \mapsto$→ → ← ⇒ ⇐ ↦\to\, \rightarrow\, \leftarrow\, \Rightarrow\, \Leftarrow\, \mapsto
$\land\, \lor\, \lnot\, \forall\, \exists\, \top\, \bot\, \vdash\, \vDash$∧ ∨ ¬ ∀ ∃ ⊤ ⊥ ⊢ ⊨\land\, \lor\, \lnot\, \forall\, \exists\, \top\, \bot\, \vdash\, \vDash¬
$\star\, \ast\, \oplus\, \circ\, \bullet$⋆ ∗ ⊕ ∘ ∙\star\, \ast\, \oplus\, \circ\, \bullet
$\approx\, \sim \, \simeq\, \cong\, \equiv\, \prec, \lhd$≈ ∼ ≃ ≅ ≡ ≺,⊲\approx\, \sim \, \simeq\, \cong\, \equiv\, \prec, \lhd,

空格

代码结果
$a\quad b$aba\quad bab
$a\qquad b$aba\qquad bab
$\{x\in s\mid x\text{ is extra large}\}${x∈s∣x is extra large}\{x\in s\mid x\text{ is extra large}\}{xsx is extra large}

音标

代码结果
$\hat x$x^\hat xx^
$\widehat{xy}$xy^\widehat{xy}xy
$\bar x$xˉ\bar xxˉ
$\overline{xyz}$xyz‾\overline{xyz}xyz
$\vec x$x⃗\vec xx
$\overrightarrow{xy}$xy→\overrightarrow{xy}xy
$\dot x^2$x˙2\dot x^2x˙2
$\ddot x$x¨\ddot xx¨

参考:
https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference
http://www.mohu.org/info/symbols/symbols.htm
Web端的katex:https://katex.org/

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

小龙在山东

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

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

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

打赏作者

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

抵扣说明:

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

余额充值