Code Chunk size in R Presentation

rstudio
rpres

#1

I have created a presentation in R Studio and wish to show all of my code and output. However, the code boxes and output boxes are too large and do not fit entirely on the slide.

Is there a way that I can decrease the size of both the code and output boxes?

Thanks in advance.


#2

You can write your own CSS file to adjust the font size of pre.sourceCode blocks. Something like this:

# mystyles.css
pre.sourceCode {
    font-size: 8px;
}

Then include it in the YAML header as css: "path/to/mystyles.css".

My go-to reference for CSS: https://developer.mozilla.org/en-US/docs/Web/CSS.