24 Render and review recipes
Run the shell commands in this chapter from the repository root. Shell commands are not executed while Scribble builds the manual: they create files, may invoke FFmpeg or TeX, and should remain explicit user actions.
24.1 Render a slide video with ten workers
racket slides/render-example.rkt --workers 10 \ |
--output slides-output/manual-videos \ |
scribblings/examples/slide-lesson.rkt |
The source module exports a storyboard named film. Replace the filename with "scribblings/examples/geometry-slide.rkt" for geometry or "scribblings/examples/math-checkpoints.rkt" for the math example. This asks for up to ten frame workers; preparation and encoding are separate work. FFmpeg is needed for MP4 output, and the math example also needs TeX preparation.
Details: Project sources.
24.2 Render a dark gallery
racket slides/run-gallery.rkt --videos --workers 10 --dark \ |
slides-output/gallery-dark |
Open slides-output/gallery-dark/index.html. On macOS:
open slides-output/gallery-dark/index.html |
Omit –videos for posters and sampled frames only. Reported worker counts describe what actually happened, not merely what was requested.
24.3 Render only the examples you need
First list the catalogue:
racket slides/run-gallery.rkt --list |
Then select entries by ID:
racket slides/run-gallery.rkt \ |
--entry semantic-parts --entry semantic-math \ |
--entry semantic-geometry --entry semantic-math-geometry \ |
--videos --workers 10 --dark slides-output/semantic-review |
Or inspect layout variants in portrait without movies:
racket slides/run-gallery.rkt --category layouts --format portrait \ |
--dark slides-output/portrait-review |
An unknown entry usually means the requested ID is wrong. Check –list before a long render. Details: Gallery runner.
24.4 Compare Pict and Scene output and keep the logs
racket slides/run-probes.rkt --repeat 2 --gallery --math --geometry \ |
slides-output/layout-review |
The output contains paired PNGs, index.html, manifest.json, stdout.txt, and stderr.txt; the sibling ZIP contains the transcripts. Do not create the output directory first. Start by reading the manifest’s errors array, then inspect the pictures. A successful pixel comparison is not proof that wording, spacing, or timing is good.
Details: Visual probe runner.
24.5 Inspect a slide in storyboard context
Unlike the shell commands above, this small diagnostic recipe is safe to run at document-build time. It constructs a tiny storyboard and asks for a debug Pict:
(define review-card (slide #:id 'review-card #:layout 'title+body [title "Inspect the layout"] [body "Show slots, the safe area, and baselines."])) (define review-film (storyboard #:id 'review-film #:theme lecture-light (storyboard-shot 'rule (hold-slide review-card #:duration 1)))) (define debug-picture (slide->pict (storyboard-ref review-film 'rule) #:debug '(slots safe-area baselines)))
> (pict? debug-picture) #t
A standalone card can inherit different settings from a storyboard. When a layout fails, inspect the shot in the context in which it will actually render. For semantic matching, prepare the storyboard and inspect storyboard-match-report. See Preparation and inspection.