How do I change the font in my RMarkdown2 presentation?
Rmarkdown presentation
When using the ioslides
rmarkdown presentation , I think the only way to change the font family is to provide custom CSS. Therefore, you should add the following to your preamble:
output:
ioslides_presentation:
css: style.css
And then create a file style.css
in the presentation directory with something like this:
* {font-family: Helvetica !important}
RStudio R presentation
With RStudio R presentations as described here:
https://support.rstudio.com/hc/en-us/articles/200532307-Customizing-Fonts-and-Appearance
You can specify the parameter font-family
in the preamble of your file rmarkdown
. Something like that:
Presentation title
========================================
author: My name
font-family: 'Helvetica'
This will define the font family for the entire document. If you only want to customize some of the elements, such as headers, you will need to create and add a custom CSS file.
source to share