jettex¶
A lightweight Python wrapper for TinyTeX - install, compile LaTeX, and auto-manage packages.
Features¶
- Easy Installation - Install TinyTeX with a single function call
- LaTeX Compilation - Compile documents with pdflatex, xelatex, or lualatex
- Automatic Package Installation - Automatically detect and install missing LaTeX packages (like R's tinytex)
- Package Management - Full tlmgr wrapper for installing, removing, and updating packages
- Cross-Platform - Works on Windows, macOS, and Linux
- Beautiful CLI - Rich terminal interface with progress bars, spinners, and styled output
Quick Example¶
import jettex
# Install TinyTeX (only needed once)
jettex.install_tinytex()
# Compile a document with automatic package installation
result = jettex.compile_tex("document.tex")
if result.success:
print(f"PDF created: {result.output_file}")
Why jettex?¶
Traditional LaTeX distributions like TeX Live or MiKTeX are large (several GB) and complex to manage. TinyTeX solves this by providing a minimal LaTeX distribution that you can extend as needed.
jettex brings TinyTeX to Python with:
| Feature | Traditional LaTeX | jettex |
|---|---|---|
| Installation size | 2-7 GB | ~100 MB |
| Missing packages | Manual install | Auto-install |
| Python integration | Complex | Simple API |
| Cross-platform | Varies | Consistent |
Comparison with R's tinytex¶
This package provides feature parity with R's tinytex package:
| Feature | R tinytex | jettex |
|---|---|---|
| Install TinyTeX | tinytex::install_tinytex() |
jettex.install_tinytex() |
| Compile LaTeX | tinytex::pdflatex() |
jettex.pdflatex() |
| Auto-install packages | Automatic | jettex.compile_tex() |
| Package management | tinytex::tlmgr_* |
jettex.tlmgr_* |
Installation¶
See the Installation Guide for more options.
License¶
MIT License - see LICENSE for details.
TinyTeX itself is licensed under GPL-2.