Use minimal scheme-basic TeX Live install (small, fast, reversible)
Build and Deploy Verso / deploy (push) Has been cancelled
Build and Deploy Verso / deploy (push) Has been cancelled
Reverts the heavy multi-collection texlive install back toward the original upstream-Overleaf approach: install-tl with scheme-basic (~300 MB) plus latexmk and texcount via tlmgr, no docfiles/srcfiles. This restores the fast, small base image we had before LaTeX support was added in full. Tradeoff: documents needing tikz/beamer/siunitx/extra fonts won't compile out of the box for now — those should stay in Quarto/Typst until the project is mature enough to justify a full TeX Live. Made deliberately easy to reverse: a header comment documents that switching scheme-basic -> scheme-full (one line) restores the complete toolchain, or individual packages can be appended to the tlmgr list. Uses TEXDIR=/usr/local/texlive (unversioned) so PATH stays stable across TeX Live releases. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+31
-24
@@ -72,32 +72,39 @@ RUN mkdir -p /opt/quarto-extensions \
|
||||
# Install TeX Live (for compiling .tex projects with latexmk)
|
||||
# -----------------------------------------------------------------------
|
||||
# Verso compiles .qmd with Quarto and .tex with latexmk; both engines live
|
||||
# side by side. Rather than (almost) all of texlive-full — which pulls in
|
||||
# every CTAN package and takes ~20 min to build — we install a curated set
|
||||
# of meta-packages covering the vast majority of real documents: the latex
|
||||
# base/recommended/extra collections, recommended fonts, science/math
|
||||
# packages, both alternative engines (xetex, luatex), and bibliography
|
||||
# tooling. This is a few GB smaller and noticeably faster to build.
|
||||
# side by side.
|
||||
#
|
||||
# If a document needs a package not included here, add the relevant
|
||||
# texlive-* collection below (e.g. texlive-fonts-extra, texlive-publishers,
|
||||
# texlive-humanities) and rebuild. We deliberately omit inkscape, whose GTK
|
||||
# GUI dependency tree is large and only needed for auto SVG->PDF conversion.
|
||||
# MINIMAL install (current): the upstream-Overleaf approach — scheme-basic
|
||||
# (~300 MB) plus a few essential packages via tlmgr. Fast to build and small.
|
||||
# Many documents that need extra packages (tikz, beamer, siunitx, extra
|
||||
# fonts, ...) will NOT compile out of the box; users can be told to keep
|
||||
# those projects in Quarto/Typst for now.
|
||||
#
|
||||
# TO GO FULL LATER (when the project is mature): change
|
||||
# selected_scheme scheme-basic -> scheme-full
|
||||
# and optionally drop the explicit `tlmgr install` line. That single change
|
||||
# restores a complete LaTeX toolchain at the cost of size/build time.
|
||||
# Alternatively add individual packages to the `tlmgr install` list below.
|
||||
# -----------------------------------------------------------------------
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
texlive-latex-base \
|
||||
texlive-latex-recommended \
|
||||
texlive-latex-extra \
|
||||
texlive-fonts-recommended \
|
||||
texlive-plain-generic \
|
||||
texlive-science \
|
||||
texlive-xetex \
|
||||
texlive-luatex \
|
||||
texlive-bibtex-extra \
|
||||
texlive-extra-utils \
|
||||
latexmk biber chktex fontconfig python3-pygments \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ARG TEXLIVE_MIRROR=https://mirror.ox.ac.uk/sites/ctan.org/systems/texlive/tlnet
|
||||
ENV PATH="${PATH}:/usr/local/texlive/bin/x86_64-linux"
|
||||
|
||||
RUN mkdir /install-tl-unx \
|
||||
&& curl -sSL ${TEXLIVE_MIRROR}/install-tl-unx.tar.gz \
|
||||
| tar -xzC /install-tl-unx --strip-components=1 \
|
||||
&& echo "tlpdbopt_autobackup 0" >> /install-tl-unx/texlive.profile \
|
||||
&& echo "tlpdbopt_install_docfiles 0" >> /install-tl-unx/texlive.profile \
|
||||
&& echo "tlpdbopt_install_srcfiles 0" >> /install-tl-unx/texlive.profile \
|
||||
&& echo "selected_scheme scheme-basic" >> /install-tl-unx/texlive.profile \
|
||||
&& echo "TEXDIR /usr/local/texlive" >> /install-tl-unx/texlive.profile \
|
||||
&& /install-tl-unx/install-tl \
|
||||
-profile /install-tl-unx/texlive.profile \
|
||||
-repository ${TEXLIVE_MIRROR} \
|
||||
&& /usr/local/texlive/bin/x86_64-linux/tlmgr install \
|
||||
--repository ${TEXLIVE_MIRROR} \
|
||||
latexmk \
|
||||
texcount \
|
||||
&& rm -rf /install-tl-unx
|
||||
|
||||
|
||||
# Set up overleaf user and home directory
|
||||
|
||||
Reference in New Issue
Block a user