Checking a document's claims

Every number derived, every output quoted from a run, every external fact checked or cut — and the source cited.

#Numbers the author works out

!value covers the numbers the canvas computes. Every other number in a document — a worked example's arithmetic, a step count, a trace through an algorithm, the readings a plot is drawn from — is worked out before it is written. A number that looks plausible and a number that was derived read identically on the page, and the reader has no way to tell them apart, which is exactly why the burden sits with the author.

#Output quoted from a run

A code environment's output is authored rather than executed — see Code environment execution model — and that puts the whole burden here: the comment or chunk stating what an interpreter prints is quoted from a run that actually happened. The same holds for a runnable environment, where a reader can compare the authored output against the real one in a single click.

#Facts checked or cut

Historical claims, attributions and named results are checked against a source, or they come out of the document. Hedging an unchecked claim into safety — often attributed to, is said to — keeps the assertion and removes the accountability for it.

Values quoted from the world are looked up rather than recalled: a coordinate on a canvas.geo written from memory puts a marker in the sea, and it is the one error a compiling document displays confidently.

#cite and the reference list

A source the document draws on is declared with cite beside the scenes and pointed at from the prose with !cite. The reference list is generated from the declarations and numbered in citation order, so a citation of a source that was never declared is a compile error rather than a gap in the list, and a declared source nothing cites never appears. locator: carries where in the source the claim is — a page, a section, a figure.

cite#fs1969(
    authors: Fellegi, I. P. and Sunter, A. B.
    year: 1969
    title: A theory for record linkage
    container: Journal of the American Statistical Association
    pages: 64(328), 1183–1210
    doi: 10.1080/01621459.1969.10501049
)

scene{
    The comparison vector and the likelihood ratio built from it are
    Fellegi and Sunter's !cite:#fs1969(locator: p. 1187), and the
    decision rule follows from them directly.
}

A figure taken from a paper, a dataset with an origin, and a result quoted rather than derived are the three places a citation is not optional.