A caption stays on the page until replaced or cleared with
pz_annotate_clear(id = "caption"). It persists
through navigation and across recordings, and appears on stills. In a
recording, a caption fades out when it is cleared or replaced; one that
is still showing at pz_record_stop() stays on through the last frame.
Usage
pz_annotate_caption(
ctx,
text,
...,
side = NULL,
color = "white",
font_family = NULL,
font_size = 20
)Arguments
- ctx
A paparazzi context.
- text
Nonempty caption text. Newlines are preserved.
- ...
Checked empty.
- side
Placement:
"top"or"bottom"(the default).NULL(the default) uses the stagedcaption_sidefrompz_stage_annotate()(initially"bottom").- color
Text color; defaults to
"white", independent of the staged annotation accent.- font_family
CSS font family.
NULLuses the page'sfont_familysetting inpz_stage_annotate()(initially sans-serif). A font object staged withpz_stage_fonts()is also accepted and resolves to its family with a sans-serif fallback.- font_size
Font size in CSS pixels; defaults to 20, independent of the annotation badge size. Captions scale with the output.
