# Code chunk background LaTeX

I am having trouble getting the background color of code chunks to change when I knit to PDF. My understanding of the code chunk options is that setting the background option should allow me to specify the background shading for code. However, it does not seem to work. MWE below. In the example I'm trying to set the background globally and locally. Neither seems to make a difference.

---
output:
pdf_document:
keep_tex: true
---

{r}
knitr::opts_chunk\$set(background = c(.1, 0, 0))


{r cars-1}
summary(cars)


{r cars-2, background=c(0,.1,0)}
summary(cars)



(Note that missing backticks in code chunks is deliberate and necessary to post on the site. My actual code has properly delimited chunks.)

The .tex file does not seem to do anything with the background options. From the .tex file, I see:

[LaTeX stuff]

\usepackage{framed}
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.13,0.29,0.53}{\textbf{#1}}}

[more LaTeX stuff]

\begin{Highlighting}[]
\KeywordTok{summary}\NormalTok{(cars)}
\end{Highlighting}
`