R markdown font size

Viewed 41

I am trying to customize the font size of my Rmarkdown in both body text and headers. I would like to specify that I'm using an Html output format and a theme from prettydoc package. Therefore, I tried, as suggested in the forum, to use a css file but it seems that it does not work.

Here's how I set the output: output:

prettydoc::html_pretty:
theme: cayman
highlight: github
toc: true
css: style.css

And here the code I wrote to define the font size of the document, in a file called style.css:

<style type="text/css">

body, td {
   font-size: 14px;
}
code.r{
  font-size: 12px;
}
pre {
  font-size: 12px
}
</style>

Does anyone know why the code doesn’t seem to work? Thanks in advance!

0 Answers
Related