v0.1.11 — Early Beta
Translate scientific documents with AI¶
Lesia is an open-source Python library and CLI that automates the translation of LaTeX, Markdown, Typst, MyST, and Jupyter documents — preserving structure, formatting, and syntax while you stay in control.
Everything you need for document translation¶
Built for researchers, scientists, and technical writers who need accurate, structure-preserving translations at scale.
The system protects LaTeX commands, Typst syntax, Markdown fences, and code blocks from being altered during translation.
Your postedits are precious. Cache-aware correction system lets you override specific translations. Your corrections survive subsequent retranslations.
Integrates easily into any workflow and allows you to collaborate with anyone.
Define domain-specific glossaries to ensure consistent translation of technical terms across your entire project.
Initialize and manage translation projects with a .lesia config file. Track source and target directories per language.
Persistent on-disk cache with checksum-based deduplication. Never pay for the same translation twice — only changed chunks are re-translated.
Automatically sync non-translatable assets (images, bibliography, fonts) between language directories. Only text changes where it should.
Switch between Google Gemini, OpenAI, Anthropic, xAI, and others. Use a secondary reasoning model for complex passages.
Free access to open-source models via ILaaS; no API key required for Paris-Saclay members if running your translations from MyDocker.
Embed Lesia into your own scripts and pipelines. Full async support for concurrent translation of multiple files.
Supported Formats¶
Works with your documents — from academic papers to data science notebooks, Lesia handles the most popular scientific markup languages.
🔶 LaTeX
📝 Markdown
📓 Jupyter Notebooks
⚡ MyST
🔷 Typst
Open and Secure¶
Lesia is completely free and open-source, you may download it, change it, redistribute as you wish. Moreover, the data is yours, you may choose any LLM model provider even the models you run locally.
Your choice of AI model¶
Lesia supports major commercial providers as well as self-hosted and institutional deployments.
♊ Google Gemini
🤖 OpenAI
🔬 Anthropic
✖️ xAI / Grok
🇫🇷 iLaaS
🐳 MyDocker
Get up and running¶
Install as a standalone CLI tool or embed the library in your own Python project.
# Requires uv (https://docs.astral.sh/uv/)
uv tool install lesia
# Verify installation
lesia --help# pip
pip install lesia
# uv
uv add lesiagit clone https://github.com/DobbiKov/lesia
cd lesia
uv sync
# Run tests
uv run pytestimport asyncio
from lesia.project_manager import init_project
from lesia.enums import Language
# Initialize project
project = init_project("my_project", "/path/to/root")
# Configure source
project.set_source_directory("docs_fr", Language.FRENCH)
project.add_target_language(Language.ENGLISH)
project.set_file_translatability("docs_fr/main.tex", True)
# Sync static assets and translate
project.sync_untranslatable_files()
asyncio.run(project.translate_single_file(
"docs_fr/main.tex", Language.ENGLISH, None
))Supported Languages¶
Translate between any combination of the supported natural languages.
🇬🇧 English
🇫🇷 French
🇩🇪 German
🇪🇸 Spanish
🇺🇦 Ukrainian
🇦🇲 Armenian
🌐 Add your own
Projects that use Lesia¶
Open-source projects and tools that actively use Lesia in their workflow.
Linear Algebra Lecture Notes in English, French and Ukrainian.
Topology Lecture Notes in English, French and Ukrainian.
Statistics Lecture Notes in English, French and Ukrainian.
Documentation for MyDocker service of Université Paris-Saclay.
Cite Lesia¶
Using Lesia in your research? Please cite it as follows.
@software{korotenko_lesia_2026,
author = {Korotenko, Yehor},
title = {lesia},
month = {jun},
year = {2026},
publisher = {Zenodo},
version = {v0.1.7},
doi = {10.5281/zenodo.20610935},
url = {https://doi.org/10.5281/zenodo.20610935}
}