MathJax是什么?
MathJax是一个开源JavaScript库。它支持LaTeX、MathML、AsciiMath符号,可以运行于所有流行浏览器上。
LaTeX是什么?
LaTeX(LATEX,音译“拉泰赫”)是一种基于ΤΕΧ的排版系统。
如何使用LaTeX公式?
To see how any formula was written, right-click on the expression it and choose "Show Math As > TeX Commands"(When you do this, the '$' will not display.)
For inline formulas $...$
. For displayed formulas $$...$$
.
For superscripts and subscripts, use ^
and _
.
Groups. {…}
. 10^10
\(10^10\), 10^{10}
\(10^{10}\).
正或负:\pm
\(\pm\) \mp
\(\mp\)
比较:\leq
\(\leq\) \geq
\(\geq\) \neq
\(\neq\) \approx
\(\approx\) \ngeq
\(\ngeq\)
Fractions. \frac{a+1}{b+1}
\(\frac{a+1}{b+1}\)
带字符的箭头:\leftarrow
\(\leftarrow\) \rightarrow
\(\rightarrow\) \leftrightarrow
\(\leftrightarrow\) \stackrel{r_1+r_2}{\longrightarrow}
\(\stackrel{r_1+r_2}{\longrightarrow}\)
Radical signs. \sqrt{x^3}
\(\sqrt{x^3}\)
Accents and diacritical marks. \hat{x}
\(\hat{x}\) \bar{x}
\(\bar{x}\) \vec{x}
\(\vec{x}\) \dot{x}
\(\dot{x}\) \ddot{x}
\(\ddot{x}\)
Sums and integrals \sum
and \int
; the subscript is the lower limit and the superscript is the upper limit, so for example \sum_1^n
\(\sum_1^n\).
显示MathJax预定义的字符:\$
\(\$\), \backslash
\(\backslash\), \\
换行。
For Greek letters
语法 (大写) | 显示 (大写) | 语法 (大写) | 显示 (大写) |
---|---|---|---|
\alpha | \(\alpha\) | \nu | \(\nu\) |
\beta | \(\beta\) | \xi | \(\xi\) (\(\Xi\)) |
\gamma (\Gamma) | \(\gamma\) (\(\Gamma\)) | \omicron | \(\omicron\) |
\delta (\Delta) | \(\delta\) (\(\Delta\)) | \pi | \(\pi\) (\(\Pi\)) |
\epsilon | \(\epsilon\) | \rho | \(\rho\) |
\zeta | \(\zeta\) | \sigma | \(\sigma\) (\(\Sigma\)) |
\eta | \(\eta\) | \tau | \(\tau\) |
\theta (\Theta) | \(\theta\) (\(\Theta\)) | \upsilon | \(\upsilon\) |
\iota | \(\iota\) | \phi | \(\phi\) (\(\Phi\)) |
\kappa | \(\kappa\) | \chi | \(\chi\) |
\lambda (\Lambda) | \(\lambda\) (\(\Lambda\)) | \psi | \(\psi\) (\(\Psi\)) |
\mu | \(\mu\) | \omega | \(\omega\) (\(\Omega\)) |
Matrices
矩阵语法:\begin{matrix}…\end{matrix}
同一行的元素之间使用 &
分割,每行以 \\
结尾。如:
$$
\begin{matrix}
1 & x & x^2 \\
1 & y & y^2 \\
1 & z & z^2 \\
\end{matrix}
$$
EX01. matrix
关键字可以替换成一下其他关键字。
关键字 | 显示 |
---|---|
matrix | \(\begin{matrix}1&2\\3&4\end{matrix}\) |
pmatrix | \(\begin{pmatrix}1&2\\3&4\end{pmatrix}\) |
bmatrix | \(\begin{bmatrix}1&2\\3&4\end{bmatrix}\) |
Bmatrix | \(\begin{Bmatrix}1&2\\3&4\end{Bmatrix}\) |
vmatrix | \(\begin{vmatrix}1&2\\3&4\end{vmatrix}\) |
Vmatrix | \(\begin{Vmatrix}1&2\\3&4\end{Vmatrix}\) |
EX02. 不同方向的省略号。 \cdots
-> \(\cdots\) \ddots
-> \(\ddots\) \vdots
-> \(\vdots\)
\[\begin{pmatrix}
1 & a_1 & a_1^2 & \cdots & a_1^n \\
1 & a_2 & a_2^2 & \cdots & a_2^n \\
\vdots & \vdots& \vdots & \ddots & \vdots \\
1 & a_m & a_m^2 & \cdots & a_m^n
\end{pmatrix}
\]
EX03. 行中的小矩阵。 \bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)
-> \(\bigl( \begin{smallmatrix} a & b \\ c & d \end{smallmatrix} \bigr)\)