knitr:在 Markdown 中使用带有 fig.cap 的下标

时间:2021-04-24 04:15:51

标签: r r-markdown knitr

使用 random.choice([0, 1]) 时如何在图形标题中包含下标?

模拟 .Rmd 文件:

{r fig.cap=""}
---
output:
  pdf_document:
    fig_caption: yes
---

```{r setup, include = FALSE}
library(knitr)

我想在下标中得到 CO2 中的 2。 ```{r fig.cap = "CO2 Concentration", echo = FALSE} plot(rnorm(100)) 是最好的方法,还是更好的方法?

1 个答案:

答案 0 :(得分:6)

您可以使用标准的 Markdown syntax

export PATH=/opt/lampp/bin:${PATH}
export PATH

enter image description here

相关问题