Code box size and font size in RPres

后端 未结 2 1678
自闭症患者
自闭症患者 2021-01-05 01:17

I\'ve worked in the past a good deal with knitr and beamer for slides. One thing I\'m noticing now with R Presentations that dynamic sizing of both the code box and the size

2条回答
  •  有刺的猬
    2021-01-05 01:44

    @Florian's answer didn't work for me. I found a solution here that seems cleaner - credit to Andy Lyons for this fix.

    Define a new style for smaller code at the beginning of the document, then apply it whenever you want the slide to use smaller code.

    Here's an example of how to do it:

    Presentation Title
    ========================================================
    author: Jane Doe
    transition: none
    
    
    
    Slide 1 - large code
    ========================================================
    Regular slide text here
    
    ```{r}
    head(cars)
    ```
    Slide 2 - small code
    ========================================================
    class: small-code
    
    More regular slide text...
    ```{r}
    head(cars)
    ```
    

提交回复
热议问题