What a document covers

One topic, the constructs that topic needs, and the length covering it takes.

#A whole document, end to end

A file is a header, whatever constants and datasets the document declares, and a sequence of scenes. Each scene is a narrative in { } and a canvas in [ ], and the step markers in the narrative are what the canvas advances against. Everything else in this manual is the vocabulary those two slots take.

*(
    title: Why Euclid's algorithm terminates
    description: The remainders strictly decrease, and no such sequence is infinite.
    tags: number-theory, algorithms
    lesson
)

scene{
    Two numbers go in and the same rule runs on them over and over:
    $(a, b) \leftarrow (b, a \bmod b)$. Nothing about that says it
    ever stops.

    ===

    It does, and the reason is the second coordinate. A remainder mod $b$
    is smaller than $b$, so every step hands the next one a strictly
    smaller number to work with.
}[
    canvas.graph{
        // The pair (1071, 462) traced to (21, 0).
        line(x: 0, 1, 2, 3; y: 462, 147, 21, 0; colour: teal)

        cue{
            axis.label(y: 0; label: the remainder reaches zero; line)
        }(
            in: 1
        )
    }(
        x axis label: step
        y axis label: second coordinate
    )
]

scene{
    A strictly decreasing sequence of whole numbers bounded below by zero
    is finite, so the algorithm runs out of steps rather than out of
    patience.

    definition{
        A rule stating that a strictly decreasing sequence of non-negative
        integers is finite — the argument every termination proof of this
        shape rests on.
    }(
        term: Well-ordering of the naturals
    )
}

#The topic as the deliverable

A document teaches one topic, and the header's title names it. Every scene answers to that name: a reader who has read the title can predict what the document holds, and a scene they could not have predicted needs a reason the prose gives them.

#Constructs the topic did not ask for

The commonest departure is a canvas environment nobody asked for — a Python environment in a document about a statistical result, a plot of something adjacent in a document about a historical one. The test is whether the construct carries the topic or decorates it. A topic that is code needs code; a topic about a relationship between two quantities needs that relationship plotted; a topic that is neither needs neither, and what fails the test is a second document rather than a scene of this one.

#Length as an outcome

A document covers its topic and stops, and its scene count is what that took. A scene written to reach a length is padding, and it compiles exactly as well as the rest of the document.

#Breadth of vocabulary as a non-goal

No construct is reached for because the document has not used it yet. A document that uses four constructs because its content needed four is better than one that uses nine: the ninth is a form the reader has to read for the first time, spent on nothing the argument required. Selecting canvas content gives the same test for a single mark.

The reverse is not a defect. Three tables in a row is three scenes doing the same kind of work, and the fix is in the scenes rather than in the canvas — repainting the third as a graph leaves the repetition where it was and adds a form the content did not ask for.

#internote, note and lesson

These documents are internotes, in prose and in interface copy alike. In this vocabulary a bare note is the note callout and nothing else. lesson in the document header flags structured teaching material, which is what Explore's Lessons filter reads — a claim about what kind of document this is, not about how good it is.