feat(base): ship typst as lightweight pandoc PDF engine
Lint workflows / actionlint (push) Successful in 15s

pandoc has been in the base since v1.0.0 but only as a front-end; PDF
export (studio_export_pdf / pandoc -o out.pdf) failed with 'xelatex not
found' because no back-end engine was installed. Ship typst (~30 MB
static Rust binary, no LaTeX) as the default engine via
`pandoc --pdf-engine=typst`, chosen over a ~600 MB TeX Live install.
texlive-xetex remains the higher-fidelity install-on-demand fallback.

- Dockerfile.base: install typst (latest GitHub-release idiom, pin via
  TYPST_VERSION); add xz-utils (typst ships .tar.xz); bump
  BASE_REBUILD_DATE. Lands in base-<hash>.
- smoke-test.sh: verify typst + a real pandoc --pdf-engine=typst render.
- README/AGENTS/CHANGELOG: typst now shipped (supersedes the planned
  :latest-studio-tex variant).

No tag pushed — CI build intentionally deferred.
This commit is contained in:
pi
2026-07-11 17:04:19 +02:00
parent 4563b4d76d
commit 67da05b99b
5 changed files with 75 additions and 21 deletions
+8 -11
View File
@@ -149,12 +149,10 @@ Currently published:
Planned for an upcoming minor release:
- **PDF export from Studio/pandoc** (a future minor release). Engine still to be decided.
A lightweight engine is preferred over a full TeX install:
- `typst` — single static binary (~30 MB), `pandoc --pdf-engine=typst`; light
enough it could ship in the base image (no separate `-tex` variant needed).
- `joakimp/pi-devbox:latest-studio-tex``-studio` plus `texlive-xetex`
(~600 MB on top of `-studio`); highest fidelity, kept as the fallback.
- *(shipped in Unreleased/base)* **PDF export from Studio/pandoc** now works:
the base image ships **`typst`** as the PDF engine (`pandoc --pdf-engine=typst`),
a single ~30 MB static binary — no separate `-tex` variant needed.
`texlive-xetex` stays the higher-fidelity fallback (install on demand).
## Using pi-studio (`-studio` variant)
@@ -289,11 +287,10 @@ Assuming the compose file publishes `127.0.0.1:8765:8765` (see method B):
> until step 2 runs. If the browser can't connect, verify Studio is up
> (`/studio --status`) and the bridge is running (`ps aux | grep socat`).
> PDF export (`/studio-pdf`, `studio_export_pdf`) needs a PDF engine, which is
> **not** in `-studio` (pandoc is present but has no engine, so export fails
> with `xelatex not found`). Planned for a future release — likely a lightweight
> engine such as `typst`, with `texlive-xetex` as the heavier fallback. HTML export,
> KaTeX, Mermaid, and all REPL features work without it.
> PDF export (`/studio-pdf`, `studio_export_pdf`) uses **`typst`**, shipped in
> the base image as the pandoc PDF engine (`pandoc --pdf-engine=typst`). For
> LaTeX-exact output you can install `texlive-xetex` on demand as a heavier
> fallback. HTML export, KaTeX, Mermaid, and all REPL features work regardless.
### Graphviz diagrams in Studio: `dot-watch`