Anchors

The quickstart used <r1-1>/<r1-2> without explaining the shape. An anchor is parsed into one of three kinds, purely from its shape: <r1-2> is reviewer 1, comment 2; <e1> is editor comment 1; anything else — <bob-3>, <bob> — is a co-author id, “bob”, optionally followed by a change number. Each kind gets its own color automatically, without any setup:

#import "../../lib.typ": *

#set page(width: 16.6cm, height: auto, margin: 12pt)
#set text(size: 10.5pt)
#set-revisions(
  require-exchange: false,
  authors: (
    bob: (name: "Bobby Fischer", color: rgb("#c026d3")),
    alice: "Alice Smith",
  ),
)

#added(<r1-1>)[A reviewer's comment, `<r1-1>` --- one color per reviewer number.]

#added(<e1>)[An editor's comment, `<e1>` --- its own fixed color, distinct from every reviewer.]

#added(<bob-1>)[Bob's own change, `<bob-1>` --- name and color both registered explicitly.]

#added(<alice-1>)[Alice's own change, `<alice-1>` --- name registered, color assigned automatically.]

#added(<carol-1>)[Carol's own change, `<carol-1>` --- nothing registered at all, still a distinct color, displayed under her raw id.]

Reviewers are colored by number, cycling through a fixed palette. The editor gets one fixed color of its own. Co-authors draw from a separate palette, so a reviewer and a co-author active in the same manuscript are never confusable — and an author’s color holds even with nothing configured for them at all (Carol, above): it’s a deterministic function of the id text itself, the same color everywhere that id appears. set-revisions(authors: (...)), used above for Bob and Alice, additionally gives an id a full display name and/or a specific color:

#set-revisions(authors: (
  bob: (name: "Bobby Fischer", color: rgb("#c026d3")),  // both
  alice: "Alice Smith",                                  // name only
))

Either key can be omitted; an id with a name: but no color: still gets its automatic color, exactly like an id with nothing registered at all.

Multiple anchors on one passage

A comment raised jointly, or addressed in the same place — passage/added/deleted/replaced all accept an array of anchors instead of one:

#import "../../lib.typ": *

#set page(width: 16.6cm, height: auto, margin: 12pt)
#set text(size: 10.5pt)
#set-revisions(require-exchange: false)

#added((<r1-2>, <r2-1>))[A concern raised jointly by two reviewers, addressed in one place.]

Colored by the first anchor in the list.

Bare anchors

<bob>, with no trailing -<n>, is deliberately not meant to key into one particular exchange — it’s the shape for a project with no response document at all, where an anchor just says whose change this is:

#import "../../lib.typ": *

#set page(width: 16.6cm, height: auto, margin: 12pt)
#set text(size: 10.5pt)

#added(<dave>)[Dave's first change --- a bare anchor, no number.]

#added(<dave>)[Dave's second change, same bare anchor reused --- no "duplicate" warning, no "no matching exchange" warning either, even though no response document exists anywhere in this example.]

Reused as many times as needed, with neither of the two diagnostics that would otherwise apply: no “duplicate exchange” (there’s nothing to be a duplicate of — a bare anchor isn’t meant to be unique), and no “no matching exchange” (covered next).

require-exchange

A numbered anchor is assumed to answer one specific comment, so passage/added/deleted/replaced check that a matching exchange/note exists somewhere and warn if not:

#import "../../lib.typ": *

#set page(width: 16.6cm, height: auto, margin: 12pt)
#set text(size: 10.5pt)

#added(<erin-1>)[A numbered anchor with no matching exchange anywhere --- warns by default.]

#set-revisions(require-exchange: false)

#added(<frank-1>)[Same situation, but `require-exchange: false` is now active --- no warning.]

set-revisions(require-exchange: false) turns this check off from that point on — for a project that wants numbered, colored anchors without ever writing a response document.

← Marking changesStyling marks: set-revisions →