puresuri: the king of presentations
(require puresuri) | package: puresuri |
Puresuri (pronounced: プレスリ) is a re-imagining of slideshow as an imperative canvas that is incrementally drawn on and explored during presentations.
1 Displaying Puresuri Presentations
The raco puresuri command accepts the path of a file that contains a module that runs Puresuri commands.
--pngs ‹png-dir› —
Renders the slideshow statically into a directory of PNG files specified by ‹png-dir›. --pdf ‹pdf-p› —
Renders the slideshow statically as PDF file specified by ‹pdf-p› path.
This command will monitor the path of the file and if it changes, reload the slide and resume from the current slide.
A Puresuri slideshow is created by running a sequence of commands. Commands add (add!) and remove (remove!) picts to the canvas. Commands also mark intermediate points in the command stream as a slide (commit!) such that the Puresuri user interface requires a button press to continue on to the next slide.
Puresuri tracks picts added to the canvas with tags, which are symbols. If remove! is called with a tag that is on the canvas, then that pict will be removed.
Puresuri can save the state of the canvas with the save! command into a save object and then restore it later with the restore! command. This is useful for creating a template slide and reusing it throughout the presentation without having to create a function for creating that template.
Puresuri supports animation through picts wrapped in thunks. If the canvas contains any of these lazy-pict/c structures, then Puresuri will update the display reguarly.
Whenever Puresuri is about to display the current canvas, it calls the current pipeline with the canvas pict. The functions in the pipeline (which can be adjusted with puresuri-pipeline-snoc!) can modify the pict in arbitrary ways before it is displayed. This is how puresuri/lib/slide-numbers adds a slide number to the bottom-right corner.
The Puresuri user interface supports the following key bindings:
q, ESC —
Quit the presentation. SPACE, RIGHT —
Advance to the next slide. LEFT —
Revert to the previous slide. i —
Go to the beginning or end of the presentation.
Puresuri presentations can extend this set of key bindings by creating a handler with puresuri-add-char-handler!.
2 Core API
This section documents Puresuri commands.
procedure
(exact-placer dx dy a) → placer/c
dx : real? dy : real? a : align/c
procedure
(relative-placer rx ry a) → placer/c
rx : real? ry : real? a : align/c
procedure
t : (or/c tag-path? pict-path?) finder : (-> pict? pict-path? (values real? real?)) = cc-find a : align/c = 'cc
value
procedure
p : lazy-pict/c tag : (or/c #f symbol?) = #f
value
procedure
(puresuri-pipeline-snoc! p) → void?
p : pipeline/c
value
procedure
(puresuri-add-char-handler! cc h) → void?
cc : charcode/c h : (-> any)
3 Libraries
The core of Puresuri is designed to be tight and flexible so that other features may be added as libraries. Please submit pull requests with useful additions!
3.1 Helper Commands
(require puresuri/lib/cmds) | package: puresuri |
procedure
t : symbol? p : lazy-pict/c
3.2 PLT Title Background
(require puresuri/lib/title) | package: puresuri |
value
3.3 Placement Grid
(require puresuri/lib/grid) | package: puresuri |
Adds a pipeline and handler that cooperate so that when g is pressed, a grid appears on the slide to help slide authors place picts.
3.4 Slide Numbers
(require puresuri/lib/slide-numbers) | package: puresuri |
Adds a pipeline that shows the slide number in the bottom right-hand corner of the slide.