Window size and font size in RPres

In the past, I worked with knitr and rays for slides. One thing that I notice right now with R presentations is that the dynamic calibration of both the code and the font size of the code seems to be missing. With knitr / beamer, I could easily change the font size with the size argument (for example, size = "footnote" worked for denser slides), and also changed the code width for my parameter slides (width = ...).

I am struggling with how to do this in the current implementation of R Presentations - any suggestions?

+5
source share
2 answers

For font size, wrapping a piece in

<font size="X"> CHUNK </font> 

worked for me.

+2
source

@ Florian's answer did not help me. I found here that seems cleaner - credit to Andy Lions for this fix.

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

Here is an example of how to do this:

 Presentation Title ======================================================== author: Jane Doe transition: none <style> .small-code pre code { font-size: 1em; } </style> 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) ``` 

enter image description here

enter image description here

0
source

Source: https://habr.com/ru/post/1201597/


All Articles