Latex公式用法
其实latex语法都是通用的,无论用在markdown还是哪里,都是一样的.
本文详解了包括字母修饰符,公式数学运算发,希腊字母,方程组和矩阵的格式并给出实例
字母修饰符号
效果 | 语法 | 效果 | 语法 |
---|---|---|---|
\(\hat{ab}\) | \hat{ab} |
\(\widehat{ab}\) | \widehat {a} |
\(\tilde{ab}\) | \tilde{a} |
\(\widetilde{ab}\) | \widetilde {a} |
\(\dot{a}\) | \dot{a} |
\(\ddot{a}\) | \ddot {a} |
\(\underline{abc}\) | \underline{abc} |
\(\overline{ab}\) | \overline {ab} |
\(\overbrace{abc}\) | \overbrace{abc} |
\(\underbrace{abc}\) | \underbrace {abc} |
\(\vec{ab}\) | \vec{ab} |
\(\breve{ab}\) | \breve {ab} |
\(\overrightarrow{ab}\) | \overrightarrow{ab} |
\(\overleftarrow{ab}\) | \overleftarrow {ab} |
\(\overset\frown{ab}\) | \overset\frown{ab} |
\(\frac{3}{4}\) | \frac{3}{4} |
\(\bar{a}\) | \bar{a} |
\(\acute{a}\) | \acute {a} |
\(\check{a}\) | \check{a} |
\(\grave{a}\) | \grave {a} |
\(\parallel\perp\) | \parallel\perp |
\(\angle\circ\) | \angle\circ |
\(\measuredangle\sphericalangle\) | \measuredangle\sphericalangle |
\(\nparallel\not\perp\) | \nparallel\not\perp |
公式数学运算符号
效果 | 语法 | 效果 | 语法 |
---|---|---|---|
\(\sum\approx\) | \sum\approx |
\(\prod\approxeq\) | \prod\approxeq |
\(\lim_{y}^{1}\) | \lim_{y}^{1} |
\(\int_{y}^{z}\) | \int_{y}^{z} |
\(\sum_{1}^{2}\) | \sum_{1}^{2} |
\(\prod_{3}^{4}\) | \prod_{3}^{4} |
\(\sqrt{3}\gg\) | \sqrt{3}\gg |
\(\sqrt[3]{4}\ll\) | \sqrt[3]{4}\ll |
\(\neq\equiv\leq\) | \neq\equiv\leq |
\(\infty\to\geq\) | \infty\to\geq |
\(\cdots\vdots\) | \cdots\vdots |
\(\ldots\ddots\) | \ldots\ddots |
\(\in\not\in\) | \in\not\in |
\(\subset\subsetneqq\) | \subset\subsetneqq |
\(\not\subset\cup\cap\) | \not\subset\cup\cap |
\(\supset\supsetneqq\) | \supset\supsetneqq |
\(a\setminus b\) | \setminus b |
\(\mathbb{R}\emptyset\) | $\mathbb{R}\emptyset$ |
\(\cdot\times\div\) | \cdot\times\div |
\(\partial\nabla f\) | \partial\nabla f |
希腊字母
效果 | 语法 | 效果 | 语法 | 效果 | 语法 | 效果 | 语法 |
---|---|---|---|---|---|---|---|
\(\alpha\) | \alpha |
\(\beta\) | \beta |
\(\gamma\) | \gamma |
\(\delta\) | \delta |
\(\Alpha\) | \Alpha |
\(\Beta\) | \Beta |
\(\Gamma\) | \Gamma |
\(\Delta\) | \Delta |
\(\epsilon\) | \epsilon |
\(\zeta\) | \zeta |
\(\eta\) | \eta |
\(\theta\) | \theta |
\(\Epsilon\) | \Epsilon |
\(\Zeta\) | \Zeta |
\(\Eta\) | \Eta |
\(\Theta\) | \Theta |
\(\lambda\) | \lambda |
\(\mu\) | \mu |
\(\xi\) | \xi |
\(\nu\) | \nu |
\(\Lambda\) | \Lambda |
\(\Mu\) | \Mu |
\(\Xi\) | \Xi |
\(\Nu\) | \Nu |
\(\pi\) | \pi |
\(\rho\) | \rho |
\(\sigma\) | \sigma |
\(\tau\) | \tau |
\(\Pi\) | \Pi |
\(\Rho\) | \Rho |
\(\Sigma\) | \Sigma |
\(\Tau\) | \Tau |
\(\upsilon\) | \upsilon |
\(\phi\) | \phi |
\(\psi\) | \psi |
\(\omega\) | \omega |
\(\Upsilon\) | \Upsilon |
\(\Phi\) | \Phi |
\(\Psi\) | \psi |
\(\Omega\) | \Omega |
方程组和矩阵
常用的环境有 matrix,bmatrix,vmatrix,pmatrix,cases,split,其区别为在于外面的括号不同.&用于分隔列,
环境 | 效果 | 环境 | 效果 |
---|---|---|---|
matrix | 不带括号矩阵 | bmatrix | [12] 矩阵 |
vmatrix | |12| 矩阵 |
pmatrix | (12) 矩阵 |
cases | {12 方程组 |
split | &12 &对齐 |
$$ |
\[ \begin{bmatrix} 1&2&\cdots \\ 2&3&\cdots \\ \vdots&\vdots&\ddots \end{bmatrix} \]
$$ |
\[ f(x)=\begin{cases} 1_2&\lim\limits_3&\cdots \\ 2&3&\cdots \\ \vdots&\vdots&\ddots \end{cases} \]
split环境配合&可以把公式对齐
$$ |
\[ \begin{split} \cos 2x & =\cos^2x-\sin^2x \\ 1 & =2\cos^2x-1 \end{split} \]
align环境实现公式自动编号,配合&可以把公式对齐,配合
$$ |
\[ \begin{align} \cos 2x &=\cos^2x-\sin^2x \tag{1.2} \\ 1 &=2\cos^2x-1 \tag{1.3} \end{align} \]