I want to insert a picture at the beginning of text using a code block, not markdown. I am using the Tufte handout template output: rmarkdown::tufte_handout and when I insert it straight after the YAML header but before TOC like this:
\centering

\raggedright
\tableofcontents
\clearpage
the image then spans the main body. I know that with chunks there is an option to have the chunk to span the whole page placing fig.fullwidth = TRUE in the chunk header, but I am a bit stuck with this as I am not generating any graph from data and I do not know how to simpy place an image from within a chunk.
Another matter was that when I set toc: true in the YAML header, the image would only come after the inserted toc - that is why I am inserting toc with the latex command.
Thank you for your suggestions.
When a figure is not generated from R code, you may use knitr::include_graphics() to insert it to the document, e.g.
```{r echo=FALSE, out.width='100%'}
knitr::include_graphics('./cropped-banner_efpt.jpg')
```
来源:https://stackoverflow.com/questions/36350213/how-to-insert-plain-picture-jpeg-png-from-chunk-with-knitr