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)eq( eq)approx(approx)geq( geq) -
Fractions.
frac{a+1}{b+1}(frac{a+1}{b+1}) -
带字符的箭头:
leftarrow(leftarrow)ightarrow( ightarrow)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})ar{x}(ar{x})vec{x}(vec{x})dot{x}(dot{x})ddot{x}(ddot{x}) -
Sums and integrals
sumandint; the subscript is the lower limit and the superscript is the upper limit, so for examplesum_1^n(sum_1^n). -
显示MathJax预定义的字符:
$($),ackslash(ackslash),\换行。 -
For Greek letters
| 语法 (大写) | 显示 (大写) | 语法 (大写) | 显示 (大写) |
|---|---|---|---|
| alpha | (alpha) | u | ( u) |
| eta | (eta) | xi | (xi) ((Xi)) |
| gamma (Gamma) | (gamma) ((Gamma)) | omicron | (omicron) |
| delta (Delta) | (delta) ((Delta)) | pi | (pi) ((Pi)) |
| epsilon | (epsilon) | ho | ( ho) |
| zeta | (zeta) | sigma | (sigma) ((Sigma)) |
| eta | (eta) | au | ( au) |
| heta (Theta) | ( heta) ((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
矩阵语法:egin{matrix}…end{matrix} 同一行的元素之间使用 & 分割,每行以 \ 结尾。如:
$$
egin{matrix}
1 & x & x^2 \
1 & y & y^2 \
1 & z & z^2 \
end{matrix}
$$
EX01. matrix 关键字可以替换成一下其他关键字。
| 关键字 | 显示 |
|---|---|
| matrix | (egin{matrix}1&2\3&4end{matrix}) |
| pmatrix | (egin{pmatrix}1&2\3&4end{pmatrix}) |
| bmatrix | (egin{bmatrix}1&2\3&4end{bmatrix}) |
| Bmatrix | (egin{Bmatrix}1&2\3&4end{Bmatrix}) |
| vmatrix | (egin{vmatrix}1&2\3&4end{vmatrix}) |
| Vmatrix | (egin{Vmatrix}1&2\3&4end{Vmatrix}) |
EX02. 不同方向的省略号。 cdots -> (cdots) ddots -> (ddots) vdots -> (vdots)
EX03. 行中的小矩阵。 igl( egin{smallmatrix} a & b \ c & d end{smallmatrix} igr) -> (igl( egin{smallmatrix} a & b \ c & d end{smallmatrix} igr))