Skip to content

Repository files navigation

Read arXiv

Read arXiv in your language. The translation sits beside the paper, and the formulas, the figures and the layout keep working.

License: GPL-3.0 Chrome 131+ CI

简体中文

demo-1600.mp4

Read arXiv is a reading and translation extension built for one kind of page: arXiv's HTML papers.

Translate a paper with a general-purpose extension and it tends to come apart — formulas turn into source or garbage, citations stop working, tables collapse, and checking a line against the original means scrolling back and forth. Read arXiv is built for these pages and nothing else. You get the paper back in your language, still working: what you are reading is a paper, not just a translation.

What it does

Bilingual reading, three ways.

Side-by-side mode Stacked mode Translation-only mode
Side by side
Two columns, figures and tables paired across both.
Stacked
The translation under each paragraph.
Translation
The original hidden; references stay bilingual.

Switch between them whenever you like, and back to the original whenever you want.

Aligned sentence by sentence. Rest on any sentence and the matching one lights up on both sides, so you never have to count your way through a long paragraph to find which translation belongs to which line. It works with every service, and the pairing comes from the translation itself rather than from guesswork — where a service cannot give one, the sentence simply does not light up.

Hovering a sentence bands it on both sides

In translation-only mode there is no second column, so resting on a sentence brings its original to you instead — in the margin where there is room, otherwise just below the line, as in the third screenshot above.

The paper still works. Formulas are still formulas, citations are still clickable, and tables, footnotes and the table of contents are all where the author left them. Translating a paper does not cost you the ability to read it.

Numbered display equations and inline mathematics intact in a translated paper

The words inside figures are translated too. Labels and axes in vector charts, and text inside bitmap images, with the translation laid over the original; hover to see what was underneath. Text in a bitmap is recognised in your browser by a model that comes with the extension: nothing to install, on any system, and the image never leaves your machine.

A figure's labels translated in place over the original

The translation looks how you want. Colour, opacity and underline are yours to set, and there is a blur-until-hovered style for reading the original first and checking yourself afterwards.

Machine translation misreads terminology and will occasionally change a claim. Keeping the original beside you is not a nicety — it is how you catch that.

Start reading

Not on the Chrome Web Store yet, so it is built from source. Desktop Chrome 131 or newer. arXiv's HTML papers only — PDFs are not translated.

  1. Build it.

    pnpm install
    pnpm build
  2. Load it. Open chrome://extensions, turn on Developer mode, choose Load unpacked, and select .output/chrome-mv3.

  3. Open a paper at arxiv.org/html/… and click the floating button at the edge of the window, or press Alt+T — or use the toolbar button, the right-click menu, or the popup. On a paper's abstract page or its PDF the same button opens the paper and starts translating in one step, as does the Bilingual version link beside arXiv's own HTML link.

Updating. Pull, run pnpm build again, then press the reload button on the extension's card in chrome://extensions. Restarting Chrome is not enough: it keeps running the previous build's background beside the new pages. Your settings are kept and carried over to the new version.

Translation services

Service API key Notes
Microsoft Translator not needed The default.
Google Translate not needed
Chrome's built-in translation not needed Runs on your machine, offline, once Chrome has downloaded the language pack.
Any OpenAI-compatible API yours OpenRouter, DeepSeek, Ollama, LM Studio and the like. Prompts and the glossary apply here.

Add up to twenty of them in the settings; each is saved with its own key and model. When the chosen service fails mid-paper — an expired key, a spent quota, a dropped connection — the rest of the page falls back to a free one rather than stopping, and the popup says what happened.

Prompts ship with the extension and can be copied and edited, and a glossary keeps a term reading the same throughout a paper. Both apply only to the LLM services. The target language list covers 179 languages; where a service does not support your choice, the popup says so before you start.

Where the text goes

Paragraphs are sent to whichever service is selected, so the paper's text reaches Microsoft's or Google's servers, or the API address you configured yourself. An LLM service also receives the prompt you selected, the glossary entries that match the passage, and the paper's title, abstract and section heading as context. Two arrangements keep the text on your machine: Chrome's built-in translation, and a local LLM such as Ollama or LM Studio.

Falling back to a free service when the chosen one fails is on by default, which means a failure can send the rest of a paper somewhere you did not pick. Turn it off in the settings to stay with one service. Your API keys are held in the browser's extension storage and are never written to logs or to the translation cache; saved translations stay on your machine. A figure is read locally and the image itself is never uploaded, but the words found in it are then translated like any other text. The full account is the privacy policy.

How it works

arXiv's HTML is generated by LaTeXML, so every element on the page is labelled with what it is. Read arXiv works from those labels instead of guessing at the page, which is how it tells a displayed equation from a caption, a bibliography entry from a footnote, or a table of numbers from a table of prose. The labels are read in one place, and the rules built on them are versioned with the cache, so a change to them does not leave stale translations behind.

flowchart LR
  A["extractor<br/>LaTeXML rules"] --> B["scheduler<br/>what is on screen"]
  B --> D["protector<br/>formulas out,<br/>placeholders in"]
  D --> E["background<br/>cache, batch, retry, fall back"]
  E --> F["validate + rehydrate<br/>placeholders back to nodes"]
  F --> G["renderer<br/>inserted as a sibling"]
Loading

The rules that decide what is a translatable block live in one module and nowhere else. The placeholder engine, the three render modes and the restore path are the parts written from scratch for this project; the request queue, the retry policy, the cache and the language tables are ported from the projects credited below.

docs/DESIGN.md is the current design — the DOM invariants are §7.1, the placeholder protocol §6, the services §8 and image translation §15 — with the measurements beside the decisions they justify.

Status

Version 0.4.1 (CHANGELOG.md); the Chrome Web Store listing is pending, so it is built from source for now. Everything above works today — translating, the three layouts, showing the original, the four services, sentence alignment, figure translation and the settings. The roadmap is issue #155.

Out of scope for now: other paper sites, PDFs, Firefox and Safari.

Development

pnpm dev                 # WXT dev build, loads into Chrome
pnpm typecheck           # tsc --noEmit; vitest does not type-check
pnpm lint                # Biome, plus the English and platform-boundary checks
pnpm test                # Vitest, happy-dom
pnpm build

pnpm e2e                 # real Chromium with the extension loaded
pnpm e2e:layout          # side-mode layout contracts
pnpm e2e:a11y            # A/B axe audit: only what the extension introduces
pnpm e2e:image           # figure translation, bitmaps read by the built-in recogniser
pnpm e2e:placeholders    # placeholder survival through the real services
pnpm fixtures:stats      # rule coverage across the fixture papers

The first four are what CI runs, and what a change has to pass before review.

The unit tests run on happy-dom; the end-to-end suites drive a real browser with the extension loaded. Real arXiv papers are the fixtures the rules and the renderer are tested against: the ones under a Creative Commons licence are committed, the others are downloaded from a pinned version and verified before the first test (tests/fixtures/README.md). Between them they cover dense inline mathematics, theorem environments, algorithm and code blocks, large tables, footnotes, SVG figures, LaTeXML output from 2023 onwards, and pages where arXiv's own conversion failed and the extension has to survive rather than translate. One further fixture is synthetic, holding the structures LaTeXML can emit that none of the sampled papers happened to use.

Three invariants are the ones to keep green: restoring must leave the document node-for-node identical, every text node must fall under exactly one rule, and every placeholder must survive the round trip.

Contributions are welcome. Read CLAUDE.md first — it records the constraints this codebase is built under, and a change that violates one of them will not be right no matter how well it is written.

Built on

Read arXiv ports code from three GPL-3.0 translation extensions, and is grateful to all three:

  • KISS Translator — translation styles, and the approach to rich-text placeholders
  • Read Frog — the request queue, batching, retry policy, viewport scheduling, the prompt library and the language tables
  • FluentRead — the Dexie cache

Text in bitmap figures is recognised by PaddleOCR's PP-OCRv6 tiny models (Apache-2.0) on ONNX Runtime Web (MIT), through eSearch-OCR (Apache-2.0); the figure-overlay rendering follows ImageTrans. Every ported file names its source in its header; docs/THIRD_PARTY.md is the register.

License

Copyright © 2026 SRjoeee. GPL-3.0, the same licence as the projects it is built on.

This program is free software: you can redistribute it and modify it under the terms of version 3 of the GNU General Public License as published by the Free Software Foundation. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the licence for details.


Read arXiv is an independent project. It is not affiliated with, or endorsed by, arXiv or Cornell University.

About

Bilingual translation for arxiv.org/html that keeps the paper's structure and can be undone

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages