[英]knitr: Using subscript with fig.cap in Markdown
How do I go about including subscript in a figure caption when using {r fig.cap=""}
?使用
{r fig.cap=""}
时,我如何 go 关于在图形标题中包含下标?
Mock.Rmd file:模拟.Rmd 文件:
---
output:
pdf_document:
fig_caption: yes
---
```{r setup, include = FALSE}
library(knitr)
```{r fig.cap = "CO2 Concentration", echo = FALSE}
plot(rnorm(100))
I would like to get the 2 in CO2 in subscript.我想在下标中获得 2 in CO2。 Is
fig.cap
the best way, or is something better? fig.cap
是最好的方法,还是更好的方法?
You could use standard Markdown syntax您可以使用标准Markdown 语法
---
output:
pdf_document:
fig_caption: yes
---
This is ^superscript^
This is ~subscript~
```{r fig.cap = 'CO~2~ Concentration', echo = FALSE}
plot(rnorm(100))
```
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.