On this page:
slide
t
it
bt
bit
tt
rt
titlet
para
item
subitem
clickback
interactive
size-in-pixels
pict->pre-render-pict
make-outline
comment
comment?

2.1 Primary Slide Functions🔗

procedure

(slide [#:title title    
  #:name name    
  #:aspect aspect    
  #:layout layout    
  #:gap-size sep-gap-size    
  #:inset inset    
  #:timeout secs    
  #:condense? condense?]    
  element ...)  void?
  title : (or/c #f string? pict?) = #f
  name : (or/c #f string?) = title
  aspect : aspect? = #f
  layout : (or/c 'auto 'center 'top 'tall) = 'auto
  sep-gap-size : real? = (current-gap-size)
  inset : slide-inset? = (make-slide-inset 0 0 0 0)
  secs : (or/c #f real?) = #f
  condense? : any/c = (and secs #t)
  element : 
(flat-rec-contract elem/c
  (or/c pict-convertible?
       'next 'next! 'alts 'alts~ 'nothing
       comment?
       (listof (listof elem/c))))
Creates and registers a slide. See Staging Slides for information about elements. Multiple element picts are separated by sep-gap-size vertical space.

When this function is first called in non-printing mode, then the viewer window is opened. Furthermore, each call to the function yields, so that the viewer window can be refreshed, and so the user can step through slides. If the user closes the slide window, then slide triggers an error unless set-allow-new-slides-after-close! was called with a true value before the window was closed.

If title is not #f, then a title is shown for the slide. The name is used in the slide-navigation dialog, and it defaults to title.

If layout is 'top, then the content is top-aligned, with (* 2 sep-gap-size) space between the title and the content. The 'tall layout is similar, but with only sep-gap-size space. The 'center mode centers the content (ignoring space consumed by the title). The 'auto mode is like 'center, except when title is non-#f and when the space between the title and content would be less than (* 2 sep-gap-size), in which case it behaves like 'top.

The inset argument supplies an inset that makes the slide-viewing window smaller when showing the slide. See make-slide-inset for more information.

If secs argument for #:timeout is not #f, then the viewer automatically advances from this slide to the next after secs seconds, and manual advancing skips this slide.

If condense? is true, then in condense mode (as specified by the -c command-line flag), the slide is not created and registered.

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(t str)  pict?

  str : string?
The normal way to make plain text. Returns (text str (current-main-font) (current-font-size)).

procedure

(it str)  pict?

  str : string?
The normal way to make italic text. Returns (text str (cons 'italic (current-main-font)) (current-font-size)).

procedure

(bt str)  pict?

  str : string?
The normal way to make bold text. Returns (text str (cons 'bold (current-main-font)) (current-font-size)).

procedure

(bit str)  pict?

  str : string?
Bold-italic text. Returns (text str (list* 'bold 'italic (current-main-font)) (current-font-size)).

procedure

(tt str)  pict?

  str : string?
The normal way to make monospaced text. Returns (text str (current-tt-font) (or (current-tt-font-size) (current-font-size))).

Changed in version 1.9 of package slideshow-lib: Generalized to use current-tt-font and current-tt-font-size

procedure

(rt str)  pict?

  str : string?
The normal way to make serif text. Returns (text str 'roman (current-font-size)).

procedure

(titlet str)  pict?

  str : string?
Creates title text. Returns ((current-titlet) str).

procedure

(para [#:aspect aspect    
  #:width width    
  #:align align    
  #:fill? fill?    
  #:decode? decode?]    
  element ...)  pict?
  aspect : aspect? = #f
  width : real? = ((get-current-para-width #:aspect aspect))
  align : (or/c 'left 'center 'right) = 'left
  fill? : any/c = #t
  decode? : any/c = #t
  element : 
(flat-rec-contract elem/c
  (or/c string? pict? (listof elem/c)))
Generates a paragraph pict that is no wider than width units, and that is exactly width units if fill? is true. If fill? is #f, then the result pict is as wide as the widest line.

Each list within elements is spliced into the sequence of string and pict elements. If decode? is true, then strings among the elements are decoded by performing the following substitutions: ---, --, ``, '', '. In addition, to better work with at-exp notation, if an element is "\n", then it is dropped along with any spaces at the start of the next element.

Strings are split at spaces for word-wrapping to fit the page, and a space is added between elements. If a string element starts with one of the following punctuation marks (after decoding), however, no space is added before the string:

   - ' , .   : ; ? ! )

The align argument specifies how to align lines within the paragraph.

See the spacing between lines is determined by the current-line-sep parameter.

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(item [#:aspect aspect    
  #:width width    
  #:gap-size sep-gap-size    
  #:bullet blt    
  #:align align    
  #:fill? fill?    
  #:decode? decode?]    
  element ...)  pict?
  aspect : aspect? = #f
  width : real? = ((get-current-para-width #:aspect aspect))
  sep-gap-size : real? = (current-gap-size)
  blt : pict? = (scale bullet (/ sep-gap-size gap-size))
  align : (or/c 'left 'center 'right) = 'left
  fill? : any/c = #t
  decode? : any/c = #t
  element : 
(flat-rec-contract elem/c
  (or/c string? pict? (listof elem/c)))
Like para, but with blt followed by (/ sep-gap-size 2) space appended horizontally to the resulting paragraph, aligned with the top line. The paragraph width of blt plus (/ sep-gap-size 2) is subtracted from the maximum width of the paragraph.

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(subitem [#:aspect aspect    
  #:width width    
  #:gap-size sep-gap-size    
  #:bullet blt    
  #:align align    
  #:fill? fill?    
  #:decode? decode?]    
  element ...)  pict?
  aspect : aspect? = #f
  width : real? = ((get-current-para-width #:aspect aspect))
  sep-gap-size : real? = (current-gap-size)
  blt : pict? = (scale o-bullet (/ sep-gap-size gap-size))
  align : (or/c 'left 'center 'right) = 'left
  fill? : any/c = #t
  decode? : any/c = #t
  element : 
(flat-rec-contract elem/c
  (or/c string? pict? (listof elem/c)))
Like item, but an additional (* 2 sep-gap-size) is subtracted from the paragraph width and added as space to the left of the pict. Also, o-bullet is the default bullet, instead of bullet.

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(clickback pict thunk)  pict?

  pict : pict?
  thunk : (-> any)
Creates a pict that embeds the given one, and is the same size as the given pict, but that when clicked during a presentation calls thunk.

procedure

(interactive pict proc)  pict?

  pict : pict?
  proc : (frame% . -> . (-> any))
Creates a pict that embeds the given one, but that creates a floating frame at the pict’s location on the screen during a presentation. After the floating frame is created (and before it is shown), proc is applied to the frame. The result from proc must be a procedure that is called when the window is removed (because the slide changes, for example).

procedure

(size-in-pixels pict [#:aspect aspect])  pict?

  pict : pict?
  aspect : aspect? = #f
Scales pict so that it is displayed on the screen as (pict-width pict) pixels wide and (pict-height pict) pixels tall. The result is pict when using a 1024 by 768 display with a fullscreen aspect or when using a 1360 by 766 display with a widescreen aspect.

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(pict->pre-render-pict pict)  pict?

  pict : pict?
Produces a pict that is like pict, but optimized for drawing on some platforms (currently Mac OS). This function may be useful to reduce drawing times for for large bitmaps or complex drawings.

Added in version 1.1 of package slideshow-lib.

procedure

(make-outline name    
  title    
  subitems ...    
  [#:aspect aspect])  (symbol? . -> . void?)
  name : (or/c symbol? (listof symbol?))
  title : (or/c string? pict?)
  subitems : 
(or/c #f null?
      (symbol? . -> . pict?))
  aspect : aspect? = #f
Returns a function that takes a symbol and generates an outline slide.

The ... above applies to all three arguments together. Each trio of arguments defines a section for the outline:

Changed in version 1.5 of package slideshow-lib: Added the #:aspect argument.

procedure

(comment text ...)  comment?

  text : (or/c string? pict?)
Combines strings and picts to be used as a slide element for (usually hidden) commentary. Use the result as an argument to slide.

procedure

(comment? v)  boolean?

  v : any/c
Returns #t if v is a comment produced by comment.