如何在Markdown中用LaTeX写数学公式
如何在Markdown中用LaTeX写数学公式
环境:在Typora用Markdown写LaTeX,注意打开下面的偏好设置:
Markdown中插入LaTeX公式
-
Inline mode(行间公式)
这是一个行间公式 $y = x^2$
-
Display mode(独立公式)
$$
y = x^2
$$
LaTeX基础语法
其他:
-
希腊字母
举个栗子
-
二元一次方程 + 求根公式
二元一次方程:
$$
y = a\cdot x^2 + b\cdot x + c
$$
y=0时,求根公式:
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
-
宏观经济学中的泰勒公式:
$$ \begin{aligned} &\text{Target nominal short-tem interest rate}\\ & = (r_{real} + i_{target}) + 0.5(GDP_{expect} + GDP_{target}) + 0.5(i_{expect} - i_{target}) \end{aligned} $$