Troubleshooting PowerPoint Output


To create PowerPoint presentations with RStudio:

  • Install the preview release of RStudio
  • Install the latest version of rmarkdown from CRAN

Click here for a list of examples. Submit PowerPoint issues at rmarkdown/issues.

Why does my PowerPoint presentation not open properly?


  • PowerPoint found a problem with content in presentation.pptx. PowerPoint can attempt to repair the presentation. If you trust the source of this presentation, click to repair.


  • PowerPoint Couldn't read some content in presentation - Repaired and removed it. Please check your presentation to see if the rest of it looks ok.


  • PowerPoint Presentation (.pptx)



  • If you see any of these warnings you should restart PowerPoint.
  • You may also need to adjust your R Markdown syntax. Pandoc expects empty lines between elements (i.e. headers, content, notes, etc.). If you don't put empty lines between elements, your presentation may break.


# Title

Some content

::: notes
Some notes


# Title
Some content
::: notes
Some notes

How do I put an image and text on the same slide?

Images and tables will always be placed on new slides, therefore text will render on a separate slide by default. If you want to add text to an image on the same slide you have two options.

Use captions

  • If you are using an image from file you can use create a caption with: ![caption](foo.png).
  • If you are using a Markdown table you can create a caption one line below the table with: Table: caption.
  • If you are generating an image or table from an R code chunk you can create a caption with the option: {r, echo=FALSE, fig.cap="caption"}. Note: setting echo=FALSE allows the header and image to appear on the same slide.

Use columns

  • You can use the the Two Content layout to put content in side by side columns. For example, you can put text in one column and an image in another column.

How do I control the placement of images and text?

Pandoc ships with a default PowerPoint template that controls the placement of elements. You cannot position elements on a slide with R code. If you want to control the placement of images or text, you should use a custom template and modify one of the four layouts supported by Pandoc.

Place text below an image

  • If you want text to appear above an image, modify the Two Content layout so that the two columns are on top of each other instead of side by side.

How do I control the size of an image?

Pandoc automatically resizes images to fit the placeholder. Currently it is not possible to programmatically change the image size relative to the placeholder. 

How do I create a build slide?

Build slides are useful if you don’t want to show all of the elements of a PowerPoint slide at once. Pandoc uses incremental lists in other presentation formats to control the flow of elements. Unfortunately, incremental lists are not currently supported in Pandoc's PowerPoint output.

How do I render my presentation programmatically?

The RStudio IDE gives you convenient features to create PowerPoint presentations, but sometimes you might want to render presentations programmatically. For example, you might automate a job to render a presentation on daily or weekly schedule. If you want to render a presentation from the R console, you can use: rmarkdown::render("foo.Rmd").

How do I check my markdown code?

Rendering an R Markdown document into an output format can be thought of in two distinct steps:

  1. Translate the R Markdown document (that may contain R code) into a Markdown document that no longer depends on R. This step is facilitated by the rmarkdown and knitr packages.
  2. Translate the Markdown document into the desired output format (e.g. PowerPoint, Word, HTML, PDF, etc.). This step is facilitated by Pandoc.

The markdown file is an important intermediary between your R Markdown and output files. If you want to see your markdown file, you can set clean=FALSE in the rendering process: rmarkdown::render("foo.Rmd", clean=FALSE).

How do I structure my presentation?

You can structure your presentation with section and content slides using a hierarchy of markdown headers. The slide level is the header level that creates content slides from the Title and Content or Two Content layouts. Your R Markdown document is carved up into slides according to the following rules. See Rendering PowerPoint Presentations with RStudio for details.

What version of RStudio should I use?

Rendering markdown documents to PowerPoint requires Pandoc v2.0.5+. If you want to render R Markdown documents to PowerPoint, you will also need rmarkdown 1.9+. To check which version of Pandoc is used by RStudio submit: rmarkdown::pandoc_version().

We recommend that you upgrade to RStudio 1.2+ which bundles Pandox 2.x and helps you easily create PowerPoint presentations. You can also publish PowerPoint presentations to RStudio Connect 1.6.4+.