
rosettex
io.github.20235106-huynk/rosettex
Translate scientific papers (TeX source or born-digital PDF) and rebuild the PDF with its layout.
Documentation
rosettex ๐โจ
Translate scientific papers into 19+ languages โ and keep the paper's own layout.
Quick Install โข Features โข How It Works โข Connect Your Agent โข Languages โข Manual Install
A born-digital PDF (left) and rosettex's Vietnamese output (right): same page, same figure, same fonts for names and formulas. Paper: Berestov et al., CEUR-WS Vol-3550 (CC BY 4.0).
rosettex lets an AI coding agent translate a whole scientific paper โ from its TeX source or from a
born-digital PDF โ and returns a PDF with the paper's own layout.
rosettex does not translate by itself โ your agent is the translator. rosettex does the engineering around it: it splits the paper into question sheets with protected placeholders, checks every answer against strict rules, and typesets the result so formulas, figures, citations and links stay real, selectable and clickable. It ships as a CLI, an MCP server and an Agent Skill, packaged as a plugin for the major agent harnesses.
๐ Key Features
| Feature | Description |
|---|---|
| ๐ค Built for agents | Every command speaks --json and returns the next command to run (next_argv); an agent can drive the whole loop and resume after any interruption. |
| ๐ Original layout | From TeX source the paper is rebuilt with its own class and packages; from a PDF the original pages are kept and only the text in the translated boxes is replaced. |
| ๐งฎ Formulas stay formulas | Math, citations and links become placeholders (โฆm1โง, โฆl2โง) the translation must keep; on PDFs they are copied as vector snippets of the original, and a formula the agent copies verbatim is protected automatically. |
| ๐ก๏ธ Strict checks | rosettex check catches lost placeholders, changed numbers, glossary violations, untranslated text and over-long answers before anything is built. |
| ๐ Repair loop | When text does not fit, build answers needs_repair with the segments to shorten and by how much; nothing is silently cut. |
| ๐ Many scripts | Latin, Cyrillic, CJK, Arabic/Persian/Urdu, Devanagari, Bengali, Tamil, Thai, Myanmar, Ethiopic โฆ with bundled fonts (Noto, Vazirmatn) and copy/search-friendly output. |
| ๐ One plugin, many harnesses | Claude Code, Codex, GitHub Copilot, VS Code, Cursor, Antigravity, Gemini CLI, Hermes, Devin and more install it from this repository; any MCP client or Agent Skills host can use it too. |
| ๐ป Linux, macOS, Windows | CI builds translated PDFs (Vietnamese, Arabic, Japanese) on all three. |
๐ Two Routes
| From TeX source | From a born-digital PDF | |
|---|---|---|
| Input | folder, archive, arXiv ID or link | a PDF with a text layer (journals, arXiv PDF-only, Word exports) |
| Output | the paper recompiled with LuaLaTeX in the target language | the original pages with translated text in the same boxes |
| Best for | any paper with source; changes of writing direction (e.g. English โ Arabic) | papers without source |
๐ How It Works
flowchart LR
A[๐ TeX source<br/>or PDF] --> B[๐งฉ rosettex prepare<br/>sheets + placeholders]
B --> C[๐ค Your agent<br/>translates]
C --> D[๐ก๏ธ rosettex check<br/>placeholders ยท numbers ยท terms]
D --> E[๐๏ธ rosettex build<br/>LuaLaTeX]
E -->|needs_repair| C
E --> F[๐ Translated PDF]
rosettex fetch 2108.07760 -o work # folder, archive, arXiv ID/link, or a local .pdf
rosettex prepare work --lang vi # question sheets in work/read/, glossary in work/terms.md
# โฆ the agent appends "sNNNN <translation>" lines to work/out/NN.txt โฆ
rosettex check work # repeat until ok
rosettex build work --out paper.vi.pdf # may ask for shorter text (needs_repair), then build again
๐ Quick Install: Let Your Agent Do It
[!TIP] Copy the prompt below and send it to your coding agent. It installs everything into your home folder and asks before any download.
Install rosettex (https://github.com/20235106-huynk/rosettex) and connect it to yourself: install uv if it is
missing, then `uv tool install rosettex`, `rosettex setup` (follow its next_argv), `rosettex doctor`, and the rosettex
plugin for your harness from the README (or `rosettex install-skill`). No sudo; ask me before any download or installer.
Then just ask, for example: "Translate arXiv 1512.03385 into Simplified Chinese and save it as ~/papers/resnet.zh.pdf."
The agent fetches the paper, picks the field and key terms, translates sheet by sheet, runs check until it passes,
builds the PDF, shortens any text build reports as too long, and tells you where the PDF is.
๐ Connect Your Agent
This repository is a plugin at its root: one skill (skills/rosettex) and one MCP server that uvx starts from the
release on PyPI (uvx rosettex==<version> mcp), so uv must be on PATH. The first run of setup installs TeX (the agent
asks you first).
Install as a plugin
| Harness | Command |
|---|---|
| Claude Code | /plugin marketplace add 20235106-huynk/rosettex, then /plugin install rosettex@rosettex |
| Claude Desktop / claude.ai | Customize โบ Plugins โบ Add marketplace 20235106-huynk/rosettex |
| Codex CLI / ChatGPT desktop | codex plugin marketplace add 20235106-huynk/rosettex, then install rosettex from /plugins (or the app's Plugins directory) |
| GitHub Copilot CLI | copilot plugin install 20235106-huynk/rosettex |
| VS Code (Copilot) | Chat: Install Plugin from Source with the repository URL, or add 20235106-huynk/rosettex to chat.plugins.marketplaces |
| Antigravity | agy plugin install https://github.com/20235106-huynk/rosettex (or the strict-clean slim package in plugins/antigravity) |
| Gemini CLI | gemini extensions install https://github.com/20235106-huynk/rosettex |
| Hermes | hermes plugins install 20235106-huynk/rosettex/plugins/hermes, then hermes plugins enable rosettex |
| Devin (Desktop, CLI, cloud) | devin plugins install 20235106-huynk/rosettex; cloud: Customize โบ Add plugin โบ From repository |
| Factory Droid | droid plugin marketplace add 20235106-huynk/rosettex, then droid plugin install rosettex@rosettex |
| Auggie | auggie plugin marketplace add 20235106-huynk/rosettex |
| Junie CLI | /extensions marketplace add 20235106-huynk/rosettex, then /extensions install rosettex |
| Qwen Code | qwen extensions install 20235106-huynk/rosettex |
| goose | goose plugin install https://github.com/20235106-huynk/rosettex.git |
| Kiro IDE | Powers โบ Add Custom Power โบ Import power from a repository URL |
Skill + MCP server (every other harness)
- Install the skill:
rosettex install-skill(writes~/.agents/skills,~/.claude/skills,~/.gemini/config/skills, and the Cline, Kiro, Qoder, Trae and CodeBuddy skill folders when they exist), ornpx skills add 20235106-huynk/rosettex. - Add the MCP server. Most harnesses (Cursor, Cline, Kiro, Qoder, Kimi Code, Pi, CodeBuddy, Warp, Junie, Auggie, Tabnine, Trae, JetBrains AI Assistant) take the standard block in their MCP settings:
{ "mcpServers": { "rosettex": { "command": "uvx", "args": ["rosettex", "mcp"] } } }
Harnesses with their own MCP syntax
| Harness | Where | Entry |
|---|---|---|
| OpenCode | opencode.json | "mcp": { "servers": { "rosettex": { "type": "local", "command": ["uvx", "rosettex", "mcp"] } } } |
| Kilo | kilo.jsonc | "mcp": { "rosettex": { "type": "local", "command": ["uvx", "rosettex", "mcp"] } } |
| Crush | crush.json | "mcp": { "rosettex": { "type": "stdio", "command": "uvx", "args": ["rosettex", "mcp"] } } |
| goose | config.yaml | extensions: { rosettex: { name: rosettex, type: stdio, enabled: true, cmd: uvx, args: [rosettex, mcp], envs: {}, timeout: 300 } } |
| Mistral Vibe | config.toml | [[mcp_servers]] with name = "rosettex", transport = "stdio", command = "uvx", args = [...] |
| Amp | CLI | amp mcp add rosettex -- uvx rosettex mcp |
| Zed | settings.json | "context_servers": { "rosettex": { "command": "uvx", "args": [...] } } |
| Zencoder | VS Code settings.json | "zencoder.mcpServers" with the standard block |
| Visual Studio | %USERPROFILE%\.mcp.json | "servers": { "rosettex": { "command": "uvx", "args": [...] } } |
| GitHub Copilot cloud agent | repository Settings โบ Copilot โบ MCP servers | "type": "local", "tools": ["*"], and install uv in copilot-setup-steps.yml |
Harnesses that accept only remote MCP servers (Android Studio, Replit, ChatGPT custom MCP) cannot run this stdio server;
use the skill and the CLI there. Without any integration, tell the agent: "Run rosettex guide and follow it."
๐ ๏ธ Manual Install
Commands, requirements and environment variables
Requirements
- Python โฅ 3.11 and uv.
- LuaLaTeX:
rosettex setupinstalls a private TinyTeX into~/.rosettex(asks first; retries flaky CTAN mirrors), orrosettex setup --tex systemuses an existing TeX Live.
uv tool install rosettex
rosettex setup # or: rosettex setup --tex system
rosettex doctor
rosettex install-skill
Environment variables
ROSETTEX_HOME: where rosettex keeps its TeX toolchain and state (default~/.rosettex).
Update and uninstall
uv tool upgrade rosettex && rosettex install-skill --force
rosettex install-skill --remove && uv tool uninstall rosettex # then delete the folder ~/.rosettex
๐ Languages
Language data covers about 50 target languages (src/rosettex/data/langs/). Tested end to end:
| Script | Languages |
|---|---|
| Latin | Vietnamese, French |
| Cyrillic | Russian |
| Han / Kana / Hangul | Chinese (Simplified, Traditional), Japanese, Korean |
| Arabic (RTL) | Arabic, Persian, Urdu |
| Indic | Hindi, Bengali, Gujarati, Kannada, Tamil, Telugu |
| Southeast Asian | Thai, Myanmar |
| Ethiopic | Amharic |
โ ๏ธ Limits
- The PDF route needs a born-digital PDF with a text layer (no OCR) and keeps the writing direction: a left-to-right paper cannot become right-to-left there โ use the TeX source for that.
- Table contents are not translated; scanned PDFs, vertical writing and PDF forms are not supported.
- Very tight layouts may need shorter translations (
needs_repair) or a slightly smaller font.
๐ Privacy and network access
rosettex runs on your machine: no server, no account, no telemetry. It goes online only to download what you ask for โ
a paper from arxiv.org (fetch), the TeX toolchain from github.com and mirror.ctan.org (setup, after you agree), and
the package from PyPI when uvx starts the MCP server. Local papers are never uploaded. Your AI agent, not rosettex,
does the translating; what it sends to its model provider follows that provider's policy. Details:
PRIVACY.md.
๐ License
MIT โ see LICENSE. Bundled fonts are under the SIL Open
Font License 1.1 (src/rosettex/data/fonts/LICENSES/). Release notes: CHANGELOG.md.
rosettexpip install rosettex