touying-recall
touying-recall(lbl, subslides: auto, base: auto)(source)Recall content by its label.
If the label was registered as a whole-slide recall target — either a
heading that auto-split into its own slide, or an explicit
#slide(...)[...]<label> call — the entire slide is replayed. Otherwise,
this falls back to a query-based lookup: it works for any labeled content (a table, image, or
a heading that sits inside an explicit slide without itself being a
whole-slide target) and even touying-reducer.
For animated content/slide you may pass a subslide index to recall at a specific animation stage.
Note: a whole-slide target must already have been processed (i.e. the
recall must come after it in the document) to be found — forward-
referencing a bare heading that hasn't auto-split into its own slide yet
falls through to the query lookup instead (recalling just the
heading) rather than erroring. An explicit #slide(...)[...]<label> call has the
same forward-reference limitation.
Example:
// Recall all subslides of a whole-slide target (default)
#touying-recall(<my-slide>)
// Recall only a specific subslide
#touying-recall(<my-slide>, subslides: 2)
// Recall only the last (final) subslide
#touying-recall(<my-slide>, subslides: none)
// Recall the last subslide of every waypoint
#touying-recall(<my-slide>, subslides: "waypoints")
// Recall the subslides covered by a waypoint
#touying-recall(<my-slide>, subslides: <my-waypoint>)
// Recall only the last subslide of a waypoint
#touying-recall(<my-slide>, subslides: get-last(<my-waypoint>))
// Recall a labeled reducer at a specific animation stage
#let my-diagram = touying-reducer.with(
reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true), label: <my-diagram>,
)
#touying-recall(<my-diagram>, subslides: 1)
// Recall arbitrary labeled static content (shown as-is)
#touying-recall(<my-table>)
lbl : str | label
The label to recall. Must be a native label (not a string) to recall a reducer or other labeled content that isn't a registered whole-slide target — a string can only match a whole-slide recall.
subslides : none | auto | int | str | label | dictionary default: auto
Which subslide(s) to recall.
For a whole-slide target:
auto(default): recall only the final animation state of an animated element or all subslides of a whole-slide target.none: recall only the last subslide.int: recall a specific subslide by number."waypoints": recall one subslide per waypoint — specifically, the last subslide of each waypoint. This shows every animation phase at its final state.label: recall the subslides covered by a waypoint in the original slide. E.g.subslides: <my-waypoint>.- Waypoint marker:
get-first(<wp>),get-last(<wp>),prev-wp(<wp>),next-wp(<wp>)— resolves to a single subslide or waypoint range using the recalled slide's waypoint map.
For a reducer/labeled-content fallback target, none/auto, int, a
label, and waypoint markers (get-first(<wp>), get-last(<wp>),
etc.) are supported — resolved against the recalled content's own
waypoints, not the original slide's. A waypoint range (a bare label,
or one whose marker doesn't pin a single subslide) collapses to its
last subslide, where its content is fully revealed (get-first(<wp>)
names the first); there's
no equivalent to "waypoints" here since there's only ever one
recalled instance, not a whole slide's worth of subslides to expand
(touying-render supports exactly that, for content addressed by
value instead of by label).
The content itself doesn't have to be touying-reducer — any labeled
content that is animated can be recalled at specific subslide
positions. Passing an explicit subslides value for content with no
subslide dimension at all panics.
base : auto | int default: auto
Starting repetition counter for pause numbering, only used by the reducer/labeled-content fallback (a whole-slide recall replays the original slide's own numbering). When your animated content contains numbered steps you must set this so the animation sequence plays correctly.
auto(default):1.int: explicit offset, e.g.base: 3makes the first pause create subslide 4 instead of 2.
The reducer/labeled-content fallback has no visibility of its own — it's
always shown once the point it's textually placed at is reached (like
ordinary content gated by a #pause), never hiding again on its own.
To make it appear and then disappear across a range of subslides, nest
it inside #uncover(...)/#only(...)/#alternatives[...] — this works
anywhere inside their body, not only when the recall is the entire
body:
#only("2-4")[Some text, #touying-recall(<my-table>, subslides: 2) and more text.]
Returns: content