on
Presentations with Markdown
Normally, I reach for LibreOffice or Google slides when I need to create a presentation. But when my slide deck include code or terminal commands, I often have to spend a bit of time formatting, and I find this frustrating.
I’ve been looking for an alternative - something that would allow me to just focus on the content, and do all of the formatting automatically. I also need the ability to export to PDF, PowerPoint and HTML.
Marp
I found a nice package called Marp, that turns a markdown file into nice looking presentation without too much fuss. Best of all, it has a great VSCode extension that allows you to preview your slides in real time.
VSCode extension
Search for marp
in the extensions library in VSCode and install it
Once installed, create a markdown file for the presentation (ensure the file has the .md extension) and add your slide content in markdown format:
---
marp: true
theme: gaia
color: black
paginate: true
headingDivider:
- 1
---
# Lorem ipsum
A short presentation about lorem ipsum
# What is Lorem ipsum
- In publishing and graphic design, Lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document or a typeface without relying on meaningful content.
- Lorem ipsum may be used as a placeholder before final copy is available.
# Lorem Gnome App

# Install via FlatHub
One click install from software library or via terminal
```cmd
flatpak install flathub org.gnome.design.Lorem
Here’s how it looks in VSCode:
To enable the live preview of the slides, click the preview button (top right)
and the live preview is displayed
What I like about this approach, is that I haven’t had to play around with code..
I simply add my content in markdown, and as long as I have the extension installed, and the front matter contains marp: true
I can create my presentations.
Of course, you can customise the look and feel of the presentation with a theme, or write your own using CSS, but I don’t need that. I just need a way to quickly convert a text document into a presentation that looks good on a big screen.
Exporting
Review the extension preferences to set your output format - the default is PDF
I changed it to HTML and returned to the presentation markdown file.
Launch the command palette (Ctrl + SHift + P) and type marp export
You’ll be prompted on where you want to save your presentation and after a few seconds your presentation is ready to review in the browser.
Done!
Marp is just one of many markdown to presentation applications. For more control I recommend exploring pandoc, the universal document converter.