puresuri:   the king of presentations
1 Displaying Puresuri Presentations
2 Core API
slide-w
slide-h
placer/  c
exact-placer
relative-placer
at-placer
go!
lazy-pict/  c
add!
remove!
commit!
clear!
plpict?
transform!
save?
save!
restore!
pipeline/  c
puresuri-pipeline-snoc!
current-slide-number
charcode/  c
puresuri-add-char-handler!
3 Libraries
3.1 Helper Commands
bind!
replace!
slide!
3.2 PLT Title Background
plt-title-background
3.3 Placement Grid
3.4 Slide Numbers
7.7

puresuri: the king of presentations

Jay McCarthy

 (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

    2 Core API

    3 Libraries

      3.1 Helper Commands

      3.2 PLT Title Background

      3.3 Placement Grid

      3.4 Slide Numbers

1 Displaying Puresuri Presentations

The raco puresuri command accepts the path of a file that contains a module that runs Puresuri commands.

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:

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.

The width of a slide.

The height of a slide.

A contract for placers. Equivalent to (-> pict? pict? (values placer/c pict?)). A placer’s job is to put one pict (the second one) on top of another pict (the first) in a particular place and then return a new placer and the super-imposed pict.

procedure

(exact-placer dx dy a)  placer/c

  dx : real?
  dy : real?
  a : align/c
Returns a placer that puts the pict aligned according to a at the spot (dx,dy).

procedure

(relative-placer rx ry a)  placer/c

  rx : real?
  ry : real?
  a : align/c
Returns a placer that puts the pict aligned according to a at the spot ((* rx slide-w),(* ry slide-h)).

procedure

(at-placer t [finder a])  placer/c

  t : (or/c tag-path? pict-path?)
  finder : (-> pict? pict-path? (values real? real?)) = cc-find
  a : align/c = 'cc
Returns a placer that puts the pict aligned according to a at the spot returned by finder called on the base pict and t.

procedure

(go! pl)  void?

  pl : placer/c
Changes the active placer to pl.

A contract for lazy picts. Equivalent to (or/c pict? (-> pict?)).

procedure

(add! p [#:tag tag])  void?

  p : lazy-pict/c
  tag : (or/c #f symbol?) = #f
Adds the pict p to the canvas at the location of the current placer with the tag tag. If p is a thunk, then the current slide has animation.

procedure

(remove! tag)  void?

  tag : symbol?
Removes the pict with the tag tag from the canvas.

procedure

(commit! [#:effect effect])  void?

  effect : (-> any) = void
Begins a new slide that runs effect when it is transistioned to from the left.

procedure

(clear!)  void?

Clears the canvas.

procedure

(plpict? x)  boolean?

  x : any/c
Identifiers picts with embedded placers.

procedure

(transform! t)  void?

  t : (-> plpict? (values plpict? boolean?))
Calls t with the current canvas and replaces the canvas with what t returns. If t is animated, then the boolean return should be #t.

procedure

(save? x)  boolean?

  x : any/c
Identifies save objects.

procedure

(save!)  save?

Returns the current canvas as a save object.

procedure

(restore! s)  void?

  s : save?
Replaces the current canvas with the save object s.

A contract for pipelines. Equivalent to (-> pict? (values pict? boolean?)). If the pipeline is animated, then the boolean return should be #t.

procedure

(puresuri-pipeline-snoc! p)  void?

  p : pipeline/c
Adds p to the pipeline.

The current slide number. This is only set during the evaluation of the pipeline.

A contract for char codes. Equivalent to (or/c char? key-code-symbol?).

procedure

(puresuri-add-char-handler! cc h)  void?

  cc : charcode/c
  h : (-> any)
Adds h as the handler for cc.

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

(bind! t)  void?

  t : (-> pict? pict?)
Calls t with the current canvas and expects it return a new canvas. Does not modify the active placer.

procedure

(replace! t p)  void?

  t : symbol?
  p : lazy-pict/c
Removes the pict with the tag t and adds p over its center.

procedure

(slide! [#:effect effect])  void?

  effect : (-> any) = void
Calls commit! and clear! in sequence.

3.2 PLT Title Background

 (require puresuri/lib/title) package: puresuri

The PLT logo background.

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.