【markdown】 数学公式

文章:在Markdown中输入数学公式(MathJax) - 简书 —入门
Markdown 中的常用 LaTex 数学公式 —查阅

\sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t

∑ i = 0 N ∫ a b g ( t , i ) d t \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t i=0Nabg(t,i)dt

$$...$$单独显示并放大

∑ i = 0 N ∫ a b g ( t , i ) d t \sum_{i=0}^N\int_{a}^{b}g(t,i)\text{d}t i=0Nabg(t,i)dt

markdown不支持 \\ 换行

$\tiny 萌萌哒$ $\scriptsize 萌萌哒$
$\tiny 萌萌哒\\$ $\scriptsize 萌萌哒\\$

萌 萌 哒 \tiny 萌萌哒 萌 萌 哒 \scriptsize 萌萌哒
$\tiny 萌萌哒\$ $\scriptsize 萌萌哒\$

1.5.颜色(有些编辑器不支持)

$\color{Red}{Red}$, $\color{blue}{Blue}$,  $\color{orange}{Orange}$,  
$\color{Green}{Green}$,  $\color{gray}{Gray}$,  $\color{purple}{Purple}$.
$\color{Red}{这里是标题哦}$

R e d \color{Red}{Red} Red, B l u e \color{blue}{Blue} Blue, O r a n g e \color{orange}{Orange} Orange,
G r e e n \color{Green}{Green} Green, G r a y \color{gray}{Gray} Gray, P u r p l e \color{purple}{Purple} Purple.
这 里 是 标 题 哦 \color{Red}{这里是标题哦}

2 希腊字母

$\gamma\\$    
$\Gamma$

小写 $\gamma $ 大写 Γ \Gamma Γ

若需要斜体希腊字母,将命令前加上var前缀即可

$\vargamma$  # 错误 小写没有斜体
$\varGamma$

KaTeX parse error: Undefined control sequence: \vargamma at position 1: \̲v̲a̲r̲g̲a̲m̲m̲a̲

Γ \varGamma Γ

3 字母修饰
3.1 上下标
上标:^
下标:_

$c_n^2$ $C_n^2$  C一般要大写

c n 2 c_n^2 cn2 C n 2 C_n^2 Cn2

3.2 矢量

$\vec a$   
$\overrightarrow{xy}$

a ⃗ \vec a a
x y → \overrightarrow{xy} xy

3.3 字体

$\mathtt{A}\mathtt{BCD}$
$\mathbb{A}\mathbb{BCD}$
$\mathsf{A}\mathsf{BCD}$

A B C D \mathtt{A}\mathtt{BCD} ABCD
A B C D \mathbb{A}\mathbb{BCD} ABCD
A B C D \mathsf{A}\mathsf{BCD} ABCD

3.4 分组 {}

$10^{10}$  
$10^10$

1 0 10 10^{10} 1010
1 0 1 0 10^10 1010

3.5 括号

$()$
$[]$
$\langle\rangle$
$(\frac{x}{y})$
$\left(\frac{x}{y}\right)$

( ) () ()
[ ] [] []
⟨ ⟩ \langle\rangle
( x y ) (\frac{x}{y}) (yx)
( x y ) \left(\frac{x}{y}\right) (yx)

3.6 求和、极限与积分

$\sum_{i=1}^n{a_i}$
$\lim_{x\to 0}$
$\int_0^\infty{fxdx}$

∑ i = 1 n a i \sum_{i=1}^n{a_i} i=1nai
lim ⁡ x → 0 \lim_{x\to 0} limx0
∫ 0 ∞ f x d x \int_0^\infty{fxdx} 0fxdx

3.7 分式与根式

$\frac{x}{y}$
$\sqrt[x]{y}$

x y \frac{x}{y} yx
y x \sqrt[x]{y} xy

3.8 特殊函数

$\sin x$
$\ln x$
$\max(A,B,C)$

sin ⁡ x \sin x sinx
ln ⁡ x \ln x lnx
max ⁡ ( A , B , C ) \max(A,B,C) max(A,B,C)

3.9 特殊符号

$\infty$

∞ \infty
在这里插入图片描述
3.10 空格
会忽略空格的存在

$a b$
$a\ b$
$a\quad b$

a b a b ab
a   b a\ b a b
a b a\quad b ab

4 矩阵
4.1 基本语法
起始标记\begin{matrix},结束标记\end{matrix}
每一行末尾标记\\,行间元素之间以&分隔

$$\begin{matrix}
1&0&0\\
0&1&0\\
0&0&1\\
\end{matrix}$$

1 0 0 0 1 0 0 0 1 \begin{matrix} 1&0&0\\ 0&1&0\\ 0&0&1\\ \end{matrix} 100010001

4.2 矩阵边框
在起始、结束标记处用下列词替换 matrix
pmatrix :小括号边框
bmatrix :中括号边框
Bmatrix :大括号边框
vmatrix :单竖线边框
Vmatrix :双竖线边框
4.3 省略元素
横省略号:\cdots
竖省略号:\vdots
斜省略号:\ddots
举例

$$\begin{bmatrix}
{a_{11}}&{a_{12}}&{\cdots}&{a_{1n}}\\
{a_{21}}&{a_{22}}&{\cdots}&{a_{2n}}\\
{\vdots}&{\vdots}&{\ddots}&{\vdots}\\
{a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}}\\
\end{bmatrix}$$

[ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋱ ⋮ a m 1 a m 2 ⋯ a m n ] \begin{bmatrix} {a_{11}}&{a_{12}}&{\cdots}&{a_{1n}}\\ {a_{21}}&{a_{22}}&{\cdots}&{a_{2n}}\\ {\vdots}&{\vdots}&{\ddots}&{\vdots}\\ {a_{m1}}&{a_{m2}}&{\cdots}&{a_{mn}}\\ \end{bmatrix} a11a21am1a12a22am2a1na2namn

4.5 方程组
需要cases环境:起始、结束处以{cases}声明

$$\begin{cases}
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{cases}
$$

{ a 1 x + b 1 y + c 1 z = d 1 a 2 x + b 2 y + c 2 z = d 2 a 3 x + b 3 y + c 3 z = d 3 \begin{cases} 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{cases} a1x+b1y+c1z=d1a2x+b2y+c2z=d2a3x+b3y+c3z=d3

猜你喜欢

转载自blog.csdn.net/Jruo911/article/details/121939559