Slides with Cantrip

Jennifer

One Markdown file in, a browser slideshow and a PDF out.

November 2026, by @mplx.
Based on Jennifer 0.26.0 and Cantrip 0.4.0

Powered by Jennifer's Cantrip - Markdown into slide decks, https://github.com/jennifer-language/cantrip
1 / 17

One file in, two files out

$ cantrip build talk.md -v
wrote talk.html (4 slide(s), 31831 bytes)
wrote talk.pdf (4 slide(s), 3199 bytes)
2 / 17

Install and run

jvc app install https://github.com/jennifer-language/cantrip
cantrip build talk.md

Or from a checkout, no build step:

git clone https://github.com/jennifer-language/cantrip
./cantrip/bin/cantrip build talk.md

Needs Jennifer 0.26.0 or newer; no net, exec or sql, so it runs on jennifer-tiny too.

3 / 17

Slides are separated by three dashes

# The first slide

Some text.

---

## The second slide

- a point
- another point
4 / 17

Front matter sets up the deck

---
title: Three good habits
author: mplx
theme: nordic
mode: dark
ratio: 16:9
transition: slide
---

Also: date, description, subject, keywords, lang, notes, slide, overview.

5 / 17

Speaker notes

## Commit small

- one change per commit

<!-- notes: small commits are easy to review and easy to revert -->
6 / 17

Themes and modes

$ cantrip html talk.md --theme nosuch
cantrip: unknown theme "nosuch"; known: plain, solar, contrast, carbon, ...
7 / 17

Ratios and transitions

RatioSlideshowPDF page
16:9 (default)1280 x 720 px960 x 540 pt
16:101280 x 800 px960 x 600 pt
4:31024 x 768 px792 x 594 pt

Transitions: fade (default), slide, zoom, none

8 / 17

Code blocks

```jennifer
use io;

io.printf("{1 / 0}\n");
```
9 / 17

Pictures

![The first page of the report](report.png)
10 / 17

More than bullet points

11 / 17

Presenting

KeyDoes
Space n PageDownnext slide
p PageUpprevious slide
digits, then Enterjump to a slide
ooverview
s / m / fnotes / mode / fullscreen
?all shortcuts

The slide number is in the URL: talk.html#4; ?notes=1 opens the notes.

12 / 17

The PDF

A slide in the PDF, built with theme nordic and mode dark

Built with theme: nordic and mode: dark: the PDF still prints light.

13 / 17

When a slide is too full

$ cantrip pdf long.md
wrote long.pdf (4 slide(s))
cantrip: warning: 4 slide(s) took 5 pages; 1 extra page(s) mean at least one slide overflowed

$ cantrip info talk.md
Three good habits: 4 slide(s), 2 with notes
   1 * Three good habits
   2 * Commit small
   3   Read the error
   4   Ask early
14 / 17

The command line

cantrip html talk.md --no-notes -o public/talk.html  # audience
cantrip pdf talk.md --notes -o talk-presenter.pdf    # you
cantrip build talk.md --theme contrast --ratio 4:3   # projector
cantrip build intro.md part2.md -o dist/talk         # one deck
cantrip themes

Exit code 2: the command line was wrong. 1: the deck could not be built.

15 / 17

How the academy uses Cantrip

jennifer run tools/check.j talks/mplx/cantrip-slides
16 / 17

Read more

Based on Jennifer 0.26.0, November 2026.

17 / 17