Comments and source-PDF jumps for writing a LaTeX paper together in VS Code. Comments are lines in the .tex files (\cmt from collab.sty), so they travel with the text through Git branches and pull requests, show up in the PDF, and are readable by every co-author's AI agent.
Set up a repository
Run Collab LaTeX: Set Up This Repository in any repository with a LaTeX paper. It adds collab.sty and \usepackage{collab}, a GitHub build (paper PDF and diff PDF for every pull request), shared rules for people and AI agents (a section of AGENTS.md, docs/workflow/, Claude Code commands, COLLABORATING.md), Git settings and VS Code settings. It shows the full list first, keeps your own files, and never commits.
In the PDF viewer
Open it with the Open PDF button on a .tex tab, or Open With… → Collab LaTeX PDF Viewer on a PDF.
Select text → Go to LaTeX: opens the .tex file with that text selected.
Select text → Comment: write a comment. It is saved as a \cmt line after the sentence, the PDF rebuilds, and a pin appears.
Pins in the margin: hover to highlight the text, click to read, reply, resolve or go to the source.
Double-click highlighted text to open its comment. Ctrl+click anywhere: jump to the source.
💬 in the toolbar: all comments, and People to choose each person's colour.
In the LaTeX editor
Select text → Go to PDF (Ctrl+Alt+G, right-click menu, or the light bulb): shows and highlights the place in the PDF.
Select text → Comment on Selection (Ctrl+Alt+C, right-click menu, or the light bulb): a comment box opens; the comment is saved as a \cmt line and appears in the PDF after the rebuild.
Each comment shows as a thread in the gutter, with Reply and Resolve. All threads are listed in VS Code's Comments panel. The anchor text is underlined.
Requirements
A TeX distribution with latexmk and synctex (TeX Live or MiKTeX).
collab.sty loaded in the paper (\usepackage{collab}).
Builds with -synctex=1. LaTeX Workshop does this by default; without it, this extension runs latexmk on save.
Settings
collabLatex.author: your initials (default: from git config user.name).
collabLatex.rootFile: the main .tex, if it cannot be found automatically.
collabLatex.build: auto (LaTeX Workshop if installed, else latexmk), latexmk or off.