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

    Interface BibContext

    What both entry points need. One object so the two calls read alike.

    interface BibContext {
        budget: Budget;
        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";
        }[];
        file: string;
        files: BibFiles;
    }
    Index
    budget: Budget

    Spend a step per entry parsed and per key resolved.

    citations: readonly CitationInline[]

    Every \cite/\citep/\citet/\nocite in the document, in source order. That order is the numbering order (see the file's own doc comment for why "plain" prints in citation order rather than alphabetically), and \nocite sites (style: "silent") contribute keys without printing.

    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";
    }[]

    Where diagnostics go. Appended to, never replaced.

    file: string

    The entrypoint, for a diagnostic with no better position than the document.

    files: BibFiles

    The whole project, decoded. .bib files are inputs like the .tex (D38): the engine performs no I/O, so a name in \bibliography{refs} is resolved against these keys — refs, then refs.bib — or it is a missing-file diagnostic. There is no path to open.