• 📖 Introduction • 🛠️ Installation Guide • ⚙️ Configuration • 🐳 Docker • 📚 Usage • 🖼️ Translation Examples
End-to-end translation from arXiv paper ID to translated PDF. LaTeXTrans have the following Features :
- 🌟 Preserve the integrity of formulas, layout, and cross-references
- 🌟 Ensure consistency in terminology translation
- 🌟 Support end-to-end conversion from original TeX source (automatically downloaded based on the arXiv paper id provided) to translated PDF
With LaTeXTrans, researchers and students can obtain higher-quality arXiv paper translations without worrying about formatting confusion or missing content, thus reading and understanding arXiv papers more efficiently.
LaTeXTrans is a structured LaTeX document translation system based on multi-agent collaboration. It directly translates LaTeX code and generates translated PDFs with high fidelity to the original layout. Unlike traditional document translation methods (e.g., PDF translation), which often break formulas and formatting, LaTeXTrans leverages LLM to translate preprocessed LaTeX sources and employs a workflow composed of six agents—Parser, Translator, Validator, Summarizer, Terminology Extractor, and Generator to achieve the features. The figure below illustrates the system architecture of LaTeXTrans.
git clone https://github.com/PolarisZZM/LaTeXTrans.git
cd LaTeXTrans
pip install -r requirements.txtIf you need to compile LaTeX files (e.g., generate PDF output), install MikTex or TeXLive !
Important
For MikTex, installation please be sure to select "install on the fly", in addition, you need to install additional Strawberry Perl support compilation.
This project no longer uses config/default.toml. All configuration is provided via environment variables.
Required (LLM):
LTX_BASE_URLorBASE_URL: LLM API base URL (e.g.https://api.deepseek.com/v1/chat/completions)LTX_API_KEYorAPI_KEY: LLM API keyLTX_MODELorMODEL: model name (e.g.deepseek-chat)
Optional:
LTX_CONCURRENCYorCONCURRENCY: concurrent translation requests (default10)ARXIV_BASE_URL: base domain for arXiv (defaulthttps://arxiv.org), set this if you use a mirrorLTX_TARGET_LANGUAGE(defaultch),LTX_SOURCE_LANGUAGE(defaulten)LTX_MODE(default0),LTX_USER_TERM(path or empty)APP_PASSWORD: password for logging into the web UI (required when using the Docker service UI)JWT_SECRET(defaultdev-secret),TOKEN_TTL_SECONDS(default604800)
Recommended base_url samples:
| Model | base_url |
|---|---|
| deepseek-chat | https://api.deepseek.com/v1/chat/completions |
| gpt-4o | https://api.openai.com/v1/chat/completions |
| gemini-2.5-pro | https://generativelanguage.googleapis.com/v1beta/openai/chat/completions |
Build the frontend+backend image:
docker build -t latextrans .Run with environment variables:
docker run -p 8000:8000 \
-e APP_PASSWORD=your_password \
-e LTX_BASE_URL=https://api.deepseek.com/v1/chat/completions \
-e LTX_API_KEY=sk-xxx \
-e LTX_MODEL=deepseek-chat \
-e LTX_CONCURRENCY=16 \
-e ARXIV_BASE_URL=https://arxiv.org \
latextransThen open http://localhost:8000, login with APP_PASSWORD, and submit arXiv IDs.
Simply provide an arXiv paper ID to complete translation:
# set envs for local CLI usage
export LTX_BASE_URL=...
export LTX_API_KEY=...
export LTX_MODEL=...
export LTX_CONCURRENCY=10
python main.py --arxiv 2508.18791This command will:
- Download the LaTeX source code from arXiv and extract it
- Execute a workflow consisting of parsing, translation, refactoring and compilation
- Save the translated LaTeX project and the compiled translation PDF in the outputs folder
Note
Although LaTeXTrans supports translation from any language to any language, the current version has only made relatively complete compilation adaptations for translation from English to Chinese. When translating to other languages, the final output pdf may contain errors. We welcome you to raise an issue to describe the problem you have encountered, and we will solve it case by case.
The following are three real translation examples generated by LaTeXTrans, with the original text on the left and translation results on the right.
| Original | Translation |
![]() |
![]() |
| Original | Translation |
![]() |
![]() |
| Original | Translation |
![]() |
![]() |
| Original | Translation |
![]() |
![]() |
📂 See examples/ folder for more cases, including complete translation PDFs for each case.
@article{zhu2025latextrans,
title={LaTeXTrans: Structured LaTeX Translation with Multi-Agent Coordination},
author={Zhu, Ziming and Wang, Chenglong and Xing, Shunjie and Huo, Yifu and Tian, Fengning and Du, Quan and Yang, Di and Zhang, Chunliang and Xiao, Tong and Zhu, Jingbo},
journal={arXiv preprint arXiv:2508.18791},
year={2025}
}







