makdown–LaTeX公式小结
数学公式
公式 | Markdown | 公式 | Markdown |
---|---|---|---|
行间公式 | $表达式$ | a b a\:b ab | a:b |
块公式 | $$表达式$$ | a b a\;b ab | a;b |
a b A c d ^{ab}A^{cd} abAcd | {ab}A{cd} | a b a\!b ab | a\!b |
a b B c d _{ab}B_{cd} abBcd | _{ab}B_{cd} | a b a\,b ab | a,b |
a b c d \frac{ab}{cd} cdab | \frac{ab}{cd} | a b ab ab | ab |
a + b \sqrt{a+b} a+b | \sqrt{a+b} | a b ‾ \overline{ab} ab | \overline{ab} |
$ \sqrt[c]{a+b}$ | \sqrt[c]{a+b} | a b ‾ \underline{ab} ab | \underline{ab} |
a b ⏞ \overbrace{ab} ab | \overbrace{ab} | a ′ a' a′ | a’ |
a b ⏟ \underbrace{ab} ab | \underbrace{ab} | a ′ a\prime a′ | a\prime |
⋯ \cdots ⋯ | \cdots | a ′ a^{\prime} a′ | a^{\prime} |
⋱ \ddots ⋱ | \ddots | … \ldots … | \ldots |
⋮ \vdots ⋮ | \vdots | lim a → 0 x y \lim_{a \to 0}xy a→0limxy | $$\lim_{a \to 0}xy$$ |
a + b = c (1.1) a+b=c \tag{1.1} a+b=c(1.1) | a+b=c \tag{1.1} | lim a → 0 x y \lim_{a\to 0}xy lima→0xy | $\lim_{a \to 0}xy$ |
∑ b a \sum^{a}_{b} ∑ba | $\sum^{a}_{b}$ | X ⃗ \vec X X | \vec{X} |
∑ b a \sum^{a}_{b} b∑a | $$\sum^{a}_{b}$$ | X \mathbf{X} X | $\mathbf{X}$ |
##自定义命令
命令\newcommand可以用来定义自己个性的命令。
例如一般矢量使用加粗的斜体表示,但是latex公式使用\mathbf{X}可以加粗,但不是斜体,那么自定义一个命令\vect,
\newcommand{\vect}[1]{\boldsymbol{#1}}
$\newcommand{\vect}[1]{\boldsymbol{#1}}$
其中[1]表示要修饰一个表达式,{#1}表示要操作的表达式。那么定义上述命令之后,用\vect修饰字符的结果就是加粗的斜体,
例如而\mathbf{X}
显示为
X
\mathbf{X}
X,只加粗,而不是斜体。而$vect{X}
显示为KaTeX parse error: Undefined control sequence: \vect at position 1: \̲v̲e̲c̲t̲ ̲ ̲{X},加粗的斜体。
再定义命令\SES
$ \newcommand{\SES}[3]{ 0 \to #1 \to #2 \to #3 \to 0 } $
$ \newcommand{\SES}[3]{ 0 \to #1 \to #2 \to #3 \to 0 } $
其中[3]表示要修饰3个表达式,{#1}表示要操作的第一个表达式
那么
$$ \SES {A}{B}{C} $$
显示为
KaTeX parse error: Undefined control sequence: \SES at position 2: \̲S̲E̲S̲ ̲{A}{B}{C}
矩阵
块公式–简单矩阵
$$
\begein{matrix}
1 & 2 & 3 \\
a & b & c \\
4 & 5 & 6
\end{matrix} \tag{1}
$$
1 2 3 a b c 4 5 6 (1) \begin{matrix} 1 & 2 & 3 \\ a & b & c \\ 4 & 5 & 6 \end{matrix} \tag{1} 1a42b53c6(1)
行间公式–简单矩阵
行间矩阵:$ \begin{matrix} 1 & 2 \\ a & b \end{matrix}$
行间矩阵:$ \begin{matrix} 1 & 2 \ a & b \end{matrix} $
带{…}的矩阵
$$
\left\{
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\right\} \tag{2}
$$
结果
{
1
2
3
4
5
6
7
8
9
}
(2)
\left\{ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right\} \tag{2}
⎩⎨⎧147258369⎭⎬⎫(2)
带[…]的矩阵
$$
\left[
\begin{matrix}
1 & 2 & 3 \\
4 & 5 & 6 \\
7 & 8 & 9
\end{matrix}
\right] \tag{3}
$$
结果
[
1
2
3
4
5
6
7
8
9
]
(3)
\left[ \begin{matrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{matrix} \right] \tag{3}
⎣⎡147258369⎦⎤(3)
带省略号的矩阵
$$
\left[
\begin{matrix}
1 & 2 & \cdots & 4 \\
7 & 6 & \cdots & 5 \\
\vdots & \vdots & \ddots & \vdots \\
8 & 9 & \cdots & 0 \\
\end{matrix}
\right]
$$
结果:
[
1
2
⋯
4
7
6
⋯
5
⋮
⋮
⋱
⋮
8
9
⋯
0
]
\left[ \begin{matrix} 1 & 2 & \cdots & 4 \\ 7 & 6 & \cdots & 5 \\ \vdots & \vdots & \ddots & \vdots \\ 8 & 9 & \cdots & 0 \\ \end{matrix} \right]
⎣⎢⎢⎢⎡17⋮826⋮9⋯⋯⋱⋯45⋮0⎦⎥⎥⎥⎤
带参数的矩阵,比如写增广矩阵
$$
\left[
\begin{array}{cc|c}
1 & 2 & 3 \\
4 & 5 & 6
\end{array}
\right] \tag{7}
$$
[ 1 2 3 4 5 6 ] (7) \left[ \begin{array}{cc|c} 1 & 2 & 3 \\ 4 & 5 & 6 \end{array} \right] \tag{7} [142536](7)
常用数学符号及希腊字母
大写 | markdown | 小写 | markdown |
---|---|---|---|
A A A | A | α \alpha α | \alpha |
B B B | B | β \beta β | \beta |
Γ \Gamma Γ | \Gamma | γ \gamma γ | \gamma |
Δ \Delta Δ | \Delta | δ \delta δ | \delta |
E E E | E | ϵ \epsilon ϵ | \epsilon |
ε \varepsilon ε | \varepsilon | ||
Z Z Z | Z | ζ \zeta ζ | \zeta |
H H H | H | η \eta η | \eta |
Θ \Theta Θ | \Theta | θ \theta θ | \theta |
I I I | I | ι \iota ι | \iota |
K K K | K | κ \kappa κ | \kappa |
Λ \Lambda Λ | \Lambda | λ \lambda λ | \lambda |
M M M | M | μ \mu μ | \mu |
N N N | N | ν \nu ν | \nu |
Ξ \Xi Ξ | \Xi | ξ \xi ξ | \xi |
O O O | O | ο \omicron ο | \omicron |
Π \Pi Π | \Pi | π \pi π | \pi |
P P P | P | ρ \rho ρ | \rho |
Σ \Sigma Σ | \Sigma | σ \sigma σ | \sigma |
T T T | T | τ \tau τ | \tau |
Υ \Upsilon Υ | \Upsilon | υ \upsilon υ | \upsilon |
Φ \Phi Φ | \Phi | ϕ \phi ϕ | \phi |
φ \varphi φ | \varphi | ||
X X X | X | χ \chi χ | \chi |
Ψ \Psi Ψ | \Psi | ψ \psi ψ | \psi |
Ω \Omega Ω | \Omega | ω \omega ω | \omega |
数学运算符
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-z1M9Pb1T-1593706103710)(image/Binary Operation Symbols.png)]
关系运算符
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rYvPC6sb-1593706103713)(image/Relation Symbols.png)]
标点符号
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ADJJh0EK-1593706103715)(image/Punctuation Symbols.png)]
杂项符号
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-8rdoZQ7G-1593706103718)(image/Miscellaneous Symbols.png)]
可变大小的符号
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-aoqY7qhK-1593706103719)(image/Variable-sized Symbols.png)]
三角函数等类log符号
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-Z0vZOMOZ-1593706103720)(image/Log-like Symbols.png)]
分隔符
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-1JvtDdDP-1593706103721)(image/Delimiters.png)]
大分隔符
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-OBDSXUKH-1593706103721)(image/Large delimiters.png)]
数学读音符号
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-zz81KnHi-1593706103722)(image/Math mode accents.png)]
其他一些构造符
19)]
三角函数等类log符号
[外链图片转存中…(img-Z0vZOMOZ-1593706103720)]
分隔符
[外链图片转存中…(img-1JvtDdDP-1593706103721)]
大分隔符
[外链图片转存中…(img-OBDSXUKH-1593706103721)]
数学读音符号
[外链图片转存中…(img-zz81KnHi-1593706103722)]
其他一些构造符
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-ErsIK7yI-1593706103723)(image/Some other constructions.png)]