Quarkdown: Presentations from Markdown — Slides, Fragments, Speaker Notes

Part 7 of the Quarkdown series: how .qd source becomes an interactive reveal.js presentation — with slide breaks, animated fragments and speaker notes.

by ·

The same source that was a scientific paper a moment ago (part 6) becomes a presentation with one changed line. .doctype {slides} switches to the slides format, which builds internally on reveal.js — and suddenly you're giving talks from pure Markdown. This part shows what comes with it: slide breaks, interactive fragments and speaker notes.

Separating slides

A presentation is a sequence of slides — and in slides mode slide breaks only happen explicitly. Two ways lead there. Either a line of at least three <:

Slide 1

<<<

Slide 2

… or the .pagebreak function. Important: the <<< marker needs blank lines before and after, otherwise it stays text (the same block logic as the layout in part 4).

Often more elegant is the automatic break via headings. .autopagebreak maxdepth:{n} sets the heading level up to which a break is triggered:

.autopagebreak maxdepth:{2}

## Every H2 starts a new slide

That way you structure the talk through the outline alone — new heading, new slide. By the way: .pagebreak and .autopagebreak work the same in paged documents; in the slides context "page" is simply "slide".

Configuring the presentation

.slides overrides the defaults — all parameters optional:

.slides transition:{fade} speed:{fast} controls:{yes}

You control vertical centering (center), the navigation controls (controls), the transition style (transition: none, fade, slide, zoom), the transition speed (speed) and whether speaker notes also appear outside the speaker view (speakernotes).

Fragments: reveal step by step

What makes a presentation come alive are fragments — content that appears or disappears only on click. .fragment turns a block into such an interactive element:

.fragment
    This point appears only when you click on.

Via behavior you set the behavior: show (default — starts invisible, fades in), hide (starts visible, fades out), semihide (fades to 50%) and showhide (fades in, then out on the next click). Multiple fragments on one slide trigger in order — ideal for developing an argument step by step instead of overwhelming the audience with the whole slide at once.

Speaker notes

For the talk itself there's .speakernote — notes only you see:

.speakernote
    Remember the anecdote from the last project here.

By default they only appear in the speaker view, which you open in the HTML presentation with the S key (that requires a running web server). If you want the notes also in the regular view or the exported PDF, enable .slides speakernotes:{yes}.

From talk to PDF

A presentation can be exported as PDF too — and Quarkdown does it thoughtfully: each slide becomes its own page, and each fragment state as well. A slide with three sequentially appearing points yields four PDF pages capturing the build step by step. That keeps the dramaturgy intact even in the handout.

FAQ

Can I turn an existing document into a presentation?

In principle yes — you set .doctype {slides} and define slide breaks. In practice it pays to tighten content for the slide format, because a slide takes far less text than a page. But the source stays the same file.

How much reveal.js do I see as an author?

Little to none. Quarkdown encapsulates reveal.js behind .slides, .fragment and .speakernote. You write Markdown; the interactive HTML presentation is produced at compile time.

Do I strictly need a server for the speaker view?

For reveal.js's S speaker view, yes — it runs through the built-in web server. If you want the notes without a server (e.g. in the PDF), you use .slides speakernotes:{yes} instead.

Further reading

The paginated counterpart for paper is covered by part 6: Academic Writing. Next we leave the content layer and look at the tooling: CLI, PDF export, live preview and deployment — the path from source to finished artifact. The full slides reference is in the official wiki.