Keyslide
Preview animated Beamer presentations while you edit. Open a .tex that uses
the keyslide LaTeX package, run Keyslide: Open Preview, and every save
rebuilds the deck into the side panel — keeping your slide position, keeping
the last good render when a build fails (error banner + OUTPUT "keyslide"),
and warning when variable fonts would make the HTML differ from the PDF.
Requires a local TeX Live (latex / dvilualatex) and a Ghostscript-enabled
dvisvgm (brew install dvisvgm). The keyslide .sty is bundled and injected
automatically. Limitation: only saves of the previewed file itself trigger a
rebuild (\input parts do not).
Partial preview
Most saves only rebuild the frame that was actually edited since the
last save — not the frame under the cursor, which stays wrong under
Find&Replace, format-on-save, multi-cursor edits, and split-pane focus —
and splice just that slide into the preview (only that one frame is
typeset, faster than a full rebuild), showing a partial preview — only slide N is fresh badge. It automatically falls back to a full render, with a banner
explaining why, on: unsupported constructs (\againframe,
noframenumbering, \maketitle, \frame{...} shorthand,
allowframebreaks — these produce slides with no matching \begin{frame}
in the source or split one frame into several slides, breaking the mapping)
or a partial build/splice failure (banner text partial preview unavailable (...) or partial preview could not splice — rendering the full deck).
The first build, changes in frame count, no edit detected (e.g. a re-save
with no changes), an edit outside any frame (e.g. the preamble) or spanning
more than one frame (e.g. a multi-slide Find&Replace), and a partial build
displaced from the queue by a newer save also fall back silently to a full
render (expected behavior). If the
partial build fails because of a LaTeX compile error, the full deck is
not re-rendered — the last good render is kept with a red error banner,
same as any other build failure. Forward search (Reveal Current Frame)
stays cursor-based — navigation is exactly what the cursor is for. Both
forward search and inverse search (Alt+click) share the same frame-mapping
assumption and silently do nothing when the source scan can't be trusted
against the built deck.
Commands and keybindings
Active only when the editor has LaTeX focus.
| Command |
Keybinding (macOS / Win-Linux) |
Action |
| Keyslide: Open Preview |
— |
Open the side-by-side preview |
| Keyslide: Render Full Deck |
cmd+alt+shift+k / ctrl+alt+shift+k |
Force a full render, clearing the partial-preview badge |
| Keyslide: Reveal Current Frame in Preview |
cmd+alt+k / ctrl+alt+k |
Forward search: jump the preview to the cursor's frame |
| Keyslide: Export PDF (No Animations) |
— |
Compile a beamer handout — one page per frame, all \ks/\kspause content visible — as <name>-handout.pdf next to the .tex, and open it |
Inverse search: Alt+click a slide in the preview to move the cursor to
its \begin{frame} line. A plain click is left alone for advancing the deck.
The preview's bottom-right ▶ Present button does a full render, writes a
self-contained <name>.html next to the .tex (doubling as an export), and
opens it in a browser. Nothing is written if the build fails. The exported
HTML has no VS Code integration or Present button — it's the plain player.
Settings
| Setting |
Type |
Default |
Description |
keyslide.presentationBrowser |
string |
"" (empty) |
Browser app name for the Present button: empty (default) uses the system default browser on any platform; a named app (e.g. Safari, Google Chrome) uses open -a on macOS only. |
Using alongside LaTeX Workshop
If the same .tex is also built to PDF by LaTeX Workshop, its save-triggered
auto-build can compete with keyslide's rebuild. Add to the workspace
.vscode/settings.json to build PDFs manually only:
{ "latex-workshop.latex.autoBuild.run": "never" }