References
希腊字母
| name |
upper-case |
lower-case |
| alpha |
$A$ |
$\alpha$ |
| beta |
$B$ |
$\beta$ |
| gamma |
$\Gamma$ |
$\gamma$ |
| delta |
$\Delta$ |
$\delta$ |
| epsilon |
$E$ |
$\epsilon$ |
| zeta |
$Z$ |
$\zeta$ |
| eta |
$H$ |
$\eta$ |
| theta |
$\Theta$ |
$\theta$ |
| iota |
$I$ |
$\iota$ |
| kappa |
$K$ |
$\kappa$ |
| lambda |
$\Lambda$ |
$\lambda$ |
| mu |
$M$ |
$\mu$ |
| nu |
$N$ |
$\nu$ |
| xi |
$\Xi$ |
$\xi$ |
| omicron |
$O$ |
$\omicron$ |
| pi |
$\Pi$ |
$\pi$ |
| rho |
$P$ |
$\rho$ |
| sigma |
$\Sigma$ |
$\sigma$ |
| tau |
$T$ |
$\tau$ |
| upsilon |
$Y$ |
$\upsilon$ |
| phi |
$\Phi$ |
$\phi$ |
| chi |
$X$ |
$\chi$ |
| psi |
$\Psi$ |
$\psi$ |
| omega |
$\Omega$ |
$\omega$ |
上标与下标
| name |
example |
| 上标 |
$x^i$ |
| 下标 |
$x_i$ |
| 上下标 |
$x_i^{10}$ |
| 上下标2 |
${x_i}^6$ |
| 上标嵌套 |
${x^5}^6$ |
| 上标嵌套2 |
$x^{5^6}$ |
括号
圆括号与方括号
| name |
example |
| 圆括号 |
$(2+3)*5$ |
| 方括号 |
$[2+3]*5$ |
| 大小适配 |
$\left(x\over y\right)$ |
| 大小不适配 |
$(x\over y)$ |
大括号
| name |
example |
\{ |
$\{a*b\}$ |
\xbrace |
$\lbrace a*b\rbrace$ |
尖括号
| name |
example |
\xangle |
$\langle x + y\rangle$ |
左右两边
| name |
example |
| ceil |
$\lceil x\rceil$ |
| floor |
$\lfloor x\rfloor$ |
| parallel |
$\parallel x\parallel$ |
大符号
求和
| name |
example |
| 求和 |
$\sum_{i=1}^n$ |
积分
| name |
example |
| 普通积分 |
$\int_{r=1}^\infty$ |
| 二重积分 |
$\iint$ |
| 多重积分(渲染器不一定支持) |
$\iiiint$ |
连乘
| name |
example |
| 连乘 |
$\prod_{i=1}^K{a+b}$ |
其他
| name |
example |
| bigcup |
$\bigcup$ |
| bigcap |
$\bigcap$ |
| max |
$\max_{c_k}$ |
| argmax |
$\mathop {argmax}_{c_k}$ |
| argmax |
$arg\, \max_{c_k}$ |
分式与根式
分式
| name |
example |
| frac |
$\frac {a+c+1}{b+c+2}$ |
| over |
${a+1}\over{b+1}$ |
连分数
| name |
example |
| cfrac |
$x=a_0+\cfrac {1^2}{a_1+\cfrac {2^2}{a_2+\cfrac {3^2}{a_3+\cfrac {4^2}{a_4+…}}}}$ |
| over |
$x=a_0+ {1^2\over a_1+{2^2\over a_2+{3^2\over {a_3+{4^2\over a_4+…}}}}}$ |
| frac |
$x=a_0+\frac {1^2}{a_1+\frac {2^2}{a_2+\frac {3^2}{a_3+\frac {4^2}{a_4+…}}}}$ |
用cfrac表示连分数。
根式
| name |
example |
| 开平方 |
$\sqrt{a+b}$ |
| 开n次方 |
$\sqrt[n]{a+b}$ |
多行表达式
分类表达式
| name |
example |
| cases |
$f(n)=\begin{cases}\frac n 2, &if\ n\ is\ even\\\\3n+1, &if\ n\ is\ odd\end{cases}$ |
| 间距增大 |
$f(n)=\begin{cases}\frac n 2, &if\ n\ is\ even\\\[5ex]3n+1, &if\ n\ is\ odd\end{cases}$ |
注: 如果不是单行,推荐分行写。
1 2 3 4 5 6
| $f(n)= \begin{cases} \frac n 2, &if\ n\ is\ even \\\\ 3n+1, &if\ n\ is\ odd \end{cases}$
|
效果如下:
$f(n)=
\begin{cases}
\frac n 2, &if\ n\ is\ even \\\\
3n+1, &if\ n\ is\ odd
\end{cases}$
注意,在实际markdown渲染中,直接用 \\ 表示换行即可,但是在hexo等静态网站系统中,会选做转义,将 \\ 转换成 \ ,所以用这类工具时需要用 \\\\ 来表示换行。可以参考这个链接。
在hexo中用 \\ 的效果如下:
多行表达式
| name |
example |
| aligned |
$\begin{aligned} a&=b+c-d \\ &\quad +e-f\\ &=g+h\\ &=i \end{aligned} $ |
| equation |
$ \begin{equation}\begin{split} a&=b+c-d \\ &\quad e-f\\ &=g+h\\ & =i \end{split}\end{equation} $ |
Katex仅支持aligned
Mathjax支持aligh或者equation+split
同样的,推荐多行书写,更清楚。另外多行表达式似乎 \\ 就可以了,那就不清楚为什么分类表达式必须用4个 \\\\ 了。
1 2 3 4 5 6 7 8 9
| $$ \begin{aligned} a&=b+c-d \\ &\quad +e-f\\ &=g+h\\ & =i \end{aligned} $$
|
1 2 3 4 5 6 7 8 9
| $$ \begin{equation}\begin{split} a&=b+c-d \\ &\quad +e-f\\ &=g+h\\ & =i \end{split}\end{equation} $$
|
方程组
| name |
example |
| array |
$\left \{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right.$ |
同样建议分多行写:
1 2 3 4 5 6 7 8 9 10
| $$ \left \{ \begin{array}{c} a_1x+b_1y+c_1z=d_1 \\ a_2x+b_2y+c_2z=d_2 \\ a_3x+b_3y+c_3z=d_3 \end{array} \right. $$
|
表格
代码:
1 2 3 4 5 6 7 8 9
| $$ \begin{array}{c|lcr} n & \text{Left} & \text{Center} & \text{Right} \\ \hline 1 & 0.24 & 1 & 125 \\ 2 & -1 & 189 & -8 \\ 3 & -20 & 2000 & 1+10i \\ \end{array} $$
|
效果:
矩阵
| name |
example |
| matrix |
$ \begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix} $ |
| pmatrix |
$\begin{pmatrix} 1&2 \\ 3&4\\ \end{pmatrix}$ |
| bmatrix |
$\begin{bmatrix} 1&2 \\ 3&4\\ \end{bmatrix}$ |
| Bmatrix |
$\begin{Bmatrix} 1&2 \\ 3&4\\ \end{Bmatrix}$ |
| vmatrix |
$\begin{vmatrix} 1&2 \\ 3&4\\ \end{vmatrix}$ |
| Vmatrix |
$\begin{Vmatrix} 1&2 \\ 3&4\\ \end{Vmatrix}$ |
多行书写代码
1 2 3 4 5 6 7
| $$ \begin{matrix} 1 & x & x^2 \\ 1 & y & y^2 \\ 1 & z & z^2 \\ \end{matrix} $$
|
矩阵中省略元素
代码:
1 2 3 4 5 6 7 8
| $$ \begin{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} $$
|
效果:
增广矩阵
代码:
1 2 3 4 5 6 7
| $$ \left[ \begin{array} {c c | c} %这里的c表示数组中元素对其方式:c居中、r右对齐、l左对齐,竖线表示2、3列间插入竖线 1 & 2 & 3 \\ \hline %插入横线,如果去掉\hline就是增广矩阵 4 & 5 & 6 \end{array} \right] $$
|
效果:
特殊函数与符号
空隙
| name |
example |
| 空格 |
$x\ x$ |
| 较宽空隙 |
$x\;x$ |
| 更大空隙 |
$x\quad x$ |
| 更大空隙 |
$x\qquad x$ |
三角函数
| name |
example |
| sin |
$\sin x$ |
| arctan |
$\arctan x$ |
比较运算符
| name |
example |
| lt |
$\lt$ |
| gt |
$\gt$ |
| le |
$\le$ |
| ge |
$\ge$ |
| ne |
$\ne$ |
| not |
$\not\le$ |
| ne |
$\not =$ |
| approx |
$\approx$ |
| sim |
$\sim$ |
| equiv |
$\equiv$ |
| prec |
$\prec$ |
集合运算
| name |
example |
| cup |
$\cup$ |
| cap |
$\cap$ |
| setminus |
$\setminus$ |
| subset |
$\subset$ |
| subseteq |
$\subseteq$ |
| supset |
$\supset$ |
| supseteq |
$\supseteq$ |
| in |
$\in$ |
| notin |
$\notin$ |
| emptyset |
$\emptyset$ |
| varnothing |
$\varnothing$ |
排列
| name |
example |
| binom |
$\binom{n+1}{2k}$ |
| choose |
${n+1\choose 2k}$ |
箭头
| name |
example |
| to |
$\to$ |
| right |
$\rightarrow$ |
| left |
$\leftarrow$ |
| up |
$\uparrow$ |
| down |
$\downarrow$ |
| Right |
$\Rightarrow$ |
| Down |
$\Downarrow$ |
| mapsto |
$\mapsto$ |
| rightleftarpoons |
$\rightleftharpoons$ |
| leftrightarrow |
$\leftrightarrow$ |
| updownarrow |
$\updownarrow$ |
逻辑运算符
| name |
example |
| land |
$\land$ |
| lor |
$\lor$ |
| lnot |
$\lnot$ |
| forall |
$\forall$ |
| exists |
$\exists$ |
| top |
$\top$ |
| bottom |
$\bot$ |
| vdash |
$\vdash$ |
| vDash |
$\vDash$ |
操作符
| name |
example |
| star |
$\star$ |
| ast |
$\ast$ |
| ast |
$*$ |
| oplus |
$\oplus$ |
| circ |
$\circ$ |
| bullet |
$\bullet$ |
范围
| name |
example |
| infinity |
$\infty$ |
| aleph_o |
$\aleph_o$ |
| nabla |
$\nabla$ |
| Im |
$\Im$ |
| Re |
$\Re$ |
点
| name |
example |
| ldots |
$a_1+a_2+\ldots+a_n$ |
| cdots |
$a_1+a_2+\dots+a_n$ |
| codt |
$\cdot$ |
\ldots的点的位置稍低,cdots的点的位置居中。
附加符号
| name |
example |
| hat |
$\hat x$ |
| widehat |
$\widehat {xy}$ |
| overline |
$\overline x$ |
| vec |
$\vec {xy}$ |
| overrightarrow |
$\overrightarrow {xy}$ |
| dot |
$\dot x$ |
| ddot |
$\ddot x$ |
| dot on dot |
$\dot {\dot x}$ |
| underline |
$\underline {x}$ |
| overline |
$\overline {x}$ |
| overbrace |
$\overbrace {a+b+c}^3$ |
| underbrace |
$\underbrace {a+b+c}_3$ |
|
公式标记与引用
公式:(经测试,渲染失败)
字体
建议参考Latex字体美化
| name | example |
| ————— | ———————————————————————————————- |
| 黑板粗字体 | $\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 黑体字 | $\mathbf{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 打印机字体 | $\mathtt{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 数学斜体 | $\mit{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 罗马体 | $\rm{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 意大利体 | $\it{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 花体 | $\cal{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}G$ |
| 粗体 | $\bf{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 等线体 | $\sf{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 旧德式体 | $\frak{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
| 手写体 | $\scr{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}$ |
杂
| name |
example |
| mod |
$a\equiv b\pmod n$ |
| mod(not recommended) |
$a\equiv b\ (mod\ n)$ |
注释
| name |
example |
| html |
12346789 |
| xml |
12346789 |
Reference Links
- 直接引用并注释
Inline style
- 间接引用并注释
Reference style1
Reference style2
BUGS
在Hexo+Mathjax中,行内公式一般用单个美元符号$表示,但是用这个来表示求和+复杂下标时会渲染失败,举个例子:$S_n = \sum_{k=0}^na_k$
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。