cdck

Slide decks laid out on a plane

cdck.corbet.ch

The whole deck as a PDF

This is a deck on a two-dimensional plane: the slides are numbered by column and row (x.y). The text below follows column after column; this page needs JavaScript to be walked as a plane.

0.0 cdck

Slide decks laid out on a plane

This slide as a PDF

0.1 Most decks are written by machines

So the source has to be plain

  • Plain source Markdown and TOML, one file per slide
  • Strict layout Nine kinds of slide, one body shape each
  • A compiler that refuses Text that does not fit is an error, never shrunk

This slide as a PDF

0.2 A machine's deck should look typeset

The design principle

A deck written by a machine should look like it was set by a typographer.

Design principle of cdck

This slide as a PDF

1.0 Right is the story, down is the detail

The plane

Walk right for the story.
Walk down for the detail.

The top row is the talk you planned. Each column holds the depth you show only when the room asks for it.

This slide as a PDF

1.1 A move exists only if a slide is there

No jumping over gaps

A slide next door

  • The arrow key takes you there
  • Its title stands on the edge of the frame
  • A swipe or a scroll does the same

Nothing there

  • The move does not exist
  • That edge of the frame stays empty
  • The map shows where the other slides are

This slide as a PDF

1.2 The top row is the story

This deck on its plane

A grid of dots in eight columns. The top row is joined by a line and is the story; the columns below it are the detail.

The red dot is where you start. The author picks the start; coordinates are free integers that cdck shifts so the smallest is zero.

This slide as a PDF

2.0 The frame always says where you are

Four sides, four corners

A slide with its frame: title and subtitle on top, neighbour titles on the left, right and bottom, logo, map, person and occasion, and the position in the corners.

The same frame is drawn around every slide, in every output.

This slide as a PDF

2.1 The sides show where you can go

Three labels, one empty edge

  • Top Title and subtitle of this slide
  • Left and right Titles of the neighbours, set vertically
  • Bottom Title of the slide below
  • An empty edge No slide there, so no label and no move

This slide as a PDF

2.2 The corners say who, where and how far

Four corners

Top

  • Left
    Logo and name of the institution
  • Right
    Map of the plane, a red dot for this slide

Bottom

  • Left
    Person, then occasion
  • Right
    Deck title, remaining moves, position

This slide as a PDF

3.0 A slide is one Markdown file

What an author writes

+++
at = [2, 1]
kind = "bullets"
title = "The sides show where you can go"
subtitle = "Three labels, one empty edge"
+++
- Top
  Title and subtitle of this slide
- Left and right
  Titles of the neighbours, set vertically
- Bottom
  Title of the slide below

Front matter is TOML between two lines of plus signs; the body is Markdown. Speaker notes follow a line of three question marks.

This slide as a PDF

3.1 Nine kinds, one body shape each

What a slide can be

KindIts body
coverTitle and subtitle, no body
statementOne big sentence, then text
bulletsOne list; each item has a head and a detail
quoteOne block quote; the source is in the front matter
twoTwo columns split by a --- line, each with a heading
codeOne code block and a caption
imageOne image and a caption
tableOne table
textParagraphs, lists and display maths

This slide as a PDF

3.2 The folder is the address

Where the files live

cdck.toml              particle and domain
profiles/cdck.toml     institution and logo
talks/cdck/
  deck.toml            title, start, occasion
  slides/*.md          one file per slide
  assets/              images, kept in Git LFS

A deck in talks/a/b/c is published at c.b.a, followed by the particle and domain from cdck.toml.

This slide as a PDF

3.3 A slide that does not fit is an error

What cdck check does

cdck never shrinks text to make it fit. The renderer measures each content area at its fixed size, and overflow is an error that names the slide.

The check also reads:

  • the shape of each slide against its kind
  • images and the logo, which must exist
  • folder names, which must be valid host name labels
  • leftovers such as TODO and {{name}}

cdck check fails on any error and names the file and the position.

This slide as a PDF

4.0 The PDF is the one version to trust

Typst lays out

Only Typst lays out a slide.

The PDF is the reference. Every other output is the same by construction or is checked by machine.

This slide as a PDF

4.1 Every other output follows the PDF

How the pieces fit

Markdown and TOML go into the core, then Typst, then the PDF. The web viewer and the terminal show the PDF pages. PowerPoint is written from the core and compared with the PDF by a round trip.

Web and terminal show pages that Typst laid out. PowerPoint is written from the same model and compared with the PDF.

This slide as a PDF

4.2 The same deck gives the same bytes

What the PDF carries

  • Deterministic Fixed timestamps; the same deck in, the same bytes out
  • Tagged The accessibility tags are kept, and so are title and language
  • The plane inside The positions and moves travel with the file as cdck.json

This slide as a PDF

5.0 Any selection of slides is a deck

Pieces and assemblies

A slide is a piece.

Any row, column, tag or list of pieces becomes a presentation of its own, with its own frame.

This slide as a PDF

5.1 A column becomes a deck of its own

Assembly

The plane of this deck with its fourth column picked out, and next to it a new column of four slides numbered from 0.0 to 0.3.

Column 3 of this deck, assembled. The slides keep their content; positions, counts and map are worked out again.

This slide as a PDF

5.2 The content stays, the frame is new

Piece and assembly

The piece

  • Its content is laid out the same way wherever it appears
  • It remembers where it was written, for file names and links back

The assembly

  • Position, counts, map and neighbour titles are worked out again
  • Positions are compacted, so every move inside it exists
  • It is itself a deck, so every renderer treats it like one

This slide as a PDF

5.3 One flag selects the pieces

Assembling on the command line

cdck pdf talks/cdck --only row:0         # the story row
cdck pdf talks/cdck --only col:3         # one column
cdck pdf talks/cdck --only tag:short     # every slide tagged short
cdck pdf talks/cdck --only 0.0,4.0,5.0   # a list, in the order given

The same selection works for pptx, png, svg and dump. On the site, the download menu builds the same selections in the browser.

This slide as a PDF

6.0 One deck gives four outputs

PDF, web, PowerPoint, terminal

OutputWhat you getHow it relates to the PDF
PDFThe whole deck, or any assemblyIt is the reference
WebA site walked by keys and swipesIt paints the PDF pages
PowerPointEditable text and shapes, not picturesChecked by round trip
TerminalCentred and grid mode, arrow keysShows the same pages as images

This slide as a PDF

6.1 The web paints the PDF pages

The web viewer

Each slide is a one-page PDF, loaded when it is needed. The neighbours are fetched ahead, so every move that exists is already there.

  • Centred mode shows one slide; grid mode zooms out to the plane.
  • Swipes on a phone follow the same strict moves as the keys.
  • The full PDF is the download, the print version and the version for AI readers.
  • Readers that run no scripts get the slide text as plain HTML.

This slide as a PDF

6.2 PowerPoint is derived and checked

Editable, never the reference

Editable

  • Native text and shapes that a person can edit
  • Pictures of slides have no value here
  • The PDF stays the reference

Checked

  • The file is turned back into a PDF
  • Each page is compared with the page Typst laid out
  • The result is a score per slide
  • LibreOffice turns it back today; a check with PowerPoint itself comes later

This slide as a PDF

7.0 Four ideas wait until later

On record, not built

  • Animation Frames of one slide, as in the LaTeX animate manual
  • Video and sound Video areas in the PDF, over a poster that Typst draws
  • Editors A web editor and a desktop app on the same core
  • Presenter view A double press: first the presenter's view moves, then the audience's

This slide as a PDF

7.1 Other canvases take the same pieces

Later

Tall and square

  • A tall edition for upright phones
  • Square or tall editions as social media posts
  • The same pieces on another canvas

Long versions

  • Long written versions of the pieces can form a book
  • A 100-page A5 book is a 10 by 10 plane
  • One chapter per column

This slide as a PDF

7.2 Walk this deck yourself

Three commands

cdck serve talks/cdck
cdck tui talks/cdck
cdck pdf talks/cdck

The first opens the web viewer, the second the terminal viewer, the third writes the whole deck as one PDF.

This slide as a PDF