From .tex, .docx, or .pptx to Markdown

(and back again)

Markdown is a lightweight syntax

  • In contrast to LaTeX, you type less funny business.
  • In contrast to Microsoft Office, everything is plain text1 โ€” no buttons or formatting issues across machines.

Markdown math is \(\approxeq \LaTeX\)

MathJax is similar to LaTeX but more accessible.

Inline: $\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}$

Inline: \(\sum_{i=0}^n i^2 = \frac{(n^2+n)(2n+1)}{6}\)

Pandoc converts file types ๐Ÿช„๐ŸŽฉ๐Ÿ‡

e.g., from .docx or .tex to markdown

(and back again)

Docx syllabus to markdown

  1. In terminal: pandoc -t markdown -o syllabus.md syllabus.docx
  2. Change โ€œ.mdโ€ to โ€œ.qmdโ€
  3. Add a YAML header at the top:
---
title: Syllabus
format:
 html: default
 pdf: default # Delete this line if you don't want a PDF version rendered via LaTeX
 ---

(Or copy the header from syllabus.qmd)

LaTeX syllabus to markdown

  1. In terminal: pandoc -t markdown -o syllabus.md syllabus.tex
  2. Change โ€œ.mdโ€ to โ€œ.qmdโ€
  3. Add a YAML header at the top:
---
title: Syllabus
format:
 html: default
 pdf: default # Delete this line if you don't want a PDF version rendered via LaTeX
 docx: default # Do you really want a docx version, too? ๐Ÿคจ
---

(Or copy the header from syllabus.qmd)

Beamer to markdown

  1. In terminal: pandoc -t markdown -o slides.md slides.tex
  2. Change โ€œ.mdโ€ to โ€œ.qmdโ€
  3. Add a YAML header at the top:
---
title: My Slides
format:
  revealjs: 
    slide-number: true
---

(Or copy the file that made these slides, pandoc.qmd)

Tip

Pandoc can also do the reverse, of course. And thus, Quarto can render to beamer, too.

format:
  beamer:
    keep-tex: true