Creating R Markdown Custom PowerPoint Templates

RStudio Forum

I am attempting to creat a R Markdown PowerPoint Presentation using my own Template but I'm getting the following error:

output file: R_Scripting.knit.md
pandoc.exe: NGA_16_9_Template.potx: openBinaryFile: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1
Execution halted

In PowerPoint I created a .pptx and save it to my Custom Office Templates (.potx). Then created a black R Markdown PowerPoint file.

title: "My Title"
author: "My Name"
date: "3/8/2021"
output:
powerpoint_presentation:
reference_doc: My_Template.potx

But not sure if "reference_doc" should be *.pptx or *.potx. Either way it errors out. Does that command know to pull from my custom templates. Can this even be performed?

Jeff
I

Try using .pptx.

What version is your rmarkdown? 1.9 or higher is required.

I have done this with Word templates and have saved the files as normal Word rather than a template. I have just changed the heading styles and all of the other parameters.

RStudio: version 1.4.1103
R version: version 4.0.3
R Markdown: version 2.7

I think I know what the problem is . Apparently the powerpoint slide template (*.pptx not *.potx) needs to reside in the same directory of the *.Rmd file. I also think my template maybe a bit to complicated as RStudio doesn't seem to like it.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

The powerpoint template is processed by Pandoc. It needs by default to reside in the same directory. (or in Pandoc user's data dir). You can specify another directory using --data-dir command switch: Pandoc - Pandoc User’s Guide

This could be passed to Pandoc using a pandoc_args argument in output format, or using a default file (Pandoc - Pandoc User’s Guide)

This is a bit advanced but in case you need it, it can work.