Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 307
January Avatar asked Mar 27 '19 09:03

January


People also ask

How do you make a PowerPoint in R markdown?

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.

Can pandoc convert PDF to 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.

Can pandoc convert HTML to markdown?

Pandoc can convert between numerous markup and word processing formats, including, but not limited to, various flavors of Markdown, HTML, LaTeX and Word docx.


1 Answers

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).

like image 139
tarleb Avatar answered Oct 18 '22 00:10

tarleb