$$ 在 Rstudio 降价文档中做什么?

What does $$ do in Rstudio markdown document?

我不小心在我的 Rstudio markdown 文档的 markdown 部分的某处输入了 $$,发现所有下游 markdown 编码都已关闭。我花了一段时间才将问题追溯到显示为深红色的 $$

我的问题是 $$ 有什么作用?我查看了降价文档,但没有找到对 $$.

的任何引用

$$ 是数学标记。参见 relevant section in the pandoc manual. Everything written between two $$ markup will be interpreted as tex math (here is some documentation)。请注意,您也可以使用单个 $ 符号。 $$ 将生成一个块元素(一个段落),而 $ 将生成一个内联元素。因此,$$ 通常用于方程式。

例如尝试:

Here is an inline formula: $\frac{\alpha}{n}$ that shows...

Here is a standalone equation: $$x \approx \frac{\alpha}{n}$$