jeisenman19
jeisenman19

Reputation: 45

R Markdown: Creating Backgrounds for Powerpoints

I'm using R markdown to create a presentation, and I would really like to add a custom background on my opening slide and second slide. Currently, I have my potential themes on a separate PowerPoint document. Is there any way to add backgrounds like that?

Thanks!

Upvotes: 0

Views: 714

Answers (1)

tpetzoldt
tpetzoldt

Reputation: 5813

To add a custom background, one can create a powerpoint template, e.g. my-styles.pptx where the background image is placed at the slide master.

Then create an Rmarkdown file like follows and place it in the same folder:

---
title: "Fancy Slides"
author: "Creative Author"
date: "2021-06-09"
output: 
  powerpoint_presentation:
    reference_doc: my-styles.pptx
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```

## Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

## Slide with R Output

```{r cars, echo = TRUE}
summary(cars)
```

More about this can be found in Yihui Xie et al. (2021) R Markdown: The Definitive Guide, Section 4.4.

Tested with RStudio Version 1.4.1714 and Powerpoint 2016.

Upvotes: 0

Related Questions