Quick Start¶
This guide will get you up and running with jettex in minutes.
Step 1: Install the Package¶
Step 2: Install TinyTeX¶
This downloads and installs TinyTeX (~100 MB). You only need to do this once.
Step 3: Compile Your First Document¶
Create a simple LaTeX file hello.tex:
Compile it:
import jettex
result = jettex.compile_tex("hello.tex")
if result.success:
print(f"PDF created: {result.output_file}")
else:
print(f"Compilation failed: {result.stderr}")
Using Different Engines¶
jettex supports multiple LaTeX engines:
Automatic Package Installation¶
The killer feature of jettex is automatic package installation. When you use compile_tex(), missing packages are automatically detected and installed:
# This document uses packages that might not be installed
result = jettex.compile_tex("complex_document.tex")
# jettex will:
# 1. Try to compile
# 2. Detect missing packages from errors
# 3. Install them automatically
# 4. Retry compilation
Package Management¶
Install packages manually:
# Install specific packages
jettex.tlmgr_install(["tikz", "pgfplots", "beamer"])
# Search for packages
results = jettex.tlmgr_search("diagram")
# Update all packages
jettex.tlmgr_update(all_packages=True)
Command Line Usage¶
jettex provides a beautiful CLI with Rich formatting:
# Install TinyTeX (with progress bar)
jettex install
# Compile a document (with spinner and styled output)
jettex compile document.tex
# Install packages
jettex install-pkg tikz beamer
# List installed packages (formatted table)
jettex list
# Verbose mode for debugging
jettex -v compile document.tex
# Quiet mode for scripts
jettex -q install
See the full CLI Reference for all options.
Next Steps¶
- Learn about Compiling Documents in detail
- Understand Auto-Install for missing packages
- Explore the full API Reference