On this page:
Slide  Content
slide
slide_  pict
slide.next
slide.sync
slide.alts
slide.align
slide.horiz
slide.left
slide.center
slide.right
current_  assembler
current_  title_  font
titlet
titlely
nonarchival
Slide  Layout
Slide  Layout.auto
Slide  Layout.center
Slide  Layout.top
Slide  Layout.tall
interactive
is_  printing
is_  condensing
start_  at_  recent
retract_  recent
8.12

2 Creating Slides🔗ℹ

annotation

SlideContent

Satisfied by allowed arguments to slide: a pict, slide.next, slide.sync, a value produced by slide.alts, slide.align, or slide.horiz, or a list of values that satisfy SlideContent.

function

fun slide(~title: title :: maybe(String || Pict) = #false,

          ~name: name = title,

          ~layout: layout :: SlideLayout = #'auto,

          ~sep: sep :: Real = slide.gap,

          ~horiz: horiz_align :: HorizAlignment = #'center,

          ~lead_in: lead_in = #false,

          content :: SlideContent, ...) :: Void

Registers one or more slides. In the sample case, each content produces a pict, and the picts are combined with stack and a separation of sep and the horizontal alignment horiz_align. A slide is produced for each epoch in the resulting pict’s duration, and extra transitions slides are registered for epochs that have a non-0 extent. If lead_in is true, then slides are also registered for the transition from epoch -1.

The title and layout arguments are used to combine content picts via the current_assembler parameter’s value.

Besides immediate picts, the content values can produce descriptions of slides to construct using lists, slide.next, slide.sync, slide.alts, slide.align, and slide.horiz (or one of its shorthands: slide.left, slide.center, or slide.right):

See Using Slideshow in Rhombus for an introduction to this slide staging and alignment sublanguage.

When a pict representing a slide has the #'nonarchival key mapped to a true value in its metadata for some epoch, then the slide for that epoch is skipped in condense mode—as are any slides for transitions in the epoch. See also nonarchival.

function

fun slide_pict(~title: title :: maybe(String || Pict) = #false,

               ~layout: layout :: SlideLayout = #'auto,

               ~sep: sep :: Real = slide.gap,

               ~horiz: horiz_align :: HorizAlignment = #'center,

               ~full: full = title && #true,

               content :: SlideContent, ...) :: Pict

Like pict, except that the result is a pict (potentially with a multi-epoch duration) instead of registering a slide.

If full is true, then the resulting pict reperesents a slide including its title as combined via current_assembler. Otherwise, current_assembler is not used, and the resulting pict is just the result of combining the content values.

value

def slide.next

 

value

def slide.sync

 

function

fun slide.alts([content :: SlideContent, ...], ...)

 

function

fun slide.align(~sep: sep :: Real || matching(#'inherit) = #'inherit,

                ~horiz: horiz :: pict.HorizAlignment = #'left,

                content :: SlideContent, ...)

 

function

fun slide.horiz(~sep: sep :: Real || matching(#'inherit) = #'inherit,

                ~horiz: horiz :: pict.HorizAlignment = #'left,

                content :: SlideContent, ...)

 

function

fun slide.left(~sep: sep :: Real || matching(#'inherit) = #'inherit,

               content :: SlideContent, ...)

 

function

fun slide.center(~sep: sep :: Real || matching(#'inherit) = #'inherit,

                 content, ...)

 

function

fun slide.right(~sep: sep :: Real || matching(#'inherit) = #'inherit,

                content :: SlideContent, ...)

Constructors for slide descriptions hat are recognized by slide and slide_pict. See slide for more information.

The slide.left, slide.center, and slide.right functions are shorthands for slide.horiz with a specific ~horiz argument.

A context parameter for a function used to combine a slide title, layout mode, and content pict. The title can be a pict or #false, and the layout mode is a value that satifies SlideLayout.

The default slide assembler vertically combines a title with the pict content using slide.gap space for the #'tall layout and 2*slide.gap space for the #'top layout. In #'center mode, the content pict is centered with respect to the full slide client area, and then the title is combined with overlay and #'top alignment. The #'auto mode is treated like #'tall or #'center, whichever would cause the pict to appear lower in the client area.

A context parameter for the font used by titlet.

function

fun titlet(content, ...) :: Pict

Like t from pict/text, but using current_title_font().

expression

titlely(content_expr, ...)

 

expression

titlely: body; ...

Like boldly, etc., but for the slide title font configured via current_title_font.

function

fun nonarchival(pict ::Pict) :: Pict

 

function

fun nonarchival(pict ::Pict, epoch :: Int) :: Pict

Returns a pict that is like pict, but with metatadata that indicates that the pict should be skipped in some epochs in condensed mode, which might be used when printing to PDF form. Metadata is installed via Pict.epoch_set_metadata using the key #'nonarchival.

enumeration

enum SlideLayout:

  auto

  center

  top

  tall

Slide layout options used with slide and current_assembler.

function

fun interactive(pict :: Pict,

                callback :: Function.of_arity(1)) :: Pict

Creates a pict that renders as pict for printing or other non-interactive contexts, but in Slideshow GUI creates a floating window at the same position as the pict would appear, and callback is called a window handle to initialize the window. The callback function must produce a function of zero arguments, which is called to deinitialize the floating when when the slide changes so that the interactive pict is not longer on the screen.

function

fun is_printing() :: Boolean

 

function

fun is_condensing() :: Boolean

Functions that report whether slides are being collected to be printed (e.g,. to PDF) instead of shown interactively, and whether slides are being collected in “condensed” mode (which is normaly enabled when printing, but also can be enabled separately).

function

fun start_at_recent()

When slides are being accumulated to show interactively, causes the slide viewer to fast-forward to the most recently registered slide as soon as it’s available.

function

fun retract_recent()

Unregisters the most recently registered slide.