use_excalidraw_slides() copies the
excalidraw Quarto extension into a folder and adds a demo
deck:
The deck uses format: excalidraw-revealjs, which
brings:
excalidraw: paper: in the YAML for dots,
graph, lines, kraft,
blueprint or chalkboard paper;[Remember to smile]{.sticky-note} (also
.blue, .pink, .green);::: {.sketch-box} (add
data-fill="#a5d8ff" for a hachure fill);[word]{.rn-underline},
.rn-circle, .rn-box,
.rn-highlight, .rn-strike,
.rn-cross, .rn-bracket. Add
.fragment to draw a mark on click.In R chunks, print sketch() objects or
plot() scenes. Use background = FALSE to let
the paper show through.
sketch(p, background = FALSE)
as_excalidraw(p) |> exc_note("look!", x = "suv", y = 50) |> plot(background = FALSE)Print the rendered deck to PDF (one slide per page) with headless Chrome:
exc_pptx() writes one slide per chart, scene, or
Excalidraw frame. Drawings are placed as editable vector shapes:
Text is drawn as shapes by default so it looks right on any computer.
For editable text, use text = "font" and install the fonts
where PowerPoint can find them:
A scene made of Excalidraw frames becomes a deck with one slide per frame, titled with the frame names, so you can lay out slides on an Excalidraw canvas and export them.