Presentations & Animations

PRESENTATION builds a PPTX file from OcaltQL verbs — titles, body text, images, graphs, tables, bullet lists, speaker notes, and video, positioned per slide. ANIMATE and TRANSITION add motion between slides and to individual elements. The finished deck can be exported as a standard .pptx file, or rendered out as an animated GIF or video clip.

Deck Lifecycle

NEW PRESENTATION builds a deck from nothing. PRESENTATION OPEN loads an existing .pptx back into an editable deck object — the same object NEW PRESENTATION produces, so every verb below works on it identically. SAVE writes back to the file it came from; SAVE INTO writes a copy elsewhere.

Open an Existing Deck, Edit It, Save It Back
PRESENTATION OPEN "/root/deck.pptx" SET ?file
AFTER PRESENTATION ?file SLIDE COUNT SET ?n
AFTER EMIT "opened a deck of " & ?n & " slides"
AFTER PRESENTATION ?file SAVE SET ?file
Save a Copy Instead
PRESENTATION OPEN "/root/deck.pptx" SET ?file
AFTER PRESENTATION ?file SAVE INTO "/root/deck-v2.pptx" SET ?path
AFTER EMIT ?path
(* The original is untouched *)

Structure

A Complete Two-Slide Deck
NEW PRESENTATION INTO "/root/deck.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "content" DURATION "5s"
  OPEN
    BACKGROUND "#1a1a2e"
    TITLE "Q3 Results" AT 5% BY 5% FORMAT 90% BY 10% ALIGN LEFT TOP
    BODY "Revenue exceeded targets across all regions." AT 5% BY 18% FORMAT 90% BY 12% ALIGN LEFT TOP
    GRAPH TYPE "bar" WITH ?revenue AT 5% BY 32% FORMAT 60% BY 55% ALIGN LEFT MIDDLE
    IMAGE "/root/logo.png" AT 80% BY 2% FORMAT 15% BY 8% ALIGN RIGHT TOP
    BULLET
    OPEN
      ITEM "EMEA up 34%"
      ITEM "APAC up 21%"
      ITEM "Americas up 18%"
    CLOSE
    NOTE "Mention the restructuring impact on EMEA here."
  CLOSE
  SLIDE LAYOUT "blank"
  OPEN
    TITLE "Thank You" ALIGN CENTER MIDDLE
  CLOSE
CLOSE
Themes, Stateful FONT and COLOR, SUBTITLE and TABLE
NEW ARRAY SET ?rows
AFTER NEW OBJECT SET ?r1
AFTER SET ?r1("Region") AS "EMEA"
AFTER SET ?r1("Growth") AS "34%"
AFTER APPEND ?r1 TO ?rows
AFTER NEW OBJECT SET ?r2
AFTER SET ?r2("Region") AS "APAC"
AFTER SET ?r2("Growth") AS "21%"
AFTER APPEND ?r2 TO ?rows
AFTER NEW PRESENTATION INTO "/root/styled.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "content"
  OPEN
    THEME "ocean"
    FONT "Inter" SIZE 20
    COLOR "#0b3954"
    TITLE "Styled Slide"
    SUBTITLE "THEME sets the palette; FONT and COLOR apply to everything after them"
    TABLE WITH ?rows AT 5% BY 50% FORMAT 60% BY 35%
  CLOSE
  SLIDE LAYOUT "content"
  OPEN
    THEME "pastel"
    TITLE "Pastel"
  CLOSE
  SLIDE LAYOUT "content"
  OPEN
    THEME "dark"
    TITLE "Dark"
  CLOSE
CLOSE
AFTER EMIT ?file

SLIDE Modifiers

Modifier Description
LAYOUT "type"Slide layout. Types: "title", "content", "two-column", "blank", "image-full", "title-only"
DURATION "3s"Auto-advance timing. Omit for manual advance. If no slide has DURATION, all durations are ignored.

Positioning

All positions and sizes use percentages relative to the slide dimensions. AT x% BY y% positions from the top-left corner. FORMAT w% BY h% sets width and height. ALIGN horizontal vertical aligns the element within its bounds.

Explicit Positioning
TITLE "Heading" AT 5% BY 5% FORMAT 90% BY 10% ALIGN LEFT TOP
IMAGE "/root/logo.png" AT 80% BY 2% FORMAT 15% BY 8% ALIGN RIGHT TOP
GRAPH TYPE "pie" WITH ?data AT 5% BY 20% FORMAT 45% BY 60% ALIGN LEFT MIDDLE
BODY "Footer text" AT 5% BY 88% FORMAT 90% BY 8% ALIGN CENTER BOTTOM
Embedded Video
NEW PRESENTATION INTO "/root/video.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "content"
  OPEN
    TITLE "Product Clip"
    VIDEO "/root/clip.mp4" AT 20% BY 25% FORMAT 60% BY 60%
  CLOSE
CLOSE
AFTER EMIT ?file

If AT and FORMAT are omitted, the element flows automatically in layout order. If only ALIGN is set, the element is placed by alignment alone within the full slide.

Alignment Only — No Explicit Position
TITLE "Centered Heading" ALIGN CENTER MIDDLE
IMAGE "/root/logo.png" ALIGN RIGHT TOP
BODY "Footer" ALIGN CENTER BOTTOM
Every Layout in One Deck
NEW PRESENTATION INTO "/root/layouts.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "title"
  OPEN
    TITLE "Deck Title"
    SUBTITLE "All six layouts, one deck"
  CLOSE
  SLIDE LAYOUT "two-column"
  OPEN
    TITLE "Two Columns"
    BODY "Flows into the left region first."
    BODY "Then into the right region."
  CLOSE
  SLIDE LAYOUT "title-only"
  OPEN
    TITLE "Title Only"
  CLOSE
  SLIDE LAYOUT "image-full"
  OPEN
    IMAGE "/root/logo.png"
  CLOSE
  SLIDE LAYOUT "blank"
  OPEN
    TITLE "Blank Canvas" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "content"
  OPEN
    TITLE "Content"
    BODY "The default flowing layout."
  CLOSE
CLOSE
AFTER EMIT ?file

Alignment Values

Horizontal Vertical
LEFT, CENTER, RIGHTTOP, MIDDLE, BOTTOM

Slide Content Verbs

Verb Description
TITLE "text"Slide title text
SUBTITLE "text"Subtitle text
BODY "text"Body paragraph text
IMAGE "/root/path.png"Embedded image
VIDEO "/root/clip.mp4"Embedded video
GRAPH TYPE "type" WITH ?dataEmbedded SVG chart — any type from Graphs - SVG Charts
TABLE WITH ?dataTable from an array of objects
BULLET OPEN ITEM "..." CLOSEBulleted list
NOTE "text"Speaker notes, not visible on the slide
BACKGROUND "colour"Slide background colour
THEME "name"Slide colour theme
FONT "Inter" SIZE 24Font family and size for subsequent text elements
COLOR "colour"Text colour for subsequent text elements
Color formats. BACKGROUND and COLOR accept a named colour, RGB, RGBA (alpha as a 0–1 decimal), 6-character hex with or without #, or 3-character hex with or without # — the same universal set used everywhere else in OcaltQL.

Animations

TRANSITION controls how one slide replaces the previous one. ANIMATE controls how an individual element enters, exits, or draws attention mid-slide. Both are genuine motion, not merely auto-advance timing.

TRANSITION — Between Slides

A Slide with a Transition In
SLIDE LAYOUT "content" DURATION "5s" TRANSITION "fade" DURATION "0.5s"
OPEN
  TITLE "Q3 Results" ALIGN CENTER TOP
CLOSE
Every Transition Type
NEW PRESENTATION INTO "/root/transitions.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "blank" TRANSITION "none"
  OPEN
    TITLE "none" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "fade" DURATION "0.5s"
  OPEN
    TITLE "fade" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "dissolve"
  OPEN
    TITLE "dissolve" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "slide-left"
  OPEN
    TITLE "slide-left" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "slide-right"
  OPEN
    TITLE "slide-right" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "slide-up"
  OPEN
    TITLE "slide-up" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "slide-down"
  OPEN
    TITLE "slide-down" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "wipe-left"
  OPEN
    TITLE "wipe-left" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "wipe-right"
  OPEN
    TITLE "wipe-right" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "zoom-in"
  OPEN
    TITLE "zoom-in" ALIGN CENTER MIDDLE
  CLOSE
  SLIDE LAYOUT "blank" TRANSITION "zoom-out"
  OPEN
    TITLE "zoom-out" ALIGN CENTER MIDDLE
  CLOSE
CLOSE
AFTER EMIT ?file

Transition Types

Type
"none" — instant cut
"fade"
"dissolve"
"slide-left", "slide-right", "slide-up", "slide-down"
"wipe-left", "wipe-right"
"zoom-in", "zoom-out"

ANIMATE — Per-Element Entrance, Exit, and Emphasis

Attach directly to any content verb. DELAY is measured from the moment the slide begins.

Animating a Title's Entrance
TITLE "Q3 Results" AT 5% BY 5% FORMAT 90% BY 10% ALIGN LEFT TOP
ANIMATE ENTER "fly-in-left" DELAY "0s" DURATION "0.6s"
Staggered Bullet Reveal
BULLET
OPEN
  ITEM "EMEA up 34%" ANIMATE ENTER "fade-in" DELAY "0s" DURATION "0.4s"
  ITEM "APAC up 21%" ANIMATE ENTER "fade-in" DELAY "0.5s" DURATION "0.4s"
  ITEM "Americas up 18%" ANIMATE ENTER "fade-in" DELAY "1s" DURATION "0.4s"
CLOSE
Every Colour Format
NEW PRESENTATION INTO "/root/colours.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "content"
  OPEN
    BACKGROUND "navy"
    COLOR "rgb(255,214,102)"
    TITLE "Named background, RGB text"
  CLOSE
  SLIDE LAYOUT "content"
  OPEN
    BACKGROUND "rgba(26,26,46,0.9)"
    COLOR "#0af"
    TITLE "RGBA background, 3-hex text"
  CLOSE
  SLIDE LAYOUT "content"
  OPEN
    BACKGROUND "f0f7fa"
    COLOR "0b3954"
    TITLE "Bare 6-hex, no hash"
  CLOSE
CLOSE
AFTER EMIT ?file
Emphasis on an Existing Element
IMAGE "/root/logo.png" AT 80% BY 2% FORMAT 15% BY 8% ALIGN RIGHT TOP
ANIMATE EMPHASIS "pulse" DELAY "2s" DURATION "0.5s"
Exit Animation
BODY "This will fade out before the slide ends." AT 5% BY 18% FORMAT 90% BY 12%
ANIMATE EXIT "fade-out" DELAY "4s" DURATION "0.5s"
Every Animation Type
NEW PRESENTATION INTO "/root/animations.pptx" SET ?file AS
OPEN
  SLIDE LAYOUT "content" DURATION "6s"
  OPEN
    TITLE "Entrances"
    BODY "fade-in" AT 5% BY 20% FORMAT 40% BY 8%
    ANIMATE ENTER "fade-in" DELAY "0s" DURATION "0.4s"
    BODY "fly-in-left" AT 5% BY 30% FORMAT 40% BY 8%
    ANIMATE ENTER "fly-in-left" DELAY "0.5s" DURATION "0.4s"
    BODY "fly-in-right" AT 5% BY 40% FORMAT 40% BY 8%
    ANIMATE ENTER "fly-in-right" DELAY "1s" DURATION "0.4s"
    BODY "fly-in-top" AT 5% BY 50% FORMAT 40% BY 8%
    ANIMATE ENTER "fly-in-top" DELAY "1.5s" DURATION "0.4s"
    BODY "fly-in-bottom" AT 55% BY 20% FORMAT 40% BY 8%
    ANIMATE ENTER "fly-in-bottom" DELAY "2s" DURATION "0.4s"
    BODY "zoom-in" AT 55% BY 30% FORMAT 40% BY 8%
    ANIMATE ENTER "zoom-in" DELAY "2.5s" DURATION "0.4s"
    BODY "bounce-in" AT 55% BY 40% FORMAT 40% BY 8%
    ANIMATE ENTER "bounce-in" DELAY "3s" DURATION "0.4s"
    BODY "wipe-in" AT 55% BY 50% FORMAT 40% BY 8%
    ANIMATE ENTER "wipe-in" DELAY "3.5s" DURATION "0.4s"
  CLOSE
  SLIDE LAYOUT "content" DURATION "6s"
  OPEN
    TITLE "Exits"
    BODY "fade-out" AT 5% BY 20% FORMAT 40% BY 8%
    ANIMATE EXIT "fade-out" DELAY "1s" DURATION "0.4s"
    BODY "fly-out-left" AT 5% BY 30% FORMAT 40% BY 8%
    ANIMATE EXIT "fly-out-left" DELAY "1.5s" DURATION "0.4s"
    BODY "fly-out-right" AT 5% BY 40% FORMAT 40% BY 8%
    ANIMATE EXIT "fly-out-right" DELAY "2s" DURATION "0.4s"
    BODY "fly-out-top" AT 5% BY 50% FORMAT 40% BY 8%
    ANIMATE EXIT "fly-out-top" DELAY "2.5s" DURATION "0.4s"
    BODY "fly-out-bottom" AT 55% BY 20% FORMAT 40% BY 8%
    ANIMATE EXIT "fly-out-bottom" DELAY "3s" DURATION "0.4s"
    BODY "zoom-out" AT 55% BY 30% FORMAT 40% BY 8%
    ANIMATE EXIT "zoom-out" DELAY "3.5s" DURATION "0.4s"
    BODY "wipe-out" AT 55% BY 40% FORMAT 40% BY 8%
    ANIMATE EXIT "wipe-out" DELAY "4s" DURATION "0.4s"
  CLOSE
  SLIDE LAYOUT "content" DURATION "5s"
  OPEN
    TITLE "Emphasis"
    BODY "pulse" AT 5% BY 20% FORMAT 40% BY 8%
    ANIMATE EMPHASIS "pulse" DELAY "0.5s" DURATION "0.5s"
    BODY "spin" AT 5% BY 30% FORMAT 40% BY 8%
    ANIMATE EMPHASIS "spin" DELAY "1s" DURATION "1s"
    BODY "grow" AT 5% BY 40% FORMAT 40% BY 8%
    ANIMATE EMPHASIS "grow" DELAY "2s" DURATION "0.5s"
    BODY "shrink" AT 55% BY 20% FORMAT 40% BY 8%
    ANIMATE EMPHASIS "shrink" DELAY "2.5s" DURATION "0.5s"
    BODY "shake" AT 55% BY 30% FORMAT 40% BY 8%
    ANIMATE EMPHASIS "shake" DELAY "3s" DURATION "0.5s"
  CLOSE
CLOSE
AFTER EMIT ?file

Animation Types

Stage Types
ANIMATE ENTER"fade-in", "fly-in-left", "fly-in-right", "fly-in-top", "fly-in-bottom", "zoom-in", "bounce-in", "wipe-in"
ANIMATE EXIT"fade-out", "fly-out-left", "fly-out-right", "fly-out-top", "fly-out-bottom", "zoom-out", "wipe-out"
ANIMATE EMPHASIS"pulse", "spin", "grow", "shrink", "shake"

Editing the Slides of a Deck

A deck that has been opened — or one just built — can have slides added, replaced, removed, or reordered. Slide positions are 1-based, matching SLIDE COUNT.

Add a Slide at a Position
PRESENTATION OPEN "/root/deck.pptx" SET ?file
AFTER PRESENTATION ?file ADD SLIDE LAYOUT "content" AT 2
OPEN
  TITLE "Inserted Slide"
  BODY "This became slide 2; everything after it shifted down."
CLOSE
AFTER PRESENTATION ?file SAVE SET ?file
Append a Slide — No AT
PRESENTATION OPEN "/root/deck.pptx" SET ?file
AFTER PRESENTATION ?file ADD SLIDE LAYOUT "blank"
OPEN
  TITLE "Thank You" ALIGN CENTER MIDDLE
CLOSE
AFTER PRESENTATION ?file SAVE SET ?file
(* Omitting AT appends to the end of the deck *)
Replace, Move, and Delete a Slide
PRESENTATION OPEN "/root/deck.pptx" SET ?file
AFTER PRESENTATION ?file SLIDE 3 REPLACE LAYOUT "content"
OPEN
  TITLE "Rewritten Slide 3"
CLOSE
AFTER PRESENTATION ?file SLIDE 5 MOVE TO 1
AFTER PRESENTATION ?file SLIDE 7 DELETE
AFTER PRESENTATION ?file SAVE SET ?file

Frame and Slide Control

Counting and Referencing Slides
PRESENTATION ?file SLIDE COUNT SET ?n
AFTER EMIT ?n
Exporting a Single Slide as an Image
PRESENTATION ?file SLIDE 2 EXPORT AS "png" SET ?frame

Exporting the Finished Deck

Standard PPTX Output
EMIT ?file

Exporting as an Animated GIF or Video

PRESENTATION ... EXPORT renders every slide as a frame — respecting each slide's DURATION, every TRANSITION, and every element's ANIMATE timing — then encodes the result using the same media pipeline documented on Video & Audio Processing.

Export as GIF
PRESENTATION ?file EXPORT AS "gif" SET ?gif
AFTER FILE SHARE ?gif SET ?url
AFTER EMIT ?url
Export as Video
PRESENTATION ?file EXPORT AS "mp4" SET ?video
AFTER FILE SHARE ?video SET ?url
AFTER EMIT ?url