\@eqnnum, which article defines as {\normalfont\normalcolor (\theequation)}.
The parentheses are added here and deliberately not in
formatEquationNumber — a \ref to an equation prints 3, not (3), and
the two would drift apart the first time either changed if they shared one
function (doc/counters.ts says the same thing from the other side).
The result is Inline[] rather than a box because the number is ordinary
text: \normalfont at the surrounding size, set by the same shaper every
other run goes through, so layout packs it with no special case. measure is
part of the signature because right-aligning the number against the text
width is layout's job and the number's material does not depend on it;
layout/math.ts positions what comes back.
An unnumbered line returns nothing, and that is a real answer rather than a
refusal: a starred variant or a \nonumber line is supposed to have no
number, and MathLine.number being null is how the document layer already
said so.
\@eqnnum, whicharticledefines as{\normalfont\normalcolor (\theequation)}.The parentheses are added here and deliberately not in
formatEquationNumber— a\refto an equation prints3, not(3), and the two would drift apart the first time either changed if they shared one function (doc/counters.tssays the same thing from the other side).The result is
Inline[]rather than a box because the number is ordinary text:\normalfontat the surrounding size, set by the same shaper every other run goes through, so layout packs it with no special case.measureis part of the signature because right-aligning the number against the text width is layout's job and the number's material does not depend on it;layout/math.tspositions what comes back.An unnumbered line returns nothing, and that is a real answer rather than a refusal: a starred variant or a
\nonumberline is supposed to have no number, andMathLine.numberbeing null is how the document layer already said so.