How the marked manuscript is built

By the Manulyx team · Published 14 October 2026

Most journals ask for a version of a revised paper that shows what changed. Producing it by hand is slow and easy to get wrong, and producing it automatically from LaTeX source is harder than it looks: the marking has to go inside somebody else’s document and still compile. This article describes how Manulyx builds it, and what we check.

What you get

From a stage’s menu, or a .tex file’s, Manulyx offers two PDFs:

Any stage can be compared with any earlier one; by default it is the one the revision answers. Separately, while you work, PDF with these changes marked shows the tracked changes still waiting in a stage, marked the same way.

The comparison never changes your source. The marked files exist for that one build only, compiled beside the stage’s own files so that its document class, styles and figures are found. It is not recorded as a compile of the project, and the PDF in the editor is left as it was. If you already mark your changes yourself, with colour commands or a changes package, Manulyx leaves that as you wrote it: the marked manuscript is an optional tool, not a requirement.

latexdiff first

The comparison is made by latexdiff, an open-source program written for comparing LaTeX documents. It is installed in the image Manulyx runs from, alongside the TeX Live packages the compiler uses, and Manulyx tries it first for every file.

Before comparing, Manulyx joins the two arguments of a running header (\markboth, \markright) onto one line, and asks latexdiff not to mark inside them. Publisher templates often write those arguments on separate lines, and marking between them can push the title off the first page. A changed header is shown as it now reads.

A documented fallback that aims to compile

If latexdiff is unavailable, or does not return a complete result, Manulyx uses its own differ instead; the marked LaTeX in the submission package records which of the two produced it. The fallback follows one principle: a marked manuscript that does not compile is worse than a plainer one that does. So it is deliberately conservative.

Chapters and included files

A thesis keeps most of its text in chapters brought in with \input or \include, and comparing the main file alone would mark almost nothing. So Manulyx compares every .tex file in the stage that also exists in the earlier one and has changed, replaces each with its marked version for that build, and gives the main file the marking commands even when the main file itself did not change.

The highlighted manuscript

The highlighted manuscript is the same comparison with the marking redefined after the preamble: additions in blue, deletions producing nothing. It uses coloured text rather than a background highlight, because a highlight breaks on mathematics and inside tables and colour does not. The fallback’s summary of structural changes is left out of it, since it is a note for the editor rather than part of the manuscript.

When it does not compile

A marked manuscript can still fail, most often because the manuscript itself does not compile. When it does, Manulyx says so rather than handing you an empty file, and the message says how to download the LaTeX it produced so you can see why.

What we check

The tests for the marked manuscript do not ask whether the markup looks right; they ask whether LaTeX produces a PDF from it. Every case is compiled. They cover the cases latexdiff is known to find hard and the ones authors write without thinking: changed prose, a changed table row, a changed figure caption, display and aligned equations, a custom macro, a trailing comment, unbalanced braces across lines, a manuscript that already loads ulem and xcolor with and without options, changed lines containing citations (including citations with page numbers), cross-references, equation references, URLs and footnotes, the summary of structural changes, running headers, and a document with no changes, which must come out with no marking at all.