如何在Markdown中用LaTeX写数学公式

如何在Markdown中用LaTeX写数学公式

环境:在Typora用Markdown写LaTeX,注意打开下面的偏好设置:

image-20210227181715493

Markdown中插入LaTeX公式

  • Inline mode(行间公式)

    这是一个行间公式 $y = x^2$

  • Display mode(独立公式)

$$
y = x^2
$$

LaTeX基础语法

image-20210227185926673

image-20210227185944967

image-20210227190219314

image-20210227190007389

其他:

  • 希腊字母

    在这里插入图片描述

举个栗子

  • 二元一次方程 + 求根公式

    二元一次方程:
    $$
    y = a\cdot x^2 + b\cdot x + c
    $$

image-20210227190048577

y=0时,求根公式:
$$
x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$$
image-20210227190219314

  • 宏观经济学中的泰勒公式:

    $$
    \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}
    $$
    

image-20210227190202122

参考链接

posted @ 2021-02-27 23:13  hawking8su  阅读(203)  评论(0)    收藏  举报