docs: Studio's PDF export needs LaTeX, in AGENTS.md and Dockerfile.base too
AGENTS.md ("What we DON'T install") and two comments in Dockerfile.base's
typst block still said pi-studio's PDF export uses typst. Same correction
as 77929b7 for the README. AGENTS.md also warns maintainers not to ship
ENV PANDOC_PDF_ENGINE=typst, since pi-studio's LaTeX header is printed as
page text under typst while pandoc exits 0.
Corrects 77929b7: "texlive-xetex alone is not enough" holds only with
--no-install-recommends. With apt's defaults, texlive-xetex (and the old
AGENTS recipe, texlive-xetex texlive-latex-recommended: the same set) works,
but installs 202 packages / 1053 MB including systemd, D-Bus and a JRE.
The README recipe (4 packages, --no-install-recommends) is 37 / 491 MB.
All three recipes measured from the image's 401 packages on v1.11.2 +
pi-studio 0.10.1, checking the exported page, not only the exit code.
Dockerfile.base changes are comments only, but base_tag hashes the whole
file; the next release rebuilds the base anyway.
This commit is contained in:
+12
-7
@@ -822,12 +822,16 @@ RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64"
|
||||
|
||||
# ── typst — lightweight PDF engine for pandoc (Markdown→PDF) ─────────
|
||||
# pandoc (apt-installed above) is only a front-end; rendering PDF needs a
|
||||
# back-end engine. Rather than a ~600 MB TeX Live install, we ship typst:
|
||||
# a single ~30 MB static Rust binary with no LaTeX dependency. pi-studio's
|
||||
# PDF export (studio_export_pdf) and pandoc invocations use it via
|
||||
# `pandoc --pdf-engine=typst`. A fuller TeX Live remains the higher-
|
||||
# fidelity fallback for anyone who needs LaTeX-exact output (not shipped
|
||||
# here — install on demand or in a future variant).
|
||||
# back-end engine. Rather than a ~0.5–1 GB TeX Live install, we ship typst:
|
||||
# a single ~30 MB static Rust binary with no LaTeX dependency. Callers must
|
||||
# ask for it with `pandoc --pdf-engine=typst`, because pandoc's own default
|
||||
# engine is pdflatex, which is not installed. pi-studio's PDF export
|
||||
# (studio_export_pdf, /studio-pdf) does NOT use typst. It runs pandoc with
|
||||
# $PANDOC_PDF_ENGINE, defaulting to xelatex, so it fails with "xelatex not
|
||||
# found". Setting PANDOC_PDF_ENGINE=typst is not a fix: pi-studio adds its
|
||||
# own LaTeX header, and typst prints that header as page text while pandoc
|
||||
# exits 0. TeX Live is not shipped here; README "PDF export from Studio needs
|
||||
# LaTeX" has the on-demand recipe (~490 MB).
|
||||
#
|
||||
# Follows the `latest` GitHub-release convention (like tealdeer/uv/bat).
|
||||
# typst ships a `.tar.xz` asset (hence xz-utils in the apt layer above)
|
||||
@@ -839,7 +843,8 @@ RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64"
|
||||
# document font to an empty tuple (`font: ()`), so a naked
|
||||
# `pandoc --pdf-engine=typst` fails with "font fallback list must not be empty"
|
||||
# unless the caller passes `-V mainfont=...`. We default it to Libertinus Serif
|
||||
# (typst's own bundled default font) so PDF export works out-of-the-box.
|
||||
# (typst's own bundled default font) so a naked `pandoc --pdf-engine=typst`
|
||||
# works out of the box.
|
||||
ARG TYPST_VERSION=latest
|
||||
RUN ARCH=$(case "${TARGETARCH}" in amd64) echo "x86_64" ;; arm64) echo "aarch64" ;; *) echo "x86_64" ;; esac) && \
|
||||
V="${TYPST_VERSION}" && \
|
||||
|
||||
Reference in New Issue
Block a user