- Description:
- Fork de maaslalani/slides: presentaciones en la terminal con LaTeX, imágenes, citas y gráficas, pensado para presentaciones académicas.
- Last Change:
- Clone URL:
https://git.nezzontli.xyz/clone/slides.git
Commit Briefs
Paginate the References slide (main)
A terminal slide can't scroll, so a long bibliography ran off the bottom. bib.Process now emits one '## References' slide plus as many '## References (cont.)' slides as needed, at most 6 entries each.
Add <!-- run --> slide directive: auto-run code, hide source
A slide carrying '<!-- run -->' executes its code blocks automatically when it is shown and displays only their output -- the source is stripped before rendering. Built for terminal plots (UnicodePlots.jl): navigating to the slide draws the graph with no keystroke. - autoRun() fires executeCodeCmd on slide entry (batched with the image load), or restores a per-page cached result on revisit so the slide doesn't re-run and flicker. - code.Warm() kicks off a throwaway 'using UnicodePlots' at load so the first auto-run slide doesn't stall on Julia's precompile. - cached execution temp dirs are cleaned on quit.
Order references alphabetically
Process now numbers cited entries 1..N in alphabetical order of the reference (first author's family name, then year, then title; entries with no author sort by title) and lists the References slide in that order -- IEEE-numbered with alphabetical ordering. In-text [n] markers therefore need not appear in ascending order. Replaces first-appearance numbering.
Resolve a relative theme: path against the deck's directory
A 'theme: theme.json' in the frontmatter now loads from the presentation file's folder, like bibliography and images already do, instead of the process's working directory -- so 'slides sub/dir/deck.md' finds sub/dir/theme.json. Builtin keywords (ascii/light/dark/notty), URLs and absolute paths are unchanged.
Size figures from the measured height of the slide's prose
computeMediaBudget now renders the slide's text alone -- images and $$ blocks removed, captions kept -- and measures how many rows it actually occupies at the current width, then splits the remaining height across the media items. Replaces the fixed reservedRows guess, which was too small when a slide carried a paragraph or a bullet list around the figure, so the figure overran the text beneath it (or pushed it off the bottom). Cached in Model.mediaRows and refreshed on every page change and resize, so the fit re-measures as Kitty's font size changes.
Add <!-- center --> slide directive
A slide with '<!-- center -->' on its own line gets every text line horizontally centered within the content width after rendering; Kitty graphics placeholders keep their existing PadLeft centering. The marker is stripped before glamour sees it, like <!-- pause -->. For closer / section / figure-caption slides.
Fit stacked media to the viewport; warm the LaTeX cache
mediaBudget() splits a slide's usable height across every media item it carries (each image and each $$…$$ block is a real graphic), so slides with several stacked figures/equations no longer overflow the viewport and get their last figure clipped off the bottom. Recomputed on every WindowSizeMsg, so it tracks Kitty font-size / zoom live. Replaces the fixed reservedRows=10 guess. latex.Warm() pre-renders every unique display-math block in the deck concurrently in the background from Load(), so navigating to a slide with equations is a cache hit instead of tectonic's cold start one block at a time. loadImagesCmd rasterizes a slide's blocks in parallel too. dpi 200 (down from 300) roughly halves Ghostscript's work; the PNG is downscaled to a few cells regardless, with TextAlphaBits=4 keeping edges smooth.
Reorganize examples/ into one folder per demo, track the personal ones
Every example is now its own self-contained folder (matching the arquimedes/matlab-laser-mic pattern that was already here), instead of a flat mix of loose .md files and asset folders. Updates the few repo-root-relative paths that pointed at the old flat layout: Makefile, docs/development, custom_theme.md's theme path, and preprocess.md's import path. arquimedes/ and matlab-laser-mic/ are no longer gitignored -- they're real presentations built with this fork, worth keeping versioned instead of local-only.
Center code-execution text output, demo a GIF saved from code
UnicodePlots (and any other code block's plain stdout) now centers the same way image-based plots already do via their own PadLeft, instead of hugging the left edge while GR/CairoMakie output sits in the middle. Also adds a Julia example that saves an animated GIF from a ctrl+e block -- confirms the existing GIF cache path (Fase 7) already applies to execution-produced images too, no code change needed there.
Branches
Tree
README.md
# Slides Slides in your terminal — personal fork of [maaslalani/slides](https://github.com/maaslalani/slides) with real LaTeX, real images (including animated GIFs), bibliography/citations, progressive reveal, and plots from executed code, built for academic and scientific presentations. <p align="center"> <img src="./assets/slides-1.gif?raw=true" alt="Slides Presentation" /> </p> ### What's different from upstream * **LaTeX math** — `$...$` inline math renders as Unicode text; `$$...$$` block math renders as a real image via [tectonic](https://tectonic-typesetting.github.io/) + Ghostscript. * **Real images** — `` shows the actual image via the Kitty Graphics Protocol, caption included, animated GIFs playing back for real. Falls back to plain alt text without Kitty graphics support. * **Bibliography & citations** — `[@key]` citations are numbered by order of first appearance against a `.bib` file, with a References slide generated automatically. Enabled via `bibliography` in the frontmatter. * **Progressive reveal** — `<!-- pause -->` splits a slide into steps revealed one keypress at a time. * **Plots from executed code** — any image a `ctrl+e` code block saves is shown below its output. Julia specifically gets ANSI-colored UnicodePlots and a headless GR/Plots.jl/CairoMakie backend for free. * Layout/margin/sizing tuned for presenting on a projector. Everything else — navigation, search, pre-processing, SSH — works exactly like upstream `slides`. ### Installation This fork isn't published to any package manager. Build it from source: ``` git clone <this repo> cd slides go install ``` Or, with the Nix flake in this repo (also brings in `tectonic`, `ghostscript`, and `julia-bin`): ``` nix build # ./result/bin/slides nix develop # dev shell with everything on PATH ``` ### Usage ``` slides presentation.md ``` Space/`j`/`k`/arrows to move between slides, `/` to search, `ctrl+e` to run a code block, `y` to yank one, `gg`/`G` to jump to the first/last slide. `slides` also reads from `stdin` and reloads live on file changes. Frontmatter (`theme`, `author`, `date`, `paging`, `bibliography`) is optional — see [examples/basics/metadata.md](./examples/basics/metadata.md). See [examples/](./examples) for every feature above in a working presentation: LaTeX, images, GIFs, bibliography, reveal, Julia plots, and everything inherited from upstream. ### Credits This is a personal fork of [maaslalani/slides](https://github.com/maaslalani/slides), which was itself heavily inspired by [`lookatme`](https://github.com/d0c-s4vage/lookatme). ### Development See the [development documentation](./docs/development)
