Skip to content

Docs: the Attention marker runs 17 to 1 against the reference's note register #528

Open

Description

@Tim81

VellumPdf.Layout uses the Attention marker far more heavily than the reference voice does, and
the gap is large enough to be worth a deliberate decision rather than a drift.

Measured

The house voice is the Swiss Ephemeris programmer's reference. Re-measured 2026-09-13 by fetching the
page and counting, with the prose rule stated: a prose unit is a body paragraph, excluding the table of
contents, all tables, headings, and any paragraph 60% or more code. That keeps 24,856 words of prose.

the reference VellumPdf.Layout
Attention per 1,000 words of comparable prose 0.16 5.21
Attention per documented callable 0.044 0.63
note-family to attention-family 8.5 to 1 1 to 17

The ratio is the figure that survives every denominator argument, because it is internal to whatever
text you measure. The reference's workhorse is a plain Note that ... sentence inside running prose,
used 24 times against 4 uses of Attention. This package has one NOTE and 17 Attention.

What is not wrong, checked before filing

Every one of the 16 marked paragraphs is a genuine trap. I read all of them. Each describes a
caller expectation being defeated with a consequence they could not predict: a save destroying the
file it was writing to, a negative inset placing content off the page, a zero border width drawing a
hairline instead of nothing, a zero-width stroke still stroking, a span of zero silently behaving as
one. None is a bare mechanism.

A review initially proposed removing three of them, on the grounds that a zero line width asking the
device for its thinnest line is a mechanism rather than a trap. That reading is wrong and the
proposal was not acted on.
In each of those three a caller sets zero intending to remove something
and gets a visible line, which is a defeated expectation and exactly what the marker is for.

The package does have a plain register, and it is the dominant one. Counted across the package:

caution-bearing paragraphs count
carrying a marker 14
plain, no marker 28

So this is not a package that marks everything. It marks roughly one caution in three, where the
reference marks about one in seven.

What to decide

Whether a documentation set for a layout engine should carry more of these markers than a reference
for an ephemeris library does. There is a real argument that it should: this package's whole
documentation effort exists because so many of its properties accept input and then do something the
caller did not intend, and #503 and its follow-ups exist to say so. A trap per one and a half
documented callables may simply be what this surface is.

The argument against is that a marker used 17 times stops being a signal, which is what happened once
before here when a pass reached 23 and a reviewer called it "the new bold".

If the decision is to reduce

Do not delete the warnings. Move the mildest to plain sentences carrying the same content, the way the
reference does with Note that. On inspection the mildest candidates are the ones where the behaviour
is a documented consequence of a documented combination rather than a surprise: setting both image
dimensions overriding the aspect ratio, and a zero-value pie slice contributing no angle.

Do not use a per-1,000-words target to drive this. Use the note-to-attention ratio, and re-count the
14 against the 28 afterwards.

Related

The bold runs in this package are all exactly one word, drawn from five tokens (Attention 17,
not 10, refused 3, nor 2, NOTE 1). The reference is 50% one-word with a real spread, and
what it bolds is usually the surprising value itself: a count, a date, a limit. Bolding some of the
measured values this package already documents would fix the flatness without adding emphasis.

Filed from the v2.3.3 documentation review. Not blocking #526, which is otherwise green.

Activity

  1. added this to the Backlog milestone on Sep 13, 2026
  2. Tim81 commented on Sep 13, 2026

    @Tim81
    OwnerAuthor

    Two further measures of the same drift, found during the #503 documentation review and
    deliberately not patched there. Both are package-wide and mostly pre-existing, so a fix belongs
    here rather than inside a branch that is being reviewed clause by clause.

    Counted over every /// line in src/VellumPdf.Layout at c01b67c, excluding bin/obj.

    Em dashes: 39, against zero in the reference.

    file count
    Rendering/Table/TableRenderer.cs 10
    Rendering/Table/TableGridResolver.cs 6
    Document.cs 6
    Rendering/ParagraphRenderer.cs 4
    Rendering/DocumentRenderer.cs 4
    Core/LayoutResult.cs 3
    Elements/BandTruncationWarning.cs 2
    Rendering/RendererContext.cs, Elements/RunningBand.cs, Elements/PieChart.cs, Core/LayoutValidation.cs 1 each

    Zero of them were added by the #503 branch — verified against origin/main. Most sit in
    private-method documentation, which no consumer sees, so the public surface is a smaller job than
    the total suggests.

    rather than: 61 occurrences, at roughly 4.5 per 1,000 prose words against the reference's
    0.14 — a factor of about 32. Folding in instead of narrows it to about 11x. A large share is
    load-bearing contrast that should stay ("raised from a save rather than from this property"), so
    this is a candidate for judgement rather than a sweep; the point is that the corrective reflex has
    become a tic at that density.

    One measure worth recording as not a problem: non-marker bold sits at 2.16 per 1,000 words
    across Layout against the reference's 4.56. Emphasis is under budget, not over. If markers are
    reduced here, the bold that carries a surprising value has room to grow rather than needing to
    shrink with them.

    Method note for whoever takes this: the reference's sentence-length distribution is not a
    usable comparator. Three separate measurement passes found it swings from a median of 10 to 18
    depending on how list and table paragraphs are filtered, because code blocks do not split. Use em
    dashes, bold density, the digit share of bold, and marker frequency; leave sentence length alone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions