On this page:
34.5.1 Text Formatting
with-size
with-scale
big
small
with-font
with-style
bold
italic
subscript
superscript
caps
34.5.2 Tables
tabular
34.5.3 Multiple Columns
two-columns
mini-slide
columns
column
column-size
34.5.4 Staged Slides
staged
stage
stage-name
slide/ staged
34.5.5 Miscellaneous Slide Utilities
blank-line
Version: 5.2

34.5 Slideshow Presentations

Carl Eastlund <cce@racket-lang.org>

This library is unstable; compatibility will not be maintained. See Unstable: May Change Without Warning for more information.

 (require unstable/gui/slideshow)

This module also exports everything provided by unstable/gui/pict.

34.5.1 Text Formatting

(with-size size expr)
Sets current-font-size to size while running expr.

(with-scale scale expr)
Multiplies current-font-size by scale while running expr.

(big text)
(small text)
Scale current-font-size by 3/2 or 2/3, respectively, while running text.

(with-font font expr)
Sets current-main-font to font while running expr.

(with-style style expr)
Adds style to current-main-font (via cons) while running expr.

(bold text)
(italic text)
(subscript text)
(superscript text)
(caps text)
Adds the attributes for bold, italic, superscript, subscript, or small caps text, respectively, to current-main-font while running text.

34.5.2 Tables

(tabular row    
  ...    
  [#:gap gap    
  #:hgap hgap    
  #:vgap vgap    
  #:align align    
  #:halign halign    
  #:valign valign])  pict?
  row : (listof (or/c string? pict?))
  gap : natural-number/c = gap-size
  hgap : natural-number/c = gap
  vgap : natural-number/c = gap
  align : (->* [] [] #:rest (listof pict?) pict?)
   = lbl-superimpose
  halign : (->* [] [] #:rest (listof pict?) pict?) = align
  valign : (->* [] [] #:rest (listof pict?) pict?) = align
Constructs a table containing the given rows, all of which must be of the same length. Applies t to each string in a row to construct a pict. The hgap, vgap, halign, and valign are used to determine the horizontal and vertical gaps and alignments as in table (except that every row and column is uniform).

34.5.3 Multiple Columns

(two-columns one two)
Constructs a two-column pict using one and two as the two columns. Sets current-para-width appropriately in each column.

(mini-slide pict ...)  pict?
  pict : pict?
Appends each pict vertically with space between them, similarly to the slide function.

(columns pict ...)  pict?
  pict : pict?
Combines each pict horizontally, aligned at the top, with space in between.

(column width body ...)
Sets current-para-width to width during execution of the body expressions.

(column-size n [r])  real?
  n : exact-positive-integer?
  r : real? = (/ n)
Computes the width of one column out of n that takes up a ratio of r of the available space (according to current-para-width).

34.5.4 Staged Slides

(staged [name ...] body ...)
Executes the body terms once for each stage name. The terms may include expressions and mutually recursive definitions. Within the body, each name is bound to a number from 1 to the number of stages in order. Furthermore, during execution stage is bound to the number of the current stage and stage-name is bound to a symbol representing the name of the current stage. By comparing stage to the numeric value of each name, or stage-name to quoted symbols of the form 'name, the user may compute based on the progression of the stages.

These keywords are bound during the execution of staged and should not be used otherwise.

(slide/staged [name ...] arg ...)
Creates a staged slide. Equivalent to (staged [name ...] (slide arg ...)).

Within a staged slide, the boolean arguments to hide, show, strike, and shade can be used to determine in which stages to perform a transformation. The macros pict-if, pict-cond, pict-case, and pict-match may also be used to create images which change naturally between stages.

34.5.5 Miscellaneous Slide Utilities

The subsequent bindings were added by Scott Owens.

Adds a blank line of the current font size’s height.