Skip to content

Repository files navigation

LILT — LaTeX Intelligent Localization Tool

Python 3.13+ License: MIT CI Status

Continuous LaTeX localization engine (CLI) — local-first, structure-preserving, TM-backed, LLM-assisted.

LILT turns .tex prose into localized .tex without pasting raw structure into a chat model. It parses into segments, masks macros/math into placeholders, stores state in a Translation Memory, runs Draft → Critique → Refine, validates structure, then rebuilds the document. You compile the PDF yourself.

Not affiliated with Lilt Inc. / lilt.com.
The name is the acronym LaTeX Intelligent Localization Tool.
Not on PyPI as lilt (that name is another project). Install from Git; distribution package: latex-lilt; CLI: lilt.

Who it is for

Good fit Not a fit
Authors, translators, and maintainers of academic/technical LaTeX Markdown / UI / app string i18n
People who run OpenAI-compatible LLMs (local or cloud) CAT / WYSIWYG seekers; drag-and-drop SaaS
Incremental TM workflows with human review and Git-friendly JSONL “Fire and forget” with no validation
Compile-minded integrity over blind fluency Users of commercial Lilt or pip install lilt

Why LILT

  • Integrity first — placeholders and syntax validation before a translation is accepted.
  • Human priorityreviewed / approved / locked are never auto-overwritten.
  • TM as source of truth — append-oriented JSONL under .lilt/tm/.
  • Local-first LLM — OpenAI-compatible endpoints (LM Studio, Ollama-style, or cloud) per stage.
  • Continuous — re-sync when sources change; resume interrupted translates; checkpoints.

Not a generic CAT tool, not gettext/po4a, not a PDF compiler.

Key features

  • Multi-file LaTeX via \input / \include discovery on sync
  • Placeholder masking so the model sees prose, not raw structure
  • Reflection stages: Draft → Critique → Refine (or draft-only cost profiles)
  • Human Review queue and CSV/JSON export–import
  • Fail-closed build of localized .tex (optional --allow-partial)
  • TM inspect / budget / status tooling

How it works

.tex  →  Sync (AST → segments + TM)
      →  Translate (LLM Draft → Critique → Refine + validation)
      →  Build (localized .tex)
      →  PDF (your TeX toolchain — not a lilt command)

More: Concepts. Runtime detail: Architecture.

Quick start

Requires Python 3.13+, uv or pipx, and an OpenAI-compatible LLM before translate.

Prefer the official sample: examples/quickstart/.

# Install (Git only — do not use `pip install lilt`)
# Tool install puts `lilt` on your PATH. From a clone, use `uv run lilt` instead.
uv tool install git+https://github.com/aleaz/lilt

cd your-latex-project
lilt project init
lilt project configure .

# Edit .lilt/lilt.yaml — set source_lang, target_lang, llm.base_url, llm.model
# Cloud keys: .lilt/.env (git-ignored)

lilt pipeline sync main.tex
lilt pipeline translate --all
mkdir -p i18n/build
lilt pipeline build main main.tex i18n/build/main.tex
# Success: i18n/build/main.tex exists. Compile PDF yourself if needed.

Full walkthrough: Getting started · First translation · Quick Start example.

Common use cases

Scenario Start here
Academic paper or book Getting started
Multi-file project / resume after interrupt Workflows
Local vs cloud LLM / stages / automation Advanced usage · Configuration
Human review & TM export Human review
Stuck on errors Troubleshooting · FAQ

Supported capabilities

Area Support
Input LaTeX projects (multi-file, macros, math, citations — LaTeX-aware parsing)
LLM OpenAI-compatible HTTP (provider: openai); per-stage models/endpoints
Workflows Sync → translate → build; workflow or sequential modes; TM + review
Integrations CLI + shell automation you own; no product SaaS orchestrator
Limits No OCR/diagrams; no PDF CLI; no corpus/eval in this repo; Windows not first-class tested; Release Candidate (1.0.0rc2) — not GA; CLI/config may still change

Deferred ideas: appendix-deferred.

Documentation

Audience Go to
Users Docs hub · Getting started · Quick Start · Guides · FAQ
Reference CLI · Config
Architecture Architecture · Glossary
Developers Developer Guide
Contributors CONTRIBUTING.md · Contributor Guide
Problems Troubleshooting · SUPPORT.md

Development

git clone https://github.com/aleaz/lilt && cd lilt
uv sync
make ci    # matches GitHub Actions

Details: Development overview. Process: CONTRIBUTING.md.

Project status

Release Candidate 1.0.0rc2 (git tag v1.0.0-rc.2 — see CHANGELOG). Core pipeline (sync, translate, build, review, TM, telemetry) is implemented and tested. Not General Availability. Treat the RC line as SemVer-unstable until a later stable 1.0.0: CLI and config may still change. See maturity.

Community and contribution

License

LILT is released under the MIT License.

Copyright (c) 2026 Alejandro Azario

About

CLI for continuous LaTeX localization using LLMs and Translation Memory (not affiliated with Lilt Inc.)

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages