How do I go about including subscript in a figure caption when using {r fig.cap=""}
?
Mock .Rmd file:
---
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. Is fig.cap
the best way, or is something better?
You could use standard Markdown syntax
---
output:
pdf_document:
fig_caption: yes
---
This is ^superscript^
This is ~subscript~
```{r fig.cap = 'CO~2~ Concentration', echo = FALSE}
plot(rnorm(100))
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With