在Markdown中输入数学公式

Table of Contents

在Markdown中输入数学公式,通常需要使用LaTeX语法,并且需要借助一些支持LaTeX的Markdown解析器,比如MathJax或KaTeX。以下是一些基本的示例:

  1. 行内公式:使用单个$符号包围LaTeX代码。

    $E = mc^2$
  2. 显示公式:使用双$$符号或\[\]包围LaTeX代码。

    $$E = mc^2$$

    或者

    \[ E = mc^2 \]
  3. 分数:使用\frac{分子}{分母}

    $$\frac{a}{b}$$
  4. 根号:使用\sqrt

    $$\sqrt{x}$$
  5. 上标和下标:使用^_

    $$x^2$$
    $$x_i$$
  6. 希腊字母:使用\alpha, \beta, \gamma等。

    $$\alpha$$
    $$\beta$$
  7. 大括号:用于创建多行公式或复杂的公式结构。

    $$\left\{ \begin{array}{c} a = b + c \\ d = e + f \end{array} \right.$$

Comments |0|

Legend *) Required fields are marked
**) You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
Category: 似水流年