creating accompanying slides for bookdown project

别说谁变了你拦得住时间么 提交于 2019-12-01 19:24:45

The error was due to the fact that rmarkdown::beamer_presentation() does not have the argument number_sections (you cannot number sections in beamer; at least Pandoc doesn't seem to support it).

To get around this issue, you may use the following hack, which basically defines a base format that throws away the number_sections argument:

---
title: "Using bookdown with Beamer"
output:
  bookdown::pdf_book:
    base_format: "function(..., number_sections) rmarkdown::beamer_presentation(...)"
    number_sections: false
---

## Plot

See Figure \@ref(fig:foo).

```{r, foo, fig.cap='Hi there', fig.height=4}
plot(1:10)
```
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!