typstage

0.2.0

Animated HTML presentations from a single Typst file, and a PDF handout from the same source. Typst typesets, the browser moves: magic-move morphing, step-by-step reveals, slide transitions, media and a speaker view in the same file.

When nothing happens#

The traps, in roughly the order they are usually hit.

No HTML export
--features html is missing. The export is experimental in Typst, not in this package.
The deck is empty but for the title
the two notations have been mixed. Either write = … and == …, or hand slide(...) calls to presentation. A slide(...) inside the body of a show rule makes no slide and no error either.
The first paragraph is missing
content before the first heading belongs to no slide. Text there stops the compile — see “Text that belongs to no slide”. An image there goes without a word.
The slide titles ignore a #set heading
the #set comes after the show rule, so the titles are already outside its reach. style: reaches them.
#pause does nothing
it sits in a grid cell or a table, and there is no body there to split. anim goes anywhere content goes.
A transition or an entrance is refused by name
the package does not know it. The message names every effect there is.
The bullets beside an applet start at step three
embed uses no step, but something before it did. Count the reveals, not the elements.
The build warns “document did not converge”
look for a context that stands around a reveal and hands it what it read, as in #context anim[#bridge-targets().len()]. The reveal then holds an answer that may still change from one layout run to the next, instead of a question that never does. Put the context inside: #anim(context
bridge-targets().len())
. In the tour deck that took two warnings to none.
A flying equation has the wrong font
a tracked element is typeset in a frame of its own, which #set does not reach. style: on presentation does.
An embedded frame stays empty and gets no jobs
the document has not announced itself with postMessage({typstage: 1, ready: 1}).
An applet frame stays empty
the applet comes from geogebra.org. Without a network, point codebase at a local copy.
A ggb-run command has no effect
it is one of GeoGebra’s scripting commands, which evalCommand does not accept. Use ggb-set, ggb-style, ggb-show or ggb-hide instead.
The build stops naming two applets
two frames on one slide and no target. Nothing is guessed.
The applet’s colours change after paging back
GeoGebra takes the next colour of its palette on a rebuild. Fix the colour on "1-".
A circle in the applet is an ellipse
the x range and the y range of ggb-view do not match the shape of the box.
A tween does not play
it sits on step 1, where tweens are set to their target instead of played, or it was given a range instead of a step number.
Two sliders lie on top of one another
for a slider made with Slider, position counts in pixels, not in coordinates.
A point cannot be dragged in the speaker view
it was made with Point(k, 0.3) and is pinned to that parameter.
An embedded frame is right on the laptop and tiny on the projector
its content is sized in px instead of em. Inside a zoomed frame one CSS pixel is one point of the slide.
“constructing a document is only supported in the bundle target”
the file uses bundle and therefore needs --format bundle.
The speaker view does not open
window.open needs a real keypress; a script cannot stand in for it.