如何解决在 ioslides 演示文稿中使用 bookdown 命令
在带有 output format "beamer" works fine 的 R markdown 演示文稿中使用 bookdown
命令(另见 this SO-post)。
在 YAML 标头中,只需从
output:
beamer_presentation: default
到
output:
bookdown::pdf_book:
base_format: rmarkdown::beamer_presentation
但是,如何在输出格式为“ioslides”的 R markdown 演示文稿中使用 bookdown
命令
MWE:
---
title: "ioslides_presentation with bookdown commands"
output:
ioslides_presentation: default
# Not working:
# bookdown::pdf_book:
# base_format: rmarkdown::ioslides_presentation
---
# Set of slides
```{r setup,include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## Slide with bookdown cross references
- figure: \@ref(fig:plot)
- Table: \@ref(tab:table)
- Slide without ref: \@ref(some-slide)
- Slide with ref: \@ref(slide-with-ref)
## Slide with Plot
```{r plot,fig.cap='Plot caption'}
plot(pressure)
```
## Slide with Table
```{r table}
knitr::kable(head(mtcars[,1:3]),caption = "Table caption")
```
## Some Slide
Some text
## Another Slide {#slide-with-ref}
Some more text
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。