TransLaTeX is a simple tool for translating LaTeX projects using Large Language Models. It can automatically translate LaTeX sources from any language to any other language with precision and customization.
可能有较多 bug,欢迎 报告问题 | 中文 UI 有待填坑,目前进度 0%
Paper that is automatically translated by TransLaTeX:
Intuitive text-based user interface:
Install TransLaTeX with pipx:
pipx install git+https://github.com/habaneraa/TransLaTeX.git
And launch the app in CLI directly!
trans-latex
If you do not use pipx, you can install TransLaTeX in your Python virtual environment.
Create a Python 3.12 virtual environment and run:
pip install git+https://github.com/habaneraa/TransLaTeX.git
Or clone the source code:
git clone https://github.com/habaneraa/TransLaTeX.git
cd TransLaTeX
pip install -e .
Then launch the application by:
python -m trans_latex
Q: How to copy/paste texts in the terminal UI?
A: Try Ctrl+Shift+C/V
. This works on Windows Terminal.
- Download the LaTeX sources from arXiv.
- Find and parse the main document source file and recursively find all referenced ".tex" source files.
- LLMs could have limited context length. A single paper may have more than 20k tokens. It will divide the LaTeX texts into smaller pieces with a proper size (smaller than the specified chunk size).
- Use LLM API service (e.g. ChatGPT from OpenAI) to translate all of the LaTeX text chunks.
- Create a new project with the translated files, keeping the project structure unchanged.
- Compile the source and obtain the translated paper! (by yourself)