1

Using bookdown commands in an R markdown presentation with output format "beamer" works fine (see also this SO-post). In the YAML header, one simply has to change from

output:
  beamer_presentation: default
    

to

output:
  bookdown::pdf_book:
    base_format: rmarkdown::beamer_presentation

However, how to use bookdown commands in an R markdown presentation with output format "ioslides"

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
mavericks
  • 1,005
  • 17
  • 42

0 Answers0