I have a bookdown project, and all of a sudden I'm getting a lot of Undefined control sequence errors.
Here's one knitr code chunk that breaks:
```{r rstudio, fig.cap='RStudio', out.width='80%', fig.align='center', echo=F}
knitr::include_graphics("pics/rstudio.png")
```
Trying to build the entire project shows me a snippet of the latex .log file:
! Undefined control sequence.
l.340 {\centering \includegraphics
[width=0.8\linewidth]{pics/rstudio}
Here's the corresponding latex code in the .tex file:
\begin{figure}
{\centering \includegraphics[width=0.8\linewidth]{pics/rstudio}
}
\caption{RStudio}\label{fig:rstudio}
\end{figure}
No idea what the deal is here. The latex code looks fine to me.
The only thing I've changed recently is I've added more code chunk arguments. Why doesn't knitr like these code chunk arguments?