[TOC]
后面介绍的内容是$\LaTeX$排版的数学符号的内容,不止一次有人强调中文版的Wikipedia并不是英文版内容的翻译,并不是。可以对比下参考部分的两个页面,我觉得中文页面做的不错,这两个页面里面关于垂直,貌似有那么点不同。
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\hat {a}$ |
\hat{a} |
$\check{a}$ |
\check{a} |
$\tilde{a}$ |
\tilde{a} |
$\acute{a}$ |
\acute{a} |
**$\grave{a}$ ** |
\grave{a} |
**$\dot {a}$ ** |
\dot{a} |
**$\bar{a}$ ** |
\bar{a} |
$\ddot a$ |
\ddot{a} |
**$\vec {a}$ ** |
\vec{a} |
**$\widehat{A}$ ** |
\widehat{A} |
$\widetilde{A}$ |
\widetilde{A} |
$\breve a$ |
\breve{a} |
|
|
$\hat{A}$ |
\hat{A} |
$\tilde{A}$ |
\tilde{A} |
|
|
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\alpha$ |
\alpha |
$\theta$ |
\theta |
$\upsilon$ |
\upsilon |
$o $ |
o |
$\beta$ |
\beta |
$\vartheta$ |
\vartheta |
$\pi$ |
\pi |
$\phi$ |
\phi |
$\gamma$ |
\gamma |
$\iota$ |
\iota |
$\varpi$ |
\varpi |
$\varphi$ |
\varphi |
$\delta$ |
\delta |
$\kappa$ |
\kappa |
$\rho$ |
\rho |
$\chi$ |
\chi |
$\epsilon$ |
\epsilon |
$\lambda$ |
\lambda |
$\varrho$ |
\varrho |
$\psi$ |
\psi |
$\varepsilon$ |
\varepsilon |
$\mu$ |
\mu |
$\sigma$ |
\sigma |
$\omega$ |
\omega |
$\zeta$ |
\zeta |
$\nu$ |
\nu |
$\varsigma$ |
\varsigma |
$\nabla$ |
\nabla |
$\eta$ |
\eta |
$\xi$ |
\xi |
$\tau$ |
\tau |
|
|
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\Gamma$ |
\Gamma |
$\Lambda$ |
\Lambda |
$\Sigma\mit\Sigma$ |
\Sigma\mit\Sigma |
$\Psi$ |
\Psi |
$\Delta$ |
\Delta |
$\Xi$ |
\Xi |
$\Upsilon$ |
\Upsilon |
$\Omega\mit\Omega$ |
\Omega\mit\Omega |
$\Theta$ |
\Theta |
$\Pi$ |
\Pi |
$\Phi$ |
\Phi |
|
|
示例 |
代码 |
$\mathbf {ABCdefxyzXYZ123}$ |
\mathbf {ABCdefxyzXYZ123} |
$\mathrm {ABCdefxyzXYZ123}$ |
\mathrm {ABCdefxyzXYZ123} |
$\mathit {ABCdefxyzXYZ123}$ |
\mathit {ABCdefxyzXYZ123} |
$\mathcal {ABCdefxyzXYZ123}$ |
\mathcal {ABCdefxyzXYZ123} |
$\mathscr {ABCdefxyzXYZ123}$ |
\mathscr {ABCdefxyzXYZ123} |
$\mathfrak {ABCdefxyzXYZ123}$ |
\mathfrak {ABCdefxyzXYZ123} |
$\mathbb {ABCdefxyzXYZ123}$ |
\mathbb {ABCdefxyzXYZ123} |
$\boldsymbol{ABCdefxyzXYZ123}$ |
\boldsymbol{ABCdefxyzXYZ123} |
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\sum$ |
\sum |
$\prod$ |
\prod |
$x\cdot{y}$ |
x\cdot{y} |
$\bigcup$ |
\bigcup |
$\bigoplus$ |
\bigoplus |
$x\times {y}$ |
x\times {y} |
$\bigvee$ |
\bigvee |
$\bigcap$ |
\bigcap |
$\left|w\right|$ |
\left|w\right| |
$\bigwedge$ |
\bigwedge |
$\biguplus$ |
\biguplus |
$\iiint$ |
\iiint |
$\bigotimes$ |
\bigotimes |
$\oint$ |
\oint |
$\iint$ |
\iint |
$\int x,{\rm d}x$ |
\int x,{\rm d}x |
$\bigsqcup$ |
\bigsqcup |
$\lgroup \rgroup$ |
\lgroup \rgroup |
$\coprod$ |
\coprod |
$\bigodot$ |
\bigodot |
$\partial$ |
\partial |
$\det$ |
\det |
$\max$ |
\max |
$\min$ |
\min |
$\log$ |
\log |
|
|
|
|
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\leftarrow$ |
\leftarrow |
$\rightarrow$ |
\rightarrow |
$\leftrightarrow$ |
\leftrightarrow |
$\longleftarrow$ |
\longleftarrow |
$\longrightarrow$ |
\longrightarrow |
$\longleftrightarrow$ |
\longleftrightarrow |
$\Leftarrow$ |
\Leftarrow |
$\Rightarrow$ |
\Rightarrow |
$\Leftrightarrow$ |
\Leftrightarrow |
$\Longleftarrow$ |
\Longleftarrow |
$\Longrightarrow$ |
\Longrightarrow |
$\Longleftrightarrow$ |
\Longleftrightarrow |
$\uparrow$ |
\uparrow |
$\downarrow$ |
\downarrow |
$\updownarrow$ |
\updownarrow |
示例 |
代码 |
示例 |
代码 |
示例 |
代码 |
$\therefore$ |
\therefore |
$\because$ |
\because |
$\min \limits_{f \in {H}}$ |
\min \limits_{f \in {H}} |
$\leqslant$ |
\leqslant |
$\geqslant$ |
\geqslant |
$\cal {C} \equiv 1$ |
\equiv |
$\thickapprox$ |
\thickapprox |
$\thicksim \sim$ |
\thicksim \sim |
$\left(\frac{A}{B}\right)$ |
\left(\frac{A}{B}\right) |
$\neq$ |
\neq |
$\in$ |
\in |
$\hat{=}$ |
\hat{=} |
$\pm$ |
\pm |
$\sqrt{a}$ |
\sqrt{a} |
$\geq \leq$ |
\geq \leq |
$\perp $ |
\perp |
$\angle$ |
\angle |
$\varpropto$ |
\varpropto |
$\infty$ |
\infty |
$g^\prime$ |
g^\prime |
$\forall$ |
\forall |
$\exist$ |
\exist |
$\bot$ |
\bot |
$\top$ |
\top |
注意**\bot和\perp的区别,垂直是\perp**
示例 |
代码 |
备注 |
$\rm {ABCdefxyzXYZ123}$ |
\rm {ABCdefXYZ123} |
罗马体 |
$\it{ABCdefxyzXYZ123}$ |
\it{ABCdefXYZ123} |
意大利体 |
$\bf{ABCdefxyzXYZ123}$ |
\bf{ABCdefXYZ123} |
正粗体,黑体 |
$\cal {ABCdefxyzXYZ123}$ |
\cal {ABCdefXYZ123} |
花体 |
$\sf{ABCdefXYZ123}$ |
\sf{ABCdefXYZ123} |
等线体 |
$\mit{ABCdefxyzXYZ123}$ |
\mit{ABCdefXYZ123} |
数字斜体 |
$\tt{ABCdefxyzXYZ123}$ |
\tt{ABCdefXYZ123} |
打印机字体 |
示例
$$
f(x,y) = \begin{cases}
1 & x与y满足某一事实\
0 & 否则
\end{cases}
$$
# 代码
f(x,y) = \begin{cases}
1 & x与y满足某一事实\\
0 & 否则
\end{cases}
$$
\begin{aligned}
L(w)&=\sum\limits^{N}{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\&=\sum\limits^{N}{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{aligned}
$$
# 代码
# 通过\begin{aligned}\end{aligned}控制对齐, 使用&表示对齐点.
\begin{aligned}
L(w)&=\sum\limits^{N}_{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\\
&=\sum\limits^{N}_{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\\
&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{aligned}
另外注意到前面的分段函数自动变好了,但是上面多行对齐的公式没有自动编号,如果需要自动编号,外面嵌入equation
$$
\begin{equation}
\begin{aligned}
L(w)&=\sum\limits^{N}{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\
&=\sum\limits^{N}{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\
&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{aligned}
\end{equation}
$$
代码如下
\begin{equation}
\begin{aligned}
L(w)&=\sum\limits^{N}_{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\\&=\sum\limits^{N}_{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\\&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{aligned}
\end{equation}
关于编号也可以通过行间公式做如下表达
$$
\begin{align}
L(w)&=\sum\limits^{N}{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\
&=\sum\limits^{N}{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\nonumber\
&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{align}
$$
代码如下
\begin{align}
L(w)&=\sum\limits^{N}_{i=1}[y_i\log\pi(x_i)+(1-y_i)\log(1-\pi(x_i))]\\
&=\sum\limits^{N}_{i=1}[y_i\log{\frac{\pi(x_i)}{1-\pi(x_i)}}+\log(1-\pi(x_i))]\nonumber\\
&=\sum\limits^{N}_{i=1}[y_i(w\cdot x_i)-\log(1+\exp(w\cdot{x_i})]
\end{align}
以上代码有两点需要注意体会:
- align
- \nonumber的使用
$$
\begin{aligned}
M_1(x)=
\begin{bmatrix}
&a_{01}&a_{02}\\
&0&0
\end{bmatrix}
&,M_2(x)=
\begin{bmatrix}
&b_{11}&b_{12}\\
&b_{21}&b_{22}
\end{bmatrix}
\\
M_3(x)=
\begin{bmatrix}
&c_{11}&c_{12}\\
&c_{21}&c_{22}
\end{bmatrix}
&,M_4(x)=
\begin{bmatrix}
&1&0\\
&1&0
\end{bmatrix}
\end{aligned}
$$
\begin{aligned}
M_1(x)=
\begin{bmatrix}
&a_{01}&a_{02}\\
&0&0
\end{bmatrix}
&,M_2(x)=
\begin{bmatrix}
&b_{11}&b_{12}\\
&b_{21}&b_{22}
\end{bmatrix}
\\
M_3(x)=
\begin{bmatrix}
&c_{11}&c_{12}\\
&c_{21}&c_{22}
\end{bmatrix}
&,M_4(x)=
\begin{bmatrix}
&1&0\\
&1&0
\end{bmatrix}
\end{aligned}
$$
X^\mathrm T=
\left[
\begin{matrix}
x_{11} & \cdots & x_{1N} \\
\vdots & \ddots & \vdots \\
x_{M1} & \cdots & x_{MN} \\
\end{matrix}
\right]
$$
% 这里稍微注意下转置符号, 《统计学习方法》中的转置用的是正体的T
% 可以参考 https://zhuanlan.zhihu.com/p/27490955 中关于转置写法的讨论。
X^\mathrm T=
\left[
\begin{matrix}
x_{11} & \cdots & x_{1N} \\
\vdots & \ddots & \vdots \\
x_{M1} & \cdots & x_{MN} \\
\end{matrix}
\right]
$$
\left[
\begin{array}
\2
\3
\end{array}
\right]
$$
\left[
\begin{array}
\\2
\\3
\end{array}
\right]
$$
\overbrace{abcde}\underbrace{fghij}_{comment}\overline{klmn}\underline{opqr}\overleftarrow{stuv}\overrightarrow{wxyz}
$$
\overbrace{abcde}\underbrace{fghij}_{comment}\overline{klmn}\underline{opqr}\overleftarrow{stuv}\overrightarrow{wxyz}
😏 smirk |
😄smile |
😆laughing |
😊blush |
😃smiley |
😍heart_eyes |
😘kissing_heart |
😉wink |
😗kissing |
😕confused |
😓sweat |
😂joy |
😭sob |
😢cry |
😠angry |
😋yum |
😷mask |
😎sunglasses |
💗heartpulse |
👽alien |
💘cupid |
👍+1 |
🇨🇳cn |
💩shit |
- Markdown 数学符号速查
- Cmd Markdown公式指导手册
- Equals_Sign
- Emoji
- Short Math Guide for LaTeX
- List of Mathematical Symbols
- 数学公式
- Matplotlib Math Text