# 数学公式

在 Markdown 文档中编辑行内和块级数学公式。

import ContentEditor from '@/components/editor/ContentEditor.astro';

## 编写数学公式

使用一对美元符号表示行内公式，使用两对美元符号表示独立显示的公式。编辑器会保留 LaTeX 源码，并在可视化模式中显示渲染结果。

## 支持的配置

Generic profile 会保留 Markdown 中的数学公式分隔符，并在可视化模式中渲染公式。

```markdown
行内公式：$a^2 + b^2 = c^2$

$$
\int_0^1 x^2 \,dx = \frac{1}{3}
$$
```

## 可视化编辑

在编辑器中试用公式，再切换到源码模式检查原始分隔符。

<ContentEditor content="math" />
