Markdown常用LaTex数学公式

发布时间:2020-09-23 阅读 3399

Stata 连享会   主页 || 视频 || 推文

温馨提示: 定期 清理浏览器缓存,可以获得最佳浏览体验。

课程详情 https://gitee.com/arlionn/Course   |   lianxh.cn

课程主页 https://gitee.com/arlionn/Course

作者:毒逆天
出处:https://www.cnblogs.com/dotnetcrazy


目录



上次写了 Markdown,这次用到了 LaTeX,也出一期(吐槽,工作量比 Markdown 高太多...)

Markdown 教程视频:连享会·分钟 Markdown

1. 样式系列

1.1 换行和空格

换行:\\;  空格:\:

$a+b \\ = c+\:|:d$

a+b=c+d

1.2 居中

用两个美元符号 $$ 包围的公式,会独占一行显示:

$$y = x\beta + \varepsilon$$

1.3 加粗和斜体

$$\mathit{公式}: \mathbf{y} = \mathbf{x}\beta + u$$

1.4 大小

$\tiny 连享会 lianxh.cn$

$\scriptsize 连享会 lianxh.cn$

$\small 连享会 lianxh.cn$

$\normalsize 连享会 lianxh.cn(正常)$

$\large 连享会 lianxh.cn$

$\Large 连享会 lianxh.cn$

$\huge 连享会 lianxh.cn$

$\Huge 连享会 lianxh.cn$

连享会lianxh.cn

连享会lianxh.cn

连享会lianxh.cn

连享会lianxh.cn(正常)

连享会lianxh.cn

连享会lianxh.cn

连享会lianxh.cn

连享会lianxh.cn

如果是单行写,记得加换行符号:

$\tiny 连享会 lianxh.cn\\$
$\scriptsize 连享会 lianxh.cn\\$
$\small 连享会 lianxh.cn\\$
$\normalsize 连享会 lianxh.cn(正常)\\$
$\large 连享会 lianxh.cn\\$
$\Large 连享会 lianxh.cn\\$
$\huge 连享会 lianxh.cn\\$
$\Huge 连享会 lianxh.cn\\$

1.5 颜色

Note:有些编辑器不支持。

$\color{Red}{红色}$,    $\color{blue}{蓝色}$,
$\color{orange}{橙色}$, $\color{Green}{绿色}$,
$\color{gray}{灰色}$,   $\color{purple}{紫色}$.

红色蓝色,
 橙色绿色,
 灰色紫色.

2. 常用数学

2.1. 常用表达式

常用数学 LaTex 公式
ab $\sqrt{ab}$
abn $\sqrt[n]{ab}$
logab $\log_{a}{b}$
lgab $\lg{ab}$
ab $a^{b}$
ab $a_{b}$
xab $x_a^b$
$\int$
ab $\int_{a}^{b}$
$\oint$
ab $\oint_a^b$
$\sum$
ab $\sum_a^b$
$\coprod$
ab $\coprod_a^b$
$\prod$
ab $\prod_a^b$
$\bigcap$
ab $\bigcap_a^b$
$\bigcup$
ab $\bigcup_a^b$
$\bigsqcup$
ab $\bigsqcup_a^b$
$\bigvee$
ab $\bigvee_a^b$
$\bigwedge$
ab $\bigwedge_a^b$
ab~ $\widetilde{ab}$
ab^ $\widehat{ab}$
ab $\overleftarrow{ab}$
ab $\overrightarrow{ab}$
ab $\overbrace{ab}$
ab $\underbrace{ab}$
ab_ $\underline{ab}$
ab¯ $\overline{ab}$
abcd $\frac{ab}{cd}$
ab $\frac{\partial a}{\partial b}$
dxdy $\frac{\text{d}x}{\text{d}y}$
limab $\lim_{a \rightarrow b}$

2.2. 数学公式大全

数学公式 LaTex 公式
i=0ni3 $\displaystyle\sum\limits_{i=0}^n i^3$
(ab) $\left(\begin{array}{c}a\\ b\end{array}\right)$
(a2b3) $\left(\frac{a^2}{b^3}\right)$
a33|01 $\left.\frac{a^3}{3}\right\lvert_0^1$
[abcd] $\begin{bmatrix}a & b \\c & d \end{bmatrix}$
{ax=0bx>0 $\begin{cases}a & x = 0\\b & x > 0\end{cases}$
nn1S $\sqrt{\frac{n}{n-1} S}$
(αβγδ) $\begin{pmatrix} \alpha& \beta^{*}\\ \gamma^{*}& \delta \end{pmatrix}$
An+μ1B $A\:\xleftarrow{n+\mu-1}\:B$
BTn±i1C $B\:\xrightarrow[T]{n\pm i-1}\:C$
1klog2c(f) $\frac{1}{k}\log_2 c(f)\;$
Af(x,y) $\iint\limits_A f(x,y)\;$
xn+yn=zn $x^n + y^n = z^n$
E=mc2 $E=mc^2$
eπi1=0 $e^{\pi i} - 1 = 0$
p(x)=3x6 $p(x) = 3x^6$
3x+y=12 $3x + y = 12$
0exdx $\int_0^\infty \mathrm{e}^{-x}\,\mathrm{d}x$
1+x+x2+n $\sqrt[n]{1+x+x^2+\ldots}$
(xy)=x!y!(xy)! $\binom{x}{y} = \frac{x!}{y!(x-y)!}$
1x+1yyz $\frac{\frac{1}{x}+\frac{1}{y}}{y-z}$
f(x)=P(x)Q(x) $f(x)=\frac{P(x)}{Q(x)}$
1+ab1+11+1a $\frac{1+\frac{a}{b}}{1+\frac{1}{1+\frac{1}{a}}}$
0im0<j<nP(i,j) $\sum_{\substack{0\le i\le m\\ 0\lt j\lt n}} P(i,j)$
limxexp(x)=0 $\lim_{x \to \infty} \exp(-x) = 0$
cos(2θ)=cos2θsin2θ $\cos (2\theta) = \cos^2 \theta - \sin^2 \theta$

3. 数学符号

3.1. 集合系列

运算符 公式 运算符 公式 运算符 公式
$\emptyset$ $\in$ $\notin$
$\subset$ $\supset$ $\subseteq$
$\nsubseteq$ $\nsupseteq$ $\nsubseteqq$
$\nsupseteqq$ $\subsetneq$ $\supsetneq$
$\subsetneqq$ $\supsetneqq$ $\varsubsetneq$
$\varsupsetneq$ $\varsubsetneqq$ $\varsupsetneqq$
$\bigcap$ $\bigcup$ $\bigvee$
$\bigwedge$ $\biguplus$ $\bigsqcup$
$\Subset$ $\Supset$ $\subseteqq$
$\supseteqq$ $\sqsubset$ $\sqsupset$

3.2. 常用符号

基本符号 公式 基本符号 公式 基本符号 公式
$\cdot$ $\vdots$ x` $\grave{x}$
. $.$ $\ddots$ x˘ $\breve{x}$
$*$ , $,$ x˙ $\dot{x}$
+ $+$ ! $!$ xxx^ $\widehat{xxx}$
$-$ ; $;$ x¨ $\ddot{x}$
× $\times$ ? $?$ xˇ $\check{x}$
÷ $\div$ : $\colon$ x¨ $\ddot{x}$
= $=$ x´ $\acute{x}$ x~ $\tilde{x}$
$\neq$ x¯ $\bar{x}$ x^ $\hat{x}$
$\dotsm$ x $\vec{x}$ x $\dddot{x}$
$\dotso$ xxx~ $\widetilde{xxx}$ $\backslash$
/ $/$ $\bracevert$ ] $]$
$\smallsetminus$ $\lVert$ { $\lbrace$
$\arrowvert$ $\rVert$ } $\rbrace$
| | $\lgroup$ $\langle$
| $\lvert$ $\rgroup$ $\rangle$
| $\rvert$ [ $[$ $\lmoustache$
$\rmoustache$ $\lceil$ $\rceil$
$\lfloor$ $\rfloor$

3.3. 希腊字母表

字母 公式 字母 公式 字母 公式
α $\alpha$ β $\beta$ χ $\chi$
δ $\delta$ Δ $\Delta$ ϵ $\epsilon$
η $\eta$ Γ $\Gamma$ ι $\iota$
κ $\kappa$ λ $\lambda$ Λ $\Lambda$
μ $\mu$ $\nabla$ ν $\nu$
ω $\omega$ Ω $\Omega$ ϕ $\phi$
Φ $\Phi$ π $\pi$ Π $\Pi$
ψ $\psi$ Ψ $\Psi$ ρ $\rho$
σ $\sigma$ Σ $\Sigma$ τ $\tau$
θ $\theta$ Θ $\Theta$ υ $\upsilon$
ε $\varepsilon$ ς $\varsigma$ ϑ $\vartheta$
ξ $\xi$ ζ $\zeta$

3.4. 函数公式表

函数 公式 函数 公式 函数 公式
sin $\sin$ sin1 $\sin^{-1}$ inf $\inf$
cos $\cos$ cos1 $\cos^{-1}$ arg $\arg$
tan $\tan$ tan1 $\tan^{-1}$ det $\det$
sinh $\sinh$ sinh1 $\sinh^{-1}$ dim $\dim$
cosh $\cosh$ cosh1 $\cosh^{-1}$ gcd $\gcd$
tanh $\tanh$ tanh1 $\tanh^{-1}$ hom $\hom$
csc $\csc$ exp $\exp$ ker $\ker$
sec $\sec$ lg $\lg$ Pr $\Pr$
cot $\cot$ ln $\ln$ sup $\sup$
coth $\coth$ log $\log$ deg $\deg$
hom $\hom$ loge $\log_{e}$ inj lim $\injlim$
arcsin $\arcsin$ log10 $\log_{10}$ lim $\varinjlim$
arccos $\arccos$ lim $\lim$ lim $\varprojlim$
det $\det$ lim inf $\liminf$ lim_ $\varliminf$
arctan $\arctan$ lim sup $\limsup$ proj lim $\projlim$
arccsc $\textrm{arccsc}$ max $\max$ lim¯ $\varlimsup$
arcsec $\textrm{arcsec}$ min $\min$
arccot $\textrm{arccot}$ $\infty$

3.5. 特殊符号-箭头系列

箭头 公式 箭头 公式 箭头 公式
$\uparrow$ $\longleftarrow$ $\downdownarrows$
$\downarrow$ $\longrightarrow$ $\upuparrows$
$\updownarrow$ $\rightarrow$ $\rightharpoondown$
$\Uparrow$ $\leftarrow$ $\downharpoonleft$
$\Downarrow$ $\mapsto$ $\rightharpoonup$
$\Leftarrow$ $\nrightarrow$ $\downharpoonright$
$\Rightarrow$ $\nleftarrow$ $\upharpoonleft$
$\Leftrightarrow$ $\rightrightarrows$ $\upharpoonright$
$\nLeftrightarrow$ $\leftleftarrows$ $\leftharpoondown$
$\nLeftarrow$ $\rightleftarrows$ $\leftharpoonup$
$\nRightarrow$ $\leftrightarrows$ $\hookleftarrow$
$\Updownarrow$ $\curvearrowleft$ $\hookrightarrow$
$\circlearrowleft$ $\curvearrowright$ $\rightleftharpoons$
$\circlearrowright$ $\Longleftarrow$ $\leftrightharpoons$
$\Lleftarrow$ $\Longrightarrow$ $\looparrowleft$
$\Rrightarrow$ $\longleftrightarrow$ $\looparrowright$
$\nwarrow$ $\Longleftrightarrow$ $\rightsquigarrow$
$\swarrow$ $\longmapsto$ $\Lsh$
$\searrow$ $\rightarrowtail$ $\Rsh$
$\nearrow$ $\leftarrowtail$ $\multimap$
$\twoheadleftarrow$ $\twoheadrightarrow$ $\leftrightsquigarrow$
$\leftrightarrow$ $\nleftrightarrow$

4. 逆天常用

逆天用到就添加进去(不定期更新)根据上面有的,这些其实都可以自己写出来的

4.1. 二次方程求解

$$y = {ax^2+bx+c}$$

$$x={\frac{-b \pm \sqrt{b^2-4ac}}{2a}}$$ or $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$

4.2. 矩阵系列

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

4.3. 方程组

左侧花括号

    \begin{equation}
    % \begin{equation*} 加'*'去掉公式编号
    \left\{
    \begin{aligned}     %请使用'aligned'或'align*'
    2x + y  &= 1  \\     %加'&'指定对齐位置
    2x + 2y &= 2
    \end{aligned}
    \right.
    \end{equation}
    % \end{equation*}   加'*'去掉公式编号

    % 注意:在 markdown 环境下,某些特殊字符,如'\', '*'等,
    %      会首先被 markdown 语法转义,然后再被 Latex 转义。
    % 因此有时候 '\{'需要写作'\\{','*'需要写作'\*','\\'需要写作'\\\\'等,
    %      视不同的解释环境而定

:如果各个方程需要在某个字符处对齐(如等号对齐),只需在所有要对齐的字符前加上 & 符号。如果不需要公式编号,只需在宏包名称后加上 * 号。

分情况讨论方程式

f(x) =
\begin{cases}
x^2 \qquad & a \gt 0   \\
e^x \qquad & a \le 0
\end{cases}