How do people use RMarkdown for lecture slides?

Are there any people here who use RMarkdown for lecture slides? What do you do?

I've tried using RMarkdown with Beamer output, however this has issues:

  • Not enough space for code and graphics. Often I would have to split the code and graphics over multiple slides since it can't all fit onto one slide. Sometimes I even have to split code over 2 slides. Also, if the R output is long and doesn't fit on one slide, there's no good solution I can see.
  • Syntax highlighting by default uses bright colors, which doesn't read well on projectors. In fact, there seems to be no preprogrammed syntax highlighting with good colors (I want darkish colors for the text and a highlight box for the code). Turning syntax highlighting off has the problem of having no highlight box.

I've also tried RMarkdown with Slidy, and Jupyter Notebook slides. These have the problem of lacking a theorem environment, which beamer has, but it solves the problem of not being able to fit code and graphs on a single slide, since it allows for scrolling in a slide.

Does anyone know of a way to create slides that avoids all of these problems? What do people do for slides in statistics classes that include a mix of math equations, theorems, code and graphics?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

Hi
You can use ioslides or xaringan

It's hard to give a single answer since you have a set of competing requirements!

We've resorted to beamer for our courses that require us to annotate slides during the lecture (and save the annotations). To solve the source-code issue we've learned to control the font size via YAML header and other settings.

For talks (e.g. tutorials) that don't require the PDF format, I personally lean to Slidy, which as you've noted allows for "infinitely long" slides. I really don't know anyone who uses ioslides; why use HTML slides but have the slide sizes limited?

We've also started looking into xaringan, which has good genes but we're just not sure we need the added capabilities for lectures.

1 Like