latexmarkdownpandocequationmath-mode

Pandoc, markdown, powerpoint: support for equations?


Pandoc can now generate powerpoint presentations from markdown. This seems to work quite well.

However, when I try to include an equation – even something as simple as $a=2$ – the whole contents of the slide disappears. Is this a bug or a feature? Can you include equations in PowerPoint presentations? I was hoping that I would be finally able to write my lectures (which need to be in powerpoint because of reasons) using TeX math syntax in a plain text file.

EDIT:

The command to convert the markdown document saved in the file test.rmd was

render("test.rmd")

Minimal example #1:

---
output: powerpoint_presentation
---

## Math test

This is a test (no maths)

Output:

enter image description here

Test example #2:

---
output: powerpoint_presentation
---

## Math test

This is a test $a=2$

Output:

enter image description here

Versions:

> rmarkdown::pandoc_version()
[1] ‘2.7.1’
> packageVersion("rmarkdown")
[1] ‘1.10’

MS PowerPoint 2007. Note that if Word output is chosen, the formula appears as expected.


Solution

  • The problem seems to be with PowerPoint. From what you found, and from what I can tell from searching the web, is seems safe to say that PowerPoint 2007 does not have full support for Microsoft's OMML math format (although Word 2007 does have support).

    Unfortunately, inserting inline PNGs through pandoc is not possible with PowerPoint, so inserting formulas rendered as PNG won't work either. The only option would be to insert equation images as figures, but that would limit you to one equation per slide (or two when used with columns).