I am using RStudio Presentation and I'd like to change the font size for the main elements (e.g.: header, bullet, and sub bullet). I was able to add a style sheet to my rmd file but I do not know what to change in the css file. I have tried changing the font size in various places in the css file but nothing worked.
## Slide with Bullets
- Bullet 1
+ Sub bullet
- Bullet 2
- Bullet 3
Then, you can further adjust the font of code window, console, terminal, environment, and history panels via Tools >> Global Options >> Appearance >> Editor font size.
Go to the menu in RStudio and click on Tools and then Global Options. Select the Appearance tab on the left. Again buried in the middle of things is the font size. Change this to 14 or 16 to start with and see what it looks like.
To change the font size, you don't need to know a lot of html for this. Open the html output with notepad ++. Control F search for "font-size". You should see a section with font sizes for the headers (h1, h2, h3,...).
The default style sheet for rstudio presentations is here
You can of course have a style sheet, but you can also change the settings on the fly like below.
Untitled
========================================================
Slide title
========================================================
<style>
/* slide titles */
.reveal h3 {
font-size: 100px;
color: blue;
}
/* heading for slides with two hashes ## */
.reveal .slides section .slideContent h2 {
font-size: 40px;
font-weight: bold;
color: green;
}
/* ordered and unordered list styles */
.reveal ul,
.reveal ol {
font-size: 50px;
color: red;
list-style-type: square;
}
</style>
## Slide with Bullets
- Bullet 1
+ Sub bullet
- Bullet 2
- Bullet 3
Gives me this
The #
, ##
, ###
, etc correspond to h1
, h2
, h3
, etc. Apparently the h3
goes with the slide titles. It is also important to put the .reveal
in front of each item if you are changing the rstudio stylesheet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With