編輯博客時經常需要寫一些專業的數學公式,收藏一些LaTex語法,方便查找。
在線LaTeX編輯: https://latex.91maths.com/
1.四則運算
2.冪指對
3.根號,省略號,向量,特殊符號
4.累加,累乘

5.矩陣

6.公式中更改顏色
7. 最后看一個公式的例子:
$Obj(\theta)=\displaystyle\sum_{i=1}^{n}l(y_i,\bar y_i^{(t)}) + \displaystyle\sum_{k=1}^{t}\Omega(f_k)$
$=\displaystyle\sum_{i=1}^{n}(y_i-(\bar y_i^{(t-1)} + f_t(x_i)))^2 + \Omega (f_t) + C$
$=\displaystyle\sum_{i=1}^{n}[(y_i-\bar y_i^{(t-1)})^2 + 2(\bar y_i^{(t-1)}-y_i)f_t(x_i) + f_t(x_i)^2] + \Omega (f_t) + C$
$=\displaystyle\sum_{i=1}^{n}[2(\bar y_i^{(t-1)}-y_i)f_t(x_i) + f_t(x_i)^2] + \Omega (f_t) + C1$
所用代碼如下:
$Obj(\theta)=\displaystyle\sum_{i=1}^{n}l(y_i,\bar y_i^{(t)}) + \displaystyle\sum_{k=1}^{t}\Omega(f_k)$
$=\displaystyle\sum_{i=1}^{n}(y_i-(\bar y_i^{(t-1)} + f_t(x_i)))^2 + \Omega (f_t) + C$
$=\displaystyle\sum_{i=1}^{n}[(y_i-\bar y_i^{(t-1)})^2 + 2(\bar y_i^{(t-1)}-y_i)f_t(x_i) + f_t(x_i)^2] + \Omega (f_t) + C$
$=\displaystyle\sum_{i=1}^{n}[2(\bar y_i^{(t-1)}-y_i)f_t(x_i) + f_t(x_i)^2] + \Omega (f_t) + C1$
附:一些常用的符號如下:







