I am new to Rmarkdown and plan to use ioslides/slidy/xaringan to do my presentation.
I used to use the beamer to do presentations. In the beamer, I have theorem environment which is designed to mathematics theorems. I want to be able to have that kind of format in ioslides/slidy/xaringan. I know I can use $$...$$ to include latex code and can display equation. However, this is not enough to my needs.
I also know in bookdown one can have theorem environment. But I do not know how to do that in the ioslides/slidy/xaringan output format.
This would be too lengthy for a discussion in the comments, so here is an answer. The following defines some styles inspired by the idea in the above-mentioned blog post:
styles.css
To use these styles in rmarkdown presentations you can include them via the YAML header. For ioslides it works like this (works analogously for slidy and xaringan):
ioslides.Rmd (Note that this requires styles.css to be in the same folder as ioslides.Rmd)
You can now create a theorem using a
<div>
element of the classtheorem
:EDIT: Copenhagen style
Recreating beamer styles exactly is cumbersome but with a few CSS tricks you can get close. Here is an example that looks similar to
theme: copenhagen
.