7

I am using knitr to generate HTML5 slides, and use the following codes:

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

However, the font sizes (for normal text and R codes) are larger so I hope to make them smaller. I know there is a way of using slidify to convert .Rmd file to HTML5, but I wonder if there is an easier way to make the adjustment only using knitr? For some reason, I don't want to use slidify for now.

Currently I put the following codes at the end of my .Rmd file:

<!--pandoc
s:
S:
i:
mathjax:
-->

1 Answer 1

0

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

Check How to change font size in html? and just define your font size in a custom chuck 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 this method actually discard the cons of markdown. However, when the default way has close the door, the only path might go to the raw.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.