LaTeX 语法

MathJax是什么?

MathJax是一个开源JavaScript库。它支持LaTeX、MathML、AsciiMath符号,可以运行于所有流行浏览器上。

LaTeX是什么?

LaTeX(LATEX,音译“拉泰赫”)是一种基于ΤΕΧ的排版系统。

如何使用LaTeX公式?

  1. 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.)

  2. For inline formulas $...$. For displayed formulas $$...$$.

  3. For superscripts and subscripts, use ^ and _.

  4. Groups. {…} . 10^10 (10^10)10^{10} (10^{10}).

  5. 正或负:pm (pm) mp (mp)

  6. 比较:leq (leq) geq (geq) eq ( eq) approx (approx) geq ( geq)

  7. Fractions. frac{a+1}{b+1} (frac{a+1}{b+1})

  8. 带字符的箭头:leftarrow (leftarrow) ightarrow ( ightarrow) leftrightarrow (leftrightarrow) stackrel{r_1+r_2}{longrightarrow} (stackrel{r_1+r_2}{longrightarrow})

  9. Radical signs. sqrt{x^3} (sqrt{x^3})

  10. Accents and diacritical marks. hat{x} (hat{x}) ar{x} (ar{x}) vec{x} (vec{x}) dot{x} (dot{x}) ddot{x} (ddot{x})

  11. 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).

  12. 显示MathJax预定义的字符:$ ($)ackslash (ackslash)\ 换行。

  13. 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)

[egin{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. 行中的小矩阵。 igl( egin{smallmatrix} a & b \ c & d end{smallmatrix} igr) -> (igl( egin{smallmatrix} a & b \ c & d end{smallmatrix} igr))

原文地址:https://www.cnblogs.com/zdfffg/p/10136800.html