Like latexdiff, for Typst.
typst-redline shows what changed between two versions of a Typst document. It makes a PDF of the new version with changes marked, bars and change numbers in the margin; a summary at the end lists every change, including those it cannot mark on the page. AI agents wrote this tool.
The gallery shows every kind of mark, each with the files it was made from.
typst-redline compiles with the typst on your PATH, and uses git for comparisons with commits; comparing two files needs no git.
Download the archive for your platform from the Releases page, unpack it and put typst-redline in a folder on your PATH. typst-redline --version checks that it is found.
Alternatively, install it with Rust:
cargo install --git https://github.com/cvsvensson/typst-redline
Add --tag v0.1.0 for a release, or run the command again with --force to update; cargo uninstall typst-redline removes it.
The extension is not on the Marketplace, but the Releases page has one .vsix per platform, each with typst-redline inside. Pick the one for your platform and install it with Extensions: Install from VSIX... in vscode; no PATH setup is needed.
In a git repository:
typst-redline paper.typ # uncommitted changes, since the last commit
typst-redline paper.typ --since HEAD~3 # changes since three commits ago
typst-redline paper.typ --since v1 # changes since a tag, branch or commit hash
typst-redline paper.typ --since v1..v2 # changes between two commits
Run typst-redline without a file in a terminal and it asks which file and which version to compare with, then prints the command it runs and runs it:
Using paper.typ, the only Typst document in this folder.
typst-redline --help lists the options; q quits.
Show the changes to paper.typ.
A commit stands for its own change and every change after it.
Several numbers colour each one's changes on their own; add s for side by side.
1 the last reviewed version
2 changes since the last commit
3 8e8568b 2026-11-19 Revise the body
4 4dc47c8 2026-11-19 Expand the introduction
Number [1]: 4
typst-redline paper.typ --since 833bb8f
Enter takes the first entry and q quits. Several numbers, such as 2 4, show the changes from the oldest of them on and colour each one's changes on their own, as --steps does: here --since 833bb8f --steps HEAD. An s in the answer, alone or with numbers, adds --layout side-by-side. To add any other option, put it on the command line before the questions, as in typst-redline --each-commit, and it is kept in the command that is printed and run.
Without git, compare two copies; quote paths that contain spaces:
typst-redline "thesis v1/thesis.typ" "thesis v2/thesis.typ"
The PDF is written next to the file, or next to the new file when you give two, as <name>.redline.pdf, and its path is printed. With one file, the new version is the file as it is on disk, uncommitted changes included, unless --to <revision> names another.
typst-redline --help lists them too.
Versions
--since <rev>and--to <rev>, as above. As in latexdiff-vc,-r v1is--since v1and-r v1 -r v2is--since v1 --to v2.-L <text>names the old version in the PDF, and a second-Lthe new one.--root <dir>: the folder that holds all of the document's files, for a document that reads files outside its own folder, such as#include "../shared/intro.typ"; for exampletypst-redline thesis/main.typ --root .. Without it, theTYPST_ROOTenvironment variable is used if it is set, and otherwise the folder of the file.
What to mark
--no-movesshows moved text as deleted at its old place and inserted at its new place.--each-commitand--steps <revs|n>colour each change by the commit, or group of commits, that made it (picture, details).--math-markup wholeshows every changed formula whole, the old one and the new one, instead of marking its changed parts.
How marks look (docs/styling.md has the details and pictures)
-t UNDERLINE,-t CHANGEBARand three other types, named after latexdiff's and modelled on them, start from a ready look.--style key=valuechanges one setting, such as--style del=greenor--style ins-fill=nonefor no highlight, and--style my-style.typseveral from a file that holds a dictionary such as(del: green, bars: none); examples. A.typst-redline.typin the project and astyle.typin the user's settings apply by themselves (where).--graphics-markup new-onlyleaves out the old version of a changed formula, figure, table, code block or drawing, andnonealso shows the new one without frame or colour; the bar and the number stay.-p my-preamble.typreplaces the styling whole;--show-preambleprints the built-in one to start from.
Output
-o out.pdfwrites the PDF elsewhere.--layout side-by-side: below.--only-changeskeeps only the pages with marks and the summary, for a long document with a few changes. The pages keep the numbers printed on them, and the summary and margin notes name pages by those numbers. It needs Typst 0.12 or later.--keep-typkeeps the marked Typst source and prints where it is.--typst <path>picks anothertypstthan the one onPATH, and arguments after--go totypst compile, for example-- --font-path fonts.
Without a PDF
--mark-reviewedand--show-reviewed: recipes.--list-filesprints the paths of the files the document is made of.
- A small change in a formula is marked in place; a formula that changed a lot, or whose lines were joined or split, is shown whole.
- A changed figure, table, code block or drawing is shown whole: the old one in a dashed red frame, the new one in a blue frame.
- A moved paragraph or section is shown once, at its new place; at its old place a grey line links to it.
- What cannot be marked on the page is listed on the summary page.
The gallery has a picture and the details of each. With the deleted parts removed, the marked PDF has the same text, layout and numbering as the new version; Known problems lists the exceptions.
The last page, or pages, list every change by its number, section by section, and say in words what is not marked on the pages, with its source. The gallery describes each part.
--layout side-by-side shows each changed page of the old version next to the same page of the new version, leaves out pages without changes, and ends with the summary. Useful for slides that may overflow. It needs Typst 0.14 or later.
typst-redline talk.typ --since HEAD~1 --layout side-by-side
- Send a co-author what changed since the version they read: tag the commit you sent,
git tag sent-to-anna, and later runtypst-redline paper.typ --since sent-to-anna. - What changed since you last read it: run
typst-redline paper.typ --mark-reviewedwhen you have read it, and latertypst-redline paper.typ --since reviewed. - Who changed what:
typst-redline paper.typ --since sent-to-anna --each-commitgives each of up to six commits its own colour (picture).
docs/git.md has the details of these, and recipes for a date, a branch and more than six commits.
The ones you are most likely to meet; see docs/known-problems.md for the full list.
- On a full slide the default layout overflows, because deleted content takes room on the page; use
--layout side-by-sidefor slides. - Some moved text shows as deleted at one place and inserted at the other.
- When a function fails on marked content, the whole document falls back to coarser marks; the summary page says so.
- Only Typst 0.14.2 and 0.15.1 are tested in CI; before Typst 0.14, side by side does not work.
The extension in vscode/ runs typst-redline from VS Code: open a .typ file, click the compare button in the editor's title bar or right-click the file in the Explorer, pick what to compare with, and the PDF with the changes marked opens. vscode/README.md describes the lists, views, commands and settings.
claude-plugin/ is a plugin with a skill that lets Claude Code compile a Typst document and make its redline, for requests like "send me the notes and what changed since Monday". Install it with
/plugin marketplace add cvsvensson/typst-redline
/plugin install typst-redline@typst-redline
Other tools that compare Typst documents: typdiff and typst-diff.
MIT


