markdown语法
1 公式
1.1 行间
1.1.1 对齐
使用 egin{align}
与 end{align}
可实现公式的对齐
egin{align}
frac{1}{a} sum^{n}_{k=1} =1+2+ cdots + n \
prod_epsilon =3 \
int_0 -2-4-cdots-(2n-2)
= 3end{align}
[egin{align}
frac{1}{a} sum^{n}_{k=1} =1+2+ cdots + n\
prod _epsilon =3\
int_0 -2-4-cdots-(2n-2)
= 3end{align}
]
默认右对齐,可以在想对齐的位置加上 &
(注意, &
在左在右有区别)
egin{align}
frac{1}{a} sum^{n}_{k=1} &=1+2+ cdots + n\
prod _epsilon &=3\
int_0 -2-cdots-(2n-2)
&= 3end{align}
[egin{align}
frac{1}{a} sum^{n}_{k=1} &=1+2+ cdots + n\
prod _epsilon &=3\
int_0 -2-cdots-(2n-2)
&= 3end{align}
]
将 align
改为 aligned
可以去掉自动的编号
egin{aligned}
frac{1}{a} sum^{n}_{k=1} &=1+2+ cdots + n\
prod _epsilon &=3\
int_0 -2-cdots-(2n-2)
&= 3end{aligned}
[egin{aligned}
frac{1}{a} sum^{n}_{k=1} &=1+2+ cdots + n\
prod _epsilon &=3\
int_0 -2-cdots-(2n-2)
&= 3end{aligned}
]
1.1.2 大括号(只使用2.)
f(x)=left{
egin{aligned}
x & = & cos(t) \
y & = & sin(t) \
z & = & frac xy
end{aligned}
ight.
[f(x) = left {
egin{aligned}
x & = & cos(t) \
y & = & sin(t) \
z & = & frac xy
end{aligned}
ight.
]
F^{HLLC}=left{
egin{array}{rcl}
F_Ladasd & & {0 < S_L}\
F^*_L & & {S_L leq 0 < S_M}\
F^*_R & & {S_M leq 0 < S_R}\
F_R & & {S_R leq 0}
end{array}
ight.
这里rcl指第一栏右对齐,第二栏中心对齐,第三栏左对齐。参数可以不写,默认中心对齐,但是必须得有大括号
加一个 &
分隔出两栏。
[F^{HLLC}=left{
egin{array}{rcl}
F_Ladasd & & {0 < S_L}\
F^*_L & & {S_L leq 0 < S_M}\
F^*_R & & {S_M leq 0 < S_R}\
F_R & & {S_R leq 0}
end{array}
ight.
]
f(x)=
egin{cases}
0& ext{x=0}\
1& ext{x!=0}
end{cases}
[f(x)=
egin{cases}
0& ext{x=0}\
1& ext{x!=0}
end{cases}
]
[f(x)=
left{
egin{array}{l}
0& extrm{x=0}\
1& extrm{x$
e$0}
end{array}
ight.
]
1.1.3 行列式与矩阵的表示
egin{gathered}
egin{matrix} 0 & 1 \ 1 & 0 end{matrix}
quad
egin{pmatrix} 0 & -i \ i & 0 end{pmatrix}
quad
egin{bmatrix} 0 & -1 \ 1 & 0 end{bmatrix}
quad
egin{Bmatrix} 1 & 0 \ 0 & -1 end{Bmatrix}
quad
egin{vmatrix} a & b \ c & d end{vmatrix}
quad
egin{Vmatrix} i & 0 \ 0 & -i end{Vmatrix}
end{gathered}
[egin{gathered}
egin{matrix} 0 & 1 \ 1 & 0 end{matrix}
quad
egin{pmatrix} 0 & -i \ i & 0 end{pmatrix}
quad
egin{bmatrix} 0 & -1 \ 1 & 0 end{bmatrix}
quad
egin{Bmatrix} 1 & 0 \ 0 & -1 end{Bmatrix}
quad
egin{vmatrix} a & b \ c & d end{vmatrix}
quad
egin{Vmatrix} i & 0 \ 0 & -i end{Vmatrix}
end{gathered}
]