在 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 (将#修改为@)