Change font size in HTML5 using only knitr

I use knitr to create HTML5 slides and use the following codes:

 library(knitr) knit("file.Rmd") pandoc("file.md", format="dzslides") 

However, the font sizes (for plain text and R-codes) are larger, so I hope to make them smaller. I know there is a way to use slidify to convert a .Rmd file to HTML5, but I'm wondering if there is an easier way to do the setup with knitr ? For some reason, I don't want to use slidify yet.

I am currently putting the following codes at the end of my .Rmd file:

 <!--pandoc s: S: i: mathjax: --> 
+7
html5 knitr slidify
source share
1 answer

I have a dirty way to solve this problem: just use raw HTML5 in your RMD document and it always works.

Check How to change font size in html? and just determine the font size in the user cartridge at the beginning of your RMD files.

 <style> p { color: red; } .paragraph { font-size: 18px; } </style> 

Then use <p class="paragraph">Paragraph A</p> in your files.

I know that this method actually discards the markdown minuses. However, when the default path closes the door, the only path can go to the unprocessed one.

0
source share

All Articles