Animations
Animations
A good slide reveals itself at the pace of your talk. Tachyonn gives you two
commands to make content appear or disappear on a click — and they
wrap any content, not just bullet points.
The two commands
| Syntax | What it does |
|---|---|
>[n]{ content } | the content enters on click n |
<[n]{ content } | the content is visible at first and leaves on click n |
>[a-b]{ content } | enters on click a, leaves on click b |
>[]{ …several lines… } | automatic: each child reveals one per click, starting at 1 |
Whatever you put between the braces is ordinary .tac — a sentence, an image,
a code block, a list, a whole highlight box.
The braces may span several lines.
## How a reaction works
>[1]{First, the reactants collide.}
>[2]{Then a transition state forms.}
>[3]{![<c> products.png, Finally, the products appear]}
>[4]{
###<alert> Watch out
The intermediate is never isolated.
}-, * and + are only list markers now — there is no implicit
animation. You always say explicitly what moves and when.
The layout doesn't move
By default, a hidden reveal still occupies its space. The slide is laid out
once, for its final state — the state after the last click — and every click
only fades content in or out inside that fixed frame.
This is the property that makes a deck predictable to present. Put a code block
above three paragraphs that appear one at a time:
## How the loop works
```python
for x in items:
total += x
```
>[1]{Each item is added to the running total.}
>[2]{The loop ends when the list is exhausted.}
>[3]{`total` now holds the sum.}The code box is drawn at the size and position it will have on click 3, and it
stays there. It does not shrink a little each time a paragraph shows up, and
a vertically centered ### box does not creep upwards as the slide fills in.
What your audience sees at click 0 is exactly where everything will be.
The same holds inside a bullet — it always did:
- >[1]{appears on click 1}
- >[2]{appears on click 2}
- here from the startAll three bullets are there from the start; only the text fades in.
If you want the old push behaviour
Sometimes growing the slide is the effect you want — a list that visibly
builds itself, an outline that unfolds. Set reveal: push and a hidden
block-level reveal collapses to zero height again, so the content below slides
up to fill the gap:
===
title: My deck
reveal: push // reserve (default) | push
===| Value | Behaviour |
|---|---|
reserve (default) | The hidden block keeps its space. Nothing moves or resizes between clicks. |
push | The hidden block collapses. Revealing it pushes the content below down. |
Synonyms: space, fixed, stable, static, keep all mean reserve;insert, flow, collapse, shift all mean push. The key also acceptsrevealMode / clickMode as names.
Like every style key, it works at three levels: in a tac.config for a whole
folder of decks, in the deck frontmatter, or in a per-slide === block — so you
can keep the predictable default everywhere and ask for push on the one slide
where the growing list is the point.
Why this is the default
reserve also means auto-fit — the mechanism that silently shrinks a slide's
text until it fits — measures the slide once, against its final content.
With push, every click changed the
content height, auto-fit re-measured, and a large element — a code block, an
image — was re-scaled on each click. Reserving the space removes that whole
class of surprise.
Removing and swapping
<[n]{…} keeps the content on screen until click n, then hides it. Put a
removal and an insertion on the same number to swap one thing for another
in a single click:
<[2]{The naive formula}
>[2]{The corrected formula}To make the same element come and go, use a range:
>[1-3]{Only visible between clicks 1 and 3.}Revealing a list automatically
Numbering ten bullets by hand is tedious. >[] with empty brackets reveals
each child in order, one per click, starting at click 1:
>[]{
- First point
- Second point
- Third point
}This automatic mode only applies to bullets and paragraphs — the two block
types that make sense to walk through one at a time.
Presenter mode
In presenter mode, the next click is always one
step away — animations and slide changes share the same arrow keys, so you
never break your rhythm.
The right-hand panel shows the next state, not the next slide: while the
current slide still has clicks pending it previews that slide one click ahead
— so you can see what is about to appear before you press the key — and its
label says Próximo clique (2/3). Once the slide runs out of clicks the panel
switches to the next slide and reads Próximo slide.