Slides with Markdown

An Introduction to Marp

Marp — Markdown Presentation Ecosystem

fulgidus.github.io

What is Marp?

  • Markdown-based slide deck framework
  • Write slides in plain text
  • Export to HTML, PDF, and PPTX
  • Built-in themes and customization
  • Open source ecosystem

Why Marp?

Feature PowerPoint Google Slides Marp
Version control ❌ ❌ ✅
Plain text ❌ ❌ ✅
CLI export ❌ ❌ ✅
Collaboration ⚠️ ✅ ✅
Offline ✅ ❌ ✅

Getting Started

A Marp file is just Markdown with a special frontmatter:

---
marp: true
theme: default
paginate: true
---

Each slide is separated by --- (horizontal rule).

Text Formatting

You can use all standard Markdown:

  • Bold text and italic text
  • inline code and code blocks
  • Links
  • Lists (like this one!)

Blockquotes work too, and they look great in presentations.

Code Blocks

function greet(name: string): string {
  return `Hello, ${name}!`;
}

// Marp renders syntax-highlighted code
console.log(greet("TorinoJS"));

Syntax highlighting is built-in for all major languages.

Directives

Marp supports directives for fine-grained control:

<!-- _backgroundColor: #1e1e1e -->
<!-- _color: white -->
<!-- _paginate: false -->

Prefixed with _ for local (current slide only),
or without prefix for global (all subsequent slides).

Dark Slide Example

This slide uses the .invert class from our custom theme:

  • Matches the site's dark mode palette
  • Background: #0d1117, Text: #bbbbbb

Directives give you per-slide customization without leaving Markdown.

Images

Standard Markdown image syntax:

![width:500px](./image.png)

Marp adds image filters:

  • ![width:300px] — set width
  • ![height:200px] — set height
  • ![bg] — background image
  • ![bg right:40%] — split layout

Math Support

Marp supports LaTeX math via KaTeX:

Inline:

Block:

Presenter Notes

Add notes that only you can see:

<!-- This is a presenter note -->

Notes appear in presenter view but not in the slides.

Export Formats

Marp can export to multiple formats:

  • 📄 HTML — self-contained web page
  • 📋 PDF — for printing and sharing
  • 📊 PPTX — for PowerPoint users
  • 📝 Markdown — the original source

All built at compile time, no runtime dependencies.

Custom Theme Classes

The site theme includes special slide classes:

  • lead — centered title slides
  • invert — dark mode palette
  • highlight — brand accent background (like this slide!)

Use <!-- _class: className --> to apply.

Thank You!

Try Marp today — write your next presentation in Markdown.

🔗 marp.app
📦 github.com/marp-team

Made with ❤️ and Markdown

This is an actual presenter note! Only visible in presenter mode.