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:
Test example #2:
---
output: powerpoint_presentation
---
## Math test
This is a test $a=2$
Output:
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.
You can create a new *. pptx file from the PowerPoint menu File -> New with your desired template, save the new file, and use it as the reference document (template) through the reference_doc option. Pandoc will read the styles in the template and apply them to the PowerPoint presentation to be created from R Markdown.
Commonly used markup languages include Markdown, ReStructuredText, HTML, LaTex, ePub, and Microsoft Word DOCX. In plain English, Pandoc allows you to convert a bunch of files from one markup language into another one. Typical examples include converting a Markdown file into a presentation, LaTeX, PDF, or even ePub.
Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With