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

    Interface BuildResult

    interface BuildResult {
        citations: readonly CitationInline[];
        diagnostics: {
            code?:
                | "syntax"
                | "unsupported"
                | "undefined-command"
                | "undefined-environment"
                | "undefined-reference"
                | "duplicate-label"
                | "missing-file"
                | "missing-font"
                | "overfull-box"
                | "underfull-box"
                | "budget-exceeded"
                | "limit-exceeded"
                | "stopped"
                | "internal";
            column?: number;
            construct?: string;
            file: string;
            line: number;
            message: string;
            severity: "error"
            | "warning"
            | "info";
        }[];
        document: LatexDocument;
        references: readonly ReferenceInline[];
        steps: number;
        resolvePageNumbers(
            pages: ReadonlyMap<string, number>,
        ): {
            code?:
                | "syntax"
                | "unsupported"
                | "undefined-command"
                | "undefined-environment"
                | "undefined-reference"
                | "duplicate-label"
                | "missing-file"
                | "missing-font"
                | "overfull-box"
                | "underfull-box"
                | "budget-exceeded"
                | "limit-exceeded"
                | "stopped"
                | "internal";
            column?: number;
            construct?: string;
            file: string;
            line: number;
            message: string;
            severity: "error"
            | "warning"
            | "info";
        }[];
    }
    Index
    citations: readonly CitationInline[]

    Every \cite/\citep/\citet/\nocite, in source order — beside references rather than on the document for the same reason: they are the inputs to a resolution pass, not part of what the document means. \nocite sites are here too, and print nothing.

    diagnostics: {
        code?:
            | "syntax"
            | "unsupported"
            | "undefined-command"
            | "undefined-environment"
            | "undefined-reference"
            | "duplicate-label"
            | "missing-file"
            | "missing-font"
            | "overfull-box"
            | "underfull-box"
            | "budget-exceeded"
            | "limit-exceeded"
            | "stopped"
            | "internal";
        column?: number;
        construct?: string;
        file: string;
        line: number;
        message: string;
        severity: "error"
        | "warning"
        | "info";
    }[]
    document: LatexDocument
    references: readonly ReferenceInline[]

    Every \ref/\pageref in the document, in source order.

    steps: number

    Steps consumed, for CompileStats.steps.

    • The half of the two-pass cycle that only layout can close.

      \pageref cannot know its page until the document has been broken into pages, and the page it lands on can depend on how wide the reference prints — the same circularity LaTeX resolves with an .aux file and a second run. Chunk 7 does the same: lay out once with every \pageref still showing ??, collect marker name → page number from the Marker nodes it placed, call this, and lay out again. ReferenceInline.text is mutable precisely so the second run re-reads it without the model being rebuilt.

      Returns a diagnostic for every \pageref whose marker never appeared, so a reference that would print ?? is never silent.

      Parameters

      • pages: ReadonlyMap<string, number>

      Returns {
          code?:
              | "syntax"
              | "unsupported"
              | "undefined-command"
              | "undefined-environment"
              | "undefined-reference"
              | "duplicate-label"
              | "missing-file"
              | "missing-font"
              | "overfull-box"
              | "underfull-box"
              | "budget-exceeded"
              | "limit-exceeded"
              | "stopped"
              | "internal";
          column?: number;
          construct?: string;
          file: string;
          line: number;
          message: string;
          severity: "error"
          | "warning"
          | "info";
      }[]