R Markdown Beamer Presentation Returning Undefined Control Sequence

Whenever I tried to knit R markdown in beamer presentation format, it keeps on giving me undefined control sequence.

It is fraustrating because it worked fine until yesterday and I have no idea what I changed that causes this error. To show that my code is not the source of the problem, I simply tried to knit an empty page.

code:

---
title: "untitled"
output: beamer_presentation
---

Output:

output file: a.knit.md

! Undefined control sequence.
<argument> ...{subsubsection}\addtobeamertemplate 
                                                  {theorem begin}{\expandaft...
l.322 }{}

My original file returns the exaclty same error message.

I tried:

  1. reinstall LaTeX
  2. reinstall RStudio
  3. upgrade all packages in R

Any idea how to fix this?

4

1 Answer

This was just fixed by @UlrikeFischer. @JosephWright is preparing a new beamer release as we speak, it should be available as beamer v3.67 on ctan tomorrow.

As a temporary workaround, place these two files in the folder of your .rmd file:

(don't forget to delete these files again once you have the new beamer version, otherwise they might interfere with future updates)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

James H. Sterling

James H. Sterling

Environmental Science & Climate Journalist

James Sterling reports on renewable energy developments, climate policy, ecological conservation, and green tech innovations around the globe.

Share this article
Twitter Facebook Pinterest