I'm preparing a pdf document with rmarkdown. I'd like to know whether there is a way to change the code output's background color, so that the output is more distinguishable from other texts.
My current solution only changes the color of the code chunk itself. Thanks!
---
title: "Untitled"
output:
pdf_document:
highlight: default
header-includes: \usepackage{xcolor}
---
\definecolor{shadecolor}{RGB}{225, 225, 225}
Plain text.
```{r}
a <- c(1,2,3,4,5)
b <- c(1,2,3,4,5)
df <- data.frame(a, b)
# take a look at our data frame
df
```
Plain text.