decktalk init my-lesson so that the runtime and the
stylesheet are in place.
1
Write the section in script.md
Each
## N. Title heading starts a section. Text in square brackets is a stage
direction. It is not spoken, and it leaves a short pause where it sat. Write numbers
and symbols as you want them said, because cue phrases match spoken words.script.md
2
Declare the section in decktalk.toml
Every script section needs one
[[section]] table with the same number. A section
is either a page, which DeckTalk records and cuts, or a clip, which is your own video.
The scene value is what the page receives as ?scene=, and it defaults to the
section number.decktalk.toml
3
Name the moments in cues.json
A cue pairs a cue id with the spoken phrase it lands on. Matching takes the first
occurrence, ignores case, and ignores punctuation. The values Run
$start and $end are
the edges of the section’s speech, offset shifts the moment in seconds, and
occurrence picks a later repeat of the same words.cues.json
decktalk beats at any time to see where each phrase resolved. A phrase that is
not in the section’s words is reported as phrase not found, and build stops there
until you fix it or pass --allow-unresolved.4
Build the slide in deck/index.html
A page registers one scene per section. A scene is a list of steps, and each step
renders some HTML. A cue belongs to the step with the same id, or to the step whose
The
cues names it, or to the step whose id is the longest prefix of the cue id. Here the
step is 3.1, so 3.1draw and 3.1eq belong to it, and the elements marked
data-cue stay hidden until their cue fires.deck/index.html
cues object on the step gives autoplay times, which the page uses when you open
it in a browser without beats. During a recording the beats replace them. The
data-fx attribute picks the reveal animation, and data-tex typesets the text with
KaTeX when KaTeX is on the page. The page contract lists
every attribute.5
Look before you build
Open
deck/index.html?step=3.1 in a browser to see the step with everything revealed,
or ?scene=3 to watch it autoplay. Then take screenshots of every step, and of the
scene at a given second with its real cues.6
Build and verify
The naming chain
Next
Add a second section by repeating the steps with a new number. Add a clip of your own withclip = "media/intro.mp4" in a section table and a matching heading in the script.
Then read Sound to add an underscore and a sound effect.