Skip to content
Amet13Public

About

Every margin note, back in your source

Topics

Resources

Security policy

Stars

65 stars

Watchers

1 watching

Forks

Repository files navigation

proofback

Every margin note, back in your source.

Website · Browser app · Changelog · Reference · For agents

Your supervisor sent the PDF back with forty-seven marks on chapter 3. proofback reads them and tells you, for each one, the file, line and characters in your LaTeX source it refers to. It keeps a record of what you changed and what you didn't (and why), and writes your replies back into the reviewer's own PDF or a response letter.

  • Precise. SyncTeX plus a TeX-aware aligner finds the exact characters; when proofback is not sure it says "line" or "page only" instead of guessing.
  • Tracked. The record lives in .proofback/ next to your sources and follows them into the next draft with sync.
  • Two-way. Replies go back into the reviewer's PDF (answer) or a response letter (letter); edits come out as a patch you can git apply.
  • Any input. Annotated PDFs (LaTeX or Typst), notes from an email, Word documents, and handwritten marks from a tablet.
  • Agent-ready. --json everywhere, an MCP server, and reviewer text always marked as untrusted.
  • Private. The core makes no network calls; the browser app never uploads a file.

Contents

Why this exists

Reviewers don't edit .tex files. They mark up the PDF in Acrobat, Preview, Zotero or on a tablet, or they send an email full of page numbers. You then search for each sentence by hand across a tree of \input files, miss a few, and write replies that no longer match what you changed. The tools that exist pull annotations out without saying where they belong in the source, jump to one location at a time, rebuild your source from Word, or ask every reviewer to sign up for a platform.

Install

macOS and Linux:

curl -fsSL https://github.com/Amet13/proofback/releases/latest/download/install.sh | sh

Windows (PowerShell):

irm https://github.com/Amet13/proofback/releases/latest/download/install.ps1 | iex

No install at all: open the browser app, which runs on your machine.

From source, VS Code, Node, and PDFium

From source (Rust 1.92 or later):

cargo install --git https://github.com/Amet13/proofback proofback-cli

Each release also carries the VS Code extension (proofback-vscode.vsix) and a Node package:

npm install https://github.com/Amet13/proofback/releases/latest/download/proofback-node.tgz

Positioned PDF text needs PDFium; the release bundles it. Without it, proofback falls back to the text stored in the annotations.

Usage

proofback import review-ch3.pdf --round supervisor-2026-11
proofback list
# id          where                          kind      note                       anchor
# pb_7k2m9q   chapters/method.tex:41:18-23   replace   Replace with "robust"      exact
# pb_3xq1fd   chapters/method.tex:44:1-13    question  Why this threshold?        exact
# pb_d0r4kl   chapters/method.tex:45:1-46:34 delete    (strike-out, no note)      exact

proofback patch pb_7k2m9q pb_d0r4kl | git apply
proofback resolve pb_3xq1fd --status discuss --reply "Chosen by 5-fold CV, see 3.4"
proofback answer -o review-ch3-answered.pdf

The record lives in .proofback/ next to your sources, so it is versioned with them; round files follow a published schema. Each command takes --json, and proofback mcp lets a coding agent work through the list with you.

Supported inputs

Input How proofback anchors it Best accuracy mode
Annotated PDF (LaTeX) SyncTeX narrows each mark to a few lines, text alignment finds the characters With .synctex.gz: exact range. Without: text only, mostly correct line
Notes from an email Page, section and quoted text in each note Exact when the note quotes text, otherwise region or page
Word document Hidden anchors from proofback docx export Exact for exported files; text only for other DOCX files
Typst project The Typst compiler's glyph to source spans Exact range

What happens to each PDF annotation

proofback import turns every reviewer mark into an item, and never drops one without saying so: each skipped subtype gets a summary line with its count (and a skipped array in --json). proofback doctor --pdf review.pdf lists the subtypes a PDF contains.

Every annotation subtype and its result
Subtype Result Kind and location
Highlight item highlight, or comment / question with a note; exact range
StrikeOut item delete, replace, comment or question; exact range
Underline item like Highlight
Squiggly item like Highlight
Caret item insert with text, else comment; insertion point
Text item sticky note: comment or question; the line beside it
FreeText item comment or question; the line beside it
Ink item handwritten mark: comment, body (handwritten mark) without a note; the lines it covers, at best line; strokes close together merge into one item
Square item general (figure on a figure or table); the text inside it
Circle item like Square
Line item general; the text under it
Polygon item general; the text inside it
Stamp item general; the line beside it
FileAttachment item general; the line beside it
Link skipped links, not reviewer marks; counted in the import summary
Widget skipped form fields; counted in the import summary
Sound item voice note: general; the line beside it (the audio is not played or transcribed)
Watermark skipped counted in the import summary
Others (Screen, PrinterMark, TrapNet, 3D, RichMedia) skipped counted in the import summary
Popup not counted the window of another annotation's note, read with it

More inputs and the locator

proofback import notes-from-email.txt          # "p. 12, para 2: unclear"
proofback docx export -o thesis.docx           # send to a Word reviewer
proofback import thesis-reviewed.docx          # tracked changes and comments come back
proofback import paper.pdf                     # Typst projects work the same way

Where does a place in the PDF come from? proofback locate answers without a review round, for tools such as overfull that know a page and a position:

proofback locate --pdf main.pdf --synctex main.synctex.gz --page 3 --rect 72,640,300,652 --json
# {"file": "chapters/method.tex", "line": 41, "column": 18, "end_line": 41, "end_column": 24,
#  "confidence": "exact", "reason": "..."}

Many queries go as JSON Lines on --stdin; the Node package has the same locate.

Where What
Coding agents proofback mcp (MCP server on stdio), docs/agents.md, the agent kit in integrations/
Pull requests GitHub Action: docs/github-action.md
Editor VS Code extension: integrations/vscode
Node require('proofback'): npm/README.md

Accuracy

Measured in CI on every pull request on generated test annotations; no real-world PDFs have been donated yet (details in docs/reference.md):

Input Exact range Wrong anchor
Annotated PDF with SyncTeX 97.8% 0.4%
Annotated PDF, text only 98.7% (98.0% correct line) 0%
Word round trip 100% 0%
Typst 100% 0%
Handwritten marks (ink) never exact by design; right line 89.4% 0%
Real-world PDFs (0 items) no data yet no data yet

The synthetic corpus has 256 annotations on 3 pdfLaTeX projects and 1 Typst project. The real-world set collects PDFs annotated in real applications; see fixtures/real/ to donate one.

A 322-page thesis with 500 notes imports in about 0.3 s.

The test annotations sit on phrases that occur once in the project. In a real review, a marked phrase that repeats elsewhere in your sources falls back to the right line without SyncTeX; with SyncTeX it is usually still exact.

Without SyncTeX and on Overleaf

SyncTeX lets proofback look in the right few lines first, so repeated phrases and short marks still get exact positions. To get the file:

  • Local build: latexmk -pdf -synctex=1 main.tex writes main.synctex.gz next to main.pdf. proofback finds it there.
  • Overleaf: Overleaf always writes output.synctex.gz. Open Logs and output files (next to Recompile), scroll to Other logs and files, and download it. The source zip (File, Download as source) leaves generated files out, and Overleaf's documentation does not say that Git clones include them. Then: proofback import review.pdf --synctex output.synctex.gz. Checked against Overleaf's documentation on 2026-12-01; the download step has not yet been tried in the Overleaf interface itself.

Without the file, proofback import runs in text-only mode and says so, and proofback doctor prints this advice.

Development

crates/                 Rust workspace: core, CLI, MCP server, WebAssembly bindings
fixtures/               LaTeX and Typst projects with built PDFs and SyncTeX files
site/                   website and browser app, static
npm/                    npm package
integrations/           agent kit, VS Code extension
packaging/              installers, Homebrew formula, GitHub Action helper
docs/                   plan, agent guide, GitHub Action guide, interop spec
cargo xtask pdfium                                 # once: pinned PDFium for tests
PROOFBACK_REQUIRE_PDFIUM=1 cargo test --workspace  # tests and accuracy gates
cd tools && npm ci && npx playwright install chromium && npm run check   # website

What 1.0 keeps stable (commands, exit codes, JSON, schemas, Node API, MCP tools) is in docs/stability.md. Rules for changes (accuracy gates, untrusted input, no telemetry) are in AGENTS.md; releases are automatic (docs/releasing.md). Security reports: SECURITY.md.

Related: overfull

overfull checks a paper before you submit it. proofback starts after someone has read it. Together they close the loop:

  1. Before you submit: overfull check finds broken references, PDF problems and venue rule violations.
  2. After they read it: proofback import puts every mark on its source line; you work through the items with apply, resolve and sync.
  3. Before you resubmit: overfull check again, overfull diff for a PDF with the changes highlighted, and proofback letter --diff-pdf for the response.

proofback never runs overfull. When the project has overfull.yml, apply and sync end with a one-line reminder (hints = false in the config turns it off). See docs/agents.md.

License

Code: MIT or Apache-2.0, at your option. Bundled website fonts: SIL Open Font License 1.1 (see site/fonts/).

About

Every margin note, back in your source

Topics

Resources

Security policy

Stars

65 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages