get started

红色为Mathjax不支持的语法

函数、符号及特殊字符

声调/变音符号
\dot{a}, \ddot{a}, \acute{a}, \grave{a}
\check{a}, \breve{a}, \tilde{a}, \bar{a}
\hat{a}, \widehat{a}, \vec{a}
标准函数
\exp_a b = a^b, \exp b = e^b, 10^m
\ln c, \lg d = \log e, \log_{10} f
\sin a, \cos b, \tan c, \cot d, \sec e, \csc f
\arcsin a, \arccos b, \arctan c
\arccot d, \arcsec e, \arccsc f
\sinh a, \cosh b, \tanh c, \coth d
\operatorname{sh}k, \operatorname{ch}l, \operatorname{th}m, \operatorname{coth}n
\operatorname{argsh}o, \operatorname{argch}p, \operatorname{argth}q
\sgn r, \left\vert s \right\vert
\min(x,y), \max(x,y)
界限
\min x, \max y, \inf s, \sup t
\lim u, \liminf v, \limsup w
\dim p, \deg q, \det m, \ker\phi
投射
\Pr j, \hom l, \lVert z \rVert, \arg z
微分及导数
dt, \mathrm{d}t, \partial t, \nabla\psi
dy/dx, \mathrm{d}y/\mathrm{d}x, \frac{dy}{dx}, \frac{\mathrm{d}y}{\mathrm{d}x}, \frac{\partial^2}{\partial x_1\partial x_2}y
\prime, \backprime, f^\prime, f', f'', f^{(3)}, \dot y, \ddot y
类字母符号及常数
\infty, \aleph, \complement, \backepsilon, \eth, \Finv, \hbar
\Im, \imath, \jmath, \Bbbk, \ell, \mho, \wp, \Re, \circledS, \S, \P, \AA 𝕜§
模算数
s_k \equiv 0 \pmod{m}
a \bmod b
\gcd(m, n), \operatorname{lcm}(m, n)
\mid, \nmid, \shortmid, \nshortmid
根号
\surd, \sqrt{2}, \sqrt[n]{}, \sqrt[3]{\frac{x^3+y^3}{2}}
运算符
+, -, \pm, \mp, \dotplus
\times, \div, \divideontimes, /, \backslash
\cdot, * \ast, \star, \circ, \bullet
\boxplus, \boxminus, \boxtimes, \boxdot
\oplus, \ominus, \otimes, \oslash, \odot
\circleddash, \circledcirc, \circledast
\bigoplus, \bigotimes, \bigodot
集合
\{ \}, \O \empty \emptyset, \varnothing
\in, \notin \not\in, \ni, \not\ni
\cap, \Cap, \sqcap, \bigcap
\cup, \Cup, \sqcup, \bigcup, \bigsqcup, \uplus, \biguplus
\setminus, \smallsetminus, \times
\subset, \Subset, \sqsubset
\supset, \Supset, \sqsupset
\subseteq, \nsubseteq, \subsetneq, \varsubsetneq, \sqsubseteq
\supseteq, \nsupseteq, \supsetneq, \varsupsetneq, \sqsupseteq
\subseteqq, \nsubseteqq, \subsetneqq, \varsubsetneqq
\supseteqq, \nsupseteqq, \supsetneqq, \varsupsetneqq
关系符号
=, \ne, \neq, \equiv, \not\equiv
\doteq, \doteqdot, \overset{\underset{\mathrm{def}}{}}{=}, :=
\sim, \nsim, \backsim, \thicksim, \simeq, \backsimeq, \eqsim, \cong, \ncong
\approx, \thickapprox, \approxeq, \asymp, \propto, \varpropto
<, \nless, \ll, \not\ll, \lll, \not\lll, \lessdot
>, \ngtr, \gg, \not\gg, \ggg, \not\ggg, \gtrdot
\le, \leq, \lneq, \leqq, \nleq, \nleqq, \lneqq, \lvertneqq
\ge, \geq, \gneq, \geqq, \ngeq, \ngeqq, \gneqq, \gvertneqq
\lessgtr, \lesseqgtr, \lesseqqgtr, \gtrless, \gtreqless, \gtreqqless
\leqslant, \nleqslant, \eqslantless
\geqslant, \ngeqslant, \eqslantgtr
\lesssim, \lnsim, \lessapprox, \lnapprox
\gtrsim, \gnsim, \gtrapprox, \gnapprox
\prec, \nprec, \preceq, \npreceq, \precneqq
\succ, \nsucc, \succeq, \nsucceq, \succneqq
\preccurlyeq, \curlyeqprec
\succcurlyeq, \curlyeqsucc
\precsim, \precnsim, \precapprox, \precnapprox
\succsim, \succnsim, \succapprox, \succnapprox
几何符号
\parallel, \nparallel, \shortparallel, \nshortparallel
\perp, \angle, \sphericalangle, \measuredangle, 45^\circ
\Box, \blacksquare, \diamond, \Diamond \lozenge, \blacklozenge, \bigstar
\bigcirc, \triangle, \bigtriangleup, \bigtriangledown
\vartriangle, \triangledown
\blacktriangle, \blacktriangledown, \blacktriangleleft, \blacktriangleright
逻辑符号
\forall, \exists, \nexists
\therefore, \because, \And
\lor \vee, \curlyvee, \bigvee
\land \wedge, \curlywedge, \bigwedge
\bar{q}, \bar{abc}, \overline{q}, \overline{abc}, \lnot \neg, \not\operatorname{R}, \bot, \top
\vdash \dashv, \vDash, \Vdash, \models
\Vvdash \nvdash \nVdash \nvDash \nVDash
\ulcorner \urcorner \llcorner \lrcorner
箭头
\Rrightarrow, \Lleftarrow
\Rightarrow, \nRightarrow, \Longrightarrow \implies
\Leftarrow, \nLeftarrow, \Longleftarrow
\Leftrightarrow, \nLeftrightarrow, \Longleftrightarrow \iff
\Uparrow, \Downarrow, \Updownarrow
\rightarrow \to, \nrightarrow, \longrightarrow
\leftarrow \gets, \nleftarrow, \longleftarrow
\leftrightarrow, \nleftrightarrow, \longleftrightarrow
\uparrow, \downarrow, \updownarrow
\nearrow, \swarrow, \nwarrow, \searrow
\mapsto, \longmapsto
\rightharpoonup \rightharpoondown \leftharpoonup \leftharpoondown \upharpoonleft \upharpoonright \downharpoonleft \downharpoonright \rightleftharpoons \leftrightharpoons
\curvearrowleft \circlearrowleft \Lsh \upuparrows \rightrightarrows \rightleftarrows \rightarrowtail \looparrowright
\curvearrowright \circlearrowright \Rsh \downdownarrows \leftleftarrows \leftrightarrows \leftarrowtail \looparrowleft
\hookrightarrow \hookleftarrow \multimap \leftrightsquigarrow \rightsquigarrow \twoheadrightarrow \twoheadleftarrow
特殊符号
\amalg \P \S \% \dagger \ddagger \ldots \cdots §
\smile \frown \wr \triangleleft \triangleright
\diamondsuit, \heartsuit, \clubsuit, \spadesuit, \Game, \flat, \natural, \sharp
未排序
\diagup \diagdown \centerdot \ltimes \rtimes \leftthreetimes \rightthreetimes
\eqcirc \circeq \triangleq \bumpeq \Bumpeq \doteqdot \risingdotseq \fallingdotseq
\intercal \barwedge \veebar \doublebarwedge \between \pitchfork
\vartriangleleft \ntriangleleft \vartriangleright \ntriangleright
\trianglelefteq \ntrianglelefteq \trianglerighteq \ntrianglerighteq
\not6, \frac{1\not6}{\not64}=\frac{1}{4}

上标、下标及积分等

功能 语法 效果
上标 a^2
下标 a_2
组合 a^{2+2}
a_{i,j}
结合上下标 x_2^3
前置上下标 {}_1^2\!X_3^4
导数 (HTML x'
导数 (PNG x^\prime
导数 (错误 x\prime
导数点 \dot{x}
\ddot{y}
向量 \vec{c}
\overleftarrow{a b}
\overrightarrow{c d}
\overleftrightarrow{a b}
\widehat{e f g}
上弧
(注: 正确应该用 \overarc,
但在这里行不通。
要用建议的语法作为解决办法。)
(使用\overarc时需要引入{arcs}包。)
\overset{\frown} {AB}
上划线 \overline{h i j}
下划线 \underline{k l m}
上括号 \overbrace{1+2+\cdots+100}
\overbrace{ 1+2+\cdots+100 }^{5050}
下括号 \underbrace{a+b+\cdots+z}
\underbrace{ a+b+\cdots+z }_{26}
求和 \sum_{k=1}^N k^2
\begin{matrix} 
\sum_{k=1}^N k^2
\end{matrix}
求积 \prod_{i=1}^N x_i
\begin{matrix} 
\prod_{i=1}^N x_i
\end{matrix}
上积 \coprod_{i=1}^N x_i
\begin{matrix} 
\coprod_{i=1}^N x_i
\end{matrix}
极限 \lim_{n \to \infty}x_n
\begin{matrix} 
\lim_{n \to \infty}x_n
\end{matrix}
积分 \int_{-N}^{N} e^x\, \mathrm{d}x
\begin{matrix} 
\int_{-N}^{N} e^x, \mathrm{d}x
\end{matrix}
双重积分 \iint_{D}^{W} \, \mathrm{d}x\,\mathrm{d}y
三重积分 \iiint_{E}^{V} \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z
四重积分 \iiiint_{F}^{U} \, \mathrm{d}x\,\mathrm{d}y\,\mathrm{d}z\,\mathrm{d}t
闭合的曲线积分、曲面积分 \oint_{C} x^3\, \mathrm{d}x + 4y^2\, \mathrm{d}y
交集 \bigcap_1^{n} p
并集 \bigcup_1^{k} p

分数、矩阵和多行列式

功能 语法 效果
分数 \frac{2}{4}=0.5
{2 \over 3}
{{a+b} \over {a-b}}
小型分数 \tfrac{2}{4} = 0.5
大型分数(嵌套) \cfrac{2}{c + \cfrac{2}{d + \cfrac{2}{4}}} = a
大型分数(不嵌套) \dfrac{2}{4} = 0.5 \qquad \dfrac{2}{c + \dfrac{2}{d + \dfrac{2}{4}}} = a
二项式系数 \dbinom{n}{r}=\binom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}
n \choose n-r, n^2 \choose r_1, a-b \choose c+d, {n \choose 0}+{n \choose 1} ,,,
小型二项式系数 \tbinom{n}{r}=\tbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}
大型二项式系数 \binom{n}{r}=\dbinom{n}{n-r}=\mathrm{C}_n^r=\mathrm{C}_n^{n-r}
矩阵
\begin{matrix}
x & y \\
z & v
\end{matrix}
\begin{vmatrix} 
x & y \\
z & v
\end{vmatrix}
\begin{Vmatrix} 
x & y \\
z & v
\end{Vmatrix}
\begin{bmatrix} 
0 & \cdots & 0 \\
\vdots & \ddots & \vdots \\
0 & \cdots & 0
\end{bmatrix}
\begin{Bmatrix}
x & y \\
z & v
\end{Bmatrix}
\begin{pmatrix} 
x & y \\
z & v
\end{pmatrix}
\bigl( \begin{smallmatrix}
a&b\\ c&d
\end{smallmatrix} \bigr)
条件定义
f(n) = 
\begin{cases}
n/2, & \mbox{if }n\mbox{ is even} \\
3n+1, & \mbox{if }n\mbox{ is odd}
\end{cases}
多行等式、同余式
\begin{align} 
f(x) & = (m+n)^2 \\
& = m^2+2mn+n^2 \\
\end{align}
\begin{align} 
3^{6n+3}+4^{6n+3}
& \equiv (3^3)^{2n+1}+(4^3)^{2n+1}\\
& \equiv 27^{2n+1}+64^{2n+1}\\
& \equiv 27^{2n+1}+(-27)^{2n+1}\\
& \equiv 27^{2n+1}-27^{2n+1}\\
& \equiv 0 \pmod{91}\\
\end{align}
\begin{alignat}{3} 
f(x) & = (m-n)^2 \\
f(x) & = (-m+n)^2 \\
& = m^2-2mn+n^2 \\
\end{alignat}
多行等式(左对齐)
\begin{array}{lcl} 
z & = & a \\
f(x,y,z) & = & x + y + z
\end{array}
多行等式(右对齐)
\begin{array}{lcr} 
z & = & a \\
f(x,y,z) & = & x + y + z
\end{array}
方程组
\begin{cases} 
3x + 5y + z \\
7x - 2y + 4z \\
-6x + 3y + 2z
\end{cases}
数组
\begin{array}{|c|c||c|} a & b & S \\ 
\hline
0&0&1\\
0&1&1\\
1&0&1\\
1&1&0\\
\end{array}

字体

希腊字母
\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta
\Iota \Kappa \Lambda \Mu \Nu \Xi \Omicron \Pi
\Rho \Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega
\alpha \beta \gamma \delta \epsilon \zeta \eta \theta
\iota \kappa \lambda \mu \nu \omicron \xi \pi
\rho \sigma \tau \upsilon \phi \chi \psi \omega
\varepsilon \digamma \varkappa \varpi
\varrho \varsigma \vartheta \varphi
希伯来符号
\aleph \beth \gimel \daleth
黑板报粗体
\mathbb{ABCDEFGHI}
\mathbb{JKLMNOPQR}
\mathbb{STUVWXYZ}
粗体
\mathbf{ABCDEFGHI}
\mathbf{JKLMNOPQR}
\mathbf{STUVWXYZ}
\mathbf{abcdefghijklm}
\mathbf{nopqrstuvwxyz}
\mathbf{0123456789}
粗体希腊字母
\boldsymbol{\Alpha\Beta\Gamma\Delta\Epsilon\Zeta\Eta\Theta}
\boldsymbol{\Iota\Kappa\Lambda\Mu\Nu\Xi\Pi\Rho}
\boldsymbol{\Sigma\Tau\Upsilon\Phi\Chi\Psi\Omega}
\boldsymbol{\alpha\beta\gamma\delta\epsilon\zeta\eta\theta}
\boldsymbol{\iota\kappa\lambda\mu\nu\xi\pi\rho}
\boldsymbol{\sigma\tau\upsilon\phi\chi\psi\omega}
\boldsymbol{\varepsilon\digamma\varkappa\varpi} 𝟋
\boldsymbol{\varrho\varsigma\vartheta\varphi}
斜体(拉丁字母默认)
\mathit{0123456789}
斜体希腊字母(小写字母默认)
\mathit{\Alpha\Beta\Gamma\Delta\Epsilon\Zeta\Eta\Theta}
\mathit{\Iota\Kappa\Lambda\Mu\Nu\Xi\Pi\Rho}
\mathit{\Sigma\Tau\Upsilon\Phi\Chi\Psi\Omega}
罗马体
\mathrm{ABCDEFGHI}
\mathrm{JKLMNOPQR}
\mathrm{STUVWXYZ}
\mathrm{abcdefghijklm}
\mathrm{nopqrstuvwxyz}
\mathrm{0123456789}
无衬线体
\mathsf{ABCDEFGHI}
\mathsf{JKLMNOPQR}
\mathsf{STUVWXYZ}
\mathsf{abcdefghijklm}
\mathsf{nopqrstuvwxyz}
\mathsf{0123456789}
无衬线体希腊字母(仅大写)
\mathsf{\Alpha \Beta \Gamma \Delta \Epsilon \Zeta \Eta \Theta}
\mathsf{\Iota \Kappa \Lambda \Mu \Nu \Xi \Pi \Rho}
\mathsf{\Sigma \Tau \Upsilon \Phi \Chi \Psi \Omega}
手写体/花体
\mathcal{ABCDEFGHI}
\mathcal{JKLMNOPQR}
\mathcal{STUVWXYZ}
Fraktur体
\mathfrak{ABCDEFGHI}
\mathfrak{JKLMNOPQR}
\mathfrak{STUVWXYZ}
\mathfrak{abcdefghijklm}
\mathfrak{nopqrstuvwxyz}
\mathfrak{0123456789}
小型手写体
{\scriptstyle\text{abcdefghijklm}}

大写的希腊字母支持11个:

混合字体

特征 语法 渲染效果
斜体字符(忽略空格) x y z
非斜体字符 \text{x y z}
混合斜体(差) \text{if} n \text{is even}
混合斜体(好) \text{if }n\text{ is even}
混合斜体( 替代品:~ 或者”\ “强制空格) \text{if}~n\ \text{is even}

括号

功能 语法 显示
短括号 ( \frac{1}{2} )
长括号 \left( \frac{1}{2} \right)

不同括号

功能 语法 显示
圆括号,小括号 \left ( \frac{a}{b} \right )
方括号,中括号 \left [ \frac{a}{b} \right ]
花括号,大括号 \left \{ \frac{a}{b} \right \}
角括号 \left \langle \frac{a}{b} \right \rangle
单竖线,绝对值 \left | \frac{a}{b} \right |
双竖线,范数 \left | \frac{a}{b} \right |
高斯符号 \left \lbrack \frac{a}{b} \right \rbrack
取底符号 \left \lfloor \frac{a}{b} \right \rfloor
取顶符号 \left \lceil \frac{c}{d} \right \rceil
斜线与反斜线 \left / \frac{a}{b} \right \backslash
上下箭头 \left \uparrow \frac{a}{b} \right \downarrow
\left \Uparrow \frac{a}{b} \right \Downarrow
\left \updownarrow \frac{a}{b} \right \Updownarrow
混合括号 \left [ 0,1 \right )
\left \langle \psi \right |

单左括号 \left \{ \frac{a}{b} \right .
单右括号 \left . \frac{a}{b} \right \}
  • 可以使用 \big, \Big, \bigg, \Bigg 控制括号的大小,比如代码

\Bigg ( \bigg [ \Big { \big \langle \left | | \frac{a}{b} | \right | \big \rangle \Big } \bigg ] \Bigg )

空格

功能 语法 显示 宽度
2个quad空格 \alpha\qquad\beta 2m
quad空格 \alpha\quad\beta m
大空格 \alpha\ \beta m/3
中等空格 \alpha\;\beta 2m/7
小空格 \alpha\,\beta m/6
没有空格 \alpha\beta 0
紧贴 \alpha\!\beta -m/6

颜色

语法

  • 字体颜色︰{\color{色调}表达式}
  • 背景颜色︰{\pagecolor{色调}表达式}

支持色调表

例子:

  • {\color{Blue}x^2}+{\color{Brown}2x} - {\color{OliveGreen}1}
    
  • x_{\color{Maroon}1,2}=\frac{-b\pm\sqrt{{\color{Maroon}b^2-4ac}}}{2a}