just test
MathJax
基础教程和快速参考
1 查看公式代码
Right-click on the expression
▶ Show Math As
▶ TeX Commands
2 行内公式和公式块
Inline formulas: $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$ Inline formulas(\dispalystyle
): $\displaystyle\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$
\(\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\)
3 希腊字母 Greek letters
| Char | Code | Char | Code | | :————————————————-: | :———————————————–: | :——————————————-: | :—————————————: | | $\alpha$
$\Alpha$ | \alpha
\Alpha
| $\beta$
$\Beta$ | \beta
\Beta
| | $\gamma$
$\Gamma$ | \gamma
\Gamma
| $\delta$
$\Delta$ | \delta
\Delta
| | $\epsilon$,$\varepsilon$
$\Epsilon$ | \epsilon
\varepsilon\Epsilon
| $\zeta$
$\Zeta$ | \zeta
\Zeta
| | $\eta$
$\Eta$ | \eta
\Eta
| $\theta$,$\vartheta$
$\Theta$ | \theta \vartheta\Theta
| | $\iota$
$\Iota$ | \iota
\Iota
| $\kappa$
$\Kappa$ | \kappa
\Kappa
| | $\lambda$
$\Lambda$ | \lambda
\Lambda
| $\mu$
$\Mu$ | \mu
\Mu
| | $\nu$
$\Nu$ | \nu
\Nu
| $\xi$
$\Xi$ | \xi
\Xi
| | $\omicron$
$\Omicron$ | \omicron
\Omicron
| $\pi$,$\varpi$
$\Pi$ | \pi \varpi\Pi
| | $\rho$,$\varrho$
$\Rho$ | \rho \varrho\Rho
| $\sigma$,$\varsigma$
$\Sigma$ | \sigma \varsigma\Sigma
| | $\tau$
$\Tau$ | \tau
\Tau
| $\upsilon$
$\Upsilon$ | \upsilon
\Upsilon
| | $\phi$,$\varphi$
$\Phi$ | \phi
\varphi\Phi
| $\chi$
$\Chi$ | \chi
\Chi
| | $\psi$
$\Psi$ | \psi
\Psi
| $\omega$
$\Omega$ | \omega
\Omega
|
4 上下角标
| Code | Formula | | ———- | :——–: | | x_i^2
| $x_i^2$ | | \log_2 x
| $\log_2 x$ |
5 分组 {Groups}
| Code | Formula | | ——— | :——————: | | 10^10
| $10^10$ | | 10^{10}
| $10^{10}$ | | x^5^6
| $\color{red}{error}$ | | {x^y}^z
| ${x^y}^z$ | | x^{y^z}
| $x^{y^z}$ | | x_i^2
| $x_i^2$ | | x_{i^2}
| $x_{i^2}$ |
6 括号 Parentheses
| Code | Formula | | —————————— | :——————————–: | | ( )[ ]
| $( )[ ]$ | | \{ \}
| ${ }$ | | (\frac{\sqrt x}{y^3})
| $(\frac{\sqrt x}{y^3})$ | | \left(...\right)
| $\left(\frac{\sqrt x}{y^3}\right)$ | | \left.
invisible | $\left.\frac12\right\rbrace$ |
\Biggl(\biggl(\Bigl(\bigl((x)\bigr)\Bigr)\biggr)\Biggr)
: $\Biggl(\biggl(\Bigl(\bigl((x)\bigr)\Bigr)\biggr)\Biggr)$
\left
和\right
同样适用于以下各种括号: []
$[x]$, \{\}
${x}$, ||
$|x|$, \vert\vert
$\vert x\vert$,\Vert\Vert
$\Vert x\Vert$,\langle\rangle
$\langle x\rangle$, \lceil\rceil
$\lceil x\rceil$, \lfloor\rfloor
$\lfloor x\rfloor$.
7 求和与积分 Sums and integrals
| Code | Formula | | ———————– | :———————: | | \sum_1^n
| $\sum_1^n$ | | \sum_{i=0}^\infty i^2
| $\sum_{i=0}^\infty i^2$ | | \prod
| $\prod$ | | \int
| $\int$ | | \bigcup
| $\bigcup$ | | \bigcap
| $\bigcap$ | | \iint
| $\iint$ | | \iiint
| $\iiint$ | | \idotsint
| $\idotsint$ |
8 分式 Fractions
| Code | Formula | | ——————————— | :—————————: | | \frac ab$
| $\frac ab$ | | \frac{a+1}{b+1}
| $\frac{a+1}{b+1}$ | | {a+1\over b+1}
| ${a+1\over b+1}$ | | \cfrac{a}{b}
适用于嵌套括号 | $\cfrac{1}{1+\cfrac{1}{1+x}}$ |
9 字体 Fonts
| Code | Formula | | ———– | :————————————: | | \mathbb
| $\mathbb{\text{blackboard bold}}$ | | \Bbb
| $\Bbb{Blackboard bold}$ | | \mathbf
| $\mathbf{Boldface}$ | | \mathit
| $\mathit{Italics}$ | | \pmb
| $\pmb{\text{Boldfaced Italics}}$ | | \mathtt
| $\mathtt{Typerwriter}$ | | \mathrm
| $\mathrm{Roman Font}$ | | \mathsf
| $\mathsf{Sans-serif Font}$ | | mathcal
| $\mathcal{Calligraphic Letters}$ | | \mathscr
| $\mathscr{Script Letters}$ | | \mathfrak
| $\mathfrak{Fraktur(Old German Style)}$ |
10 根号或开方 Radical signs / roots
| Code | Formula | | ——————– | :——————: | | \sqrt
| $\sqrt{x^3}$ | | \sqrt[3]{\frac xy}
| $\sqrt[3]{\frac xy}$ | | {\frac xy}^{1/2}
| ${\frac xy}^{1/2}$ |
11 特殊函数 Special functions
| Code | Formula | | ———————– | :————————–: | | \sin x
(NOT sin x
) | $\sin x$ (NOT $sin x$) | | \ln x
| $\ln x$ | | \lim_{x\to 0}
| $\lim_{x\to 0}$ | | \displaystyle
| $\displaystyle\lim_{x\to 0}$ | | \operatorname{foo}(x)
| $\operatorname{foo}(x)$ |
12 特殊符号与标记 Special symbols and notations
| Code | Formula | | :—————————————————————————————————: | :—————————————————————————————————: | | \lt \gt
\le \ge
\leq \geq
\leqq \geqq
\leqslant \geqslant
| $\lt \gt$
$\le \ge$
$\leq \geq$
$\leqq \geqq$
$\leqslant \geqslant$ | | \not=
\not\lt
| $\not=$ $\not\lt$ | | \times \div \pm \mp \cdot
| $\times \div \pm \mp \cdot$ | | \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}
OR\binom{n+1}{2k}
| ${n+1 \choose 2k}$ | | \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 \therefore
| $\approx \sim \simeq \cong$
$\equiv \prec \lhd \therefore$ | | \infty \aleph_0 \nabla
\partial \Im \Re
| $\infty \aleph_0 \nabla$
$\partial \Im \Re$ | | a\equiv b\pmod n
| $a\equiv b\pmod n$ | | \ldots
\cdots
| $a_1,a_2\ldots a_n$
$a_1+a_2+\cdots a_n$ | | \ell
Script lowercase l | $\ell$ |
13 空格 Spaces
| Code | Formula | | ———– | :——————–: | | a b
| $a b$ | | a b
| $a b$ | | a\,b
| $a\,b$ | | a\;b
| $a\;b$ | | a\quad b
| $a\quad b$ | | a\qquad b
| $a\qquad b$ | | \text
| $\text{Hello, World!}$ |
14 强调与标记 Accents and diacritical marks
| Code | Formula | | ——————— | :———————–: | | \hat
| $\hat x$ | | | | | \widehat
| $\widehat{xy}$ | | \bar
| $\bar x$ | | \oveline
| $\overline{xyz}$ | | \vec
| $\vec x$ | | \overrightarrow
| $\overrightarrow{xy}$ | | \overleftrightarrow
| $\overleftrightarrow{xy}$ | | \dot
| $\dot x$ | | \ddot
| $\ddot x$ |
15 转义 Escape \
| Code | Formula | | —————————– | :———-: | | \\\$
| $\$$ | | \{
| ${$ | | \_
| $_$ | | \backslash
(symbol) | $\backslash$ | | \setminus
(binary operation) | $\setminus$ | | \\
| New Line |