Markdown公式(二)

参考资料https://gavin_nicholas.coding.me/archives/

1. 如何输入括号和分隔符

()[]| 表示自己, {} 表示 {} 。当要显示大号的括号或分隔符时,要用 \left\right 命令。

例子:$$f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right)$$ ,显示:

\[f(x,y,z) = 3y^2z \left( 3+\frac{7x+5}{1+y^2} \right) \]

有时候要用\left.\right.进行匹配而不显示本身。

例子:$$\left. \frac{ {\rm d}u}{ {\rm d}x} \right| _{x=0}$$,显示:

\[\left. \frac{ {\rm d}u}{ {\rm d}x} \right| _{x=0} \]

1.1 偏导

$$\frac{\partial^{2}y}{\partial x^{2}}$$

\[\frac{\partial^{2}y}{\partial x^{2}} \]

2. 运算符:

关系运算符 markdown语言 集合运算符 markdown语言
\(\pm\) $\pm$ \(\emptyset\) $\emptyset$
\(\times\) $\times$ \(\in\) $\in$
\(\div\) $\div$ \(\notin\) $\notin$
\(\mid\) $\mid$ \(\subset\) $\subset$
\(\nmid\) $\nmid$ \(\supset\) $\supset$
\(\cdot\) $\cdot$ \(\subseteq\) $\subseteq$
\(\circ\) $\circ$ \(\supseteq\) $\supseteq$
\(\ast\) $\ast$ \(\bigcap\) $\bigcap$
\(\bigodot\) $\bigodot$ \(\bigcup\) $\bigcup$
\(\bigotimes\) $\bigotimes$ \(\bigvee\) $\bigvee$
\(\bigoplus\) $\bigoplus$ \(\bigvee\) $\bigvee$
\(\leq\) $\leq$ \(\bigwedge\) $\bigwedge$
\(\geq\) $\geq$ \(\biguplus\) $\biguplus$
\(\neq\) $\neq$ \(\bigsqcup\) $\bigsqcup$
\(\approx\) $\approx$
\(\equiv\) $\equiv$ \(\ll\) $\ll$
\(\sum\) $\sum$
\(\prod\) $\prod$ \(\sim\) $\sim$
\(\coprod\) $\coprod$ \(\backsim\) $\backsim$
\(\prec\) \(\preceq\) \(\succ\) \(\succeq\) $\prec$ $\preceq$ $\succ$ $\succeq$
对数运算符 markdown语言 戴帽符号 markdown语言 连线符号 markdown语言
\(\log\) $\log$ \(\hat{y}\) $\hat{y}$ \(\overline{a+b+c+d}\) $\overline{a+b+c+d}$
\(\lg\) $\lg$ \(\check{y}\) $\check{y}$ \(\underline{a+b+c+d}\) $\underline{a+b+c+d}$
\(\ln\) $\ln$ \(\breve{y}\) $\breve{y}$ \(\overbrace{a+\underbrace{b+c}{1.0}+d}^{2.0}\) $\overbrace{a+\underbrace{b+c}{1.0}+d}^{2.0}$

三角运算符 markdown语言 微积分运算符 markdown语言 逻辑运算符 markdown语言
\(\bot\) $\bot$ \(\prime\) $\prime$ \(\because\) $\because$
\(\angle\) $\angle$ \(\int\) $\int$ \(\therefore\) $\therefore$
\(30^\circ\) $30^\circ$ \(\iint\) $\iint$ \(\forall\) $\forall$
\(\sin\) $\sin$ \(\iiint\) $\iiint$ \(\exists\) $\exists$
\(\cos\) $\cos$ \(\iiiint\) $\iiiint$ \(\not=\) $\not=$
\(\tan\) $\tan$ \(\oint\) $\oint$ \(\not>\) $\not>$
\(\cot\) $\cot$ \(\lim\) $\lim$ \(\not\subset\) $\not\subset$
\(\sec\) $\sec$ \(\infty\) $\infty$
\(\csc\) $\csc$ \(\nabla\) $\nabla$
箭头符号 markdown语言
\(\uparrow\) $\uparrow$
\(\downarrow\) $\downarrow$
\(\Uparrow\) $\Uparrow$
\(\Downarrow\) $\Downarrow$
\(\rightarrow\) $\rightarrow$
\(\leftarrow\) $\leftarrow$
\(\Rightarrow\) $\Rightarrow$
\(\Leftarrow\) $\Leftarrow$
\(\longrightarrow\) $\longrightarrow$
\(\longleftarrow\) $\longleftarrow$
\(\Longrightarrow\) $\Longrightarrow$
\(\Longleftarrow\) $\Longleftarrow$
\(f: {\mathbf x_t} \mapsto {\mathbf y_t}\) $f: {\mathbf x_t} \mapsto {\mathbf y_t}$
\(\Longleftrightarrow\) \Longleftrightarrow

更多关于箭头的符号见:MathJax 支持的 Latex 符号总结(各种箭头符号)


特殊符号

  • \(\boldsymbol{\hat y} = \boldsymbol{W} \boldsymbol{x}\) 的输入
    代码:
$\boldsymbol{\hat y} = \boldsymbol{W} \boldsymbol{x}$
  • \(\ell_p\) 范数: $\ell_p$

对于一些特殊的数学符号可以使用 \operatorname{} 或者 \text{} 来进行转换,如:$\text{cov}$$\operatorname{s.t.}$ 便显示为:\(\text{cov}\)\(\operatorname{s.t.}\)

还有:

$A \xrightarrow{f} B \; a \; \bot b \; \overset{def}{=}$ 

\(A \xrightarrow{f} B \; a \; \bot b \; \overset{def}{=}\)

$$
 \underset{x\in S\subseteq X}{\operatorname{arg\,max}}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
$$

\[ \underset{x\in S\subseteq X}{\operatorname{arg\,max}}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}. \]

$$
\operatorname*{\arg\max}_{x\in S\subseteq X}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}.   
$$

\[\operatorname*{\arg\max}_{x \in S \subseteq X}\, f(x) := \{x \mid x\in S \wedge \forall y \in S : f(y) \le f(x)\}. \]

对齐多行公式

$$
\begin{aligned}
a  &= b^2 + c^2\\
&= w^3 + b
\end{aligned}
$$

显示:

\[\begin{aligned} a &= b^2 + c^2\\ &= w^3 + b \end{aligned} \]

关于矩阵的语法

$$
\begin{Bmatrix}
	1&2&3\\
	4&5&6\\
	7&8&9
\end{Bmatrix}
 \tag{7}
$$

显示:

\[\begin{Bmatrix} 1&2&3\\ 4&5&6\\ 7&8&9 \end{Bmatrix} \tag{7} \]

更多矩阵设计:

$$
\begin{vmatrix}
	1&2&3\\
	4&5&6\\
	7&8&9
\end{vmatrix}
 \tag{8}
$$

$$
\begin{Vmatrix}
1&2&3\\
4&5&6\\
7&8&9
\end{Vmatrix}
 \tag{9}
$$

$$
\bigl(
	\begin{smallmatrix} 
		... 
	\end{smallmatrix}
\bigr)
$$

$$ 
\left[
    \begin{array}{cc|c}
      1 & 2 & 3 \\
      4 & 5 & 6
    \end{array}
\right] \tag{12}
$$

显示:

\[\begin{vmatrix} 1&2&3\\ 4&5&6\\ 7&8&9 \end{vmatrix} \tag{8} \]

\[\begin{Vmatrix} 1&2&3\\ 4&5&6\\ 7&8&9 \end{Vmatrix} \tag{9} \]

\[\bigl( \begin{smallmatrix} ... \end{smallmatrix} \bigr) \]

\[\left[ \begin{array}{cc|c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{array} \right] \tag{12} \]

更多精彩见:数学 — nocode-book 0.1 文档 (xinetzone.github.io)

posted @ 2017-09-04 17:03  xinet  阅读(10992)  评论(2编辑  收藏  举报