Atrium — shared contracts and the typesetting engine
    Preparing search index...

    Type Alias DocumentLength

    DocumentLength:
        | { kind: "points"; value: number }
        | { kind: "font"; unit: "em" | "ex"; value: number }
        | { factor: number; kind: "relative"; of: LengthRegister }

    A length as an \includegraphics key or a p{...} column writes it (brief 39). Deliberately unresolved: the document layer knows what the source asked for, and only the page design knows how many points 0.8\textwidth or 2em come to. Resolving here would bake one page design into the model, and the model is built once and laid out up to three times.

    Type Declaration

    • { kind: "points"; value: number }

      An absolute unit — pt, bp, in, cm, mm, pc, sp — already in points.

    • { kind: "font"; unit: "em" | "ex"; value: number }

      em/ex: a multiple of the type size in force where the construct sits.

    • { factor: number; kind: "relative"; of: LengthRegister }

      0.8\textwidth: a multiple of one of LaTeX's page-dimension registers.