repair rmarkdown template errors

Viewed 404

I have a project where I'm creating a powerpoint presentation with rmarkdown and knitr. Whenever I knit the presentation and open it, I get this error message.

ppt error

I used pandoc's online tool here to figure out what was wrong with my template, and received the following feedback.

pandoc feedback

How do I make the recommended repairs in the powerpoint? I was able to unzip the pptx using 7z and poke around the xml using vscode, but when I tried zipping it back up again it could not be read by powerpoint.

A minimal example appears below which produces the same errors as my bigger RMD. The template file I am using is one provided by my company. Rmarkdown is using pandoc version 2.11.4 .


    ---
    title: "template_test"
    author: "D. Author"
    date: "6/30/2021"
    output: 
      powerpoint_presentation:
        reference_doc: template.pptx
    ---
    
    ```{r setup, include=FALSE}
    knitr::opts_chunk$set(echo = FALSE)
    
    
    # clean global environment
    rm(list=ls())
    gc()
    
    ```
    
    ## Slide with R Output
    
    ```{r cars, echo = TRUE}
    summary(cars)
    ```
    
    ## Slide with Plot
    
    ```{r pressure}
    plot(pressure)
    ```

Thanks in advance!

1 Answers

I tried changing part of your header by deleting the part corresponding to reference_doc: template.pptx and it generated a Powerpoint with the same name as the RMarkdown. I don't know if this is the solution you are looking for. I understand that the versions of Rmarkdown and Pandoc are superior to the ones indicated here.

The header would look like this:

---
title: "template_test"
author: "D. Author"
date: "6/30/2021"
output: powerpoint_presentation
---
Related