Skip to content

feat: reduce LaTeX dependency to minimal required packages#45

Open
sincerelyyyash wants to merge 3 commits intogambitproject:mainfrom
sincerelyyyash:feat/reduce-latex-deps
Open

feat: reduce LaTeX dependency to minimal required packages#45
sincerelyyyash wants to merge 3 commits intogambitproject:mainfrom
sincerelyyyash:feat/reduce-latex-deps

Conversation

@sincerelyyyash
Copy link

Replace texlive-full (~1.5 GB) with a minimal set of packages that provides exactly what draw_tree needs:

texlive-latex-base - pdflatex engine and core LaTeX
texlive-latex-extra - standalone document class
texlive-pictures - PGF/TikZ with shapes and arrows.meta libraries
texlive-fonts-recommended - Latin Modern fonts (lmodern)

Also switch the font in latex_wrapper() from newpxtext/newpxmath (which requires texlive-fonts-extra, ~650 MB) to lmodern, which is available in the much smaller texlive-fonts-recommended package.

Update README.md to reflect the minimal install commands for Ubuntu and add brew install --cask basictex as a lightweight macOS option.

Closes #41

Note: Submitting this as part of my GSoC 2026 application for Project 2 (GameInterpreter), as suggested in the outreach email.

Replace texlive-full (~1.5 GB) with a minimal set of packages that
provides exactly what draw_tree needs:

  texlive-latex-base    - pdflatex engine and core LaTeX
  texlive-latex-extra   - standalone document class
  texlive-pictures      - PGF/TikZ with shapes and arrows.meta libraries
  texlive-fonts-recommended - Latin Modern fonts (lmodern)

Also switch the font in latex_wrapper() from newpxtext/newpxmath
(which requires texlive-fonts-extra, ~650 MB) to lmodern, which is
available in the much smaller texlive-fonts-recommended package.

Update README.md to reflect the minimal install commands for Ubuntu
and add brew install --cask basictex as a lightweight macOS option.

Closes gambitproject#41
TikZ implicitly depends on packages in texlive-latex-recommended (such
as xcolor) which were excluded by --no-install-recommends. Adding this
package resolves the pdflatex compilation failure in CI.
Remove the explicit font package from latex_wrapper() entirely.
Computer Modern is LaTeX's built-in default font and is always
bundled with texlive-latex-base — no additional font package needed.

Also remove texlive-fonts-recommended from the CI install list.
The minimal set is now 4 packages:

  texlive-latex-base        - pdflatex + Computer Modern fonts
  texlive-latex-recommended - xcolor and common TikZ dependencies
  texlive-latex-extra       - standalone document class
  texlive-pictures          - PGF/TikZ + shapes/arrows.meta libraries
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Good first issue] Reduce LaTeX dependency to the minimal required

1 participant