說明:數學公式
外觀
數學記號應該放在<math> ... </math>標記中。關於TeX顯示的討論或者您有任何建議,請到英文Wikipedia的相關頁面。
函數、符號及特殊字符
[編輯]聲調
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \bar{a} | \acute{a} | \check{a} | |||
| \grave{a} | \tilde{a} | \hat{a} | |||
| \breve{a} | \dot{a} | \ddot{a} |
函數
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \sin a | \cos b | \tan c | |||
| \cot d | \sec e | \csc f | |||
| \arcsin k | \arccos l | \arctan m | |||
| \sinh g | \cosh h | \tanh i | |||
| \coth j | \operatorname{sh}\,g | \operatorname{argsh}\,k | |||
| \operatorname{ch}\,h | \operatorname{argch}\,l | \operatorname{th}\,i | |||
| \operatorname{argth}\,m | \lim n | \limsup o | |||
| \liminf p | \min q | \max r | |||
| \inf s | \sup t | \exp u | |||
| \ln v | \lg w | \log x | |||
| \log_{10} y | \ker x | \deg x | |||
| \gcd x | \Pr x | \det x | |||
| \hom x | \arg x | \dim x |
同餘
[編輯]| 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|
| \pmod{m} | a \bmod b |
微分
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \nabla | \partial x | dx | |||
| \dot x | \ddot y |
集合
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|---|---|
| \forall | \exists | \empty | \emptyset | \varnothing | |||||
| \in | \ni | \not\in | \notin | \subset | |||||
| \subseteq | \supset | \supseteq | \cap | \bigcap | |||||
| \cup | \bigcup | \biguplus | \sqsubset | \sqsubseteq | |||||
| \sqsupset | \sqsupseteq | \sqcap | \sqcup | \bigsqcup |
邏輯
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|
| p | \land | \wedge | \bigwedge | ||||
| \bar{q} \to p | \lor | \vee | \bigvee | ||||
| \lnot | \neg q | \setminus | \smallsetminus |
根號
[編輯]| 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|
| \sqrt{x} | \sqrt[n]{x} |
關係符號
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \sim | \approx | \simeq | |||
| \cong | \dot= | \le | |||
| < | \ll | \gg | |||
| \ge | > | \equiv | |||
| \not\equiv | \ne | \neq | |||
| \propto | \pm | \mp |
幾何符號
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \Diamond | \Box | \triangle | |||
| \angle | \perp | \mid | |||
| \nmid | \ | 45^\circ |
箭頭符號
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \leftarrow | \gets | \rightarrow | |||
| \to | \leftrightarrow | \longleftarrow | |||
| \longrightarrow | \mapsto | \longmapsto | |||
| \hookrightarrow | \hookleftarrow | \nearrow | |||
| \searrow | \swarrow | \nwarrow | |||
| \uparrow | \downarrow | \updownarrow |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|
| \rightharpoonup | \rightharpoondown | \leftharpoonup | \leftharpoondown | ||||
| \upharpoonleft | \upharpoonright | \downharpoonleft | \downharpoonright |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \Leftarrow | \Rightarrow | \Leftrightarrow | |||
| \Longleftarrow | \Longrightarrow | \Longleftrightarrow (or \iff) | |||
| \Uparrow | \Downarrow | \Updownarrow |
特殊符號
[編輯]| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| \eth | \S | \P | \% | \dagger | \ddagger | ||||||
| \star | * | \ldots | \smile | \frown | \wr |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \oplus | \bigoplus | \otimes | |||
| \bigotimes | \times | \cdot | |||
| \div | \circ | \bullet | |||
| \bigodot | \boxtimes | \boxplus |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|
| \triangleleft | \triangleright | \infty | \bot | ||||
| \top | \vdash | \vDash | \Vdash | ||||
| \models | \lVert | \rVert |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|
| \imath | \hbar | \ell | |||
| \mho | \Finv | \Re | |||
| \Im | \wp | \complement |
| 語法 | 效果 | 語法 | 效果 | 語法 | 效果 | 語法 | 效果 |
|---|---|---|---|---|---|---|---|
| \diamondsuit | \heartsuit | \clubsuit | \spadesuit | ||||
| \Game | \flat | \natural | \sharp |
上標、下標及積分等
[編輯]| 功能 | 語法 | 效果 |
|---|---|---|
| 上標 | a^2 |
|
| 下標 | a_2 |
|
| 組合 | a^{2+2} |
|
a_{i,j} |
||
| 結合上下標 | x_2^3 |
|
| 前置上下標 | {}_1^2\!X_3^4 |
|
| 導數 (HTML) |
x' |
|
| 導數 (PNG) |
x^\prime |
|
| 導數 (錯誤) |
x\prime |
|
| 導數點 | \dot{x}
|
|
\ddot{y}
|
||
| 向量 | \vec{c}
|
|
\overleftarrow{a b}
|
||
\overrightarrow{c d}
|
||
\widehat{e f g}
|
||
| 上劃線 | \overline{h i j}
|
|
| 下劃線 | \underline{k l m}
|
|
| 上括號 | \overbrace{1+2+\cdots+100}
|
|
\begin{matrix} 5050 \\ \overbrace{ 1+2+\cdots+100 } \end{matrix}
|
||
| 下括號 | \underbrace{a+b+\cdots+z}
|
|
\begin{matrix} \underbrace{ a+b+\cdots+z } \\ 26 \end{matrix}
|
||
| 求和 | \sum_{k=1}^N k^2 |
|
\begin{matrix} \sum_{k=1}^N k^2 \end{matrix} |
||
| 求積 | \prod_{i=1}^N x_i |
|
\begin{matrix} \prod_{i=1}^N x_i \end{matrix} |
||
| 上積 | \coprod_{i=1}^N x_i |
|
\begin{matrix} \coprod_{i=1}^N x_i \end{matrix} |
||
| 極限 | \lim_{n \to \infty}x_n |
|
\begin{matrix} \lim_{n \to \infty}x_n \end{matrix} |
||
| 積分 | \int_{-N}^{N} e^x\, dx |
|
\begin{matrix} \int_{-N}^{N} e^x\, dx \end{matrix} |
||
| 雙重積分 | \iint_{D}^{W} \, dx\,dy |
|
| 三重積分 | \iiint_{E}^{V} \, dx\,dy\,dz |
|
| 四重積分 | \iiiint_{F}^{U} \, dx\,dy\,dz\,dt |
|
| 路徑積分 | \oint_{C} x^3\, dx + 4y^2\, dy | |
| 交集 | \bigcap_1^{n} p |
|
| 併集 | \bigcup_1^{k} p |
|
分數及多行顯示
[編輯]| 功能 | 語法 | 效果 |
|---|---|---|
| 分數 | \frac{2}{4}或者{2 \over 4} = 0.5
|
|
| 小型分數 | \begin{matrix} \frac{2}{4} \end{matrix} = 0.5
|
|
| 二項式系數 | {n \choose k}
|
|
| 矩陣 | \begin{pmatrix} x & y \\ z & v \end{pmatrix}
|
|
\begin{bmatrix} 0 & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & 0\end{bmatrix}
|
||
\begin{Bmatrix} x & y \\ z & v \end{Bmatrix}
|
||
\begin{vmatrix} x & y \\ z & v \end{vmatrix}
|
||
\begin{Vmatrix} x & y \\ z & v \end{Vmatrix}
|
||
\begin{matrix} x & y \\ z & v \end{matrix}
|
||
| 條件定義 | f(n) = \begin{cases} n/2, & \mbox{if }n\mbox{ is even} \\ 3n+1, & \mbox{if }n\mbox{ is odd} \end{cases}
|
|
| 多行等式 | \begin{matrix}f(n+1)&=& (n+1)^2 \\ \ & =& n^2 + 2n + 1\end{matrix}
|
|
| 聯立方程 | \begin{cases} 3 x + 5 y + z \\ 7 x - 2 y + 4 z \\ -6 x + 3 y + 2 z \end{cases}
|
字體
[編輯]希臘字母
[編輯]| \Alpha | \Beta | \Gamma | \Delta | \Epsilon | \Zeta | ||||||
| \Eta | \Theta | \Iota | \Kappa | \Lambda | \Mu | ||||||
| \Nu | \Xi | O1 | \Pi | \Rho | \Sigma | ||||||
| \Tau | \Upsilon | \Phi | \Chi | \Psi | \Omega | ||||||
| \alpha | \beta | \gamma | \delta | \epsilon | \zeta | ||||||
| \eta | \theta | \iota | \kappa | \lambda | \mu | ||||||
| \nu | \xi | o1 | \pi | \rho | \sigma | ||||||
| \tau | \upsilon | \phi | \chi | \psi | \omega | ||||||
| \varepsilon | \digamma | \vartheta | \varkappa | ||||
| \varpi | \varrho | \varsigma | \varphi | ||||
備註:
黑板粗體
[編輯]- 語法
\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}- 效果
黑板粗體(Blackboard bold)一般用於表示數學和物理學中的向量或集合的符號。
備註:
- 花括號{}中只有使用大寫字母才能正常顯示,使用小寫字母或數字會得到其他符號。
正粗體
[編輯]- 語法
\mathbf{012…abc…ABC…}- 效果
- 備註
- 花括號{}內只能使用拉丁字母和數字,不能使用希臘字母如\alpha等。
斜粗體
[編輯]- 語法
\boldsymbol{012…abc…ABC…\alpha \beta \gamma…}- 效果
- 備註
- 使用
\boldsymbol{}可以加粗所有合法的符號。
斜體
[編輯]- 語法
\mathit{012456789}- 效果
- 備註
- 斜體語法僅對數字有效。
羅馬體
[編輯]- 語法
\mathrm{012…abc…ABC…} 或 \mbox{}- 效果
- 備註
- 羅馬體可以使用數字和字母。
哥德體
[編輯]- 語法
\mathfrak{012…abc…ABC…}- 效果
- 備註
- 哥德體可以使用數字和字母。
手寫體
[編輯]- 語法
\mathcal{ABC…}- 效果
- 備註
- 手寫體只可以使用大寫字母。
希伯來字母
[編輯]- 語法
\aleph \beth \gimel \daleth- 效果
括號
[編輯]| 功能 | 語法 | 顯示 |
|---|---|---|
| 不好看 | ( \frac{1}{2} ) | |
| 好一點 | \left( \frac{1}{2} \right) |
您可以使用\left和\right來顯示不同的括號:
| 功能 | 語法 | 顯示 |
|---|---|---|
| 圓括號,小括號 | \left( \frac{a}{b} \right) | |
| 方括號,中括號 | \left[ \frac{a}{b} \right] | |
| 花括號,大括號 | \left\{ \frac{a}{b} \right\} | |
| 角括號 | \left \langle \frac{a}{b} \right \rangle | |
| 單豎線,絕對值 | \left| \frac{a}{b} \right| | |
| 雙豎線,范 | \left \| \frac{a}{b} \right \| | |
| 取整函數 (Floor function) |
\left \lfloor \frac{a}{b} \right \rfloor | |
| 取頂函數 (Ceiling function) |
\left \lceil \frac{c}{d} \right \rceil | |
| 斜線與反斜線 | \left / \frac{a}{b} \right \backslash | |
| 上下箭頭 | \left \uparrow \frac{a}{b} \right \downarrow | |
| \left \Uparrow \frac{a}{b} \right \Downarrow | ||
| \left \updownarrow \frac{a}{b} \right \Updownarrow | ||
| 混合括號 | \left [ 0,1 \right ) \left \langle \psi \right | |
|
| 單左括號 | \left \{ \frac{a}{b} \right . | |
| 單右括號 | \left . \frac{a}{b} \right \} |
備註:
- 可以使用
\big, \Big, \bigg, \Bigg控制括號的大小,比如代碼\Bigg ( \bigg [ \Big \{ \big \langle \left | \| \frac{a}{b} \| \right | \big \rangle \Big \} \bigg ] \Bigg )顯示
空格
[編輯]注意TeX能夠自動處理大多數的空格,但是您有時候需要自己來控制。
| 功能 | 語法 | 顯示 | 備註 |
|---|---|---|---|
| 兩個quad空格 | a \qquad b | 兩個的寬度 | |
| quad空格 | a \quad b | 一個的寬度 | |
| 大空格 | a\ b | 1/3寬度 | |
| 中等空格 | a\;b | 2/7寬度 | |
| 小空格 | a\,b | 1/6寬度 | |
| 沒有空格 | ab | ||
| 緊貼 | a\!b | 縮進1/6寬度 |
顏色
[編輯]- 語法
\{\color{顏色名}表達式}- 例子
{\color{Blue}x^2}+{\color{Brown}2x}-{\color{OliveGreen}1}
x_{1,2}=\frac{-b\pm\sqrt{{\color{Red}b^2-4ac}}}{2a}
外部連結
[編輯]- 一個介紹TeX的PDF文檔(英文): http://www.ctan.org/tex-archive/info/gentle/gentle.pdf
- 完整的參考列表(英文):http://wso.williams.edu/how/lshort2e/node61.html