Using Pandoc with Org Mode to Generate PowerPoint Slides



Telling pandoc How the Resulting pptx File Shall Look

Pandoc has two main mechanisms to influence the look of the result document:

The difference seems to be that templates can also have content that will be copied to the output document, whereas reference documents only provide "styles" that will influence the look of the output document.

By default, pandoc looks for the files /home/user/.local/share/pandoc/reference.docx or /home/user/.local/share/pandoc/reference.pptx as reference document. However, if you provide a --reference-doc=file command line argument, pandoc will look for file in the "resource-path" and use file as the reference document instead. The resource-path is the working directory by default. You can give an absolute path as file. There is also the possibility to specify the resource-path.

Options to Run the Conversion


Structure of the Presentation

Localised Master Slide Names Need To Be Renamed 1/2

Localised Master Slide Names Need To Be Renamed 2/2

Showing Source Code or Similar Content


Images - Shape Types

Images - Scaling

Images - Captions and Links to Images

Images - Limitations

Slide Footer

The PowerPoint output contains the footer information as given in the PowerPoint template file:

Covered Functionality


Two factors determine, what PowerPoint functionality can be used from org mode via pandoc conversion:

  1. What PowerPoint functionality is accessible from pandoc
  2. What pandoc functionality is accessible from org mode

Regards the PowerPoint output format, the pandoc documentation elaborates about

Markdown and Org Mode

Because of this, my first attempt to scope the supported functionality was to convert the provided markdown example to org mode using pandoc.

What about Generating DOCX Files?

Generating Microsoft Word docx files using pandoc follows the same mechanics as outlined above for pptx.

However I noticed the following issue (pandoc version 3.1.8):

The same org file referencing an SVG graphics would be processed by pandoc OK and properly show the graphics in the resulting pptx. However for docx, pandoc would show a warning:

Could not convert image process file.svg:
check that rsvg-convert is in the path.

When opening with MS Word 2016, the resulting docx file did show the graphics. But when opened with LibreOffice Writer version, the graphics did not show, rather an empty frame with some place holder grapics.

rsvg-convert is a command line utility to convert SVG to PNG. In Debian Bookworm, it is contained in package librsvg2-bin.

On the other hand, this LibreOffice version does support inserted SVG graphics.

Last change: 2024-06-01
© 2002-2024 Dr. Thomas Redelberger redetho(a‍t)

Close menu