注:大型运算符的运算范围若想写到运算符上下侧,加\limits即可,如 \sum\limits_{i=1}^{n}:
∑
i
=
1
n
\sum\limits_{i=1}^{n}
i=1∑n
2.4 上下标
示例
编码
示例
编码
θ
^
\hat{\theta}
θ^
\hat{\theta}
a
⃗
\vec{a}
a
\vec{a}
a
b
c
^
\widehat{abc}
abc
\widehat{abc}
a
˙
\dot{a}
a˙
\dot{a}
X
ˉ
\bar{X}
Xˉ
\bar{X}
a
¨
\ddot{a}
a¨
\ddot{a}
X
‾
\overline{X}
X
\overline{X}
a
˘
\breve{a}
a˘
\breve{a}
X
~
\tilde{X}
X~
\tilde{X}
a
ˇ
\check{a}
aˇ
\check{a}
X
Y
~
\widetilde{XY}
XY
\widetilde{XY}
a
ˊ
\acute{a}
aˊ
\acute{a}
a
b
∼
\underset{\sim}{ab}
∼ab
\underset{\sim}{ab}
a
ˋ
\grave{a}
aˋ
\grave{a}
2.5 其他数学符号
运算符
示例
编码
运算符
示例
编码
任意
∀
\forall
∀
\forall
不存在
∄
\nexists
∄
\nexists
存在
∃
\exists
∃
\exists
所以
∴
\therefore
∴
\therefore
无穷
∞
\infty
∞
\infty
因为
∵
\because
∵
\because
正比于
∝
\propto
∝
\propto
分布
X
∼
N
(
μ
,
σ
2
)
X\sim N(\mu,\sigma^2)
X∼N(μ,σ2)
X\sim N(\mu,\sigma^2)
∼
\sim
∼
\sim
≈
\approx
≈
\approx
2.6 矩阵
简单矩阵
\begin{matrix}
a & b & c & d & e\\
f & g & h & i & j \\
k & l & m & n & o \\
p & q & r & s & t
\end{matrix}
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
\begin{matrix} a & b & c & d & e\\ f & g & h & i & j \\ k & l & m & n & o \\ p & q & r & s & t \end{matrix}
afkpbglqchmrdinsejot
A
=
(
a
11
a
12
a
21
a
22
)
A= \begin{pmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{pmatrix}
A=(a11a21a12a22) 或
\left(
\begin{matrix}
a & b & c & d & e\\
f & g & h & i & j \\
k & l & m & n & o \\
p & q & r & s & t
\end{matrix}
\right)
(
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
)
\left( \begin{matrix} a & b & c & d & e\\ f & g & h & i & j \\ k & l & m & n & o \\ p & q & r & s & t \end{matrix} \right)
afkpbglqchmrdinsejot
A
=
[
a
11
a
12
a
21
a
22
]
A= \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}
A=[a11a21a12a22] 或
\left[
\begin{matrix}
a & b & c & d & e\\
f & g & h & i & j \\
k & l & m & n & o \\
p & q & r & s & t
\end{matrix}
\right]
[
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
]
\left[ \begin{matrix} a & b & c & d & e\\ f & g & h & i & j \\ k & l & m & n & o \\ p & q & r & s & t \end{matrix} \right]
afkpbglqchmrdinsejot 4. 矩阵中的省略号
A= \left[
begin{matrix}
a & b & \cdots & e\\
f & g & \cdots & j \\
\vdots & \vdots & \ddots & \vdots \\
p & q & \cdots & t
end{matrix}
\right]
A
=
[
a
b
⋯
e
f
g
⋯
j
⋮
⋮
⋱
⋮
p
q
⋯
t
]
A= \left[ \begin{matrix} a & b & \cdots & e\\ f & g & \cdots & j \\ \vdots & \vdots & \ddots & \vdots \\ p & q & \cdots & t \end{matrix} \right]
A=af⋮pbg⋮q⋯⋯⋱⋯ej⋮t 5. 矩阵中的分割线
A= \left[
\begin{array}{cccc|c}
a & b & c & d & e\\
f & g & h & i & j \\
k & l & m & n & o \\
p & q & r & s & t
\end{array}
\right]
A
=
[
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
]
A= \left[ \begin{array}{cccc|c} a & b & c & d & e\\ f & g & h & i & j \\ k & l & m & n & o \\ p & q & r & s & t \end{array} \right]
A=afkpbglqchmrdinsejot 可以看到,矩阵也可以用array创建:
arg
min
θ
[
−
∑
i
=
1
n
[
y
(
i
)
ln
(
h
θ
(
x
(
i
)
)
)
+
(
1
−
y
(
i
)
)
ln
(
1
−
h
θ
(
x
(
i
)
)
)
]
]
\arg\min_{\theta} \left[ -\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right] \right]
argθmin[−i=1∑n[y(i)ln(hθ(x(i)))+(1−y(i))ln(1−hθ(x(i)))]]
3.3.2 方程组
\begin{cases}
aaaa &=123\\
b &=456
\end{cases}
其中&为对齐位置
{
a
a
a
a
=
123
b
=
456
\begin{cases} aaaa &=123\\ b &=456 \end{cases}
{aaaab=123=456
L
(
θ
)
=
arg
max
θ
ln
(
P
A
l
l
)
=
arg
max
θ
ln
∏
i
=
1
n
[
(
h
θ
(
x
(
i
)
)
)
y
(
i
)
⋅
(
1
−
h
θ
(
x
(
i
)
)
)
1
−
y
(
i
)
]
=
arg
max
θ
∑
i
=
1
n
[
y
(
i
)
ln
(
h
θ
(
x
(
i
)
)
)
+
(
1
−
y
(
i
)
)
ln
(
1
−
h
θ
(
x
(
i
)
)
)
]
=
arg
min
θ
[
−
∑
i
=
1
n
[
y
(
i
)
ln
(
h
θ
(
x
(
i
)
)
)
+
(
1
−
y
(
i
)
)
ln
(
1
−
h
θ
(
x
(
i
)
)
)
]
]
=
arg
min
θ
l
(
θ
)
\begin{split} L(\theta) &= \arg\max_{\theta}\ln(P_{All})\\ &= \arg\max_{\theta}\ln\prod_{i=1}^{n} \left[ (h_{\theta}(\mathbf{x}^{(i)}))^{\mathbf{y}^{(i)}}\cdot (1-h_{\theta}(\mathbf{x}^{(i)}))^{1-\mathbf{y}^{(i)}} \right]\\ &= \arg\max_{\theta}\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right]\\ &= \arg\min_{\theta} \left[ -\sum_{i=1}^{n} \left[ \mathbf{y}^{(i)}\ln(h_{\theta}(\mathbf{x}^{(i)})) + (1-\mathbf{y}^{(i)})\ln(1-h_{\theta}(\mathbf{x}^{(i)})) \right] \right]\\ &= \arg\min_{\theta}\mathscr{l}(\theta) \end{split}
L(θ)=argθmaxln(PAll)=argθmaxlni=1∏n[(hθ(x(i)))y(i)⋅(1−hθ(x(i)))1−y(i)]=argθmaxi=1∑n[y(i)ln(hθ(x(i)))+(1−y(i))ln(1−hθ(x(i)))]=argθmin[−i=1∑n[y(i)ln(hθ(x(i)))+(1−y(i))ln(1−hθ(x(i)))]]=argθminl(θ)
3.4 公式中插入文字
公式中直接写文字会变成斜体,使用\text即可,例如ABCDE\text{hello,world!}FG表示
A
B
C
D
E
hello,world!
F
G
ABCDE\text{hello,world!}FG
ABCDEhello,world!FG
\tiny = smallest
\scriptsize = very small
\footnotesize = smaller
\small = small
\normalsize = normal
\large = large
\Large = Large
\LARGE = LARGE
\huge = huge
\Huge = Huge
=
s
m
a
l
l
e
s
t
=
v
e
r
y
s
m
a
l
l
=
s
m
a
l
l
e
r
=
s
m
a
l
l
=
n
o
r
m
a
l
=
l
a
r
g
e
=
L
a
r
g
e
=
L
A
R
G
E
=
h
u
g
e
=
H
u
g
e
\tiny = smallest \\ \scriptsize = very small \\ \footnotesize = smaller \\ \small = small \\ \normalsize = normal \\ \large = large \\ \Large = Large \\ \LARGE = LARGE \\ \huge = huge \\ \Huge = Huge \\
=smallest=verysmall=smaller=small=normal=large=Large=LARGE=huge=Huge 范围之外{\tiny 作用范围}范围之外 则表示为:
范围之外
作用范围
范围之外
范围之外{\tiny 作用范围}范围之外
范围之外作用范围范围之外
本例子使用vue3
介绍 vant-ui
地址:介绍 - Vant 4 (vant-ui.github.io)
Vant 是一个轻量、可定制的移动端组件库
安装 通过 npm 安装: # Vue 3 项目,安装最新版 Vant npm i vant # Vue 2 项目,安装 Vant 2 npm i vantlatest-v…